Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next
authorMark Brown <broonie@kernel.org>
Fri, 10 Nov 2017 21:30:54 +0000 (21:30 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 10 Nov 2017 21:30:54 +0000 (21:30 +0000)
14081 files changed:
.mailmap
Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935
Documentation/ABI/testing/sysfs-class-remoteproc
Documentation/ABI/testing/sysfs-kernel-mm-swap
Documentation/ABI/testing/sysfs-power
Documentation/core-api/kernel-api.rst
Documentation/core-api/workqueue.rst
Documentation/cpu-freq/index.txt
Documentation/device-mapper/dm-raid.txt
Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
Documentation/devicetree/bindings/iio/proximity/as3935.txt
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt
Documentation/devicetree/bindings/leds/ams,as3645a.txt
Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.txt
Documentation/devicetree/bindings/net/marvell-pp2.txt
Documentation/devicetree/bindings/net/rockchip-dwmac.txt
Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt [new file with mode: 0644]
Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt
Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/driver-api/pm/devices.rst
Documentation/driver-model/driver.txt
Documentation/filesystems/cifs/AUTHORS
Documentation/filesystems/cifs/README
Documentation/filesystems/cifs/TODO
Documentation/filesystems/cifs/cifs.txt
Documentation/filesystems/overlayfs.txt
Documentation/filesystems/sysfs.txt
Documentation/i2c/busses/i2c-i801
Documentation/kbuild/makefiles.txt
Documentation/networking/bonding.txt
Documentation/networking/filter.txt
Documentation/networking/ip-sysctl.txt
Documentation/networking/switchdev.txt
Documentation/process/index.rst
Documentation/process/kernel-enforcement-statement.rst [new file with mode: 0644]
Documentation/sysctl/kernel.txt
Documentation/userspace-api/seccomp_filter.rst
Kbuild
Kconfig
MAINTAINERS
Makefile
arch/Kconfig
arch/alpha/Kconfig
arch/alpha/Kconfig.debug
arch/alpha/boot/bootloader.lds
arch/alpha/boot/bootp.c
arch/alpha/boot/bootpz.c
arch/alpha/boot/head.S
arch/alpha/boot/main.c
arch/alpha/boot/misc.c
arch/alpha/boot/tools/mkbb.c
arch/alpha/boot/tools/objstrip.c
arch/alpha/include/asm/Kbuild
arch/alpha/include/asm/a.out.h
arch/alpha/include/asm/agp.h
arch/alpha/include/asm/agp_backend.h
arch/alpha/include/asm/atomic.h
arch/alpha/include/asm/barrier.h
arch/alpha/include/asm/bitops.h
arch/alpha/include/asm/bug.h
arch/alpha/include/asm/cache.h
arch/alpha/include/asm/cacheflush.h
arch/alpha/include/asm/checksum.h
arch/alpha/include/asm/cmpxchg.h
arch/alpha/include/asm/compiler.h
arch/alpha/include/asm/console.h
arch/alpha/include/asm/core_apecs.h
arch/alpha/include/asm/core_cia.h
arch/alpha/include/asm/core_irongate.h
arch/alpha/include/asm/core_lca.h
arch/alpha/include/asm/core_marvel.h
arch/alpha/include/asm/core_mcpcia.h
arch/alpha/include/asm/core_polaris.h
arch/alpha/include/asm/core_t2.h
arch/alpha/include/asm/core_titan.h
arch/alpha/include/asm/core_tsunami.h
arch/alpha/include/asm/core_wildfire.h
arch/alpha/include/asm/delay.h
arch/alpha/include/asm/dma-mapping.h
arch/alpha/include/asm/dma.h
arch/alpha/include/asm/elf.h
arch/alpha/include/asm/err_common.h
arch/alpha/include/asm/err_ev7.h
arch/alpha/include/asm/extable.h
arch/alpha/include/asm/fpu.h
arch/alpha/include/asm/futex.h
arch/alpha/include/asm/gct.h
arch/alpha/include/asm/hardirq.h
arch/alpha/include/asm/hw_irq.h
arch/alpha/include/asm/hwrpb.h
arch/alpha/include/asm/io.h
arch/alpha/include/asm/io_trivial.h
arch/alpha/include/asm/irq.h
arch/alpha/include/asm/irqflags.h
arch/alpha/include/asm/jensen.h
arch/alpha/include/asm/kmap_types.h
arch/alpha/include/asm/linkage.h
arch/alpha/include/asm/local.h
arch/alpha/include/asm/machvec.h
arch/alpha/include/asm/mc146818rtc.h
arch/alpha/include/asm/mce.h
arch/alpha/include/asm/mmu.h
arch/alpha/include/asm/mmu_context.h
arch/alpha/include/asm/mmzone.h
arch/alpha/include/asm/module.h
arch/alpha/include/asm/page.h
arch/alpha/include/asm/pal.h
arch/alpha/include/asm/param.h
arch/alpha/include/asm/parport.h
arch/alpha/include/asm/pci.h
arch/alpha/include/asm/percpu.h
arch/alpha/include/asm/pgalloc.h
arch/alpha/include/asm/pgtable.h
arch/alpha/include/asm/processor.h
arch/alpha/include/asm/ptrace.h
arch/alpha/include/asm/rwsem.h
arch/alpha/include/asm/serial.h
arch/alpha/include/asm/shmparam.h
arch/alpha/include/asm/signal.h
arch/alpha/include/asm/smp.h
arch/alpha/include/asm/socket.h
arch/alpha/include/asm/special_insns.h
arch/alpha/include/asm/spinlock.h
arch/alpha/include/asm/spinlock_types.h
arch/alpha/include/asm/string.h
arch/alpha/include/asm/switch_to.h
arch/alpha/include/asm/syscall.h
arch/alpha/include/asm/termios.h
arch/alpha/include/asm/thread_info.h
arch/alpha/include/asm/timex.h
arch/alpha/include/asm/tlb.h
arch/alpha/include/asm/tlbflush.h
arch/alpha/include/asm/topology.h
arch/alpha/include/asm/types.h
arch/alpha/include/asm/uaccess.h
arch/alpha/include/asm/ucontext.h
arch/alpha/include/asm/unaligned.h
arch/alpha/include/asm/unistd.h
arch/alpha/include/asm/user.h
arch/alpha/include/asm/vga.h
arch/alpha/include/asm/word-at-a-time.h
arch/alpha/include/asm/wrperfmon.h
arch/alpha/include/asm/xchg.h
arch/alpha/include/uapi/asm/a.out.h
arch/alpha/include/uapi/asm/auxvec.h
arch/alpha/include/uapi/asm/bitsperlong.h
arch/alpha/include/uapi/asm/byteorder.h
arch/alpha/include/uapi/asm/compiler.h
arch/alpha/include/uapi/asm/console.h
arch/alpha/include/uapi/asm/errno.h
arch/alpha/include/uapi/asm/fcntl.h
arch/alpha/include/uapi/asm/fpu.h
arch/alpha/include/uapi/asm/gentrap.h
arch/alpha/include/uapi/asm/ioctl.h
arch/alpha/include/uapi/asm/ioctls.h
arch/alpha/include/uapi/asm/ipcbuf.h
arch/alpha/include/uapi/asm/kvm_para.h
arch/alpha/include/uapi/asm/mman.h
arch/alpha/include/uapi/asm/msgbuf.h
arch/alpha/include/uapi/asm/pal.h
arch/alpha/include/uapi/asm/param.h
arch/alpha/include/uapi/asm/poll.h
arch/alpha/include/uapi/asm/posix_types.h
arch/alpha/include/uapi/asm/ptrace.h
arch/alpha/include/uapi/asm/reg.h
arch/alpha/include/uapi/asm/regdef.h
arch/alpha/include/uapi/asm/resource.h
arch/alpha/include/uapi/asm/sembuf.h
arch/alpha/include/uapi/asm/setup.h
arch/alpha/include/uapi/asm/shmbuf.h
arch/alpha/include/uapi/asm/sigcontext.h
arch/alpha/include/uapi/asm/siginfo.h
arch/alpha/include/uapi/asm/signal.h
arch/alpha/include/uapi/asm/socket.h
arch/alpha/include/uapi/asm/sockios.h
arch/alpha/include/uapi/asm/stat.h
arch/alpha/include/uapi/asm/statfs.h
arch/alpha/include/uapi/asm/swab.h
arch/alpha/include/uapi/asm/sysinfo.h
arch/alpha/include/uapi/asm/termbits.h
arch/alpha/include/uapi/asm/termios.h
arch/alpha/include/uapi/asm/types.h
arch/alpha/include/uapi/asm/unistd.h
arch/alpha/kernel/Makefile
arch/alpha/kernel/asm-offsets.c
arch/alpha/kernel/binfmt_loader.c
arch/alpha/kernel/console.c
arch/alpha/kernel/core_apecs.c
arch/alpha/kernel/core_cia.c
arch/alpha/kernel/core_irongate.c
arch/alpha/kernel/core_lca.c
arch/alpha/kernel/core_marvel.c
arch/alpha/kernel/core_mcpcia.c
arch/alpha/kernel/core_polaris.c
arch/alpha/kernel/core_t2.c
arch/alpha/kernel/core_titan.c
arch/alpha/kernel/core_tsunami.c
arch/alpha/kernel/core_wildfire.c
arch/alpha/kernel/entry.S
arch/alpha/kernel/err_common.c
arch/alpha/kernel/err_ev6.c
arch/alpha/kernel/err_ev7.c
arch/alpha/kernel/err_impl.h
arch/alpha/kernel/err_marvel.c
arch/alpha/kernel/err_titan.c
arch/alpha/kernel/es1888.c
arch/alpha/kernel/gct.c
arch/alpha/kernel/head.S
arch/alpha/kernel/io.c
arch/alpha/kernel/irq.c
arch/alpha/kernel/irq_alpha.c
arch/alpha/kernel/irq_i8259.c
arch/alpha/kernel/irq_impl.h
arch/alpha/kernel/irq_pyxis.c
arch/alpha/kernel/irq_srm.c
arch/alpha/kernel/machvec_impl.h
arch/alpha/kernel/osf_sys.c
arch/alpha/kernel/pc873xx.c
arch/alpha/kernel/pc873xx.h
arch/alpha/kernel/pci-noop.c
arch/alpha/kernel/pci-sysfs.c
arch/alpha/kernel/pci.c
arch/alpha/kernel/pci_impl.h
arch/alpha/kernel/pci_iommu.c
arch/alpha/kernel/perf_event.c
arch/alpha/kernel/process.c
arch/alpha/kernel/proto.h
arch/alpha/kernel/ptrace.c
arch/alpha/kernel/rtc.c
arch/alpha/kernel/setup.c
arch/alpha/kernel/signal.c
arch/alpha/kernel/smc37c93x.c
arch/alpha/kernel/smp.c
arch/alpha/kernel/srmcons.c
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_cabriolet.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_eb64p.c
arch/alpha/kernel/sys_eiger.c
arch/alpha/kernel/sys_jensen.c
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_miata.c
arch/alpha/kernel/sys_mikasa.c
arch/alpha/kernel/sys_nautilus.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_ruffian.c
arch/alpha/kernel/sys_rx164.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_sio.c
arch/alpha/kernel/sys_sx164.c
arch/alpha/kernel/sys_takara.c
arch/alpha/kernel/sys_titan.c
arch/alpha/kernel/sys_wildfire.c
arch/alpha/kernel/systbls.S
arch/alpha/kernel/time.c
arch/alpha/kernel/traps.c
arch/alpha/kernel/vmlinux.lds.S
arch/alpha/lib/Makefile
arch/alpha/lib/callback_srm.S
arch/alpha/lib/checksum.c
arch/alpha/lib/clear_page.S
arch/alpha/lib/clear_user.S
arch/alpha/lib/copy_page.S
arch/alpha/lib/copy_user.S
arch/alpha/lib/csum_ipv6_magic.S
arch/alpha/lib/csum_partial_copy.c
arch/alpha/lib/dbg_current.S
arch/alpha/lib/dbg_stackcheck.S
arch/alpha/lib/dbg_stackkill.S
arch/alpha/lib/dec_and_lock.c
arch/alpha/lib/divide.S
arch/alpha/lib/ev6-clear_page.S
arch/alpha/lib/ev6-clear_user.S
arch/alpha/lib/ev6-copy_page.S
arch/alpha/lib/ev6-copy_user.S
arch/alpha/lib/ev6-csum_ipv6_magic.S
arch/alpha/lib/ev6-divide.S
arch/alpha/lib/ev6-memchr.S
arch/alpha/lib/ev6-memcpy.S
arch/alpha/lib/ev6-memset.S
arch/alpha/lib/ev6-stxcpy.S
arch/alpha/lib/ev6-stxncpy.S
arch/alpha/lib/ev67-strcat.S
arch/alpha/lib/ev67-strchr.S
arch/alpha/lib/ev67-strlen.S
arch/alpha/lib/ev67-strncat.S
arch/alpha/lib/ev67-strrchr.S
arch/alpha/lib/fls.c
arch/alpha/lib/fpreg.c
arch/alpha/lib/memcpy.c
arch/alpha/lib/memmove.S
arch/alpha/lib/memset.S
arch/alpha/lib/srm_printk.c
arch/alpha/lib/srm_puts.c
arch/alpha/lib/stacktrace.c
arch/alpha/lib/strcat.S
arch/alpha/lib/strchr.S
arch/alpha/lib/strcpy.S
arch/alpha/lib/strlen.S
arch/alpha/lib/strncat.S
arch/alpha/lib/strncpy.S
arch/alpha/lib/strrchr.S
arch/alpha/lib/stxcpy.S
arch/alpha/lib/stxncpy.S
arch/alpha/lib/udelay.c
arch/alpha/math-emu/sfp-util.h
arch/alpha/mm/fault.c
arch/alpha/mm/init.c
arch/alpha/mm/numa.c
arch/alpha/oprofile/Makefile
arch/arc/Kconfig
arch/arc/Kconfig.debug
arch/arc/Makefile
arch/arc/boot/Makefile
arch/arc/boot/dts/Makefile
arch/arc/boot/dts/axs10x_mb.dtsi
arch/arc/boot/dts/hsdk.dts
arch/arc/configs/axs101_defconfig
arch/arc/configs/axs103_defconfig
arch/arc/configs/axs103_smp_defconfig
arch/arc/configs/haps_hs_smp_defconfig
arch/arc/configs/hsdk_defconfig
arch/arc/configs/vdk_hs38_defconfig
arch/arc/configs/vdk_hs38_smp_defconfig
arch/arc/include/asm/Kbuild
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/entry-arcv2.h
arch/arc/include/asm/fb.h
arch/arc/include/asm/processor.h
arch/arc/include/uapi/asm/byteorder.h
arch/arc/include/uapi/asm/cachectl.h
arch/arc/include/uapi/asm/elf.h
arch/arc/include/uapi/asm/page.h
arch/arc/include/uapi/asm/ptrace.h
arch/arc/include/uapi/asm/sigcontext.h
arch/arc/include/uapi/asm/signal.h
arch/arc/include/uapi/asm/swab.h
arch/arc/include/uapi/asm/unistd.h
arch/arc/kernel/setup.c
arch/arc/kernel/smp.c
arch/arc/kernel/sys.c
arch/arc/oprofile/Makefile
arch/arc/plat-axs10x/axs10x.c
arch/arc/plat-eznps/Kconfig
arch/arc/plat-hsdk/Kconfig
arch/arc/plat-hsdk/platform.c
arch/arm/Kconfig
arch/arm/Kconfig-nommu
arch/arm/Kconfig.debug
arch/arm/Makefile
arch/arm/boot/bootp/Makefile
arch/arm/boot/bootp/initrd.S
arch/arm/boot/bootp/kernel.S
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/atags_to_fdt.c
arch/arm/boot/compressed/big-endian.S
arch/arm/boot/compressed/debug.S
arch/arm/boot/compressed/decompress.c
arch/arm/boot/compressed/head-sa1100.S
arch/arm/boot/compressed/head-sharpsl.S
arch/arm/boot/compressed/head-xscale.S
arch/arm/boot/compressed/libfdt_env.h
arch/arm/boot/compressed/misc.c
arch/arm/boot/compressed/piggy.S
arch/arm/boot/compressed/string.c
arch/arm/boot/compressed/vmlinux.lds.S
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/am57xx-commercial-grade.dtsi
arch/arm/boot/dts/am57xx-industrial-grade.dtsi
arch/arm/boot/dts/armada-375.dtsi
arch/arm/boot/dts/armada-38x.dtsi
arch/arm/boot/dts/armada-39x.dtsi
arch/arm/boot/dts/armv7-m.dtsi
arch/arm/boot/dts/aspeed-ast2500-evb.dts
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
arch/arm/boot/dts/aspeed-g4.dtsi
arch/arm/boot/dts/aspeed-g5.dtsi
arch/arm/boot/dts/at91-ariettag25.dts
arch/arm/boot/dts/at91-sama5d27_som1.dtsi
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
arch/arm/boot/dts/at91-sama5d2_xplained.dts
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
arch/arm/boot/dts/bcm2835-rpi-a.dts
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
arch/arm/boot/dts/bcm2835-rpi-b.dts
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
arch/arm/boot/dts/bcm2835.dtsi
arch/arm/boot/dts/bcm2836-rpi-2-b.dts
arch/arm/boot/dts/bcm2836.dtsi
arch/arm/boot/dts/bcm2837-rpi-3-b.dts
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi
arch/arm/boot/dts/bcm283x.dtsi
arch/arm/boot/dts/bcm63138.dtsi
arch/arm/boot/dts/bcm7445-bcm97445svmb.dts
arch/arm/boot/dts/bcm7445.dtsi
arch/arm/boot/dts/bcm963138dvt.dts
arch/arm/boot/dts/da850-evm.dts
arch/arm/boot/dts/dove-cubox-es.dts
arch/arm/boot/dts/dove-cubox.dts
arch/arm/boot/dts/dove-d2plug.dts
arch/arm/boot/dts/dove-d3plug.dts
arch/arm/boot/dts/dove-dove-db.dts
arch/arm/boot/dts/dove.dtsi
arch/arm/boot/dts/dra7xx-clocks.dtsi
arch/arm/boot/dts/efm32gg-dk3750.dts
arch/arm/boot/dts/efm32gg.dtsi
arch/arm/boot/dts/elpida_ecb240abacn.dtsi
arch/arm/boot/dts/gemini-nas4220b.dts
arch/arm/boot/dts/gemini-rut1xx.dts
arch/arm/boot/dts/gemini-sq201.dts
arch/arm/boot/dts/gemini-wbd111.dts
arch/arm/boot/dts/gemini-wbd222.dts
arch/arm/boot/dts/gemini.dtsi
arch/arm/boot/dts/imx28-apx4devkit.dts
arch/arm/boot/dts/imx6qdl-dfi-fs700-m60.dtsi
arch/arm/boot/dts/imx7d.dtsi
arch/arm/boot/dts/integrator.dtsi
arch/arm/boot/dts/integratorap.dts
arch/arm/boot/dts/integratorcp.dts
arch/arm/boot/dts/kirkwood-6192.dtsi
arch/arm/boot/dts/kirkwood-6281.dtsi
arch/arm/boot/dts/kirkwood-6282.dtsi
arch/arm/boot/dts/kirkwood-98dx4122.dtsi
arch/arm/boot/dts/kirkwood-cloudbox.dts
arch/arm/boot/dts/kirkwood-dns320.dts
arch/arm/boot/dts/kirkwood-dns325.dts
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/boot/dts/kirkwood-dockstar.dts
arch/arm/boot/dts/kirkwood-dreamplug.dts
arch/arm/boot/dts/kirkwood-goflexnet.dts
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
arch/arm/boot/dts/kirkwood-ib62x0.dts
arch/arm/boot/dts/kirkwood-iconnect.dts
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
arch/arm/boot/dts/kirkwood-is2.dts
arch/arm/boot/dts/kirkwood-km_common.dtsi
arch/arm/boot/dts/kirkwood-km_fixedeth.dts
arch/arm/boot/dts/kirkwood-km_kirkwood.dts
arch/arm/boot/dts/kirkwood-lschlv2.dts
arch/arm/boot/dts/kirkwood-lsxhl.dts
arch/arm/boot/dts/kirkwood-lsxl.dtsi
arch/arm/boot/dts/kirkwood-mplcec4.dts
arch/arm/boot/dts/kirkwood-ns2-common.dtsi
arch/arm/boot/dts/kirkwood-ns2.dts
arch/arm/boot/dts/kirkwood-ns2lite.dts
arch/arm/boot/dts/kirkwood-ns2max.dts
arch/arm/boot/dts/kirkwood-ns2mini.dts
arch/arm/boot/dts/kirkwood-nsa310.dts
arch/arm/boot/dts/kirkwood-nsa310a.dts
arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
arch/arm/boot/dts/kirkwood-openblocks_a6.dts
arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
arch/arm/boot/dts/kirkwood-topkick.dts
arch/arm/boot/dts/kirkwood-ts219-6281.dts
arch/arm/boot/dts/kirkwood-ts219-6282.dts
arch/arm/boot/dts/kirkwood-ts219.dtsi
arch/arm/boot/dts/kirkwood.dtsi
arch/arm/boot/dts/moxart.dtsi
arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi
arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi
arch/arm/boot/dts/omap-zoom-common.dtsi
arch/arm/boot/dts/omap2420-n800.dts
arch/arm/boot/dts/omap2420-n810-wimax.dts
arch/arm/boot/dts/omap2420-n810.dts
arch/arm/boot/dts/omap2420-n8x0-common.dtsi
arch/arm/boot/dts/omap3-cm-t3517.dts
arch/arm/boot/dts/omap3-cm-t3530.dts
arch/arm/boot/dts/omap3-cm-t3730.dts
arch/arm/boot/dts/omap3-cm-t3x.dtsi
arch/arm/boot/dts/omap3-cm-t3x30.dtsi
arch/arm/boot/dts/omap3-evm-common.dtsi
arch/arm/boot/dts/omap3-n900.dts
arch/arm/boot/dts/omap3-n950-n9.dtsi
arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi
arch/arm/boot/dts/omap3-sb-t35.dtsi
arch/arm/boot/dts/omap3-sbc-t3517.dts
arch/arm/boot/dts/omap3-sbc-t3530.dts
arch/arm/boot/dts/omap3-sbc-t3730.dts
arch/arm/boot/dts/omap5-cm-t54.dts
arch/arm/boot/dts/omap5-sbc-t54.dts
arch/arm/boot/dts/pxa27x.dtsi
arch/arm/boot/dts/pxa3xx.dtsi
arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval-pins.dtsi
arch/arm/boot/dts/qcom-apq8064-arrow-sd-600eval.dts
arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
arch/arm/boot/dts/qcom-apq8064-pins.dtsi
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
arch/arm/boot/dts/qcom-apq8064-v2.0.dtsi
arch/arm/boot/dts/qcom-apq8064.dtsi
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
arch/arm/boot/dts/qcom-apq8084-mtp.dts
arch/arm/boot/dts/qcom-apq8084.dtsi
arch/arm/boot/dts/qcom-ipq8064-ap148.dts
arch/arm/boot/dts/qcom-ipq8064-v1.0.dtsi
arch/arm/boot/dts/qcom-ipq8064.dtsi
arch/arm/boot/dts/qcom-msm8660-surf.dts
arch/arm/boot/dts/qcom-msm8660.dtsi
arch/arm/boot/dts/qcom-msm8960-cdp.dts
arch/arm/boot/dts/qcom-msm8960.dtsi
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
arch/arm/boot/dts/qcom-msm8974.dtsi
arch/arm/boot/dts/qcom-pm8841.dtsi
arch/arm/boot/dts/qcom-pm8941.dtsi
arch/arm/boot/dts/qcom-pma8084.dtsi
arch/arm/boot/dts/sama5d2-pinfunc.h
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/samsung_k3pe0e000b.dtsi
arch/arm/boot/dts/skeleton.dtsi
arch/arm/boot/dts/skeleton64.dtsi
arch/arm/boot/dts/st-pincfg.h
arch/arm/boot/dts/ste-nomadik-nhk15.dts
arch/arm/boot/dts/ste-nomadik-s8815.dts
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
arch/arm/boot/dts/ste-u300.dts
arch/arm/boot/dts/stm32429i-eval.dts
arch/arm/boot/dts/stm32f4-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32f429-disco.dts
arch/arm/boot/dts/stm32f429-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32f429.dtsi
arch/arm/boot/dts/stm32f469-disco.dts
arch/arm/boot/dts/stm32f469-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sun6i-a31.dtsi
arch/arm/boot/dts/tango4-common.dtsi
arch/arm/boot/dts/tango4-smp8758.dtsi
arch/arm/boot/dts/tango4-vantage-1172.dts
arch/arm/boot/dts/tegra114-dalmore.dts
arch/arm/boot/dts/tegra114-roth.dts
arch/arm/boot/dts/tegra114-tn7.dts
arch/arm/boot/dts/tegra114.dtsi
arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
arch/arm/boot/dts/tegra124-jetson-tk1.dts
arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi
arch/arm/boot/dts/tegra124-nyan-big.dts
arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi
arch/arm/boot/dts/tegra124-nyan-blaze.dts
arch/arm/boot/dts/tegra124-nyan.dtsi
arch/arm/boot/dts/tegra124-venice2.dts
arch/arm/boot/dts/tegra124.dtsi
arch/arm/boot/dts/tegra20-colibri-512.dtsi
arch/arm/boot/dts/tegra20-harmony.dts
arch/arm/boot/dts/tegra20-iris-512.dts
arch/arm/boot/dts/tegra20-medcom-wide.dts
arch/arm/boot/dts/tegra20-paz00.dts
arch/arm/boot/dts/tegra20-plutux.dts
arch/arm/boot/dts/tegra20-seaboard.dts
arch/arm/boot/dts/tegra20-tamonten.dtsi
arch/arm/boot/dts/tegra20-tec.dts
arch/arm/boot/dts/tegra20-trimslice.dts
arch/arm/boot/dts/tegra20-ventana.dts
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30-apalis-eval.dts
arch/arm/boot/dts/tegra30-apalis.dtsi
arch/arm/boot/dts/tegra30-beaver.dts
arch/arm/boot/dts/tegra30-cardhu-a02.dts
arch/arm/boot/dts/tegra30-cardhu-a04.dts
arch/arm/boot/dts/tegra30-cardhu.dtsi
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
arch/arm/boot/dts/tegra30-colibri.dtsi
arch/arm/boot/dts/tegra30.dtsi
arch/arm/boot/dts/uniphier-ld4.dtsi
arch/arm/boot/dts/uniphier-pro4.dtsi
arch/arm/boot/dts/uniphier-sld8.dtsi
arch/arm/boot/dts/versatile-ab.dts
arch/arm/boot/dts/versatile-pb.dts
arch/arm/boot/dts/vexpress-v2m.dtsi
arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dts
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
arch/arm/boot/dts/vexpress-v2p-ca5s.dts
arch/arm/boot/dts/vexpress-v2p-ca9.dts
arch/arm/boot/dts/xenvm-4.2.dts
arch/arm/boot/dts/zx296702-ad1.dts
arch/arm/boot/dts/zx296702.dtsi
arch/arm/common/Kconfig
arch/arm/common/Makefile
arch/arm/configs/gemini_defconfig
arch/arm/configs/pxa_defconfig
arch/arm/configs/viper_defconfig
arch/arm/configs/zeus_defconfig
arch/arm/crypto/Kconfig
arch/arm/crypto/Makefile
arch/arm/crypto/sha1.h
arch/arm/crypto/sha256_glue.h
arch/arm/crypto/sha512.h
arch/arm/include/asm/Kbuild
arch/arm/include/asm/arch_timer.h
arch/arm/include/asm/barrier.h
arch/arm/include/asm/bitops.h
arch/arm/include/asm/bitrev.h
arch/arm/include/asm/bug.h
arch/arm/include/asm/cache.h
arch/arm/include/asm/cachetype.h
arch/arm/include/asm/checksum.h
arch/arm/include/asm/cmpxchg.h
arch/arm/include/asm/compiler.h
arch/arm/include/asm/cp15.h
arch/arm/include/asm/cpuidle.h
arch/arm/include/asm/cputype.h
arch/arm/include/asm/cti.h
arch/arm/include/asm/delay.h
arch/arm/include/asm/div64.h
arch/arm/include/asm/dma-contiguous.h
arch/arm/include/asm/dma-iommu.h
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/dma.h
arch/arm/include/asm/ecard.h
arch/arm/include/asm/elf.h
arch/arm/include/asm/entry-macro-multi.S
arch/arm/include/asm/exception.h
arch/arm/include/asm/fiq.h
arch/arm/include/asm/fixmap.h
arch/arm/include/asm/flat.h
arch/arm/include/asm/ftrace.h
arch/arm/include/asm/futex.h
arch/arm/include/asm/gpio.h
arch/arm/include/asm/hardirq.h
arch/arm/include/asm/hardware/it8152.h
arch/arm/include/asm/hardware/sa1111.h
arch/arm/include/asm/highmem.h
arch/arm/include/asm/hw_breakpoint.h
arch/arm/include/asm/hw_irq.h
arch/arm/include/asm/hwcap.h
arch/arm/include/asm/hypervisor.h
arch/arm/include/asm/ide.h
arch/arm/include/asm/idmap.h
arch/arm/include/asm/insn.h
arch/arm/include/asm/irq.h
arch/arm/include/asm/irq_work.h
arch/arm/include/asm/irqflags.h
arch/arm/include/asm/jump_label.h
arch/arm/include/asm/kexec.h
arch/arm/include/asm/kgdb.h
arch/arm/include/asm/kmap_types.h
arch/arm/include/asm/limits.h
arch/arm/include/asm/linkage.h
arch/arm/include/asm/mc146818rtc.h
arch/arm/include/asm/mcs_spinlock.h
arch/arm/include/asm/memblock.h
arch/arm/include/asm/mmu.h
arch/arm/include/asm/module.h
arch/arm/include/asm/mpu.h
arch/arm/include/asm/nwflash.h
arch/arm/include/asm/paravirt.h
arch/arm/include/asm/patch.h
arch/arm/include/asm/pci.h
arch/arm/include/asm/sections.h
arch/arm/include/asm/shmparam.h
arch/arm/include/asm/signal.h
arch/arm/include/asm/smp_plat.h
arch/arm/include/asm/smp_scu.h
arch/arm/include/asm/smp_twd.h
arch/arm/include/asm/sparsemem.h
arch/arm/include/asm/spinlock.h
arch/arm/include/asm/spinlock_types.h
arch/arm/include/asm/stackprotector.h
arch/arm/include/asm/stacktrace.h
arch/arm/include/asm/string.h
arch/arm/include/asm/suspend.h
arch/arm/include/asm/swab.h
arch/arm/include/asm/switch_to.h
arch/arm/include/asm/sync_bitops.h
arch/arm/include/asm/syscall.h
arch/arm/include/asm/system_info.h
arch/arm/include/asm/system_misc.h
arch/arm/include/asm/therm.h
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/tls.h
arch/arm/include/asm/topology.h
arch/arm/include/asm/traps.h
arch/arm/include/asm/uaccess.h
arch/arm/include/asm/ucontext.h
arch/arm/include/asm/unaligned.h [new file with mode: 0644]
arch/arm/include/asm/user.h
arch/arm/include/asm/v7m.h
arch/arm/include/asm/vdso.h
arch/arm/include/asm/vfp.h
arch/arm/include/asm/vfpmacros.h
arch/arm/include/asm/vga.h
arch/arm/include/asm/word-at-a-time.h
arch/arm/include/asm/xen/events.h
arch/arm/include/debug/palmchip.S
arch/arm/include/debug/uncompress.h
arch/arm/include/uapi/asm/Kbuild
arch/arm/include/uapi/asm/auxvec.h
arch/arm/include/uapi/asm/byteorder.h
arch/arm/include/uapi/asm/fcntl.h
arch/arm/include/uapi/asm/hwcap.h
arch/arm/include/uapi/asm/ioctls.h
arch/arm/include/uapi/asm/kvm.h
arch/arm/include/uapi/asm/kvm_para.h
arch/arm/include/uapi/asm/perf_regs.h
arch/arm/include/uapi/asm/posix_types.h
arch/arm/include/uapi/asm/ptrace.h
arch/arm/include/uapi/asm/setup.h
arch/arm/include/uapi/asm/sigcontext.h
arch/arm/include/uapi/asm/signal.h
arch/arm/include/uapi/asm/stat.h
arch/arm/include/uapi/asm/statfs.h
arch/arm/include/uapi/asm/swab.h
arch/arm/include/uapi/asm/types.h
arch/arm/include/uapi/asm/unistd.h
arch/arm/kernel/Makefile
arch/arm/kernel/atags.h
arch/arm/kernel/atags_proc.c
arch/arm/kernel/bios32.c
arch/arm/kernel/debug.S
arch/arm/kernel/elf.c
arch/arm/kernel/entry-common.S
arch/arm/kernel/entry-header.S
arch/arm/kernel/fiq.c
arch/arm/kernel/insn.c
arch/arm/kernel/io.c
arch/arm/kernel/jump_label.c
arch/arm/kernel/kgdb.c
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/module.lds
arch/arm/kernel/patch.c
arch/arm/kernel/perf_callchain.c
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c
arch/arm/kernel/perf_regs.c
arch/arm/kernel/reboot.h
arch/arm/kernel/relocate_kernel.S
arch/arm/kernel/signal.c
arch/arm/kernel/sleep.S
arch/arm/kernel/suspend.c
arch/arm/kernel/vmlinux-xip.lds.S
arch/arm/kernel/vmlinux.lds.S
arch/arm/kvm/Kconfig
arch/arm/kvm/Makefile
arch/arm/kvm/emulate.c
arch/arm/kvm/hyp/Makefile
arch/arm/kvm/trace.h
arch/arm/lib/Makefile
arch/arm/lib/bitops.h
arch/arm/lib/bswapsdi2.S
arch/arm/mach-actions/Kconfig
arch/arm/mach-alpine/Kconfig
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/pm.c
arch/arm/mach-at91/pm_data-offsets.c
arch/arm/mach-axxia/Kconfig
arch/arm/mach-axxia/Makefile
arch/arm/mach-bcm/Kconfig
arch/arm/mach-bcm/bcm63xx_smp.h
arch/arm/mach-clps711x/Kconfig
arch/arm/mach-clps711x/Makefile
arch/arm/mach-cns3xxx/Kconfig
arch/arm/mach-cns3xxx/Makefile
arch/arm/mach-davinci/Kconfig
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/Makefile.boot
arch/arm/mach-davinci/asp.h
arch/arm/mach-davinci/ddr2.h
arch/arm/mach-davinci/usb-da8xx.c
arch/arm/mach-davinci/usb.c
arch/arm/mach-digicolor/Kconfig
arch/arm/mach-dove/Kconfig
arch/arm/mach-dove/Makefile
arch/arm/mach-dove/mpp.h
arch/arm/mach-ebsa110/io.c
arch/arm/mach-efm32/dtmachine.c
arch/arm/mach-ep93xx/Makefile
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h
arch/arm/mach-ep93xx/include/mach/hardware.h
arch/arm/mach-ep93xx/include/mach/irqs.h
arch/arm/mach-ep93xx/include/mach/platform.h
arch/arm/mach-ep93xx/timer-ep93xx.c
arch/arm/mach-ep93xx/ts72xx.h
arch/arm/mach-footbridge/Makefile
arch/arm/mach-footbridge/cats-hw.c
arch/arm/mach-footbridge/cats-pci.c
arch/arm/mach-footbridge/common.h
arch/arm/mach-footbridge/dc21285-timer.c
arch/arm/mach-footbridge/dma.c
arch/arm/mach-footbridge/ebsa285-pci.c
arch/arm/mach-footbridge/ebsa285.c
arch/arm/mach-footbridge/include/mach/irqs.h
arch/arm/mach-footbridge/include/mach/isa-dma.h
arch/arm/mach-footbridge/isa-rtc.c
arch/arm/mach-footbridge/isa-timer.c
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-footbridge/netwinder-pci.c
arch/arm/mach-footbridge/personal-pci.c
arch/arm/mach-footbridge/personal.c
arch/arm/mach-gemini/board-dt.c
arch/arm/mach-highbank/core.h
arch/arm/mach-hisi/core.h
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/devices/Makefile
arch/arm/mach-imx/ehci.h
arch/arm/mach-imx/mx31.h
arch/arm/mach-imx/mx35.h
arch/arm/mach-imx/pcm037.h
arch/arm/mach-imx/ulpi.h
arch/arm/mach-integrator/Makefile
arch/arm/mach-integrator/cm.h
arch/arm/mach-integrator/common.h
arch/arm/mach-integrator/impd1.h
arch/arm/mach-integrator/lm.h
arch/arm/mach-integrator/pci_v3.h
arch/arm/mach-iop13xx/Kconfig
arch/arm/mach-iop13xx/Makefile
arch/arm/mach-iop13xx/include/mach/hardware.h
arch/arm/mach-iop13xx/include/mach/iop13xx.h
arch/arm/mach-iop13xx/include/mach/iq81340.h
arch/arm/mach-iop13xx/include/mach/irqs.h
arch/arm/mach-iop13xx/include/mach/memory.h
arch/arm/mach-iop13xx/include/mach/time.h
arch/arm/mach-iop13xx/include/mach/uncompress.h
arch/arm/mach-iop13xx/msi.h
arch/arm/mach-iop13xx/pci.h
arch/arm/mach-iop32x/Kconfig
arch/arm/mach-iop32x/Makefile
arch/arm/mach-iop32x/gpio-iop32x.h
arch/arm/mach-iop32x/include/mach/adma.h
arch/arm/mach-iop32x/include/mach/glantank.h
arch/arm/mach-iop32x/include/mach/hardware.h
arch/arm/mach-iop32x/include/mach/iq31244.h
arch/arm/mach-iop32x/include/mach/iq80321.h
arch/arm/mach-iop32x/include/mach/n2100.h
arch/arm/mach-iop32x/include/mach/time.h
arch/arm/mach-iop32x/include/mach/uncompress.h
arch/arm/mach-iop33x/include/mach/adma.h
arch/arm/mach-iop33x/include/mach/hardware.h
arch/arm/mach-iop33x/include/mach/iq80331.h
arch/arm/mach-iop33x/include/mach/iq80332.h
arch/arm/mach-iop33x/include/mach/time.h
arch/arm/mach-iop33x/include/mach/uncompress.h
arch/arm/mach-ixp4xx/Makefile
arch/arm/mach-ixp4xx/avila-setup.c
arch/arm/mach-ixp4xx/coyote-setup.c
arch/arm/mach-ixp4xx/dsmg600-setup.c
arch/arm/mach-ixp4xx/fsg-setup.c
arch/arm/mach-ixp4xx/gateway7001-setup.c
arch/arm/mach-ixp4xx/goramo_mlr.c
arch/arm/mach-ixp4xx/include/mach/npe.h
arch/arm/mach-ixp4xx/include/mach/platform.h
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/nas100d-setup.c
arch/arm/mach-ixp4xx/nslu2-setup.c
arch/arm/mach-ixp4xx/vulcan-setup.c
arch/arm/mach-ixp4xx/wg302v2-setup.c
arch/arm/mach-keystone/Makefile
arch/arm/mach-ks8695/Makefile
arch/arm/mach-mmp/Makefile
arch/arm/mach-mmp/clock-mmp2.c
arch/arm/mach-mmp/clock-pxa168.c
arch/arm/mach-mmp/clock-pxa910.c
arch/arm/mach-mmp/common.h
arch/arm/mach-mmp/cputype.h
arch/arm/mach-mmp/devices.h
arch/arm/mach-mmp/irqs.h
arch/arm/mach-mmp/mfp-mmp2.h
arch/arm/mach-mmp/mfp-pxa168.h
arch/arm/mach-mmp/mfp-pxa910.h
arch/arm/mach-mmp/mfp.h
arch/arm/mach-mmp/mmp2.h
arch/arm/mach-mmp/pxa168.h
arch/arm/mach-mmp/pxa910.h
arch/arm/mach-mv78xx0/Makefile
arch/arm/mach-mvebu/Makefile
arch/arm/mach-omap1/Makefile
arch/arm/mach-omap1/camera.h
arch/arm/mach-omap1/include/mach/memory.h
arch/arm/mach-omap1/include/mach/usb.h
arch/arm/mach-omap1/mmc.h
arch/arm/mach-omap1/reset.c
arch/arm/mach-omap1/sram.h
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/clock2xxx.h
arch/arm/mach-omap2/clock3xxx.h
arch/arm/mach-omap2/clockdomains2420_data.c
arch/arm/mach-omap2/clockdomains2430_data.c
arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
arch/arm/mach-omap2/clockdomains3xxx_data.c
arch/arm/mach-omap2/common-board-devices.h
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/mmc.h
arch/arm/mach-omap2/omap-pm-noop.c
arch/arm/mach-omap2/omap-pm.h
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
arch/arm/mach-omap2/opp2420_data.c
arch/arm/mach-omap2/opp2430_data.c
arch/arm/mach-omap2/opp2xxx.h
arch/arm/mach-omap2/usb.h
arch/arm/mach-omap2/vp.c
arch/arm/mach-orion5x/Makefile
arch/arm/mach-orion5x/common.h
arch/arm/mach-orion5x/mpp.h
arch/arm/mach-orion5x/ts78xx-fpga.h
arch/arm/mach-orion5x/tsx09-common.h
arch/arm/mach-prima2/Makefile
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/cm-x2xx-pci.h
arch/arm/mach-pxa/colibri.h
arch/arm/mach-pxa/csb701.c
arch/arm/mach-pxa/devices.c
arch/arm/mach-pxa/devices.h
arch/arm/mach-pxa/include/mach/addr-map.h
arch/arm/mach-pxa/include/mach/audio.h
arch/arm/mach-pxa/include/mach/bitfield.h
arch/arm/mach-pxa/include/mach/io.h
arch/arm/mach-pxa/include/mach/regs-ac97.h
arch/arm/mach-pxa/include/mach/regs-lcd.h
arch/arm/mach-pxa/include/mach/regs-ost.h
arch/arm/mach-pxa/include/mach/regs-uart.h
arch/arm/mach-pxa/include/mach/reset.h
arch/arm/mach-pxa/include/mach/trizeps4.h
arch/arm/mach-pxa/littleton.h
arch/arm/mach-pxa/mfp-pxa25x.h
arch/arm/mach-pxa/mfp-pxa27x.h
arch/arm/mach-pxa/mfp-pxa2xx.h
arch/arm/mach-pxa/mfp-pxa3xx.h
arch/arm/mach-pxa/mioa701.h
arch/arm/mach-pxa/mxm8x10.h
arch/arm/mach-pxa/pxa25x.h
arch/arm/mach-pxa/pxa27x-udc.h
arch/arm/mach-pxa/pxa27x.h
arch/arm/mach-pxa/pxa300.h
arch/arm/mach-pxa/pxa320.h
arch/arm/mach-pxa/pxa3xx.h
arch/arm/mach-pxa/pxa930.h
arch/arm/mach-pxa/regs-rtc.h
arch/arm/mach-pxa/regs-u2d.h
arch/arm/mach-pxa/smemc.c
arch/arm/mach-pxa/zylonite.h
arch/arm/mach-rpc/fiq.S
arch/arm/mach-rpc/include/mach/entry-macro.S
arch/arm/mach-rpc/irq.c
arch/arm/mach-s3c24xx/include/mach/io.h
arch/arm/mach-s3c64xx/include/mach/dma.h
arch/arm/mach-s3c64xx/include/mach/irqs.h
arch/arm/mach-s3c64xx/include/mach/regs-gpio.h
arch/arm/mach-s3c64xx/regs-gpio-memport.h
arch/arm/mach-sa1100/Makefile
arch/arm/mach-sa1100/clock.c
arch/arm/mach-sa1100/generic.h
arch/arm/mach-sa1100/include/mach/SA-1100.h
arch/arm/mach-sa1100/include/mach/assabet.h
arch/arm/mach-sa1100/include/mach/collie.h
arch/arm/mach-sa1100/include/mach/hardware.h
arch/arm/mach-sa1100/include/mach/irqs.h
arch/arm/mach-sa1100/include/mach/memory.h
arch/arm/mach-sa1100/include/mach/neponset.h
arch/arm/mach-sa1100/include/mach/reset.h
arch/arm/mach-sa1100/include/mach/shannon.h
arch/arm/mach-sa1100/include/mach/simpad.h
arch/arm/mach-sa1100/include/mach/uncompress.h
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/neponset.c
arch/arm/mach-sa1100/pleb.c
arch/arm/mach-sa1100/shannon.c
arch/arm/mach-sa1100/simpad.c
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/common.h
arch/arm/mach-shmobile/emev2.h
arch/arm/mach-shmobile/r8a7779.h
arch/arm/mach-shmobile/r8a7790.h
arch/arm/mach-shmobile/r8a7791.h
arch/arm/mach-shmobile/rcar-gen2.h
arch/arm/mach-shmobile/sh73a0.h
arch/arm/mach-socfpga/Makefile
arch/arm/mach-spear/Makefile
arch/arm/mach-tango/Kconfig
arch/arm/mach-tango/Makefile
arch/arm/mach-tango/platsmp.c
arch/arm/mach-tango/pm.c
arch/arm/mach-tango/setup.c
arch/arm/mach-tango/smc.S
arch/arm/mach-tango/smc.h
arch/arm/mach-tegra/Kconfig
arch/arm/mach-tegra/Makefile
arch/arm/mach-u300/Kconfig
arch/arm/mach-uniphier/Kconfig
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/pm.c
arch/arm/mach-versatile/Kconfig
arch/arm/mach-vexpress/Kconfig
arch/arm/mach-vexpress/Makefile
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-vt8500/Kconfig
arch/arm/mach-w90x900/Kconfig
arch/arm/mach-w90x900/Makefile
arch/arm/mach-zx/Kconfig
arch/arm/mach-zynq/Kconfig
arch/arm/mm/Kconfig
arch/arm/mm/Makefile
arch/arm/mm/abort-ev4.S
arch/arm/mm/abort-ev4t.S
arch/arm/mm/abort-ev5t.S
arch/arm/mm/abort-ev5tj.S
arch/arm/mm/abort-ev6.S
arch/arm/mm/abort-ev7.S
arch/arm/mm/abort-lv4t.S
arch/arm/mm/abort-macro.S
arch/arm/mm/abort-nommu.S
arch/arm/mm/dma.h
arch/arm/mm/extable.c
arch/arm/mm/fault.h
arch/arm/mm/fsr-2level.c
arch/arm/mm/fsr-3level.c
arch/arm/mm/idmap.c
arch/arm/mm/iomap.c
arch/arm/mm/l2c-l2x0-resume.S
arch/arm/mm/mm.h
arch/arm/mm/mmap.c
arch/arm/mm/nommu.c
arch/arm/mm/pabort-legacy.S
arch/arm/mm/pabort-v6.S
arch/arm/mm/pabort-v7.S
arch/arm/mm/physaddr.c
arch/arm/mm/proc-macros.S
arch/arm/nwfpe/ARM-gcc.h
arch/arm/nwfpe/Makefile
arch/arm/oprofile/Makefile
arch/arm/plat-iop/Makefile
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/include/plat/sram.h
arch/arm/plat-versatile/include/plat/sched_clock.h
arch/arm/probes/Makefile
arch/arm/probes/kprobes/Makefile
arch/arm/tools/Makefile
arch/arm/tools/gen-mach-types
arch/arm/tools/syscallhdr.sh
arch/arm/tools/syscallnr.sh
arch/arm/tools/syscalltbl.sh
arch/arm/vdso/Makefile
arch/arm/vdso/datapage.S
arch/arm/xen/p2m.c
arch/arm64/Makefile
arch/arm64/boot/dts/Makefile
arch/arm64/boot/dts/allwinner/Makefile
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
arch/arm64/boot/dts/amd/Makefile
arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dts
arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dts
arch/arm64/boot/dts/amd/amd-overdrive.dts
arch/arm64/boot/dts/amd/amd-seattle-clks.dtsi
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
arch/arm64/boot/dts/amd/amd-seattle-xgbe-b.dtsi
arch/arm64/boot/dts/amd/husky.dts
arch/arm64/boot/dts/amlogic/Makefile
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
arch/arm64/boot/dts/apm/Makefile
arch/arm64/boot/dts/arm/Makefile
arch/arm64/boot/dts/arm/foundation-v8-gicv3.dts
arch/arm64/boot/dts/arm/foundation-v8.dts
arch/arm64/boot/dts/arm/foundation-v8.dtsi
arch/arm64/boot/dts/arm/juno-base.dtsi
arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi
arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi
arch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts
arch/arm64/boot/dts/broadcom/Makefile
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
arch/arm64/boot/dts/broadcom/stingray/Makefile
arch/arm64/boot/dts/cavium/Makefile
arch/arm64/boot/dts/exynos/Makefile
arch/arm64/boot/dts/freescale/Makefile
arch/arm64/boot/dts/hisilicon/Makefile
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
arch/arm64/boot/dts/hisilicon/hi3660.dtsi
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
arch/arm64/boot/dts/hisilicon/hi6220.dtsi
arch/arm64/boot/dts/hisilicon/hikey-pinctrl.dtsi
arch/arm64/boot/dts/hisilicon/hikey960-pinctrl.dtsi
arch/arm64/boot/dts/lg/Makefile
arch/arm64/boot/dts/lg/lg1312-ref.dts
arch/arm64/boot/dts/lg/lg1312.dtsi
arch/arm64/boot/dts/lg/lg1313-ref.dts
arch/arm64/boot/dts/lg/lg1313.dtsi
arch/arm64/boot/dts/marvell/Makefile
arch/arm64/boot/dts/marvell/armada-ap806.dtsi
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
arch/arm64/boot/dts/mediatek/Makefile
arch/arm64/boot/dts/nvidia/Makefile
arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
arch/arm64/boot/dts/nvidia/tegra132.dtsi
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi
arch/arm64/boot/dts/nvidia/tegra186.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2371-0000.dts
arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts
arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2571.dts
arch/arm64/boot/dts/nvidia/tegra210-p2595.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
arch/arm64/boot/dts/nvidia/tegra210.dtsi
arch/arm64/boot/dts/qcom/Makefile
arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi
arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi
arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
arch/arm64/boot/dts/qcom/pm8004.dtsi
arch/arm64/boot/dts/qcom/pm8916.dtsi
arch/arm64/boot/dts/qcom/pm8994.dtsi
arch/arm64/boot/dts/qcom/pmi8994.dtsi
arch/arm64/boot/dts/renesas/Makefile
arch/arm64/boot/dts/renesas/salvator-common.dtsi
arch/arm64/boot/dts/rockchip/Makefile
arch/arm64/boot/dts/rockchip/rk3328.dtsi
arch/arm64/boot/dts/rockchip/rk3368.dtsi
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
arch/arm64/boot/dts/rockchip/rk3399.dtsi
arch/arm64/boot/dts/socionext/Makefile
arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi
arch/arm64/boot/dts/sprd/Makefile
arch/arm64/crypto/Kconfig
arch/arm64/crypto/aes-ce-setkey.h
arch/arm64/include/asm/alternative.h
arch/arm64/include/asm/asm-uaccess.h
arch/arm64/include/asm/bitrev.h
arch/arm64/include/asm/boot.h
arch/arm64/include/asm/clocksource.h
arch/arm64/include/asm/cpuidle.h
arch/arm64/include/asm/current.h
arch/arm64/include/asm/efi.h
arch/arm64/include/asm/extable.h
arch/arm64/include/asm/hypervisor.h
arch/arm64/include/asm/irq.h
arch/arm64/include/asm/irq_work.h
arch/arm64/include/asm/kasan.h
arch/arm64/include/asm/linkage.h
arch/arm64/include/asm/lse.h
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/mmzone.h
arch/arm64/include/asm/numa.h
arch/arm64/include/asm/paravirt.h
arch/arm64/include/asm/pci.h
arch/arm64/include/asm/pgtable.h
arch/arm64/include/asm/stack_pointer.h
arch/arm64/include/asm/stackprotector.h
arch/arm64/include/asm/suspend.h
arch/arm64/include/asm/sync_bitops.h
arch/arm64/include/asm/topology.h
arch/arm64/include/asm/xen/events.h
arch/arm64/include/asm/xen/xen-ops.h
arch/arm64/include/uapi/asm/Kbuild
arch/arm64/include/uapi/asm/auxvec.h
arch/arm64/include/uapi/asm/bitsperlong.h
arch/arm64/include/uapi/asm/byteorder.h
arch/arm64/include/uapi/asm/fcntl.h
arch/arm64/include/uapi/asm/hwcap.h
arch/arm64/include/uapi/asm/kvm.h
arch/arm64/include/uapi/asm/param.h
arch/arm64/include/uapi/asm/perf_regs.h
arch/arm64/include/uapi/asm/posix_types.h
arch/arm64/include/uapi/asm/ptrace.h
arch/arm64/include/uapi/asm/setup.h
arch/arm64/include/uapi/asm/sigcontext.h
arch/arm64/include/uapi/asm/siginfo.h
arch/arm64/include/uapi/asm/signal.h
arch/arm64/include/uapi/asm/stat.h
arch/arm64/include/uapi/asm/statfs.h
arch/arm64/include/uapi/asm/ucontext.h
arch/arm64/include/uapi/asm/unistd.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/acpi_numa.c
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/head.S
arch/arm64/kernel/perf_regs.c
arch/arm64/kernel/probes/Makefile
arch/arm64/kernel/probes/kprobes_trampoline.S
arch/arm64/kernel/signal.c
arch/arm64/kernel/sleep.S
arch/arm64/kernel/suspend.c
arch/arm64/kernel/trace-events-emulation.h
arch/arm64/kernel/traps.c
arch/arm64/kernel/vdso/Makefile
arch/arm64/kernel/vdso/gen_vdso_offsets.sh
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/kvm/Kconfig
arch/arm64/kvm/Makefile
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/inject_fault.c
arch/arm64/kvm/trace.h
arch/arm64/lib/Makefile
arch/arm64/mm/Makefile
arch/arm64/mm/extable.c
arch/arm64/mm/fault.c
arch/arm64/mm/physaddr.c
arch/arm64/mm/ptdump_debugfs.c
arch/blackfin/Kconfig
arch/blackfin/Kconfig.debug
arch/blackfin/include/asm/clkdev.h
arch/blackfin/include/asm/pci.h
arch/blackfin/include/asm/rwlock.h
arch/blackfin/include/mach-common/ports-a.h
arch/blackfin/include/mach-common/ports-b.h
arch/blackfin/include/mach-common/ports-c.h
arch/blackfin/include/mach-common/ports-d.h
arch/blackfin/include/mach-common/ports-e.h
arch/blackfin/include/mach-common/ports-f.h
arch/blackfin/include/mach-common/ports-g.h
arch/blackfin/include/mach-common/ports-h.h
arch/blackfin/include/mach-common/ports-i.h
arch/blackfin/include/mach-common/ports-j.h
arch/blackfin/include/uapi/asm/bfin_sport.h
arch/blackfin/include/uapi/asm/byteorder.h
arch/blackfin/include/uapi/asm/cachectl.h
arch/blackfin/include/uapi/asm/fcntl.h
arch/blackfin/include/uapi/asm/fixed_code.h
arch/blackfin/include/uapi/asm/ioctls.h
arch/blackfin/include/uapi/asm/poll.h
arch/blackfin/include/uapi/asm/posix_types.h
arch/blackfin/include/uapi/asm/ptrace.h
arch/blackfin/include/uapi/asm/sigcontext.h
arch/blackfin/include/uapi/asm/siginfo.h
arch/blackfin/include/uapi/asm/signal.h
arch/blackfin/include/uapi/asm/stat.h
arch/blackfin/include/uapi/asm/swab.h
arch/blackfin/include/uapi/asm/unistd.h
arch/blackfin/kernel/Makefile
arch/blackfin/kernel/cplb-nompu/Makefile
arch/blackfin/lib/Makefile
arch/blackfin/mach-bf518/Kconfig
arch/blackfin/mach-bf518/boards/Kconfig
arch/blackfin/mach-bf527/Kconfig
arch/blackfin/mach-bf527/boards/Kconfig
arch/blackfin/mach-bf527/boards/Makefile
arch/blackfin/mach-bf533/Kconfig
arch/blackfin/mach-bf533/boards/Kconfig
arch/blackfin/mach-bf533/boards/Makefile
arch/blackfin/mach-bf537/Kconfig
arch/blackfin/mach-bf537/boards/Kconfig
arch/blackfin/mach-bf537/boards/Makefile
arch/blackfin/mach-bf538/Kconfig
arch/blackfin/mach-bf538/boards/Kconfig
arch/blackfin/mach-bf548/Kconfig
arch/blackfin/mach-bf548/boards/Kconfig
arch/blackfin/mach-bf561/Kconfig
arch/blackfin/mach-bf561/boards/Kconfig
arch/blackfin/mach-bf609/Kconfig
arch/blackfin/mach-bf609/boards/Kconfig
arch/blackfin/mach-bf609/clock.c
arch/blackfin/mach-bf609/dpm.S
arch/blackfin/mach-common/Makefile
arch/blackfin/mach-common/clock.h
arch/blackfin/oprofile/Makefile
arch/c6x/Kconfig
arch/c6x/boot/Makefile
arch/c6x/boot/dts/Makefile
arch/c6x/boot/dts/tms320c6455.dtsi
arch/c6x/boot/dts/tms320c6457.dtsi
arch/c6x/boot/dts/tms320c6472.dtsi
arch/c6x/boot/dts/tms320c6474.dtsi
arch/c6x/boot/dts/tms320c6678.dtsi
arch/c6x/include/asm/flat.h
arch/c6x/include/asm/linkage.h
arch/c6x/include/asm/megamod-pic.h
arch/c6x/include/asm/page.h
arch/c6x/include/asm/processor.h
arch/c6x/include/asm/sections.h
arch/c6x/include/asm/timer64.h
arch/c6x/include/asm/tlb.h
arch/c6x/include/uapi/asm/byteorder.h
arch/c6x/include/uapi/asm/ptrace.h
arch/c6x/include/uapi/asm/setup.h
arch/c6x/include/uapi/asm/sigcontext.h
arch/c6x/include/uapi/asm/swab.h
arch/c6x/include/uapi/asm/unistd.h
arch/c6x/kernel/Makefile
arch/c6x/kernel/asm-offsets.c
arch/c6x/kernel/vmlinux.lds.S
arch/c6x/platforms/Kconfig
arch/cris/Kconfig
arch/cris/Kconfig.debug
arch/cris/arch-v10/Kconfig
arch/cris/arch-v10/drivers/Kconfig
arch/cris/arch-v10/drivers/Makefile
arch/cris/arch-v10/drivers/eeprom.c
arch/cris/arch-v10/drivers/gpio.c
arch/cris/arch-v10/drivers/i2c.c
arch/cris/arch-v10/drivers/i2c.h
arch/cris/arch-v10/drivers/sync_serial.c
arch/cris/arch-v10/kernel/Makefile
arch/cris/arch-v10/kernel/crisksyms.c
arch/cris/arch-v10/kernel/debugport.c
arch/cris/arch-v10/kernel/dma.c
arch/cris/arch-v10/kernel/entry.S
arch/cris/arch-v10/kernel/fasttimer.c
arch/cris/arch-v10/kernel/head.S
arch/cris/arch-v10/kernel/io_interface_mux.c
arch/cris/arch-v10/kernel/irq.c
arch/cris/arch-v10/kernel/kgdb.c
arch/cris/arch-v10/kernel/process.c
arch/cris/arch-v10/kernel/ptrace.c
arch/cris/arch-v10/kernel/setup.c
arch/cris/arch-v10/kernel/shadows.c
arch/cris/arch-v10/kernel/signal.c
arch/cris/arch-v10/kernel/time.c
arch/cris/arch-v10/kernel/traps.c
arch/cris/arch-v10/lib/checksum.S
arch/cris/arch-v10/lib/checksumcopy.S
arch/cris/arch-v10/lib/csumcpfruser.S
arch/cris/arch-v10/lib/dram_init.S
arch/cris/arch-v10/lib/hw_settings.S
arch/cris/arch-v10/lib/usercopy.c
arch/cris/arch-v10/mm/fault.c
arch/cris/arch-v10/mm/init.c
arch/cris/arch-v10/mm/tlb.c
arch/cris/arch-v32/Kconfig
arch/cris/arch-v32/drivers/Kconfig
arch/cris/arch-v32/drivers/Makefile
arch/cris/arch-v32/drivers/cryptocop.c
arch/cris/arch-v32/drivers/pci/bios.c
arch/cris/arch-v32/drivers/pci/dma.c
arch/cris/arch-v32/kernel/Makefile
arch/cris/arch-v32/kernel/cache.c
arch/cris/arch-v32/kernel/cacheflush.S
arch/cris/arch-v32/kernel/crisksyms.c
arch/cris/arch-v32/kernel/debugport.c
arch/cris/arch-v32/kernel/entry.S
arch/cris/arch-v32/kernel/fasttimer.c
arch/cris/arch-v32/kernel/head.S
arch/cris/arch-v32/kernel/irq.c
arch/cris/arch-v32/kernel/kgdb.c
arch/cris/arch-v32/kernel/kgdb_asm.S
arch/cris/arch-v32/kernel/process.c
arch/cris/arch-v32/kernel/ptrace.c
arch/cris/arch-v32/kernel/setup.c
arch/cris/arch-v32/kernel/signal.c
arch/cris/arch-v32/kernel/time.c
arch/cris/arch-v32/kernel/traps.c
arch/cris/arch-v32/lib/checksum.S
arch/cris/arch-v32/lib/checksumcopy.S
arch/cris/arch-v32/lib/csumcpfruser.S
arch/cris/arch-v32/lib/delay.c
arch/cris/arch-v32/lib/usercopy.c
arch/cris/arch-v32/mach-a3/Kconfig
arch/cris/arch-v32/mach-a3/arbiter.c
arch/cris/arch-v32/mach-a3/dma.c
arch/cris/arch-v32/mach-a3/dram_init.S
arch/cris/arch-v32/mach-a3/hw_settings.S
arch/cris/arch-v32/mach-a3/pinmux.c
arch/cris/arch-v32/mach-fs/Kconfig
arch/cris/arch-v32/mach-fs/arbiter.c
arch/cris/arch-v32/mach-fs/dma.c
arch/cris/arch-v32/mach-fs/dram_init.S
arch/cris/arch-v32/mach-fs/hw_settings.S
arch/cris/arch-v32/mach-fs/pinmux.c
arch/cris/arch-v32/mm/init.c
arch/cris/arch-v32/mm/intmem.c
arch/cris/arch-v32/mm/l2cache.c
arch/cris/arch-v32/mm/mmu.S
arch/cris/arch-v32/mm/tlb.c
arch/cris/boot/Makefile
arch/cris/boot/compressed/Makefile
arch/cris/boot/compressed/decompress_v10.lds
arch/cris/boot/compressed/decompress_v32.lds
arch/cris/boot/compressed/head_v10.S
arch/cris/boot/compressed/head_v32.S
arch/cris/boot/compressed/misc.c
arch/cris/boot/dts/Makefile
arch/cris/boot/dts/artpec3.dtsi
arch/cris/boot/dts/dev88.dts
arch/cris/boot/dts/etraxfs.dtsi
arch/cris/boot/dts/p1343.dts
arch/cris/boot/rescue/Makefile
arch/cris/boot/rescue/head_v10.S
arch/cris/boot/rescue/head_v32.S
arch/cris/boot/rescue/kimagerescue.S
arch/cris/boot/rescue/rescue_v10.lds
arch/cris/boot/rescue/rescue_v32.lds
arch/cris/boot/rescue/testrescue.S
arch/cris/boot/tools/build.c
arch/cris/include/arch-v10/arch/bitops.h
arch/cris/include/arch-v10/arch/bug.h
arch/cris/include/arch-v10/arch/cache.h
arch/cris/include/arch-v10/arch/checksum.h
arch/cris/include/arch-v10/arch/delay.h
arch/cris/include/arch-v10/arch/dma.h
arch/cris/include/arch-v10/arch/io.h
arch/cris/include/arch-v10/arch/io_interface_mux.h
arch/cris/include/arch-v10/arch/irq.h
arch/cris/include/arch-v10/arch/irqflags.h
arch/cris/include/arch-v10/arch/memmap.h
arch/cris/include/arch-v10/arch/mmu.h
arch/cris/include/arch-v10/arch/offset.h
arch/cris/include/arch-v10/arch/page.h
arch/cris/include/arch-v10/arch/pgtable.h
arch/cris/include/arch-v10/arch/processor.h
arch/cris/include/arch-v10/arch/swab.h
arch/cris/include/arch-v10/arch/system.h
arch/cris/include/arch-v10/arch/thread_info.h
arch/cris/include/arch-v10/arch/timex.h
arch/cris/include/arch-v10/arch/tlb.h
arch/cris/include/arch-v10/arch/uaccess.h
arch/cris/include/arch-v10/arch/unistd.h
arch/cris/include/arch-v32/arch/bitops.h
arch/cris/include/arch-v32/arch/bug.h
arch/cris/include/arch-v32/arch/cache.h
arch/cris/include/arch-v32/arch/checksum.h
arch/cris/include/arch-v32/arch/cryptocop.h
arch/cris/include/arch-v32/arch/delay.h
arch/cris/include/arch-v32/arch/hwregs/Makefile
arch/cris/include/arch-v32/arch/hwregs/asm/ata_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/bif_core_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/bif_dma_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/bif_slave_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/config_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/cris_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/cris_supp_reg.h
arch/cris/include/arch-v32/arch/hwregs/asm/dma_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/eth_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/gio_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect.h
arch/cris/include/arch-v32/arch/hwregs/asm/intr_vect_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/irq_nmi_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/marb_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/mmu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/mmu_supp_reg.h
arch/cris/include/arch-v32/arch/hwregs/asm/rt_trace_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/ser_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/sser_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/strcop_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/strmux_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/asm/timer_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/ata_defs.h
arch/cris/include/arch-v32/arch/hwregs/bif_core_defs.h
arch/cris/include/arch-v32/arch/hwregs/bif_dma_defs.h
arch/cris/include/arch-v32/arch/hwregs/bif_slave_defs.h
arch/cris/include/arch-v32/arch/hwregs/config_defs.h
arch/cris/include/arch-v32/arch/hwregs/cpu_vect.h
arch/cris/include/arch-v32/arch/hwregs/dma.h
arch/cris/include/arch-v32/arch/hwregs/dma_defs.h
arch/cris/include/arch-v32/arch/hwregs/eth_defs.h
arch/cris/include/arch-v32/arch/hwregs/extmem_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/Makefile
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_crc_par_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_in_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_dmc_out_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_in_extra_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_fifo_out_extra_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_mpu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_reg_space_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_in_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sap_out_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_in_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_scrc_out_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_spu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_sw_spu_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_timer_grp_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_trigger_grp_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/asm/iop_version_defs_asm.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_crc_par_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_in_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_dmc_out_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_in_extra_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_fifo_out_extra_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_mpu_macros.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_reg_space.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_in_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sap_out_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_in_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_scrc_out_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_spu_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cfg_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_cpu_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_mpu_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_sw_spu_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_timer_grp_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_trigger_grp_defs.h
arch/cris/include/arch-v32/arch/hwregs/iop/iop_version_defs.h
arch/cris/include/arch-v32/arch/hwregs/irq_nmi_defs.h
arch/cris/include/arch-v32/arch/hwregs/marb_bp_defs.h
arch/cris/include/arch-v32/arch/hwregs/marb_defs.h
arch/cris/include/arch-v32/arch/hwregs/reg_rdwr.h
arch/cris/include/arch-v32/arch/hwregs/rt_trace_defs.h
arch/cris/include/arch-v32/arch/hwregs/ser_defs.h
arch/cris/include/arch-v32/arch/hwregs/sser_defs.h
arch/cris/include/arch-v32/arch/hwregs/strcop.h
arch/cris/include/arch-v32/arch/hwregs/strcop_defs.h
arch/cris/include/arch-v32/arch/hwregs/supp_reg.h
arch/cris/include/arch-v32/arch/intmem.h
arch/cris/include/arch-v32/arch/irq.h
arch/cris/include/arch-v32/arch/irqflags.h
arch/cris/include/arch-v32/arch/mmu.h
arch/cris/include/arch-v32/arch/offset.h
arch/cris/include/arch-v32/arch/page.h
arch/cris/include/arch-v32/arch/pgtable.h
arch/cris/include/arch-v32/arch/processor.h
arch/cris/include/arch-v32/arch/swab.h
arch/cris/include/arch-v32/arch/system.h
arch/cris/include/arch-v32/arch/thread_info.h
arch/cris/include/arch-v32/arch/timex.h
arch/cris/include/arch-v32/arch/tlb.h
arch/cris/include/arch-v32/arch/uaccess.h
arch/cris/include/arch-v32/arch/unistd.h
arch/cris/include/arch-v32/mach-a3/mach/arbiter.h
arch/cris/include/arch-v32/mach-a3/mach/dma.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/clkgen_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/ddr2_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/gio_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pinmux_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/pio_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/reg_map_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/asm/timer_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/clkgen_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/ddr2_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/gio_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/intr_vect_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_reg_space_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_in_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sap_out_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cfg_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_cpu_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_mpu_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_sw_spu_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/asm/iop_version_defs_asm.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_reg_space.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_in_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sap_out_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cpu_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_mpu_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_spu_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_version_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/l2cache_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_bar_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/marb_foo_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/pinmux_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/pio_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/reg_map.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/strmux_defs.h
arch/cris/include/arch-v32/mach-a3/mach/hwregs/timer_defs.h
arch/cris/include/arch-v32/mach-a3/mach/memmap.h
arch/cris/include/arch-v32/mach-a3/mach/pinmux.h
arch/cris/include/arch-v32/mach-fs/mach/arbiter.h
arch/cris/include/arch-v32/mach-fs/mach/dma.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/bif_core_defs_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/config_defs_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/gio_defs_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/pinmux_defs_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/reg_map_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/timer_defs_asm.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_core_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_dma_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/bif_slave_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/config_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/gio_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/intr_vect_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_bp_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/marb_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/pinmux_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/reg_map.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/strmux_defs.h
arch/cris/include/arch-v32/mach-fs/mach/hwregs/timer_defs.h
arch/cris/include/arch-v32/mach-fs/mach/memmap.h
arch/cris/include/arch-v32/mach-fs/mach/pinmux.h
arch/cris/include/asm/axisflashmap.h
arch/cris/include/asm/bitops.h
arch/cris/include/asm/bug.h
arch/cris/include/asm/cache.h
arch/cris/include/asm/cacheflush.h
arch/cris/include/asm/checksum.h
arch/cris/include/asm/delay.h
arch/cris/include/asm/dma-mapping.h
arch/cris/include/asm/dma.h
arch/cris/include/asm/eshlibld.h
arch/cris/include/asm/etraxi2c.h
arch/cris/include/asm/fasttimer.h
arch/cris/include/asm/fb.h
arch/cris/include/asm/io.h
arch/cris/include/asm/irq.h
arch/cris/include/asm/mmu.h
arch/cris/include/asm/mmu_context.h
arch/cris/include/asm/page.h
arch/cris/include/asm/pci.h
arch/cris/include/asm/pgalloc.h
arch/cris/include/asm/pgtable.h
arch/cris/include/asm/processor.h
arch/cris/include/asm/ptrace.h
arch/cris/include/asm/segment.h
arch/cris/include/asm/serial.h
arch/cris/include/asm/shmparam.h
arch/cris/include/asm/signal.h
arch/cris/include/asm/stacktrace.h
arch/cris/include/asm/string.h
arch/cris/include/asm/swab.h
arch/cris/include/asm/switch_to.h
arch/cris/include/asm/termios.h
arch/cris/include/asm/thread_info.h
arch/cris/include/asm/timex.h
arch/cris/include/asm/tlb.h
arch/cris/include/asm/tlbflush.h
arch/cris/include/asm/uaccess.h
arch/cris/include/asm/ucontext.h
arch/cris/include/asm/unaligned.h
arch/cris/include/asm/unistd.h
arch/cris/include/asm/user.h
arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h
arch/cris/include/uapi/arch-v10/arch/svinto.h
arch/cris/include/uapi/arch-v10/arch/user.h
arch/cris/include/uapi/arch-v32/arch/cryptocop.h
arch/cris/include/uapi/arch-v32/arch/user.h
arch/cris/include/uapi/asm/byteorder.h
arch/cris/include/uapi/asm/elf.h
arch/cris/include/uapi/asm/elf_v10.h
arch/cris/include/uapi/asm/elf_v32.h
arch/cris/include/uapi/asm/ethernet.h
arch/cris/include/uapi/asm/etraxgpio.h
arch/cris/include/uapi/asm/ioctls.h
arch/cris/include/uapi/asm/param.h
arch/cris/include/uapi/asm/posix_types.h
arch/cris/include/uapi/asm/ptrace.h
arch/cris/include/uapi/asm/ptrace_v10.h
arch/cris/include/uapi/asm/ptrace_v32.h
arch/cris/include/uapi/asm/rs485.h
arch/cris/include/uapi/asm/setup.h
arch/cris/include/uapi/asm/sigcontext.h
arch/cris/include/uapi/asm/signal.h
arch/cris/include/uapi/asm/stat.h
arch/cris/include/uapi/asm/sync_serial.h
arch/cris/include/uapi/asm/termbits.h
arch/cris/include/uapi/asm/termios.h
arch/cris/include/uapi/asm/unistd.h
arch/cris/kernel/Makefile
arch/cris/kernel/asm-offsets.c
arch/cris/kernel/crisksyms.c
arch/cris/kernel/devicetree.c
arch/cris/kernel/irq.c
arch/cris/kernel/process.c
arch/cris/kernel/profile.c
arch/cris/kernel/ptrace.c
arch/cris/kernel/setup.c
arch/cris/kernel/sys_cris.c
arch/cris/kernel/time.c
arch/cris/kernel/traps.c
arch/cris/kernel/vmlinux.lds.S
arch/cris/mm/fault.c
arch/cris/mm/init.c
arch/cris/mm/ioremap.c
arch/cris/mm/tlb.c
arch/frv/Kconfig
arch/frv/Kconfig.debug
arch/frv/include/asm/atomic_defs.h
arch/frv/include/asm/dma-mapping.h
arch/frv/include/asm/fpu.h
arch/frv/include/asm/futex.h
arch/frv/include/asm/kmap_types.h
arch/frv/include/asm/local.h
arch/frv/include/asm/math-emu.h
arch/frv/include/asm/page.h
arch/frv/include/asm/percpu.h
arch/frv/include/asm/processor.h
arch/frv/include/asm/shmparam.h
arch/frv/include/asm/signal.h
arch/frv/include/asm/smp.h
arch/frv/include/asm/termios.h
arch/frv/include/asm/timex.h
arch/frv/include/asm/tlb.h
arch/frv/include/asm/topology.h
arch/frv/include/asm/ucontext.h
arch/frv/include/asm/unistd.h
arch/frv/include/uapi/asm/bitsperlong.h
arch/frv/include/uapi/asm/byteorder.h
arch/frv/include/uapi/asm/errno.h
arch/frv/include/uapi/asm/fcntl.h
arch/frv/include/uapi/asm/ioctl.h
arch/frv/include/uapi/asm/ioctls.h
arch/frv/include/uapi/asm/ipcbuf.h
arch/frv/include/uapi/asm/kvm_para.h
arch/frv/include/uapi/asm/mman.h
arch/frv/include/uapi/asm/msgbuf.h
arch/frv/include/uapi/asm/param.h
arch/frv/include/uapi/asm/poll.h
arch/frv/include/uapi/asm/posix_types.h
arch/frv/include/uapi/asm/ptrace.h
arch/frv/include/uapi/asm/registers.h
arch/frv/include/uapi/asm/resource.h
arch/frv/include/uapi/asm/sembuf.h
arch/frv/include/uapi/asm/setup.h
arch/frv/include/uapi/asm/shmbuf.h
arch/frv/include/uapi/asm/sigcontext.h
arch/frv/include/uapi/asm/siginfo.h
arch/frv/include/uapi/asm/signal.h
arch/frv/include/uapi/asm/socket.h
arch/frv/include/uapi/asm/sockios.h
arch/frv/include/uapi/asm/stat.h
arch/frv/include/uapi/asm/statfs.h
arch/frv/include/uapi/asm/swab.h
arch/frv/include/uapi/asm/termbits.h
arch/frv/include/uapi/asm/termios.h
arch/frv/include/uapi/asm/types.h
arch/frv/include/uapi/asm/unistd.h
arch/frv/kernel/Makefile
arch/frv/kernel/asm-offsets.c
arch/frv/kernel/frv_ksyms.c
arch/frv/kernel/vmlinux.lds.S
arch/frv/lib/atomic-lib.c
arch/frv/mb93090-mb00/Makefile
arch/frv/mb93090-mb00/pci-frv.h
arch/frv/mb93090-mb00/pci-irq.c
arch/frv/mm/extable.c
arch/frv/mm/fault.c
arch/h8300/Kconfig
arch/h8300/Kconfig.cpu
arch/h8300/boot/Makefile
arch/h8300/boot/compressed/Makefile
arch/h8300/boot/compressed/head.S
arch/h8300/boot/compressed/misc.c
arch/h8300/boot/compressed/vmlinux.lds
arch/h8300/boot/dts/Makefile
arch/h8300/boot/dts/edosk2674.dts
arch/h8300/boot/dts/h8300h_sim.dts
arch/h8300/boot/dts/h8s_sim.dts
arch/h8300/include/asm/atomic.h
arch/h8300/include/asm/bitops.h
arch/h8300/include/asm/bug.h
arch/h8300/include/asm/byteorder.h
arch/h8300/include/asm/cache.h
arch/h8300/include/asm/cmpxchg.h
arch/h8300/include/asm/dma-mapping.h
arch/h8300/include/asm/elf.h
arch/h8300/include/asm/flat.h
arch/h8300/include/asm/hash.h
arch/h8300/include/asm/io.h
arch/h8300/include/asm/irq.h
arch/h8300/include/asm/irqflags.h
arch/h8300/include/asm/page.h
arch/h8300/include/asm/pci.h
arch/h8300/include/asm/pgtable.h
arch/h8300/include/asm/processor.h
arch/h8300/include/asm/ptrace.h
arch/h8300/include/asm/segment.h
arch/h8300/include/asm/signal.h
arch/h8300/include/asm/string.h
arch/h8300/include/asm/switch_to.h
arch/h8300/include/asm/syscall.h
arch/h8300/include/asm/thread_info.h
arch/h8300/include/asm/tlb.h
arch/h8300/include/asm/uaccess.h
arch/h8300/include/asm/user.h
arch/h8300/include/uapi/asm/bitsperlong.h
arch/h8300/include/uapi/asm/byteorder.h
arch/h8300/include/uapi/asm/ptrace.h
arch/h8300/include/uapi/asm/sigcontext.h
arch/h8300/include/uapi/asm/signal.h
arch/h8300/kernel/Makefile
arch/h8300/kernel/asm-offsets.c
arch/h8300/kernel/entry.S
arch/h8300/kernel/h8300_ksyms.c
arch/h8300/kernel/head_ram.S
arch/h8300/kernel/head_rom.S
arch/h8300/kernel/irq.c
arch/h8300/kernel/module.c
arch/h8300/kernel/process.c
arch/h8300/kernel/setup.c
arch/h8300/kernel/syscalls.c
arch/h8300/kernel/vmlinux.lds.S
arch/h8300/lib/abs.S
arch/h8300/lib/ashldi3.c
arch/h8300/lib/ashrdi3.c
arch/h8300/lib/delay.c
arch/h8300/lib/libgcc.h
arch/h8300/lib/lshrdi3.c
arch/h8300/lib/memcpy.S
arch/h8300/lib/memset.S
arch/h8300/lib/moddivsi3.S
arch/h8300/lib/modsi3.S
arch/h8300/lib/muldi3.c
arch/h8300/lib/mulsi3.S
arch/h8300/lib/strncpy.S
arch/h8300/lib/ucmpdi2.c
arch/h8300/lib/udivsi3.S
arch/h8300/mm/fault.c
arch/h8300/mm/init.c
arch/h8300/mm/memory.c
arch/hexagon/Kconfig
arch/hexagon/Makefile
arch/hexagon/include/asm/Kbuild
arch/hexagon/include/asm/futex.h
arch/hexagon/include/uapi/asm/bitsperlong.h
arch/hexagon/include/uapi/asm/byteorder.h
arch/hexagon/include/uapi/asm/kvm_para.h
arch/hexagon/include/uapi/asm/param.h
arch/hexagon/include/uapi/asm/ptrace.h
arch/hexagon/include/uapi/asm/registers.h
arch/hexagon/include/uapi/asm/setup.h
arch/hexagon/include/uapi/asm/sigcontext.h
arch/hexagon/include/uapi/asm/signal.h
arch/hexagon/include/uapi/asm/swab.h
arch/hexagon/include/uapi/asm/unistd.h
arch/hexagon/include/uapi/asm/user.h
arch/hexagon/kernel/Makefile
arch/ia64/Kconfig
arch/ia64/Kconfig.debug
arch/ia64/dig/Makefile
arch/ia64/dig/setup.c
arch/ia64/hp/common/hwsw_iommu.c
arch/ia64/hp/sim/Kconfig
arch/ia64/hp/sim/Makefile
arch/ia64/hp/sim/boot/boot_head.S
arch/ia64/hp/sim/boot/bootloader.c
arch/ia64/hp/sim/boot/bootloader.lds
arch/ia64/hp/sim/boot/fw-emu.c
arch/ia64/hp/sim/boot/ssc.h
arch/ia64/hp/sim/hpsim.S
arch/ia64/hp/sim/hpsim_console.c
arch/ia64/hp/sim/hpsim_irq.c
arch/ia64/hp/sim/hpsim_setup.c
arch/ia64/hp/sim/hpsim_ssc.h
arch/ia64/hp/sim/simeth.c
arch/ia64/hp/sim/simscsi.c
arch/ia64/hp/sim/simserial.c
arch/ia64/include/asm/acpi.h
arch/ia64/include/asm/agp.h
arch/ia64/include/asm/asm-prototypes.h
arch/ia64/include/asm/asmmacro.h
arch/ia64/include/asm/atomic.h
arch/ia64/include/asm/barrier.h
arch/ia64/include/asm/bitops.h
arch/ia64/include/asm/bug.h
arch/ia64/include/asm/bugs.h
arch/ia64/include/asm/cache.h
arch/ia64/include/asm/cacheflush.h
arch/ia64/include/asm/checksum.h
arch/ia64/include/asm/clocksource.h
arch/ia64/include/asm/cpu.h
arch/ia64/include/asm/current.h
arch/ia64/include/asm/cyclone.h
arch/ia64/include/asm/delay.h
arch/ia64/include/asm/dma-mapping.h
arch/ia64/include/asm/dma.h
arch/ia64/include/asm/dmi.h
arch/ia64/include/asm/early_ioremap.h
arch/ia64/include/asm/elf.h
arch/ia64/include/asm/esi.h
arch/ia64/include/asm/extable.h
arch/ia64/include/asm/fb.h
arch/ia64/include/asm/fpswa.h
arch/ia64/include/asm/ftrace.h
arch/ia64/include/asm/futex.h
arch/ia64/include/asm/gcc_intrin.h
arch/ia64/include/asm/hardirq.h
arch/ia64/include/asm/hpsim.h
arch/ia64/include/asm/hugetlb.h
arch/ia64/include/asm/hw_irq.h
arch/ia64/include/asm/idle.h
arch/ia64/include/asm/intrinsics.h
arch/ia64/include/asm/io.h
arch/ia64/include/asm/iommu.h
arch/ia64/include/asm/iommu_table.h
arch/ia64/include/asm/iosapic.h
arch/ia64/include/asm/irq.h
arch/ia64/include/asm/irq_remapping.h
arch/ia64/include/asm/irqflags.h
arch/ia64/include/asm/kexec.h
arch/ia64/include/asm/kmap_types.h
arch/ia64/include/asm/kregs.h
arch/ia64/include/asm/libata-portmap.h
arch/ia64/include/asm/linkage.h
arch/ia64/include/asm/machvec.h
arch/ia64/include/asm/machvec_dig.h
arch/ia64/include/asm/machvec_dig_vtd.h
arch/ia64/include/asm/machvec_hpsim.h
arch/ia64/include/asm/machvec_hpzx1.h
arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
arch/ia64/include/asm/machvec_init.h
arch/ia64/include/asm/mca.h
arch/ia64/include/asm/mca_asm.h
arch/ia64/include/asm/mman.h
arch/ia64/include/asm/mmu.h
arch/ia64/include/asm/mmu_context.h
arch/ia64/include/asm/module.h
arch/ia64/include/asm/msidef.h
arch/ia64/include/asm/page.h
arch/ia64/include/asm/pal.h
arch/ia64/include/asm/param.h
arch/ia64/include/asm/parport.h
arch/ia64/include/asm/patch.h
arch/ia64/include/asm/pci.h
arch/ia64/include/asm/percpu.h
arch/ia64/include/asm/perfmon.h
arch/ia64/include/asm/pgalloc.h
arch/ia64/include/asm/pgtable.h
arch/ia64/include/asm/processor.h
arch/ia64/include/asm/ptrace.h
arch/ia64/include/asm/rwsem.h
arch/ia64/include/asm/sal.h
arch/ia64/include/asm/sections.h
arch/ia64/include/asm/shmparam.h
arch/ia64/include/asm/signal.h
arch/ia64/include/asm/smp.h
arch/ia64/include/asm/sn/ioc3.h
arch/ia64/include/asm/sparsemem.h
arch/ia64/include/asm/spinlock.h
arch/ia64/include/asm/spinlock_types.h
arch/ia64/include/asm/string.h
arch/ia64/include/asm/swiotlb.h
arch/ia64/include/asm/switch_to.h
arch/ia64/include/asm/termios.h
arch/ia64/include/asm/thread_info.h
arch/ia64/include/asm/timex.h
arch/ia64/include/asm/tlb.h
arch/ia64/include/asm/tlbflush.h
arch/ia64/include/asm/types.h
arch/ia64/include/asm/uaccess.h
arch/ia64/include/asm/unaligned.h
arch/ia64/include/asm/unistd.h
arch/ia64/include/asm/unwind.h
arch/ia64/include/asm/user.h
arch/ia64/include/asm/ustack.h
arch/ia64/include/asm/uv/uv.h
arch/ia64/include/asm/vga.h
arch/ia64/include/uapi/asm/auxvec.h
arch/ia64/include/uapi/asm/bitsperlong.h
arch/ia64/include/uapi/asm/break.h
arch/ia64/include/uapi/asm/byteorder.h
arch/ia64/include/uapi/asm/cmpxchg.h
arch/ia64/include/uapi/asm/errno.h
arch/ia64/include/uapi/asm/fcntl.h
arch/ia64/include/uapi/asm/fpu.h
arch/ia64/include/uapi/asm/gcc_intrin.h
arch/ia64/include/uapi/asm/ia64regs.h
arch/ia64/include/uapi/asm/intel_intrin.h
arch/ia64/include/uapi/asm/intrinsics.h
arch/ia64/include/uapi/asm/ioctl.h
arch/ia64/include/uapi/asm/ioctls.h
arch/ia64/include/uapi/asm/ipcbuf.h
arch/ia64/include/uapi/asm/mman.h
arch/ia64/include/uapi/asm/msgbuf.h
arch/ia64/include/uapi/asm/param.h
arch/ia64/include/uapi/asm/perfmon.h
arch/ia64/include/uapi/asm/perfmon_default_smpl.h
arch/ia64/include/uapi/asm/poll.h
arch/ia64/include/uapi/asm/posix_types.h
arch/ia64/include/uapi/asm/ptrace.h
arch/ia64/include/uapi/asm/ptrace_offsets.h
arch/ia64/include/uapi/asm/resource.h
arch/ia64/include/uapi/asm/rse.h
arch/ia64/include/uapi/asm/sembuf.h
arch/ia64/include/uapi/asm/setup.h
arch/ia64/include/uapi/asm/shmbuf.h
arch/ia64/include/uapi/asm/sigcontext.h
arch/ia64/include/uapi/asm/siginfo.h
arch/ia64/include/uapi/asm/signal.h
arch/ia64/include/uapi/asm/socket.h
arch/ia64/include/uapi/asm/sockios.h
arch/ia64/include/uapi/asm/stat.h
arch/ia64/include/uapi/asm/statfs.h
arch/ia64/include/uapi/asm/swab.h
arch/ia64/include/uapi/asm/termbits.h
arch/ia64/include/uapi/asm/termios.h
arch/ia64/include/uapi/asm/types.h
arch/ia64/include/uapi/asm/ucontext.h
arch/ia64/include/uapi/asm/unistd.h
arch/ia64/include/uapi/asm/ustack.h
arch/ia64/kernel/Makefile
arch/ia64/kernel/Makefile.gate
arch/ia64/kernel/asm-offsets.c
arch/ia64/kernel/audit.c
arch/ia64/kernel/brl_emu.c
arch/ia64/kernel/crash.c
arch/ia64/kernel/crash_dump.c
arch/ia64/kernel/cyclone.c
arch/ia64/kernel/dma-mapping.c
arch/ia64/kernel/efi.c
arch/ia64/kernel/efi_stub.S
arch/ia64/kernel/elfcore.c
arch/ia64/kernel/entry.S
arch/ia64/kernel/entry.h
arch/ia64/kernel/fsys.S
arch/ia64/kernel/fsyscall_gtod_data.h
arch/ia64/kernel/gate.S
arch/ia64/kernel/gate.lds.S
arch/ia64/kernel/head.S
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/kernel/init_task.c
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/irq.c
arch/ia64/kernel/irq_ia64.c
arch/ia64/kernel/irq_lsapic.c
arch/ia64/kernel/ivt.S
arch/ia64/kernel/machvec.c
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/mca_drv.h
arch/ia64/kernel/mca_drv_asm.S
arch/ia64/kernel/minstate.h
arch/ia64/kernel/module.c
arch/ia64/kernel/msi_ia64.c
arch/ia64/kernel/nr-irqs.c
arch/ia64/kernel/pal.S
arch/ia64/kernel/patch.c
arch/ia64/kernel/pci-dma.c
arch/ia64/kernel/pci-swiotlb.c
arch/ia64/kernel/perfmon_generic.h
arch/ia64/kernel/perfmon_itanium.h
arch/ia64/kernel/perfmon_mckinley.h
arch/ia64/kernel/perfmon_montecito.h
arch/ia64/kernel/process.c
arch/ia64/kernel/ptrace.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/sigframe.h
arch/ia64/kernel/signal.c
arch/ia64/kernel/stacktrace.c
arch/ia64/kernel/sys_ia64.c
arch/ia64/kernel/traps.c
arch/ia64/kernel/unaligned.c
arch/ia64/kernel/unwind.c
arch/ia64/kernel/unwind_decoder.c
arch/ia64/kernel/unwind_i.h
arch/ia64/kernel/vmlinux.lds.S
arch/ia64/lib/Makefile
arch/ia64/lib/carta_random.S
arch/ia64/lib/checksum.c
arch/ia64/lib/clear_page.S
arch/ia64/lib/clear_user.S
arch/ia64/lib/copy_page.S
arch/ia64/lib/copy_page_mck.S
arch/ia64/lib/copy_user.S
arch/ia64/lib/csum_partial_copy.c
arch/ia64/lib/do_csum.S
arch/ia64/lib/idiv32.S
arch/ia64/lib/idiv64.S
arch/ia64/lib/io.c
arch/ia64/lib/ip_fast_csum.S
arch/ia64/lib/memcpy.S
arch/ia64/lib/memcpy_mck.S
arch/ia64/lib/memset.S
arch/ia64/lib/strlen.S
arch/ia64/lib/strncpy_from_user.S
arch/ia64/lib/strnlen_user.S
arch/ia64/mm/Makefile
arch/ia64/mm/discontig.c
arch/ia64/mm/extable.c
arch/ia64/mm/fault.c
arch/ia64/mm/hugetlbpage.c
arch/ia64/mm/init.c
arch/ia64/module.lds
arch/ia64/oprofile/Makefile
arch/ia64/pci/fixup.c
arch/ia64/scripts/check-gas
arch/ia64/scripts/check-segrel.S
arch/ia64/scripts/check-segrel.lds
arch/ia64/scripts/check-text-align.S
arch/ia64/scripts/toolchain-flags
arch/ia64/scripts/unwcheck.py
arch/ia64/sn/kernel/sn2/timer.c
arch/m32r/Kconfig
arch/m32r/Kconfig.debug
arch/m32r/Makefile
arch/m32r/boot/compressed/Makefile
arch/m32r/boot/compressed/boot.h
arch/m32r/boot/compressed/head.S
arch/m32r/boot/compressed/m32r_sio.c
arch/m32r/boot/compressed/misc.c
arch/m32r/boot/compressed/vmlinux.lds.S
arch/m32r/boot/setup.S
arch/m32r/include/asm/assembler.h
arch/m32r/include/asm/atomic.h
arch/m32r/include/asm/bitops.h
arch/m32r/include/asm/bug.h
arch/m32r/include/asm/bugs.h
arch/m32r/include/asm/cache.h
arch/m32r/include/asm/cachectl.h
arch/m32r/include/asm/cacheflush.h
arch/m32r/include/asm/cmpxchg.h
arch/m32r/include/asm/dma-mapping.h
arch/m32r/include/asm/dma.h
arch/m32r/include/asm/elf.h
arch/m32r/include/asm/emergency-restart.h
arch/m32r/include/asm/fb.h
arch/m32r/include/asm/hardirq.h
arch/m32r/include/asm/io.h
arch/m32r/include/asm/irq.h
arch/m32r/include/asm/kmap_types.h
arch/m32r/include/asm/linkage.h
arch/m32r/include/asm/local.h
arch/m32r/include/asm/m32102.h
arch/m32r/include/asm/m32r.h
arch/m32r/include/asm/m32r_mp_fpga.h
arch/m32r/include/asm/mc146818rtc.h
arch/m32r/include/asm/mmu.h
arch/m32r/include/asm/mmu_context.h
arch/m32r/include/asm/mmzone.h
arch/m32r/include/asm/page.h
arch/m32r/include/asm/pci.h
arch/m32r/include/asm/percpu.h
arch/m32r/include/asm/pgalloc.h
arch/m32r/include/asm/pgtable-2level.h
arch/m32r/include/asm/pgtable.h
arch/m32r/include/asm/processor.h
arch/m32r/include/asm/rtc.h
arch/m32r/include/asm/s1d13806.h
arch/m32r/include/asm/segment.h
arch/m32r/include/asm/serial.h
arch/m32r/include/asm/setup.h
arch/m32r/include/asm/shmparam.h
arch/m32r/include/asm/signal.h
arch/m32r/include/asm/smp.h
arch/m32r/include/asm/spinlock.h
arch/m32r/include/asm/spinlock_types.h
arch/m32r/include/asm/string.h
arch/m32r/include/asm/syscall.h
arch/m32r/include/asm/termios.h
arch/m32r/include/asm/thread_info.h
arch/m32r/include/asm/timex.h
arch/m32r/include/asm/tlb.h
arch/m32r/include/asm/tlbflush.h
arch/m32r/include/asm/topology.h
arch/m32r/include/asm/types.h
arch/m32r/include/asm/uaccess.h
arch/m32r/include/asm/ucontext.h
arch/m32r/include/asm/unaligned.h
arch/m32r/include/asm/unistd.h
arch/m32r/include/asm/user.h
arch/m32r/include/asm/vga.h
arch/m32r/include/asm/xor.h
arch/m32r/include/uapi/asm/bitsperlong.h
arch/m32r/include/uapi/asm/byteorder.h
arch/m32r/include/uapi/asm/errno.h
arch/m32r/include/uapi/asm/fcntl.h
arch/m32r/include/uapi/asm/ioctl.h
arch/m32r/include/uapi/asm/ioctls.h
arch/m32r/include/uapi/asm/ipcbuf.h
arch/m32r/include/uapi/asm/msgbuf.h
arch/m32r/include/uapi/asm/param.h
arch/m32r/include/uapi/asm/poll.h
arch/m32r/include/uapi/asm/posix_types.h
arch/m32r/include/uapi/asm/ptrace.h
arch/m32r/include/uapi/asm/resource.h
arch/m32r/include/uapi/asm/sembuf.h
arch/m32r/include/uapi/asm/setup.h
arch/m32r/include/uapi/asm/shmbuf.h
arch/m32r/include/uapi/asm/sigcontext.h
arch/m32r/include/uapi/asm/signal.h
arch/m32r/include/uapi/asm/socket.h
arch/m32r/include/uapi/asm/sockios.h
arch/m32r/include/uapi/asm/stat.h
arch/m32r/include/uapi/asm/statfs.h
arch/m32r/include/uapi/asm/swab.h
arch/m32r/include/uapi/asm/termbits.h
arch/m32r/include/uapi/asm/termios.h
arch/m32r/include/uapi/asm/unistd.h
arch/m32r/kernel/Makefile
arch/m32r/kernel/align.c
arch/m32r/kernel/asm-offsets.c
arch/m32r/kernel/entry.S
arch/m32r/kernel/head.S
arch/m32r/kernel/irq.c
arch/m32r/kernel/m32r_ksyms.c
arch/m32r/kernel/process.c
arch/m32r/kernel/ptrace.c
arch/m32r/kernel/setup.c
arch/m32r/kernel/signal.c
arch/m32r/kernel/sys_m32r.c
arch/m32r/kernel/syscall_table.S
arch/m32r/kernel/time.c
arch/m32r/kernel/traps.c
arch/m32r/kernel/vmlinux.lds.S
arch/m32r/lib/ashxdi3.S
arch/m32r/lib/delay.c
arch/m32r/lib/libgcc.h
arch/m32r/lib/memcpy.S
arch/m32r/lib/memset.S
arch/m32r/lib/strlen.S
arch/m32r/lib/ucmpdi2.c
arch/m32r/lib/usercopy.c
arch/m32r/mm/Makefile
arch/m32r/mm/cache.c
arch/m32r/mm/discontig.c
arch/m32r/mm/extable.c
arch/m32r/mm/fault-nommu.c
arch/m32r/mm/fault.c
arch/m32r/mm/init.c
arch/m32r/mm/mmu.S
arch/m32r/oprofile/Makefile
arch/m32r/platforms/Makefile
arch/m32r/platforms/m32104ut/io.c
arch/m32r/platforms/m32104ut/setup.c
arch/m32r/platforms/mappi/io.c
arch/m32r/platforms/mappi/setup.c
arch/m32r/platforms/mappi2/io.c
arch/m32r/platforms/mappi2/setup.c
arch/m32r/platforms/mappi3/io.c
arch/m32r/platforms/mappi3/setup.c
arch/m32r/platforms/oaks32r/io.c
arch/m32r/platforms/oaks32r/setup.c
arch/m32r/platforms/usrv/setup.c
arch/m68k/68000/Makefile
arch/m68k/68000/bootlogo-vz.h
arch/m68k/68000/bootlogo.h
arch/m68k/68000/head.S
arch/m68k/Kconfig
arch/m68k/Kconfig.bus
arch/m68k/Kconfig.cpu
arch/m68k/Kconfig.debug
arch/m68k/Kconfig.devices
arch/m68k/Kconfig.machine
arch/m68k/amiga/chipram.c
arch/m68k/apollo/config.c
arch/m68k/apollo/dn_ints.c
arch/m68k/bvme6000/rtc.c
arch/m68k/coldfire/Makefile
arch/m68k/coldfire/cache.c
arch/m68k/coldfire/clk.c
arch/m68k/coldfire/dma.c
arch/m68k/coldfire/dma_timer.c
arch/m68k/coldfire/firebee.c
arch/m68k/coldfire/head.S
arch/m68k/coldfire/m5206.c
arch/m68k/coldfire/m520x.c
arch/m68k/coldfire/m523x.c
arch/m68k/coldfire/m5249.c
arch/m68k/coldfire/m525x.c
arch/m68k/coldfire/m5272.c
arch/m68k/coldfire/m527x.c
arch/m68k/coldfire/m528x.c
arch/m68k/coldfire/m5307.c
arch/m68k/coldfire/m5407.c
arch/m68k/coldfire/m5441x.c
arch/m68k/coldfire/m54xx.c
arch/m68k/coldfire/nettel.c
arch/m68k/coldfire/pit.c
arch/m68k/coldfire/sltimers.c
arch/m68k/coldfire/timers.c
arch/m68k/coldfire/vectors.c
arch/m68k/fpsp040/Makefile
arch/m68k/hp300/config.c
arch/m68k/hp300/time.c
arch/m68k/include/asm/MC68328.h
arch/m68k/include/asm/MC68EZ328.h
arch/m68k/include/asm/MC68VZ328.h
arch/m68k/include/asm/adb_iop.h
arch/m68k/include/asm/apollohw.h
arch/m68k/include/asm/atafd.h
arch/m68k/include/asm/atafdreg.h
arch/m68k/include/asm/atari_joystick.h
arch/m68k/include/asm/atari_stdma.h
arch/m68k/include/asm/atari_stram.h
arch/m68k/include/asm/atomic.h
arch/m68k/include/asm/bootstd.h
arch/m68k/include/asm/bug.h
arch/m68k/include/asm/bugs.h
arch/m68k/include/asm/bvme6000hw.h
arch/m68k/include/asm/cache.h
arch/m68k/include/asm/cacheflush.h
arch/m68k/include/asm/cacheflush_mm.h
arch/m68k/include/asm/cacheflush_no.h
arch/m68k/include/asm/checksum.h
arch/m68k/include/asm/cmpxchg.h
arch/m68k/include/asm/coldfire.h
arch/m68k/include/asm/contregs.h
arch/m68k/include/asm/current.h
arch/m68k/include/asm/delay.h
arch/m68k/include/asm/div64.h
arch/m68k/include/asm/dma-mapping.h
arch/m68k/include/asm/dma.h
arch/m68k/include/asm/dvma.h
arch/m68k/include/asm/elf.h
arch/m68k/include/asm/entry.h
arch/m68k/include/asm/fb.h
arch/m68k/include/asm/fbio.h
arch/m68k/include/asm/flat.h
arch/m68k/include/asm/fpu.h
arch/m68k/include/asm/hardirq.h
arch/m68k/include/asm/hash.h
arch/m68k/include/asm/hp300hw.h
arch/m68k/include/asm/hwtest.h
arch/m68k/include/asm/ide.h
arch/m68k/include/asm/idprom.h
arch/m68k/include/asm/intersil.h
arch/m68k/include/asm/io.h
arch/m68k/include/asm/io_mm.h
arch/m68k/include/asm/io_no.h
arch/m68k/include/asm/irq.h
arch/m68k/include/asm/irqflags.h
arch/m68k/include/asm/kexec.h
arch/m68k/include/asm/linkage.h
arch/m68k/include/asm/m5206sim.h
arch/m68k/include/asm/m520xsim.h
arch/m68k/include/asm/m523xsim.h
arch/m68k/include/asm/m525xsim.h
arch/m68k/include/asm/m5272sim.h
arch/m68k/include/asm/m527xsim.h
arch/m68k/include/asm/m528xsim.h
arch/m68k/include/asm/m52xxacr.h
arch/m68k/include/asm/m5307sim.h
arch/m68k/include/asm/m53xxacr.h
arch/m68k/include/asm/m53xxsim.h
arch/m68k/include/asm/m5407sim.h
arch/m68k/include/asm/m5441xsim.h
arch/m68k/include/asm/m54xxacr.h
arch/m68k/include/asm/m54xxgpt.h
arch/m68k/include/asm/m54xxsim.h
arch/m68k/include/asm/mac_asc.h
arch/m68k/include/asm/mac_baboon.h
arch/m68k/include/asm/mac_iop.h
arch/m68k/include/asm/mac_oss.h
arch/m68k/include/asm/mac_psc.h
arch/m68k/include/asm/mac_via.h
arch/m68k/include/asm/machdep.h
arch/m68k/include/asm/machines.h
arch/m68k/include/asm/macintosh.h
arch/m68k/include/asm/math-emu.h
arch/m68k/include/asm/mc146818rtc.h
arch/m68k/include/asm/mcf8390.h
arch/m68k/include/asm/mcf_pgalloc.h
arch/m68k/include/asm/mcf_pgtable.h
arch/m68k/include/asm/mcfclk.h
arch/m68k/include/asm/mcfdma.h
arch/m68k/include/asm/mcfintc.h
arch/m68k/include/asm/mcfpit.h
arch/m68k/include/asm/mcfsim.h
arch/m68k/include/asm/mcfslt.h
arch/m68k/include/asm/mcftimer.h
arch/m68k/include/asm/mcfuart.h
arch/m68k/include/asm/mcfwdebug.h
arch/m68k/include/asm/mmu.h
arch/m68k/include/asm/mmu_context.h
arch/m68k/include/asm/mmzone.h
arch/m68k/include/asm/module.h
arch/m68k/include/asm/motorola_pgalloc.h
arch/m68k/include/asm/motorola_pgtable.h
arch/m68k/include/asm/movs.h
arch/m68k/include/asm/mvme147hw.h
arch/m68k/include/asm/mvme16xhw.h
arch/m68k/include/asm/nettel.h
arch/m68k/include/asm/nubus.h
arch/m68k/include/asm/openprom.h
arch/m68k/include/asm/oplib.h
arch/m68k/include/asm/page.h
arch/m68k/include/asm/page_mm.h
arch/m68k/include/asm/page_no.h
arch/m68k/include/asm/page_offset.h
arch/m68k/include/asm/parport.h
arch/m68k/include/asm/pci.h
arch/m68k/include/asm/pgalloc.h
arch/m68k/include/asm/pgtable.h
arch/m68k/include/asm/pgtable_mm.h
arch/m68k/include/asm/pgtable_no.h
arch/m68k/include/asm/processor.h
arch/m68k/include/asm/ptrace.h
arch/m68k/include/asm/q40_master.h
arch/m68k/include/asm/q40ints.h
arch/m68k/include/asm/quicc_simple.h
arch/m68k/include/asm/raw_io.h
arch/m68k/include/asm/segment.h
arch/m68k/include/asm/serial.h
arch/m68k/include/asm/signal.h
arch/m68k/include/asm/string.h
arch/m68k/include/asm/sun3-head.h
arch/m68k/include/asm/sun3_pgalloc.h
arch/m68k/include/asm/sun3_pgtable.h
arch/m68k/include/asm/sun3mmu.h
arch/m68k/include/asm/sun3x.h
arch/m68k/include/asm/sun3xflop.h
arch/m68k/include/asm/sun3xprom.h
arch/m68k/include/asm/switch_to.h
arch/m68k/include/asm/thread_info.h
arch/m68k/include/asm/timex.h
arch/m68k/include/asm/tlb.h
arch/m68k/include/asm/tlbflush.h
arch/m68k/include/asm/uaccess.h
arch/m68k/include/asm/uaccess_mm.h
arch/m68k/include/asm/uaccess_no.h
arch/m68k/include/asm/ucontext.h
arch/m68k/include/asm/unaligned.h
arch/m68k/include/asm/unistd.h
arch/m68k/include/asm/user.h
arch/m68k/include/asm/vga.h
arch/m68k/include/asm/virtconvert.h
arch/m68k/include/asm/zorro.h
arch/m68k/include/uapi/asm/a.out.h
arch/m68k/include/uapi/asm/bootinfo-amiga.h
arch/m68k/include/uapi/asm/bootinfo-apollo.h
arch/m68k/include/uapi/asm/bootinfo-atari.h
arch/m68k/include/uapi/asm/bootinfo-hp300.h
arch/m68k/include/uapi/asm/bootinfo-mac.h
arch/m68k/include/uapi/asm/bootinfo-q40.h
arch/m68k/include/uapi/asm/bootinfo-vme.h
arch/m68k/include/uapi/asm/bootinfo.h
arch/m68k/include/uapi/asm/byteorder.h
arch/m68k/include/uapi/asm/cachectl.h
arch/m68k/include/uapi/asm/fcntl.h
arch/m68k/include/uapi/asm/ioctls.h
arch/m68k/include/uapi/asm/param.h
arch/m68k/include/uapi/asm/poll.h
arch/m68k/include/uapi/asm/posix_types.h
arch/m68k/include/uapi/asm/ptrace.h
arch/m68k/include/uapi/asm/setup.h
arch/m68k/include/uapi/asm/sigcontext.h
arch/m68k/include/uapi/asm/signal.h
arch/m68k/include/uapi/asm/stat.h
arch/m68k/include/uapi/asm/swab.h
arch/m68k/include/uapi/asm/unistd.h
arch/m68k/kernel/Makefile
arch/m68k/kernel/asm-offsets.c
arch/m68k/kernel/bootinfo_proc.c
arch/m68k/kernel/machine_kexec.c
arch/m68k/kernel/process.c
arch/m68k/kernel/relocate_kernel.S
arch/m68k/kernel/setup.c
arch/m68k/kernel/setup_mm.c
arch/m68k/kernel/setup_no.c
arch/m68k/kernel/sun3-head.S
arch/m68k/kernel/sys_m68k.c
arch/m68k/kernel/syscalltable.S
arch/m68k/kernel/vmlinux-nommu.lds
arch/m68k/kernel/vmlinux-std.lds
arch/m68k/kernel/vmlinux-sun3.lds
arch/m68k/kernel/vmlinux.lds.S
arch/m68k/lib/Makefile
arch/m68k/mac/baboon.c
arch/m68k/mac/mac_penguin.S
arch/m68k/mac/macboing.c
arch/m68k/mac/macints.c
arch/m68k/mac/misc.c
arch/m68k/mac/oss.c
arch/m68k/mac/via.c
arch/m68k/mm/Makefile
arch/m68k/mm/cache.c
arch/m68k/mm/fault.c
arch/m68k/mm/hwtest.c
arch/m68k/mm/init.c
arch/m68k/mm/kmap.c
arch/m68k/mm/mcfmmu.c
arch/m68k/mm/memory.c
arch/m68k/mm/motorola.c
arch/m68k/mm/sun3mmu.c
arch/m68k/mvme16x/rtc.c
arch/m68k/sun3/dvma.c
arch/m68k/sun3/idprom.c
arch/m68k/sun3/leds.c
arch/m68k/sun3/mmu_emu.c
arch/m68k/sun3/prom/console.c
arch/m68k/sun3/prom/init.c
arch/m68k/sun3/prom/misc.c
arch/m68k/sun3/prom/printf.c
arch/m68k/sun3/sun3dvma.c
arch/m68k/sun3x/config.c
arch/m68k/sun3x/dvma.c
arch/m68k/sun3x/prom.c
arch/m68k/sun3x/time.c
arch/m68k/sun3x/time.h
arch/m68k/tools/amiga/Makefile
arch/metag/Kconfig
arch/metag/Kconfig.debug
arch/metag/Kconfig.soc
arch/metag/boot/dts/Makefile
arch/metag/boot/dts/skeleton.dtsi
arch/metag/include/asm/atomic.h
arch/metag/include/asm/atomic_lnkget.h
arch/metag/include/asm/atomic_lock1.h
arch/metag/include/asm/barrier.h
arch/metag/include/asm/bitops.h
arch/metag/include/asm/bug.h
arch/metag/include/asm/cache.h
arch/metag/include/asm/cacheflush.h
arch/metag/include/asm/cachepart.h
arch/metag/include/asm/checksum.h
arch/metag/include/asm/cmpxchg.h
arch/metag/include/asm/cmpxchg_irq.h
arch/metag/include/asm/cmpxchg_lnkget.h
arch/metag/include/asm/cmpxchg_lock1.h
arch/metag/include/asm/core_reg.h
arch/metag/include/asm/cpu.h
arch/metag/include/asm/da.h
arch/metag/include/asm/delay.h
arch/metag/include/asm/div64.h
arch/metag/include/asm/dma-mapping.h
arch/metag/include/asm/elf.h
arch/metag/include/asm/ftrace.h
arch/metag/include/asm/global_lock.h
arch/metag/include/asm/highmem.h
arch/metag/include/asm/hugetlb.h
arch/metag/include/asm/hwthread.h
arch/metag/include/asm/io.h
arch/metag/include/asm/irq.h
arch/metag/include/asm/irqflags.h
arch/metag/include/asm/l2cache.h
arch/metag/include/asm/linkage.h
arch/metag/include/asm/mman.h
arch/metag/include/asm/mmu.h
arch/metag/include/asm/mmu_context.h
arch/metag/include/asm/mmzone.h
arch/metag/include/asm/module.h
arch/metag/include/asm/page.h
arch/metag/include/asm/pgalloc.h
arch/metag/include/asm/pgtable-bits.h
arch/metag/include/asm/pgtable.h
arch/metag/include/asm/processor.h
arch/metag/include/asm/ptrace.h
arch/metag/include/asm/setup.h
arch/metag/include/asm/smp.h
arch/metag/include/asm/sparsemem.h
arch/metag/include/asm/spinlock.h
arch/metag/include/asm/spinlock_lnkget.h
arch/metag/include/asm/spinlock_lock1.h
arch/metag/include/asm/spinlock_types.h
arch/metag/include/asm/stacktrace.h
arch/metag/include/asm/string.h
arch/metag/include/asm/syscalls.h
arch/metag/include/asm/tcm.h
arch/metag/include/asm/thread_info.h
arch/metag/include/asm/tlb.h
arch/metag/include/asm/tlbflush.h
arch/metag/include/asm/topology.h
arch/metag/include/asm/uaccess.h
arch/metag/include/asm/user_gateway.h
arch/metag/include/uapi/asm/byteorder.h
arch/metag/include/uapi/asm/ech.h
arch/metag/include/uapi/asm/ptrace.h
arch/metag/include/uapi/asm/sigcontext.h
arch/metag/include/uapi/asm/siginfo.h
arch/metag/include/uapi/asm/swab.h
arch/metag/include/uapi/asm/unistd.h
arch/metag/kernel/Makefile
arch/metag/kernel/asm-offsets.c
arch/metag/kernel/cachepart.c
arch/metag/kernel/core_reg.c
arch/metag/kernel/head.S
arch/metag/kernel/irq.c
arch/metag/kernel/machines.c
arch/metag/kernel/metag_ksyms.c
arch/metag/kernel/perf_callchain.c
arch/metag/kernel/process.c
arch/metag/kernel/signal.c
arch/metag/kernel/sys_metag.c
arch/metag/kernel/tbiunexp.S
arch/metag/kernel/tcm.c
arch/metag/kernel/time.c
arch/metag/kernel/user_gateway.S
arch/metag/kernel/vmlinux.lds.S
arch/metag/lib/Makefile
arch/metag/lib/ashldi3.S
arch/metag/lib/ashrdi3.S
arch/metag/lib/clear_page.S
arch/metag/lib/cmpdi2.S
arch/metag/lib/copy_page.S
arch/metag/lib/delay.c
arch/metag/lib/div64.S
arch/metag/lib/divsi3.S
arch/metag/lib/ip_fast_csum.S
arch/metag/lib/lshrdi3.S
arch/metag/lib/memcpy.S
arch/metag/lib/memmove.S
arch/metag/lib/memset.S
arch/metag/lib/modsi3.S
arch/metag/lib/muldi3.S
arch/metag/lib/ucmpdi2.S
arch/metag/lib/usercopy.c
arch/metag/mm/Kconfig
arch/metag/mm/Makefile
arch/metag/mm/extable.c
arch/metag/mm/fault.c
arch/metag/mm/highmem.c
arch/metag/mm/hugetlbpage.c
arch/metag/mm/init.c
arch/metag/mm/ioremap.c
arch/metag/mm/l2cache.c
arch/metag/mm/maccess.c
arch/metag/mm/mmu-meta1.c
arch/metag/mm/mmu-meta2.c
arch/metag/oprofile/Makefile
arch/metag/oprofile/backtrace.h
arch/metag/tbx/Makefile
arch/microblaze/Kconfig
arch/microblaze/Makefile
arch/microblaze/boot/Makefile
arch/microblaze/boot/dts/Makefile
arch/microblaze/include/asm/asm-compat.h
arch/microblaze/include/asm/atomic.h
arch/microblaze/include/asm/cmpxchg.h
arch/microblaze/include/asm/ftrace.h
arch/microblaze/include/asm/futex.h
arch/microblaze/include/asm/hash.h
arch/microblaze/include/asm/highmem.h
arch/microblaze/include/asm/kgdb.h
arch/microblaze/include/asm/mmu_context.h
arch/microblaze/include/asm/seccomp.h
arch/microblaze/include/asm/syscall.h
arch/microblaze/include/uapi/asm/Kbuild
arch/microblaze/include/uapi/asm/auxvec.h
arch/microblaze/include/uapi/asm/byteorder.h
arch/microblaze/include/uapi/asm/elf.h
arch/microblaze/include/uapi/asm/posix_types.h
arch/microblaze/include/uapi/asm/ptrace.h
arch/microblaze/include/uapi/asm/setup.h
arch/microblaze/include/uapi/asm/sigcontext.h
arch/microblaze/include/uapi/asm/unistd.h
arch/microblaze/kernel/Makefile
arch/microblaze/kernel/cpu/Makefile
arch/microblaze/kernel/dma.c
arch/microblaze/kernel/syscall_table.S
arch/microblaze/lib/Makefile
arch/microblaze/lib/ashldi3.c
arch/microblaze/lib/ashrdi3.c
arch/microblaze/lib/cmpdi2.c
arch/microblaze/lib/divsi3.S
arch/microblaze/lib/libgcc.h
arch/microblaze/lib/lshrdi3.c
arch/microblaze/lib/modsi3.S
arch/microblaze/lib/muldi3.c
arch/microblaze/lib/mulsi3.S
arch/microblaze/lib/ucmpdi2.c
arch/microblaze/lib/udivsi3.S
arch/microblaze/lib/umodsi3.S
arch/microblaze/mm/highmem.c
arch/microblaze/oprofile/Makefile
arch/microblaze/pci/iomap.c
arch/mips/Kconfig
arch/mips/Kconfig.debug
arch/mips/Makefile.postlink
arch/mips/alchemy/Kconfig
arch/mips/alchemy/common/clock.c
arch/mips/alchemy/devboards/db1300.c
arch/mips/alchemy/devboards/db1550.c
arch/mips/alchemy/devboards/db1xxx.c
arch/mips/alchemy/devboards/platform.c
arch/mips/alchemy/devboards/platform.h
arch/mips/alchemy/devboards/pm.c
arch/mips/ar7/Makefile
arch/mips/ath25/Kconfig
arch/mips/ath25/ar2315.h
arch/mips/ath25/ar5312.h
arch/mips/ath25/devices.c
arch/mips/ath25/devices.h
arch/mips/ath79/Kconfig
arch/mips/ath79/pci.c
arch/mips/bcm47xx/Kconfig
arch/mips/bcm47xx/bcm47xx_private.h
arch/mips/bcm47xx/board.c
arch/mips/bcm47xx/buttons.c
arch/mips/bcm47xx/leds.c
arch/mips/bcm47xx/workarounds.c
arch/mips/bcm63xx/Kconfig
arch/mips/bcm63xx/Makefile
arch/mips/bcm63xx/boards/Kconfig
arch/mips/bmips/Kconfig
arch/mips/boot/compressed/dbg.c
arch/mips/boot/compressed/string.c
arch/mips/boot/compressed/uart-16550.c
arch/mips/boot/compressed/uart-alchemy.c
arch/mips/boot/compressed/uart-prom.c
arch/mips/boot/dts/Makefile
arch/mips/boot/dts/brcm/Makefile
arch/mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts
arch/mips/boot/dts/brcm/bcm3368.dtsi
arch/mips/boot/dts/brcm/bcm3384_viper.dtsi
arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi
arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts
arch/mips/boot/dts/brcm/bcm63268.dtsi
arch/mips/boot/dts/brcm/bcm6328.dtsi
arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts
arch/mips/boot/dts/brcm/bcm6358.dtsi
arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts
arch/mips/boot/dts/brcm/bcm6362.dtsi
arch/mips/boot/dts/brcm/bcm6368.dtsi
arch/mips/boot/dts/brcm/bcm7125.dtsi
arch/mips/boot/dts/brcm/bcm7346.dtsi
arch/mips/boot/dts/brcm/bcm7358.dtsi
arch/mips/boot/dts/brcm/bcm7360.dtsi
arch/mips/boot/dts/brcm/bcm7362.dtsi
arch/mips/boot/dts/brcm/bcm7420.dtsi
arch/mips/boot/dts/brcm/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
arch/mips/boot/dts/brcm/bcm93384wvg.dts
arch/mips/boot/dts/brcm/bcm93384wvg_viper.dts
arch/mips/boot/dts/brcm/bcm96368mvwg.dts
arch/mips/boot/dts/brcm/bcm97125cbmb.dts
arch/mips/boot/dts/brcm/bcm97346dbsmb.dts
arch/mips/boot/dts/brcm/bcm97358svmb.dts
arch/mips/boot/dts/brcm/bcm97360svmb.dts
arch/mips/boot/dts/brcm/bcm97362svmb.dts
arch/mips/boot/dts/brcm/bcm97420c.dts
arch/mips/boot/dts/brcm/bcm97425svmb.dts
arch/mips/boot/dts/brcm/bcm97435svmb.dts
arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi
arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi
arch/mips/boot/dts/brcm/bcm9ejtagprb.dts
arch/mips/boot/dts/cavium-octeon/Makefile
arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts
arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi
arch/mips/boot/dts/cavium-octeon/octeon_68xx.dts
arch/mips/boot/dts/img/Makefile
arch/mips/boot/dts/img/boston.dts
arch/mips/boot/dts/ingenic/Makefile
arch/mips/boot/dts/ingenic/ci20.dts
arch/mips/boot/dts/ingenic/jz4740.dtsi
arch/mips/boot/dts/ingenic/jz4780.dtsi
arch/mips/boot/dts/ingenic/qi_lb60.dts
arch/mips/boot/dts/lantiq/Makefile
arch/mips/boot/dts/lantiq/danube.dtsi
arch/mips/boot/dts/lantiq/easy50712.dts
arch/mips/boot/dts/mti/Makefile
arch/mips/boot/dts/mti/malta.dts
arch/mips/boot/dts/mti/sead3.dts
arch/mips/boot/dts/netlogic/Makefile
arch/mips/boot/dts/netlogic/xlp_evp.dts
arch/mips/boot/dts/netlogic/xlp_fvp.dts
arch/mips/boot/dts/netlogic/xlp_gvp.dts
arch/mips/boot/dts/netlogic/xlp_rvp.dts
arch/mips/boot/dts/netlogic/xlp_svp.dts
arch/mips/boot/dts/pic32/Makefile
arch/mips/boot/dts/qca/Makefile
arch/mips/boot/dts/qca/ar9132.dtsi
arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
arch/mips/boot/dts/qca/ar9331.dtsi
arch/mips/boot/dts/qca/ar9331_dpt_module.dts
arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts
arch/mips/boot/dts/qca/ar9331_omega.dts
arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts
arch/mips/boot/dts/ralink/Makefile
arch/mips/boot/dts/ralink/mt7620a.dtsi
arch/mips/boot/dts/ralink/mt7620a_eval.dts
arch/mips/boot/dts/ralink/rt2880.dtsi
arch/mips/boot/dts/ralink/rt2880_eval.dts
arch/mips/boot/dts/ralink/rt3050.dtsi
arch/mips/boot/dts/ralink/rt3052_eval.dts
arch/mips/boot/dts/ralink/rt3883.dtsi
arch/mips/boot/dts/ralink/rt3883_eval.dts
arch/mips/boot/dts/xilfpga/Makefile
arch/mips/boot/dts/xilfpga/microAptiv.dtsi
arch/mips/boot/dts/xilfpga/nexys4ddr.dts
arch/mips/boot/ecoff.h
arch/mips/boot/tools/Makefile
arch/mips/boot/tools/relocs.c
arch/mips/boot/tools/relocs.h
arch/mips/boot/tools/relocs_32.c
arch/mips/boot/tools/relocs_64.c
arch/mips/boot/tools/relocs_main.c
arch/mips/cavium-octeon/Kconfig
arch/mips/cavium-octeon/crypto/Makefile
arch/mips/dec/int-handler.S
arch/mips/dec/prom/cmdline.c
arch/mips/dec/prom/dectypes.h
arch/mips/dec/prom/identify.c
arch/mips/dec/prom/init.c
arch/mips/dec/prom/locore.S
arch/mips/dec/prom/memory.c
arch/mips/dec/reset.c
arch/mips/dec/time.c
arch/mips/fw/arc/Makefile
arch/mips/fw/arc/arc_con.c
arch/mips/fw/arc/memory.c
arch/mips/fw/arc/salone.c
arch/mips/generic/Kconfig
arch/mips/generic/Makefile
arch/mips/generic/Platform
arch/mips/generic/board-ni169445.its.S
arch/mips/generic/board-sead3.c
arch/mips/generic/init.c
arch/mips/generic/irq.c
arch/mips/generic/kexec.c
arch/mips/generic/proc.c
arch/mips/generic/vmlinux.its.S
arch/mips/generic/yamon-dt.c
arch/mips/include/asm/asm-prototypes.h
arch/mips/include/asm/asmmacro-32.h
arch/mips/include/asm/asmmacro-64.h
arch/mips/include/asm/bitrev.h
arch/mips/include/asm/bmips-spaces.h
arch/mips/include/asm/bug.h
arch/mips/include/asm/bugs.h
arch/mips/include/asm/clock.h
arch/mips/include/asm/cmp.h
arch/mips/include/asm/cmpxchg.h
arch/mips/include/asm/compat-signal.h
arch/mips/include/asm/compat.h
arch/mips/include/asm/cpu.h
arch/mips/include/asm/dma-mapping.h
arch/mips/include/asm/dma.h
arch/mips/include/asm/dsemul.h
arch/mips/include/asm/edac.h
arch/mips/include/asm/extable.h
arch/mips/include/asm/fw/arc/hinv.h
arch/mips/include/asm/gio_device.h
arch/mips/include/asm/highmem.h
arch/mips/include/asm/hpet.h
arch/mips/include/asm/idle.h
arch/mips/include/asm/isadep.h
arch/mips/include/asm/jazzdma.h
arch/mips/include/asm/kdebug.h
arch/mips/include/asm/kgdb.h
arch/mips/include/asm/kmap_types.h
arch/mips/include/asm/kvm_para.h
arch/mips/include/asm/lasat/ds1603.h
arch/mips/include/asm/lasat/eeprom.h
arch/mips/include/asm/lasat/head.h
arch/mips/include/asm/lasat/lasatint.h
arch/mips/include/asm/lasat/picvue.h
arch/mips/include/asm/lasat/serial.h
arch/mips/include/asm/linkage.h
arch/mips/include/asm/local.h
arch/mips/include/asm/m48t37.h
arch/mips/include/asm/maar.h
arch/mips/include/asm/mach-ath25/ath25_platform.h
arch/mips/include/asm/mach-au1x00/au1200fb.h
arch/mips/include/asm/mach-au1x00/au1550_spi.h
arch/mips/include/asm/mach-au1x00/au1550nd.h
arch/mips/include/asm/mach-au1x00/au1xxx_eth.h
arch/mips/include/asm/mach-au1x00/gpio-au1300.h
arch/mips/include/asm/mach-au1x00/prom.h
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cs.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_hsspi.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pci.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_pcmcia.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_uart.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_usbd.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_nvram.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h
arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
arch/mips/include/asm/mach-bcm63xx/ioremap.h
arch/mips/include/asm/mach-bcm63xx/irq.h
arch/mips/include/asm/mach-bmips/cpu-feature-overrides.h
arch/mips/include/asm/mach-bmips/ioremap.h
arch/mips/include/asm/mach-db1x00/bcsr.h
arch/mips/include/asm/mach-generic/kmalloc.h
arch/mips/include/asm/mach-ip27/mmzone.h
arch/mips/include/asm/mach-ip27/topology.h
arch/mips/include/asm/mach-ip32/kmalloc.h
arch/mips/include/asm/mach-jz4740/base.h
arch/mips/include/asm/mach-jz4740/jz4740_mmc.h
arch/mips/include/asm/mach-lasat/irq.h
arch/mips/include/asm/mach-lasat/mach-gt64120.h
arch/mips/include/asm/mach-loongson64/boot_param.h
arch/mips/include/asm/mach-loongson64/cs5536/cs5536.h
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_mfgpt.h
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_pci.h
arch/mips/include/asm/mach-loongson64/cs5536/cs5536_vsm.h
arch/mips/include/asm/mach-loongson64/irq.h
arch/mips/include/asm/mach-loongson64/loongson_hwmon.h
arch/mips/include/asm/mach-loongson64/spaces.h
arch/mips/include/asm/mach-loongson64/topology.h
arch/mips/include/asm/mach-loongson64/workarounds.h
arch/mips/include/asm/mach-malta/irq.h
arch/mips/include/asm/mach-malta/mach-gt64120.h
arch/mips/include/asm/mach-malta/malta-dtshim.h
arch/mips/include/asm/mach-malta/malta-pm.h
arch/mips/include/asm/mach-ralink/irq.h
arch/mips/include/asm/mach-rc32434/dma.h
arch/mips/include/asm/mach-rc32434/dma_v.h
arch/mips/include/asm/mach-rc32434/gpio.h
arch/mips/include/asm/mach-rc32434/irq.h
arch/mips/include/asm/mach-rc32434/rc32434.h
arch/mips/include/asm/mach-tx39xx/mangle-port.h
arch/mips/include/asm/mach-tx49xx/cpu-feature-overrides.h
arch/mips/include/asm/mach-tx49xx/kmalloc.h
arch/mips/include/asm/mach-tx49xx/mangle-port.h
arch/mips/include/asm/mach-vr41xx/irq.h
arch/mips/include/asm/machine.h
arch/mips/include/asm/mips-boards/launch.h
arch/mips/include/asm/mips-cm.h
arch/mips/include/asm/mips-cpc.h
arch/mips/include/asm/mips-cps.h
arch/mips/include/asm/mips-gic.h
arch/mips/include/asm/mips_mt.h
arch/mips/include/asm/mipsmtregs.h
arch/mips/include/asm/mipsprom.h
arch/mips/include/asm/mipsregs.h
arch/mips/include/asm/mmu.h
arch/mips/include/asm/mmzone.h
arch/mips/include/asm/module.h
arch/mips/include/asm/msa.h
arch/mips/include/asm/nile4.h
arch/mips/include/asm/octeon/cvmx-config.h
arch/mips/include/asm/pm-cps.h
arch/mips/include/asm/seccomp.h
arch/mips/include/asm/setup.h
arch/mips/include/asm/sgi/pi1.h
arch/mips/include/asm/smp-cps.h
arch/mips/include/asm/sn/hub.h
arch/mips/include/asm/sn/ioc3.h
arch/mips/include/asm/sn/klkernvars.h
arch/mips/include/asm/sn/mapped_kernel.h
arch/mips/include/asm/sn/sn_private.h
arch/mips/include/asm/sparsemem.h
arch/mips/include/asm/spinlock_types.h
arch/mips/include/asm/spram.h
arch/mips/include/asm/stackframe.h
arch/mips/include/asm/stackprotector.h
arch/mips/include/asm/stacktrace.h
arch/mips/include/asm/thread_info.h
arch/mips/include/asm/tlb.h
arch/mips/include/asm/tlbex.h
arch/mips/include/asm/tlbflush.h
arch/mips/include/asm/tlbmisc.h
arch/mips/include/asm/txx9/boards.h
arch/mips/include/asm/vga.h
arch/mips/include/asm/yamon-dt.h
arch/mips/include/uapi/asm/auxvec.h
arch/mips/include/uapi/asm/bitfield.h
arch/mips/include/uapi/asm/bitsperlong.h
arch/mips/include/uapi/asm/break.h
arch/mips/include/uapi/asm/byteorder.h
arch/mips/include/uapi/asm/cachectl.h
arch/mips/include/uapi/asm/errno.h
arch/mips/include/uapi/asm/fcntl.h
arch/mips/include/uapi/asm/hwcap.h
arch/mips/include/uapi/asm/inst.h
arch/mips/include/uapi/asm/ioctl.h
arch/mips/include/uapi/asm/ioctls.h
arch/mips/include/uapi/asm/kvm.h
arch/mips/include/uapi/asm/mman.h
arch/mips/include/uapi/asm/msgbuf.h
arch/mips/include/uapi/asm/param.h
arch/mips/include/uapi/asm/poll.h
arch/mips/include/uapi/asm/posix_types.h
arch/mips/include/uapi/asm/ptrace.h
arch/mips/include/uapi/asm/reg.h
arch/mips/include/uapi/asm/resource.h
arch/mips/include/uapi/asm/sembuf.h
arch/mips/include/uapi/asm/setup.h
arch/mips/include/uapi/asm/sgidefs.h
arch/mips/include/uapi/asm/shmbuf.h
arch/mips/include/uapi/asm/sigcontext.h
arch/mips/include/uapi/asm/siginfo.h
arch/mips/include/uapi/asm/signal.h
arch/mips/include/uapi/asm/socket.h
arch/mips/include/uapi/asm/sockios.h
arch/mips/include/uapi/asm/stat.h
arch/mips/include/uapi/asm/statfs.h
arch/mips/include/uapi/asm/swab.h
arch/mips/include/uapi/asm/sysmips.h
arch/mips/include/uapi/asm/termbits.h
arch/mips/include/uapi/asm/termios.h
arch/mips/include/uapi/asm/types.h
arch/mips/include/uapi/asm/ucontext.h
arch/mips/include/uapi/asm/unistd.h
arch/mips/jazz/Kconfig
arch/mips/jazz/jazzdma.c
arch/mips/jazz/reset.c
arch/mips/jz4740/Kconfig
arch/mips/jz4740/Makefile
arch/mips/jz4740/reset.h
arch/mips/kernel/Makefile
arch/mips/kernel/asm-offsets.c
arch/mips/kernel/binfmt_elfn32.c
arch/mips/kernel/binfmt_elfo32.c
arch/mips/kernel/cmpxchg.c
arch/mips/kernel/cps-vec-ns16550.S
arch/mips/kernel/cps-vec.S
arch/mips/kernel/crash.c
arch/mips/kernel/crash_dump.c
arch/mips/kernel/elf.c
arch/mips/kernel/ftrace.c
arch/mips/kernel/i8253.c
arch/mips/kernel/linux32.c
arch/mips/kernel/mips-cm.c
arch/mips/kernel/mips-cpc.c
arch/mips/kernel/mips-mt-fpaff.c
arch/mips/kernel/mips-mt.c
arch/mips/kernel/perf_event_mipsxx.c
arch/mips/kernel/pm-cps.c
arch/mips/kernel/probes-common.h
arch/mips/kernel/proc.c
arch/mips/kernel/r2300_switch.S
arch/mips/kernel/relocate.c
arch/mips/kernel/smp-cmp.c
arch/mips/kernel/smp-cps.c
arch/mips/kernel/smp.c
arch/mips/kernel/spinlock_test.c
arch/mips/kernel/sync-r4k.c
arch/mips/kernel/sysrq.c
arch/mips/kernel/topology.c
arch/mips/kernel/uprobes.c
arch/mips/kernel/vmlinux.lds.S
arch/mips/kvm/Kconfig
arch/mips/kvm/Makefile
arch/mips/lantiq/Kconfig
arch/mips/lasat/Kconfig
arch/mips/lasat/Makefile
arch/mips/lasat/at93c.c
arch/mips/lasat/at93c.h
arch/mips/lasat/ds1603.c
arch/mips/lasat/ds1603.h
arch/mips/lasat/image/Makefile
arch/mips/lasat/image/head.S
arch/mips/lasat/lasat_models.h
arch/mips/lasat/picvue.h
arch/mips/lasat/prom.c
arch/mips/lasat/prom.h
arch/mips/lib/Makefile
arch/mips/lib/ashldi3.c
arch/mips/lib/ashrdi3.c
arch/mips/lib/bswapdi.c
arch/mips/lib/bswapsi.c
arch/mips/lib/cmpdi2.c
arch/mips/lib/dump_tlb.c
arch/mips/lib/iomap-pci.c
arch/mips/lib/iomap.c
arch/mips/lib/libgcc.h
arch/mips/lib/lshrdi3.c
arch/mips/lib/r3k_dump_tlb.c
arch/mips/lib/ucmpdi2.c
arch/mips/loongson32/Kconfig
arch/mips/loongson32/common/platform.c
arch/mips/loongson64/Kconfig
arch/mips/loongson64/common/Makefile
arch/mips/loongson64/common/dma-swiotlb.c
arch/mips/loongson64/loongson-3/acpi_init.c
arch/mips/loongson64/loongson-3/hpet.c
arch/mips/loongson64/loongson-3/irq.c
arch/mips/loongson64/loongson-3/smp.h
arch/mips/math-emu/Makefile
arch/mips/math-emu/cp1emu.c
arch/mips/math-emu/dsemul.c
arch/mips/math-emu/me-debugfs.c
arch/mips/mm/Makefile
arch/mips/mm/c-r3k.c
arch/mips/mm/c-tx39.c
arch/mips/mm/gup.c
arch/mips/mm/highmem.c
arch/mips/mm/sc-debugfs.c
arch/mips/mm/sc-ip22.c
arch/mips/mm/sc-mips.c
arch/mips/mm/sc-r5k.c
arch/mips/mm/sc-rm7k.c
arch/mips/mm/tlb-r3k.c
arch/mips/mm/uasm-micromips.c
arch/mips/mti-malta/Makefile
arch/mips/mti-malta/malta-dt.c
arch/mips/mti-malta/malta-dtshim.c
arch/mips/mti-malta/malta-pm.c
arch/mips/net/ebpf_jit.c
arch/mips/netlogic/Kconfig
arch/mips/netlogic/common/Makefile
arch/mips/netlogic/xlp/Makefile
arch/mips/oprofile/Makefile
arch/mips/oprofile/backtrace.c
arch/mips/paravirt/Kconfig
arch/mips/pci/Makefile
arch/mips/pci/fixup-capcella.c
arch/mips/pci/fixup-cobalt.c
arch/mips/pci/fixup-emma2rh.c
arch/mips/pci/fixup-fuloong2e.c
arch/mips/pci/fixup-ip32.c
arch/mips/pci/fixup-jmr3927.c
arch/mips/pci/fixup-lantiq.c
arch/mips/pci/fixup-lemote2f.c
arch/mips/pci/fixup-loongson3.c
arch/mips/pci/fixup-malta.c
arch/mips/pci/fixup-mpc30x.c
arch/mips/pci/fixup-pmcmsp.c
arch/mips/pci/fixup-rbtx4927.c
arch/mips/pci/fixup-rbtx4938.c
arch/mips/pci/fixup-sni.c
arch/mips/pci/fixup-tb0219.c
arch/mips/pci/fixup-tb0226.c
arch/mips/pci/fixup-tb0287.c
arch/mips/pci/ops-loongson3.c
arch/mips/pci/ops-nile4.c
arch/mips/pci/pci-alchemy.c
arch/mips/pci/pci-bcm47xx.c
arch/mips/pci/pci-bcm63xx.h
arch/mips/pci/pci-generic.c
arch/mips/pci/pci-lasat.c
arch/mips/pci/pci-mt7620.c
arch/mips/pci/pci-octeon.c
arch/mips/pci/pci-rt2880.c
arch/mips/pci/pci-rt3883.c
arch/mips/pci/pci-tx4938.c
arch/mips/pci/pci-tx4939.c
arch/mips/pci/pci-xlp.c
arch/mips/pci/pci-xlr.c
arch/mips/pci/pcie-octeon.c
arch/mips/pic32/Kconfig
arch/mips/pistachio/Kconfig
arch/mips/pmcs-msp71xx/Kconfig
arch/mips/pmcs-msp71xx/Makefile
arch/mips/pmcs-msp71xx/msp_smp.c
arch/mips/power/hibernate.c
arch/mips/ralink/Kconfig
arch/mips/rb532/setup.c
arch/mips/sgi-ip22/Makefile
arch/mips/sgi-ip22/ip22-berr.c
arch/mips/sgi-ip22/ip22-hpc.c
arch/mips/sgi-ip22/ip22-int.c
arch/mips/sgi-ip22/ip22-mc.c
arch/mips/sgi-ip22/ip22-nvram.c
arch/mips/sgi-ip22/ip22-platform.c
arch/mips/sgi-ip22/ip22-setup.c
arch/mips/sgi-ip22/ip28-berr.c
arch/mips/sgi-ip27/Kconfig
arch/mips/sgi-ip27/Makefile
arch/mips/sgi-ip27/ip27-irq-pci.c
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-klconfig.c
arch/mips/sgi-ip27/ip27-klnuma.c
arch/mips/sgi-ip27/ip27-nmi.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sibyte/Kconfig
arch/mips/sibyte/Makefile
arch/mips/sibyte/common/cfe_console.c
arch/mips/sibyte/swarm/platform.c
arch/mips/sni/reset.c
arch/mips/sni/time.c
arch/mips/tools/generic-board-config.sh
arch/mips/txx9/Kconfig
arch/mips/txx9/Makefile
arch/mips/txx9/generic/Makefile
arch/mips/txx9/generic/pci.c
arch/mips/vdso/Makefile
arch/mips/vr41xx/Kconfig
arch/mips/xilfpga/Kconfig
arch/mn10300/Kconfig
arch/mn10300/Kconfig.debug
arch/mn10300/boot/compressed/Makefile
arch/mn10300/boot/tools/build.c
arch/mn10300/include/asm/kmap_types.h
arch/mn10300/include/asm/mmu.h
arch/mn10300/include/asm/page_offset.h
arch/mn10300/include/asm/shmparam.h
arch/mn10300/include/asm/spinlock_types.h
arch/mn10300/include/asm/termios.h
arch/mn10300/include/uapi/asm/bitsperlong.h
arch/mn10300/include/uapi/asm/byteorder.h
arch/mn10300/include/uapi/asm/errno.h
arch/mn10300/include/uapi/asm/fcntl.h
arch/mn10300/include/uapi/asm/ioctl.h
arch/mn10300/include/uapi/asm/ioctls.h
arch/mn10300/include/uapi/asm/ipcbuf.h
arch/mn10300/include/uapi/asm/kvm_para.h
arch/mn10300/include/uapi/asm/mman.h
arch/mn10300/include/uapi/asm/msgbuf.h
arch/mn10300/include/uapi/asm/param.h
arch/mn10300/include/uapi/asm/poll.h
arch/mn10300/include/uapi/asm/posix_types.h
arch/mn10300/include/uapi/asm/ptrace.h
arch/mn10300/include/uapi/asm/resource.h
arch/mn10300/include/uapi/asm/sembuf.h
arch/mn10300/include/uapi/asm/setup.h
arch/mn10300/include/uapi/asm/shmbuf.h
arch/mn10300/include/uapi/asm/sigcontext.h
arch/mn10300/include/uapi/asm/signal.h
arch/mn10300/include/uapi/asm/socket.h
arch/mn10300/include/uapi/asm/sockios.h
arch/mn10300/include/uapi/asm/stat.h
arch/mn10300/include/uapi/asm/swab.h
arch/mn10300/include/uapi/asm/termbits.h
arch/mn10300/include/uapi/asm/termios.h
arch/mn10300/include/uapi/asm/types.h
arch/mn10300/include/uapi/asm/unistd.h
arch/mn10300/kernel/Makefile
arch/mn10300/kernel/asm-offsets.c
arch/mn10300/kernel/gdb-stub.c
arch/mn10300/kernel/process.c
arch/mn10300/mm/Kconfig.cache
arch/mn10300/mm/Makefile
arch/mn10300/oprofile/Makefile
arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h
arch/mn10300/proc-mn2ws0050/include/proc/intctl-regs.h
arch/mn10300/unit-asb2364/include/unit/fpga-regs.h
arch/nios2/Kconfig
arch/nios2/Kconfig.debug
arch/nios2/boot/compressed/Makefile
arch/nios2/include/uapi/asm/byteorder.h
arch/nios2/include/uapi/asm/elf.h
arch/nios2/include/uapi/asm/ptrace.h
arch/nios2/include/uapi/asm/sigcontext.h
arch/nios2/include/uapi/asm/signal.h
arch/nios2/include/uapi/asm/swab.h
arch/nios2/include/uapi/asm/unistd.h
arch/nios2/kernel/Makefile
arch/nios2/mm/Makefile
arch/openrisc/Kconfig
arch/openrisc/boot/dts/Makefile
arch/openrisc/boot/dts/or1ksim.dts
arch/openrisc/include/asm/futex.h
arch/openrisc/include/asm/string.h
arch/openrisc/include/uapi/asm/elf.h
arch/openrisc/include/uapi/asm/param.h
arch/openrisc/include/uapi/asm/ptrace.h
arch/openrisc/include/uapi/asm/sigcontext.h
arch/openrisc/include/uapi/asm/unistd.h
arch/openrisc/kernel/Makefile
arch/openrisc/kernel/vmlinux.h
arch/openrisc/lib/memcpy.c
arch/parisc/Kconfig
arch/parisc/Kconfig.debug
arch/parisc/Makefile
arch/parisc/boot/compressed/Makefile
arch/parisc/boot/compressed/misc.c
arch/parisc/include/asm/agp.h
arch/parisc/include/asm/atomic.h
arch/parisc/include/asm/bitops.h
arch/parisc/include/asm/bug.h
arch/parisc/include/asm/bugs.h
arch/parisc/include/asm/cache.h
arch/parisc/include/asm/cacheflush.h
arch/parisc/include/asm/checksum.h
arch/parisc/include/asm/cmpxchg.h
arch/parisc/include/asm/compat.h
arch/parisc/include/asm/compat_ucontext.h
arch/parisc/include/asm/delay.h
arch/parisc/include/asm/dma-mapping.h
arch/parisc/include/asm/dma.h
arch/parisc/include/asm/elf.h
arch/parisc/include/asm/fb.h
arch/parisc/include/asm/fixmap.h
arch/parisc/include/asm/ftrace.h
arch/parisc/include/asm/futex.h
arch/parisc/include/asm/hardirq.h
arch/parisc/include/asm/hardware.h
arch/parisc/include/asm/hash.h
arch/parisc/include/asm/hugetlb.h
arch/parisc/include/asm/ide.h
arch/parisc/include/asm/io.h
arch/parisc/include/asm/irq.h
arch/parisc/include/asm/irqflags.h
arch/parisc/include/asm/kbdleds.h
arch/parisc/include/asm/kmap_types.h
arch/parisc/include/asm/ldcw.h
arch/parisc/include/asm/led.h
arch/parisc/include/asm/linkage.h
arch/parisc/include/asm/machdep.h
arch/parisc/include/asm/mckinley.h
arch/parisc/include/asm/mmu.h
arch/parisc/include/asm/mmu_context.h
arch/parisc/include/asm/mmzone.h
arch/parisc/include/asm/module.h
arch/parisc/include/asm/page.h
arch/parisc/include/asm/parisc-device.h
arch/parisc/include/asm/parport.h
arch/parisc/include/asm/pci.h
arch/parisc/include/asm/pdc.h
arch/parisc/include/asm/perf.h
arch/parisc/include/asm/pgalloc.h
arch/parisc/include/asm/pgtable.h
arch/parisc/include/asm/prefetch.h
arch/parisc/include/asm/processor.h
arch/parisc/include/asm/psw.h
arch/parisc/include/asm/ptrace.h
arch/parisc/include/asm/ropes.h
arch/parisc/include/asm/rt_sigframe.h
arch/parisc/include/asm/runway.h
arch/parisc/include/asm/sections.h
arch/parisc/include/asm/shmparam.h
arch/parisc/include/asm/signal.h
arch/parisc/include/asm/smp.h
arch/parisc/include/asm/socket.h
arch/parisc/include/asm/special_insns.h
arch/parisc/include/asm/spinlock.h
arch/parisc/include/asm/spinlock_types.h
arch/parisc/include/asm/string.h
arch/parisc/include/asm/superio.h
arch/parisc/include/asm/switch_to.h
arch/parisc/include/asm/syscall.h
arch/parisc/include/asm/termios.h
arch/parisc/include/asm/thread_info.h
arch/parisc/include/asm/timex.h
arch/parisc/include/asm/tlb.h
arch/parisc/include/asm/tlbflush.h
arch/parisc/include/asm/traps.h
arch/parisc/include/asm/uaccess.h
arch/parisc/include/asm/ucontext.h
arch/parisc/include/asm/unaligned.h
arch/parisc/include/asm/unistd.h
arch/parisc/include/asm/unwind.h
arch/parisc/include/uapi/asm/bitsperlong.h
arch/parisc/include/uapi/asm/byteorder.h
arch/parisc/include/uapi/asm/errno.h
arch/parisc/include/uapi/asm/fcntl.h
arch/parisc/include/uapi/asm/ioctl.h
arch/parisc/include/uapi/asm/ioctls.h
arch/parisc/include/uapi/asm/ipcbuf.h
arch/parisc/include/uapi/asm/mman.h
arch/parisc/include/uapi/asm/msgbuf.h
arch/parisc/include/uapi/asm/pdc.h
arch/parisc/include/uapi/asm/posix_types.h
arch/parisc/include/uapi/asm/ptrace.h
arch/parisc/include/uapi/asm/sembuf.h
arch/parisc/include/uapi/asm/setup.h
arch/parisc/include/uapi/asm/shmbuf.h
arch/parisc/include/uapi/asm/sigcontext.h
arch/parisc/include/uapi/asm/siginfo.h
arch/parisc/include/uapi/asm/signal.h
arch/parisc/include/uapi/asm/socket.h
arch/parisc/include/uapi/asm/sockios.h
arch/parisc/include/uapi/asm/stat.h
arch/parisc/include/uapi/asm/statfs.h
arch/parisc/include/uapi/asm/swab.h
arch/parisc/include/uapi/asm/termbits.h
arch/parisc/include/uapi/asm/termios.h
arch/parisc/include/uapi/asm/types.h
arch/parisc/include/uapi/asm/unistd.h
arch/parisc/kernel/Makefile
arch/parisc/kernel/audit.c
arch/parisc/kernel/binfmt_elf32.c
arch/parisc/kernel/compat_audit.c
arch/parisc/kernel/firmware.c
arch/parisc/kernel/ftrace.c
arch/parisc/kernel/pa7300lc.c
arch/parisc/kernel/parisc_ksyms.c
arch/parisc/kernel/pci-dma.c
arch/parisc/kernel/pdt.c
arch/parisc/kernel/process.c
arch/parisc/kernel/processor.c
arch/parisc/kernel/ptrace.c
arch/parisc/kernel/setup.c
arch/parisc/kernel/signal.c
arch/parisc/kernel/smp.c
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/syscall.S
arch/parisc/kernel/time.c
arch/parisc/kernel/traps.c
arch/parisc/kernel/unwind.c
arch/parisc/kernel/vmlinux.lds.S
arch/parisc/lib/bitops.c
arch/parisc/lib/delay.c
arch/parisc/lib/io.c
arch/parisc/lib/iomap.c
arch/parisc/lib/ucmpdi2.c
arch/parisc/math-emu/Makefile
arch/parisc/mm/fault.c
arch/parisc/mm/hugetlbpage.c
arch/parisc/mm/init.c
arch/parisc/mm/ioremap.c
arch/parisc/oprofile/Makefile
arch/powerpc/Kconfig
arch/powerpc/Kconfig.debug
arch/powerpc/Makefile.postlink
arch/powerpc/boot/Makefile
arch/powerpc/boot/cpm-serial.c
arch/powerpc/boot/cuboot.h
arch/powerpc/boot/dcr.h
arch/powerpc/boot/dts/virtex440-ml510.dts
arch/powerpc/boot/elf.h
arch/powerpc/boot/epapr-wrapper.c
arch/powerpc/boot/fixed-head.S
arch/powerpc/boot/fsl-soc.h
arch/powerpc/boot/io.h
arch/powerpc/boot/libfdt_env.h
arch/powerpc/boot/mktree.c
arch/powerpc/boot/motload-head.S
arch/powerpc/boot/mpc52xx-psc.c
arch/powerpc/boot/mpc8xx.h
arch/powerpc/boot/ns16550.c
arch/powerpc/boot/of.h
arch/powerpc/boot/planetcore.h
arch/powerpc/boot/pq2.h
arch/powerpc/boot/pseries-head.S
arch/powerpc/boot/redboot.h
arch/powerpc/boot/rs6000.h
arch/powerpc/boot/stdio.h
arch/powerpc/boot/stdlib.h
arch/powerpc/boot/string.h
arch/powerpc/boot/swab.h
arch/powerpc/boot/types.h
arch/powerpc/boot/virtex405-head.S
arch/powerpc/boot/xz_config.h
arch/powerpc/boot/zImage.coff.lds.S
arch/powerpc/boot/zImage.lds.S
arch/powerpc/boot/zImage.ps3.lds.S
arch/powerpc/configs/g5_defconfig
arch/powerpc/configs/gamecube_defconfig
arch/powerpc/configs/pasemi_defconfig
arch/powerpc/configs/pmac32_defconfig
arch/powerpc/configs/ppc64_defconfig
arch/powerpc/configs/ppc64e_defconfig
arch/powerpc/configs/ppc6xx_defconfig
arch/powerpc/configs/wii_defconfig
arch/powerpc/crypto/Makefile
arch/powerpc/crypto/sha1-powerpc-asm.S
arch/powerpc/include/asm/agp.h
arch/powerpc/include/asm/archrandom.h
arch/powerpc/include/asm/atomic.h
arch/powerpc/include/asm/backlight.h
arch/powerpc/include/asm/barrier.h
arch/powerpc/include/asm/book3s/32/hash.h
arch/powerpc/include/asm/book3s/32/mmu-hash.h
arch/powerpc/include/asm/book3s/32/pgalloc.h
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/book3s/64/hash-4k.h
arch/powerpc/include/asm/book3s/64/hash-64k.h
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/book3s/64/hugetlb.h
arch/powerpc/include/asm/book3s/64/mmu.h
arch/powerpc/include/asm/book3s/64/pgtable-4k.h
arch/powerpc/include/asm/book3s/64/pgtable-64k.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/book3s/64/radix-4k.h
arch/powerpc/include/asm/book3s/64/radix-64k.h
arch/powerpc/include/asm/book3s/64/radix.h
arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
arch/powerpc/include/asm/book3s/64/tlbflush-radix.h
arch/powerpc/include/asm/book3s/64/tlbflush.h
arch/powerpc/include/asm/book3s/pgalloc.h
arch/powerpc/include/asm/book3s/pgtable.h
arch/powerpc/include/asm/bootx.h
arch/powerpc/include/asm/btext.h
arch/powerpc/include/asm/bug.h
arch/powerpc/include/asm/cache.h
arch/powerpc/include/asm/cell-regs.h
arch/powerpc/include/asm/cmpxchg.h
arch/powerpc/include/asm/code-patching.h
arch/powerpc/include/asm/compat.h
arch/powerpc/include/asm/context_tracking.h
arch/powerpc/include/asm/cpm.h
arch/powerpc/include/asm/cpm1.h
arch/powerpc/include/asm/cpm2.h
arch/powerpc/include/asm/cpu_has_feature.h
arch/powerpc/include/asm/cpuidle.h
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/cputhreads.h
arch/powerpc/include/asm/dbdma.h
arch/powerpc/include/asm/dcr-regs.h
arch/powerpc/include/asm/debug.h
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/include/asm/dma.h
arch/powerpc/include/asm/dt_cpu_ftrs.h
arch/powerpc/include/asm/exec.h
arch/powerpc/include/asm/extable.h
arch/powerpc/include/asm/fb.h
arch/powerpc/include/asm/ftrace.h
arch/powerpc/include/asm/futex.h
arch/powerpc/include/asm/grackle.h
arch/powerpc/include/asm/hardirq.h
arch/powerpc/include/asm/head-64.h
arch/powerpc/include/asm/heathrow.h
arch/powerpc/include/asm/highmem.h
arch/powerpc/include/asm/hugetlb.h
arch/powerpc/include/asm/hvcall.h
arch/powerpc/include/asm/hvsi.h
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/include/asm/i8259.h
arch/powerpc/include/asm/ide.h
arch/powerpc/include/asm/ima.h
arch/powerpc/include/asm/immap_cpm2.h
arch/powerpc/include/asm/io-defs.h
arch/powerpc/include/asm/irq_work.h
arch/powerpc/include/asm/irqflags.h
arch/powerpc/include/asm/isa-bridge.h
arch/powerpc/include/asm/kdebug.h
arch/powerpc/include/asm/kdump.h
arch/powerpc/include/asm/kexec.h
arch/powerpc/include/asm/keylargo.h
arch/powerpc/include/asm/libata-portmap.h
arch/powerpc/include/asm/linkage.h
arch/powerpc/include/asm/local.h
arch/powerpc/include/asm/macio.h
arch/powerpc/include/asm/mediabay.h
arch/powerpc/include/asm/mmu-40x.h
arch/powerpc/include/asm/mmu-44x.h
arch/powerpc/include/asm/mmu-8xx.h
arch/powerpc/include/asm/mmu-book3e.h
arch/powerpc/include/asm/mmu.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/include/asm/mmzone.h
arch/powerpc/include/asm/mpc6xx.h
arch/powerpc/include/asm/mpc8260.h
arch/powerpc/include/asm/mpic.h
arch/powerpc/include/asm/nmi.h
arch/powerpc/include/asm/nohash/32/pgalloc.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/include/asm/nohash/32/pte-40x.h
arch/powerpc/include/asm/nohash/32/pte-44x.h
arch/powerpc/include/asm/nohash/32/pte-8xx.h
arch/powerpc/include/asm/nohash/32/pte-fsl-booke.h
arch/powerpc/include/asm/nohash/64/pgtable-4k.h
arch/powerpc/include/asm/nohash/64/pgtable-64k.h
arch/powerpc/include/asm/nohash/64/pgtable.h
arch/powerpc/include/asm/nohash/pgalloc.h
arch/powerpc/include/asm/nohash/pgtable.h
arch/powerpc/include/asm/nohash/pte-book3e.h
arch/powerpc/include/asm/ohare.h
arch/powerpc/include/asm/page_32.h
arch/powerpc/include/asm/parport.h
arch/powerpc/include/asm/percpu.h
arch/powerpc/include/asm/pgalloc.h
arch/powerpc/include/asm/pgtable-be-types.h
arch/powerpc/include/asm/pgtable-types.h
arch/powerpc/include/asm/pgtable.h
arch/powerpc/include/asm/plpar_wrappers.h
arch/powerpc/include/asm/pmac_pfunc.h
arch/powerpc/include/asm/pte-common.h
arch/powerpc/include/asm/reg.h
arch/powerpc/include/asm/reg_8xx.h
arch/powerpc/include/asm/reg_fsl_emb.h
arch/powerpc/include/asm/runlatch.h
arch/powerpc/include/asm/seccomp.h
arch/powerpc/include/asm/sections.h
arch/powerpc/include/asm/setup.h
arch/powerpc/include/asm/shmparam.h
arch/powerpc/include/asm/signal.h
arch/powerpc/include/asm/smu.h
arch/powerpc/include/asm/sparsemem.h
arch/powerpc/include/asm/spinlock_types.h
arch/powerpc/include/asm/string.h
arch/powerpc/include/asm/switch_to.h
arch/powerpc/include/asm/synch.h
arch/powerpc/include/asm/syscalls.h
arch/powerpc/include/asm/systbl.h
arch/powerpc/include/asm/thread_info.h
arch/powerpc/include/asm/timex.h
arch/powerpc/include/asm/tm.h
arch/powerpc/include/asm/topology.h
arch/powerpc/include/asm/trace.h
arch/powerpc/include/asm/uaccess.h
arch/powerpc/include/asm/unaligned.h
arch/powerpc/include/asm/uninorth.h
arch/powerpc/include/asm/user.h
arch/powerpc/include/asm/vdso.h
arch/powerpc/include/asm/vga.h
arch/powerpc/include/asm/xics.h
arch/powerpc/include/uapi/asm/auxvec.h
arch/powerpc/include/uapi/asm/bitsperlong.h
arch/powerpc/include/uapi/asm/bootx.h
arch/powerpc/include/uapi/asm/byteorder.h
arch/powerpc/include/uapi/asm/cputable.h
arch/powerpc/include/uapi/asm/eeh.h
arch/powerpc/include/uapi/asm/elf.h
arch/powerpc/include/uapi/asm/epapr_hcalls.h
arch/powerpc/include/uapi/asm/errno.h
arch/powerpc/include/uapi/asm/fcntl.h
arch/powerpc/include/uapi/asm/ioctl.h
arch/powerpc/include/uapi/asm/ioctls.h
arch/powerpc/include/uapi/asm/ipcbuf.h
arch/powerpc/include/uapi/asm/kvm.h
arch/powerpc/include/uapi/asm/kvm_para.h
arch/powerpc/include/uapi/asm/mman.h
arch/powerpc/include/uapi/asm/msgbuf.h
arch/powerpc/include/uapi/asm/nvram.h
arch/powerpc/include/uapi/asm/opal-prd.h
arch/powerpc/include/uapi/asm/perf_event.h
arch/powerpc/include/uapi/asm/perf_regs.h
arch/powerpc/include/uapi/asm/posix_types.h
arch/powerpc/include/uapi/asm/ps3fb.h
arch/powerpc/include/uapi/asm/ptrace.h
arch/powerpc/include/uapi/asm/sembuf.h
arch/powerpc/include/uapi/asm/setup.h
arch/powerpc/include/uapi/asm/shmbuf.h
arch/powerpc/include/uapi/asm/sigcontext.h
arch/powerpc/include/uapi/asm/siginfo.h
arch/powerpc/include/uapi/asm/signal.h
arch/powerpc/include/uapi/asm/socket.h
arch/powerpc/include/uapi/asm/spu_info.h
arch/powerpc/include/uapi/asm/stat.h
arch/powerpc/include/uapi/asm/swab.h
arch/powerpc/include/uapi/asm/termbits.h
arch/powerpc/include/uapi/asm/termios.h
arch/powerpc/include/uapi/asm/tm.h
arch/powerpc/include/uapi/asm/types.h
arch/powerpc/include/uapi/asm/ucontext.h
arch/powerpc/include/uapi/asm/unistd.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/align.c
arch/powerpc/kernel/audit.c
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/cacheinfo.h
arch/powerpc/kernel/compat_audit.c
arch/powerpc/kernel/dma-iommu.c
arch/powerpc/kernel/dt_cpu_ftrs.c
arch/powerpc/kernel/eeh.c
arch/powerpc/kernel/eeh_dev.c
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/fsl_booke_entry_mapping.S
arch/powerpc/kernel/head_booke.h
arch/powerpc/kernel/iomap.c
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/legacy_serial.c
arch/powerpc/kernel/mce_power.c
arch/powerpc/kernel/optprobes.c
arch/powerpc/kernel/prom_parse.c
arch/powerpc/kernel/ptrace.c
arch/powerpc/kernel/rtas-proc.c
arch/powerpc/kernel/rtas-rtc.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/signal_64.c
arch/powerpc/kernel/smp-tbsync.c
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/kernel/swsusp_booke.S
arch/powerpc/kernel/tau_6xx.c
arch/powerpc/kernel/tm.S
arch/powerpc/kernel/trace/Makefile
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/kernel/trace/ftrace_64_mprofile.S
arch/powerpc/kernel/traps.c
arch/powerpc/kernel/vdso32/Makefile
arch/powerpc/kernel/vdso32/vdso32.lds.S
arch/powerpc/kernel/vdso32/vdso32_wrapper.S
arch/powerpc/kernel/vdso64/Makefile
arch/powerpc/kernel/vdso64/vdso64.lds.S
arch/powerpc/kernel/vdso64/vdso64_wrapper.S
arch/powerpc/kernel/vecemu.c
arch/powerpc/kernel/vector.S
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/kernel/watchdog.c
arch/powerpc/kvm/Kconfig
arch/powerpc/kvm/Makefile
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_hv_rm_xive.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_xive.c
arch/powerpc/kvm/book3s_xive.h
arch/powerpc/kvm/irq.h
arch/powerpc/kvm/powerpc.c
arch/powerpc/kvm/trace.h
arch/powerpc/kvm/trace_book3s.h
arch/powerpc/kvm/trace_booke.h
arch/powerpc/kvm/trace_hv.h
arch/powerpc/kvm/trace_pr.h
arch/powerpc/lib/Makefile
arch/powerpc/lib/alloc.c
arch/powerpc/lib/sstep.c
arch/powerpc/lib/xor_vmx.h
arch/powerpc/math-emu/Makefile
arch/powerpc/math-emu/fabs.c
arch/powerpc/math-emu/fadd.c
arch/powerpc/math-emu/fadds.c
arch/powerpc/math-emu/fcmpo.c
arch/powerpc/math-emu/fcmpu.c
arch/powerpc/math-emu/fctiw.c
arch/powerpc/math-emu/fctiwz.c
arch/powerpc/math-emu/fdiv.c
arch/powerpc/math-emu/fdivs.c
arch/powerpc/math-emu/fmadd.c
arch/powerpc/math-emu/fmadds.c
arch/powerpc/math-emu/fmr.c
arch/powerpc/math-emu/fmsub.c
arch/powerpc/math-emu/fmsubs.c
arch/powerpc/math-emu/fmul.c
arch/powerpc/math-emu/fmuls.c
arch/powerpc/math-emu/fnabs.c
arch/powerpc/math-emu/fneg.c
arch/powerpc/math-emu/fnmadd.c
arch/powerpc/math-emu/fnmadds.c
arch/powerpc/math-emu/fnmsub.c
arch/powerpc/math-emu/fnmsubs.c
arch/powerpc/math-emu/fre.c
arch/powerpc/math-emu/fres.c
arch/powerpc/math-emu/frsp.c
arch/powerpc/math-emu/frsqrte.c
arch/powerpc/math-emu/frsqrtes.c
arch/powerpc/math-emu/fsel.c
arch/powerpc/math-emu/fsqrt.c
arch/powerpc/math-emu/fsqrts.c
arch/powerpc/math-emu/fsub.c
arch/powerpc/math-emu/fsubs.c
arch/powerpc/math-emu/lfd.c
arch/powerpc/math-emu/lfs.c
arch/powerpc/math-emu/math.c
arch/powerpc/math-emu/mcrfs.c
arch/powerpc/math-emu/mffs.c
arch/powerpc/math-emu/mtfsb0.c
arch/powerpc/math-emu/mtfsb1.c
arch/powerpc/math-emu/mtfsf.c
arch/powerpc/math-emu/mtfsfi.c
arch/powerpc/math-emu/stfd.c
arch/powerpc/math-emu/stfiwx.c
arch/powerpc/math-emu/stfs.c
arch/powerpc/math-emu/udivmodti4.c
arch/powerpc/mm/Makefile
arch/powerpc/mm/highmem.c
arch/powerpc/mm/hugetlbpage-book3e.c
arch/powerpc/mm/hugetlbpage-hash64.c
arch/powerpc/mm/hugetlbpage-radix.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/mm/tlb-radix.c
arch/powerpc/mm/vphn.c
arch/powerpc/mm/vphn.h
arch/powerpc/net/Makefile
arch/powerpc/oprofile/Makefile
arch/powerpc/perf/Makefile
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/hv-24x7-catalog.h
arch/powerpc/perf/hv-24x7-domains.h
arch/powerpc/perf/hv-24x7.h
arch/powerpc/perf/hv-common.c
arch/powerpc/perf/hv-common.h
arch/powerpc/perf/hv-gpci-requests.h
arch/powerpc/perf/hv-gpci.h
arch/powerpc/perf/imc-pmu.c
arch/powerpc/perf/req-gen/_begin.h
arch/powerpc/perf/req-gen/_clear.h
arch/powerpc/perf/req-gen/_request-begin.h
arch/powerpc/perf/req-gen/_request-end.h
arch/powerpc/perf/req-gen/perf.h
arch/powerpc/platforms/40x/Kconfig
arch/powerpc/platforms/44x/44x.h
arch/powerpc/platforms/44x/Kconfig
arch/powerpc/platforms/44x/Makefile
arch/powerpc/platforms/44x/virtex_ml510.c
arch/powerpc/platforms/512x/Kconfig
arch/powerpc/platforms/512x/Makefile
arch/powerpc/platforms/52xx/Kconfig
arch/powerpc/platforms/52xx/Makefile
arch/powerpc/platforms/52xx/lite5200_pm.c
arch/powerpc/platforms/52xx/lite5200_sleep.S
arch/powerpc/platforms/52xx/mpc52xx_pm.c
arch/powerpc/platforms/52xx/mpc52xx_sleep.S
arch/powerpc/platforms/82xx/Kconfig
arch/powerpc/platforms/82xx/Makefile
arch/powerpc/platforms/82xx/pq2.h
arch/powerpc/platforms/83xx/Kconfig
arch/powerpc/platforms/83xx/Makefile
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/85xx/Kconfig
arch/powerpc/platforms/85xx/Makefile
arch/powerpc/platforms/85xx/mpc85xx.h
arch/powerpc/platforms/85xx/smp.h
arch/powerpc/platforms/86xx/Kconfig
arch/powerpc/platforms/86xx/Makefile
arch/powerpc/platforms/8xx/Kconfig
arch/powerpc/platforms/8xx/Makefile
arch/powerpc/platforms/8xx/m8xx_setup.c
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/Makefile
arch/powerpc/platforms/amigaone/Kconfig
arch/powerpc/platforms/cell/Kconfig
arch/powerpc/platforms/cell/Makefile
arch/powerpc/platforms/cell/interrupt.h
arch/powerpc/platforms/cell/ras.h
arch/powerpc/platforms/cell/spufs/Makefile
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/sputrace.h
arch/powerpc/platforms/cell/spufs/syscalls.c
arch/powerpc/platforms/chrp/Kconfig
arch/powerpc/platforms/chrp/chrp.h
arch/powerpc/platforms/chrp/pci.c
arch/powerpc/platforms/chrp/pegasos_eth.c
arch/powerpc/platforms/chrp/setup.c
arch/powerpc/platforms/chrp/smp.c
arch/powerpc/platforms/chrp/time.c
arch/powerpc/platforms/embedded6xx/Kconfig
arch/powerpc/platforms/embedded6xx/Makefile
arch/powerpc/platforms/maple/Kconfig
arch/powerpc/platforms/maple/maple.h
arch/powerpc/platforms/pasemi/Kconfig
arch/powerpc/platforms/pasemi/pasemi.h
arch/powerpc/platforms/powermac/Kconfig
arch/powerpc/platforms/powermac/Makefile
arch/powerpc/platforms/powermac/pfunc_base.c
arch/powerpc/platforms/powermac/pmac.h
arch/powerpc/platforms/powermac/time.c
arch/powerpc/platforms/powermac/udbg_adb.c
arch/powerpc/platforms/powernv/Kconfig
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/opal-tracepoints.c
arch/powerpc/platforms/powernv/pci.h
arch/powerpc/platforms/powernv/powernv.h
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/ps3/Kconfig
arch/powerpc/platforms/ps3/Makefile
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/dlpar.c
arch/powerpc/platforms/pseries/hotplug-cpu.c
arch/powerpc/platforms/pseries/mobility.c
arch/powerpc/platforms/pseries/of_helpers.c
arch/powerpc/platforms/pseries/of_helpers.h
arch/powerpc/platforms/pseries/offline_states.h
arch/powerpc/purgatory/Makefile
arch/powerpc/sysdev/Kconfig
arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/cpm1.c
arch/powerpc/sysdev/cpm2_pic.h
arch/powerpc/sysdev/fsl_rio.c
arch/powerpc/sysdev/fsl_rmu.c
arch/powerpc/sysdev/fsl_soc.h
arch/powerpc/sysdev/ge/ge_pic.h
arch/powerpc/sysdev/micropatch.c
arch/powerpc/sysdev/mpc5xxx_clocks.c
arch/powerpc/sysdev/mv64x60.h
arch/powerpc/sysdev/simple_gpio.h
arch/powerpc/sysdev/xics/Kconfig
arch/powerpc/sysdev/xics/Makefile
arch/powerpc/sysdev/xics/ics-rtas.c
arch/powerpc/sysdev/xive/Kconfig
arch/powerpc/sysdev/xive/common.c
arch/powerpc/sysdev/xive/spapr.c
arch/powerpc/tools/gcc-check-mprofile-kernel.sh
arch/powerpc/xmon/Makefile
arch/powerpc/xmon/nonstdio.h
arch/powerpc/xmon/spr_access.S
arch/s390/Kconfig
arch/s390/Kconfig.debug
arch/s390/appldata/appldata.h
arch/s390/boot/Makefile
arch/s390/boot/compressed/Makefile
arch/s390/boot/compressed/head.S
arch/s390/boot/compressed/misc.c
arch/s390/boot/compressed/vmlinux.lds.S
arch/s390/configs/zfcpdump_defconfig
arch/s390/crypto/Makefile
arch/s390/crypto/crc32be-vx.S
arch/s390/crypto/crc32le-vx.S
arch/s390/hypfs/hypfs.h
arch/s390/hypfs/hypfs_dbfs.c
arch/s390/hypfs/hypfs_diag.c
arch/s390/hypfs/hypfs_diag0c.c
arch/s390/hypfs/hypfs_sprp.c
arch/s390/hypfs/hypfs_vm.c
arch/s390/include/asm/airq.h
arch/s390/include/asm/appldata.h
arch/s390/include/asm/archrandom.h
arch/s390/include/asm/asm-prototypes.h
arch/s390/include/asm/atomic.h
arch/s390/include/asm/atomic_ops.h
arch/s390/include/asm/barrier.h
arch/s390/include/asm/bitops.h
arch/s390/include/asm/bug.h
arch/s390/include/asm/cache.h
arch/s390/include/asm/ccwdev.h
arch/s390/include/asm/ccwgroup.h
arch/s390/include/asm/checksum.h
arch/s390/include/asm/chpid.h
arch/s390/include/asm/cio.h
arch/s390/include/asm/clp.h
arch/s390/include/asm/cmb.h
arch/s390/include/asm/cmpxchg.h
arch/s390/include/asm/compat.h
arch/s390/include/asm/cpacf.h
arch/s390/include/asm/cpcmd.h
arch/s390/include/asm/cpu.h
arch/s390/include/asm/cpufeature.h
arch/s390/include/asm/cputime.h
arch/s390/include/asm/crw.h
arch/s390/include/asm/css_chars.h
arch/s390/include/asm/ctl_reg.h
arch/s390/include/asm/current.h
arch/s390/include/asm/debug.h
arch/s390/include/asm/delay.h
arch/s390/include/asm/diag.h
arch/s390/include/asm/dis.h
arch/s390/include/asm/dma-mapping.h
arch/s390/include/asm/dma.h
arch/s390/include/asm/eadm.h
arch/s390/include/asm/ebcdic.h
arch/s390/include/asm/elf.h
arch/s390/include/asm/exec.h
arch/s390/include/asm/extable.h
arch/s390/include/asm/extmem.h
arch/s390/include/asm/facility.h
arch/s390/include/asm/fcx.h
arch/s390/include/asm/fpu/api.h
arch/s390/include/asm/fpu/internal.h
arch/s390/include/asm/fpu/types.h
arch/s390/include/asm/ftrace.h
arch/s390/include/asm/futex.h
arch/s390/include/asm/gmap.h
arch/s390/include/asm/hardirq.h
arch/s390/include/asm/hugetlb.h
arch/s390/include/asm/hw_irq.h
arch/s390/include/asm/idals.h
arch/s390/include/asm/idle.h
arch/s390/include/asm/io.h
arch/s390/include/asm/ipl.h
arch/s390/include/asm/irq.h
arch/s390/include/asm/irqflags.h
arch/s390/include/asm/isc.h
arch/s390/include/asm/itcw.h
arch/s390/include/asm/jump_label.h
arch/s390/include/asm/kdebug.h
arch/s390/include/asm/kexec.h
arch/s390/include/asm/linkage.h
arch/s390/include/asm/lowcore.h
arch/s390/include/asm/mmu.h
arch/s390/include/asm/mmu_context.h
arch/s390/include/asm/mmzone.h
arch/s390/include/asm/module.h
arch/s390/include/asm/nmi.h
arch/s390/include/asm/numa.h
arch/s390/include/asm/os_info.h
arch/s390/include/asm/page-states.h
arch/s390/include/asm/page.h
arch/s390/include/asm/pci.h
arch/s390/include/asm/pci_clp.h
arch/s390/include/asm/pci_debug.h
arch/s390/include/asm/pci_dma.h
arch/s390/include/asm/pci_insn.h
arch/s390/include/asm/pci_io.h
arch/s390/include/asm/percpu.h
arch/s390/include/asm/perf_event.h
arch/s390/include/asm/pgalloc.h
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/pkey.h
arch/s390/include/asm/preempt.h
arch/s390/include/asm/processor.h
arch/s390/include/asm/ptrace.h
arch/s390/include/asm/qdio.h
arch/s390/include/asm/reset.h
arch/s390/include/asm/runtime_instr.h
arch/s390/include/asm/rwsem.h
arch/s390/include/asm/schid.h
arch/s390/include/asm/sclp.h
arch/s390/include/asm/scsw.h
arch/s390/include/asm/seccomp.h
arch/s390/include/asm/sections.h
arch/s390/include/asm/serial.h
arch/s390/include/asm/set_memory.h
arch/s390/include/asm/setup.h
arch/s390/include/asm/shmparam.h
arch/s390/include/asm/signal.h
arch/s390/include/asm/sigp.h
arch/s390/include/asm/smp.h
arch/s390/include/asm/sparsemem.h
arch/s390/include/asm/spinlock.h
arch/s390/include/asm/spinlock_types.h
arch/s390/include/asm/stp.h
arch/s390/include/asm/string.h
arch/s390/include/asm/switch_to.h
arch/s390/include/asm/termios.h
arch/s390/include/asm/thread_info.h
arch/s390/include/asm/timex.h
arch/s390/include/asm/tlb.h
arch/s390/include/asm/tlbflush.h
arch/s390/include/asm/topology.h
arch/s390/include/asm/trace/diag.h
arch/s390/include/asm/trace/zcrypt.h
arch/s390/include/asm/uaccess.h
arch/s390/include/asm/unistd.h
arch/s390/include/asm/uprobes.h
arch/s390/include/asm/user.h
arch/s390/include/asm/vdso.h
arch/s390/include/asm/vtime.h
arch/s390/include/asm/vtimer.h
arch/s390/include/asm/vx-insn.h
arch/s390/include/asm/xor.h
arch/s390/include/uapi/asm/auxvec.h
arch/s390/include/uapi/asm/bitsperlong.h
arch/s390/include/uapi/asm/byteorder.h
arch/s390/include/uapi/asm/chpid.h
arch/s390/include/uapi/asm/chsc.h
arch/s390/include/uapi/asm/clp.h
arch/s390/include/uapi/asm/cmb.h
arch/s390/include/uapi/asm/dasd.h
arch/s390/include/uapi/asm/debug.h
arch/s390/include/uapi/asm/guarded_storage.h
arch/s390/include/uapi/asm/hypfs.h
arch/s390/include/uapi/asm/ioctls.h
arch/s390/include/uapi/asm/ipcbuf.h
arch/s390/include/uapi/asm/kvm.h
arch/s390/include/uapi/asm/kvm_para.h
arch/s390/include/uapi/asm/kvm_perf.h
arch/s390/include/uapi/asm/kvm_virtio.h
arch/s390/include/uapi/asm/monwriter.h
arch/s390/include/uapi/asm/msgbuf.h
arch/s390/include/uapi/asm/pkey.h
arch/s390/include/uapi/asm/posix_types.h
arch/s390/include/uapi/asm/ptrace.h
arch/s390/include/uapi/asm/qeth.h
arch/s390/include/uapi/asm/schid.h
arch/s390/include/uapi/asm/sclp_ctl.h
arch/s390/include/uapi/asm/sembuf.h
arch/s390/include/uapi/asm/setup.h
arch/s390/include/uapi/asm/shmbuf.h
arch/s390/include/uapi/asm/sie.h
arch/s390/include/uapi/asm/sigcontext.h
arch/s390/include/uapi/asm/siginfo.h
arch/s390/include/uapi/asm/signal.h
arch/s390/include/uapi/asm/socket.h
arch/s390/include/uapi/asm/stat.h
arch/s390/include/uapi/asm/statfs.h
arch/s390/include/uapi/asm/tape390.h
arch/s390/include/uapi/asm/termios.h
arch/s390/include/uapi/asm/types.h
arch/s390/include/uapi/asm/ucontext.h
arch/s390/include/uapi/asm/unistd.h
arch/s390/include/uapi/asm/virtio-ccw.h
arch/s390/include/uapi/asm/vtoc.h
arch/s390/include/uapi/asm/zcrypt.h
arch/s390/kernel/Makefile
arch/s390/kernel/als.c
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/audit.c
arch/s390/kernel/audit.h
arch/s390/kernel/base.S
arch/s390/kernel/cache.c
arch/s390/kernel/compat_audit.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.h
arch/s390/kernel/compat_ptrace.h
arch/s390/kernel/compat_signal.c
arch/s390/kernel/compat_wrapper.c
arch/s390/kernel/cpcmd.c
arch/s390/kernel/crash_dump.c
arch/s390/kernel/debug.c
arch/s390/kernel/diag.c
arch/s390/kernel/early.c
arch/s390/kernel/early_printk.c
arch/s390/kernel/ebcdic.c
arch/s390/kernel/entry.S
arch/s390/kernel/entry.h
arch/s390/kernel/fpu.c
arch/s390/kernel/ftrace.c
arch/s390/kernel/guarded_storage.c
arch/s390/kernel/head.S
arch/s390/kernel/head64.S
arch/s390/kernel/head_kdump.S
arch/s390/kernel/idle.c
arch/s390/kernel/irq.c
arch/s390/kernel/jump_label.c
arch/s390/kernel/kdebugfs.c
arch/s390/kernel/machine_kexec.c
arch/s390/kernel/mcount.S
arch/s390/kernel/os_info.c
arch/s390/kernel/perf_cpum_cf_events.c
arch/s390/kernel/perf_cpum_sf.c
arch/s390/kernel/pgm_check.S
arch/s390/kernel/process.c
arch/s390/kernel/processor.c
arch/s390/kernel/ptrace.c
arch/s390/kernel/reipl.S
arch/s390/kernel/relocate_kernel.S
arch/s390/kernel/runtime_instr.c
arch/s390/kernel/signal.c
arch/s390/kernel/smp.c
arch/s390/kernel/suspend.c
arch/s390/kernel/swsusp.S
arch/s390/kernel/sys_s390.c
arch/s390/kernel/syscalls.S
arch/s390/kernel/sysinfo.c
arch/s390/kernel/topology.c
arch/s390/kernel/trace.c
arch/s390/kernel/traps.c
arch/s390/kernel/uprobes.c
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso32/getcpu.S
arch/s390/kernel/vdso32/note.S
arch/s390/kernel/vdso32/vdso32.lds.S
arch/s390/kernel/vdso32/vdso32_wrapper.S
arch/s390/kernel/vdso64/Makefile
arch/s390/kernel/vdso64/getcpu.S
arch/s390/kernel/vdso64/vdso64.lds.S
arch/s390/kernel/vdso64/vdso64_wrapper.S
arch/s390/kernel/vmlinux.lds.S
arch/s390/kvm/Kconfig
arch/s390/kvm/gaccess.c
arch/s390/kvm/trace-s390.h
arch/s390/kvm/trace.h
arch/s390/lib/Makefile
arch/s390/lib/delay.c
arch/s390/lib/find.c
arch/s390/lib/mem.S
arch/s390/lib/probes.c
arch/s390/lib/spinlock.c
arch/s390/lib/string.c
arch/s390/lib/uaccess.c
arch/s390/lib/xor.c
arch/s390/mm/Makefile
arch/s390/mm/dump_pagetables.c
arch/s390/mm/extmem.c
arch/s390/mm/fault.c
arch/s390/mm/gup.c
arch/s390/mm/hugetlbpage.c
arch/s390/mm/init.c
arch/s390/mm/maccess.c
arch/s390/mm/mem_detect.c
arch/s390/mm/page-states.c
arch/s390/mm/pageattr.c
arch/s390/mm/pgalloc.c
arch/s390/mm/vmem.c
arch/s390/net/bpf_jit.S
arch/s390/net/bpf_jit.h
arch/s390/net/bpf_jit_comp.c
arch/s390/numa/mode_emu.c
arch/s390/numa/numa.c
arch/s390/numa/numa_mode.h
arch/s390/numa/toptree.c
arch/s390/numa/toptree.h
arch/s390/oprofile/Makefile
arch/s390/oprofile/init.c
arch/s390/pci/pci_clp.c
arch/s390/pci/pci_event.c
arch/s390/pci/pci_mmio.c
arch/s390/pci/pci_sysfs.c
arch/s390/tools/Makefile
arch/s390/tools/gen_facilities.c
arch/score/Kconfig
arch/score/Kconfig.debug
arch/score/include/asm/asmmacro.h
arch/score/include/asm/atomic.h
arch/score/include/asm/bitops.h
arch/score/include/asm/bug.h
arch/score/include/asm/bugs.h
arch/score/include/asm/cache.h
arch/score/include/asm/cacheflush.h
arch/score/include/asm/checksum.h
arch/score/include/asm/cmpxchg.h
arch/score/include/asm/delay.h
arch/score/include/asm/device.h
arch/score/include/asm/div64.h
arch/score/include/asm/dma.h
arch/score/include/asm/elf.h
arch/score/include/asm/emergency-restart.h
arch/score/include/asm/exec.h
arch/score/include/asm/fixmap.h
arch/score/include/asm/futex.h
arch/score/include/asm/hardirq.h
arch/score/include/asm/io.h
arch/score/include/asm/irq.h
arch/score/include/asm/irq_regs.h
arch/score/include/asm/irqflags.h
arch/score/include/asm/kdebug.h
arch/score/include/asm/kmap_types.h
arch/score/include/asm/linkage.h
arch/score/include/asm/local.h
arch/score/include/asm/mmu.h
arch/score/include/asm/mmu_context.h
arch/score/include/asm/module.h
arch/score/include/asm/page.h
arch/score/include/asm/percpu.h
arch/score/include/asm/pgalloc.h
arch/score/include/asm/pgtable-bits.h
arch/score/include/asm/pgtable.h
arch/score/include/asm/processor.h
arch/score/include/asm/ptrace.h
arch/score/include/asm/scoreregs.h
arch/score/include/asm/segment.h
arch/score/include/asm/setup.h
arch/score/include/asm/shmparam.h
arch/score/include/asm/string.h
arch/score/include/asm/switch_to.h
arch/score/include/asm/syscalls.h
arch/score/include/asm/thread_info.h
arch/score/include/asm/timex.h
arch/score/include/asm/tlb.h
arch/score/include/asm/tlbflush.h
arch/score/include/asm/topology.h
arch/score/include/asm/uaccess.h
arch/score/include/asm/unaligned.h
arch/score/include/asm/user.h
arch/score/include/uapi/asm/bitsperlong.h
arch/score/include/uapi/asm/byteorder.h
arch/score/include/uapi/asm/errno.h
arch/score/include/uapi/asm/fcntl.h
arch/score/include/uapi/asm/ioctl.h
arch/score/include/uapi/asm/ioctls.h
arch/score/include/uapi/asm/ipcbuf.h
arch/score/include/uapi/asm/kvm_para.h
arch/score/include/uapi/asm/mman.h
arch/score/include/uapi/asm/msgbuf.h
arch/score/include/uapi/asm/param.h
arch/score/include/uapi/asm/poll.h
arch/score/include/uapi/asm/posix_types.h
arch/score/include/uapi/asm/ptrace.h
arch/score/include/uapi/asm/resource.h
arch/score/include/uapi/asm/sembuf.h
arch/score/include/uapi/asm/setup.h
arch/score/include/uapi/asm/shmbuf.h
arch/score/include/uapi/asm/sigcontext.h
arch/score/include/uapi/asm/signal.h
arch/score/include/uapi/asm/socket.h
arch/score/include/uapi/asm/sockios.h
arch/score/include/uapi/asm/stat.h
arch/score/include/uapi/asm/statfs.h
arch/score/include/uapi/asm/swab.h
arch/score/include/uapi/asm/termbits.h
arch/score/include/uapi/asm/termios.h
arch/score/include/uapi/asm/types.h
arch/score/include/uapi/asm/unistd.h
arch/score/kernel/Makefile
arch/score/kernel/sys_call_table.c
arch/sh/Kconfig
arch/sh/Kconfig.cpu
arch/sh/Kconfig.debug
arch/sh/boards/Kconfig
arch/sh/boards/Makefile
arch/sh/boards/board-edosk7705.c
arch/sh/boards/board-polaris.c
arch/sh/boards/board-secureedge5410.c
arch/sh/boards/board-sh2007.c
arch/sh/boards/board-shmin.c
arch/sh/boards/mach-highlander/Kconfig
arch/sh/boards/mach-highlander/Makefile
arch/sh/boards/mach-migor/Kconfig
arch/sh/boards/mach-r2d/Kconfig
arch/sh/boards/mach-r2d/irq.c
arch/sh/boards/mach-rsk/Kconfig
arch/sh/boards/mach-sdk7780/Kconfig
arch/sh/boards/mach-se/7206/irq.c
arch/sh/boards/mach-se/7206/setup.c
arch/sh/boards/mach-se/7343/setup.c
arch/sh/boards/mach-se/770x/irq.c
arch/sh/boards/mach-se/770x/setup.c
arch/sh/boards/mach-se/7751/irq.c
arch/sh/boards/mach-se/7751/setup.c
arch/sh/boards/mach-se/Makefile
arch/sh/boards/mach-se/board-se7619.c
arch/sh/boards/mach-sh03/rtc.c
arch/sh/boards/mach-sh03/setup.c
arch/sh/boot/compressed/Makefile
arch/sh/boot/compressed/cache.c
arch/sh/boot/compressed/head_32.S
arch/sh/boot/compressed/misc.c
arch/sh/boot/dts/j2_mimas_v2.dts
arch/sh/boot/romimage/Makefile
arch/sh/boot/romimage/head.S
arch/sh/cchips/Kconfig
arch/sh/cchips/hd6446x/hd64461.c
arch/sh/drivers/Kconfig
arch/sh/drivers/Makefile
arch/sh/drivers/dma/Kconfig
arch/sh/drivers/pci/Makefile
arch/sh/drivers/pci/common.c
arch/sh/drivers/pci/fixups-cayman.c
arch/sh/drivers/pci/fixups-se7751.c
arch/sh/drivers/pci/fixups-sh03.c
arch/sh/drivers/pci/pci-sh4.h
arch/sh/include/asm/adc.h
arch/sh/include/asm/alignment.h
arch/sh/include/asm/atomic-grb.h
arch/sh/include/asm/atomic-irq.h
arch/sh/include/asm/atomic-llsc.h
arch/sh/include/asm/atomic.h
arch/sh/include/asm/barrier.h
arch/sh/include/asm/bitops-cas.h
arch/sh/include/asm/bitops-grb.h
arch/sh/include/asm/bitops-llsc.h
arch/sh/include/asm/bitops-op32.h
arch/sh/include/asm/bitops.h
arch/sh/include/asm/bl_bit.h
arch/sh/include/asm/bl_bit_32.h
arch/sh/include/asm/bug.h
arch/sh/include/asm/bugs.h
arch/sh/include/asm/cache.h
arch/sh/include/asm/cache_insns.h
arch/sh/include/asm/cache_insns_32.h
arch/sh/include/asm/cacheflush.h
arch/sh/include/asm/checksum.h
arch/sh/include/asm/clock.h
arch/sh/include/asm/cmpxchg-cas.h
arch/sh/include/asm/cmpxchg-grb.h
arch/sh/include/asm/cmpxchg-irq.h
arch/sh/include/asm/cmpxchg-llsc.h
arch/sh/include/asm/cmpxchg.h
arch/sh/include/asm/dma-mapping.h
arch/sh/include/asm/dmabrg.h
arch/sh/include/asm/elf.h
arch/sh/include/asm/entry-macros.S
arch/sh/include/asm/extable.h
arch/sh/include/asm/fpu.h
arch/sh/include/asm/ftrace.h
arch/sh/include/asm/futex-cas.h
arch/sh/include/asm/futex-irq.h
arch/sh/include/asm/futex-llsc.h
arch/sh/include/asm/futex.h
arch/sh/include/asm/hardirq.h
arch/sh/include/asm/hd64461.h
arch/sh/include/asm/heartbeat.h
arch/sh/include/asm/hugetlb.h
arch/sh/include/asm/hw_breakpoint.h
arch/sh/include/asm/hw_irq.h
arch/sh/include/asm/i2c-sh7760.h
arch/sh/include/asm/io.h
arch/sh/include/asm/io_generic.h
arch/sh/include/asm/io_noioport.h
arch/sh/include/asm/io_trapped.h
arch/sh/include/asm/irq.h
arch/sh/include/asm/irqflags.h
arch/sh/include/asm/kdebug.h
arch/sh/include/asm/kexec.h
arch/sh/include/asm/kgdb.h
arch/sh/include/asm/kmap_types.h
arch/sh/include/asm/kprobes.h
arch/sh/include/asm/linkage.h
arch/sh/include/asm/mmu.h
arch/sh/include/asm/mmu_context.h
arch/sh/include/asm/mmu_context_32.h
arch/sh/include/asm/mmzone.h
arch/sh/include/asm/module.h
arch/sh/include/asm/page.h
arch/sh/include/asm/pci.h
arch/sh/include/asm/perf_event.h
arch/sh/include/asm/pgalloc.h
arch/sh/include/asm/pgtable-2level.h
arch/sh/include/asm/pgtable-3level.h
arch/sh/include/asm/pgtable_32.h
arch/sh/include/asm/posix_types.h
arch/sh/include/asm/processor.h
arch/sh/include/asm/processor_32.h
arch/sh/include/asm/processor_64.h
arch/sh/include/asm/ptrace.h
arch/sh/include/asm/ptrace_32.h
arch/sh/include/asm/ptrace_64.h
arch/sh/include/asm/push-switch.h
arch/sh/include/asm/reboot.h
arch/sh/include/asm/romimage-macros.h
arch/sh/include/asm/rtc.h
arch/sh/include/asm/seccomp.h
arch/sh/include/asm/sections.h
arch/sh/include/asm/segment.h
arch/sh/include/asm/setup.h
arch/sh/include/asm/sh7760fb.h
arch/sh/include/asm/sh_bios.h
arch/sh/include/asm/smc37c93x.h
arch/sh/include/asm/smp-ops.h
arch/sh/include/asm/smp.h
arch/sh/include/asm/sparsemem.h
arch/sh/include/asm/spi.h
arch/sh/include/asm/spinlock_types.h
arch/sh/include/asm/sram.h
arch/sh/include/asm/stackprotector.h
arch/sh/include/asm/stacktrace.h
arch/sh/include/asm/string.h
arch/sh/include/asm/string_64.h
arch/sh/include/asm/suspend.h
arch/sh/include/asm/switch_to_32.h
arch/sh/include/asm/syscall.h
arch/sh/include/asm/syscall_32.h
arch/sh/include/asm/syscall_64.h
arch/sh/include/asm/syscalls.h
arch/sh/include/asm/syscalls_32.h
arch/sh/include/asm/syscalls_64.h
arch/sh/include/asm/thread_info.h
arch/sh/include/asm/timex.h
arch/sh/include/asm/tlb.h
arch/sh/include/asm/tlbflush.h
arch/sh/include/asm/topology.h
arch/sh/include/asm/traps.h
arch/sh/include/asm/traps_32.h
arch/sh/include/asm/types.h
arch/sh/include/asm/uaccess.h
arch/sh/include/asm/uaccess_32.h
arch/sh/include/asm/unaligned-sh4a.h
arch/sh/include/asm/unaligned.h
arch/sh/include/asm/uncached.h
arch/sh/include/asm/unistd.h
arch/sh/include/asm/unwinder.h
arch/sh/include/asm/user.h
arch/sh/include/asm/vmlinux.lds.h
arch/sh/include/asm/word-at-a-time.h
arch/sh/include/cpu-common/cpu/rtc.h
arch/sh/include/cpu-common/cpu/sigcontext.h
arch/sh/include/cpu-sh2a/cpu/addrspace.h
arch/sh/include/cpu-sh2a/cpu/rtc.h
arch/sh/include/cpu-sh2a/cpu/sh7203.h
arch/sh/include/cpu-sh2a/cpu/sh7264.h
arch/sh/include/cpu-sh2a/cpu/sh7269.h
arch/sh/include/cpu-sh3/cpu/adc.h
arch/sh/include/cpu-sh3/cpu/dac.h
arch/sh/include/cpu-sh3/cpu/dma.h
arch/sh/include/cpu-sh3/cpu/serial.h
arch/sh/include/cpu-sh3/cpu/sh7720.h
arch/sh/include/cpu-sh4/cpu/dma.h
arch/sh/include/cpu-sh4/cpu/rtc.h
arch/sh/include/cpu-sh4/cpu/sh7722.h
arch/sh/include/cpu-sh4/cpu/sh7723.h
arch/sh/include/cpu-sh4/cpu/sh7724.h
arch/sh/include/cpu-sh4/cpu/sh7734.h
arch/sh/include/cpu-sh4/cpu/sh7757.h
arch/sh/include/cpu-sh4/cpu/sh7785.h
arch/sh/include/cpu-sh4/cpu/shx3.h
arch/sh/include/cpu-sh4/cpu/sigcontext.h
arch/sh/include/cpu-sh4a/cpu/dma.h
arch/sh/include/cpu-sh4a/cpu/serial.h
arch/sh/include/cpu-sh5/cpu/addrspace.h
arch/sh/include/cpu-sh5/cpu/mmu_context.h
arch/sh/include/cpu-sh5/cpu/rtc.h
arch/sh/include/mach-common/mach/highlander.h
arch/sh/include/mach-common/mach/r2d.h
arch/sh/include/mach-common/mach/romimage.h
arch/sh/include/mach-common/mach/sh2007.h
arch/sh/include/mach-common/mach/sh7785lcr.h
arch/sh/include/mach-common/mach/shmin.h
arch/sh/include/mach-common/mach/titan.h
arch/sh/include/mach-common/mach/urquell.h
arch/sh/include/mach-dreamcast/mach/maple.h
arch/sh/include/mach-ecovec24/mach/romimage.h
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
arch/sh/include/mach-kfr2r09/mach/romimage.h
arch/sh/include/mach-landisk/mach/gio.h
arch/sh/include/mach-landisk/mach/iodata_landisk.h
arch/sh/include/mach-migor/mach/migor.h
arch/sh/include/mach-sdk7786/mach/fpga.h
arch/sh/include/mach-sdk7786/mach/irq.h
arch/sh/include/mach-se/mach/mrshpc.h
arch/sh/include/mach-se/mach/se.h
arch/sh/include/mach-se/mach/se7206.h
arch/sh/include/mach-se/mach/se7343.h
arch/sh/include/mach-se/mach/se7751.h
arch/sh/include/mach-sh03/mach/io.h
arch/sh/include/mach-sh03/mach/sh03.h
arch/sh/include/mach-x3proto/mach/hardware.h
arch/sh/include/mach-x3proto/mach/ilsel.h
arch/sh/include/uapi/asm/auxvec.h
arch/sh/include/uapi/asm/byteorder.h
arch/sh/include/uapi/asm/cachectl.h
arch/sh/include/uapi/asm/cpu-features.h
arch/sh/include/uapi/asm/hw_breakpoint.h
arch/sh/include/uapi/asm/ioctls.h
arch/sh/include/uapi/asm/posix_types.h
arch/sh/include/uapi/asm/posix_types_32.h
arch/sh/include/uapi/asm/posix_types_64.h
arch/sh/include/uapi/asm/ptrace.h
arch/sh/include/uapi/asm/ptrace_32.h
arch/sh/include/uapi/asm/ptrace_64.h
arch/sh/include/uapi/asm/sigcontext.h
arch/sh/include/uapi/asm/signal.h
arch/sh/include/uapi/asm/sockios.h
arch/sh/include/uapi/asm/stat.h
arch/sh/include/uapi/asm/swab.h
arch/sh/include/uapi/asm/unistd.h
arch/sh/include/uapi/asm/unistd_32.h
arch/sh/include/uapi/asm/unistd_64.h
arch/sh/kernel/Makefile
arch/sh/kernel/asm-offsets.c
arch/sh/kernel/cpu/Makefile
arch/sh/kernel/cpu/adc.c
arch/sh/kernel/cpu/clock-cpg.c
arch/sh/kernel/cpu/fpu.c
arch/sh/kernel/cpu/irq/imask.c
arch/sh/kernel/cpu/proc.c
arch/sh/kernel/cpu/sh2a/Makefile
arch/sh/kernel/cpu/sh3/Makefile
arch/sh/kernel/cpu/sh3/serial-sh770x.c
arch/sh/kernel/cpu/sh3/serial-sh7710.c
arch/sh/kernel/cpu/sh3/serial-sh7720.c
arch/sh/kernel/cpu/sh4/Makefile
arch/sh/kernel/cpu/sh4a/Makefile
arch/sh/kernel/cpu/sh4a/pinmux-sh7722.c
arch/sh/kernel/cpu/sh4a/serial-sh7722.c
arch/sh/kernel/cpu/sh5/Makefile
arch/sh/kernel/crash_dump.c
arch/sh/kernel/ftrace.c
arch/sh/kernel/irq.c
arch/sh/kernel/kdebugfs.c
arch/sh/kernel/process.c
arch/sh/kernel/ptrace.c
arch/sh/kernel/reboot.c
arch/sh/kernel/setup.c
arch/sh/kernel/sh_ksyms_32.c
arch/sh/kernel/signal_32.c
arch/sh/kernel/sys_sh.c
arch/sh/kernel/sys_sh32.c
arch/sh/kernel/traps.c
arch/sh/kernel/vmlinux.lds.S
arch/sh/kernel/vsyscall/Makefile
arch/sh/kernel/vsyscall/vsyscall-note.S
arch/sh/kernel/vsyscall/vsyscall-sigreturn.S
arch/sh/kernel/vsyscall/vsyscall-syscall.S
arch/sh/kernel/vsyscall/vsyscall-trapa.S
arch/sh/kernel/vsyscall/vsyscall.lds.S
arch/sh/lib/Makefile
arch/sh/lib/__clear_user.S
arch/sh/lib/ashldi3.c
arch/sh/lib/ashrdi3.c
arch/sh/lib/copy_page.S
arch/sh/lib/delay.c
arch/sh/lib/div64-generic.c
arch/sh/lib/div64.S
arch/sh/lib/lshrdi3.c
arch/sh/lib/memchr.S
arch/sh/lib/memcpy-sh4.S
arch/sh/lib/memcpy.S
arch/sh/lib/memmove.S
arch/sh/lib/memset-sh4.S
arch/sh/lib/memset.S
arch/sh/lib/strlen.S
arch/sh/lib64/copy_user_memcpy.S
arch/sh/lib64/memcpy.S
arch/sh/lib64/memset.S
arch/sh/lib64/sdivsi3.S
arch/sh/lib64/strcpy.S
arch/sh/lib64/strlen.S
arch/sh/lib64/udivdi3.S
arch/sh/lib64/udivsi3.S
arch/sh/math-emu/sfp-util.h
arch/sh/mm/Kconfig
arch/sh/mm/Makefile
arch/sh/mm/extable_32.c
arch/sh/mm/flush-sh4.c
arch/sh/mm/gup.c
arch/sh/mm/hugetlbpage.c
arch/sh/mm/ioremap_fixed.c
arch/sh/mm/pgtable.c
arch/sh/mm/uncached.c
arch/sh/oprofile/Makefile
arch/sh/tools/gen-mach-types
arch/sparc/Kconfig
arch/sparc/Kconfig.debug
arch/sparc/Makefile
arch/sparc/boot/Makefile
arch/sparc/crypto/Makefile
arch/sparc/crypto/aes_asm.S
arch/sparc/crypto/camellia_asm.S
arch/sparc/crypto/crc32c_asm.S
arch/sparc/crypto/crop_devid.c
arch/sparc/crypto/des_asm.S
arch/sparc/crypto/md5_asm.S
arch/sparc/crypto/opcodes.h
arch/sparc/crypto/sha1_asm.S
arch/sparc/crypto/sha256_asm.S
arch/sparc/crypto/sha512_asm.S
arch/sparc/include/asm/agp.h
arch/sparc/include/asm/apb.h
arch/sparc/include/asm/asm-prototypes.h
arch/sparc/include/asm/asm.h
arch/sparc/include/asm/asmmacro.h
arch/sparc/include/asm/atomic.h
arch/sparc/include/asm/atomic_32.h
arch/sparc/include/asm/atomic_64.h
arch/sparc/include/asm/auxio.h
arch/sparc/include/asm/auxio_32.h
arch/sparc/include/asm/auxio_64.h
arch/sparc/include/asm/backoff.h
arch/sparc/include/asm/barrier.h
arch/sparc/include/asm/barrier_32.h
arch/sparc/include/asm/barrier_64.h
arch/sparc/include/asm/bbc.h
arch/sparc/include/asm/bitext.h
arch/sparc/include/asm/bitops.h
arch/sparc/include/asm/bitops_32.h
arch/sparc/include/asm/bitops_64.h
arch/sparc/include/asm/btext.h
arch/sparc/include/asm/bug.h
arch/sparc/include/asm/bugs.h
arch/sparc/include/asm/cache.h
arch/sparc/include/asm/cacheflush.h
arch/sparc/include/asm/cacheflush_32.h
arch/sparc/include/asm/cacheflush_64.h
arch/sparc/include/asm/cachetlb_32.h
arch/sparc/include/asm/chafsr.h
arch/sparc/include/asm/checksum.h
arch/sparc/include/asm/checksum_32.h
arch/sparc/include/asm/checksum_64.h
arch/sparc/include/asm/chmctrl.h
arch/sparc/include/asm/cmpxchg.h
arch/sparc/include/asm/cmpxchg_32.h
arch/sparc/include/asm/cmpxchg_64.h
arch/sparc/include/asm/compat.h
arch/sparc/include/asm/compat_signal.h
arch/sparc/include/asm/contregs.h
arch/sparc/include/asm/cpu_type.h
arch/sparc/include/asm/cpudata.h
arch/sparc/include/asm/cpudata_32.h
arch/sparc/include/asm/cpudata_64.h
arch/sparc/include/asm/current.h
arch/sparc/include/asm/dcr.h
arch/sparc/include/asm/dcu.h
arch/sparc/include/asm/delay.h
arch/sparc/include/asm/delay_32.h
arch/sparc/include/asm/delay_64.h
arch/sparc/include/asm/dma-mapping.h
arch/sparc/include/asm/dma.h
arch/sparc/include/asm/ebus_dma.h
arch/sparc/include/asm/ecc.h
arch/sparc/include/asm/elf.h
arch/sparc/include/asm/elf_32.h
arch/sparc/include/asm/elf_64.h
arch/sparc/include/asm/estate.h
arch/sparc/include/asm/extable_64.h
arch/sparc/include/asm/fb.h
arch/sparc/include/asm/fbio.h
arch/sparc/include/asm/fhc.h
arch/sparc/include/asm/floppy.h
arch/sparc/include/asm/floppy_32.h
arch/sparc/include/asm/floppy_64.h
arch/sparc/include/asm/fpumacro.h
arch/sparc/include/asm/ftrace.h
arch/sparc/include/asm/futex.h
arch/sparc/include/asm/futex_64.h
arch/sparc/include/asm/hardirq.h
arch/sparc/include/asm/hardirq_32.h
arch/sparc/include/asm/hardirq_64.h
arch/sparc/include/asm/head.h
arch/sparc/include/asm/head_32.h
arch/sparc/include/asm/head_64.h
arch/sparc/include/asm/hibernate.h
arch/sparc/include/asm/highmem.h
arch/sparc/include/asm/hugetlb.h
arch/sparc/include/asm/hvtramp.h
arch/sparc/include/asm/hypervisor.h
arch/sparc/include/asm/ide.h
arch/sparc/include/asm/idprom.h
arch/sparc/include/asm/intr_queue.h
arch/sparc/include/asm/io-unit.h
arch/sparc/include/asm/io.h
arch/sparc/include/asm/io_32.h
arch/sparc/include/asm/io_64.h
arch/sparc/include/asm/ioctls.h
arch/sparc/include/asm/iommu.h
arch/sparc/include/asm/iommu_32.h
arch/sparc/include/asm/iommu_64.h
arch/sparc/include/asm/irq.h
arch/sparc/include/asm/irq_32.h
arch/sparc/include/asm/irq_64.h
arch/sparc/include/asm/irqflags.h
arch/sparc/include/asm/irqflags_32.h
arch/sparc/include/asm/irqflags_64.h
arch/sparc/include/asm/jump_label.h
arch/sparc/include/asm/kdebug.h
arch/sparc/include/asm/kdebug_32.h
arch/sparc/include/asm/kdebug_64.h
arch/sparc/include/asm/kgdb.h
arch/sparc/include/asm/kmap_types.h
arch/sparc/include/asm/kprobes.h
arch/sparc/include/asm/ldc.h
arch/sparc/include/asm/leon.h
arch/sparc/include/asm/leon_amba.h
arch/sparc/include/asm/leon_pci.h
arch/sparc/include/asm/lsu.h
arch/sparc/include/asm/machines.h
arch/sparc/include/asm/mbus.h
arch/sparc/include/asm/mc146818rtc.h
arch/sparc/include/asm/mc146818rtc_32.h
arch/sparc/include/asm/mc146818rtc_64.h
arch/sparc/include/asm/mdesc.h
arch/sparc/include/asm/memctrl.h
arch/sparc/include/asm/mman.h
arch/sparc/include/asm/mmu.h
arch/sparc/include/asm/mmu_32.h
arch/sparc/include/asm/mmu_64.h
arch/sparc/include/asm/mmu_context.h
arch/sparc/include/asm/mmu_context_32.h
arch/sparc/include/asm/mmu_context_64.h
arch/sparc/include/asm/mmzone.h
arch/sparc/include/asm/msi.h
arch/sparc/include/asm/mxcc.h
arch/sparc/include/asm/nmi.h
arch/sparc/include/asm/ns87303.h
arch/sparc/include/asm/obio.h
arch/sparc/include/asm/openprom.h
arch/sparc/include/asm/oplib.h
arch/sparc/include/asm/oplib_32.h
arch/sparc/include/asm/oplib_64.h
arch/sparc/include/asm/page.h
arch/sparc/include/asm/page_32.h
arch/sparc/include/asm/page_64.h
arch/sparc/include/asm/parport.h
arch/sparc/include/asm/pbm.h
arch/sparc/include/asm/pci.h
arch/sparc/include/asm/pci_32.h
arch/sparc/include/asm/pci_64.h
arch/sparc/include/asm/pcic.h
arch/sparc/include/asm/pcr.h
arch/sparc/include/asm/percpu.h
arch/sparc/include/asm/percpu_32.h
arch/sparc/include/asm/percpu_64.h
arch/sparc/include/asm/perf_event.h
arch/sparc/include/asm/pgalloc.h
arch/sparc/include/asm/pgalloc_32.h
arch/sparc/include/asm/pgalloc_64.h
arch/sparc/include/asm/pgtable.h
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/pgtable_64.h
arch/sparc/include/asm/pgtsrmmu.h
arch/sparc/include/asm/pil.h
arch/sparc/include/asm/processor.h
arch/sparc/include/asm/processor_32.h
arch/sparc/include/asm/processor_64.h
arch/sparc/include/asm/psr.h
arch/sparc/include/asm/ptrace.h
arch/sparc/include/asm/qrwlock.h
arch/sparc/include/asm/qspinlock.h
arch/sparc/include/asm/ross.h
arch/sparc/include/asm/sbi.h
arch/sparc/include/asm/scratchpad.h
arch/sparc/include/asm/seccomp.h
arch/sparc/include/asm/sections.h
arch/sparc/include/asm/setup.h
arch/sparc/include/asm/sfafsr.h
arch/sparc/include/asm/sfp-machine.h
arch/sparc/include/asm/shmparam.h
arch/sparc/include/asm/shmparam_32.h
arch/sparc/include/asm/shmparam_64.h
arch/sparc/include/asm/sigcontext.h
arch/sparc/include/asm/signal.h
arch/sparc/include/asm/smp.h
arch/sparc/include/asm/smp_32.h
arch/sparc/include/asm/smp_64.h
arch/sparc/include/asm/sparsemem.h
arch/sparc/include/asm/spinlock.h
arch/sparc/include/asm/spinlock_32.h
arch/sparc/include/asm/spinlock_64.h
arch/sparc/include/asm/spinlock_types.h
arch/sparc/include/asm/spitfire.h
arch/sparc/include/asm/stacktrace.h
arch/sparc/include/asm/starfire.h
arch/sparc/include/asm/string.h
arch/sparc/include/asm/string_32.h
arch/sparc/include/asm/string_64.h
arch/sparc/include/asm/sunbpp.h
arch/sparc/include/asm/swift.h
arch/sparc/include/asm/switch_to.h
arch/sparc/include/asm/switch_to_32.h
arch/sparc/include/asm/switch_to_64.h
arch/sparc/include/asm/syscall.h
arch/sparc/include/asm/syscalls.h
arch/sparc/include/asm/termbits.h
arch/sparc/include/asm/termios.h
arch/sparc/include/asm/thread_info.h
arch/sparc/include/asm/thread_info_32.h
arch/sparc/include/asm/thread_info_64.h
arch/sparc/include/asm/timer.h
arch/sparc/include/asm/timer_32.h
arch/sparc/include/asm/timer_64.h
arch/sparc/include/asm/timex.h
arch/sparc/include/asm/timex_32.h
arch/sparc/include/asm/timex_64.h
arch/sparc/include/asm/tlb.h
arch/sparc/include/asm/tlb_32.h
arch/sparc/include/asm/tlb_64.h
arch/sparc/include/asm/tlbflush.h
arch/sparc/include/asm/tlbflush_32.h
arch/sparc/include/asm/tlbflush_64.h
arch/sparc/include/asm/topology.h
arch/sparc/include/asm/topology_32.h
arch/sparc/include/asm/topology_64.h
arch/sparc/include/asm/trap_block.h
arch/sparc/include/asm/traps.h
arch/sparc/include/asm/tsb.h
arch/sparc/include/asm/tsunami.h
arch/sparc/include/asm/ttable.h
arch/sparc/include/asm/turbosparc.h
arch/sparc/include/asm/uaccess.h
arch/sparc/include/asm/uaccess_32.h
arch/sparc/include/asm/uaccess_64.h
arch/sparc/include/asm/unaligned.h
arch/sparc/include/asm/unistd.h
arch/sparc/include/asm/upa.h
arch/sparc/include/asm/vaddrs.h
arch/sparc/include/asm/vga.h
arch/sparc/include/asm/viking.h
arch/sparc/include/asm/vio.h
arch/sparc/include/asm/visasm.h
arch/sparc/include/asm/winmacro.h
arch/sparc/include/asm/xor.h
arch/sparc/include/uapi/asm/apc.h
arch/sparc/include/uapi/asm/asi.h
arch/sparc/include/uapi/asm/bitsperlong.h
arch/sparc/include/uapi/asm/byteorder.h
arch/sparc/include/uapi/asm/display7seg.h
arch/sparc/include/uapi/asm/envctrl.h
arch/sparc/include/uapi/asm/errno.h
arch/sparc/include/uapi/asm/fbio.h
arch/sparc/include/uapi/asm/fcntl.h
arch/sparc/include/uapi/asm/ioctl.h
arch/sparc/include/uapi/asm/ioctls.h
arch/sparc/include/uapi/asm/ipcbuf.h
arch/sparc/include/uapi/asm/jsflash.h
arch/sparc/include/uapi/asm/kvm_para.h
arch/sparc/include/uapi/asm/mman.h
arch/sparc/include/uapi/asm/msgbuf.h
arch/sparc/include/uapi/asm/openpromio.h
arch/sparc/include/uapi/asm/param.h
arch/sparc/include/uapi/asm/perfctr.h
arch/sparc/include/uapi/asm/poll.h
arch/sparc/include/uapi/asm/posix_types.h
arch/sparc/include/uapi/asm/psr.h
arch/sparc/include/uapi/asm/psrcompat.h
arch/sparc/include/uapi/asm/pstate.h
arch/sparc/include/uapi/asm/ptrace.h
arch/sparc/include/uapi/asm/resource.h
arch/sparc/include/uapi/asm/sembuf.h
arch/sparc/include/uapi/asm/setup.h
arch/sparc/include/uapi/asm/shmbuf.h
arch/sparc/include/uapi/asm/sigcontext.h
arch/sparc/include/uapi/asm/siginfo.h
arch/sparc/include/uapi/asm/signal.h
arch/sparc/include/uapi/asm/socket.h
arch/sparc/include/uapi/asm/sockios.h
arch/sparc/include/uapi/asm/stat.h
arch/sparc/include/uapi/asm/statfs.h
arch/sparc/include/uapi/asm/swab.h
arch/sparc/include/uapi/asm/termbits.h
arch/sparc/include/uapi/asm/termios.h
arch/sparc/include/uapi/asm/traps.h
arch/sparc/include/uapi/asm/uctx.h
arch/sparc/include/uapi/asm/unistd.h
arch/sparc/include/uapi/asm/utrap.h
arch/sparc/include/uapi/asm/watchdog.h
arch/sparc/kernel/Makefile
arch/sparc/kernel/apc.c
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/audit.c
arch/sparc/kernel/auxio_32.c
arch/sparc/kernel/auxio_64.c
arch/sparc/kernel/btext.c
arch/sparc/kernel/central.c
arch/sparc/kernel/cherrs.S
arch/sparc/kernel/compat_audit.c
arch/sparc/kernel/cpu.c
arch/sparc/kernel/cpumap.c
arch/sparc/kernel/cpumap.h
arch/sparc/kernel/devices.c
arch/sparc/kernel/dma.c
arch/sparc/kernel/dtlb_miss.S
arch/sparc/kernel/dtlb_prot.S
arch/sparc/kernel/ebus.c
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.h
arch/sparc/kernel/etrap_32.S
arch/sparc/kernel/etrap_64.S
arch/sparc/kernel/fpu_traps.S
arch/sparc/kernel/ftrace.c
arch/sparc/kernel/getsetcc.S
arch/sparc/kernel/head_32.S
arch/sparc/kernel/head_64.S
arch/sparc/kernel/hvapi.c
arch/sparc/kernel/hvcalls.S
arch/sparc/kernel/hvtramp.S
arch/sparc/kernel/idprom.c
arch/sparc/kernel/iommu.c
arch/sparc/kernel/iommu_common.h
arch/sparc/kernel/ioport.c
arch/sparc/kernel/irq.h
arch/sparc/kernel/irq_32.c
arch/sparc/kernel/irq_64.c
arch/sparc/kernel/itlb_miss.S
arch/sparc/kernel/ivec.S
arch/sparc/kernel/jump_label.c
arch/sparc/kernel/kernel.h
arch/sparc/kernel/kgdb_32.c
arch/sparc/kernel/kgdb_64.c
arch/sparc/kernel/kprobes.c
arch/sparc/kernel/kstack.h
arch/sparc/kernel/ktlb.S
arch/sparc/kernel/ldc.c
arch/sparc/kernel/leon_kernel.c
arch/sparc/kernel/leon_pci.c
arch/sparc/kernel/leon_pci_grpci1.c
arch/sparc/kernel/leon_pci_grpci2.c
arch/sparc/kernel/leon_pmc.c
arch/sparc/kernel/leon_smp.c
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/misctrap.S
arch/sparc/kernel/module.c
arch/sparc/kernel/of_device_32.c
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/of_device_common.h
arch/sparc/kernel/pci.c
arch/sparc/kernel/pci_common.c
arch/sparc/kernel/pci_fire.c
arch/sparc/kernel/pci_impl.h
arch/sparc/kernel/pci_msi.c
arch/sparc/kernel/pci_psycho.c
arch/sparc/kernel/pci_sabre.c
arch/sparc/kernel/pci_schizo.c
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/pci_sun4v.h
arch/sparc/kernel/pci_sun4v_asm.S
arch/sparc/kernel/pcic.c
arch/sparc/kernel/perf_event.c
arch/sparc/kernel/pmc.c
arch/sparc/kernel/power.c
arch/sparc/kernel/process_32.c
arch/sparc/kernel/process_64.c
arch/sparc/kernel/prom.h
arch/sparc/kernel/prom_irqtrans.c
arch/sparc/kernel/psycho_common.c
arch/sparc/kernel/psycho_common.h
arch/sparc/kernel/ptrace_32.c
arch/sparc/kernel/reboot.c
arch/sparc/kernel/rtrap_32.S
arch/sparc/kernel/rtrap_64.S
arch/sparc/kernel/sbus.c
arch/sparc/kernel/setup_32.c
arch/sparc/kernel/setup_64.c
arch/sparc/kernel/signal32.c
arch/sparc/kernel/signal_32.c
arch/sparc/kernel/signal_64.c
arch/sparc/kernel/sigutil.h
arch/sparc/kernel/sigutil_32.c
arch/sparc/kernel/sigutil_64.c
arch/sparc/kernel/smp_32.c
arch/sparc/kernel/smp_64.c
arch/sparc/kernel/spiterrs.S
arch/sparc/kernel/sstate.c
arch/sparc/kernel/starfire.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_irq.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc/kernel/sun4v_ivec.S
arch/sparc/kernel/sun4v_tlb_miss.S
arch/sparc/kernel/sys32.S
arch/sparc/kernel/sys_sparc32.c
arch/sparc/kernel/sys_sparc_32.c
arch/sparc/kernel/sys_sparc_64.c
arch/sparc/kernel/syscalls.S
arch/sparc/kernel/sysfs.c
arch/sparc/kernel/systbls.h
arch/sparc/kernel/systbls_32.S
arch/sparc/kernel/systbls_64.S
arch/sparc/kernel/time_32.c
arch/sparc/kernel/time_64.c
arch/sparc/kernel/trampoline_32.S
arch/sparc/kernel/trampoline_64.S
arch/sparc/kernel/traps_32.c
arch/sparc/kernel/tsb.S
arch/sparc/kernel/ttable_32.S
arch/sparc/kernel/ttable_64.S
arch/sparc/kernel/una_asm_32.S
arch/sparc/kernel/una_asm_64.S
arch/sparc/kernel/unaligned_32.c
arch/sparc/kernel/unaligned_64.c
arch/sparc/kernel/urtt_fill.S
arch/sparc/kernel/utrap.S
arch/sparc/kernel/vio.c
arch/sparc/kernel/viohs.c
arch/sparc/kernel/visemul.c
arch/sparc/kernel/vmlinux.lds.S
arch/sparc/kernel/windows.c
arch/sparc/kernel/winfixup.S
arch/sparc/kernel/wof.S
arch/sparc/kernel/wuf.S
arch/sparc/lib/GENbzero.S
arch/sparc/lib/GENcopy_from_user.S
arch/sparc/lib/GENcopy_to_user.S
arch/sparc/lib/GENmemcpy.S
arch/sparc/lib/GENpage.S
arch/sparc/lib/GENpatch.S
arch/sparc/lib/Makefile
arch/sparc/lib/NG2copy_from_user.S
arch/sparc/lib/NG2copy_to_user.S
arch/sparc/lib/NG2memcpy.S
arch/sparc/lib/NG2patch.S
arch/sparc/lib/NG4clear_page.S
arch/sparc/lib/NG4copy_from_user.S
arch/sparc/lib/NG4copy_page.S
arch/sparc/lib/NG4copy_to_user.S
arch/sparc/lib/NG4memcpy.S
arch/sparc/lib/NG4memset.S
arch/sparc/lib/NG4patch.S
arch/sparc/lib/NGbzero.S
arch/sparc/lib/NGcopy_from_user.S
arch/sparc/lib/NGcopy_to_user.S
arch/sparc/lib/NGmemcpy.S
arch/sparc/lib/NGpage.S
arch/sparc/lib/NGpatch.S
arch/sparc/lib/PeeCeeI.c
arch/sparc/lib/U1copy_from_user.S
arch/sparc/lib/U1copy_to_user.S
arch/sparc/lib/U1memcpy.S
arch/sparc/lib/U3copy_from_user.S
arch/sparc/lib/U3copy_to_user.S
arch/sparc/lib/U3memcpy.S
arch/sparc/lib/U3patch.S
arch/sparc/lib/VISsave.S
arch/sparc/lib/ashldi3.S
arch/sparc/lib/ashrdi3.S
arch/sparc/lib/atomic32.c
arch/sparc/lib/atomic_64.S
arch/sparc/lib/bitext.c
arch/sparc/lib/bitops.S
arch/sparc/lib/blockops.S
arch/sparc/lib/bzero.S
arch/sparc/lib/checksum_32.S
arch/sparc/lib/checksum_64.S
arch/sparc/lib/clear_page.S
arch/sparc/lib/cmpdi2.c
arch/sparc/lib/copy_in_user.S
arch/sparc/lib/copy_page.S
arch/sparc/lib/copy_user.S
arch/sparc/lib/csum_copy.S
arch/sparc/lib/csum_copy_from_user.S
arch/sparc/lib/csum_copy_to_user.S
arch/sparc/lib/ffs.S
arch/sparc/lib/hweight.S
arch/sparc/lib/iomap.c
arch/sparc/lib/ipcsum.S
arch/sparc/lib/libgcc.h
arch/sparc/lib/locks.S
arch/sparc/lib/lshrdi3.S
arch/sparc/lib/mcount.S
arch/sparc/lib/memcmp.S
arch/sparc/lib/memcpy.S
arch/sparc/lib/memmove.S
arch/sparc/lib/memscan_32.S
arch/sparc/lib/memscan_64.S
arch/sparc/lib/memset.S
arch/sparc/lib/multi3.S
arch/sparc/lib/strlen.S
arch/sparc/lib/strncmp_32.S
arch/sparc/lib/strncmp_64.S
arch/sparc/lib/ucmpdi2.c
arch/sparc/lib/xor.S
arch/sparc/math-emu/math_32.c
arch/sparc/math-emu/math_64.c
arch/sparc/math-emu/sfp-util_32.h
arch/sparc/math-emu/sfp-util_64.h
arch/sparc/mm/Makefile
arch/sparc/mm/extable.c
arch/sparc/mm/fault_32.c
arch/sparc/mm/fault_64.c
arch/sparc/mm/gup.c
arch/sparc/mm/highmem.c
arch/sparc/mm/hugetlbpage.c
arch/sparc/mm/hypersparc.S
arch/sparc/mm/init_32.c
arch/sparc/mm/init_64.c
arch/sparc/mm/init_64.h
arch/sparc/mm/io-unit.c
arch/sparc/mm/iommu.c
arch/sparc/mm/leon_mm.c
arch/sparc/mm/mm_32.h
arch/sparc/mm/srmmu.c
arch/sparc/mm/srmmu_access.S
arch/sparc/mm/swift.S
arch/sparc/mm/tlb.c
arch/sparc/mm/tsb.c
arch/sparc/mm/tsunami.S
arch/sparc/mm/ultra.S
arch/sparc/mm/viking.S
arch/sparc/net/bpf_jit_32.h
arch/sparc/net/bpf_jit_64.h
arch/sparc/net/bpf_jit_asm_32.S
arch/sparc/net/bpf_jit_asm_64.S
arch/sparc/net/bpf_jit_comp_32.c
arch/sparc/net/bpf_jit_comp_64.c
arch/sparc/power/hibernate.c
arch/sparc/power/hibernate_asm.S
arch/sparc/prom/Makefile
arch/sparc/prom/bootstr_32.c
arch/sparc/prom/bootstr_64.c
arch/sparc/prom/cif.S
arch/sparc/prom/console_32.c
arch/sparc/prom/console_64.c
arch/sparc/prom/init_32.c
arch/sparc/prom/init_64.c
arch/sparc/prom/memory.c
arch/sparc/prom/misc_32.c
arch/sparc/prom/misc_64.c
arch/sparc/prom/mp.c
arch/sparc/prom/p1275.c
arch/sparc/prom/printf.c
arch/sparc/prom/ranges.c
arch/sparc/prom/tree_32.c
arch/sparc/prom/tree_64.c
arch/tile/Kconfig
arch/tile/Kconfig.debug
arch/tile/Makefile
arch/tile/configs/tilegx_defconfig
arch/tile/configs/tilepro_defconfig
arch/tile/gxio/Kconfig
arch/tile/gxio/Makefile
arch/tile/include/asm/div64.h
arch/tile/include/asm/irq_work.h
arch/tile/include/asm/word-at-a-time.h
arch/tile/include/uapi/arch/abi.h
arch/tile/include/uapi/arch/chip.h
arch/tile/include/uapi/arch/chip_tilegx.h
arch/tile/include/uapi/arch/chip_tilepro.h
arch/tile/include/uapi/arch/icache.h
arch/tile/include/uapi/arch/interrupts.h
arch/tile/include/uapi/arch/interrupts_32.h
arch/tile/include/uapi/arch/interrupts_64.h
arch/tile/include/uapi/arch/intreg.h
arch/tile/include/uapi/arch/opcode.h
arch/tile/include/uapi/arch/opcode_tilegx.h
arch/tile/include/uapi/arch/opcode_tilepro.h
arch/tile/include/uapi/arch/sim.h
arch/tile/include/uapi/arch/sim_def.h
arch/tile/include/uapi/arch/spr_def.h
arch/tile/include/uapi/arch/spr_def_32.h
arch/tile/include/uapi/arch/spr_def_64.h
arch/tile/include/uapi/asm/auxvec.h
arch/tile/include/uapi/asm/bitsperlong.h
arch/tile/include/uapi/asm/byteorder.h
arch/tile/include/uapi/asm/cachectl.h
arch/tile/include/uapi/asm/hardwall.h
arch/tile/include/uapi/asm/kvm_para.h
arch/tile/include/uapi/asm/mman.h
arch/tile/include/uapi/asm/ptrace.h
arch/tile/include/uapi/asm/setup.h
arch/tile/include/uapi/asm/sigcontext.h
arch/tile/include/uapi/asm/siginfo.h
arch/tile/include/uapi/asm/signal.h
arch/tile/include/uapi/asm/stat.h
arch/tile/include/uapi/asm/swab.h
arch/tile/include/uapi/asm/unistd.h
arch/tile/kernel/Makefile
arch/tile/kernel/hvglue.S
arch/tile/kernel/setup.c
arch/tile/kernel/time.c
arch/tile/kernel/vdso/Makefile
arch/tile/kernel/vmlinux.lds.S
arch/tile/kvm/Kconfig
arch/tile/lib/Makefile
arch/um/Kconfig.char
arch/um/Kconfig.common
arch/um/Kconfig.debug
arch/um/Kconfig.net
arch/um/Kconfig.rest
arch/um/Kconfig.um
arch/um/drivers/cow.h
arch/um/drivers/cow_sys.h
arch/um/drivers/slip.h
arch/um/drivers/slip_common.c
arch/um/drivers/slip_common.h
arch/um/drivers/slirp.h
arch/um/drivers/stderr_console.c
arch/um/include/asm/bugs.h
arch/um/include/asm/cache.h
arch/um/include/asm/common.lds.S
arch/um/include/asm/dma.h
arch/um/include/asm/fixmap.h
arch/um/include/asm/hardirq.h
arch/um/include/asm/io.h
arch/um/include/asm/irq.h
arch/um/include/asm/irqflags.h
arch/um/include/asm/processor-generic.h
arch/um/include/asm/sections.h
arch/um/include/asm/setup.h
arch/um/include/asm/smp.h
arch/um/include/asm/stacktrace.h
arch/um/include/asm/sysrq.h
arch/um/include/asm/timex.h
arch/um/include/asm/tlb.h
arch/um/include/shared/common-offsets.h
arch/um/include/shared/init.h
arch/um/include/shared/longjmp.h
arch/um/kernel/dyn.lds.S
arch/um/kernel/kmsg_dump.c
arch/um/kernel/time.c
arch/um/kernel/uml.lds.S
arch/um/os-Linux/elf_aux.c
arch/um/os-Linux/user_syms.c
arch/um/scripts/Makefile.rules
arch/unicore32/Kconfig
arch/unicore32/Kconfig.debug
arch/unicore32/include/mach/regs-ac97.h
arch/unicore32/include/mach/regs-dmac.h
arch/unicore32/include/mach/regs-gpio.h
arch/unicore32/include/mach/regs-i2c.h
arch/unicore32/include/mach/regs-intc.h
arch/unicore32/include/mach/regs-nand.h
arch/unicore32/include/mach/regs-ost.h
arch/unicore32/include/mach/regs-pci.h
arch/unicore32/include/mach/regs-pm.h
arch/unicore32/include/mach/regs-ps2.h
arch/unicore32/include/mach/regs-resetc.h
arch/unicore32/include/mach/regs-rtc.h
arch/unicore32/include/mach/regs-sdc.h
arch/unicore32/include/mach/regs-spi.h
arch/unicore32/include/mach/regs-umal.h
arch/unicore32/include/mach/regs-unigfx.h
arch/unicore32/include/uapi/asm/byteorder.h
arch/unicore32/include/uapi/asm/ptrace.h
arch/unicore32/include/uapi/asm/sigcontext.h
arch/unicore32/include/uapi/asm/unistd.h
arch/unicore32/kernel/Makefile
arch/unicore32/kernel/ksyms.h
arch/unicore32/lib/Makefile
arch/unicore32/mm/Kconfig
arch/unicore32/mm/Makefile
arch/x86/Kconfig
arch/x86/Kconfig.cpu
arch/x86/Kconfig.debug
arch/x86/Makefile
arch/x86/Makefile.um
arch/x86/Makefile_32.cpu
arch/x86/boot/code16gcc.h
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/cmdline.c
arch/x86/boot/compressed/cpuflags.c
arch/x86/boot/compressed/eboot.h
arch/x86/boot/compressed/efi_stub_32.S
arch/x86/boot/compressed/efi_thunk_64.S
arch/x86/boot/compressed/error.c
arch/x86/boot/compressed/error.h
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/kaslr.c
arch/x86/boot/compressed/misc.c
arch/x86/boot/compressed/misc.h
arch/x86/boot/compressed/pagetable.c
arch/x86/boot/compressed/string.c
arch/x86/boot/compressed/vmlinux.lds.S
arch/x86/boot/cpuflags.c
arch/x86/boot/cpuflags.h
arch/x86/boot/ctype.h
arch/x86/boot/early_serial_console.c
arch/x86/boot/header.S
arch/x86/boot/string.h
arch/x86/boot/tools/build.c
arch/x86/crypto/Makefile
arch/x86/crypto/blowfish-x86_64-asm_64.S
arch/x86/crypto/camellia-x86_64-asm_64.S
arch/x86/crypto/cast5-avx-x86_64-asm_64.S
arch/x86/crypto/cast6-avx-x86_64-asm_64.S
arch/x86/crypto/chacha20-avx2-x86_64.S
arch/x86/crypto/chacha20-ssse3-x86_64.S
arch/x86/crypto/des3_ede-asm_64.S
arch/x86/crypto/salsa20-x86_64-asm_64.S
arch/x86/crypto/sha1-mb/Makefile
arch/x86/crypto/sha1_avx2_x86_64_asm.S
arch/x86/crypto/sha1_ssse3_asm.S
arch/x86/crypto/sha256-avx-asm.S
arch/x86/crypto/sha256-avx2-asm.S
arch/x86/crypto/sha256-mb/Makefile
arch/x86/crypto/sha256-ssse3-asm.S
arch/x86/crypto/sha512-avx2-asm.S
arch/x86/crypto/sha512-mb/Makefile
arch/x86/crypto/twofish-avx-x86_64-asm_64.S
arch/x86/entry/Makefile
arch/x86/entry/calling.h
arch/x86/entry/entry_32.S
arch/x86/entry/entry_64.S
arch/x86/entry/entry_64_compat.S
arch/x86/entry/syscall_32.c
arch/x86/entry/syscall_64.c
arch/x86/entry/syscalls/Makefile
arch/x86/entry/syscalls/syscallhdr.sh
arch/x86/entry/syscalls/syscalltbl.sh
arch/x86/entry/vdso/Makefile
arch/x86/entry/vdso/vdso-layout.lds.S
arch/x86/entry/vdso/vdso.lds.S
arch/x86/entry/vdso/vdso2c.h
arch/x86/entry/vdso/vdso32-setup.c
arch/x86/entry/vdso/vdso32/note.S
arch/x86/entry/vdso/vdso32/sigreturn.S
arch/x86/entry/vdso/vdso32/system_call.S
arch/x86/entry/vdso/vdso32/vclock_gettime.c
arch/x86/entry/vdso/vdso32/vdso32.lds.S
arch/x86/entry/vdso/vdsox32.lds.S
arch/x86/entry/vsyscall/vsyscall_64.c
arch/x86/entry/vsyscall/vsyscall_gtod.c
arch/x86/entry/vsyscall/vsyscall_trace.h
arch/x86/events/Kconfig
arch/x86/events/amd/Makefile
arch/x86/events/intel/Makefile
arch/x86/events/intel/bts.c
arch/x86/events/intel/core.c
arch/x86/events/intel/cstate.c
arch/x86/events/intel/ds.c
arch/x86/events/intel/knc.c
arch/x86/events/intel/lbr.c
arch/x86/events/intel/p6.c
arch/x86/events/intel/rapl.c
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_nhmex.c
arch/x86/events/intel/uncore_snb.c
arch/x86/events/intel/uncore_snbep.c
arch/x86/events/msr.c
arch/x86/hyperv/hv_init.c
arch/x86/hyperv/mmu.c
arch/x86/ia32/audit.c
arch/x86/ia32/ia32_signal.c
arch/x86/ia32/sys_ia32.c
arch/x86/include/asm/acpi.h
arch/x86/include/asm/agp.h
arch/x86/include/asm/alternative-asm.h
arch/x86/include/asm/alternative.h
arch/x86/include/asm/amd_nb.h
arch/x86/include/asm/apic_flat_64.h
arch/x86/include/asm/apicdef.h
arch/x86/include/asm/apm.h
arch/x86/include/asm/arch_hweight.h
arch/x86/include/asm/asm-prototypes.h
arch/x86/include/asm/asm.h
arch/x86/include/asm/atomic.h
arch/x86/include/asm/atomic64_32.h
arch/x86/include/asm/atomic64_64.h
arch/x86/include/asm/barrier.h
arch/x86/include/asm/bios_ebda.h
arch/x86/include/asm/bitops.h
arch/x86/include/asm/boot.h
arch/x86/include/asm/bootparam_utils.h
arch/x86/include/asm/bug.h
arch/x86/include/asm/bugs.h
arch/x86/include/asm/cache.h
arch/x86/include/asm/cacheflush.h
arch/x86/include/asm/ce4100.h
arch/x86/include/asm/checksum.h
arch/x86/include/asm/checksum_32.h
arch/x86/include/asm/checksum_64.h
arch/x86/include/asm/clocksource.h
arch/x86/include/asm/cmdline.h
arch/x86/include/asm/cmpxchg.h
arch/x86/include/asm/cmpxchg_32.h
arch/x86/include/asm/cmpxchg_64.h
arch/x86/include/asm/compat.h
arch/x86/include/asm/cpu.h
arch/x86/include/asm/cpu_device_id.h
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/cpumask.h
arch/x86/include/asm/crash.h
arch/x86/include/asm/crypto/aes.h
arch/x86/include/asm/crypto/camellia.h
arch/x86/include/asm/crypto/glue_helper.h
arch/x86/include/asm/crypto/serpent-avx.h
arch/x86/include/asm/crypto/serpent-sse2.h
arch/x86/include/asm/crypto/twofish.h
arch/x86/include/asm/current.h
arch/x86/include/asm/debugreg.h
arch/x86/include/asm/delay.h
arch/x86/include/asm/desc.h
arch/x86/include/asm/desc_defs.h
arch/x86/include/asm/device.h
arch/x86/include/asm/div64.h
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/dma.h
arch/x86/include/asm/dmi.h
arch/x86/include/asm/dwarf2.h
arch/x86/include/asm/e820/api.h
arch/x86/include/asm/e820/types.h
arch/x86/include/asm/edac.h
arch/x86/include/asm/efi.h
arch/x86/include/asm/elf.h
arch/x86/include/asm/emergency-restart.h
arch/x86/include/asm/entry_arch.h
arch/x86/include/asm/espfix.h
arch/x86/include/asm/export.h
arch/x86/include/asm/extable.h
arch/x86/include/asm/fb.h
arch/x86/include/asm/fpu/api.h
arch/x86/include/asm/fpu/internal.h
arch/x86/include/asm/fpu/regset.h
arch/x86/include/asm/fpu/signal.h
arch/x86/include/asm/fpu/types.h
arch/x86/include/asm/fpu/xstate.h
arch/x86/include/asm/frame.h
arch/x86/include/asm/ftrace.h
arch/x86/include/asm/futex.h
arch/x86/include/asm/gart.h
arch/x86/include/asm/hardirq.h
arch/x86/include/asm/highmem.h
arch/x86/include/asm/hpet.h
arch/x86/include/asm/hugetlb.h
arch/x86/include/asm/hw_breakpoint.h
arch/x86/include/asm/hw_irq.h
arch/x86/include/asm/hypertransport.h
arch/x86/include/asm/i8259.h
arch/x86/include/asm/ia32.h
arch/x86/include/asm/ia32_unistd.h
arch/x86/include/asm/init.h
arch/x86/include/asm/inst.h
arch/x86/include/asm/intel-family.h
arch/x86/include/asm/intel_mid_vrtc.h
arch/x86/include/asm/intel_pmc_ipc.h
arch/x86/include/asm/intel_pt.h
arch/x86/include/asm/intel_punit_ipc.h
arch/x86/include/asm/intel_rdt_sched.h
arch/x86/include/asm/intel_scu_ipc.h
arch/x86/include/asm/io.h
arch/x86/include/asm/io_apic.h
arch/x86/include/asm/iommu.h
arch/x86/include/asm/iommu_table.h
arch/x86/include/asm/iosf_mbi.h
arch/x86/include/asm/irq.h
arch/x86/include/asm/irq_regs.h
arch/x86/include/asm/irq_vectors.h
arch/x86/include/asm/irq_work.h
arch/x86/include/asm/irqdomain.h
arch/x86/include/asm/irqflags.h
arch/x86/include/asm/jump_label.h
arch/x86/include/asm/kasan.h
arch/x86/include/asm/kaslr.h
arch/x86/include/asm/kbdleds.h
arch/x86/include/asm/kdebug.h
arch/x86/include/asm/kexec-bzimage64.h
arch/x86/include/asm/kexec.h
arch/x86/include/asm/kgdb.h
arch/x86/include/asm/kmap_types.h
arch/x86/include/asm/kmemcheck.h
arch/x86/include/asm/kvm_emulate.h
arch/x86/include/asm/kvm_guest.h
arch/x86/include/asm/kvm_page_track.h
arch/x86/include/asm/kvm_para.h
arch/x86/include/asm/kvmclock.h
arch/x86/include/asm/linkage.h
arch/x86/include/asm/local.h
arch/x86/include/asm/mach_timer.h
arch/x86/include/asm/mach_traps.h
arch/x86/include/asm/math_emu.h
arch/x86/include/asm/mc146818rtc.h
arch/x86/include/asm/mce.h
arch/x86/include/asm/microcode.h
arch/x86/include/asm/microcode_amd.h
arch/x86/include/asm/microcode_intel.h
arch/x86/include/asm/misc.h
arch/x86/include/asm/mmconfig.h
arch/x86/include/asm/mmu.h
arch/x86/include/asm/mmu_context.h
arch/x86/include/asm/mmx.h
arch/x86/include/asm/mmzone.h
arch/x86/include/asm/mmzone_32.h
arch/x86/include/asm/mmzone_64.h
arch/x86/include/asm/module.h
arch/x86/include/asm/mpspec.h
arch/x86/include/asm/mpspec_def.h
arch/x86/include/asm/mpx.h
arch/x86/include/asm/mshyperv.h
arch/x86/include/asm/msi.h
arch/x86/include/asm/msidef.h
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/msr-trace.h
arch/x86/include/asm/msr.h
arch/x86/include/asm/mwait.h
arch/x86/include/asm/nmi.h
arch/x86/include/asm/nops.h
arch/x86/include/asm/numa.h
arch/x86/include/asm/numa_32.h
arch/x86/include/asm/olpc.h
arch/x86/include/asm/olpc_ofw.h
arch/x86/include/asm/page.h
arch/x86/include/asm/page_32.h
arch/x86/include/asm/page_32_types.h
arch/x86/include/asm/page_64.h
arch/x86/include/asm/page_64_types.h
arch/x86/include/asm/page_types.h
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/include/asm/parport.h
arch/x86/include/asm/pat.h
arch/x86/include/asm/pci-direct.h
arch/x86/include/asm/pci-functions.h
arch/x86/include/asm/pci.h
arch/x86/include/asm/pci_64.h
arch/x86/include/asm/pci_x86.h
arch/x86/include/asm/percpu.h
arch/x86/include/asm/perf_event.h
arch/x86/include/asm/perf_event_p4.h
arch/x86/include/asm/pgalloc.h
arch/x86/include/asm/pgtable-2level.h
arch/x86/include/asm/pgtable-2level_types.h
arch/x86/include/asm/pgtable-3level.h
arch/x86/include/asm/pgtable-3level_types.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_32.h
arch/x86/include/asm/pgtable_32_types.h
arch/x86/include/asm/pgtable_64.h
arch/x86/include/asm/pgtable_64_types.h
arch/x86/include/asm/pgtable_types.h
arch/x86/include/asm/pkeys.h
arch/x86/include/asm/pm-trace.h
arch/x86/include/asm/posix_types.h
arch/x86/include/asm/preempt.h
arch/x86/include/asm/probe_roms.h
arch/x86/include/asm/processor-cyrix.h
arch/x86/include/asm/processor-flags.h
arch/x86/include/asm/processor.h
arch/x86/include/asm/proto.h
arch/x86/include/asm/ptrace.h
arch/x86/include/asm/purgatory.h
arch/x86/include/asm/pvclock-abi.h
arch/x86/include/asm/pvclock.h
arch/x86/include/asm/qrwlock.h
arch/x86/include/asm/qspinlock.h
arch/x86/include/asm/qspinlock_paravirt.h
arch/x86/include/asm/realmode.h
arch/x86/include/asm/reboot.h
arch/x86/include/asm/reboot_fixups.h
arch/x86/include/asm/rio.h
arch/x86/include/asm/rmwcc.h
arch/x86/include/asm/rwsem.h
arch/x86/include/asm/seccomp.h
arch/x86/include/asm/sections.h
arch/x86/include/asm/segment.h
arch/x86/include/asm/serial.h
arch/x86/include/asm/set_memory.h
arch/x86/include/asm/setup.h
arch/x86/include/asm/shmparam.h
arch/x86/include/asm/sigcontext.h
arch/x86/include/asm/sigframe.h
arch/x86/include/asm/sighandling.h
arch/x86/include/asm/signal.h
arch/x86/include/asm/simd.h
arch/x86/include/asm/smp.h
arch/x86/include/asm/sparsemem.h
arch/x86/include/asm/special_insns.h
arch/x86/include/asm/spinlock.h
arch/x86/include/asm/spinlock_types.h
arch/x86/include/asm/sta2x11.h
arch/x86/include/asm/stackprotector.h
arch/x86/include/asm/stacktrace.h
arch/x86/include/asm/string.h
arch/x86/include/asm/string_32.h
arch/x86/include/asm/string_64.h
arch/x86/include/asm/suspend.h
arch/x86/include/asm/suspend_32.h
arch/x86/include/asm/suspend_64.h
arch/x86/include/asm/svm.h
arch/x86/include/asm/swiotlb.h
arch/x86/include/asm/switch_to.h
arch/x86/include/asm/sync_bitops.h
arch/x86/include/asm/text-patching.h
arch/x86/include/asm/thread_info.h
arch/x86/include/asm/time.h
arch/x86/include/asm/timer.h
arch/x86/include/asm/timex.h
arch/x86/include/asm/tlb.h
arch/x86/include/asm/tlbbatch.h
arch/x86/include/asm/tlbflush.h
arch/x86/include/asm/trace/exceptions.h
arch/x86/include/asm/trace/fpu.h
arch/x86/include/asm/trace/irq_vectors.h
arch/x86/include/asm/trace/mpx.h
arch/x86/include/asm/trace_clock.h
arch/x86/include/asm/traps.h
arch/x86/include/asm/tsc.h
arch/x86/include/asm/uaccess.h
arch/x86/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess_64.h
arch/x86/include/asm/unaligned.h
arch/x86/include/asm/unistd.h
arch/x86/include/asm/unwind.h
arch/x86/include/asm/user.h
arch/x86/include/asm/user32.h
arch/x86/include/asm/user_32.h
arch/x86/include/asm/user_64.h
arch/x86/include/asm/uv/uv.h
arch/x86/include/asm/vdso.h
arch/x86/include/asm/vga.h
arch/x86/include/asm/vgtod.h
arch/x86/include/asm/vm86.h
arch/x86/include/asm/vsyscall.h
arch/x86/include/asm/word-at-a-time.h
arch/x86/include/asm/x2apic.h
arch/x86/include/asm/x86_init.h
arch/x86/include/asm/xen/events.h
arch/x86/include/asm/xen/hypercall.h
arch/x86/include/asm/xen/interface_32.h
arch/x86/include/asm/xen/interface_64.h
arch/x86/include/asm/xen/page-coherent.h
arch/x86/include/asm/xen/page.h
arch/x86/include/asm/xen/pci.h
arch/x86/include/asm/xen/swiotlb-xen.h
arch/x86/include/asm/xen/trace_types.h
arch/x86/include/asm/xor_64.h
arch/x86/include/uapi/asm/a.out.h
arch/x86/include/uapi/asm/auxvec.h
arch/x86/include/uapi/asm/bitsperlong.h
arch/x86/include/uapi/asm/boot.h
arch/x86/include/uapi/asm/bootparam.h
arch/x86/include/uapi/asm/byteorder.h
arch/x86/include/uapi/asm/debugreg.h
arch/x86/include/uapi/asm/e820.h
arch/x86/include/uapi/asm/hw_breakpoint.h
arch/x86/include/uapi/asm/hwcap2.h
arch/x86/include/uapi/asm/hyperv.h
arch/x86/include/uapi/asm/ist.h
arch/x86/include/uapi/asm/kvm.h
arch/x86/include/uapi/asm/kvm_para.h
arch/x86/include/uapi/asm/kvm_perf.h
arch/x86/include/uapi/asm/ldt.h
arch/x86/include/uapi/asm/mce.h
arch/x86/include/uapi/asm/mman.h
arch/x86/include/uapi/asm/msr.h
arch/x86/include/uapi/asm/mtrr.h
arch/x86/include/uapi/asm/perf_regs.h
arch/x86/include/uapi/asm/posix_types.h
arch/x86/include/uapi/asm/posix_types_32.h
arch/x86/include/uapi/asm/posix_types_64.h
arch/x86/include/uapi/asm/posix_types_x32.h
arch/x86/include/uapi/asm/prctl.h
arch/x86/include/uapi/asm/processor-flags.h
arch/x86/include/uapi/asm/ptrace-abi.h
arch/x86/include/uapi/asm/ptrace.h
arch/x86/include/uapi/asm/sembuf.h
arch/x86/include/uapi/asm/sigcontext.h
arch/x86/include/uapi/asm/sigcontext32.h
arch/x86/include/uapi/asm/siginfo.h
arch/x86/include/uapi/asm/signal.h
arch/x86/include/uapi/asm/stat.h
arch/x86/include/uapi/asm/statfs.h
arch/x86/include/uapi/asm/svm.h
arch/x86/include/uapi/asm/swab.h
arch/x86/include/uapi/asm/types.h
arch/x86/include/uapi/asm/ucontext.h
arch/x86/include/uapi/asm/unistd.h
arch/x86/include/uapi/asm/vm86.h
arch/x86/include/uapi/asm/vmx.h
arch/x86/include/uapi/asm/vsyscall.h
arch/x86/kernel/Makefile
arch/x86/kernel/acpi/Makefile
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/acpi/sleep.h
arch/x86/kernel/amd_nb.c
arch/x86/kernel/aperture_64.c
arch/x86/kernel/apic/Makefile
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/apic_noop.c
arch/x86/kernel/apic/bigsmp_32.c
arch/x86/kernel/apic/hw_nmi.c
arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/ipi.c
arch/x86/kernel/apic/x2apic_cluster.c
arch/x86/kernel/apic/x2apic_phys.c
arch/x86/kernel/asm-offsets.c
arch/x86/kernel/asm-offsets_32.c
arch/x86/kernel/asm-offsets_64.c
arch/x86/kernel/audit_64.c
arch/x86/kernel/bootflag.c
arch/x86/kernel/check.c
arch/x86/kernel/cpu/Makefile
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/aperfmperf.c
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/cpu/centaur.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/cpu.h
arch/x86/kernel/cpu/cyrix.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/intel_cacheinfo.c
arch/x86/kernel/cpu/intel_rdt.h
arch/x86/kernel/cpu/match.c
arch/x86/kernel/cpu/mcheck/Makefile
arch/x86/kernel/cpu/mcheck/dev-mcelog.c
arch/x86/kernel/cpu/mcheck/mce-internal.h
arch/x86/kernel/cpu/mcheck/mce_amd.c
arch/x86/kernel/cpu/mcheck/mce_intel.c
arch/x86/kernel/cpu/mcheck/p5.c
arch/x86/kernel/cpu/mcheck/threshold.c
arch/x86/kernel/cpu/mcheck/winchip.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/microcode/intel.c
arch/x86/kernel/cpu/mkcapflags.sh
arch/x86/kernel/cpu/mtrr/amd.c
arch/x86/kernel/cpu/mtrr/centaur.c
arch/x86/kernel/cpu/mtrr/cyrix.c
arch/x86/kernel/cpu/mtrr/if.c
arch/x86/kernel/cpu/mtrr/mtrr.h
arch/x86/kernel/cpu/perfctr-watchdog.c
arch/x86/kernel/cpu/powerflags.c
arch/x86/kernel/cpu/proc.c
arch/x86/kernel/cpu/topology.c
arch/x86/kernel/cpu/transmeta.c
arch/x86/kernel/cpu/umc.c
arch/x86/kernel/crash_dump_32.c
arch/x86/kernel/crash_dump_64.c
arch/x86/kernel/devicetree.c
arch/x86/kernel/doublefault.c
arch/x86/kernel/dumpstack_32.c
arch/x86/kernel/dumpstack_64.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/early_printk.c
arch/x86/kernel/ebda.c
arch/x86/kernel/fpu/bugs.c
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/init.c
arch/x86/kernel/fpu/regset.c
arch/x86/kernel/fpu/signal.c
arch/x86/kernel/fpu/xstate.c
arch/x86/kernel/ftrace.c
arch/x86/kernel/ftrace_32.S
arch/x86/kernel/ftrace_64.S
arch/x86/kernel/head32.c
arch/x86/kernel/head64.c
arch/x86/kernel/head_32.S
arch/x86/kernel/head_64.S
arch/x86/kernel/i8253.c
arch/x86/kernel/i8259.c
arch/x86/kernel/io_delay.c
arch/x86/kernel/ioport.c
arch/x86/kernel/irq_32.c
arch/x86/kernel/irq_64.c
arch/x86/kernel/irq_work.c
arch/x86/kernel/irqinit.c
arch/x86/kernel/jump_label.c
arch/x86/kernel/kprobes/common.h
arch/x86/kernel/kprobes/core.c
arch/x86/kernel/ksysfs.c
arch/x86/kernel/kvm.c
arch/x86/kernel/kvmclock.c
arch/x86/kernel/ldt.c
arch/x86/kernel/mmconf-fam10h_64.c
arch/x86/kernel/module.c
arch/x86/kernel/mpparse.c
arch/x86/kernel/nmi_selftest.c
arch/x86/kernel/paravirt-spinlocks.c
arch/x86/kernel/paravirt_patch_32.c
arch/x86/kernel/paravirt_patch_64.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-iommu_table.c
arch/x86/kernel/pci-nommu.c
arch/x86/kernel/pci-swiotlb.c
arch/x86/kernel/pcspeaker.c
arch/x86/kernel/perf_regs.c
arch/x86/kernel/platform-quirks.c
arch/x86/kernel/pmem.c
arch/x86/kernel/probe_roms.c
arch/x86/kernel/process.c
arch/x86/kernel/quirks.c
arch/x86/kernel/reboot.c
arch/x86/kernel/reboot_fixups_32.c
arch/x86/kernel/resource.c
arch/x86/kernel/rtc.c
arch/x86/kernel/setup_percpu.c
arch/x86/kernel/signal.c
arch/x86/kernel/signal_compat.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/step.c
arch/x86/kernel/sys_x86_64.c
arch/x86/kernel/time.c
arch/x86/kernel/tls.c
arch/x86/kernel/trace_clock.c
arch/x86/kernel/tracepoint.c
arch/x86/kernel/traps.c
arch/x86/kernel/tsc_sync.c
arch/x86/kernel/unwind_frame.c
arch/x86/kernel/unwind_orc.c
arch/x86/kernel/vm86_32.c
arch/x86/kernel/vmlinux.lds.S
arch/x86/kvm/Kconfig
arch/x86/kvm/Makefile
arch/x86/kvm/cpuid.h
arch/x86/kvm/emulate.c
arch/x86/kvm/i8254.h
arch/x86/kvm/ioapic.h
arch/x86/kvm/kvm_cache_regs.h
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/mmutrace.h
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/pmu.h
arch/x86/kvm/trace.h
arch/x86/kvm/tss.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h
arch/x86/lib/Makefile
arch/x86/lib/cache-smp.c
arch/x86/lib/copy_page_64.S
arch/x86/lib/csum-partial_64.c
arch/x86/lib/delay.c
arch/x86/lib/getuser.S
arch/x86/lib/hweight.S
arch/x86/lib/kaslr.c
arch/x86/lib/memcpy_32.c
arch/x86/lib/memmove_64.S
arch/x86/lib/memset_64.S
arch/x86/lib/misc.c
arch/x86/lib/mmx_32.c
arch/x86/lib/msr-reg-export.c
arch/x86/lib/msr-reg.S
arch/x86/lib/msr-smp.c
arch/x86/lib/msr.c
arch/x86/lib/putuser.S
arch/x86/lib/string_32.c
arch/x86/lib/strstr_32.c
arch/x86/lib/usercopy_32.c
arch/x86/math-emu/Makefile
arch/x86/math-emu/control_w.h
arch/x86/math-emu/div_Xsig.S
arch/x86/math-emu/div_small.S
arch/x86/math-emu/errors.c
arch/x86/math-emu/exception.h
arch/x86/math-emu/fpu_arith.c
arch/x86/math-emu/fpu_asm.h
arch/x86/math-emu/fpu_aux.c
arch/x86/math-emu/fpu_emu.h
arch/x86/math-emu/fpu_entry.c
arch/x86/math-emu/fpu_etc.c
arch/x86/math-emu/fpu_proto.h
arch/x86/math-emu/fpu_system.h
arch/x86/math-emu/fpu_tags.c
arch/x86/math-emu/fpu_trig.c
arch/x86/math-emu/get_address.c
arch/x86/math-emu/load_store.c
arch/x86/math-emu/mul_Xsig.S
arch/x86/math-emu/poly.h
arch/x86/math-emu/poly_2xm1.c
arch/x86/math-emu/poly_atan.c
arch/x86/math-emu/poly_l2.c
arch/x86/math-emu/poly_sin.c
arch/x86/math-emu/poly_tan.c
arch/x86/math-emu/polynom_Xsig.S
arch/x86/math-emu/reg_add_sub.c
arch/x86/math-emu/reg_compare.c
arch/x86/math-emu/reg_constant.c
arch/x86/math-emu/reg_constant.h
arch/x86/math-emu/reg_convert.c
arch/x86/math-emu/reg_divide.c
arch/x86/math-emu/reg_ld_str.c
arch/x86/math-emu/reg_mul.c
arch/x86/math-emu/reg_norm.S
arch/x86/math-emu/reg_round.S
arch/x86/math-emu/reg_u_add.S
arch/x86/math-emu/reg_u_div.S
arch/x86/math-emu/reg_u_mul.S
arch/x86/math-emu/reg_u_sub.S
arch/x86/math-emu/round_Xsig.S
arch/x86/math-emu/shr_Xsig.S
arch/x86/math-emu/status_w.h
arch/x86/math-emu/wm_shrx.S
arch/x86/math-emu/wm_sqrt.S
arch/x86/mm/Makefile
arch/x86/mm/amdtopology.c
arch/x86/mm/extable.c
arch/x86/mm/fault.c
arch/x86/mm/hugetlbpage.c
arch/x86/mm/ident_map.c
arch/x86/mm/kasan_init_64.c
arch/x86/mm/kaslr.c
arch/x86/mm/kmemcheck/error.c
arch/x86/mm/kmemcheck/error.h
arch/x86/mm/kmemcheck/opcode.c
arch/x86/mm/kmemcheck/opcode.h
arch/x86/mm/kmemcheck/pte.c
arch/x86/mm/kmemcheck/pte.h
arch/x86/mm/kmemcheck/selftest.c
arch/x86/mm/kmemcheck/selftest.h
arch/x86/mm/kmemcheck/shadow.h
arch/x86/mm/kmmio.c
arch/x86/mm/mem_encrypt.c
arch/x86/mm/mm_internal.h
arch/x86/mm/mpx.c
arch/x86/mm/numa_64.c
arch/x86/mm/numa_emulation.c
arch/x86/mm/numa_internal.h
arch/x86/mm/pageattr-test.c
arch/x86/mm/pat_internal.h
arch/x86/mm/pat_rbtree.c
arch/x86/mm/pgtable.c
arch/x86/mm/pgtable_32.c
arch/x86/mm/physaddr.c
arch/x86/mm/physaddr.h
arch/x86/mm/pkeys.c
arch/x86/mm/setup_nx.c
arch/x86/mm/srat.c
arch/x86/mm/tlb.c
arch/x86/net/bpf_jit_comp.c
arch/x86/oprofile/Makefile
arch/x86/pci/Makefile
arch/x86/pci/acpi.c
arch/x86/pci/amd_bus.c
arch/x86/pci/bus_numa.c
arch/x86/pci/bus_numa.h
arch/x86/pci/direct.c
arch/x86/pci/early.c
arch/x86/pci/fixup.c
arch/x86/pci/i386.c
arch/x86/pci/init.c
arch/x86/pci/intel_mid_pci.c
arch/x86/pci/irq.c
arch/x86/pci/mmconfig-shared.c
arch/x86/pci/mmconfig_64.c
arch/x86/pci/pcbios.c
arch/x86/platform/Makefile
arch/x86/platform/efi/Makefile
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/efi_32.c
arch/x86/platform/efi/efi_64.c
arch/x86/platform/efi/efi_stub_32.S
arch/x86/platform/efi/efi_stub_64.S
arch/x86/platform/efi/efi_thunk_64.S
arch/x86/platform/intel-mid/device_libs/Makefile
arch/x86/platform/intel-quark/imr_selftest.c
arch/x86/platform/olpc/Makefile
arch/x86/platform/olpc/xo1-wakeup.S
arch/x86/power/Makefile
arch/x86/power/hibernate_asm_32.S
arch/x86/purgatory/Makefile
arch/x86/ras/Kconfig
arch/x86/realmode/init.c
arch/x86/realmode/rm/header.S
arch/x86/realmode/rm/realmode.h
arch/x86/realmode/rm/realmode.lds.S
arch/x86/realmode/rm/reboot.S
arch/x86/realmode/rm/stack.S
arch/x86/realmode/rm/trampoline_32.S
arch/x86/realmode/rm/trampoline_64.S
arch/x86/realmode/rm/trampoline_common.S
arch/x86/realmode/rm/wakemain.c
arch/x86/realmode/rm/wakeup.h
arch/x86/realmode/rm/wakeup_asm.S
arch/x86/realmode/rmpiggy.S
arch/x86/tools/Makefile
arch/x86/tools/distill.awk
arch/x86/tools/gen-insn-attr-x86.awk
arch/x86/tools/relocs.c
arch/x86/tools/relocs.h
arch/x86/tools/relocs_32.c
arch/x86/tools/relocs_64.c
arch/x86/tools/relocs_common.c
arch/x86/um/Kconfig
arch/x86/um/Makefile
arch/x86/um/asm/arch_hweight.h
arch/x86/um/asm/barrier.h
arch/x86/um/asm/checksum.h
arch/x86/um/asm/desc.h
arch/x86/um/asm/module.h
arch/x86/um/asm/processor.h
arch/x86/um/asm/ptrace.h
arch/x86/um/asm/segment.h
arch/x86/um/asm/syscall.h
arch/x86/um/elfcore.c
arch/x86/um/mem_64.c
arch/x86/um/os-Linux/mcontext.c
arch/x86/um/os-Linux/task_size.c
arch/x86/um/os-Linux/tls.c
arch/x86/um/setjmp_32.S
arch/x86/um/setjmp_64.S
arch/x86/um/shared/sysdep/archsetjmp.h
arch/x86/um/shared/sysdep/archsetjmp_32.h
arch/x86/um/shared/sysdep/archsetjmp_64.h
arch/x86/um/shared/sysdep/faultinfo.h
arch/x86/um/shared/sysdep/kernel-offsets.h
arch/x86/um/shared/sysdep/ptrace.h
arch/x86/um/shared/sysdep/ptrace_user.h
arch/x86/um/shared/sysdep/stub.h
arch/x86/um/shared/sysdep/syscalls.h
arch/x86/um/shared/sysdep/tls.h
arch/x86/um/stub_32.S
arch/x86/um/stub_64.S
arch/x86/um/sys_call_table_32.c
arch/x86/um/sys_call_table_64.c
arch/x86/um/syscalls_32.c
arch/x86/um/tls_64.c
arch/x86/um/user-offsets.c
arch/x86/um/vdso/Makefile
arch/x86/um/vdso/checkundef.sh
arch/x86/um/vdso/vdso-layout.lds.S
arch/x86/um/vdso/vdso.S
arch/x86/um/vdso/vdso.lds.S
arch/x86/xen/Kconfig
arch/x86/xen/Makefile
arch/x86/xen/apic.c
arch/x86/xen/debugfs.c
arch/x86/xen/debugfs.h
arch/x86/xen/enlighten.c
arch/x86/xen/enlighten_pv.c
arch/x86/xen/enlighten_pvh.c
arch/x86/xen/irq.c
arch/x86/xen/mmu.h
arch/x86/xen/mmu_hvm.c
arch/x86/xen/mmu_pv.c
arch/x86/xen/multicalls.c
arch/x86/xen/multicalls.h
arch/x86/xen/pmu.c
arch/x86/xen/pmu.h
arch/x86/xen/setup.c
arch/x86/xen/smp.c
arch/x86/xen/smp.h
arch/x86/xen/smp_hvm.c
arch/x86/xen/smp_pv.c
arch/x86/xen/spinlock.c
arch/x86/xen/suspend.c
arch/x86/xen/suspend_hvm.c
arch/x86/xen/suspend_pv.c
arch/x86/xen/time.c
arch/x86/xen/trace.c
arch/x86/xen/vga.c
arch/x86/xen/xen-asm.S
arch/x86/xen/xen-asm_32.S
arch/x86/xen/xen-asm_64.S
arch/x86/xen/xen-head.S
arch/x86/xen/xen-ops.h
arch/xtensa/Kconfig
arch/xtensa/Kconfig.debug
arch/xtensa/boot/boot-redboot/bootstrap.S
arch/xtensa/boot/dts/csp.dts
arch/xtensa/boot/dts/kc705.dts
arch/xtensa/boot/dts/kc705_nommu.dts
arch/xtensa/boot/dts/lx200mx.dts
arch/xtensa/boot/dts/lx60.dts
arch/xtensa/boot/dts/ml605.dts
arch/xtensa/boot/dts/xtfpga-flash-128m.dtsi
arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi
arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi
arch/xtensa/boot/dts/xtfpga.dtsi
arch/xtensa/boot/lib/Makefile
arch/xtensa/boot/lib/zmem.c
arch/xtensa/include/asm/flat.h
arch/xtensa/include/asm/nommu_context.h
arch/xtensa/include/asm/processor.h
arch/xtensa/include/asm/spinlock_types.h
arch/xtensa/include/asm/unistd.h
arch/xtensa/include/uapi/asm/byteorder.h
arch/xtensa/include/uapi/asm/ioctls.h
arch/xtensa/include/uapi/asm/ipcbuf.h
arch/xtensa/include/uapi/asm/mman.h
arch/xtensa/include/uapi/asm/msgbuf.h
arch/xtensa/include/uapi/asm/param.h
arch/xtensa/include/uapi/asm/poll.h
arch/xtensa/include/uapi/asm/posix_types.h
arch/xtensa/include/uapi/asm/ptrace.h
arch/xtensa/include/uapi/asm/sembuf.h
arch/xtensa/include/uapi/asm/setup.h
arch/xtensa/include/uapi/asm/shmbuf.h
arch/xtensa/include/uapi/asm/sigcontext.h
arch/xtensa/include/uapi/asm/signal.h
arch/xtensa/include/uapi/asm/socket.h
arch/xtensa/include/uapi/asm/sockios.h
arch/xtensa/include/uapi/asm/stat.h
arch/xtensa/include/uapi/asm/swab.h
arch/xtensa/include/uapi/asm/termbits.h
arch/xtensa/include/uapi/asm/types.h
arch/xtensa/include/uapi/asm/unistd.h
arch/xtensa/kernel/Makefile
arch/xtensa/kernel/irq.c
arch/xtensa/mm/mmu.c
arch/xtensa/oprofile/Makefile
block/Kconfig
block/Kconfig.iosched
block/Makefile
block/bio.c
block/blk-core.c
block/blk-ioc.c
block/blk-lib.c
block/blk-map.c
block/blk-merge.c
block/blk-mq-debugfs.c
block/blk-mq-debugfs.h
block/blk-mq-sched.h
block/blk-mq-tag.h
block/blk-mq.h
block/blk-softirq.c
block/blk-stat.h
block/blk-sysfs.c
block/blk-tag.c
block/blk-throttle.c
block/blk-wbt.h
block/blk.h
block/bounce.c
block/bsg-lib.c
block/cmdline-parser.c
block/compat_ioctl.c
block/partition-generic.c
block/partitions/Kconfig
block/partitions/Makefile
block/partitions/acorn.h
block/partitions/aix.c
block/partitions/amiga.c
block/partitions/atari.c
block/partitions/atari.h
block/partitions/check.c
block/partitions/check.h
block/partitions/cmdline.c
block/partitions/cmdline.h
block/partitions/ibm.c
block/partitions/karma.c
block/partitions/mac.c
block/partitions/mac.h
block/partitions/msdos.c
block/partitions/osf.c
block/partitions/sgi.c
block/partitions/sun.c
block/partitions/sysv68.c
block/partitions/ultrix.c
certs/Kconfig
certs/Makefile
certs/blacklist_hashes.c
certs/blacklist_nohashes.c
certs/system_certificates.S
crypto/Kconfig
crypto/Makefile
crypto/af_alg.c
crypto/asymmetric_keys/Kconfig
crypto/asymmetric_keys/Makefile
crypto/asymmetric_keys/asymmetric_type.c
crypto/asymmetric_keys/pkcs7_parser.c
crypto/async_tx/Kconfig
crypto/async_tx/Makefile
crypto/drbg.c
crypto/ecc_curve_defs.h
crypto/ripemd.h
crypto/shash.c
crypto/skcipher.c
crypto/xts.c
drivers/Kconfig
drivers/Makefile
drivers/accessibility/Kconfig
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/acpi_watchdog.c
drivers/acpi/acpica/Makefile
drivers/acpi/apei/Kconfig
drivers/acpi/apei/Makefile
drivers/acpi/apei/apei-internal.h
drivers/acpi/apei/ghes.c
drivers/acpi/arm64/iort.c
drivers/acpi/battery.h
drivers/acpi/dptf/Kconfig
drivers/acpi/event.c
drivers/acpi/nfit/Kconfig
drivers/acpi/pmic/intel_pmic.h
drivers/acpi/proc.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_pdc.c
drivers/acpi/property.c
drivers/acpi/reboot.c
drivers/acpi/sbshc.h
drivers/acpi/sleep.h
drivers/acpi/sysfs.c
drivers/acpi/wakeup.c
drivers/amba/Kconfig
drivers/android/Kconfig
drivers/android/binder.c
drivers/android/binder_alloc.c
drivers/android/binder_alloc.h
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/ata/ahci.c
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/libata-transport.h
drivers/ata/libata-zpodd.c
drivers/ata/sata_gemini.h
drivers/ata/sis.h
drivers/atm/Kconfig
drivers/atm/Makefile
drivers/atm/eni.h
drivers/atm/fore200e.h
drivers/atm/idt77105.h
drivers/atm/idt77252_tables.h
drivers/atm/midway.h
drivers/atm/nicstar.h
drivers/atm/nicstarmac.c
drivers/atm/solos-attrlist.c
drivers/atm/suni.h
drivers/atm/tonga.h
drivers/atm/uPD98401.h
drivers/atm/uPD98402.h
drivers/atm/zatm.h
drivers/atm/zeprom.h
drivers/auxdisplay/Kconfig
drivers/auxdisplay/Makefile
drivers/auxdisplay/charlcd.c
drivers/auxdisplay/img-ascii-lcd.c
drivers/auxdisplay/panel.c
drivers/base/Kconfig
drivers/base/Makefile
drivers/base/arch_topology.c
drivers/base/base.h
drivers/base/devtmpfs.c
drivers/base/dma-coherent.c
drivers/base/memory.c
drivers/base/node.c
drivers/base/platform.c
drivers/base/power/Makefile
drivers/base/power/main.c
drivers/base/power/opp/core.c
drivers/base/power/power.h
drivers/base/power/qos.c
drivers/base/property.c
drivers/base/regmap/Kconfig
drivers/base/regmap/Makefile
drivers/base/regmap/trace.h
drivers/base/test/Kconfig
drivers/bcma/Kconfig
drivers/bcma/Makefile
drivers/bcma/bcma_private.h
drivers/bcma/scan.h
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/brd.c
drivers/block/drbd/Kconfig
drivers/block/drbd/Makefile
drivers/block/drbd/drbd_debugfs.c
drivers/block/drbd/drbd_debugfs.h
drivers/block/drbd/drbd_interval.c
drivers/block/drbd/drbd_interval.h
drivers/block/drbd/drbd_nla.c
drivers/block/drbd/drbd_nla.h
drivers/block/drbd/drbd_protocol.h
drivers/block/drbd/drbd_state.h
drivers/block/drbd/drbd_state_change.h
drivers/block/drbd/drbd_strings.h
drivers/block/loop.h
drivers/block/mtip32xx/Kconfig
drivers/block/nbd.c
drivers/block/paride/Kconfig
drivers/block/paride/Makefile
drivers/block/paride/mkd
drivers/block/skd_main.c
drivers/block/virtio_blk.c
drivers/block/zram/Kconfig
drivers/block/zram/zram_drv.c
drivers/bluetooth/Kconfig
drivers/bluetooth/Makefile
drivers/bus/Kconfig
drivers/bus/Makefile
drivers/bus/mvebu-mbus.c
drivers/cdrom/Makefile
drivers/char/Kconfig
drivers/char/Makefile
drivers/char/agp/Kconfig
drivers/char/agp/Makefile
drivers/char/agp/intel-agp.h
drivers/char/agp/isoch.c
drivers/char/applicom.h
drivers/char/ds1302.c
drivers/char/hw_random/Makefile
drivers/char/hw_random/n2-asm.S
drivers/char/hw_random/n2rng.h
drivers/char/ipmi/Makefile
drivers/char/ipmi/ipmi_dmi.c
drivers/char/ipmi/ipmi_dmi.h
drivers/char/mem.c
drivers/char/misc.c
drivers/char/nwbutton.h
drivers/char/pcmcia/cm4040_cs.h
drivers/char/tpm/Makefile
drivers/char/tpm/st33zp24/Makefile
drivers/char/tpm/tpm-dev.h
drivers/char/tpm/tpm-interface.c
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm2-cmd.c
drivers/char/tpm/tpm_crb.c
drivers/char/tpm/tpm_eventlog.h
drivers/char/tpm/tpm_ibmvtpm.c
drivers/char/tpm/tpm_infineon.c
drivers/char/tpm/tpm_tis_core.c
drivers/clk/Makefile
drivers/clk/at91/Makefile
drivers/clk/bcm/Makefile
drivers/clk/clk-bulk.c
drivers/clk/clk-gemini.c
drivers/clk/clk-tango4.c
drivers/clk/h8300/clk-div.c
drivers/clk/h8300/clk-h8s2678.c
drivers/clk/hisilicon/Makefile
drivers/clk/imgtec/clk-boston.c
drivers/clk/imx/Makefile
drivers/clk/imx/clk-imx27.c
drivers/clk/imx/clk-pllv1.c
drivers/clk/imx/clk-pllv2.c
drivers/clk/imx/clk.c
drivers/clk/imx/clk.h
drivers/clk/ingenic/cgu.c
drivers/clk/ingenic/cgu.h
drivers/clk/ingenic/jz4740-cgu.c
drivers/clk/ingenic/jz4780-cgu.c
drivers/clk/mediatek/Makefile
drivers/clk/mmp/Makefile
drivers/clk/mmp/clk.c
drivers/clk/mmp/clk.h
drivers/clk/mmp/reset.c
drivers/clk/mmp/reset.h
drivers/clk/mvebu/Makefile
drivers/clk/mvebu/dove-divider.c
drivers/clk/mvebu/dove-divider.h
drivers/clk/qcom/Makefile
drivers/clk/renesas/Makefile
drivers/clk/renesas/clk-div6.h
drivers/clk/rockchip/Makefile
drivers/clk/rockchip/clk-rk3128.c
drivers/clk/samsung/Makefile
drivers/clk/samsung/clk-exynos4.c
drivers/clk/sirf/atlas6.h
drivers/clk/sirf/prima2.h
drivers/clk/socfpga/Makefile
drivers/clk/spear/Makefile
drivers/clk/st/clkgen.h
drivers/clk/sunxi-ng/Makefile
drivers/clk/sunxi-ng/ccu_mult.h
drivers/clk/sunxi-ng/ccu_mux.h
drivers/clk/sunxi/Makefile
drivers/clk/sunxi/clk-factors.h
drivers/clk/sunxi/clk-sun9i-cpus.c
drivers/clk/tegra/Makefile
drivers/clk/tegra/clk-id.h
drivers/clk/ti/Makefile
drivers/clk/uniphier/Makefile
drivers/clk/uniphier/clk-uniphier-sys.c
drivers/clk/ux500/Makefile
drivers/clk/versatile/clk-icst.h
drivers/clocksource/Makefile
drivers/clocksource/cs5535-clockevt.c
drivers/clocksource/h8300_timer16.c
drivers/clocksource/h8300_timer8.c
drivers/clocksource/h8300_tpu.c
drivers/clocksource/i8253.c
drivers/clocksource/numachip.c
drivers/clocksource/tango_xtal.c
drivers/clocksource/tcb_clksrc.c
drivers/clocksource/timer-fttmr010.c
drivers/clocksource/timer-integrator-ap.c
drivers/clocksource/timer-of.h
drivers/clocksource/timer-sp.h
drivers/cpufreq/Makefile
drivers/cpufreq/cpufreq-dt-platdev.c
drivers/cpufreq/cris-artpec3-cpufreq.c
drivers/cpufreq/cris-etraxfs-cpufreq.c
drivers/cpufreq/ppc_cbe_cpufreq.h
drivers/cpufreq/ti-cpufreq.c
drivers/cpuidle/Makefile
drivers/cpuidle/cpuidle-arm.c
drivers/cpuidle/cpuidle-cps.c
drivers/cpuidle/cpuidle-powernv.c
drivers/cpuidle/cpuidle-pseries.c
drivers/cpuidle/cpuidle.h
drivers/cpuidle/dt_idle_states.h
drivers/crypto/Makefile
drivers/crypto/atmel-aes-regs.h
drivers/crypto/atmel-sha-regs.h
drivers/crypto/atmel-tdes-regs.h
drivers/crypto/axis/artpec6_crypto.c
drivers/crypto/caam/Kconfig
drivers/crypto/caam/Makefile
drivers/crypto/caam/caamalg_desc.h
drivers/crypto/caam/caampkc.h
drivers/crypto/caam/compat.h
drivers/crypto/caam/ctrl.c
drivers/crypto/caam/ctrl.h
drivers/crypto/caam/desc.h
drivers/crypto/caam/desc_constr.h
drivers/crypto/caam/error.c
drivers/crypto/caam/error.h
drivers/crypto/caam/intern.h
drivers/crypto/caam/jr.h
drivers/crypto/caam/key_gen.c
drivers/crypto/caam/key_gen.h
drivers/crypto/caam/pdb.h
drivers/crypto/caam/pkc_desc.c
drivers/crypto/caam/qi.c
drivers/crypto/caam/qi.h
drivers/crypto/caam/regs.h
drivers/crypto/caam/sg_sw_sec4.h
drivers/crypto/cavium/nitrox/Makefile
drivers/crypto/cavium/nitrox/nitrox_algs.c
drivers/crypto/cavium/nitrox/nitrox_common.h
drivers/crypto/cavium/nitrox/nitrox_csr.h
drivers/crypto/cavium/nitrox/nitrox_dev.h
drivers/crypto/cavium/nitrox/nitrox_hal.c
drivers/crypto/cavium/nitrox/nitrox_isr.c
drivers/crypto/cavium/nitrox/nitrox_lib.c
drivers/crypto/cavium/nitrox/nitrox_req.h
drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
drivers/crypto/cavium/zip/Makefile
drivers/crypto/ccp/Makefile
drivers/crypto/inside-secure/safexcel_cipher.c
drivers/crypto/inside-secure/safexcel_hash.c
drivers/crypto/marvell/cesa.h
drivers/crypto/mv_cesa.h
drivers/crypto/n2_asm.S
drivers/crypto/n2_core.h
drivers/crypto/nx/Makefile
drivers/crypto/nx/nx-842.h
drivers/crypto/nx/nx.h
drivers/crypto/nx/nx_csbcpb.h
drivers/crypto/qat/Makefile
drivers/crypto/qat/qat_common/Makefile
drivers/crypto/qce/Makefile
drivers/crypto/rockchip/rk3288_crypto.h
drivers/crypto/stm32/stm32-hash.c
drivers/crypto/talitos.c
drivers/crypto/virtio/Makefile
drivers/crypto/vmx/Makefile
drivers/crypto/vmx/aesp8-ppc.h
drivers/crypto/vmx/ppc-xlate.pl
drivers/dax/Makefile
drivers/devfreq/Makefile
drivers/dio/dio.c
drivers/dma-buf/sync_file.c
drivers/dma-buf/sync_trace.h
drivers/dma/Makefile
drivers/dma/altera-msgdma.c
drivers/dma/bestcomm/Makefile
drivers/dma/dmaengine.h
drivers/dma/dw/Makefile
drivers/dma/edma.c
drivers/dma/qcom/Makefile
drivers/dma/sh/Makefile
drivers/dma/ti-dma-crossbar.c
drivers/edac/amd64_edac_dbg.c
drivers/edac/amd64_edac_inj.c
drivers/edac/edac_module.h
drivers/edac/mce_amd.h
drivers/eisa/Makefile
drivers/extcon/Makefile
drivers/extcon/extcon.h
drivers/firewire/Makefile
drivers/firewire/core.h
drivers/firewire/nosy-user.h
drivers/firewire/nosy.h
drivers/firewire/ohci.h
drivers/firmware/Makefile
drivers/firmware/efi/Makefile
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/arm-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/string.c
drivers/firmware/efi/memmap.c
drivers/firmware/efi/reboot.c
drivers/firmware/efi/test/efi_test.c
drivers/firmware/efi/test/efi_test.h
drivers/firmware/google/Makefile
drivers/fmc/Makefile
drivers/fpga/Makefile
drivers/fpga/altera-cvp.c
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-etraxfs.c
drivers/gpio/gpio-ftgpio010.c
drivers/gpio/gpio-omap.c
drivers/gpio/gpiolib-acpi.c
drivers/gpu/drm/Makefile
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/amdkfd/Makefile
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
drivers/gpu/drm/amd/powerplay/Makefile
drivers/gpu/drm/amd/powerplay/hwmgr/Makefile
drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/powerplay/inc/smu72.h
drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h
drivers/gpu/drm/amd/powerplay/smumgr/Makefile
drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
drivers/gpu/drm/arm/hdlcd_drv.h
drivers/gpu/drm/armada/Makefile
drivers/gpu/drm/armada/armada_trace.c
drivers/gpu/drm/armada/armada_trace.h
drivers/gpu/drm/ast/ast_dp501.c
drivers/gpu/drm/ast/ast_dram_tables.h
drivers/gpu/drm/atmel-hlcdc/Makefile
drivers/gpu/drm/bochs/bochs.h
drivers/gpu/drm/bridge/Makefile
drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_trace.h
drivers/gpu/drm/etnaviv/Makefile
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
drivers/gpu/drm/etnaviv/state.xml.h
drivers/gpu/drm/etnaviv/state_3d.xml.h
drivers/gpu/drm/etnaviv/state_hi.xml.h
drivers/gpu/drm/exynos/Makefile
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
drivers/gpu/drm/exynos/exynos_drm_drv.c
drivers/gpu/drm/exynos/exynos_drm_drv.h
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
drivers/gpu/drm/exynos/exynos_drm_fbdev.h
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/fsl-dcu/Makefile
drivers/gpu/drm/gma500/Makefile
drivers/gpu/drm/i2c/Makefile
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/gvt/Makefile
drivers/gpu/drm/i915/gvt/cfg_space.c
drivers/gpu/drm/i915/gvt/cmd_parser.c
drivers/gpu/drm/i915/gvt/execlist.c
drivers/gpu/drm/i915/gvt/handlers.c
drivers/gpu/drm/i915/gvt/reg.h
drivers/gpu/drm/i915/gvt/sched_policy.c
drivers/gpu/drm/i915/gvt/scheduler.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_trace.h
drivers/gpu/drm/i915/i915_trace_points.c
drivers/gpu/drm/i915/intel_acpi.c
drivers/gpu/drm/i915/intel_audio.c
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_color.c
drivers/gpu/drm/i915/intel_csr.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_dpio_phy.c
drivers/gpu/drm/i915/intel_dpll_mgr.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_dsi.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_modes.c
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/intel_runtime_pm.c
drivers/gpu/drm/i915/selftests/i915_live_selftests.h
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h
drivers/gpu/drm/i915/selftests/mock_gem_device.h
drivers/gpu/drm/i915/selftests/mock_gem_object.h
drivers/gpu/drm/imx/Makefile
drivers/gpu/drm/imx/imx-drm.h
drivers/gpu/drm/imx/ipuv3-plane.h
drivers/gpu/drm/lib/drm_random.c
drivers/gpu/drm/lib/drm_random.h
drivers/gpu/drm/mediatek/Makefile
drivers/gpu/drm/mgag200/mgag200_reg.h
drivers/gpu/drm/msm/Makefile
drivers/gpu/drm/msm/dsi/dsi_host.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_rd.c
drivers/gpu/drm/nouveau/dispnv04/cursor.c
drivers/gpu/drm/nouveau/dispnv04/disp.h
drivers/gpu/drm/nouveau/include/nvif/cl0002.h
drivers/gpu/drm/nouveau/include/nvif/cl0046.h
drivers/gpu/drm/nouveau/include/nvif/cl006b.h
drivers/gpu/drm/nouveau/include/nvif/cl0080.h
drivers/gpu/drm/nouveau/include/nvif/cl506e.h
drivers/gpu/drm/nouveau/include/nvif/cl506f.h
drivers/gpu/drm/nouveau/include/nvif/cl5070.h
drivers/gpu/drm/nouveau/include/nvif/cl507a.h
drivers/gpu/drm/nouveau/include/nvif/cl507b.h
drivers/gpu/drm/nouveau/include/nvif/cl507c.h
drivers/gpu/drm/nouveau/include/nvif/cl507d.h
drivers/gpu/drm/nouveau/include/nvif/cl507e.h
drivers/gpu/drm/nouveau/include/nvif/cl826e.h
drivers/gpu/drm/nouveau/include/nvif/cl826f.h
drivers/gpu/drm/nouveau/include/nvif/cl906f.h
drivers/gpu/drm/nouveau/include/nvif/cl9097.h
drivers/gpu/drm/nouveau/include/nvif/cla06f.h
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/client.h
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/include/nvif/driver.h
drivers/gpu/drm/nouveau/include/nvif/event.h
drivers/gpu/drm/nouveau/include/nvif/if0000.h
drivers/gpu/drm/nouveau/include/nvif/if0001.h
drivers/gpu/drm/nouveau/include/nvif/if0002.h
drivers/gpu/drm/nouveau/include/nvif/if0003.h
drivers/gpu/drm/nouveau/include/nvif/if0004.h
drivers/gpu/drm/nouveau/include/nvif/if0005.h
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
drivers/gpu/drm/nouveau/include/nvif/notify.h
drivers/gpu/drm/nouveau/include/nvif/object.h
drivers/gpu/drm/nouveau/include/nvif/os.h
drivers/gpu/drm/nouveau/include/nvif/unpack.h
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
drivers/gpu/drm/nouveau/include/nvkm/core/debug.h
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/engine.h
drivers/gpu/drm/nouveau/include/nvkm/core/enum.h
drivers/gpu/drm/nouveau/include/nvkm/core/event.h
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h
drivers/gpu/drm/nouveau/include/nvkm/core/ioctl.h
drivers/gpu/drm/nouveau/include/nvkm/core/memory.h
drivers/gpu/drm/nouveau/include/nvkm/core/mm.h
drivers/gpu/drm/nouveau/include/nvkm/core/notify.h
drivers/gpu/drm/nouveau/include/nvkm/core/object.h
drivers/gpu/drm/nouveau/include/nvkm/core/oproxy.h
drivers/gpu/drm/nouveau/include/nvkm/core/option.h
drivers/gpu/drm/nouveau/include/nvkm/core/os.h
drivers/gpu/drm/nouveau/include/nvkm/core/pci.h
drivers/gpu/drm/nouveau/include/nvkm/core/ramht.h
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h
drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h
drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h
drivers/gpu/drm/nouveau/include/nvkm/engine/cipher.h
drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h
drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h
drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h
drivers/gpu/drm/nouveau/include/nvkm/engine/msenc.h
drivers/gpu/drm/nouveau/include/nvkm/engine/mspdec.h
drivers/gpu/drm/nouveau/include/nvkm/engine/msppp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/msvld.h
drivers/gpu/drm/nouveau/include/nvkm/engine/nvdec.h
drivers/gpu/drm/nouveau/include/nvkm/engine/nvenc.h
drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h
drivers/gpu/drm/nouveau/include/nvkm/engine/sec.h
drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h
drivers/gpu/drm/nouveau/include/nvkm/engine/sw.h
drivers/gpu/drm/nouveau/include/nvkm/engine/vic.h
drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0203.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0205.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0209.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/P0260.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bit.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bmp.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dp.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/extdev.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/i2c.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/image.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/mxm.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/npde.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pcir.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pll.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pmu.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/power_budget.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/rammap.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/therm.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/vga.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h
drivers/gpu/drm/nouveau/nouveau_abi16.h
drivers/gpu/drm/nouveau/nouveau_acpi.c
drivers/gpu/drm/nouveau/nouveau_acpi.h
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/nouveau/nouveau_chan.h
drivers/gpu/drm/nouveau/nouveau_debugfs.h
drivers/gpu/drm/nouveau/nouveau_display.h
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fence.h
drivers/gpu/drm/nouveau/nouveau_gem.h
drivers/gpu/drm/nouveau/nouveau_ioctl.h
drivers/gpu/drm/nouveau/nouveau_reg.h
drivers/gpu/drm/nouveau/nouveau_sgdma.c
drivers/gpu/drm/nouveau/nouveau_ttm.h
drivers/gpu/drm/nouveau/nouveau_usif.h
drivers/gpu/drm/nouveau/nouveau_vga.c
drivers/gpu/drm/nouveau/nouveau_vga.h
drivers/gpu/drm/nouveau/nv10_fence.h
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/ce/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.h
drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacnv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
drivers/gpu/drm/nouveau/nvkm/engine/dma/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/dma/user.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv04.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/regsnv04.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/msppp/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/msvld/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/nvdec/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h
drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/g98.fuc0s.h
drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.h
drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.h
drivers/gpu/drm/nouveau/nvkm/engine/sw/priv.h
drivers/gpu/drm/nouveau/nvkm/falcon/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.h
drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/pll.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/seq.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramseq.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/regsnv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/fuse/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.h
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.h
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h
drivers/gpu/drm/nouveau/nvkm/subdev/mxm/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h
drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/os.h
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/timer/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/timer/regsnv04.h
drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h
drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h
drivers/gpu/drm/omapdrm/Makefile
drivers/gpu/drm/omapdrm/displays/Makefile
drivers/gpu/drm/omapdrm/dss/Makefile
drivers/gpu/drm/omapdrm/dss/hdmi_common.c
drivers/gpu/drm/panel/Makefile
drivers/gpu/drm/pl111/Makefile
drivers/gpu/drm/qxl/qxl_display.c
drivers/gpu/drm/radeon/Makefile
drivers/gpu/drm/radeon/mkregtable.c
drivers/gpu/drm/radeon/r100_track.h
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/radeon_dp_mst.c
drivers/gpu/drm/radeon/radeon_legacy_tv.c
drivers/gpu/drm/radeon/radeon_trace.h
drivers/gpu/drm/radeon/radeon_trace_points.c
drivers/gpu/drm/rcar-du/Makefile
drivers/gpu/drm/rockchip/Makefile
drivers/gpu/drm/selftests/drm_mm_selftests.h
drivers/gpu/drm/shmobile/Makefile
drivers/gpu/drm/sti/Makefile
drivers/gpu/drm/sun4i/Kconfig
drivers/gpu/drm/sun4i/Makefile
drivers/gpu/drm/sun4i/sun4i_hdmi.h
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
drivers/gpu/drm/tegra/Makefile
drivers/gpu/drm/tegra/trace.h
drivers/gpu/drm/tilcdc/Makefile
drivers/gpu/drm/ttm/Makefile
drivers/gpu/drm/vc4/Makefile
drivers/gpu/drm/virtio/Makefile
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/device_include/vm_basic_types.h
drivers/gpu/drm/zte/Makefile
drivers/gpu/host1x/Makefile
drivers/gpu/ipu-v3/Makefile
drivers/gpu/ipu-v3/ipu-common.c
drivers/gpu/ipu-v3/ipu-pre.c
drivers/gpu/ipu-v3/ipu-prg.c
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-core.c
drivers/hid/hid-elecom.c
drivers/hid/hid-ids.h
drivers/hid/hid-lg.h
drivers/hid/hid-lg4ff.h
drivers/hid/hid-multitouch.c
drivers/hid/hid-rmi.c
drivers/hid/hidraw.c
drivers/hid/i2c-hid/i2c-hid.c
drivers/hid/intel-ish-hid/Makefile
drivers/hid/usbhid/Makefile
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-quirks.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hsi/Makefile
drivers/hv/Makefile
drivers/hv/channel.c
drivers/hv/channel_mgmt.c
drivers/hv/hv_fcopy.c
drivers/hv/vmbus_drv.c
drivers/hwmon/Makefile
drivers/hwmon/adt7x10.h
drivers/hwmon/da9052-hwmon.c
drivers/hwmon/pmbus/Makefile
drivers/hwmon/tmp102.c
drivers/hwmon/xgene-hwmon.c
drivers/hwspinlock/Makefile
drivers/hwtracing/coresight/Makefile
drivers/hwtracing/intel_th/Makefile
drivers/hwtracing/intel_th/pci.c
drivers/hwtracing/stm/Makefile
drivers/hwtracing/stm/core.c
drivers/i2c/Makefile
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-img-scb.c
drivers/i2c/busses/i2c-imx.c
drivers/i2c/busses/i2c-ismt.c
drivers/i2c/busses/i2c-octeon-core.h
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-sprd.c
drivers/i2c/busses/i2c-stm32f7.c
drivers/i2c/muxes/Makefile
drivers/ide/Makefile
drivers/ide/ide-acpi.c
drivers/ide/ide-cd.c
drivers/ide/ide-cd.h
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-cd_verbose.c
drivers/ide/ide-devsets.c
drivers/ide/ide-disk.c
drivers/ide/ide-disk.h
drivers/ide/ide-disk_ioctl.c
drivers/ide/ide-disk_proc.c
drivers/ide/ide-floppy.c
drivers/ide/ide-floppy.h
drivers/ide/ide-floppy_ioctl.c
drivers/ide/ide-floppy_proc.c
drivers/ide/ide-gd.h
drivers/ide/ide-park.c
drivers/ide/ide-pio-blacklist.c
drivers/ide/ide-pm.c
drivers/ide/ide-probe.c
drivers/ide/ide-scan-pci.c
drivers/ide/ide-sysfs.c
drivers/ide/qd65xx.h
drivers/ide/setup-pci.c
drivers/idle/intel_idle.c
drivers/iio/Makefile
drivers/iio/accel/Makefile
drivers/iio/accel/bmc150-accel.h
drivers/iio/accel/kxsd9-i2c.c
drivers/iio/accel/kxsd9.h
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/ad7793.c
drivers/iio/adc/ad_sigma_delta.c
drivers/iio/adc/at91-sama5d2_adc.c
drivers/iio/adc/mcp320x.c
drivers/iio/adc/qcom-vadc-common.c
drivers/iio/adc/qcom-vadc-common.h
drivers/iio/adc/stm32-adc.c
drivers/iio/adc/ti-ads1015.c
drivers/iio/adc/twl4030-madc.c
drivers/iio/buffer/Makefile
drivers/iio/common/Makefile
drivers/iio/common/ssp_sensors/ssp_iio_sensor.h
drivers/iio/common/st_sensors/Makefile
drivers/iio/common/st_sensors/st_sensors_core.c
drivers/iio/common/st_sensors/st_sensors_core.h
drivers/iio/dac/Makefile
drivers/iio/dummy/Makefile
drivers/iio/dummy/iio_dummy_evgen.h
drivers/iio/dummy/iio_simple_dummy_events.c
drivers/iio/gyro/Makefile
drivers/iio/gyro/bmg160.h
drivers/iio/gyro/mpu3050.h
drivers/iio/humidity/Makefile
drivers/iio/imu/Makefile
drivers/iio/imu/adis16400_buffer.c
drivers/iio/imu/bmi160/bmi160.h
drivers/iio/imu/inv_mpu6050/Makefile
drivers/iio/industrialio-core.c
drivers/iio/light/Makefile
drivers/iio/magnetometer/Makefile
drivers/iio/magnetometer/bmc150_magn.h
drivers/iio/magnetometer/st_magn_core.c
drivers/iio/potentiometer/Makefile
drivers/iio/pressure/Makefile
drivers/iio/pressure/bmp280-core.c
drivers/iio/pressure/bmp280-regmap.c
drivers/iio/pressure/bmp280.h
drivers/iio/pressure/zpa2326.c
drivers/iio/proximity/Makefile
drivers/iio/proximity/as3935.c
drivers/iio/temperature/Makefile
drivers/iio/trigger/Makefile
drivers/iio/trigger/stm32-timer-trigger.c
drivers/infiniband/core/Makefile
drivers/infiniband/core/iwpm_msg.c
drivers/infiniband/core/iwpm_util.c
drivers/infiniband/core/netlink.c
drivers/infiniband/core/nldev.c
drivers/infiniband/core/security.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/Makefile
drivers/infiniband/hw/bnxt_re/Makefile
drivers/infiniband/hw/bnxt_re/bnxt_re.h
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
drivers/infiniband/hw/cxgb3/Makefile
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/hfi1/Makefile
drivers/infiniband/hw/hfi1/chip.c
drivers/infiniband/hw/hfi1/chip.h
drivers/infiniband/hw/hfi1/eprom.c
drivers/infiniband/hw/hfi1/file_ops.c
drivers/infiniband/hw/hfi1/pcie.c
drivers/infiniband/hw/hfi1/platform.c
drivers/infiniband/hw/i40iw/Makefile
drivers/infiniband/hw/i40iw/i40iw.h
drivers/infiniband/hw/i40iw/i40iw_cm.c
drivers/infiniband/hw/i40iw/i40iw_cm.h
drivers/infiniband/hw/i40iw/i40iw_ctrl.c
drivers/infiniband/hw/i40iw/i40iw_main.c
drivers/infiniband/hw/i40iw/i40iw_p.h
drivers/infiniband/hw/i40iw/i40iw_puda.c
drivers/infiniband/hw/i40iw/i40iw_utils.c
drivers/infiniband/hw/i40iw/i40iw_verbs.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mem.c
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mthca/Makefile
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/hw/ocrdma/ocrdma_hw.c
drivers/infiniband/hw/qedr/qedr.h
drivers/infiniband/hw/qedr/qedr_cm.c
drivers/infiniband/hw/qib/Makefile
drivers/infiniband/hw/usnic/Makefile
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h
drivers/infiniband/sw/rxe/Makefile
drivers/infiniband/ulp/Makefile
drivers/infiniband/ulp/ipoib/Makefile
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_vlan.c
drivers/infiniband/ulp/iser/iser_memory.c
drivers/infiniband/ulp/isert/ib_isert.h
drivers/input/Makefile
drivers/input/ff-core.c
drivers/input/gameport/Makefile
drivers/input/input.c
drivers/input/joydev.c
drivers/input/joystick/Makefile
drivers/input/keyboard/Makefile
drivers/input/keyboard/tca8418_keypad.c
drivers/input/misc/Makefile
drivers/input/misc/axp20x-pek.c
drivers/input/misc/ims-pcu.c
drivers/input/misc/uinput.c
drivers/input/mouse/Makefile
drivers/input/mouse/byd.h
drivers/input/mouse/cypress_ps2.h
drivers/input/mouse/elan_i2c_core.c
drivers/input/mouse/elan_i2c_i2c.c
drivers/input/mouse/hgpk.h
drivers/input/mouse/psmouse.h
drivers/input/mouse/synaptics.c
drivers/input/rmi4/Makefile
drivers/input/rmi4/rmi_f30.c
drivers/input/serio/Makefile
drivers/input/serio/i8042-sparcio.h
drivers/input/sparse-keymap.c
drivers/input/tablet/Makefile
drivers/input/tablet/gtco.c
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/ar1021_i2c.c
drivers/input/touchscreen/goodix.c
drivers/input/touchscreen/stmfts.c
drivers/input/touchscreen/ti_am335x_tsc.c
drivers/input/touchscreen/tsc200x-core.h
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/amd_iommu.c
drivers/iommu/amd_iommu_init.c
drivers/iommu/dmar.c
drivers/iommu/exynos-iommu.c
drivers/iommu/intel_irq_remapping.c
drivers/iommu/io-pgtable-arm-v7s.c
drivers/iommu/io-pgtable.h
drivers/iommu/iommu-traces.c
drivers/iommu/mtk_iommu.c
drivers/iommu/of_iommu.c
drivers/iommu/s390-iommu.c
drivers/irqchip/Makefile
drivers/irqchip/irq-ftintc010.c
drivers/irqchip/irq-gic-realview.c
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3.c
drivers/irqchip/irq-gic-v4.c
drivers/irqchip/irq-imgpdc.c
drivers/irqchip/irq-metag-ext.c
drivers/irqchip/irq-metag.c
drivers/irqchip/irq-mips-gic.c
drivers/irqchip/irq-mvebu-gicp.c
drivers/irqchip/irq-mvebu-gicp.h
drivers/irqchip/irq-renesas-h8300h.c
drivers/irqchip/irq-renesas-h8s.c
drivers/irqchip/irq-tango.c
drivers/irqchip/irq-versatile-fpga.c
drivers/isdn/Makefile
drivers/isdn/capi/Makefile
drivers/isdn/capi/capilib.c
drivers/isdn/gigaset/Makefile
drivers/isdn/hardware/avm/Makefile
drivers/isdn/hardware/eicon/Makefile
drivers/isdn/hardware/eicon/adapter.h
drivers/isdn/hardware/eicon/debug.c
drivers/isdn/hardware/eicon/diva.c
drivers/isdn/hardware/eicon/diva.h
drivers/isdn/hardware/eicon/diva_pci.h
drivers/isdn/hardware/eicon/dqueue.h
drivers/isdn/hardware/eicon/dsp_tst.h
drivers/isdn/hardware/eicon/entity.h
drivers/isdn/hardware/eicon/os_4bri.c
drivers/isdn/hardware/eicon/os_4bri.h
drivers/isdn/hardware/eicon/os_bri.c
drivers/isdn/hardware/eicon/os_bri.h
drivers/isdn/hardware/eicon/os_pri.c
drivers/isdn/hardware/eicon/os_pri.h
drivers/isdn/hardware/eicon/um_idi.c
drivers/isdn/hardware/eicon/um_idi.h
drivers/isdn/hardware/eicon/um_xdi.h
drivers/isdn/hardware/eicon/xdi_adapter.h
drivers/isdn/hardware/eicon/xdi_msg.h
drivers/isdn/hardware/mISDN/Makefile
drivers/isdn/hardware/mISDN/hfc_multi.h
drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
drivers/isdn/hardware/mISDN/hfcsusb.h
drivers/isdn/hisax/Makefile
drivers/isdn/hisax/hfc4s8s_l1.h
drivers/isdn/hisax/hfc_usb.h
drivers/isdn/hisax/hisax_fcpcipnp.h
drivers/isdn/hisax/hisax_isac.h
drivers/isdn/i4l/Makefile
drivers/isdn/i4l/isdn_ppp.c
drivers/isdn/mISDN/Makefile
drivers/isdn/mISDN/dsp_hwec.h
drivers/isdn/mISDN/l1oip.h
drivers/leds/Makefile
drivers/leds/leds-as3645a.c
drivers/leds/trigger/Makefile
drivers/lightnvm/Makefile
drivers/macintosh/Makefile
drivers/macintosh/adb-iop.c
drivers/macintosh/adb.c
drivers/macintosh/adbhid.c
drivers/macintosh/ams/ams.h
drivers/macintosh/ans-lcd.c
drivers/macintosh/ans-lcd.h
drivers/macintosh/macio-adb.c
drivers/macintosh/macio_sysfs.c
drivers/macintosh/via-cuda.c
drivers/macintosh/via-macii.c
drivers/macintosh/via-pmu-backlight.c
drivers/macintosh/via-pmu-event.h
drivers/macintosh/via-pmu.c
drivers/macintosh/via-pmu68k.c
drivers/mailbox/Makefile
drivers/mcb/Makefile
drivers/mcb/mcb-internal.h
drivers/md/Makefile
drivers/md/bcache/Makefile
drivers/md/bcache/alloc.c
drivers/md/bcache/bcache.h
drivers/md/bcache/bset.c
drivers/md/bcache/bset.h
drivers/md/bcache/btree.c
drivers/md/bcache/btree.h
drivers/md/bcache/closure.c
drivers/md/bcache/closure.h
drivers/md/bcache/debug.c
drivers/md/bcache/debug.h
drivers/md/bcache/extents.c
drivers/md/bcache/extents.h
drivers/md/bcache/io.c
drivers/md/bcache/journal.c
drivers/md/bcache/journal.h
drivers/md/bcache/movinggc.c
drivers/md/bcache/request.c
drivers/md/bcache/request.h
drivers/md/bcache/stats.c
drivers/md/bcache/stats.h
drivers/md/bcache/sysfs.c
drivers/md/bcache/sysfs.h
drivers/md/bcache/trace.c
drivers/md/bcache/util.h
drivers/md/bcache/writeback.c
drivers/md/bcache/writeback.h
drivers/md/bitmap.h
drivers/md/dm-builtin.c
drivers/md/dm-core.h
drivers/md/dm-crypt.c
drivers/md/dm-ioctl.c
drivers/md/dm-raid.c
drivers/md/dm-stats.c
drivers/md/dm-stats.h
drivers/md/dm.c
drivers/md/linear.h
drivers/md/md-cluster.h
drivers/md/md.c
drivers/md/md.h
drivers/md/multipath.h
drivers/md/persistent-data/Makefile
drivers/md/raid0.h
drivers/md/raid1-10.c
drivers/md/raid1.h
drivers/md/raid10.h
drivers/md/raid5-log.h
drivers/md/raid5.c
drivers/md/raid5.h
drivers/media/Makefile
drivers/media/cec/Makefile
drivers/media/cec/cec-adap.c
drivers/media/common/b2c2/Makefile
drivers/media/common/b2c2/flexcop-common.h
drivers/media/common/b2c2/flexcop-eeprom.c
drivers/media/common/b2c2/flexcop-fe-tuner.c
drivers/media/common/b2c2/flexcop-hw-filter.c
drivers/media/common/b2c2/flexcop-i2c.c
drivers/media/common/b2c2/flexcop-misc.c
drivers/media/common/b2c2/flexcop-reg.h
drivers/media/common/b2c2/flexcop-sram.c
drivers/media/common/b2c2/flexcop.h
drivers/media/common/b2c2/flexcop_ibi_value_be.h
drivers/media/common/b2c2/flexcop_ibi_value_le.h
drivers/media/common/btcx-risc.h
drivers/media/common/cypress_firmware.h
drivers/media/common/saa7146/saa7146_i2c.c
drivers/media/common/saa7146/saa7146_vbi.c
drivers/media/common/siano/Makefile
drivers/media/dvb-core/Makefile
drivers/media/dvb-core/dvb-usb-ids.h
drivers/media/dvb-core/dvb_frontend.c
drivers/media/dvb-frontends/Makefile
drivers/media/dvb-frontends/dib3000mc.c
drivers/media/dvb-frontends/dib7000m.h
drivers/media/dvb-frontends/dib7000p.h
drivers/media/dvb-frontends/dib8000.h
drivers/media/dvb-frontends/dib9000.h
drivers/media/dvb-frontends/dibx000_common.h
drivers/media/dvb-frontends/drxk.h
drivers/media/dvb-frontends/drxk_hard.h
drivers/media/dvb-frontends/drxk_map.h
drivers/media/dvb-frontends/dvb-pll.c
drivers/media/dvb-frontends/dvb-pll.h
drivers/media/dvb-frontends/nxt6000_priv.h
drivers/media/dvb-frontends/si21xx.h
drivers/media/dvb-frontends/sp887x.h
drivers/media/dvb-frontends/tda18271c2dd.h
drivers/media/dvb-frontends/tda18271c2dd_maps.h
drivers/media/i2c/Makefile
drivers/media/i2c/msp3400-driver.h
drivers/media/i2c/soc_camera/Makefile
drivers/media/i2c/tea6415c.h
drivers/media/i2c/tea6420.h
drivers/media/mmc/Makefile
drivers/media/pci/Makefile
drivers/media/pci/b2c2/Makefile
drivers/media/pci/b2c2/flexcop-dma.c
drivers/media/pci/bt8xx/Makefile
drivers/media/pci/bt8xx/btcx-risc.h
drivers/media/pci/bt8xx/bttv.h
drivers/media/pci/bt8xx/dst_priv.h
drivers/media/pci/cx18/Makefile
drivers/media/pci/cx23885/Makefile
drivers/media/pci/cx23885/cx23885-f300.h
drivers/media/pci/cx25821/Makefile
drivers/media/pci/cx88/Makefile
drivers/media/pci/cx88/cx88-vbi.c
drivers/media/pci/ddbridge/Makefile
drivers/media/pci/ivtv/Makefile
drivers/media/pci/mantis/Makefile
drivers/media/pci/netup_unidvb/Makefile
drivers/media/pci/ngene/Makefile
drivers/media/pci/pt3/Makefile
drivers/media/pci/saa7134/Makefile
drivers/media/pci/saa7134/saa7134-reg.h
drivers/media/pci/saa7164/Makefile
drivers/media/pci/smipcie/Makefile
drivers/media/pci/ttpci/Makefile
drivers/media/pci/ttpci/av7110.h
drivers/media/pci/ttpci/av7110_av.h
drivers/media/pci/ttpci/av7110_ca.h
drivers/media/pci/ttpci/av7110_hw.h
drivers/media/pci/ttpci/av7110_ipack.c
drivers/media/pci/ttpci/av7110_ipack.h
drivers/media/pci/ttpci/budget.h
drivers/media/pci/ttpci/dvb_filter.c
drivers/media/pci/tw5864/tw5864-util.c
drivers/media/pci/tw686x/tw686x-regs.h
drivers/media/pci/zoran/Makefile
drivers/media/platform/Kconfig
drivers/media/platform/Makefile
drivers/media/platform/atmel/atmel-isc-regs.h
drivers/media/platform/coda/trace.h
drivers/media/platform/davinci/Makefile
drivers/media/platform/exynos4-is/Makefile
drivers/media/platform/marvell-ccic/mcam-core.c
drivers/media/platform/marvell-ccic/mcam-core.h
drivers/media/platform/mtk-mdp/Makefile
drivers/media/platform/mtk-vcodec/Makefile
drivers/media/platform/omap3isp/Makefile
drivers/media/platform/qcom/camss-8x16/camss-vfe.c
drivers/media/platform/qcom/venus/Makefile
drivers/media/platform/qcom/venus/helpers.c
drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c
drivers/media/platform/s5p-cec/s5p_cec.c
drivers/media/platform/s5p-cec/s5p_cec.h
drivers/media/platform/s5p-mfc/Makefile
drivers/media/platform/sti/c8sectpfe/Makefile
drivers/media/platform/ti-vpe/Makefile
drivers/media/platform/via-camera.h
drivers/media/platform/vimc/Makefile
drivers/media/platform/vivid/Makefile
drivers/media/platform/vsp1/Makefile
drivers/media/radio/Makefile
drivers/media/radio/lm7000.h
drivers/media/rc/Makefile
drivers/media/rc/img-ir/Makefile
drivers/media/rc/ir-sharp-decoder.c
drivers/media/rc/keymaps/Makefile
drivers/media/tuners/Makefile
drivers/media/tuners/fc0011.h
drivers/media/tuners/mt2060.c
drivers/media/tuners/mt2063.h
drivers/media/usb/Makefile
drivers/media/usb/as102/Makefile
drivers/media/usb/au0828/Makefile
drivers/media/usb/b2c2/flexcop-usb.h
drivers/media/usb/cx231xx/Makefile
drivers/media/usb/dvb-usb-v2/Makefile
drivers/media/usb/dvb-usb-v2/gl861.h
drivers/media/usb/dvb-usb-v2/usb_urb.c
drivers/media/usb/dvb-usb/Makefile
drivers/media/usb/dvb-usb/af9005-script.h
drivers/media/usb/dvb-usb/az6027.h
drivers/media/usb/dvb-usb/cxusb.h
drivers/media/usb/dvb-usb/dib07x0.h
drivers/media/usb/dvb-usb/digitv.h
drivers/media/usb/dvb-usb/dvb-usb-common.h
drivers/media/usb/dvb-usb/dvb-usb-dvb.c
drivers/media/usb/dvb-usb/dvb-usb-firmware.c
drivers/media/usb/dvb-usb/dvb-usb-i2c.c
drivers/media/usb/dvb-usb/dvb-usb-remote.c
drivers/media/usb/dvb-usb/dvb-usb-urb.c
drivers/media/usb/dvb-usb/dvb-usb.h
drivers/media/usb/dvb-usb/dw2102.h
drivers/media/usb/dvb-usb/m920x.h
drivers/media/usb/dvb-usb/usb-urb.c
drivers/media/usb/dvb-usb/vp702x.h
drivers/media/usb/em28xx/Makefile
drivers/media/usb/em28xx/em28xx-reg.h
drivers/media/usb/go7007/Makefile
drivers/media/usb/gspca/Makefile
drivers/media/usb/gspca/gl860/Makefile
drivers/media/usb/gspca/gspca.h
drivers/media/usb/gspca/m5602/Makefile
drivers/media/usb/gspca/stv06xx/Makefile
drivers/media/usb/pvrusb2/Makefile
drivers/media/usb/pvrusb2/pvrusb2-dvb.h
drivers/media/usb/pwc/pwc-nala.h
drivers/media/usb/stk1160/Makefile
drivers/media/usb/tm6000/Makefile
drivers/media/usb/usbvision/usbvision-cards.h
drivers/media/usb/uvc/Makefile
drivers/media/usb/uvc/uvcvideo.h
drivers/media/v4l2-core/Makefile
drivers/media/v4l2-core/v4l2-trace.c
drivers/media/v4l2-core/vb2-trace.c
drivers/memory/Makefile
drivers/memory/tegra/Makefile
drivers/memstick/host/Makefile
drivers/message/fusion/Makefile
drivers/message/fusion/lsi/mpi.h
drivers/message/fusion/lsi/mpi_cnfg.h
drivers/message/fusion/lsi/mpi_fc.h
drivers/message/fusion/lsi/mpi_init.h
drivers/message/fusion/lsi/mpi_ioc.h
drivers/message/fusion/lsi/mpi_lan.h
drivers/message/fusion/lsi/mpi_log_fc.h
drivers/message/fusion/lsi/mpi_log_sas.h
drivers/message/fusion/lsi/mpi_raid.h
drivers/message/fusion/lsi/mpi_sas.h
drivers/message/fusion/lsi/mpi_targ.h
drivers/message/fusion/lsi/mpi_tool.h
drivers/message/fusion/lsi/mpi_type.h
drivers/message/fusion/mptdebug.h
drivers/mfd/Makefile
drivers/mfd/twl-core.h
drivers/misc/Makefile
drivers/misc/cxl/Makefile
drivers/misc/cxl/cxllib.c
drivers/misc/cxl/flash.c
drivers/misc/eeprom/Makefile
drivers/misc/ibmasm/Makefile
drivers/misc/lkdtm.h
drivers/misc/lkdtm_bugs.c
drivers/misc/lkdtm_heap.c
drivers/misc/lkdtm_perms.c
drivers/misc/lkdtm_rodata.c
drivers/misc/lkdtm_usercopy.c
drivers/misc/mei/Makefile
drivers/misc/mei/hw-me-regs.h
drivers/misc/mei/pci-me.c
drivers/misc/mei/pci-txe.c
drivers/misc/mic/Makefile
drivers/misc/mic/card/Makefile
drivers/misc/mic/cosm/Makefile
drivers/misc/mic/host/Makefile
drivers/misc/mic/scif/Makefile
drivers/misc/sgi-xp/Makefile
drivers/mmc/core/Makefile
drivers/mmc/core/block.c
drivers/mmc/core/block.h
drivers/mmc/core/mmc.c
drivers/mmc/core/queue.c
drivers/mmc/core/queue.h
drivers/mmc/core/quirks.h
drivers/mmc/core/sd.h
drivers/mmc/host/Kconfig
drivers/mmc/host/Makefile
drivers/mmc/host/cavium-thunderx.c
drivers/mmc/host/cavium.c
drivers/mmc/host/dw_mmc-zx.h
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/meson-gx-mmc.c
drivers/mmc/host/pxamci.c
drivers/mmc/host/pxamci.h
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mmc/host/sdhci-pci-core.c
drivers/mmc/host/sdhci-pci.h
drivers/mmc/host/sdhci-xenon.c
drivers/mmc/host/sdhci-xenon.h
drivers/mmc/host/tmio_mmc_core.c
drivers/mtd/Makefile
drivers/mtd/chips/Makefile
drivers/mtd/chips/fwh_lock.h
drivers/mtd/devices/Makefile
drivers/mtd/devices/bcm47xxsflash.h
drivers/mtd/maps/Makefile
drivers/mtd/maps/physmap_of_gemini.c
drivers/mtd/maps/physmap_of_gemini.h
drivers/mtd/maps/physmap_of_versatile.h
drivers/mtd/maps/tsunami_flash.c
drivers/mtd/mtdcore.h
drivers/mtd/mtdpart.c
drivers/mtd/nand/Makefile
drivers/mtd/nand/atmel/pmecc.c
drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h
drivers/mtd/nand/brcmnand/Makefile
drivers/mtd/nand/lpc32xx_mlc.c
drivers/mtd/nand/nand_base.c
drivers/mtd/onenand/Makefile
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/spi-nor/Makefile
drivers/mtd/spi-nor/spi-nor.c
drivers/mtd/tests/Makefile
drivers/mtd/tests/mtd_test.c
drivers/mtd/tests/mtd_test.h
drivers/mtd/ubi/Makefile
drivers/mtd/ubi/wl.h
drivers/net/Makefile
drivers/net/appletalk/cops.h
drivers/net/appletalk/ipddp.h
drivers/net/appletalk/ltpc.h
drivers/net/arcnet/Makefile
drivers/net/arcnet/com9026.h
drivers/net/bonding/bond_debugfs.c
drivers/net/bonding/bond_procfs.c
drivers/net/caif/Makefile
drivers/net/can/Makefile
drivers/net/can/flexcan.c
drivers/net/can/sja1000/Makefile
drivers/net/can/softing/softing.h
drivers/net/can/softing/softing_platform.h
drivers/net/can/sun4i_can.c
drivers/net/can/usb/Makefile
drivers/net/can/usb/esd_usb2.c
drivers/net/can/usb/gs_usb.c
drivers/net/can/usb/kvaser_usb.c
drivers/net/cris/eth_v10.c
drivers/net/dsa/Makefile
drivers/net/dsa/b53/Makefile
drivers/net/dsa/dsa_loop.h
drivers/net/dsa/lan9303.h
drivers/net/dsa/mv88e6060.c
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/ethernet/3com/Makefile
drivers/net/ethernet/8390/Makefile
drivers/net/ethernet/Makefile
drivers/net/ethernet/aeroflex/greth.h
drivers/net/ethernet/alacritech/slic.h
drivers/net/ethernet/alteon/acenic.h
drivers/net/ethernet/amazon/ena/ena_ethtool.c
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amd/7990.h
drivers/net/ethernet/amd/Makefile
drivers/net/ethernet/amd/hplance.h
drivers/net/ethernet/amd/xgbe/Makefile
drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
drivers/net/ethernet/aquantia/atlantic/aq_nic.h
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
drivers/net/ethernet/aquantia/atlantic/aq_ring.h
drivers/net/ethernet/aquantia/atlantic/aq_vec.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0_internal.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
drivers/net/ethernet/arc/emac.h
drivers/net/ethernet/arc/emac_mdio.c
drivers/net/ethernet/atheros/Makefile
drivers/net/ethernet/aurora/nb8800.h
drivers/net/ethernet/broadcom/Makefile
drivers/net/ethernet/broadcom/b44.h
drivers/net/ethernet/broadcom/bcm63xx_enet.h
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bgmac.h
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
drivers/net/ethernet/broadcom/cnic.c
drivers/net/ethernet/broadcom/tg3.h
drivers/net/ethernet/cadence/Makefile
drivers/net/ethernet/cavium/liquidio/Makefile
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/thunder/Makefile
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/chelsio/Makefile
drivers/net/ethernet/chelsio/cxgb/fpga_defs.h
drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c
drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h
drivers/net/ethernet/chelsio/cxgb/my3126.c
drivers/net/ethernet/chelsio/cxgb/tp.c
drivers/net/ethernet/chelsio/cxgb/tp.h
drivers/net/ethernet/chelsio/cxgb/vsc7326.c
drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h
drivers/net/ethernet/chelsio/cxgb3/regs.h
drivers/net/ethernet/chelsio/cxgb3/sge_defs.h
drivers/net/ethernet/chelsio/cxgb4/Makefile
drivers/net/ethernet/cisco/enic/enic_clsf.c
drivers/net/ethernet/cisco/enic/enic_clsf.h
drivers/net/ethernet/davicom/dm9000.h
drivers/net/ethernet/dec/tulip/Makefile
drivers/net/ethernet/freescale/Makefile
drivers/net/ethernet/freescale/dpaa/Makefile
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/freescale/fman/Makefile
drivers/net/ethernet/freescale/fs_enet/Makefile
drivers/net/ethernet/freescale/fs_enet/fec.h
drivers/net/ethernet/freescale/fs_enet/fs_enet.h
drivers/net/ethernet/hisilicon/Makefile
drivers/net/ethernet/hisilicon/hns/Makefile
drivers/net/ethernet/hisilicon/hns/hns_enet.c
drivers/net/ethernet/hisilicon/hns3/hnae3.c
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c
drivers/net/ethernet/i825xx/Makefile
drivers/net/ethernet/ibm/emac/Makefile
drivers/net/ethernet/ibm/emac/mal.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/intel/Makefile
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/i40e/i40e_nvm.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40evf_client.c
drivers/net/ethernet/intel/i40evf/i40evf_client.h
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/marvell/Makefile
drivers/net/ethernet/marvell/mvpp2.c
drivers/net/ethernet/marvell/skge.h
drivers/net/ethernet/marvell/sky2.h
drivers/net/ethernet/mellanox/mlx4/Makefile
drivers/net/ethernet/mellanox/mlx4/mlx4_stats.h
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/dev.c
drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h
drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
drivers/net/ethernet/mellanox/mlx5/core/port.c
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
drivers/net/ethernet/mellanox/mlxsw/Makefile
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/i2c.c
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/micrel/Makefile
drivers/net/ethernet/micrel/ks8695net.h
drivers/net/ethernet/microchip/enc28j60_hw.h
drivers/net/ethernet/microchip/encx24j600_hw.h
drivers/net/ethernet/myricom/myri10ge/myri10ge_mcp.h
drivers/net/ethernet/myricom/myri10ge/myri10ge_mcp_gen_header.h
drivers/net/ethernet/natsemi/Makefile
drivers/net/ethernet/natsemi/jazzsonic.c
drivers/net/ethernet/natsemi/macsonic.c
drivers/net/ethernet/natsemi/sonic.h
drivers/net/ethernet/natsemi/xtsonic.c
drivers/net/ethernet/netronome/nfp/Makefile
drivers/net/ethernet/netronome/nfp/flower/action.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
drivers/net/ethernet/qlogic/Makefile
drivers/net/ethernet/qlogic/qed/Makefile
drivers/net/ethernet/qlogic/qed/qed_selftest.h
drivers/net/ethernet/qlogic/qlcnic/Makefile
drivers/net/ethernet/qlogic/qlge/qlge_dbg.c
drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
drivers/net/ethernet/qualcomm/Makefile
drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
drivers/net/ethernet/qualcomm/emac/emac-mac.c
drivers/net/ethernet/qualcomm/emac/emac.c
drivers/net/ethernet/qualcomm/emac/emac.h
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c
drivers/net/ethernet/realtek/8139too.c
drivers/net/ethernet/realtek/atp.h
drivers/net/ethernet/realtek/r8169.c
drivers/net/ethernet/rocker/rocker_tlv.h
drivers/net/ethernet/seeq/sgiseeq.h
drivers/net/ethernet/sfc/Makefile
drivers/net/ethernet/sfc/falcon/Makefile
drivers/net/ethernet/sis/sis900.h
drivers/net/ethernet/smsc/Makefile
drivers/net/ethernet/stmicro/stmmac/Makefile
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
drivers/net/ethernet/sun/Makefile
drivers/net/ethernet/sun/niu.h
drivers/net/ethernet/sun/sunbmac.h
drivers/net/ethernet/sun/sungem.h
drivers/net/ethernet/sun/sunhme.h
drivers/net/ethernet/sun/sunqe.h
drivers/net/ethernet/sun/sunvnet_common.h
drivers/net/ethernet/synopsys/Makefile
drivers/net/ethernet/ti/Makefile
drivers/net/ethernet/tile/Makefile
drivers/net/ethernet/toshiba/Makefile
drivers/net/ethernet/xilinx/Makefile
drivers/net/ethernet/xilinx/ll_temac.h
drivers/net/ethernet/xilinx/ll_temac_mdio.c
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
drivers/net/fddi/skfp/Makefile
drivers/net/geneve.c
drivers/net/hamradio/Makefile
drivers/net/hamradio/z8530.h
drivers/net/hippi/rrunner.h
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/ieee802154/Makefile
drivers/net/ipvlan/ipvtap.c
drivers/net/macsec.c
drivers/net/macvtap.c
drivers/net/phy/Kconfig
drivers/net/phy/Makefile
drivers/net/phy/dp83640_reg.h
drivers/net/phy/marvell.c
drivers/net/phy/mdio-boardinfo.h
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
drivers/net/phy/swphy.h
drivers/net/phy/xilinx_gmii2rgmii.c
drivers/net/ppp/Makefile
drivers/net/ppp/ppp_generic.c
drivers/net/ppp/ppp_mppe.h
drivers/net/slip/slip.h
drivers/net/tap.c
drivers/net/team/Makefile
drivers/net/tun.c
drivers/net/usb/Makefile
drivers/net/usb/cdc_ether.c
drivers/net/usb/lan78xx.c
drivers/net/usb/r8152.c
drivers/net/usb/rndis_host.c
drivers/net/vrf.c
drivers/net/wan/Makefile
drivers/net/wan/hd64570.h
drivers/net/wan/lapbether.c
drivers/net/wan/lmc/lmc.h
drivers/net/wan/lmc/lmc_debug.c
drivers/net/wan/lmc/lmc_debug.h
drivers/net/wan/lmc/lmc_proto.h
drivers/net/wan/x25_asy.h
drivers/net/wan/z85230.h
drivers/net/wimax/i2400m/Makefile
drivers/net/wimax/i2400m/fw.c
drivers/net/wireless/Makefile
drivers/net/wireless/admtek/adm8211.h
drivers/net/wireless/ath/Makefile
drivers/net/wireless/ath/ath10k/Makefile
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/pci.c
drivers/net/wireless/ath/ath10k/rx_desc.h
drivers/net/wireless/ath/ath5k/Makefile
drivers/net/wireless/ath/ath5k/sysfs.c
drivers/net/wireless/ath/ath5k/trace.h
drivers/net/wireless/ath/ath6kl/trace.h
drivers/net/wireless/ath/ath9k/Makefile
drivers/net/wireless/ath/carl9170/version.h
drivers/net/wireless/ath/wcn36xx/Makefile
drivers/net/wireless/ath/wcn36xx/main.c
drivers/net/wireless/ath/wil6210/Makefile
drivers/net/wireless/broadcom/b43/Makefile
drivers/net/wireless/broadcom/b43/b43.h
drivers/net/wireless/broadcom/b43/bus.h
drivers/net/wireless/broadcom/b43/debugfs.h
drivers/net/wireless/broadcom/b43/dma.h
drivers/net/wireless/broadcom/b43/leds.h
drivers/net/wireless/broadcom/b43/lo.h
drivers/net/wireless/broadcom/b43/phy_a.h
drivers/net/wireless/broadcom/b43/phy_ac.h
drivers/net/wireless/broadcom/b43/phy_common.h
drivers/net/wireless/broadcom/b43/phy_g.h
drivers/net/wireless/broadcom/b43/phy_ht.h
drivers/net/wireless/broadcom/b43/phy_lcn.h
drivers/net/wireless/broadcom/b43/phy_lp.h
drivers/net/wireless/broadcom/b43/phy_n.h
drivers/net/wireless/broadcom/b43/pio.h
drivers/net/wireless/broadcom/b43/ppr.h
drivers/net/wireless/broadcom/b43/radio_2055.h
drivers/net/wireless/broadcom/b43/radio_2056.h
drivers/net/wireless/broadcom/b43/radio_2057.h
drivers/net/wireless/broadcom/b43/radio_2059.h
drivers/net/wireless/broadcom/b43/rfkill.h
drivers/net/wireless/broadcom/b43/sdio.h
drivers/net/wireless/broadcom/b43/sysfs.h
drivers/net/wireless/broadcom/b43/tables.h
drivers/net/wireless/broadcom/b43/tables_lpphy.h
drivers/net/wireless/broadcom/b43/tables_nphy.h
drivers/net/wireless/broadcom/b43/tables_phy_ht.h
drivers/net/wireless/broadcom/b43/tables_phy_lcn.h
drivers/net/wireless/broadcom/b43/wa.h
drivers/net/wireless/broadcom/b43/xmit.h
drivers/net/wireless/broadcom/b43legacy/Makefile
drivers/net/wireless/broadcom/b43legacy/b43legacy.h
drivers/net/wireless/broadcom/b43legacy/debugfs.h
drivers/net/wireless/broadcom/b43legacy/dma.h
drivers/net/wireless/broadcom/b43legacy/ilt.h
drivers/net/wireless/broadcom/b43legacy/leds.h
drivers/net/wireless/broadcom/b43legacy/pio.h
drivers/net/wireless/broadcom/b43legacy/rfkill.h
drivers/net/wireless/broadcom/b43legacy/sysfs.h
drivers/net/wireless/broadcom/b43legacy/xmit.h
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
drivers/net/wireless/cisco/airo.h
drivers/net/wireless/intel/ipw2x00/Makefile
drivers/net/wireless/intel/iwlegacy/Makefile
drivers/net/wireless/intel/iwlwifi/Makefile
drivers/net/wireless/intel/iwlwifi/cfg/7000.c
drivers/net/wireless/intel/iwlwifi/cfg/8000.c
drivers/net/wireless/intel/iwlwifi/cfg/9000.c
drivers/net/wireless/intel/iwlwifi/cfg/a000.c
drivers/net/wireless/intel/iwlwifi/dvm/Makefile
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/fw/dbg.h
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
drivers/net/wireless/intel/iwlwifi/mvm/Makefile
drivers/net/wireless/intel/iwlwifi/mvm/d3.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
drivers/net/wireless/intel/iwlwifi/mvm/rs.c
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
drivers/net/wireless/intel/iwlwifi/mvm/scan.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.h
drivers/net/wireless/intel/iwlwifi/mvm/tt.c
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
drivers/net/wireless/intersil/hostap/Makefile
drivers/net/wireless/intersil/hostap/hostap.h
drivers/net/wireless/intersil/hostap/hostap_80211.h
drivers/net/wireless/intersil/hostap/hostap_80211_rx.c
drivers/net/wireless/intersil/hostap/hostap_80211_tx.c
drivers/net/wireless/intersil/hostap/hostap_ap.c
drivers/net/wireless/intersil/hostap/hostap_ap.h
drivers/net/wireless/intersil/hostap/hostap_common.h
drivers/net/wireless/intersil/hostap/hostap_config.h
drivers/net/wireless/intersil/hostap/hostap_download.c
drivers/net/wireless/intersil/hostap/hostap_info.c
drivers/net/wireless/intersil/hostap/hostap_ioctl.c
drivers/net/wireless/intersil/hostap/hostap_proc.c
drivers/net/wireless/intersil/hostap/hostap_wlan.h
drivers/net/wireless/intersil/orinoco/Makefile
drivers/net/wireless/intersil/p54/Makefile
drivers/net/wireless/marvell/libertas/Makefile
drivers/net/wireless/marvell/libertas/cfg.c
drivers/net/wireless/marvell/libertas/cfg.h
drivers/net/wireless/marvell/libertas/cmd.h
drivers/net/wireless/marvell/libertas/cmdresp.c
drivers/net/wireless/marvell/libertas/debugfs.c
drivers/net/wireless/marvell/libertas/debugfs.h
drivers/net/wireless/marvell/libertas/decl.h
drivers/net/wireless/marvell/libertas/defs.h
drivers/net/wireless/marvell/libertas/dev.h
drivers/net/wireless/marvell/libertas/ethtool.c
drivers/net/wireless/marvell/libertas/host.h
drivers/net/wireless/marvell/libertas/if_usb.h
drivers/net/wireless/marvell/libertas/mesh.c
drivers/net/wireless/marvell/libertas/mesh.h
drivers/net/wireless/marvell/libertas/radiotap.h
drivers/net/wireless/marvell/libertas/types.h
drivers/net/wireless/marvell/libertas_tf/deb_defs.h
drivers/net/wireless/quantenna/qtnfmac/Makefile
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
drivers/net/wireless/quantenna/qtnfmac/event.c
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie_bus_priv.h
drivers/net/wireless/ralink/rt2x00/Makefile
drivers/net/wireless/ray_cs.h
drivers/net/wireless/rayctl.h
drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8180.h
drivers/net/wireless/realtek/rtl818x/rtl8180/rtl8225.h
drivers/net/wireless/realtek/rtl818x/rtl8187/rfkill.h
drivers/net/wireless/realtek/rtlwifi/Makefile
drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192c/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192de/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8192se/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8723be/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8723com/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/Makefile
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
drivers/net/wireless/rsi/Makefile
drivers/net/wireless/st/cw1200/Makefile
drivers/net/wireless/ti/Makefile
drivers/net/wireless/ti/wl1251/Makefile
drivers/net/wireless/ti/wl1251/acx.c
drivers/net/wireless/ti/wl1251/cmd.c
drivers/net/wireless/ti/wl1251/wl12xx_80211.h
drivers/net/wireless/ti/wlcore/Makefile
drivers/net/wireless/ti/wlcore/wl12xx_80211.h
drivers/net/wireless/wl3501.h
drivers/net/wireless/zydas/zd1211rw/Makefile
drivers/net/xen-netback/interface.c
drivers/net/xen-netfront.c
drivers/nfc/Makefile
drivers/nfc/mei_phy.h
drivers/nfc/microread/Makefile
drivers/nfc/nfcmrvl/Makefile
drivers/nfc/st-nci/Makefile
drivers/nubus/nubus.c
drivers/nubus/proc.c
drivers/nvdimm/Makefile
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/pmem.h
drivers/nvme/host/Makefile
drivers/nvme/host/core.c
drivers/nvme/host/fabrics.c
drivers/nvme/host/fc.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/target/Makefile
drivers/nvme/target/core.c
drivers/nvme/target/fabrics-cmd.c
drivers/nvme/target/fc.c
drivers/nvme/target/fcloop.c
drivers/nvme/target/nvmet.h
drivers/nvmem/Makefile
drivers/nvmem/core.c
drivers/of/Makefile
drivers/of/base.c
drivers/of/of_mdio.c
drivers/of/of_reserved_mem.c
drivers/of/property.c
drivers/of/unittest-data/Makefile
drivers/of/unittest-data/overlay.dts
drivers/of/unittest-data/overlay_bad_phandle.dts
drivers/of/unittest-data/overlay_base.dts
drivers/of/unittest-data/testcases.dts
drivers/of/unittest-data/tests-interrupts.dtsi
drivers/of/unittest-data/tests-match.dtsi
drivers/of/unittest-data/tests-overlay.dtsi
drivers/of/unittest-data/tests-phandle.dtsi
drivers/of/unittest-data/tests-platform.dtsi
drivers/of/unittest.c
drivers/oprofile/nmi_timer_int.c
drivers/oprofile/oprofile_perf.c
drivers/parisc/Makefile
drivers/parisc/iommu-helpers.h
drivers/parport/Makefile
drivers/parport/ieee1284_ops.c
drivers/parport/multiface.h
drivers/parport/probe.c
drivers/parport/procfs.c
drivers/pci/Makefile
drivers/pci/dwc/Makefile
drivers/pci/endpoint/functions/pci-epf-test.c
drivers/pci/host/Makefile
drivers/pci/host/pci-aardvark.c
drivers/pci/host/pci-ftpci100.c
drivers/pci/host/pci-tegra.c
drivers/pci/host/pcie-tango.c
drivers/pci/hotplug/Makefile
drivers/pci/htirq.c
drivers/pci/irq.c
drivers/pci/pci-label.c
drivers/pci/pci-sysfs.c
drivers/pci/pci.h
drivers/pci/pcie/Makefile
drivers/pci/pcie/aer/Makefile
drivers/pci/pcie/aer/aerdrv.h
drivers/pci/pcie/aer/aerdrv_acpi.c
drivers/pci/pcie/aspm.c
drivers/pci/pcie/portdrv.h
drivers/pci/pcie/portdrv_core.c
drivers/pci/pcie/portdrv_pci.c
drivers/pci/proc.c
drivers/pci/quirks.c
drivers/pci/setup-res.c
drivers/pci/syscall.c
drivers/pcmcia/Makefile
drivers/pcmcia/bcm63xx_pcmcia.h
drivers/pcmcia/i82092aa.h
drivers/pcmcia/m32r_cfc.h
drivers/pcmcia/m32r_pcc.h
drivers/pcmcia/pd6729.h
drivers/pcmcia/sa1100_assabet.c
drivers/pcmcia/sa1100_cerf.c
drivers/pcmcia/sa1100_generic.h
drivers/pcmcia/sa1100_h3600.c
drivers/pcmcia/sa1100_shannon.c
drivers/pcmcia/sa1100_simpad.c
drivers/pcmcia/sa1111_generic.h
drivers/pcmcia/sa1111_jornada720.c
drivers/pcmcia/sa1111_neponset.c
drivers/pcmcia/soc_common.h
drivers/pcmcia/yenta_socket.h
drivers/perf/Makefile
drivers/perf/arm_pmu_acpi.c
drivers/perf/arm_pmu_platform.c
drivers/phy/Makefile
drivers/phy/broadcom/Makefile
drivers/phy/marvell/Makefile
drivers/phy/marvell/phy-mvebu-cp110-comphy.c
drivers/phy/mediatek/phy-mtk-tphy.c
drivers/phy/qualcomm/Makefile
drivers/phy/rockchip/Makefile
drivers/phy/rockchip/phy-rockchip-typec.c
drivers/phy/samsung/Makefile
drivers/phy/tegra/xusb.c
drivers/phy/ti/Makefile
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/bcm/Makefile
drivers/pinctrl/bcm/pinctrl-bcm2835.c
drivers/pinctrl/freescale/Makefile
drivers/pinctrl/intel/Makefile
drivers/pinctrl/intel/pinctrl-cherryview.c
drivers/pinctrl/mediatek/Makefile
drivers/pinctrl/mediatek/pinctrl-mtk-mt6397.h
drivers/pinctrl/mediatek/pinctrl-mtk-mt8127.h
drivers/pinctrl/mvebu/Makefile
drivers/pinctrl/nomadik/Makefile
drivers/pinctrl/nomadik/pinctrl-abx500.h
drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c
drivers/pinctrl/nomadik/pinctrl-nomadik-db8540.c
drivers/pinctrl/nomadik/pinctrl-nomadik-stn8815.c
drivers/pinctrl/nomadik/pinctrl-nomadik.h
drivers/pinctrl/pinctrl-amd.c
drivers/pinctrl/pinctrl-coh901.h
drivers/pinctrl/pinctrl-mcp23s08.c
drivers/pinctrl/qcom/Makefile
drivers/pinctrl/samsung/Makefile
drivers/pinctrl/sh-pfc/Makefile
drivers/pinctrl/sh-pfc/pfc-sh7722.c
drivers/pinctrl/spear/Makefile
drivers/pinctrl/stm32/Makefile
drivers/pinctrl/sunxi/Makefile
drivers/pinctrl/tegra/Makefile
drivers/pinctrl/uniphier/Makefile
drivers/pinctrl/vt8500/Makefile
drivers/platform/Makefile
drivers/platform/chrome/Makefile
drivers/platform/x86/Makefile
drivers/platform/x86/fujitsu-laptop.c
drivers/platform/x86/intel_pmc_ipc.c
drivers/pnp/Makefile
drivers/pnp/base.h
drivers/pnp/card.c
drivers/pnp/core.c
drivers/pnp/driver.c
drivers/pnp/interface.c
drivers/pnp/isapnp/compat.c
drivers/pnp/manager.c
drivers/pnp/pnpacpi/pnpacpi.h
drivers/pnp/pnpbios/bioscalls.c
drivers/pnp/pnpbios/proc.c
drivers/pnp/pnpbios/rsparser.c
drivers/pnp/quirks.c
drivers/pnp/resource.c
drivers/pnp/support.c
drivers/pnp/system.c
drivers/power/reset/Makefile
drivers/power/reset/gemini-poweroff.c
drivers/power/reset/piix4-poweroff.c
drivers/power/supply/Makefile
drivers/power/supply/ab8500_bmdata.c
drivers/ptp/Makefile
drivers/pwm/Makefile
drivers/rapidio/Makefile
drivers/rapidio/devices/tsi721.c
drivers/rapidio/rio-access.c
drivers/rapidio/switches/Makefile
drivers/ras/cec.c
drivers/ras/debugfs.h
drivers/ras/ras.c
drivers/regulator/Makefile
drivers/regulator/axp20x-regulator.c
drivers/regulator/fixed-helper.c
drivers/regulator/rn5t618-regulator.c
drivers/remoteproc/Kconfig
drivers/remoteproc/Makefile
drivers/remoteproc/imx_rproc.c
drivers/remoteproc/qcom_common.h
drivers/remoteproc/qcom_wcnss.h
drivers/reset/Kconfig
drivers/reset/Makefile
drivers/reset/reset-hsdk.c [moved from drivers/reset/reset-hsdk-v1.c with 72% similarity]
drivers/reset/reset-socfpga.c
drivers/rpmsg/Makefile
drivers/rpmsg/qcom_glink_native.c
drivers/rtc/Makefile
drivers/rtc/rtc-core.h
drivers/rtc/rtc-efi-platform.c
drivers/rtc/rtc-sa1100.h
drivers/s390/block/Makefile
drivers/s390/block/dasd.c
drivers/s390/block/dasd_3990_erp.c
drivers/s390/block/dasd_alias.c
drivers/s390/block/dasd_diag.h
drivers/s390/block/dasd_eckd.h
drivers/s390/block/dasd_eer.c
drivers/s390/block/dasd_erp.c
drivers/s390/block/dasd_fba.h
drivers/s390/block/dasd_genhd.c
drivers/s390/block/dasd_int.h
drivers/s390/block/dasd_ioctl.c
drivers/s390/block/dasd_proc.c
drivers/s390/block/scm_blk.c
drivers/s390/block/scm_blk.h
drivers/s390/block/scm_drv.c
drivers/s390/char/Makefile
drivers/s390/char/con3215.c
drivers/s390/char/con3270.c
drivers/s390/char/ctrlchar.c
drivers/s390/char/ctrlchar.h
drivers/s390/char/defkeymap.c
drivers/s390/char/diag_ftp.c
drivers/s390/char/diag_ftp.h
drivers/s390/char/hmcdrv_cache.c
drivers/s390/char/hmcdrv_cache.h
drivers/s390/char/hmcdrv_dev.c
drivers/s390/char/hmcdrv_dev.h
drivers/s390/char/hmcdrv_ftp.c
drivers/s390/char/hmcdrv_ftp.h
drivers/s390/char/keyboard.c
drivers/s390/char/keyboard.h
drivers/s390/char/raw3270.h
drivers/s390/char/sclp.c
drivers/s390/char/sclp.h
drivers/s390/char/sclp_cmd.c
drivers/s390/char/sclp_con.c
drivers/s390/char/sclp_config.c
drivers/s390/char/sclp_cpi_sys.c
drivers/s390/char/sclp_cpi_sys.h
drivers/s390/char/sclp_ctl.c
drivers/s390/char/sclp_diag.h
drivers/s390/char/sclp_early.c
drivers/s390/char/sclp_early_core.c
drivers/s390/char/sclp_ftp.c
drivers/s390/char/sclp_ftp.h
drivers/s390/char/sclp_ocf.c
drivers/s390/char/sclp_pci.c
drivers/s390/char/sclp_quiesce.c
drivers/s390/char/sclp_rw.c
drivers/s390/char/sclp_rw.h
drivers/s390/char/sclp_sdias.c
drivers/s390/char/sclp_sdias.h
drivers/s390/char/sclp_tty.c
drivers/s390/char/sclp_tty.h
drivers/s390/char/sclp_vt220.c
drivers/s390/char/tape.h
drivers/s390/char/tape_3590.h
drivers/s390/char/tape_char.c
drivers/s390/char/tape_class.h
drivers/s390/char/tape_proc.c
drivers/s390/char/tape_std.c
drivers/s390/char/tape_std.h
drivers/s390/char/tty3270.h
drivers/s390/char/vmcp.c
drivers/s390/char/vmur.h
drivers/s390/cio/Makefile
drivers/s390/cio/airq.c
drivers/s390/cio/blacklist.c
drivers/s390/cio/ccwreq.c
drivers/s390/cio/chp.h
drivers/s390/cio/chsc.h
drivers/s390/cio/chsc_sch.h
drivers/s390/cio/cio.h
drivers/s390/cio/cio_debug.h
drivers/s390/cio/crw.c
drivers/s390/cio/css.h
drivers/s390/cio/device.c
drivers/s390/cio/device.h
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_id.c
drivers/s390/cio/device_pgid.c
drivers/s390/cio/device_status.c
drivers/s390/cio/eadm_sch.h
drivers/s390/cio/fcx.c
drivers/s390/cio/idset.c
drivers/s390/cio/idset.h
drivers/s390/cio/io_sch.h
drivers/s390/cio/ioasm.c
drivers/s390/cio/ioasm.h
drivers/s390/cio/itcw.c
drivers/s390/cio/orb.h
drivers/s390/cio/qdio.h
drivers/s390/cio/qdio_debug.c
drivers/s390/cio/qdio_debug.h
drivers/s390/cio/qdio_thinint.c
drivers/s390/cio/trace.c
drivers/s390/cio/trace.h
drivers/s390/cio/vfio_ccw_cp.c
drivers/s390/cio/vfio_ccw_cp.h
drivers/s390/cio/vfio_ccw_fsm.c
drivers/s390/cio/vfio_ccw_ops.c
drivers/s390/cio/vfio_ccw_private.h
drivers/s390/crypto/Makefile
drivers/s390/crypto/ap_asm.h
drivers/s390/crypto/ap_card.c
drivers/s390/crypto/ap_debug.h
drivers/s390/crypto/ap_queue.c
drivers/s390/crypto/zcrypt_cex4.h
drivers/s390/crypto/zcrypt_debug.h
drivers/s390/net/Makefile
drivers/s390/net/ctcm_dbug.c
drivers/s390/net/ctcm_dbug.h
drivers/s390/net/ctcm_fsms.c
drivers/s390/net/ctcm_fsms.h
drivers/s390/net/ctcm_main.h
drivers/s390/net/ctcm_mpc.c
drivers/s390/net/ctcm_mpc.h
drivers/s390/net/ctcm_sysfs.c
drivers/s390/net/fsm.h
drivers/s390/net/lcs.h
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_mpc.c
drivers/s390/net/qeth_core_mpc.h
drivers/s390/net/qeth_l2.h
drivers/s390/net/qeth_l2_sys.c
drivers/s390/net/qeth_l3.h
drivers/s390/net/qeth_l3_sys.c
drivers/s390/net/smsgiucv.h
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_ccw.c
drivers/s390/scsi/zfcp_dbf.c
drivers/s390/scsi/zfcp_dbf.h
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_fc.c
drivers/s390/scsi/zfcp_fc.h
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_fsf.h
drivers/s390/scsi/zfcp_qdio.c
drivers/s390/scsi/zfcp_qdio.h
drivers/s390/scsi/zfcp_reqlist.h
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_sysfs.c
drivers/s390/scsi/zfcp_unit.c
drivers/sbus/char/Makefile
drivers/sbus/char/bbc_envctrl.c
drivers/sbus/char/bbc_i2c.h
drivers/sbus/char/max1617.h
drivers/scsi/53c700.h
drivers/scsi/Makefile
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.h
drivers/scsi/NCR_D700.h
drivers/scsi/NCR_Q720.h
drivers/scsi/a2091.h
drivers/scsi/a3000.h
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/comminit.c
drivers/scsi/aacraid/linit.c
drivers/scsi/aacraid/src.c
drivers/scsi/aha152x.h
drivers/scsi/aha1542.h
drivers/scsi/aha1740.h
drivers/scsi/aic7xxx/Makefile
drivers/scsi/aic7xxx/aicasm/Makefile
drivers/scsi/arm/Makefile
drivers/scsi/arm/acornscsi.c
drivers/scsi/atp870u.h
drivers/scsi/bfa/Makefile
drivers/scsi/constants.c
drivers/scsi/csiostor/Makefile
drivers/scsi/dc395x.h
drivers/scsi/eata_generic.h
drivers/scsi/eata_pio.h
drivers/scsi/esp_scsi.h
drivers/scsi/fcoe/libfcoe.h
drivers/scsi/fnic/Makefile
drivers/scsi/gdth.h
drivers/scsi/gdth_ioctl.h
drivers/scsi/gdth_proc.c
drivers/scsi/gdth_proc.h
drivers/scsi/gvp11.h
drivers/scsi/hpsa.c
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
drivers/scsi/ibmvscsi_tgt/libsrp.h
drivers/scsi/imm.h
drivers/scsi/isci/Makefile
drivers/scsi/libfc/Makefile
drivers/scsi/libfc/fc_rport.c
drivers/scsi/libiscsi.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/mac53c94.h
drivers/scsi/megaraid.h
drivers/scsi/megaraid/Makefile
drivers/scsi/mesh.h
drivers/scsi/mpt3sas/Makefile
drivers/scsi/mpt3sas/mpi/mpi2.h
drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h
drivers/scsi/mpt3sas/mpi/mpi2_init.h
drivers/scsi/mpt3sas/mpi/mpi2_ioc.h
drivers/scsi/mpt3sas/mpi/mpi2_raid.h
drivers/scsi/mpt3sas/mpi/mpi2_sas.h
drivers/scsi/mpt3sas/mpi/mpi2_tool.h
drivers/scsi/mpt3sas/mpi/mpi2_type.h
drivers/scsi/mvme147.c
drivers/scsi/mvme147.h
drivers/scsi/osst.h
drivers/scsi/osst_detect.h
drivers/scsi/osst_options.h
drivers/scsi/pcmcia/Makefile
drivers/scsi/pm8001/Makefile
drivers/scsi/ppa.h
drivers/scsi/qla2xxx/Makefile
drivers/scsi/qla2xxx/qla_devtbl.h
drivers/scsi/qla2xxx/qla_nvme.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/tcm_qla2xxx.h
drivers/scsi/qlogicfas408.h
drivers/scsi/qlogicpti.h
drivers/scsi/scsi.h
drivers/scsi/scsi_common.c
drivers/scsi/scsi_debugfs.c
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_lib_dma.c
drivers/scsi/scsi_logging.h
drivers/scsi/scsi_priv.h
drivers/scsi/scsi_proc.c
drivers/scsi/scsi_sas_internal.h
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_transport_api.h
drivers/scsi/scsi_transport_fc.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/scsicam.c
drivers/scsi/sd.c
drivers/scsi/sd.h
drivers/scsi/sense_codes.h
drivers/scsi/sg.c
drivers/scsi/snic/Makefile
drivers/scsi/sr.h
drivers/scsi/sr_ioctl.c
drivers/scsi/sr_vendor.c
drivers/scsi/st.h
drivers/scsi/st_options.h
drivers/scsi/ufs/Makefile
drivers/scsi/wd719x.h
drivers/sh/Makefile
drivers/sh/intc/internals.h
drivers/soc/Makefile
drivers/soc/dove/pmu.c
drivers/soc/fsl/qbman/Makefile
drivers/soc/fsl/qe/Makefile
drivers/soc/qcom/Makefile
drivers/soc/renesas/Makefile
drivers/soc/tegra/Makefile
drivers/soc/tegra/fuse/Makefile
drivers/soc/ti/Makefile
drivers/spi/Makefile
drivers/spi/spi-armada-3700.c
drivers/spi/spi-bcm-qspi.c
drivers/spi/spi-bcm53xx.h
drivers/spi/spi-bitbang-txrx.h
drivers/spi/spi-cavium.h
drivers/spi/spi-dw.h
drivers/spi/spi-stm32.c
drivers/spi/spi.c
drivers/ssb/Makefile
drivers/ssb/ssb_private.h
drivers/staging/Makefile
drivers/staging/android/ion/Makefile
drivers/staging/board/board.h
drivers/staging/board/kzm9d.c
drivers/staging/comedi/Makefile
drivers/staging/comedi/comedi_internal.h
drivers/staging/comedi/drivers/Makefile
drivers/staging/comedi/drivers/addi_tcw.h
drivers/staging/comedi/drivers/addi_watchdog.h
drivers/staging/comedi/drivers/amcc_s5933.h
drivers/staging/comedi/drivers/jr3_pci.h
drivers/staging/comedi/drivers/ni_labpc_isadma.h
drivers/staging/comedi/drivers/ni_labpc_regs.h
drivers/staging/comedi/drivers/z8536.h
drivers/staging/dgnc/dgnc_utils.c
drivers/staging/dgnc/dgnc_utils.h
drivers/staging/fbtft/Makefile
drivers/staging/fbtft/fbtft-bus.c
drivers/staging/fbtft/fbtft-io.c
drivers/staging/fbtft/fbtft-sysfs.c
drivers/staging/fwserial/fwserial.h
drivers/staging/gdm724x/Makefile
drivers/staging/greybus/Makefile
drivers/staging/greybus/greybus_id.h
drivers/staging/greybus/tools/Makefile
drivers/staging/iio/Makefile
drivers/staging/iio/adc/Makefile
drivers/staging/iio/adc/ad7192.c
drivers/staging/iio/meter/Makefile
drivers/staging/iio/meter/ade7759.c
drivers/staging/iio/meter/ade7854.h
drivers/staging/iio/meter/meter.h
drivers/staging/iio/trigger/iio-trig-bfin-timer.h
drivers/staging/ks7010/eap_packet.h
drivers/staging/lustre/lnet/libcfs/Makefile
drivers/staging/lustre/lnet/lnet/Makefile
drivers/staging/lustre/lustre/llite/Makefile
drivers/staging/lustre/lustre/llite/xattr_cache.c
drivers/staging/lustre/lustre/lov/Makefile
drivers/staging/lustre/lustre/obdclass/Makefile
drivers/staging/lustre/lustre/ptlrpc/Makefile
drivers/staging/media/Makefile
drivers/staging/media/atomisp/i2c/Makefile
drivers/staging/media/atomisp/i2c/imx/Makefile
drivers/staging/media/atomisp/i2c/imx/ad5816g.c
drivers/staging/media/atomisp/i2c/imx/ad5816g.h
drivers/staging/media/atomisp/i2c/imx/common.h
drivers/staging/media/atomisp/i2c/imx/drv201.c
drivers/staging/media/atomisp/i2c/imx/drv201.h
drivers/staging/media/atomisp/i2c/imx/dw9714.c
drivers/staging/media/atomisp/i2c/imx/dw9714.h
drivers/staging/media/atomisp/i2c/imx/imx134.h
drivers/staging/media/atomisp/i2c/imx/imx175.h
drivers/staging/media/atomisp/i2c/imx/imx219.h
drivers/staging/media/atomisp/i2c/imx/imx227.h
drivers/staging/media/atomisp/i2c/ov5693/Makefile
drivers/staging/media/atomisp/include/asm/intel_mid_pcihelpers.h
drivers/staging/media/atomisp/pci/atomisp2/Makefile
drivers/staging/media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c
drivers/staging/media/imx/Makefile
drivers/staging/media/imx/imx-media-dev.c
drivers/staging/most/Makefile
drivers/staging/mt29f_spinand/mt29f_spinand.c
drivers/staging/nvec/Makefile
drivers/staging/olpc_dcon/olpc_dcon.h
drivers/staging/pi433/rf69.c
drivers/staging/rtl8188eu/Makefile
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
drivers/staging/rtl8188eu/include/Hal8188ERateAdaptive.h
drivers/staging/rtl8188eu/include/phy.h
drivers/staging/rtl8188eu/include/rf.h
drivers/staging/rtl8192e/Makefile
drivers/staging/rtl8192e/rtl8192e/Makefile
drivers/staging/rtl8192u/Makefile
drivers/staging/rtl8192u/ieee80211/Makefile
drivers/staging/rtl8192u/ieee80211/dot11d.c
drivers/staging/rtl8192u/ieee80211/dot11d.h
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
drivers/staging/rtl8192u/r8192U_dm.c
drivers/staging/rtl8192u/r8192U_dm.h
drivers/staging/rtl8192u/r819xU_cmdpkt.c
drivers/staging/rtl8192u/r819xU_cmdpkt.h
drivers/staging/rtl8192u/r819xU_firmware.c
drivers/staging/rtl8192u/r819xU_firmware.h
drivers/staging/rtl8192u/r819xU_firmware_img.c
drivers/staging/rtl8192u/r819xU_firmware_img.h
drivers/staging/rtl8192u/r819xU_phy.c
drivers/staging/rtl8192u/r819xU_phy.h
drivers/staging/rtl8192u/r819xU_phyreg.h
drivers/staging/rtl8712/Makefile
drivers/staging/rtl8712/rtl8712_efuse.h
drivers/staging/rtl8712/rtl871x_ioctl.h
drivers/staging/rtl8712/rtl871x_mp_phy_regdef.h
drivers/staging/rtl8712/rtl871x_recv.h
drivers/staging/rtl8723bs/Makefile
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/hal/Hal8723BReg.h
drivers/staging/rtl8723bs/include/Hal8723BPwrSeq.h
drivers/staging/rtl8723bs/include/rtw_wifi_regd.h
drivers/staging/rtl8723bs/os_dep/rtw_proc.c
drivers/staging/rtl8723bs/os_dep/wifi_regd.c
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c
drivers/staging/rts5208/trace.c
drivers/staging/skein/Makefile
drivers/staging/skein/skein_iv.h
drivers/staging/skein/threefish_api.c
drivers/staging/skein/threefish_api.h
drivers/staging/skein/threefish_block.c
drivers/staging/sm750fb/ddk750_chip.c
drivers/staging/sm750fb/ddk750_chip.h
drivers/staging/sm750fb/ddk750_display.c
drivers/staging/sm750fb/ddk750_display.h
drivers/staging/sm750fb/ddk750_dvi.c
drivers/staging/sm750fb/ddk750_dvi.h
drivers/staging/sm750fb/ddk750_hwi2c.c
drivers/staging/sm750fb/ddk750_hwi2c.h
drivers/staging/sm750fb/ddk750_mode.c
drivers/staging/sm750fb/ddk750_mode.h
drivers/staging/sm750fb/ddk750_power.c
drivers/staging/sm750fb/ddk750_power.h
drivers/staging/sm750fb/ddk750_reg.h
drivers/staging/sm750fb/ddk750_sii164.c
drivers/staging/sm750fb/ddk750_sii164.h
drivers/staging/sm750fb/sm750.h
drivers/staging/sm750fb/sm750_accel.c
drivers/staging/sm750fb/sm750_accel.h
drivers/staging/sm750fb/sm750_cursor.c
drivers/staging/sm750fb/sm750_cursor.h
drivers/staging/sm750fb/sm750_hw.c
drivers/staging/speakup/Makefile
drivers/staging/speakup/devsynth.c
drivers/staging/speakup/i18n.c
drivers/staging/speakup/i18n.h
drivers/staging/speakup/main.c
drivers/staging/speakup/selection.c
drivers/staging/speakup/serialio.h
drivers/staging/speakup/speakup.h
drivers/staging/speakup/speakup_acnt.h
drivers/staging/speakup/speakup_dtlk.h
drivers/staging/speakup/speakupmap.h
drivers/staging/speakup/spk_types.h
drivers/staging/unisys/visorbus/Makefile
drivers/staging/unisys/visorbus/visorchipset.c
drivers/staging/vboxvideo/Makefile
drivers/staging/vc04_services/Makefile
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
drivers/staging/vc04_services/bcm2835-camera/Makefile
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_genversion
drivers/staging/vme/devices/vme_pio2.h
drivers/staging/vme/devices/vme_user.h
drivers/staging/vt6655/Makefile
drivers/staging/vt6656/Makefile
drivers/staging/wilc1000/Makefile
drivers/staging/wilc1000/coreconfigurator.c
drivers/staging/wilc1000/coreconfigurator.h
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/host_interface.h
drivers/staging/wilc1000/linux_mon.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
drivers/staging/wilc1000/wilc_wfi_netdevice.h
drivers/staging/wilc1000/wilc_wlan.h
drivers/staging/wilc1000/wilc_wlan_cfg.c
drivers/staging/wilc1000/wilc_wlan_cfg.h
drivers/staging/wilc1000/wilc_wlan_if.h
drivers/staging/wlan-ng/Makefile
drivers/staging/wlan-ng/cfg80211.c
drivers/staging/wlan-ng/prism2usb.c
drivers/staging/xgifb/XGI_main.h
drivers/staging/xgifb/XGIfb.h
drivers/staging/xgifb/vb_def.h
drivers/staging/xgifb/vb_init.c
drivers/staging/xgifb/vb_init.h
drivers/staging/xgifb/vb_setmode.c
drivers/staging/xgifb/vb_setmode.h
drivers/staging/xgifb/vb_struct.h
drivers/staging/xgifb/vb_table.h
drivers/staging/xgifb/vb_util.h
drivers/staging/xgifb/vgatypes.h
drivers/target/Makefile
drivers/target/iscsi/Makefile
drivers/target/iscsi/cxgbit/Makefile
drivers/target/iscsi/iscsi_target.h
drivers/target/iscsi/iscsi_target_auth.h
drivers/target/iscsi/iscsi_target_datain_values.h
drivers/target/iscsi/iscsi_target_device.h
drivers/target/iscsi/iscsi_target_erl0.h
drivers/target/iscsi/iscsi_target_erl1.h
drivers/target/iscsi/iscsi_target_erl2.h
drivers/target/iscsi/iscsi_target_login.h
drivers/target/iscsi/iscsi_target_nego.h
drivers/target/iscsi/iscsi_target_nodeattrib.h
drivers/target/iscsi/iscsi_target_parameters.h
drivers/target/iscsi/iscsi_target_seq_pdu_list.h
drivers/target/iscsi/iscsi_target_tmr.h
drivers/target/iscsi/iscsi_target_tpg.h
drivers/target/iscsi/iscsi_target_transport.c
drivers/target/iscsi/iscsi_target_util.h
drivers/target/loopback/tcm_loop.h
drivers/target/sbp/sbp_target.h
drivers/target/target_core_alua.h
drivers/target/target_core_file.h
drivers/target/target_core_iblock.h
drivers/target/target_core_internal.h
drivers/target/target_core_pr.h
drivers/target/target_core_pscsi.h
drivers/target/target_core_rd.h
drivers/target/target_core_ua.h
drivers/target/target_core_xcopy.h
drivers/target/tcm_fc/Makefile
drivers/tee/Makefile
drivers/tee/optee/Makefile
drivers/thermal/Makefile
drivers/thermal/int340x_thermal/Makefile
drivers/thermal/int340x_thermal/acpi_thermal_rel.h
drivers/thermal/tegra/Makefile
drivers/thermal/ti-soc-thermal/Makefile
drivers/thunderbolt/cap.c
drivers/thunderbolt/ctl.c
drivers/thunderbolt/ctl.h
drivers/thunderbolt/eeprom.c
drivers/thunderbolt/nhi.h
drivers/thunderbolt/nhi_regs.h
drivers/thunderbolt/path.c
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/tb_regs.h
drivers/thunderbolt/tunnel_pci.c
drivers/thunderbolt/tunnel_pci.h
drivers/tty/Makefile
drivers/tty/hvc/Makefile
drivers/tty/hvc/hvc_irq.c
drivers/tty/hvc/hvc_iucv.c
drivers/tty/hvc/hvsi_lib.c
drivers/tty/ipwireless/hardware.c
drivers/tty/ipwireless/hardware.h
drivers/tty/ipwireless/main.h
drivers/tty/ipwireless/network.c
drivers/tty/ipwireless/network.h
drivers/tty/ipwireless/setup_protocol.h
drivers/tty/ipwireless/tty.c
drivers/tty/ipwireless/tty.h
drivers/tty/moxa.h
drivers/tty/mxser.c
drivers/tty/mxser.h
drivers/tty/pty.c
drivers/tty/rocket.h
drivers/tty/rocket_int.h
drivers/tty/serial/8250/Makefile
drivers/tty/serial/Makefile
drivers/tty/serial/amba-pl011.h
drivers/tty/serial/apbuart.h
drivers/tty/serial/bcm63xx_uart.c
drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h
drivers/tty/serial/cpm_uart/cpm_uart_cpm2.h
drivers/tty/serial/crisv10.c
drivers/tty/serial/crisv10.h
drivers/tty/serial/dz.h
drivers/tty/serial/etraxfs-uart.c
drivers/tty/serial/fsl_lpuart.c
drivers/tty/serial/ip22zilog.h
drivers/tty/serial/pmac_zilog.h
drivers/tty/serial/sccnxp.c
drivers/tty/serial/sh-sci.h
drivers/tty/serial/sunsab.h
drivers/tty/serial/sunzilog.h
drivers/tty/serial/zs.h
drivers/tty/sysrq.c
drivers/tty/tty_ldisc.c
drivers/tty/tty_mutex.c
drivers/tty/vt/Makefile
drivers/tty/vt/selection.c
drivers/tty/vt/vc_screen.c
drivers/tty/vt/vt_ioctl.c
drivers/uio/Makefile
drivers/usb/Makefile
drivers/usb/atm/Makefile
drivers/usb/chipidea/Makefile
drivers/usb/chipidea/debug.c
drivers/usb/chipidea/host.h
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.h
drivers/usb/class/cdc-wdm.c
drivers/usb/common/Makefile
drivers/usb/core/Makefile
drivers/usb/core/config.c
drivers/usb/core/devio.c
drivers/usb/core/hub.c
drivers/usb/core/message.c
drivers/usb/core/quirks.c
drivers/usb/dwc2/Makefile
drivers/usb/dwc3/Makefile
drivers/usb/dwc3/dwc3-of-simple.c
drivers/usb/dwc3/ep0.c
drivers/usb/gadget/Makefile
drivers/usb/gadget/composite.c
drivers/usb/gadget/configfs.c
drivers/usb/gadget/configfs.h
drivers/usb/gadget/function/Makefile
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/f_mass_storage.c
drivers/usb/gadget/function/f_mass_storage.h
drivers/usb/gadget/function/f_printer.c
drivers/usb/gadget/function/f_rndis.c
drivers/usb/gadget/function/g_zero.h
drivers/usb/gadget/function/storage_common.h
drivers/usb/gadget/function/tcm.h
drivers/usb/gadget/function/u_fs.h
drivers/usb/gadget/function/u_rndis.h
drivers/usb/gadget/function/uvc_queue.h
drivers/usb/gadget/legacy/Makefile
drivers/usb/gadget/legacy/inode.c
drivers/usb/gadget/legacy/mass_storage.c
drivers/usb/gadget/udc/Kconfig
drivers/usb/gadget/udc/Makefile
drivers/usb/gadget/udc/atmel_usba_udc.c
drivers/usb/gadget/udc/bdc/Makefile
drivers/usb/gadget/udc/core.c
drivers/usb/gadget/udc/dummy_hcd.c
drivers/usb/gadget/udc/omap_udc.h
drivers/usb/gadget/udc/renesas_usb3.c
drivers/usb/host/Makefile
drivers/usb/host/fotg210.h
drivers/usb/host/isp116x.h
drivers/usb/host/isp1362.h
drivers/usb/host/oxu210hp.h
drivers/usb/host/pci-quirks.c
drivers/usb/host/pci-quirks.h
drivers/usb/host/sl811.h
drivers/usb/host/uhci-debug.c
drivers/usb/host/uhci-grlib.c
drivers/usb/host/uhci-hcd.h
drivers/usb/host/uhci-hub.c
drivers/usb/host/uhci-pci.c
drivers/usb/host/uhci-platform.c
drivers/usb/host/uhci-q.c
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci-plat.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/image/microtek.h
drivers/usb/isp1760/isp1760-hcd.c
drivers/usb/isp1760/isp1760-hcd.h
drivers/usb/isp1760/isp1760-if.c
drivers/usb/misc/Makefile
drivers/usb/misc/usbtest.c
drivers/usb/mon/mon_bin.c
drivers/usb/mon/mon_stat.c
drivers/usb/mon/mon_text.c
drivers/usb/mon/usb_mon.h
drivers/usb/mtu3/Makefile
drivers/usb/musb/Makefile
drivers/usb/musb/cppi_dma.h
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_cppi41.c
drivers/usb/musb/sunxi.c
drivers/usb/phy/Makefile
drivers/usb/phy/phy-am335x-control.h
drivers/usb/phy/phy-generic.h
drivers/usb/phy/phy-tegra-usb.c
drivers/usb/renesas_usbhs/Makefile
drivers/usb/renesas_usbhs/fifo.c
drivers/usb/serial/Makefile
drivers/usb/serial/console.c
drivers/usb/serial/cp210x.c
drivers/usb/serial/cypress_m8.h
drivers/usb/serial/ezusb_convert.pl
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio.h
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/kl5kusb105.h
drivers/usb/serial/kobil_sct.h
drivers/usb/serial/metro-usb.c
drivers/usb/serial/option.c
drivers/usb/serial/qcserial.c
drivers/usb/serial/usb-wwan.h
drivers/usb/storage/Makefile
drivers/usb/storage/option_ms.h
drivers/usb/storage/sierra_ms.c
drivers/usb/storage/sierra_ms.h
drivers/usb/storage/transport.c
drivers/usb/storage/uas-detect.h
drivers/usb/storage/uas.c
drivers/usb/storage/unusual_devs.h
drivers/usb/typec/ucsi/Makefile
drivers/usb/typec/ucsi/debug.h
drivers/usb/typec/ucsi/trace.h
drivers/usb/typec/ucsi/ucsi.h
drivers/usb/usbip/Makefile
drivers/usb/wusbcore/Makefile
drivers/uwb/Makefile
drivers/uwb/hwa-rc.c
drivers/uwb/i1480/dfu/Makefile
drivers/uwb/uwbd.c
drivers/vfio/Makefile
drivers/vfio/platform/Makefile
drivers/vfio/platform/reset/Makefile
drivers/vhost/Makefile
drivers/vhost/test.h
drivers/vhost/vhost.h
drivers/video/Makefile
drivers/video/backlight/Makefile
drivers/video/console/Makefile
drivers/video/fbdev/Makefile
drivers/video/fbdev/amba-clcd-nomadik.h
drivers/video/fbdev/amba-clcd-versatile.h
drivers/video/fbdev/atafb.h
drivers/video/fbdev/atafb_utils.h
drivers/video/fbdev/aty/Makefile
drivers/video/fbdev/aty/ati_ids.h
drivers/video/fbdev/aty/atyfb.h
drivers/video/fbdev/aty/mach64_accel.c
drivers/video/fbdev/aty/mach64_ct.c
drivers/video/fbdev/aty/mach64_cursor.c
drivers/video/fbdev/aty/mach64_gx.c
drivers/video/fbdev/aty/radeon_accel.c
drivers/video/fbdev/aty/radeon_i2c.c
drivers/video/fbdev/aty/radeon_monitor.c
drivers/video/fbdev/aty/radeon_pm.c
drivers/video/fbdev/aty/radeonfb.h
drivers/video/fbdev/carminefb.h
drivers/video/fbdev/carminefb_regs.h
drivers/video/fbdev/core/Makefile
drivers/video/fbdev/core/fb_draw.h
drivers/video/fbdev/efifb.c
drivers/video/fbdev/geode/Makefile
drivers/video/fbdev/i810/Makefile
drivers/video/fbdev/intelfb/Makefile
drivers/video/fbdev/intelfb/intelfb.h
drivers/video/fbdev/matrox/g450_pll.h
drivers/video/fbdev/matrox/matroxfb_DAC1064.h
drivers/video/fbdev/matrox/matroxfb_Ti3026.h
drivers/video/fbdev/matrox/matroxfb_accel.h
drivers/video/fbdev/matrox/matroxfb_base.h
drivers/video/fbdev/matrox/matroxfb_crtc2.h
drivers/video/fbdev/matrox/matroxfb_g450.h
drivers/video/fbdev/matrox/matroxfb_maven.h
drivers/video/fbdev/matrox/matroxfb_misc.h
drivers/video/fbdev/mb862xx/mb862xx_reg.h
drivers/video/fbdev/mb862xx/mb862xxfb.h
drivers/video/fbdev/mb862xx/mb862xxfb_accel.h
drivers/video/fbdev/mbx/mbxdebugfs.c
drivers/video/fbdev/mbx/reg_bits.h
drivers/video/fbdev/mbx/regs.h
drivers/video/fbdev/mmp/panel/Kconfig
drivers/video/fbdev/nvidia/Makefile
drivers/video/fbdev/nvidia/nv_proto.h
drivers/video/fbdev/nvidia/nv_type.h
drivers/video/fbdev/omap/Makefile
drivers/video/fbdev/omap/lcdc.h
drivers/video/fbdev/omap2/omapfb/Makefile
drivers/video/fbdev/omap2/omapfb/displays/Makefile
drivers/video/fbdev/omap2/omapfb/dss/Kconfig
drivers/video/fbdev/omap2/omapfb/dss/Makefile
drivers/video/fbdev/omap2/omapfb/dss/hdmi_common.c
drivers/video/fbdev/pxa168fb.h
drivers/video/fbdev/pxa3xx-gcu.h
drivers/video/fbdev/riva/Makefile
drivers/video/fbdev/riva/nv_type.h
drivers/video/fbdev/riva/rivafb.h
drivers/video/fbdev/sbuslib.c
drivers/video/fbdev/sbuslib.h
drivers/video/fbdev/sh_mobile_lcdcfb.h
drivers/video/fbdev/sticore.h
drivers/video/fbdev/via/Makefile
drivers/video/fbdev/wmt_ge_rops.h
drivers/video/logo/Makefile
drivers/virtio/Makefile
drivers/vme/vme_bridge.h
drivers/w1/masters/Makefile
drivers/w1/slaves/Makefile
drivers/watchdog/Makefile
drivers/watchdog/iTCO_vendor.h
drivers/watchdog/sp5100_tco.h
drivers/watchdog/watchdog_pretimeout.h
drivers/xen/Makefile
drivers/xen/biomerge.c
drivers/xen/cpu_hotplug.c
drivers/xen/events/events_2l.c
drivers/xen/gntdev.c
drivers/xen/time.c
drivers/xen/xen-balloon.c
drivers/xen/xen-pciback/Makefile
drivers/xen/xen-pciback/conf_space.c
drivers/xen/xen-pciback/conf_space.h
drivers/xen/xen-pciback/conf_space_capability.c
drivers/xen/xen-pciback/conf_space_header.c
drivers/xen/xen-pciback/conf_space_quirks.c
drivers/xen/xen-pciback/conf_space_quirks.h
drivers/xen/xen-pciback/passthrough.c
drivers/xen/xen-pciback/pciback.h
drivers/xen/xen-pciback/pciback_ops.c
drivers/xen/xen-pciback/vpci.c
drivers/xen/xen-pciback/xenbus.c
drivers/xen/xen-selfballoon.c
drivers/xen/xenbus/Makefile
drivers/xen/xenbus/xenbus_client.c
drivers/xen/xenbus/xenbus_dev_backend.c
drivers/xen/xenfs/xenfs.h
drivers/xen/xenfs/xenstored.c
drivers/xen/xenfs/xensyms.c
drivers/zorro/Makefile
drivers/zorro/gen-devlist.c
drivers/zorro/names.c
drivers/zorro/proc.c
drivers/zorro/zorro.h
firmware/Makefile
fs/9p/Makefile
fs/9p/vfs_addr.c
fs/Makefile
fs/adfs/adfs.h
fs/adfs/file.c
fs/affs/affs.h
fs/affs/amigaffs.c
fs/affs/amigaffs.h
fs/affs/bitmap.c
fs/affs/dir.c
fs/affs/file.c
fs/affs/inode.c
fs/affs/namei.c
fs/affs/symlink.c
fs/afs/Makefile
fs/afs/netdevices.c
fs/attr.c
fs/bad_inode.c
fs/befs/befs.h
fs/befs/befs_fs_types.h
fs/befs/btree.h
fs/befs/datastream.c
fs/befs/datastream.h
fs/befs/debug.c
fs/befs/endian.h
fs/befs/inode.c
fs/befs/io.c
fs/bfs/bfs.h
fs/bfs/dir.c
fs/bfs/file.c
fs/binfmt_flat.c
fs/binfmt_misc.c
fs/binfmt_script.c
fs/block_dev.c
fs/btrfs/Makefile
fs/btrfs/compression.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/export.c
fs/btrfs/export.h
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/extent_map.c
fs/btrfs/extent_map.h
fs/btrfs/inode-map.h
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/qgroup.c
fs/btrfs/relocation.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/sysfs.h
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/cachefiles/Makefile
fs/ceph/Makefile
fs/ceph/addr.c
fs/ceph/caps.c
fs/ceph/ceph_frag.c
fs/ceph/debugfs.c
fs/ceph/dir.c
fs/ceph/export.c
fs/ceph/file.c
fs/ceph/inode.c
fs/ceph/ioctl.c
fs/ceph/ioctl.h
fs/ceph/locks.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/mdsmap.c
fs/ceph/snap.c
fs/ceph/strings.c
fs/ceph/super.h
fs/ceph/xattr.c
fs/char_dev.c
fs/cifs/Kconfig
fs/cifs/Makefile
fs/cifs/cifs_debug.c
fs/cifs/cifsfs.c
fs/cifs/cifsfs.h
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/file.c
fs/cifs/inode.c
fs/cifs/smb2maperror.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2pdu.h
fs/cifs/smb2proto.h
fs/cifs/smb2transport.c
fs/coda/cache.c
fs/coda/cnode.c
fs/coda/coda_cache.h
fs/coda/coda_fs_i.h
fs/coda/coda_int.h
fs/coda/coda_linux.c
fs/coda/coda_linux.h
fs/coda/dir.c
fs/coda/file.c
fs/coda/inode.c
fs/coda/pioctl.c
fs/coda/symlink.c
fs/coda/sysctl.c
fs/coda/upcall.c
fs/compat_ioctl.c
fs/coredump.c
fs/cramfs/uncompress.c
fs/crypto/bio.c
fs/crypto/fname.c
fs/crypto/fscrypt_private.h
fs/crypto/keyinfo.c
fs/crypto/policy.c
fs/direct-io.c
fs/dlm/Makefile
fs/drop_caches.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/keystore.c
fs/efs/dir.c
fs/efs/efs.h
fs/efs/file.c
fs/efs/namei.c
fs/efs/super.c
fs/efs/symlink.c
fs/exec.c
fs/ext2/Makefile
fs/ext2/acl.c
fs/ext2/acl.h
fs/ext2/balloc.c
fs/ext2/dir.c
fs/ext2/ext2.h
fs/ext2/file.c
fs/ext2/ialloc.c
fs/ext2/inode.c
fs/ext2/ioctl.c
fs/ext2/namei.c
fs/ext2/symlink.c
fs/ext2/xattr.c
fs/ext2/xattr.h
fs/ext2/xattr_security.c
fs/ext2/xattr_trusted.c
fs/ext2/xattr_user.c
fs/ext4/Makefile
fs/ext4/acl.c
fs/ext4/acl.h
fs/ext4/balloc.c
fs/ext4/bitmap.c
fs/ext4/block_validity.c
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.c
fs/ext4/extents_status.c
fs/ext4/extents_status.h
fs/ext4/file.c
fs/ext4/fsync.c
fs/ext4/ialloc.c
fs/ext4/indirect.c
fs/ext4/inode.c
fs/ext4/ioctl.c
fs/ext4/mballoc.h
fs/ext4/mmp.c
fs/ext4/namei.c
fs/ext4/page-io.c
fs/ext4/readpage.c
fs/ext4/resize.c
fs/ext4/super.c
fs/ext4/symlink.c
fs/ext4/sysfs.c
fs/ext4/truncate.h
fs/ext4/xattr.c
fs/ext4/xattr.h
fs/ext4/xattr_security.c
fs/ext4/xattr_trusted.c
fs/ext4/xattr_user.c
fs/f2fs/Makefile
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c
fs/fat/Makefile
fs/fat/cache.c
fs/fat/fat.h
fs/fcntl.c
fs/fhandle.c
fs/file.c
fs/filesystems.c
fs/fs_pin.c
fs/fscache/Makefile
fs/fscache/object-list.c
fs/fuse/dir.c
fs/fuse/inode.c
fs/gfs2/Makefile
fs/gfs2/glock.c
fs/gfs2/trace_gfs2.h
fs/hfs/attr.c
fs/hfs/bfind.c
fs/hfs/bnode.c
fs/hfs/brec.c
fs/hfs/btree.c
fs/hfs/btree.h
fs/hfsplus/Makefile
fs/hfsplus/acl.h
fs/hfsplus/attributes.c
fs/hfsplus/bfind.c
fs/hfsplus/bitmap.c
fs/hfsplus/bnode.c
fs/hfsplus/brec.c
fs/hfsplus/btree.c
fs/hfsplus/catalog.c
fs/hfsplus/dir.c
fs/hfsplus/extents.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/hfsplus_raw.h
fs/hfsplus/inode.c
fs/hfsplus/ioctl.c
fs/hfsplus/options.c
fs/hfsplus/posix_acl.c
fs/hfsplus/tables.c
fs/hfsplus/unicode.c
fs/hfsplus/wrapper.c
fs/hfsplus/xattr.c
fs/hfsplus/xattr.h
fs/hfsplus/xattr_security.c
fs/hfsplus/xattr_trusted.c
fs/hfsplus/xattr_user.c
fs/hostfs/hostfs.h
fs/hpfs/alloc.c
fs/hpfs/anode.c
fs/hpfs/buffer.c
fs/hpfs/dentry.c
fs/hpfs/dir.c
fs/hpfs/dnode.c
fs/hpfs/ea.c
fs/hpfs/file.c
fs/hpfs/hpfs.h
fs/hpfs/hpfs_fn.h
fs/hpfs/inode.c
fs/hpfs/map.c
fs/hpfs/name.c
fs/hpfs/namei.c
fs/hugetlbfs/inode.c
fs/ioctl.c
fs/iomap.c
fs/isofs/Makefile
fs/isofs/dir.c
fs/isofs/export.c
fs/isofs/inode.c
fs/isofs/isofs.h
fs/isofs/joliet.c
fs/isofs/namei.c
fs/isofs/rock.c
fs/isofs/rock.h
fs/isofs/util.c
fs/jffs2/Makefile
fs/jfs/Makefile
fs/jfs/ioctl.c
fs/lockd/Makefile
fs/lockd/clnt4xdr.c
fs/lockd/clntxdr.c
fs/lockd/host.c
fs/lockd/mon.c
fs/lockd/netns.h
fs/lockd/procfs.c
fs/lockd/procfs.h
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
fs/lockd/svcshare.c
fs/lockd/xdr.c
fs/lockd/xdr4.c
fs/minix/bitmap.c
fs/minix/dir.c
fs/minix/file.c
fs/minix/itree_common.c
fs/minix/itree_v1.c
fs/minix/itree_v2.c
fs/minix/minix.h
fs/minix/namei.c
fs/mount.h
fs/mpage.c
fs/namei.c
fs/namespace.c
fs/ncpfs/Makefile
fs/ncpfs/dir.c
fs/ncpfs/file.c
fs/ncpfs/getopt.c
fs/ncpfs/getopt.h
fs/ncpfs/ioctl.c
fs/ncpfs/mmap.c
fs/ncpfs/ncp_fs.h
fs/ncpfs/ncp_fs_i.h
fs/ncpfs/ncp_fs_sb.h
fs/ncpfs/ncplib_kernel.c
fs/ncpfs/ncplib_kernel.h
fs/ncpfs/ncpsign_kernel.c
fs/ncpfs/ncpsign_kernel.h
fs/ncpfs/sock.c
fs/ncpfs/symlink.c
fs/nfs/Makefile
fs/nfs/blocklayout/dev.c
fs/nfs/blocklayout/extent_tree.c
fs/nfs/cache_lib.c
fs/nfs/cache_lib.h
fs/nfs/callback.c
fs/nfs/callback.h
fs/nfs/callback_proc.c
fs/nfs/callback_xdr.c
fs/nfs/client.c
fs/nfs/delegation.h
fs/nfs/dns_resolve.c
fs/nfs/dns_resolve.h
fs/nfs/export.c
fs/nfs/filelayout/filelayout.c
fs/nfs/flexfilelayout/flexfilelayout.h
fs/nfs/flexfilelayout/flexfilelayoutdev.c
fs/nfs/internal.h
fs/nfs/io.c
fs/nfs/iostat.h
fs/nfs/mount_clnt.c
fs/nfs/netns.h
fs/nfs/nfs.h
fs/nfs/nfs2xdr.c
fs/nfs/nfs3_fs.h
fs/nfs/nfs3acl.c
fs/nfs/nfs3proc.c
fs/nfs/nfs3xdr.c
fs/nfs/nfs42.h
fs/nfs/nfs42proc.c
fs/nfs/nfs42xdr.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4file.c
fs/nfs/nfs4getroot.c
fs/nfs/nfs4idmap.c
fs/nfs/nfs4namespace.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4session.h
fs/nfs/nfs4sysctl.c
fs/nfs/nfs4trace.c
fs/nfs/nfs4trace.h
fs/nfs/nfs4xdr.c
fs/nfs/nfsroot.c
fs/nfs/nfstrace.c
fs/nfs/nfstrace.h
fs/nfs/proc.c
fs/nfs/symlink.c
fs/nfs/sysctl.c
fs/nfs/unlink.c
fs/nfsd/Makefile
fs/nfsd/auth.c
fs/nfsd/auth.h
fs/nfsd/blocklayout.c
fs/nfsd/blocklayoutxdr.c
fs/nfsd/blocklayoutxdr.h
fs/nfsd/cache.h
fs/nfsd/current_stateid.h
fs/nfsd/export.c
fs/nfsd/export.h
fs/nfsd/fault_inject.c
fs/nfsd/flexfilelayout.c
fs/nfsd/flexfilelayoutxdr.c
fs/nfsd/flexfilelayoutxdr.h
fs/nfsd/lockd.c
fs/nfsd/nfs2acl.c
fs/nfsd/nfs3acl.c
fs/nfsd/nfs3proc.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs4layouts.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfscache.c
fs/nfsd/nfsd.h
fs/nfsd/nfsfh.c
fs/nfsd/nfsfh.h
fs/nfsd/nfsproc.c
fs/nfsd/nfssvc.c
fs/nfsd/nfsxdr.c
fs/nfsd/pnfs.h
fs/nfsd/stats.c
fs/nfsd/stats.h
fs/nfsd/trace.h
fs/nfsd/vfs.c
fs/nfsd/vfs.h
fs/nfsd/xdr.h
fs/nfsd/xdr3.h
fs/nfsd/xdr4cb.h
fs/nilfs2/Makefile
fs/nilfs2/export.h
fs/nls/Makefile
fs/notify/Makefile
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify.h
fs/notify/fanotify/fanotify_user.c
fs/notify/fdinfo.c
fs/notify/fdinfo.h
fs/notify/fsnotify.h
fs/notify/inotify/inotify.h
fs/nsfs.c
fs/ntfs/Makefile
fs/ocfs2/Makefile
fs/ocfs2/alloc.c
fs/ocfs2/ioctl.c
fs/ocfs2/ioctl.h
fs/ocfs2/mmap.h
fs/ocfs2/ocfs2_trace.h
fs/ocfs2/quota.h
fs/ocfs2/quota_global.c
fs/ocfs2/quota_local.c
fs/omfs/bitmap.c
fs/omfs/omfs.h
fs/omfs/omfs_fs.h
fs/orangefs/Makefile
fs/orangefs/acl.c
fs/orangefs/dcache.c
fs/orangefs/devorangefs-req.c
fs/orangefs/dir.c
fs/orangefs/downcall.h
fs/orangefs/file.c
fs/orangefs/inode.c
fs/orangefs/namei.c
fs/orangefs/orangefs-bufmap.c
fs/orangefs/orangefs-bufmap.h
fs/orangefs/orangefs-cache.c
fs/orangefs/orangefs-debug.h
fs/orangefs/orangefs-debugfs.c
fs/orangefs/orangefs-debugfs.h
fs/orangefs/orangefs-dev-proto.h
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-sysfs.c
fs/orangefs/orangefs-utils.c
fs/orangefs/protocol.h
fs/orangefs/super.c
fs/orangefs/symlink.c
fs/orangefs/upcall.h
fs/orangefs/waitqueue.c
fs/orangefs/xattr.c
fs/overlayfs/copy_up.c
fs/overlayfs/dir.c
fs/overlayfs/inode.c
fs/overlayfs/namei.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/readdir.c
fs/overlayfs/super.c
fs/overlayfs/util.c
fs/pipe.c
fs/proc/Makefile
fs/proc/array.c
fs/proc/base.c
fs/proc/cmdline.c
fs/proc/cpuinfo.c
fs/proc/devices.c
fs/proc/fd.c
fs/proc/fd.h
fs/proc/inode.c
fs/proc/interrupts.c
fs/proc/kcore.c
fs/proc/kmsg.c
fs/proc/loadavg.c
fs/proc/meminfo.c
fs/proc/namespaces.c
fs/proc/page.c
fs/proc/proc_sysctl.c
fs/proc/proc_tty.c
fs/proc/root.c
fs/proc/self.c
fs/proc/softirqs.c
fs/proc/stat.c
fs/proc/task_mmu.c
fs/proc/task_nommu.c
fs/proc/thread_self.c
fs/proc/uptime.c
fs/proc/version.c
fs/proc_namespace.c
fs/pstore/Makefile
fs/pstore/internal.h
fs/qnx4/bitmap.c
fs/qnx4/dir.c
fs/qnx4/namei.c
fs/qnx4/qnx4.h
fs/qnx6/dir.c
fs/qnx6/namei.c
fs/qnx6/qnx6.h
fs/qnx6/super_mmi.c
fs/quota/Makefile
fs/quota/compat.c
fs/quota/dquot.c
fs/quota/kqid.c
fs/quota/netlink.c
fs/quota/quota.c
fs/quota/quota_tree.h
fs/quota/quota_v2.c
fs/quota/quotaio_v1.h
fs/quota/quotaio_v2.h
fs/read_write.c
fs/readdir.c
fs/reiserfs/Makefile
fs/reiserfs/acl.h
fs/reiserfs/journal.c
fs/reiserfs/lock.c
fs/reiserfs/reiserfs.h
fs/reiserfs/tail_conversion.c
fs/reiserfs/xattr.c
fs/reiserfs/xattr.h
fs/reiserfs/xattr_acl.c
fs/reiserfs/xattr_security.c
fs/reiserfs/xattr_trusted.c
fs/reiserfs/xattr_user.c
fs/romfs/Makefile
fs/select.c
fs/seq_file.c
fs/signalfd.c
fs/squashfs/Makefile
fs/stat.c
fs/statfs.c
fs/super.c
fs/sync.c
fs/sysv/balloc.c
fs/sysv/dir.c
fs/sysv/file.c
fs/sysv/ialloc.c
fs/sysv/inode.c
fs/sysv/itree.c
fs/sysv/namei.c
fs/sysv/sysv.h
fs/timerfd.c
fs/ubifs/Makefile
fs/ubifs/crypto.c
fs/ubifs/misc.c
fs/udf/udf_i.h
fs/udf/udf_sb.h
fs/udf/udfdecl.h
fs/udf/udfend.h
fs/ufs/balloc.c
fs/ufs/cylinder.c
fs/ufs/dir.c
fs/ufs/file.c
fs/ufs/ialloc.c
fs/ufs/inode.c
fs/ufs/namei.c
fs/ufs/swab.h
fs/ufs/ufs.h
fs/ufs/ufs_fs.h
fs/ufs/util.c
fs/ufs/util.h
fs/userfaultfd.c
fs/utimes.c
fs/xattr.c
fs/xfs/libxfs/xfs_ag_resv.c
fs/xfs/libxfs/xfs_alloc.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_cksum.h
fs/xfs/libxfs/xfs_ialloc.c
fs/xfs/libxfs/xfs_log_format.h
fs/xfs/xfs_acl.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_attr_inactive.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_bmap_util.h
fs/xfs/xfs_buf.c
fs/xfs/xfs_discard.h
fs/xfs/xfs_error.c
fs/xfs/xfs_file.c
fs/xfs/xfs_fsmap.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_iomap.h
fs/xfs/xfs_log.c
fs/xfs/xfs_message.h
fs/xfs/xfs_mount.c
fs/xfs/xfs_ondisk.h
fs/xfs/xfs_pnfs.c
fs/xfs/xfs_pnfs.h
fs/xfs/xfs_reflink.c
fs/xfs/xfs_super.c
include/acpi/acpi_bus.h
include/acpi/acpi_io.h
include/acpi/acpi_numa.h
include/acpi/apei.h
include/acpi/button.h
include/acpi/ghes.h
include/acpi/pdc_intel.h
include/acpi/processor.h
include/acpi/reboot.h
include/acpi/video.h
include/asm-generic/4level-fixup.h
include/asm-generic/5level-fixup.h
include/asm-generic/asm-prototypes.h
include/asm-generic/atomic-long.h
include/asm-generic/audit_change_attr.h
include/asm-generic/audit_dir_write.h
include/asm-generic/audit_read.h
include/asm-generic/audit_write.h
include/asm-generic/bitops.h
include/asm-generic/bitops/__ffs.h
include/asm-generic/bitops/__fls.h
include/asm-generic/bitops/arch_hweight.h
include/asm-generic/bitops/atomic.h
include/asm-generic/bitops/builtin-__ffs.h
include/asm-generic/bitops/builtin-__fls.h
include/asm-generic/bitops/builtin-ffs.h
include/asm-generic/bitops/builtin-fls.h
include/asm-generic/bitops/const_hweight.h
include/asm-generic/bitops/ext2-atomic-setbit.h
include/asm-generic/bitops/ext2-atomic.h
include/asm-generic/bitops/ffs.h
include/asm-generic/bitops/ffz.h
include/asm-generic/bitops/find.h
include/asm-generic/bitops/fls.h
include/asm-generic/bitops/fls64.h
include/asm-generic/bitops/hweight.h
include/asm-generic/bitops/le.h
include/asm-generic/bitops/lock.h
include/asm-generic/bitops/non-atomic.h
include/asm-generic/bitops/sched.h
include/asm-generic/bitsperlong.h
include/asm-generic/bug.h
include/asm-generic/bugs.h
include/asm-generic/cache.h
include/asm-generic/cacheflush.h
include/asm-generic/checksum.h
include/asm-generic/cmpxchg-local.h
include/asm-generic/cmpxchg.h
include/asm-generic/current.h
include/asm-generic/delay.h
include/asm-generic/div64.h
include/asm-generic/dma-contiguous.h
include/asm-generic/dma.h
include/asm-generic/early_ioremap.h
include/asm-generic/emergency-restart.h
include/asm-generic/extable.h
include/asm-generic/fb.h
include/asm-generic/futex.h
include/asm-generic/getorder.h
include/asm-generic/gpio.h
include/asm-generic/hardirq.h
include/asm-generic/hugetlb.h
include/asm-generic/ide_iops.h
include/asm-generic/int-ll64.h
include/asm-generic/ioctl.h
include/asm-generic/iomap.h
include/asm-generic/irq.h
include/asm-generic/irq_work.h
include/asm-generic/irqflags.h
include/asm-generic/kdebug.h
include/asm-generic/kmap_types.h
include/asm-generic/kprobes.h
include/asm-generic/kvm_para.h
include/asm-generic/local.h
include/asm-generic/local64.h
include/asm-generic/memory_model.h
include/asm-generic/mm_hooks.h
include/asm-generic/mmu.h
include/asm-generic/mmu_context.h
include/asm-generic/module.h
include/asm-generic/msi.h
include/asm-generic/page.h
include/asm-generic/param.h
include/asm-generic/parport.h
include/asm-generic/pci.h
include/asm-generic/percpu.h
include/asm-generic/pgalloc.h
include/asm-generic/pgtable-nop4d-hack.h
include/asm-generic/pgtable-nop4d.h
include/asm-generic/pgtable-nopmd.h
include/asm-generic/pgtable-nopud.h
include/asm-generic/pgtable.h
include/asm-generic/preempt.h
include/asm-generic/qrwlock_types.h
include/asm-generic/resource.h
include/asm-generic/rwsem.h
include/asm-generic/sections.h
include/asm-generic/serial.h
include/asm-generic/set_memory.h
include/asm-generic/signal.h
include/asm-generic/simd.h
include/asm-generic/spinlock.h
include/asm-generic/statfs.h
include/asm-generic/syscalls.h
include/asm-generic/termios-base.h
include/asm-generic/termios.h
include/asm-generic/timex.h
include/asm-generic/tlbflush.h
include/asm-generic/trace_clock.h
include/asm-generic/uaccess.h
include/asm-generic/unaligned.h
include/asm-generic/unistd.h
include/asm-generic/vga.h
include/asm-generic/word-at-a-time.h
include/clocksource/timer-sp804.h
include/crypto/ablk_helper.h
include/crypto/aes.h
include/crypto/blowfish.h
include/crypto/cast5.h
include/crypto/cast6.h
include/crypto/cast_common.h
include/crypto/chacha20.h
include/crypto/cryptd.h
include/crypto/crypto_wq.h
include/crypto/des.h
include/crypto/ghash.h
include/crypto/hmac.h
include/crypto/internal/simd.h
include/crypto/lrw.h
include/crypto/mcryptd.h
include/crypto/md5.h
include/crypto/null.h
include/crypto/poly1305.h
include/crypto/serpent.h
include/crypto/sha.h
include/crypto/sha3.h
include/crypto/twofish.h
include/crypto/xts.h
include/drm/ati_pcigart.h
include/drm/drm_agpsupport.h
include/drm/drm_fb_cma_helper.h
include/drm/drm_gem_cma_helper.h
include/drm/drm_of.h
include/drm/drm_os_linux.h
include/drm/drm_pciids.h
include/drm/drm_sysfs.h
include/drm/i2c/tda998x.h
include/drm/intel-gtt.h
include/dt-bindings/clock/berlin2.h
include/dt-bindings/clock/berlin2q.h
include/dt-bindings/clock/cortina,gemini-clock.h
include/dt-bindings/clock/efm32-cmu.h
include/dt-bindings/clock/exynos-audss-clk.h
include/dt-bindings/clock/gxbb-clkc.h
include/dt-bindings/clock/jz4740-cgu.h
include/dt-bindings/clock/jz4780-cgu.h
include/dt-bindings/clock/marvell,mmp2.h
include/dt-bindings/clock/marvell,pxa168.h
include/dt-bindings/clock/marvell,pxa1928.h
include/dt-bindings/clock/marvell,pxa910.h
include/dt-bindings/clock/meson8b-clkc.h
include/dt-bindings/clock/mpc512x-clock.h
include/dt-bindings/clock/rockchip,rk808.h
include/dt-bindings/clock/ste-ab8500.h
include/dt-bindings/clock/stih407-clks.h
include/dt-bindings/clock/stih410-clks.h
include/dt-bindings/clock/stih416-clks.h
include/dt-bindings/clock/stih418-clks.h
include/dt-bindings/clock/tegra114-car.h
include/dt-bindings/clock/tegra124-car-common.h
include/dt-bindings/clock/tegra124-car.h
include/dt-bindings/clock/tegra186-clock.h
include/dt-bindings/clock/tegra20-car.h
include/dt-bindings/clock/tegra210-car.h
include/dt-bindings/clock/tegra30-car.h
include/dt-bindings/display/tda998x.h
include/dt-bindings/gpio/gpio.h
include/dt-bindings/gpio/tegra-gpio.h
include/dt-bindings/gpio/tegra186-gpio.h
include/dt-bindings/iio/adc/fsl-imx25-gcq.h
include/dt-bindings/iio/adi,ad5592r.h
include/dt-bindings/input/input.h
include/dt-bindings/interrupt-controller/arm-gic.h
include/dt-bindings/interrupt-controller/irq.h
include/dt-bindings/interrupt-controller/mips-gic.h
include/dt-bindings/interrupt-controller/mvebu-icu.h
include/dt-bindings/leds/common.h
include/dt-bindings/leds/leds-ns2.h
include/dt-bindings/mailbox/tegra186-hsp.h
include/dt-bindings/media/c8sectpfe.h
include/dt-bindings/memory/tegra114-mc.h
include/dt-bindings/memory/tegra124-mc.h
include/dt-bindings/memory/tegra210-mc.h
include/dt-bindings/memory/tegra30-mc.h
include/dt-bindings/mfd/as3722.h
include/dt-bindings/mfd/dbx500-prcmu.h
include/dt-bindings/mfd/max77620.h
include/dt-bindings/mfd/palmas.h
include/dt-bindings/mfd/qcom-rpm.h
include/dt-bindings/mfd/st-lpc.h
include/dt-bindings/mfd/stm32f4-rcc.h
include/dt-bindings/mfd/stm32f7-rcc.h
include/dt-bindings/mux/mux.h
include/dt-bindings/pinctrl/am33xx.h
include/dt-bindings/pinctrl/am43xx.h
include/dt-bindings/pinctrl/dm814x.h
include/dt-bindings/pinctrl/mt6397-pinfunc.h
include/dt-bindings/pinctrl/mt7623-pinfunc.h
include/dt-bindings/pinctrl/omap.h
include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h
include/dt-bindings/pinctrl/qcom,pmic-gpio.h
include/dt-bindings/pinctrl/qcom,pmic-mpp.h
include/dt-bindings/pinctrl/r7s72100-pinctrl.h
include/dt-bindings/pinctrl/stm32f429-pinfunc.h
include/dt-bindings/pinctrl/stm32f746-pinfunc.h
include/dt-bindings/pinctrl/stm32h7-pinfunc.h
include/dt-bindings/power/mt8173-power.h
include/dt-bindings/power/rk3288-power.h
include/dt-bindings/power/rk3328-power.h
include/dt-bindings/power/rk3368-power.h
include/dt-bindings/power/rk3399-power.h
include/dt-bindings/pwm/pwm.h
include/dt-bindings/reset/cortina,gemini-reset.h
include/dt-bindings/reset/hisi,hi6220-resets.h
include/dt-bindings/reset/pistachio-resets.h
include/dt-bindings/reset/snps,hsdk-reset.h [new file with mode: 0644]
include/dt-bindings/reset/snps,hsdk-v1-reset.h [deleted file]
include/dt-bindings/reset/stih407-resets.h
include/dt-bindings/reset/stih415-resets.h
include/dt-bindings/reset/stih416-resets.h
include/dt-bindings/reset/tegra124-car.h
include/dt-bindings/reset/tegra210-car.h
include/dt-bindings/soc/rockchip,boot-mode.h
include/dt-bindings/sound/apq8016-lpass.h
include/dt-bindings/sound/audio-jack-events.h
include/dt-bindings/sound/cs35l32.h
include/dt-bindings/sound/fsl-imx-audmux.h
include/dt-bindings/sound/samsung-i2s.h
include/dt-bindings/sound/tas2552.h
include/dt-bindings/sound/tlv320aic31xx-micbias.h
include/dt-bindings/thermal/lm90.h
include/dt-bindings/thermal/tegra124-soctherm.h
include/keys/ceph-type.h
include/linux/8250_pci.h
include/linux/a.out.h
include/linux/acct.h
include/linux/acpi_pmtmr.h
include/linux/adb.h
include/linux/adfs_fs.h
include/linux/aer.h
include/linux/ahci-remap.h
include/linux/aio.h
include/linux/alarmtimer.h
include/linux/altera_jtaguart.h
include/linux/altera_uart.h
include/linux/amba/mmci.h
include/linux/amifd.h
include/linux/amifdreg.h
include/linux/anon_inodes.h
include/linux/apple_bl.h
include/linux/arch_topology.h
include/linux/ata_platform.h
include/linux/atalk.h
include/linux/atm.h
include/linux/atm_tcp.h
include/linux/atmdev.h
include/linux/atmel-mci.h
include/linux/atmel-ssc.h
include/linux/atomic.h
include/linux/audit.h
include/linux/auxvec.h
include/linux/average.h
include/linux/backing-dev-defs.h
include/linux/backing-dev.h
include/linux/backlight.h
include/linux/badblocks.h
include/linux/balloon_compaction.h
include/linux/bcd.h
include/linux/bcm47xx_wdt.h
include/linux/bcm963xx_nvram.h
include/linux/bcm963xx_tag.h
include/linux/bcma/bcma.h
include/linux/bcma/bcma_driver_arm_c9.h
include/linux/bcma/bcma_driver_chipcommon.h
include/linux/bcma/bcma_driver_gmac_cmn.h
include/linux/bcma/bcma_driver_mips.h
include/linux/bcma/bcma_driver_pci.h
include/linux/bcma/bcma_driver_pcie2.h
include/linux/bcma/bcma_regs.h
include/linux/bcma/bcma_soc.h
include/linux/binfmts.h
include/linux/bit_spinlock.h
include/linux/bitfield.h
include/linux/bitmap.h
include/linux/bitops.h
include/linux/bitrev.h
include/linux/blk-cgroup.h
include/linux/blk-mq-pci.h
include/linux/blk-mq-virtio.h
include/linux/blk-mq.h
include/linux/blk_types.h
include/linux/blkdev.h
include/linux/blkpg.h
include/linux/blktrace_api.h
include/linux/blockgroup_lock.h
include/linux/bootmem.h
include/linux/bottom_half.h
include/linux/bpf-cgroup.h
include/linux/bpf.h
include/linux/bpf_trace.h
include/linux/bpf_types.h
include/linux/brcmphy.h
include/linux/bsearch.h
include/linux/bsg.h
include/linux/btree-128.h
include/linux/btree-type.h
include/linux/btree.h
include/linux/btrfs.h
include/linux/buffer_head.h
include/linux/bug.h
include/linux/build_bug.h
include/linux/byteorder/big_endian.h
include/linux/byteorder/generic.h
include/linux/byteorder/little_endian.h
include/linux/cache.h
include/linux/cacheinfo.h
include/linux/can/core.h
include/linux/can/dev.h
include/linux/can/platform/cc770.h
include/linux/can/platform/mcp251x.h
include/linux/can/platform/rcar_can.h
include/linux/can/platform/sja1000.h
include/linux/can/skb.h
include/linux/capability.h
include/linux/cciss_ioctl.h
include/linux/cdev.h
include/linux/cdrom.h
include/linux/ceph/auth.h
include/linux/ceph/buffer.h
include/linux/ceph/ceph_debug.h
include/linux/ceph/ceph_features.h
include/linux/ceph/ceph_frag.h
include/linux/ceph/ceph_fs.h
include/linux/ceph/ceph_hash.h
include/linux/ceph/cls_lock_client.h
include/linux/ceph/debugfs.h
include/linux/ceph/decode.h
include/linux/ceph/libceph.h
include/linux/ceph/mdsmap.h
include/linux/ceph/messenger.h
include/linux/ceph/mon_client.h
include/linux/ceph/msgpool.h
include/linux/ceph/msgr.h
include/linux/ceph/osd_client.h
include/linux/ceph/osdmap.h
include/linux/ceph/pagelist.h
include/linux/ceph/rados.h
include/linux/ceph/string_table.h
include/linux/ceph/types.h
include/linux/cgroup-defs.h
include/linux/cgroup.h
include/linux/cgroup_subsys.h
include/linux/circ_buf.h
include/linux/cleancache.h
include/linux/clk/mmp.h
include/linux/clockchips.h
include/linux/clocksource.h
include/linux/cm4000_cs.h
include/linux/cma.h
include/linux/cmdline-parser.h
include/linux/coda_psdev.h
include/linux/compaction.h
include/linux/compat.h
include/linux/compiler-clang.h
include/linux/compiler-gcc.h
include/linux/compiler-intel.h
include/linux/compiler.h
include/linux/completion.h
include/linux/component.h
include/linux/console_struct.h
include/linux/consolemap.h
include/linux/context_tracking.h
include/linux/context_tracking_state.h
include/linux/coredump.h
include/linux/coresight-stm.h
include/linux/cpu.h
include/linux/cpuhotplug.h
include/linux/cpumask.h
include/linux/cpuset.h
include/linux/crash_core.h
include/linux/crash_dump.h
include/linux/crc-ccitt.h
include/linux/crc-t10dif.h
include/linux/crc32c.h
include/linux/crc4.h
include/linux/crc7.h
include/linux/crush/crush.h
include/linux/crush/hash.h
include/linux/crush/mapper.h
include/linux/cryptohash.h
include/linux/ctype.h
include/linux/cuda.h
include/linux/cyclades.h
include/linux/dax.h
include/linux/dcache.h
include/linux/dccp.h
include/linux/dcookies.h
include/linux/debug_locks.h
include/linux/debugobjects.h
include/linux/decompress/bunzip2.h
include/linux/decompress/generic.h
include/linux/decompress/inflate.h
include/linux/decompress/mm.h
include/linux/decompress/unlz4.h
include/linux/decompress/unlzma.h
include/linux/decompress/unlzo.h
include/linux/delay.h
include/linux/delayed_call.h
include/linux/dell-led.h
include/linux/device.h
include/linux/device_cgroup.h
include/linux/dio.h
include/linux/dirent.h
include/linux/dma-direction.h
include/linux/dma-mapping.h
include/linux/dma/mmp-pdma.h
include/linux/dma/pxa-dma.h
include/linux/dma_remapping.h
include/linux/dmi.h
include/linux/dnotify.h
include/linux/dqblk_qtree.h
include/linux/dqblk_v1.h
include/linux/dqblk_v2.h
include/linux/drbd_genl.h
include/linux/drbd_genl_api.h
include/linux/drbd_limits.h
include/linux/ds2782_battery.h
include/linux/dtlk.h
include/linux/dynamic_debug.h
include/linux/dynamic_queue_limits.h
include/linux/earlycpio.h
include/linux/ecryptfs.h
include/linux/eeprom_93xx46.h
include/linux/efi-bgrt.h
include/linux/efi.h
include/linux/efs_vh.h
include/linux/eisa.h
include/linux/elevator.h
include/linux/elf-randomize.h
include/linux/elf.h
include/linux/elfcore-compat.h
include/linux/elfcore.h
include/linux/elfnote.h
include/linux/err.h
include/linux/errno.h
include/linux/errqueue.h
include/linux/errseq.h
include/linux/ethtool.h
include/linux/eventfd.h
include/linux/evm.h
include/linux/exportfs.h
include/linux/ext2_fs.h
include/linux/extable.h
include/linux/falloc.h
include/linux/fanotify.h
include/linux/fault-inject.h
include/linux/fb.h
include/linux/fcntl.h
include/linux/fd.h
include/linux/fdtable.h
include/linux/file.h
include/linux/filter.h
include/linux/fips.h
include/linux/firewire.h
include/linux/firmware.h
include/linux/flat.h
include/linux/flex_array.h
include/linux/flex_proportions.h
include/linux/fmc-sdb.h
include/linux/fpga/fpga-bridge.h
include/linux/frame.h
include/linux/freezer.h
include/linux/frontswap.h
include/linux/fs.h
include/linux/fs_pin.h
include/linux/fs_stack.h
include/linux/fs_struct.h
include/linux/fscrypt_common.h
include/linux/fscrypt_notsupp.h
include/linux/fscrypt_supp.h
include/linux/fsl/edac.h
include/linux/fsnotify.h
include/linux/fsnotify_backend.h
include/linux/ftrace.h
include/linux/ftrace_irq.h
include/linux/futex.h
include/linux/gcd.h
include/linux/genetlink.h
include/linux/genhd.h
include/linux/genl_magic_func.h
include/linux/genl_magic_struct.h
include/linux/getcpu.h
include/linux/gfp.h
include/linux/glob.h
include/linux/goldfish.h
include/linux/gpio-pxa.h
include/linux/gpio.h
include/linux/gpio/consumer.h
include/linux/gpio/driver.h
include/linux/gpio/gpio-reg.h
include/linux/gpio/machine.h
include/linux/gpio_keys.h
include/linux/hardirq.h
include/linux/hashtable.h
include/linux/hdlcdrv.h
include/linux/highmem.h
include/linux/highuid.h
include/linux/hpet.h
include/linux/htcpld.h
include/linux/htirq.h
include/linux/huge_mm.h
include/linux/hugetlb.h
include/linux/hugetlb_inline.h
include/linux/hw_breakpoint.h
include/linux/hyperv.h
include/linux/hypervisor.h
include/linux/i2c-algo-pca.h
include/linux/i2c-omap.h
include/linux/i2c-pca-platform.h
include/linux/i2c-pxa.h
include/linux/i7300_idle.h
include/linux/icmpv6.h
include/linux/ide.h
include/linux/if_link.h
include/linux/if_ltalk.h
include/linux/if_macvlan.h
include/linux/if_phonet.h
include/linux/if_tap.h
include/linux/if_tunnel.h
include/linux/ihex.h
include/linux/iio/adc/ad_sigma_delta.h
include/linux/iio/buffer_impl.h
include/linux/iio/dac/ad5421.h
include/linux/iio/kfifo_buf.h
include/linux/iio/magnetometer/ak8975.h
include/linux/iio/triggered_buffer.h
include/linux/iio/triggered_event.h
include/linux/inet_diag.h
include/linux/inetdevice.h
include/linux/init.h
include/linux/init_ohci1394_dma.h
include/linux/init_task.h
include/linux/initrd.h
include/linux/inotify.h
include/linux/input.h
include/linux/input/cy8ctmg110_pdata.h
include/linux/input/gp2ap002a00f.h
include/linux/input/gpio_tilt.h
include/linux/input/ili210x.h
include/linux/input/matrix_keypad.h
include/linux/input/sh_keysc.h
include/linux/interrupt.h
include/linux/interval_tree.h
include/linux/io-64-nonatomic-hi-lo.h
include/linux/io-64-nonatomic-lo-hi.h
include/linux/iocontext.h
include/linux/iomap.h
include/linux/iommu-common.h
include/linux/iommu-helper.h
include/linux/iommu.h
include/linux/ioport.h
include/linux/ioprio.h
include/linux/ipc.h
include/linux/ipc_namespace.h
include/linux/ipv6.h
include/linux/irq.h
include/linux/irq_cpustat.h
include/linux/irq_poll.h
include/linux/irq_work.h
include/linux/irqchip/arm-gic-v3.h
include/linux/irqchip/metag-ext.h
include/linux/irqchip/metag.h
include/linux/irqchip/mmp.h
include/linux/irqchip/versatile-fpga.h
include/linux/irqdesc.h
include/linux/irqdomain.h
include/linux/irqflags.h
include/linux/irqhandler.h
include/linux/irqnr.h
include/linux/irqreturn.h
include/linux/isa.h
include/linux/isicom.h
include/linux/jiffies.h
include/linux/journal-head.h
include/linux/jump_label.h
include/linux/jump_label_ratelimit.h
include/linux/jz4740-adc.h
include/linux/kallsyms.h
include/linux/kasan-checks.h
include/linux/kasan.h
include/linux/kbd_diacr.h
include/linux/kbd_kern.h
include/linux/kbuild.h
include/linux/kconfig.h
include/linux/kcore.h
include/linux/kcov.h
include/linux/kd.h
include/linux/kdebug.h
include/linux/kdev_t.h
include/linux/kern_levels.h
include/linux/kernel-page-flags.h
include/linux/kernel.h
include/linux/kernel_stat.h
include/linux/kernelcapi.h
include/linux/kexec.h
include/linux/key.h
include/linux/keyboard.h
include/linux/khugepaged.h
include/linux/kmemcheck.h
include/linux/kobj_map.h
include/linux/ksm.h
include/linux/kthread.h
include/linux/kvm_para.h
include/linux/l2tp.h
include/linux/lapb.h
include/linux/latencytop.h
include/linux/lcd.h
include/linux/lcm.h
include/linux/leds_pwm.h
include/linux/libfdt.h
include/linux/libfdt_env.h
include/linux/lightnvm.h
include/linux/linkage.h
include/linux/linux_logo.h
include/linux/lis3lv02d.h
include/linux/list.h
include/linux/list_bl.h
include/linux/list_lru.h
include/linux/list_nulls.h
include/linux/list_sort.h
include/linux/lockd/bind.h
include/linux/lockd/debug.h
include/linux/lockd/lockd.h
include/linux/lockd/nlm.h
include/linux/lockd/share.h
include/linux/lockd/xdr.h
include/linux/lockd/xdr4.h
include/linux/lockdep.h
include/linux/lockref.h
include/linux/lp.h
include/linux/lsm_audit.h
include/linux/lzo.h
include/linux/mISDNdsp.h
include/linux/maple.h
include/linux/marvell_phy.h
include/linux/math64.h
include/linux/mbcache.h
include/linux/mbus.h
include/linux/mc6821.h
include/linux/mdio-bitbang.h
include/linux/mei_cl_bus.h
include/linux/memory.h
include/linux/memory_hotplug.h
include/linux/mempolicy.h
include/linux/mempool.h
include/linux/memremap.h
include/linux/mfd/da903x.h
include/linux/mfd/dln2.h
include/linux/mfd/ds1wm.h
include/linux/mfd/ezx-pcap.h
include/linux/mfd/imx25-tsadc.h
include/linux/mfd/ipaq-micro.h
include/linux/mfd/menelaus.h
include/linux/mfd/pcf50633/pmic.h
include/linux/mfd/qcom_rpm.h
include/linux/mfd/rdc321x.h
include/linux/mfd/tmio.h
include/linux/mfd/tps6586x.h
include/linux/migrate.h
include/linux/migrate_mode.h
include/linux/mii.h
include/linux/miscdevice.h
include/linux/mlx5/device.h
include/linux/mlx5/driver.h
include/linux/mlx5/mlx5_ifc.h
include/linux/mlx5/port.h
include/linux/mm.h
include/linux/mm_inline.h
include/linux/mm_types.h
include/linux/mm_types_task.h
include/linux/mman.h
include/linux/mmc/host.h
include/linux/mmc/sdhci-pci-data.h
include/linux/mmc/sdio_ids.h
include/linux/mmdebug.h
include/linux/mmiotrace.h
include/linux/mmu_context.h
include/linux/mmu_notifier.h
include/linux/mmzone.h
include/linux/mnt_namespace.h
include/linux/mod_devicetable.h
include/linux/moduleloader.h
include/linux/moduleparam.h
include/linux/mount.h
include/linux/mpage.h
include/linux/mpls.h
include/linux/mpls_iptunnel.h
include/linux/mroute.h
include/linux/mroute6.h
include/linux/msdos_fs.h
include/linux/msg.h
include/linux/msi.h
include/linux/mtd/inftl.h
include/linux/mtd/mtdram.h
include/linux/mtd/nand-gpio.h
include/linux/mtd/pfow.h
include/linux/mtd/qinfo.h
include/linux/mutex.h
include/linux/mv643xx_eth.h
include/linux/namei.h
include/linux/netdevice.h
include/linux/netfilter.h
include/linux/netfilter/ipset/ip_set_bitmap.h
include/linux/netfilter/ipset/ip_set_getport.h
include/linux/netfilter/ipset/ip_set_hash.h
include/linux/netfilter/ipset/ip_set_list.h
include/linux/netfilter/ipset/pfxlen.h
include/linux/netfilter/nf_conntrack_amanda.h
include/linux/netfilter/nf_conntrack_common.h
include/linux/netfilter/nf_conntrack_dccp.h
include/linux/netfilter/nf_conntrack_ftp.h
include/linux/netfilter/nf_conntrack_h323.h
include/linux/netfilter/nf_conntrack_irc.h
include/linux/netfilter/nf_conntrack_pptp.h
include/linux/netfilter/nf_conntrack_proto_gre.h
include/linux/netfilter/nf_conntrack_sane.h
include/linux/netfilter/nf_conntrack_sctp.h
include/linux/netfilter/nf_conntrack_sip.h
include/linux/netfilter/nf_conntrack_snmp.h
include/linux/netfilter/nf_conntrack_tcp.h
include/linux/netfilter/nf_conntrack_tftp.h
include/linux/netfilter/nf_conntrack_zones_common.h
include/linux/netfilter/nfnetlink.h
include/linux/netfilter/nfnetlink_acct.h
include/linux/netfilter/x_tables.h
include/linux/netfilter/xt_hashlimit.h
include/linux/netfilter/xt_physdev.h
include/linux/netfilter_arp/arp_tables.h
include/linux/netfilter_bridge.h
include/linux/netfilter_bridge/ebt_802_3.h
include/linux/netfilter_bridge/ebtables.h
include/linux/netfilter_defs.h
include/linux/netfilter_ingress.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv6/ip6_tables.h
include/linux/netlink.h
include/linux/netpoll.h
include/linux/nfs.h
include/linux/nfs3.h
include/linux/nfs4.h
include/linux/nfs_fs.h
include/linux/nfs_fs_i.h
include/linux/nfs_fs_sb.h
include/linux/nfs_iostat.h
include/linux/nfs_page.h
include/linux/nfs_xdr.h
include/linux/nfsacl.h
include/linux/nls.h
include/linux/nmi.h
include/linux/node.h
include/linux/nodemask.h
include/linux/notifier.h
include/linux/ns_common.h
include/linux/nsc_gpio.h
include/linux/nsproxy.h
include/linux/nubus.h
include/linux/numa.h
include/linux/nvme-fc-driver.h
include/linux/nvme.h
include/linux/nvram.h
include/linux/of.h
include/linux/of_address.h
include/linux/of_device.h
include/linux/of_iommu.h
include/linux/of_irq.h
include/linux/of_pci.h
include/linux/of_platform.h
include/linux/of_reserved_mem.h
include/linux/olpc-ec.h
include/linux/omap-dma.h
include/linux/once.h
include/linux/oom.h
include/linux/osq_lock.h
include/linux/oxu210hp.h
include/linux/page-flags-layout.h
include/linux/page-flags.h
include/linux/page-isolation.h
include/linux/page_counter.h
include/linux/page_ext.h
include/linux/page_idle.h
include/linux/page_owner.h
include/linux/page_ref.h
include/linux/pagemap.h
include/linux/pagevec.h
include/linux/parport_pc.h
include/linux/parser.h
include/linux/patchkey.h
include/linux/path.h
include/linux/pci-acpi.h
include/linux/pci-aspm.h
include/linux/pci-ats.h
include/linux/pci-dma-compat.h
include/linux/pci-dma.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pcieport_if.h
include/linux/percpu-refcount.h
include/linux/percpu-rwsem.h
include/linux/percpu.h
include/linux/percpu_counter.h
include/linux/percpu_ida.h
include/linux/perf_regs.h
include/linux/personality.h
include/linux/pfn.h
include/linux/pfn_t.h
include/linux/phy/ulpi_phy.h
include/linux/phy_fixed.h
include/linux/pid.h
include/linux/pid_namespace.h
include/linux/pim.h
include/linux/pinctrl/pinctrl-state.h
include/linux/pipe_fs_i.h
include/linux/pkeys.h
include/linux/platform_data/ad7291.h
include/linux/platform_data/ad7791.h
include/linux/platform_data/ad7879.h
include/linux/platform_data/asoc-imx-ssi.h
include/linux/platform_data/asoc-kirkwood.h
include/linux/platform_data/asoc-mx27vis.h
include/linux/platform_data/asoc-palm27x.h
include/linux/platform_data/bcmgenet.h
include/linux/platform_data/crypto-atmel.h
include/linux/platform_data/dma-ep93xx.h
include/linux/platform_data/dma-imx-sdma.h
include/linux/platform_data/dma-mv_xor.h
include/linux/platform_data/ds620.h
include/linux/platform_data/efm32-spi.h
include/linux/platform_data/efm32-uart.h
include/linux/platform_data/gpio-htc-egpio.h
include/linux/platform_data/i2c-nuc900.h
include/linux/platform_data/irda-pxaficp.h
include/linux/platform_data/itco_wdt.h
include/linux/platform_data/keyboard-pxa930_rotary.h
include/linux/platform_data/keypad-ep93xx.h
include/linux/platform_data/keypad-pxa27x.h
include/linux/platform_data/keypad-w90p910.h
include/linux/platform_data/lcd-mipid.h
include/linux/platform_data/max3421-hcd.h
include/linux/platform_data/max6639.h
include/linux/platform_data/max732x.h
include/linux/platform_data/media/ir-rx51.h
include/linux/platform_data/media/mmp-camera.h
include/linux/platform_data/media/omap4iss.h
include/linux/platform_data/mmc-davinci.h
include/linux/platform_data/mmc-mxcmmc.h
include/linux/platform_data/mmc-pxamci.h
include/linux/platform_data/mmc-s3cmci.h
include/linux/platform_data/mmc-sdhci-s3c.h
include/linux/platform_data/mouse-pxa930_trkball.h
include/linux/platform_data/mtd-nand-pxa3xx.h
include/linux/platform_data/omap1_bl.h
include/linux/platform_data/pca953x.h
include/linux/platform_data/pcf857x.h
include/linux/platform_data/pcmcia-pxa2xx_viper.h
include/linux/platform_data/pinctrl-single.h
include/linux/platform_data/pixcir_i2c_ts.h
include/linux/platform_data/pxa2xx_udc.h
include/linux/platform_data/sa11x0-serial.h
include/linux/platform_data/si5351.h
include/linux/platform_data/spi-ep93xx.h
include/linux/platform_data/spi-imx.h
include/linux/platform_data/spi-omap2-mcspi.h
include/linux/platform_data/st1232_pdata.h
include/linux/platform_data/syscon.h
include/linux/platform_data/tsc2007.h
include/linux/platform_data/tsl2563.h
include/linux/platform_data/usb-ehci-mxc.h
include/linux/platform_data/usb-ohci-pxa27x.h
include/linux/platform_data/usb3503.h
include/linux/platform_data/video-clcd-versatile.h
include/linux/platform_data/video-ep93xx.h
include/linux/platform_data/video-imxfb.h
include/linux/platform_data/video_s3c.h
include/linux/pm-trace.h
include/linux/pm_qos.h
include/linux/pmu.h
include/linux/pnp.h
include/linux/poison.h
include/linux/poll.h
include/linux/posix-timers.h
include/linux/posix_acl.h
include/linux/posix_acl_xattr.h
include/linux/power/bq27xxx_battery.h
include/linux/pr.h
include/linux/preempt.h
include/linux/prefetch.h
include/linux/prime_numbers.h
include/linux/printk.h
include/linux/proc_fs.h
include/linux/proc_ns.h
include/linux/processor.h
include/linux/profile.h
include/linux/projid.h
include/linux/ptrace.h
include/linux/purgatory.h
include/linux/pvclock_gtod.h
include/linux/pwm.h
include/linux/pwm_backlight.h
include/linux/pxa168_eth.h
include/linux/qed/qed_fcoe_if.h
include/linux/qnx6_fs.h
include/linux/quicklist.h
include/linux/quotaops.h
include/linux/raid/xor.h
include/linux/ramfs.h
include/linux/random.h
include/linux/range.h
include/linux/ras.h
include/linux/ratelimit.h
include/linux/rational.h
include/linux/rbtree_latch.h
include/linux/rculist.h
include/linux/rculist_bl.h
include/linux/rculist_nulls.h
include/linux/rcupdate.h
include/linux/rcupdate_wait.h
include/linux/rcuwait.h
include/linux/reboot-mode.h
include/linux/reboot.h
include/linux/reciprocal_div.h
include/linux/refcount.h
include/linux/regulator/of_regulator.h
include/linux/regulator/userspace-consumer.h
include/linux/relay.h
include/linux/reset-controller.h
include/linux/reset.h
include/linux/resource.h
include/linux/restart_block.h
include/linux/ring_buffer.h
include/linux/rmap.h
include/linux/rndis.h
include/linux/root_dev.h
include/linux/rpmsg/qcom_smd.h
include/linux/rtc.h
include/linux/rtmutex.h
include/linux/rtnetlink.h
include/linux/rwsem-spinlock.h
include/linux/rwsem.h
include/linux/s3c_adc_battery.h
include/linux/scatterlist.h
include/linux/scc.h
include/linux/sched.h
include/linux/sched/autogroup.h
include/linux/sched/clock.h
include/linux/sched/coredump.h
include/linux/sched/cpufreq.h
include/linux/sched/cputime.h
include/linux/sched/deadline.h
include/linux/sched/debug.h
include/linux/sched/hotplug.h
include/linux/sched/idle.h
include/linux/sched/init.h
include/linux/sched/jobctl.h
include/linux/sched/loadavg.h
include/linux/sched/mm.h
include/linux/sched/nohz.h
include/linux/sched/numa_balancing.h
include/linux/sched/prio.h
include/linux/sched/rt.h
include/linux/sched/signal.h
include/linux/sched/stat.h
include/linux/sched/sysctl.h
include/linux/sched/task.h
include/linux/sched/task_stack.h
include/linux/sched/topology.h
include/linux/sched/user.h
include/linux/sched/wake_q.h
include/linux/sched/xacct.h
include/linux/screen_info.h
include/linux/sctp.h
include/linux/scx200.h
include/linux/scx200_gpio.h
include/linux/sdb.h
include/linux/seccomp.h
include/linux/securebits.h
include/linux/seg6.h
include/linux/seg6_genl.h
include/linux/seg6_hmac.h
include/linux/seg6_iptunnel.h
include/linux/selection.h
include/linux/sem.h
include/linux/seq_buf.h
include/linux/seq_file.h
include/linux/seq_file_net.h
include/linux/seqlock.h
include/linux/serial_bcm63xx.h
include/linux/serial_sci.h
include/linux/sh_clk.h
include/linux/sh_eth.h
include/linux/sh_intc.h
include/linux/sh_timer.h
include/linux/shm.h
include/linux/shmem_fs.h
include/linux/shrinker.h
include/linux/signal.h
include/linux/signal_types.h
include/linux/signalfd.h
include/linux/sirfsoc_dma.h
include/linux/slab.h
include/linux/slab_def.h
include/linux/slub_def.h
include/linux/smc911x.h
include/linux/smc91x.h
include/linux/smp.h
include/linux/smpboot.h
include/linux/smscphy.h
include/linux/soc/brcmstb/brcmstb.h
include/linux/soc/dove/pmu.h
include/linux/soc/mediatek/infracfg.h
include/linux/soc/qcom/mdt_loader.h
include/linux/soc/qcom/smd-rpm.h
include/linux/soc/qcom/smem.h
include/linux/soc/qcom/smem_state.h
include/linux/soc/qcom/wcnss_ctrl.h
include/linux/soc/renesas/rcar-rst.h
include/linux/soc/renesas/rcar-sysc.h
include/linux/sock_diag.h
include/linux/socket.h
include/linux/sonet.h
include/linux/sony-laptop.h
include/linux/sort.h
include/linux/sound.h
include/linux/spi/ad7877.h
include/linux/spi/ads7846.h
include/linux/spi/at73c213.h
include/linux/spi/corgi_lcd.h
include/linux/spi/ds1305.h
include/linux/spi/eeprom.h
include/linux/spi/flash.h
include/linux/spi/ifx_modem.h
include/linux/spi/max7301.h
include/linux/spi/mc33880.h
include/linux/spi/mcp23s08.h
include/linux/spi/mmc_spi.h
include/linux/spi/sh_msiof.h
include/linux/spi/spi_bitbang.h
include/linux/spi/spi_gpio.h
include/linux/spi/spi_oc_tiny.h
include/linux/spi/tdo24m.h
include/linux/spi/xilinx_spi.h
include/linux/spinlock.h
include/linux/splice.h
include/linux/srcu.h
include/linux/ssb/ssb.h
include/linux/ssb/ssb_driver_gige.h
include/linux/ssb/ssb_driver_mips.h
include/linux/ssb/ssb_driver_pci.h
include/linux/ssb/ssb_embedded.h
include/linux/ssb/ssb_regs.h
include/linux/stackprotector.h
include/linux/stacktrace.h
include/linux/start_kernel.h
include/linux/stat.h
include/linux/statfs.h
include/linux/stddef.h
include/linux/stmmac.h
include/linux/stop_machine.h
include/linux/string.h
include/linux/string_helpers.h
include/linux/stringhash.h
include/linux/sungem_phy.h
include/linux/sunrpc/addr.h
include/linux/sunrpc/auth.h
include/linux/sunrpc/auth_gss.h
include/linux/sunrpc/clnt.h
include/linux/sunrpc/debug.h
include/linux/sunrpc/gss_api.h
include/linux/sunrpc/metrics.h
include/linux/sunrpc/msg_prot.h
include/linux/sunrpc/rpc_pipe_fs.h
include/linux/sunrpc/sched.h
include/linux/sunrpc/stats.h
include/linux/sunrpc/svc.h
include/linux/sunrpc/svc_xprt.h
include/linux/sunrpc/svcauth.h
include/linux/sunrpc/svcauth_gss.h
include/linux/sunrpc/svcsock.h
include/linux/sunrpc/timer.h
include/linux/sunrpc/types.h
include/linux/sunrpc/xdr.h
include/linux/sunrpc/xprt.h
include/linux/sunrpc/xprtmultipath.h
include/linux/sunrpc/xprtsock.h
include/linux/sunserialcore.h
include/linux/suspend.h
include/linux/svga.h
include/linux/sw842.h
include/linux/swab.h
include/linux/swait.h
include/linux/swap.h
include/linux/swap_cgroup.h
include/linux/swap_slots.h
include/linux/swapfile.h
include/linux/swapops.h
include/linux/swiotlb.h
include/linux/sys.h
include/linux/syscalls.h
include/linux/sysctl.h
include/linux/sysfs.h
include/linux/sysrq.h
include/linux/sysv_fs.h
include/linux/t10-pi.h
include/linux/task_io_accounting.h
include/linux/task_io_accounting_ops.h
include/linux/task_work.h
include/linux/taskstats_kern.h
include/linux/textsearch.h
include/linux/textsearch_fsm.h
include/linux/thinkpad_acpi.h
include/linux/thread_info.h
include/linux/threads.h
include/linux/tick.h
include/linux/time.h
include/linux/time64.h
include/linux/timekeeper_internal.h
include/linux/timekeeping.h
include/linux/timer.h
include/linux/timerfd.h
include/linux/timerqueue.h
include/linux/tpm_command.h
include/linux/trace.h
include/linux/trace_clock.h
include/linux/trace_events.h
include/linux/trace_seq.h
include/linux/tracepoint-defs.h
include/linux/tsacct_kern.h
include/linux/tty.h
include/linux/tty_driver.h
include/linux/tty_flip.h
include/linux/tty_ldisc.h
include/linux/typecheck.h
include/linux/types.h
include/linux/u64_stats_sync.h
include/linux/uaccess.h
include/linux/ucs2_string.h
include/linux/uidgid.h
include/linux/ulpi/driver.h
include/linux/ulpi/interface.h
include/linux/ulpi/regs.h
include/linux/unaligned/access_ok.h
include/linux/unaligned/be_byteshift.h
include/linux/unaligned/be_memmove.h
include/linux/unaligned/be_struct.h
include/linux/unaligned/generic.h
include/linux/unaligned/le_byteshift.h
include/linux/unaligned/le_memmove.h
include/linux/unaligned/le_struct.h
include/linux/unaligned/memmove.h
include/linux/usb.h
include/linux/usb/atmel_usba_udc.h
include/linux/usb/ch9.h
include/linux/usb/chipidea.h
include/linux/usb/ehci-dbgp.h
include/linux/usb/ezusb.h
include/linux/usb/functionfs.h
include/linux/usb/gadget_configfs.h
include/linux/usb/iowarrior.h
include/linux/usb/irda.h
include/linux/usb/isp116x.h
include/linux/usb/isp1362.h
include/linux/usb/isp1760.h
include/linux/usb/musb.h
include/linux/usb/otg.h
include/linux/usb/phy.h
include/linux/usb/quirks.h
include/linux/usb/sl811.h
include/linux/usb/typec.h
include/linux/usb/uas.h
include/linux/usb/usb_phy_generic.h
include/linux/usb_usual.h
include/linux/user-return-notifier.h
include/linux/user_namespace.h
include/linux/userfaultfd_k.h
include/linux/util_macros.h
include/linux/uts.h
include/linux/utsname.h
include/linux/vermagic.h
include/linux/vfs.h
include/linux/via.h
include/linux/virtio.h
include/linux/virtio_byteorder.h
include/linux/virtio_config.h
include/linux/virtio_net.h
include/linux/virtio_ring.h
include/linux/virtio_vsock.h
include/linux/vm_event_item.h
include/linux/vmacache.h
include/linux/vmalloc.h
include/linux/vme.h
include/linux/vmpressure.h
include/linux/vmstat.h
include/linux/vt.h
include/linux/vt_buffer.h
include/linux/vt_kern.h
include/linux/vtime.h
include/linux/wait.h
include/linux/wait_bit.h
include/linux/wanrouter.h
include/linux/watchdog.h
include/linux/win_minmax.h
include/linux/wireless.h
include/linux/wm97xx.h
include/linux/workqueue.h
include/linux/writeback.h
include/linux/ww_mutex.h
include/linux/xattr.h
include/linux/z2_battery.h
include/linux/zbud.h
include/linux/zpool.h
include/media/blackfin/bfin_capture.h
include/media/drv-intf/saa7146.h
include/media/drv-intf/saa7146_vv.h
include/media/drv-intf/sh_mobile_ceu.h
include/media/i2c-addr.h
include/media/i2c/ir-kbd-i2c.h
include/media/i2c/mt9p031.h
include/media/i2c/mt9t001.h
include/media/i2c/mt9v032.h
include/media/tuner-types.h
include/media/tveeprom.h
include/media/v4l2-dev.h
include/media/v4l2-ioctl.h
include/media/videobuf-dvb.h
include/media/videobuf2-dvb.h
include/net/Space.h
include/net/act_api.h
include/net/addrconf.h
include/net/af_unix.h
include/net/ah.h
include/net/arp.h
include/net/atmclip.h
include/net/ax25.h
include/net/compat.h
include/net/datalink.h
include/net/dn.h
include/net/dn_dev.h
include/net/dn_fib.h
include/net/dn_neigh.h
include/net/dsfield.h
include/net/dst.h
include/net/dst_cache.h
include/net/dst_metadata.h
include/net/dst_ops.h
include/net/esp.h
include/net/fib_rules.h
include/net/firewire.h
include/net/flow.h
include/net/flow_dissector.h
include/net/fou.h
include/net/fq_impl.h
include/net/garp.h
include/net/gen_stats.h
include/net/genetlink.h
include/net/geneve.h
include/net/gre.h
include/net/gro_cells.h
include/net/gtp.h
include/net/gue.h
include/net/hwbm.h
include/net/ife.h
include/net/inet_common.h
include/net/inet_ecn.h
include/net/inet_frag.h
include/net/inet_sock.h
include/net/inetpeer.h
include/net/ip6_route.h
include/net/ip6_tunnel.h
include/net/ip_tunnels.h
include/net/ip_vs.h
include/net/ipcomp.h
include/net/ipconfig.h
include/net/ipx.h
include/net/iucv/af_iucv.h
include/net/iucv/iucv.h
include/net/iw_handler.h
include/net/lapb.h
include/net/lib80211.h
include/net/lwtunnel.h
include/net/mld.h
include/net/mrp.h
include/net/ncsi.h
include/net/ndisc.h
include/net/neighbour.h
include/net/net_namespace.h
include/net/net_ratelimit.h
include/net/netevent.h
include/net/netfilter/br_netfilter.h
include/net/netfilter/ipv4/nf_conntrack_ipv4.h
include/net/netfilter/ipv4/nf_defrag_ipv4.h
include/net/netfilter/ipv4/nf_dup_ipv4.h
include/net/netfilter/ipv4/nf_nat_masquerade.h
include/net/netfilter/ipv4/nf_reject.h
include/net/netfilter/ipv6/nf_conntrack_icmpv6.h
include/net/netfilter/ipv6/nf_conntrack_ipv6.h
include/net/netfilter/ipv6/nf_defrag_ipv6.h
include/net/netfilter/ipv6/nf_dup_ipv6.h
include/net/netfilter/ipv6/nf_nat_masquerade.h
include/net/netfilter/ipv6/nf_reject.h
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack_core.h
include/net/netfilter/nf_conntrack_ecache.h
include/net/netfilter/nf_conntrack_expect.h
include/net/netfilter/nf_conntrack_extend.h
include/net/netfilter/nf_conntrack_helper.h
include/net/netfilter/nf_conntrack_l3proto.h
include/net/netfilter/nf_conntrack_l4proto.h
include/net/netfilter/nf_conntrack_labels.h
include/net/netfilter/nf_conntrack_seqadj.h
include/net/netfilter/nf_conntrack_synproxy.h
include/net/netfilter/nf_conntrack_timeout.h
include/net/netfilter/nf_conntrack_timestamp.h
include/net/netfilter/nf_conntrack_tuple.h
include/net/netfilter/nf_conntrack_zones.h
include/net/netfilter/nf_dup_netdev.h
include/net/netfilter/nf_log.h
include/net/netfilter/nf_nat.h
include/net/netfilter/nf_nat_core.h
include/net/netfilter/nf_nat_helper.h
include/net/netfilter/nf_nat_l3proto.h
include/net/netfilter/nf_nat_l4proto.h
include/net/netfilter/nf_nat_redirect.h
include/net/netfilter/nf_queue.h
include/net/netfilter/nf_socket.h
include/net/netfilter/nf_tables.h
include/net/netfilter/nf_tables_core.h
include/net/netfilter/nf_tables_ipv4.h
include/net/netfilter/nf_tables_ipv6.h
include/net/netfilter/nfnetlink_log.h
include/net/netfilter/nft_dup.h
include/net/netfilter/nft_fib.h
include/net/netfilter/nft_masq.h
include/net/netfilter/nft_meta.h
include/net/netfilter/nft_redir.h
include/net/netfilter/nft_reject.h
include/net/netfilter/xt_rateest.h
include/net/netlink.h
include/net/netns/can.h
include/net/netns/conntrack.h
include/net/netns/core.h
include/net/netns/dccp.h
include/net/netns/generic.h
include/net/netns/hash.h
include/net/netns/ieee802154_6lowpan.h
include/net/netns/ipv4.h
include/net/netns/ipv6.h
include/net/netns/mib.h
include/net/netns/mpls.h
include/net/netns/netfilter.h
include/net/netns/nftables.h
include/net/netns/packet.h
include/net/netns/sctp.h
include/net/netns/unix.h
include/net/netns/x_tables.h
include/net/netns/xfrm.h
include/net/netrom.h
include/net/nexthop.h
include/net/p8022.h
include/net/pkt_cls.h
include/net/pkt_sched.h
include/net/pptp.h
include/net/protocol.h
include/net/psample.h
include/net/psnap.h
include/net/rawv6.h
include/net/red.h
include/net/rose.h
include/net/route.h
include/net/rtnetlink.h
include/net/sch_generic.h
include/net/scm.h
include/net/sctp/sm.h
include/net/sctp/ulpevent.h
include/net/secure_seq.h
include/net/smc.h
include/net/sock.h
include/net/sock_reuseport.h
include/net/stp.h
include/net/strparser.h
include/net/tc_act/tc_connmark.h
include/net/tc_act/tc_csum.h
include/net/tc_act/tc_defact.h
include/net/tc_act/tc_gact.h
include/net/tc_act/tc_ife.h
include/net/tc_act/tc_ipt.h
include/net/tc_act/tc_mirred.h
include/net/tc_act/tc_nat.h
include/net/tc_act/tc_pedit.h
include/net/tc_act/tc_sample.h
include/net/tcp.h
include/net/transp_v6.h
include/net/tso.h
include/net/udp.h
include/net/udp_tunnel.h
include/net/udplite.h
include/net/vxlan.h
include/net/wext.h
include/net/x25.h
include/net/x25device.h
include/net/xfrm.h
include/ras/ras_event.h
include/rdma/ib_verbs.h
include/rdma/rdma_netlink.h
include/scsi/osd_attributes.h
include/scsi/scsi.h
include/scsi/scsi_cmnd.h
include/scsi/scsi_common.h
include/scsi/scsi_dbg.h
include/scsi/scsi_device.h
include/scsi/scsi_devinfo.h
include/scsi/scsi_driver.h
include/scsi/scsi_eh.h
include/scsi/scsi_host.h
include/scsi/scsi_ioctl.h
include/scsi/scsi_proto.h
include/scsi/scsi_request.h
include/scsi/scsi_tcq.h
include/scsi/scsi_transport_iscsi.h
include/scsi/scsi_transport_sas.h
include/scsi/scsi_transport_srp.h
include/scsi/scsicam.h
include/scsi/sg.h
include/sound/aci.h
include/sound/alc5623.h
include/sound/control.h
include/sound/hda_chmap.h
include/sound/hda_i915.h
include/sound/hda_register.h
include/sound/hda_regmap.h
include/sound/hda_verbs.h
include/sound/hdaudio.h
include/sound/hdaudio_ext.h
include/sound/l3.h
include/sound/pcm_drm_eld.h
include/sound/pcm_iec958.h
include/sound/pxa2xx-lib.h
include/sound/s3c24xx_uda134x.h
include/sound/seq_virmidi.h
include/sound/snd_wavefront.h
include/sound/soc-acpi-intel-match.h [new file with mode: 0644]
include/sound/soc-acpi.h [new file with mode: 0644]
include/sound/soc.h
include/sound/tas5086.h
include/target/iscsi/iscsi_target_core.h
include/target/iscsi/iscsi_target_stat.h
include/target/iscsi/iscsi_transport.h
include/target/target_core_backend.h
include/target/target_core_base.h
include/target/target_core_fabric.h
include/trace/define_trace.h
include/trace/events/9p.h
include/trace/events/alarmtimer.h
include/trace/events/asoc.h
include/trace/events/bcache.h
include/trace/events/block.h
include/trace/events/bpf.h
include/trace/events/btrfs.h
include/trace/events/cgroup.h
include/trace/events/cma.h
include/trace/events/compaction.h
include/trace/events/context_tracking.h
include/trace/events/cpuhp.h
include/trace/events/devlink.h
include/trace/events/dma_fence.h
include/trace/events/ext4.h
include/trace/events/f2fs.h
include/trace/events/fib.h
include/trace/events/fib6.h
include/trace/events/filelock.h
include/trace/events/filemap.h
include/trace/events/fs_dax.h
include/trace/events/fsi.h
include/trace/events/fsi_master_gpio.h
include/trace/events/gpio.h
include/trace/events/hswadsp.h
include/trace/events/huge_memory.h
include/trace/events/intel-sst.h
include/trace/events/intel_ish.h
include/trace/events/iommu.h
include/trace/events/ipi.h
include/trace/events/irq.h
include/trace/events/jbd2.h
include/trace/events/kmem.h
include/trace/events/kvm.h
include/trace/events/libata.h
include/trace/events/lock.h
include/trace/events/mce.h
include/trace/events/mdio.h
include/trace/events/migrate.h
include/trace/events/mmc.h
include/trace/events/mmflags.h
include/trace/events/module.h
include/trace/events/napi.h
include/trace/events/net.h
include/trace/events/nilfs2.h
include/trace/events/nmi.h
include/trace/events/oom.h
include/trace/events/page_isolation.h
include/trace/events/page_ref.h
include/trace/events/pagemap.h
include/trace/events/percpu.h
include/trace/events/power.h
include/trace/events/power_cpu_migrate.h
include/trace/events/printk.h
include/trace/events/random.h
include/trace/events/rcu.h
include/trace/events/regulator.h
include/trace/events/rpm.h
include/trace/events/sched.h
include/trace/events/scsi.h
include/trace/events/signal.h
include/trace/events/skb.h
include/trace/events/sock.h
include/trace/events/spi.h
include/trace/events/spmi.h
include/trace/events/sunrpc.h
include/trace/events/sunvnet.h
include/trace/events/swiotlb.h
include/trace/events/syscalls.h
include/trace/events/target.h
include/trace/events/task.h
include/trace/events/thermal.h
include/trace/events/thermal_power_allocator.h
include/trace/events/thp.h
include/trace/events/timer.h
include/trace/events/tlb.h
include/trace/events/udp.h
include/trace/events/v4l2.h
include/trace/events/vb2.h
include/trace/events/vmscan.h
include/trace/events/vsock_virtio_transport_common.h
include/trace/events/wbt.h
include/trace/events/workqueue.h
include/trace/events/writeback.h
include/trace/events/xdp.h
include/trace/events/xen.h
include/trace/perf.h
include/trace/syscall.h
include/trace/trace_events.h
include/uapi/asm-generic/bitsperlong.h
include/uapi/asm-generic/errno-base.h
include/uapi/asm-generic/errno.h
include/uapi/asm-generic/fcntl.h
include/uapi/asm-generic/int-l64.h
include/uapi/asm-generic/int-ll64.h
include/uapi/asm-generic/ioctl.h
include/uapi/asm-generic/ioctls.h
include/uapi/asm-generic/ipcbuf.h
include/uapi/asm-generic/mman-common.h
include/uapi/asm-generic/mman.h
include/uapi/asm-generic/msgbuf.h
include/uapi/asm-generic/param.h
include/uapi/asm-generic/poll.h
include/uapi/asm-generic/posix_types.h
include/uapi/asm-generic/resource.h
include/uapi/asm-generic/sembuf.h
include/uapi/asm-generic/setup.h
include/uapi/asm-generic/shmbuf.h
include/uapi/asm-generic/shmparam.h
include/uapi/asm-generic/siginfo.h
include/uapi/asm-generic/signal-defs.h
include/uapi/asm-generic/signal.h
include/uapi/asm-generic/socket.h
include/uapi/asm-generic/sockios.h
include/uapi/asm-generic/stat.h
include/uapi/asm-generic/statfs.h
include/uapi/asm-generic/swab.h
include/uapi/asm-generic/termbits.h
include/uapi/asm-generic/termios.h
include/uapi/asm-generic/types.h
include/uapi/asm-generic/ucontext.h
include/uapi/asm-generic/unistd.h
include/uapi/drm/armada_drm.h
include/uapi/drm/etnaviv_drm.h
include/uapi/drm/exynos_drm.h
include/uapi/drm/i810_drm.h
include/uapi/drm/omap_drm.h
include/uapi/linux/a.out.h
include/uapi/linux/acct.h
include/uapi/linux/adb.h
include/uapi/linux/adfs_fs.h
include/uapi/linux/affs_hardblocks.h
include/uapi/linux/am437x-vpfe.h
include/uapi/linux/android/binder.h
include/uapi/linux/apm_bios.h
include/uapi/linux/arcfb.h
include/uapi/linux/aspeed-lpc-ctrl.h
include/uapi/linux/atalk.h
include/uapi/linux/atm.h
include/uapi/linux/atm_eni.h
include/uapi/linux/atm_he.h
include/uapi/linux/atm_idt77105.h
include/uapi/linux/atm_nicstar.h
include/uapi/linux/atm_tcp.h
include/uapi/linux/atm_zatm.h
include/uapi/linux/atmapi.h
include/uapi/linux/atmarp.h
include/uapi/linux/atmbr2684.h
include/uapi/linux/atmclip.h
include/uapi/linux/atmdev.h
include/uapi/linux/atmioc.h
include/uapi/linux/atmlec.h
include/uapi/linux/atmmpc.h
include/uapi/linux/atmppp.h
include/uapi/linux/atmsap.h
include/uapi/linux/atmsvc.h
include/uapi/linux/audit.h
include/uapi/linux/auto_dev-ioctl.h
include/uapi/linux/auto_fs.h
include/uapi/linux/auto_fs4.h
include/uapi/linux/auxvec.h
include/uapi/linux/ax25.h
include/uapi/linux/b1lli.h
include/uapi/linux/baycom.h
include/uapi/linux/bcache.h
include/uapi/linux/bcm933xx_hcs.h
include/uapi/linux/bfs_fs.h
include/uapi/linux/binfmts.h
include/uapi/linux/blkpg.h
include/uapi/linux/blktrace_api.h
include/uapi/linux/blkzoned.h
include/uapi/linux/bpf.h
include/uapi/linux/bpf_common.h
include/uapi/linux/bpf_perf_event.h
include/uapi/linux/bpqether.h
include/uapi/linux/bsg.h
include/uapi/linux/bt-bmc.h
include/uapi/linux/btrfs.h
include/uapi/linux/btrfs_tree.h
include/uapi/linux/byteorder/big_endian.h
include/uapi/linux/byteorder/little_endian.h
include/uapi/linux/caif/caif_socket.h
include/uapi/linux/caif/if_caif.h
include/uapi/linux/can.h
include/uapi/linux/can/bcm.h
include/uapi/linux/can/error.h
include/uapi/linux/can/gw.h
include/uapi/linux/can/netlink.h
include/uapi/linux/can/raw.h
include/uapi/linux/can/vxcan.h
include/uapi/linux/capability.h
include/uapi/linux/capi.h
include/uapi/linux/cciss_defs.h
include/uapi/linux/cciss_ioctl.h
include/uapi/linux/cdrom.h
include/uapi/linux/cec-funcs.h
include/uapi/linux/cec.h
include/uapi/linux/cgroupstats.h
include/uapi/linux/chio.h
include/uapi/linux/cifs/cifs_mount.h
include/uapi/linux/cm4000_cs.h
include/uapi/linux/cn_proc.h
include/uapi/linux/coda_psdev.h
include/uapi/linux/coff.h
include/uapi/linux/connector.h
include/uapi/linux/const.h
include/uapi/linux/coresight-stm.h
include/uapi/linux/cramfs_fs.h
include/uapi/linux/cryptouser.h
include/uapi/linux/cuda.h
include/uapi/linux/cyclades.h
include/uapi/linux/cycx_cfm.h
include/uapi/linux/dcbnl.h
include/uapi/linux/dccp.h
include/uapi/linux/devlink.h
include/uapi/linux/dlm.h
include/uapi/linux/dlm_device.h
include/uapi/linux/dlm_netlink.h
include/uapi/linux/dlm_plock.h
include/uapi/linux/dlmconstants.h
include/uapi/linux/dm-ioctl.h
include/uapi/linux/dm-log-userspace.h
include/uapi/linux/dma-buf.h
include/uapi/linux/dn.h
include/uapi/linux/dqblk_xfs.h
include/uapi/linux/dvb/audio.h
include/uapi/linux/dvb/ca.h
include/uapi/linux/dvb/dmx.h
include/uapi/linux/dvb/frontend.h
include/uapi/linux/dvb/net.h
include/uapi/linux/dvb/osd.h
include/uapi/linux/dvb/version.h
include/uapi/linux/dvb/video.h
include/uapi/linux/edd.h
include/uapi/linux/efs_fs_sb.h
include/uapi/linux/elf-em.h
include/uapi/linux/elf-fdpic.h
include/uapi/linux/elf.h
include/uapi/linux/elfcore.h
include/uapi/linux/errqueue.h
include/uapi/linux/ethtool.h
include/uapi/linux/eventpoll.h
include/uapi/linux/fadvise.h
include/uapi/linux/falloc.h
include/uapi/linux/fanotify.h
include/uapi/linux/fb.h
include/uapi/linux/fcntl.h
include/uapi/linux/fd.h
include/uapi/linux/fdreg.h
include/uapi/linux/fib_rules.h
include/uapi/linux/fiemap.h
include/uapi/linux/filter.h
include/uapi/linux/flat.h
include/uapi/linux/fou.h
include/uapi/linux/fs.h
include/uapi/linux/fsl_hypervisor.h
include/uapi/linux/fsmap.h
include/uapi/linux/fuse.h
include/uapi/linux/futex.h
include/uapi/linux/gameport.h
include/uapi/linux/gen_stats.h
include/uapi/linux/genetlink.h
include/uapi/linux/genwqe/genwqe_card.h
include/uapi/linux/gfs2_ondisk.h
include/uapi/linux/gigaset_dev.h
include/uapi/linux/gpio.h
include/uapi/linux/gsmmux.h
include/uapi/linux/gtp.h
include/uapi/linux/hash_info.h
include/uapi/linux/hdlc.h
include/uapi/linux/hdlc/ioctl.h
include/uapi/linux/hdlcdrv.h
include/uapi/linux/hdreg.h
include/uapi/linux/hid.h
include/uapi/linux/hiddev.h
include/uapi/linux/hidraw.h
include/uapi/linux/hpet.h
include/uapi/linux/hsi/cs-protocol.h
include/uapi/linux/hsi/hsi_char.h
include/uapi/linux/hsr_netlink.h
include/uapi/linux/hw_breakpoint.h
include/uapi/linux/hyperv.h
include/uapi/linux/hysdn_if.h
include/uapi/linux/i2c-dev.h
include/uapi/linux/i2c.h
include/uapi/linux/i2o-dev.h
include/uapi/linux/i8k.h
include/uapi/linux/icmp.h
include/uapi/linux/icmpv6.h
include/uapi/linux/if.h
include/uapi/linux/if_addr.h
include/uapi/linux/if_addrlabel.h
include/uapi/linux/if_alg.h
include/uapi/linux/if_arcnet.h
include/uapi/linux/if_arp.h
include/uapi/linux/if_bonding.h
include/uapi/linux/if_bridge.h
include/uapi/linux/if_cablemodem.h
include/uapi/linux/if_eql.h
include/uapi/linux/if_ether.h
include/uapi/linux/if_fc.h
include/uapi/linux/if_fddi.h
include/uapi/linux/if_frad.h
include/uapi/linux/if_hippi.h
include/uapi/linux/if_infiniband.h
include/uapi/linux/if_link.h
include/uapi/linux/if_ltalk.h
include/uapi/linux/if_macsec.h
include/uapi/linux/if_packet.h
include/uapi/linux/if_phonet.h
include/uapi/linux/if_plip.h
include/uapi/linux/if_pppol2tp.h
include/uapi/linux/if_pppox.h
include/uapi/linux/if_slip.h
include/uapi/linux/if_team.h
include/uapi/linux/if_tun.h
include/uapi/linux/if_tunnel.h
include/uapi/linux/if_vlan.h
include/uapi/linux/if_x25.h
include/uapi/linux/ife.h
include/uapi/linux/igmp.h
include/uapi/linux/iio/events.h
include/uapi/linux/iio/types.h
include/uapi/linux/ila.h
include/uapi/linux/in.h
include/uapi/linux/in6.h
include/uapi/linux/in_route.h
include/uapi/linux/inet_diag.h
include/uapi/linux/inotify.h
include/uapi/linux/input-event-codes.h
include/uapi/linux/input.h
include/uapi/linux/ioctl.h
include/uapi/linux/ip.h
include/uapi/linux/ip6_tunnel.h
include/uapi/linux/ip_vs.h
include/uapi/linux/ipc.h
include/uapi/linux/ipmi.h
include/uapi/linux/ipmi_msgdefs.h
include/uapi/linux/ipsec.h
include/uapi/linux/ipv6.h
include/uapi/linux/ipv6_route.h
include/uapi/linux/ipx.h
include/uapi/linux/irda.h
include/uapi/linux/isdn.h
include/uapi/linux/isdn/capicmd.h
include/uapi/linux/isdn_divertif.h
include/uapi/linux/isdn_ppp.h
include/uapi/linux/isdnif.h
include/uapi/linux/iso_fs.h
include/uapi/linux/ivtv.h
include/uapi/linux/ivtvfb.h
include/uapi/linux/ixjuser.h
include/uapi/linux/joystick.h
include/uapi/linux/kcm.h
include/uapi/linux/kcmp.h
include/uapi/linux/kcov.h
include/uapi/linux/kd.h
include/uapi/linux/kdev_t.h
include/uapi/linux/kernel-page-flags.h
include/uapi/linux/kernel.h
include/uapi/linux/kernelcapi.h
include/uapi/linux/kexec.h
include/uapi/linux/keyboard.h
include/uapi/linux/keyctl.h
include/uapi/linux/kfd_ioctl.h
include/uapi/linux/kvm.h
include/uapi/linux/kvm_para.h
include/uapi/linux/l2tp.h
include/uapi/linux/libc-compat.h
include/uapi/linux/lightnvm.h
include/uapi/linux/limits.h
include/uapi/linux/lirc.h
include/uapi/linux/llc.h
include/uapi/linux/loop.h
include/uapi/linux/lp.h
include/uapi/linux/lwtunnel.h
include/uapi/linux/magic.h
include/uapi/linux/major.h
include/uapi/linux/map_to_7segment.h
include/uapi/linux/matroxfb.h
include/uapi/linux/max2175.h
include/uapi/linux/mdio.h
include/uapi/linux/media-bus-format.h
include/uapi/linux/media.h
include/uapi/linux/mei.h
include/uapi/linux/membarrier.h
include/uapi/linux/memfd.h
include/uapi/linux/mempolicy.h
include/uapi/linux/meye.h
include/uapi/linux/mic_common.h
include/uapi/linux/mic_ioctl.h
include/uapi/linux/mii.h
include/uapi/linux/minix_fs.h
include/uapi/linux/mman.h
include/uapi/linux/mmc/ioctl.h
include/uapi/linux/mmtimer.h
include/uapi/linux/module.h
include/uapi/linux/mpls.h
include/uapi/linux/mpls_iptunnel.h
include/uapi/linux/mqueue.h
include/uapi/linux/mroute.h
include/uapi/linux/mroute6.h
include/uapi/linux/msdos_fs.h
include/uapi/linux/msg.h
include/uapi/linux/mtio.h
include/uapi/linux/n_r3964.h
include/uapi/linux/nbd-netlink.h
include/uapi/linux/nbd.h
include/uapi/linux/ncp.h
include/uapi/linux/ncp_fs.h
include/uapi/linux/ncp_mount.h
include/uapi/linux/ncp_no.h
include/uapi/linux/neighbour.h
include/uapi/linux/net.h
include/uapi/linux/net_dropmon.h
include/uapi/linux/net_namespace.h
include/uapi/linux/net_tstamp.h
include/uapi/linux/netconf.h
include/uapi/linux/netdevice.h
include/uapi/linux/netfilter.h
include/uapi/linux/netfilter/ipset/ip_set.h
include/uapi/linux/netfilter/ipset/ip_set_bitmap.h
include/uapi/linux/netfilter/ipset/ip_set_hash.h
include/uapi/linux/netfilter/ipset/ip_set_list.h
include/uapi/linux/netfilter/nf_conntrack_common.h
include/uapi/linux/netfilter/nf_conntrack_ftp.h
include/uapi/linux/netfilter/nf_conntrack_sctp.h
include/uapi/linux/netfilter/nf_conntrack_tcp.h
include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
include/uapi/linux/netfilter/nf_log.h
include/uapi/linux/netfilter/nf_nat.h
include/uapi/linux/netfilter/nf_tables.h
include/uapi/linux/netfilter/nf_tables_compat.h
include/uapi/linux/netfilter/nfnetlink.h
include/uapi/linux/netfilter/nfnetlink_acct.h
include/uapi/linux/netfilter/nfnetlink_compat.h
include/uapi/linux/netfilter/nfnetlink_conntrack.h
include/uapi/linux/netfilter/nfnetlink_cthelper.h
include/uapi/linux/netfilter/nfnetlink_cttimeout.h
include/uapi/linux/netfilter/nfnetlink_log.h
include/uapi/linux/netfilter/nfnetlink_queue.h
include/uapi/linux/netfilter/x_tables.h
include/uapi/linux/netfilter/xt_AUDIT.h
include/uapi/linux/netfilter/xt_CHECKSUM.h
include/uapi/linux/netfilter/xt_CLASSIFY.h
include/uapi/linux/netfilter/xt_CONNMARK.h
include/uapi/linux/netfilter/xt_CONNSECMARK.h
include/uapi/linux/netfilter/xt_CT.h
include/uapi/linux/netfilter/xt_DSCP.h
include/uapi/linux/netfilter/xt_HMARK.h
include/uapi/linux/netfilter/xt_IDLETIMER.h
include/uapi/linux/netfilter/xt_LED.h
include/uapi/linux/netfilter/xt_LOG.h
include/uapi/linux/netfilter/xt_MARK.h
include/uapi/linux/netfilter/xt_NFLOG.h
include/uapi/linux/netfilter/xt_NFQUEUE.h
include/uapi/linux/netfilter/xt_RATEEST.h
include/uapi/linux/netfilter/xt_SECMARK.h
include/uapi/linux/netfilter/xt_SYNPROXY.h
include/uapi/linux/netfilter/xt_TCPMSS.h
include/uapi/linux/netfilter/xt_TCPOPTSTRIP.h
include/uapi/linux/netfilter/xt_TEE.h
include/uapi/linux/netfilter/xt_TPROXY.h
include/uapi/linux/netfilter/xt_addrtype.h
include/uapi/linux/netfilter/xt_bpf.h
include/uapi/linux/netfilter/xt_cgroup.h
include/uapi/linux/netfilter/xt_cluster.h
include/uapi/linux/netfilter/xt_comment.h
include/uapi/linux/netfilter/xt_connbytes.h
include/uapi/linux/netfilter/xt_connlabel.h
include/uapi/linux/netfilter/xt_connlimit.h
include/uapi/linux/netfilter/xt_connmark.h
include/uapi/linux/netfilter/xt_conntrack.h
include/uapi/linux/netfilter/xt_cpu.h
include/uapi/linux/netfilter/xt_dccp.h
include/uapi/linux/netfilter/xt_devgroup.h
include/uapi/linux/netfilter/xt_dscp.h
include/uapi/linux/netfilter/xt_ecn.h
include/uapi/linux/netfilter/xt_esp.h
include/uapi/linux/netfilter/xt_hashlimit.h
include/uapi/linux/netfilter/xt_helper.h
include/uapi/linux/netfilter/xt_ipcomp.h
include/uapi/linux/netfilter/xt_iprange.h
include/uapi/linux/netfilter/xt_ipvs.h
include/uapi/linux/netfilter/xt_l2tp.h
include/uapi/linux/netfilter/xt_length.h
include/uapi/linux/netfilter/xt_limit.h
include/uapi/linux/netfilter/xt_mac.h
include/uapi/linux/netfilter/xt_mark.h
include/uapi/linux/netfilter/xt_multiport.h
include/uapi/linux/netfilter/xt_nfacct.h
include/uapi/linux/netfilter/xt_osf.h
include/uapi/linux/netfilter/xt_owner.h
include/uapi/linux/netfilter/xt_physdev.h
include/uapi/linux/netfilter/xt_pkttype.h
include/uapi/linux/netfilter/xt_policy.h
include/uapi/linux/netfilter/xt_quota.h
include/uapi/linux/netfilter/xt_rateest.h
include/uapi/linux/netfilter/xt_realm.h
include/uapi/linux/netfilter/xt_recent.h
include/uapi/linux/netfilter/xt_rpfilter.h
include/uapi/linux/netfilter/xt_sctp.h
include/uapi/linux/netfilter/xt_set.h
include/uapi/linux/netfilter/xt_socket.h
include/uapi/linux/netfilter/xt_state.h
include/uapi/linux/netfilter/xt_statistic.h
include/uapi/linux/netfilter/xt_string.h
include/uapi/linux/netfilter/xt_tcpmss.h
include/uapi/linux/netfilter/xt_tcpudp.h
include/uapi/linux/netfilter/xt_time.h
include/uapi/linux/netfilter/xt_u32.h
include/uapi/linux/netfilter_arp.h
include/uapi/linux/netfilter_arp/arp_tables.h
include/uapi/linux/netfilter_arp/arpt_mangle.h
include/uapi/linux/netfilter_bridge.h
include/uapi/linux/netfilter_bridge/ebt_802_3.h
include/uapi/linux/netfilter_bridge/ebt_among.h
include/uapi/linux/netfilter_bridge/ebt_arp.h
include/uapi/linux/netfilter_bridge/ebt_arpreply.h
include/uapi/linux/netfilter_bridge/ebt_ip.h
include/uapi/linux/netfilter_bridge/ebt_ip6.h
include/uapi/linux/netfilter_bridge/ebt_limit.h
include/uapi/linux/netfilter_bridge/ebt_log.h
include/uapi/linux/netfilter_bridge/ebt_mark_m.h
include/uapi/linux/netfilter_bridge/ebt_mark_t.h
include/uapi/linux/netfilter_bridge/ebt_nat.h
include/uapi/linux/netfilter_bridge/ebt_nflog.h
include/uapi/linux/netfilter_bridge/ebt_pkttype.h
include/uapi/linux/netfilter_bridge/ebt_redirect.h
include/uapi/linux/netfilter_bridge/ebt_stp.h
include/uapi/linux/netfilter_bridge/ebt_vlan.h
include/uapi/linux/netfilter_bridge/ebtables.h
include/uapi/linux/netfilter_decnet.h
include/uapi/linux/netfilter_ipv4.h
include/uapi/linux/netfilter_ipv4/ip_tables.h
include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h
include/uapi/linux/netfilter_ipv4/ipt_ECN.h
include/uapi/linux/netfilter_ipv4/ipt_LOG.h
include/uapi/linux/netfilter_ipv4/ipt_REJECT.h
include/uapi/linux/netfilter_ipv4/ipt_TTL.h
include/uapi/linux/netfilter_ipv4/ipt_ah.h
include/uapi/linux/netfilter_ipv4/ipt_ecn.h
include/uapi/linux/netfilter_ipv4/ipt_ttl.h
include/uapi/linux/netfilter_ipv6.h
include/uapi/linux/netfilter_ipv6/ip6_tables.h
include/uapi/linux/netfilter_ipv6/ip6t_HL.h
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h
include/uapi/linux/netfilter_ipv6/ip6t_NPT.h
include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h
include/uapi/linux/netfilter_ipv6/ip6t_ah.h
include/uapi/linux/netfilter_ipv6/ip6t_frag.h
include/uapi/linux/netfilter_ipv6/ip6t_hl.h
include/uapi/linux/netfilter_ipv6/ip6t_ipv6header.h
include/uapi/linux/netfilter_ipv6/ip6t_mh.h
include/uapi/linux/netfilter_ipv6/ip6t_opts.h
include/uapi/linux/netfilter_ipv6/ip6t_rt.h
include/uapi/linux/netlink.h
include/uapi/linux/netlink_diag.h
include/uapi/linux/netrom.h
include/uapi/linux/nfs.h
include/uapi/linux/nfs2.h
include/uapi/linux/nfs3.h
include/uapi/linux/nfs4.h
include/uapi/linux/nfs4_mount.h
include/uapi/linux/nfs_fs.h
include/uapi/linux/nfs_mount.h
include/uapi/linux/nfsacl.h
include/uapi/linux/nfsd/cld.h
include/uapi/linux/nfsd/debug.h
include/uapi/linux/nfsd/export.h
include/uapi/linux/nfsd/nfsfh.h
include/uapi/linux/nfsd/stats.h
include/uapi/linux/nilfs2_api.h
include/uapi/linux/nilfs2_ondisk.h
include/uapi/linux/nsfs.h
include/uapi/linux/nubus.h
include/uapi/linux/nvme_ioctl.h
include/uapi/linux/nvram.h
include/uapi/linux/omap3isp.h
include/uapi/linux/omapfb.h
include/uapi/linux/oom.h
include/uapi/linux/openvswitch.h
include/uapi/linux/packet_diag.h
include/uapi/linux/param.h
include/uapi/linux/patchkey.h
include/uapi/linux/pci.h
include/uapi/linux/pci_regs.h
include/uapi/linux/pcitest.h
include/uapi/linux/perf_event.h
include/uapi/linux/personality.h
include/uapi/linux/pfkeyv2.h
include/uapi/linux/pg.h
include/uapi/linux/phantom.h
include/uapi/linux/phonet.h
include/uapi/linux/pkt_cls.h
include/uapi/linux/pkt_sched.h
include/uapi/linux/pktcdvd.h
include/uapi/linux/pmu.h
include/uapi/linux/posix_acl.h
include/uapi/linux/posix_acl_xattr.h
include/uapi/linux/posix_types.h
include/uapi/linux/ppdev.h
include/uapi/linux/ppp-comp.h
include/uapi/linux/ppp-ioctl.h
include/uapi/linux/ppp_defs.h
include/uapi/linux/pps.h
include/uapi/linux/pr.h
include/uapi/linux/prctl.h
include/uapi/linux/psample.h
include/uapi/linux/psci.h
include/uapi/linux/ptp_clock.h
include/uapi/linux/ptrace.h
include/uapi/linux/qnx4_fs.h
include/uapi/linux/qnxtypes.h
include/uapi/linux/qrtr.h
include/uapi/linux/radeonfb.h
include/uapi/linux/raid/md_p.h
include/uapi/linux/raid/md_u.h
include/uapi/linux/random.h
include/uapi/linux/raw.h
include/uapi/linux/rds.h
include/uapi/linux/reboot.h
include/uapi/linux/reiserfs_fs.h
include/uapi/linux/reiserfs_xattr.h
include/uapi/linux/resource.h
include/uapi/linux/rio_cm_cdev.h
include/uapi/linux/rio_mport_cdev.h
include/uapi/linux/romfs_fs.h
include/uapi/linux/rose.h
include/uapi/linux/route.h
include/uapi/linux/rpmsg.h
include/uapi/linux/rtc.h
include/uapi/linux/rtnetlink.h
include/uapi/linux/scc.h
include/uapi/linux/sched.h
include/uapi/linux/sched/types.h
include/uapi/linux/scif_ioctl.h
include/uapi/linux/screen_info.h
include/uapi/linux/sctp.h
include/uapi/linux/sdla.h
include/uapi/linux/seccomp.h
include/uapi/linux/securebits.h
include/uapi/linux/sed-opal.h
include/uapi/linux/seg6.h
include/uapi/linux/seg6_genl.h
include/uapi/linux/seg6_hmac.h
include/uapi/linux/seg6_iptunnel.h
include/uapi/linux/selinux_netlink.h
include/uapi/linux/sem.h
include/uapi/linux/serial.h
include/uapi/linux/serial_core.h
include/uapi/linux/serial_reg.h
include/uapi/linux/serio.h
include/uapi/linux/shm.h
include/uapi/linux/signal.h
include/uapi/linux/signalfd.h
include/uapi/linux/smc.h
include/uapi/linux/smc_diag.h
include/uapi/linux/smiapp.h
include/uapi/linux/snmp.h
include/uapi/linux/sock_diag.h
include/uapi/linux/socket.h
include/uapi/linux/sockios.h
include/uapi/linux/sonet.h
include/uapi/linux/sonypi.h
include/uapi/linux/sound.h
include/uapi/linux/spi/spidev.h
include/uapi/linux/stat.h
include/uapi/linux/stddef.h
include/uapi/linux/stm.h
include/uapi/linux/string.h
include/uapi/linux/sunrpc/debug.h
include/uapi/linux/suspend_ioctls.h
include/uapi/linux/swab.h
include/uapi/linux/switchtec_ioctl.h
include/uapi/linux/sync_file.h
include/uapi/linux/synclink.h
include/uapi/linux/sysctl.h
include/uapi/linux/sysinfo.h
include/uapi/linux/target_core_user.h
include/uapi/linux/taskstats.h
include/uapi/linux/tc_act/tc_bpf.h
include/uapi/linux/tc_act/tc_connmark.h
include/uapi/linux/tc_act/tc_csum.h
include/uapi/linux/tc_act/tc_defact.h
include/uapi/linux/tc_act/tc_gact.h
include/uapi/linux/tc_act/tc_ife.h
include/uapi/linux/tc_act/tc_ipt.h
include/uapi/linux/tc_act/tc_mirred.h
include/uapi/linux/tc_act/tc_nat.h
include/uapi/linux/tc_act/tc_pedit.h
include/uapi/linux/tc_act/tc_sample.h
include/uapi/linux/tc_act/tc_skbedit.h
include/uapi/linux/tc_act/tc_skbmod.h
include/uapi/linux/tc_act/tc_tunnel_key.h
include/uapi/linux/tc_act/tc_vlan.h
include/uapi/linux/tc_ematch/tc_em_cmp.h
include/uapi/linux/tc_ematch/tc_em_meta.h
include/uapi/linux/tc_ematch/tc_em_nbyte.h
include/uapi/linux/tc_ematch/tc_em_text.h
include/uapi/linux/tcp.h
include/uapi/linux/tcp_metrics.h
include/uapi/linux/telephony.h
include/uapi/linux/termios.h
include/uapi/linux/thermal.h
include/uapi/linux/time.h
include/uapi/linux/timerfd.h
include/uapi/linux/times.h
include/uapi/linux/tiocl.h
include/uapi/linux/tipc.h
include/uapi/linux/tipc_config.h
include/uapi/linux/tipc_netlink.h
include/uapi/linux/tls.h
include/uapi/linux/toshiba.h
include/uapi/linux/tty.h
include/uapi/linux/tty_flags.h
include/uapi/linux/types.h
include/uapi/linux/udf_fs_i.h
include/uapi/linux/udp.h
include/uapi/linux/uhid.h
include/uapi/linux/uinput.h
include/uapi/linux/uio.h
include/uapi/linux/uleds.h
include/uapi/linux/ultrasound.h
include/uapi/linux/un.h
include/uapi/linux/unistd.h
include/uapi/linux/unix_diag.h
include/uapi/linux/usb/audio.h
include/uapi/linux/usb/cdc-wdm.h
include/uapi/linux/usb/cdc.h
include/uapi/linux/usb/ch11.h
include/uapi/linux/usb/ch9.h
include/uapi/linux/usb/functionfs.h
include/uapi/linux/usb/g_printer.h
include/uapi/linux/usb/gadgetfs.h
include/uapi/linux/usb/midi.h
include/uapi/linux/usb/tmc.h
include/uapi/linux/usb/video.h
include/uapi/linux/usbdevice_fs.h
include/uapi/linux/usbip.h
include/uapi/linux/userfaultfd.h
include/uapi/linux/userio.h
include/uapi/linux/utime.h
include/uapi/linux/utsname.h
include/uapi/linux/uuid.h
include/uapi/linux/uvcvideo.h
include/uapi/linux/v4l2-common.h
include/uapi/linux/v4l2-controls.h
include/uapi/linux/v4l2-dv-timings.h
include/uapi/linux/v4l2-mediabus.h
include/uapi/linux/v4l2-subdev.h
include/uapi/linux/veth.h
include/uapi/linux/vfio.h
include/uapi/linux/vfio_ccw.h
include/uapi/linux/vhost.h
include/uapi/linux/videodev2.h
include/uapi/linux/vm_sockets.h
include/uapi/linux/vsockmon.h
include/uapi/linux/vt.h
include/uapi/linux/vtpm_proxy.h
include/uapi/linux/wait.h
include/uapi/linux/wanrouter.h
include/uapi/linux/watchdog.h
include/uapi/linux/wireless.h
include/uapi/linux/x25.h
include/uapi/linux/xattr.h
include/uapi/linux/xfrm.h
include/uapi/linux/xilinx-v4l2-controls.h
include/uapi/linux/zorro.h
include/uapi/linux/zorro_ids.h
include/uapi/misc/cxl.h
include/uapi/mtd/inftl-user.h
include/uapi/mtd/mtd-abi.h
include/uapi/mtd/mtd-user.h
include/uapi/mtd/nftl-user.h
include/uapi/mtd/ubi-user.h
include/uapi/rdma/bnxt_re-abi.h
include/uapi/rdma/cxgb3-abi.h
include/uapi/rdma/cxgb4-abi.h
include/uapi/rdma/hfi/hfi1_ioctl.h
include/uapi/rdma/hfi/hfi1_user.h
include/uapi/rdma/hns-abi.h
include/uapi/rdma/ib_user_cm.h
include/uapi/rdma/ib_user_mad.h
include/uapi/rdma/ib_user_sa.h
include/uapi/rdma/ib_user_verbs.h
include/uapi/rdma/mlx4-abi.h
include/uapi/rdma/mlx5-abi.h
include/uapi/rdma/mthca-abi.h
include/uapi/rdma/nes-abi.h
include/uapi/rdma/ocrdma-abi.h
include/uapi/rdma/qedr-abi.h
include/uapi/rdma/rdma_netlink.h
include/uapi/rdma/rdma_user_cm.h
include/uapi/rdma/rdma_user_ioctl.h
include/uapi/rdma/rdma_user_rxe.h
include/uapi/rdma/vmw_pvrdma-abi.h
include/uapi/scsi/cxlflash_ioctl.h
include/uapi/scsi/fc/fc_els.h
include/uapi/scsi/fc/fc_fs.h
include/uapi/scsi/fc/fc_gs.h
include/uapi/scsi/fc/fc_ns.h
include/uapi/scsi/scsi_bsg_fc.h
include/uapi/scsi/scsi_netlink.h
include/uapi/scsi/scsi_netlink_fc.h
include/uapi/sound/asequencer.h
include/uapi/sound/asoc.h
include/uapi/sound/asound.h
include/uapi/sound/asound_fm.h
include/uapi/sound/compress_offload.h
include/uapi/sound/compress_params.h
include/uapi/sound/emu10k1.h
include/uapi/sound/firewire.h
include/uapi/sound/hdsp.h
include/uapi/sound/hdspm.h
include/uapi/sound/sb16_csp.h
include/uapi/sound/sfnt_info.h
include/uapi/sound/snd_sst_tokens.h
include/uapi/sound/tlv.h
include/uapi/sound/usb_stream.h
include/uapi/video/edid.h
include/uapi/video/sisfb.h
include/uapi/video/uvesafb.h
include/uapi/xen/evtchn.h
include/uapi/xen/gntdev.h
include/uapi/xen/privcmd.h
include/video/aty128.h
include/video/edid.h
include/video/iga.h
include/video/mbxfb.h
include/video/newport.h
include/video/radeon.h
include/video/sh_mobile_lcdc.h
include/video/sh_mobile_meram.h
include/video/sstfb.h
include/video/tdfx.h
include/video/trident.h
include/video/udlfb.h
include/video/uvesafb.h
include/xen/arm/hypervisor.h
include/xen/arm/interface.h
include/xen/arm/page-coherent.h
include/xen/arm/page.h
include/xen/balloon.h
include/xen/events.h
include/xen/features.h
include/xen/hvc-console.h
include/xen/hvm.h
include/xen/interface/event_channel.h
include/xen/interface/features.h
include/xen/interface/io/blkif.h
include/xen/interface/io/console.h
include/xen/interface/io/protocols.h
include/xen/interface/io/ring.h
include/xen/interface/io/xenbus.h
include/xen/interface/io/xs_wire.h
include/xen/interface/memory.h
include/xen/interface/nmi.h
include/xen/interface/version.h
include/xen/interface/xenpmu.h
include/xen/page.h
include/xen/platform_pci.h
include/xen/swiotlb-xen.h
include/xen/tmem.h
include/xen/xen-ops.h
include/xen/xen.h
init/Kconfig
init/Makefile
init/calibrate.c
init/do_mounts.h
init/do_mounts_initrd.c
init/do_mounts_md.c
init/do_mounts_rd.c
init/init_task.c
init/initramfs.c
ipc/Makefile
ipc/compat.c
ipc/msg.c
ipc/namespace.c
ipc/sem.c
ipc/shm.c
ipc/syscall.c
ipc/util.c
ipc/util.h
kernel/Makefile
kernel/acct.c
kernel/audit_tree.c
kernel/bounds.c
kernel/bpf/Makefile
kernel/bpf/arraymap.c
kernel/bpf/core.c
kernel/bpf/devmap.c
kernel/bpf/hashtab.c
kernel/bpf/inode.c
kernel/bpf/sockmap.c
kernel/bpf/syscall.c
kernel/bpf/verifier.c
kernel/capability.c
kernel/cgroup/Makefile
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup.c
kernel/cgroup/debug.c
kernel/cgroup/namespace.c
kernel/cpu.c
kernel/dma.c
kernel/elfcore.c
kernel/events/Makefile
kernel/events/core.c
kernel/events/internal.h
kernel/events/ring_buffer.c
kernel/exec_domain.c
kernel/exit.c
kernel/extable.c
kernel/fork.c
kernel/futex.c
kernel/futex_compat.c
kernel/gcov/Makefile
kernel/gcov/base.c
kernel/gcov/fs.c
kernel/gcov/gcc_3_4.c
kernel/gcov/gcc_4_7.c
kernel/gcov/gcov.h
kernel/groups.c
kernel/irq/Makefile
kernel/irq/affinity.c
kernel/irq/autoprobe.c
kernel/irq/chip.c
kernel/irq/cpuhotplug.c
kernel/irq/debug.h
kernel/irq/generic-chip.c
kernel/irq/internals.h
kernel/irq/irqdomain.c
kernel/irq/manage.c
kernel/irq/migration.c
kernel/irq/proc.c
kernel/irq/resend.c
kernel/irq/settings.h
kernel/irq/spurious.c
kernel/kcmp.c
kernel/kcov.c
kernel/kexec_internal.h
kernel/livepatch/core.c
kernel/livepatch/core.h
kernel/livepatch/patch.h
kernel/livepatch/transition.h
kernel/locking/Makefile
kernel/locking/lockdep.c
kernel/locking/lockdep_internals.h
kernel/locking/lockdep_proc.c
kernel/locking/mcs_spinlock.h
kernel/locking/mutex-debug.h
kernel/locking/mutex.h
kernel/locking/osq_lock.c
kernel/locking/qspinlock_paravirt.h
kernel/locking/rtmutex-debug.c
kernel/locking/rtmutex-debug.h
kernel/locking/rtmutex.h
kernel/locking/rtmutex_common.h
kernel/locking/rwsem-spinlock.c
kernel/locking/rwsem-xadd.c
kernel/locking/rwsem.c
kernel/locking/rwsem.h
kernel/locking/spinlock.c
kernel/memremap.c
kernel/params.c
kernel/power/Makefile
kernel/power/autosleep.c
kernel/power/console.c
kernel/power/power.h
kernel/power/process.c
kernel/power/suspend.c
kernel/power/wakelock.c
kernel/printk/braille.c
kernel/printk/braille.h
kernel/printk/console_cmdline.h
kernel/range.c
kernel/rcu/Makefile
kernel/rcu/srcutree.c
kernel/rcu/sync.c
kernel/rcu/tree.c
kernel/sched/Makefile
kernel/sched/autogroup.c
kernel/sched/autogroup.h
kernel/sched/completion.c
kernel/sched/core.c
kernel/sched/cpuacct.c
kernel/sched/cpuacct.h
kernel/sched/cpudeadline.h
kernel/sched/cpupri.h
kernel/sched/deadline.c
kernel/sched/debug.c
kernel/sched/fair.c
kernel/sched/features.h
kernel/sched/idle_task.c
kernel/sched/loadavg.c
kernel/sched/membarrier.c
kernel/sched/rt.c
kernel/sched/sched-pelt.h
kernel/sched/sched.h
kernel/sched/stats.c
kernel/sched/stats.h
kernel/sched/stop_task.c
kernel/sched/swait.c
kernel/sched/topology.c
kernel/seccomp.c
kernel/signal.c
kernel/smpboot.c
kernel/smpboot.h
kernel/sys.c
kernel/sys_ni.c
kernel/sysctl.c
kernel/sysctl_binary.c
kernel/task_work.c
kernel/time/Makefile
kernel/time/itimer.c
kernel/time/ntp.c
kernel/time/ntp_internal.h
kernel/time/posix-cpu-timers.c
kernel/time/posix-timers.h
kernel/time/tick-broadcast-hrtimer.c
kernel/time/tick-internal.h
kernel/time/tick-sched.h
kernel/time/timekeeping.h
kernel/time/timekeeping_internal.h
kernel/trace/Makefile
kernel/trace/blktrace.c
kernel/trace/ftrace.c
kernel/trace/power-traces.c
kernel/trace/rpm-traces.c
kernel/trace/trace.c
kernel/trace/trace.h
kernel/trace/trace_benchmark.c
kernel/trace/trace_benchmark.h
kernel/trace/trace_branch.c
kernel/trace/trace_entries.h
kernel/trace/trace_events_filter_test.h
kernel/trace/trace_export.c
kernel/trace/trace_functions.c
kernel/trace/trace_functions_graph.c
kernel/trace/trace_kdb.c
kernel/trace/trace_mmiotrace.c
kernel/trace/trace_nop.c
kernel/trace/trace_output.c
kernel/trace/trace_output.h
kernel/trace/trace_sched_switch.c
kernel/trace/trace_sched_wakeup.c
kernel/trace/trace_selftest.c
kernel/trace/trace_selftest_dynamic.c
kernel/trace/trace_stack.c
kernel/trace/trace_stat.c
kernel/trace/trace_stat.h
kernel/trace/trace_syscalls.c
kernel/trace/tracing_map.h
kernel/uid16.c
kernel/watchdog.c
kernel/watchdog_hld.c
kernel/workqueue.c
kernel/workqueue_internal.h
lib/842/842.h
lib/842/842_debugfs.h
lib/Kconfig.debug
lib/Makefile
lib/argv_split.c
lib/asn1_decoder.c
lib/assoc_array.c
lib/audit.c
lib/bcd.c
lib/bug.c
lib/bust_spinlocks.c
lib/check_signature.c
lib/clz_tab.c
lib/compat_audit.c
lib/cpumask.c
lib/crc32defs.h
lib/ctype.c
lib/debug_info.c
lib/dec_and_lock.c
lib/decompress.c
lib/decompress_inflate.c
lib/devres.c
lib/digsig.c
lib/div64.c
lib/dma-noop.c
lib/dma-virt.c
lib/dump_stack.c
lib/dynamic_queue_limits.c
lib/errseq.c
lib/flex_proportions.c
lib/fonts/Makefile
lib/fonts/font_10x18.c
lib/fonts/font_6x10.c
lib/fonts/font_6x11.c
lib/fonts/font_7x14.c
lib/fonts/font_8x16.c
lib/fonts/font_8x8.c
lib/fonts/font_acorn_8x8.c
lib/fonts/font_pearl_8x8.c
lib/fonts/font_sun12x22.c
lib/fonts/font_sun8x16.c
lib/gen_crc32table.c
lib/hweight.c
lib/idr.c
lib/inflate.c
lib/int_sqrt.c
lib/iomap.c
lib/iommu-common.c
lib/iommu-helper.c
lib/ioremap.c
lib/iov_iter.c
lib/irq_poll.c
lib/kasprintf.c
lib/kobject_uevent.c
lib/kstrtox.c
lib/kstrtox.h
lib/list_sort.c
lib/locking-selftest-hardirq.h
lib/locking-selftest-mutex.h
lib/locking-selftest-rlock.h
lib/locking-selftest-rsem.h
lib/locking-selftest-rtmutex.h
lib/locking-selftest-softirq.h
lib/locking-selftest-spin.h
lib/locking-selftest-wlock.h
lib/locking-selftest-wsem.h
lib/locking-selftest.c
lib/lockref.c
lib/lz4/lz4_decompress.c
lib/lzo/lzodefs.h
lib/memweight.c
lib/mpi/Makefile
lib/net_utils.c
lib/nlattr.c
lib/nmi_backtrace.c
lib/nodemask.c
lib/notifier-error-inject.h
lib/once.c
lib/percpu_counter.c
lib/raid6/Makefile
lib/raid6/recov_s390xc.c
lib/raid6/s390vx.uc
lib/raid6/test/Makefile
lib/random32.c
lib/ratelimit.c
lib/rational.c
lib/reciprocal_div.c
lib/refcount.c
lib/rhashtable.c
lib/seq_buf.c
lib/sha1.c
lib/smp_processor_id.c
lib/sort.c
lib/string.c
lib/strncpy_from_user.c
lib/strnlen_user.c
lib/syscall.c
lib/ts_fsm.c
lib/ts_kmp.c
lib/ubsan.h
lib/ucs2_string.c
lib/usercopy.c
lib/win_minmax.c
mm/Makefile
mm/bootmem.c
mm/cma.c
mm/cma.h
mm/cma_debug.c
mm/compaction.c
mm/debug.c
mm/debug_page_ref.c
mm/early_ioremap.c
mm/fadvise.c
mm/failslab.c
mm/filemap.c
mm/frame_vector.c
mm/highmem.c
mm/huge_memory.c
mm/hugetlb.c
mm/init-mm.c
mm/kasan/Makefile
mm/kasan/kasan.h
mm/khugepaged.c
mm/kmemcheck.c
mm/ksm.c
mm/list_lru.c
mm/madvise.c
mm/memcontrol.c
mm/memory.c
mm/memory_hotplug.c
mm/mempolicy.c
mm/mempool.c
mm/memtest.c
mm/migrate.c
mm/mincore.c
mm/mlock.c
mm/mmzone.c
mm/mprotect.c
mm/mremap.c
mm/msync.c
mm/nobootmem.c
mm/oom_kill.c
mm/page_alloc.c
mm/page_counter.c
mm/page_ext.c
mm/page_idle.c
mm/page_io.c
mm/page_isolation.c
mm/page_owner.c
mm/page_poison.c
mm/page_vma_mapped.c
mm/pagewalk.c
mm/percpu-internal.h
mm/percpu-stats.c
mm/percpu.c
mm/pgtable-generic.c
mm/quicklist.c
mm/rodata_test.c
mm/slab.c
mm/slab.h
mm/slab_common.c
mm/slob.c
mm/slub.c
mm/sparse-vmemmap.c
mm/sparse.c
mm/swap.c
mm/swap_cgroup.c
mm/swap_slots.c
mm/swap_state.c
mm/swapfile.c
mm/vmacache.c
mm/vmalloc.c
mm/vmscan.c
mm/workingset.c
mm/z3fold.c
net/6lowpan/6lowpan_i.h
net/6lowpan/Makefile
net/6lowpan/nhc.h
net/802/Makefile
net/8021q/Makefile
net/8021q/vlan.h
net/8021q/vlan_core.c
net/8021q/vlanproc.h
net/9p/Makefile
net/Makefile
net/appletalk/dev.c
net/appletalk/sysctl_net_atalk.c
net/atm/Makefile
net/atm/addr.c
net/atm/addr.h
net/atm/atm_misc.c
net/atm/atm_sysfs.c
net/atm/common.h
net/atm/ioctl.c
net/atm/lec.h
net/atm/lec_arpc.h
net/atm/mpc.h
net/atm/mpoa_caches.c
net/atm/mpoa_caches.h
net/atm/mpoa_proc.c
net/atm/proc.c
net/atm/protocols.h
net/atm/pvc.c
net/atm/raw.c
net/atm/resources.c
net/atm/resources.h
net/atm/signaling.c
net/atm/signaling.h
net/atm/svc.c
net/ax25/Makefile
net/bluetooth/Kconfig
net/bluetooth/Makefile
net/bluetooth/hci_sock.c
net/bluetooth/hci_sysfs.c
net/bridge/Makefile
net/bridge/br_mdb.c
net/bridge/br_netlink.c
net/bridge/br_switchdev.c
net/bridge/netfilter/Makefile
net/bridge/netfilter/ebtable_broute.c
net/bridge/netfilter/ebtable_filter.c
net/bridge/netfilter/ebtable_nat.c
net/bridge/netfilter/ebtables.c
net/caif/Makefile
net/can/Makefile
net/can/af_can.c
net/can/bcm.c
net/ceph/Makefile
net/ceph/armor.c
net/ceph/auth.c
net/ceph/auth_none.c
net/ceph/auth_none.h
net/ceph/auth_x.c
net/ceph/auth_x.h
net/ceph/auth_x_protocol.h
net/ceph/buffer.c
net/ceph/ceph_fs.c
net/ceph/ceph_strings.c
net/ceph/cls_lock_client.c
net/ceph/crush/crush.c
net/ceph/crush/hash.c
net/ceph/crypto.c
net/ceph/crypto.h
net/ceph/debugfs.c
net/ceph/messenger.c
net/ceph/mon_client.c
net/ceph/msgpool.c
net/ceph/osd_client.c
net/ceph/osdmap.c
net/ceph/pagelist.c
net/ceph/pagevec.c
net/ceph/string_table.c
net/compat.c
net/core/Makefile
net/core/datagram.c
net/core/dev.c
net/core/dev_ioctl.c
net/core/ethtool.c
net/core/filter.c
net/core/gro_cells.c
net/core/net-procfs.c
net/core/net-sysfs.h
net/core/net-traces.c
net/core/rtnetlink.c
net/core/skbuff.c
net/core/sock.c
net/core/sock_reuseport.c
net/core/stream.c
net/core/sysctl_net_core.c
net/core/tso.c
net/dccp/Makefile
net/dccp/ccids/lib/tfrc.c
net/dccp/ipv4.c
net/decnet/Makefile
net/decnet/dn_dev.c
net/decnet/dn_fib.c
net/decnet/dn_neigh.c
net/decnet/dn_rules.c
net/decnet/dn_table.c
net/decnet/dn_timer.c
net/decnet/sysctl_net_decnet.c
net/dns_resolver/dns_key.c
net/dsa/Makefile
net/dsa/dsa2.c
net/dsa/slave.c
net/ieee802154/6lowpan/6lowpan_i.h
net/ieee802154/Makefile
net/ieee802154/core.h
net/ieee802154/nl802154.h
net/ieee802154/rdev-ops.h
net/ieee802154/sysfs.h
net/ieee802154/trace.h
net/ife/ife.c
net/ipv4/Kconfig
net/ipv4/Makefile
net/ipv4/cipso_ipv4.c
net/ipv4/fib_lookup.h
net/ipv4/fib_notifier.c
net/ipv4/fib_semantics.c
net/ipv4/gre_offload.c
net/ipv4/inet_connection_sock.c
net/ipv4/inet_hashtables.c
net/ipv4/inetpeer.c
net/ipv4/ip_forward.c
net/ipv4/ip_fragment.c
net/ipv4/ip_gre.c
net/ipv4/ip_input.c
net/ipv4/ip_options.c
net/ipv4/ip_sockglue.c
net/ipv4/ip_vti.c
net/ipv4/ipconfig.c
net/ipv4/ipip.c
net/ipv4/netfilter/Makefile
net/ipv4/netfilter/ipt_SYNPROXY.c
net/ipv4/netfilter/nf_reject_ipv4.c
net/ipv4/route.c
net/ipv4/syncookies.c
net/ipv4/sysctl_net_ipv4.c
net/ipv4/tcp_fastopen.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_metrics.c
net/ipv4/tcp_nv.c
net/ipv4/tcp_output.c
net/ipv4/tcp_recovery.c
net/ipv4/tcp_vegas.h
net/ipv4/udp.c
net/ipv4/udp_impl.h
net/ipv4/udp_offload.c
net/ipv4/xfrm4_input.c
net/ipv4/xfrm4_policy.c
net/ipv4/xfrm4_state.c
net/ipv6/Makefile
net/ipv6/addrconf.c
net/ipv6/addrlabel.c
net/ipv6/ila/ila_lwt.c
net/ipv6/ila/ila_xlat.c
net/ipv6/ip6_checksum.c
net/ipv6/ip6_flowlabel.c
net/ipv6/ip6_gre.c
net/ipv6/ip6_icmp.c
net/ipv6/ip6_offload.c
net/ipv6/ip6_output.c
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_vti.c
net/ipv6/netfilter/Makefile
net/ipv6/netfilter/ip6t_SYNPROXY.c
net/ipv6/route.c
net/ipv6/sysctl_net_ipv6.c
net/ipv6/udp.c
net/ipv6/udp_impl.h
net/ipv6/xfrm6_input.c
net/ipv6/xfrm6_policy.c
net/ipv6/xfrm6_state.c
net/ipx/ipx_proc.c
net/ipx/ipx_route.c
net/ipx/pe2.c
net/ipx/sysctl_net_ipx.c
net/kcm/kcmproc.c
net/l2tp/Makefile
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h
net/l2tp/l2tp_eth.c
net/l2tp/l2tp_ppp.c
net/llc/sysctl_net_llc.c
net/mac80211/Makefile
net/mac80211/cfg.c
net/mac80211/debug.h
net/mac80211/debugfs.h
net/mac80211/debugfs_key.h
net/mac80211/debugfs_netdev.h
net/mac80211/debugfs_sta.h
net/mac80211/driver-ops.h
net/mac80211/key.c
net/mac80211/pm.c
net/mac80211/trace.c
net/mac80211/trace.h
net/mac80211/trace_msg.h
net/mac802154/cfg.h
net/mac802154/driver-ops.h
net/mac802154/trace.c
net/mac802154/trace.h
net/mpls/internal.h
net/ncsi/internal.h
net/ncsi/ncsi-aen.c
net/ncsi/ncsi-manage.c
net/ncsi/ncsi-rsp.c
net/netfilter/Makefile
net/netfilter/ipset/Makefile
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_hash_gen.h
net/netfilter/ipset/ip_set_hash_ip.c
net/netfilter/ipset/ip_set_hash_ipmark.c
net/netfilter/ipset/ip_set_hash_ipport.c
net/netfilter/ipset/ip_set_hash_ipportip.c
net/netfilter/ipset/ip_set_hash_ipportnet.c
net/netfilter/ipset/ip_set_hash_net.c
net/netfilter/ipset/ip_set_hash_netiface.c
net/netfilter/ipset/ip_set_hash_netnet.c
net/netfilter/ipset/ip_set_hash_netport.c
net/netfilter/ipset/ip_set_hash_netportnet.c
net/netfilter/ipvs/Makefile
net/netfilter/ipvs/ip_vs_proto_sctp.c
net/netfilter/ipvs/ip_vs_sync.c
net/netfilter/ipvs/ip_vs_xmit.c
net/netfilter/nf_internals.h
net/netfilter/nf_nat_core.c
net/netfilter/nf_sockopt.c
net/netfilter/nf_tables_api.c
net/netfilter/nft_set_hash.c
net/netfilter/x_tables.c
net/netfilter/xt_bpf.c
net/netfilter/xt_repldata.h
net/netfilter/xt_socket.c
net/netlabel/Makefile
net/netlink/af_netlink.c
net/netlink/af_netlink.h
net/netlink/genetlink.c
net/nfc/Makefile
net/nfc/nci/Makefile
net/openvswitch/Makefile
net/packet/af_packet.c
net/packet/internal.h
net/phonet/Makefile
net/psample/psample.c
net/qrtr/qrtr.h
net/rds/Makefile
net/rds/ib.h
net/rds/ib_send.c
net/rds/info.h
net/rds/loop.h
net/rds/rdma_transport.h
net/rds/rds.h
net/rds/rds_single_path.h
net/rds/tcp.h
net/rxrpc/Makefile
net/rxrpc/af_rxrpc.c
net/sched/Makefile
net/sched/act_api.c
net/sched/act_bpf.c
net/sched/act_connmark.c
net/sched/act_csum.c
net/sched/act_gact.c
net/sched/act_ife.c
net/sched/act_ipt.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sched/act_pedit.c
net/sched/act_police.c
net/sched/act_sample.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/sched/act_skbmod.c
net/sched/act_tunnel_key.c
net/sched/act_vlan.c
net/sched/cls_api.c
net/sched/cls_basic.c
net/sched/cls_bpf.c
net/sched/cls_cgroup.c
net/sched/cls_flow.c
net/sched/cls_flower.c
net/sched/cls_fw.c
net/sched/cls_matchall.c
net/sched/cls_route.c
net/sched/cls_rsvp.h
net/sched/cls_tcindex.c
net/sched/cls_u32.c
net/sched/sch_api.c
net/sched/sch_generic.c
net/sched/sch_hfsc.c
net/sctp/Makefile
net/sctp/input.c
net/sctp/ipv6.c
net/sctp/sctp_diag.c
net/sctp/sm_make_chunk.c
net/sctp/sm_sideeffect.c
net/sctp/socket.c
net/sctp/stream.c
net/sctp/ulpevent.c
net/smc/af_smc.c
net/smc/smc.h
net/smc/smc_cdc.c
net/smc/smc_cdc.h
net/smc/smc_clc.c
net/smc/smc_clc.h
net/smc/smc_close.c
net/smc/smc_close.h
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_ib.c
net/smc/smc_ib.h
net/smc/smc_llc.c
net/smc/smc_llc.h
net/smc/smc_pnet.c
net/smc/smc_pnet.h
net/smc/smc_rx.c
net/smc/smc_rx.h
net/smc/smc_tx.c
net/smc/smc_tx.h
net/smc/smc_wr.c
net/smc/smc_wr.h
net/strparser/strparser.c
net/sunrpc/Makefile
net/sunrpc/auth_gss/Makefile
net/sunrpc/auth_null.c
net/sunrpc/auth_unix.c
net/sunrpc/debugfs.c
net/sunrpc/netns.h
net/sunrpc/xprt.c
net/sunrpc/xprtmultipath.c
net/sunrpc/xprtrdma/Makefile
net/sunrpc/xprtrdma/backchannel.c
net/sunrpc/xprtrdma/fmr_ops.c
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
net/sunrpc/xprtrdma/svc_rdma_rw.c
net/sunrpc/xprtsock.c
net/tipc/Makefile
net/tipc/bcast.c
net/tipc/msg.c
net/unix/Makefile
net/unix/diag.c
net/vmw_vsock/Makefile
net/vmw_vsock/hyperv_transport.c
net/wimax/Makefile
net/wireless/Makefile
net/wireless/ap.c
net/wireless/chan.c
net/wireless/core.h
net/wireless/debugfs.h
net/wireless/ethtool.c
net/wireless/ibss.c
net/wireless/mesh.c
net/wireless/mlme.c
net/wireless/nl80211.c
net/wireless/nl80211.h
net/wireless/rdev-ops.h
net/wireless/scan.c
net/wireless/sme.c
net/wireless/sysfs.h
net/wireless/trace.h
net/wireless/util.c
net/wireless/wext-compat.c
net/wireless/wext-sme.c
net/x25/Makefile
net/x25/sysctl_net_x25.c
net/xfrm/Makefile
net/xfrm/xfrm_device.c
net/xfrm/xfrm_hash.c
net/xfrm/xfrm_hash.h
net/xfrm/xfrm_input.c
net/xfrm/xfrm_output.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_sysctl.c
net/xfrm/xfrm_user.c
samples/auxdisplay/Makefile
samples/bpf/Makefile
samples/bpf/bpf_load.c
samples/bpf/bpf_load.h
samples/bpf/cgroup_helpers.c
samples/bpf/cgroup_helpers.h
samples/bpf/libbpf.h
samples/bpf/lwt_len_hist.sh
samples/bpf/lwt_len_hist_user.c
samples/bpf/run_cookie_uid_helper_example.sh
samples/bpf/sock_example.h
samples/bpf/sockex1_user.c
samples/bpf/sockex2_user.c
samples/bpf/sockex3_user.c
samples/bpf/spintest_user.c
samples/bpf/syscall_nrs.c
samples/bpf/tc_l2_redirect.sh
samples/bpf/test_cgrp2_sock.sh
samples/bpf/test_cgrp2_sock2.c
samples/bpf/test_cgrp2_sock2.sh
samples/bpf/test_cgrp2_tc.sh
samples/bpf/test_cls_bpf.sh
samples/bpf/test_ipip.sh
samples/bpf/test_lwt_bpf.sh
samples/bpf/test_probe_write_user_user.c
samples/bpf/test_tunnel_bpf.sh
samples/bpf/tracex1_user.c
samples/bpf/tracex2_user.c
samples/bpf/tracex5_user.c
samples/bpf/tracex6_user.c
samples/connector/Makefile
samples/hidraw/Makefile
samples/hidraw/hid-example.c
samples/mei/Makefile
samples/mic/mpssd/Makefile
samples/pktgen/parameters.sh
samples/pktgen/pktgen.conf-1-1-ip6
samples/pktgen/pktgen.conf-1-1-ip6-rdos
samples/pktgen/pktgen.conf-1-2
samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh
samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh
samples/pktgen/pktgen_sample01_simple.sh
samples/pktgen/pktgen_sample02_multiqueue.sh
samples/pktgen/pktgen_sample03_burst_single_flow.sh
samples/pktgen/pktgen_sample04_many_flows.sh
samples/pktgen/pktgen_sample05_flow_per_thread.sh
samples/seccomp/Makefile
samples/seccomp/bpf-direct.c
samples/seccomp/bpf-fancy.c
samples/seccomp/bpf-helper.c
samples/seccomp/bpf-helper.h
samples/seccomp/dropper.c
samples/sockmap/sockmap_kern.c
samples/timers/Makefile
samples/timers/hpet_example.c
samples/trace_events/trace-events-sample.c
samples/trace_events/trace-events-sample.h
samples/uhid/uhid-example.c
samples/watchdog/Makefile
samples/watchdog/watchdog-simple.c
scripts/Lindent
scripts/Makefile
scripts/Makefile.asm-generic
scripts/Makefile.build
scripts/Makefile.clean
scripts/Makefile.dtbinst
scripts/Makefile.extrawarn
scripts/Makefile.gcc-plugins
scripts/Makefile.headersinst
scripts/Makefile.host
scripts/Makefile.kasan
scripts/Makefile.lib
scripts/Makefile.modbuiltin
scripts/Makefile.modinst
scripts/Makefile.modpost
scripts/Makefile.modsign
scripts/Makefile.ubsan
scripts/check_00index.sh
scripts/check_extable.sh
scripts/checkincludes.pl
scripts/checkpatch.pl
scripts/checkstack.pl
scripts/checksyscalls.sh
scripts/checkversion.pl
scripts/cleanfile
scripts/cleanpatch
scripts/coccicheck
scripts/coccinelle/api/d_find_alias.cocci
scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
scripts/coccinelle/api/drm-get-put.cocci
scripts/coccinelle/api/simple_open.cocci
scripts/coccinelle/api/vma_pages.cocci
scripts/coccinelle/misc/boolreturn.cocci
scripts/coccinelle/misc/irqf_oneshot.cocci
scripts/coccinelle/misc/of_table.cocci
scripts/config
scripts/decode_stacktrace.sh
scripts/decodecode
scripts/depmod.sh
scripts/diffconfig
scripts/dtc/Makefile
scripts/dtc/dtx_diff
scripts/dtc/fdtdump.c
scripts/dtc/update-dtc-source.sh
scripts/extract-module-sig.pl
scripts/extract-sys-certs.pl
scripts/faddr2line
scripts/gcc-goto.sh
scripts/gcc-ld
scripts/gcc-plugin.sh
scripts/gcc-plugins/Makefile
scripts/gcc-plugins/gcc-common.h
scripts/gcc-plugins/gcc-generate-gimple-pass.h
scripts/gcc-plugins/gcc-generate-ipa-pass.h
scripts/gcc-plugins/gcc-generate-rtl-pass.h
scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h
scripts/gcc-plugins/gen-random-seed.sh
scripts/gcc-version.sh
scripts/gcc-x86_32-has-stack-protector.sh
scripts/gcc-x86_64-has-stack-protector.sh
scripts/gdb/linux/Makefile
scripts/genksyms/Makefile
scripts/headerdep.pl
scripts/headers.sh
scripts/headers_check.pl
scripts/headers_install.sh
scripts/kallsyms.c
scripts/kconfig/Makefile
scripts/kconfig/check.sh
scripts/kconfig/list.h
scripts/kconfig/lkc_proto.h
scripts/kconfig/lxdialog/check-lxdialog.sh
scripts/ld-version.sh
scripts/link-vmlinux.sh
scripts/makelst
scripts/mkcompile_h
scripts/mkmakefile
scripts/mkuboot.sh
scripts/mkversion [deleted file]
scripts/mod/Makefile
scripts/mod/devicetable-offsets.c
scripts/mod/mk_elfconfig.c
scripts/mod/modpost.h
scripts/package/Makefile
scripts/package/builddeb
scripts/package/buildtar
scripts/package/mkspec
scripts/parse-maintainers.pl
scripts/patch-kernel
scripts/profile2linkerlist.pl
scripts/prune-kernel
scripts/selinux/genheaders/Makefile
scripts/selinux/genheaders/genheaders.c
scripts/selinux/install_policy.sh
scripts/selinux/mdp/Makefile
scripts/setlocalversion
scripts/spelling.txt
scripts/stackdelta
scripts/stackusage
scripts/tracing/ftrace-bisect.sh
scripts/ver_linux
scripts/xen-hypercalls.sh
security/Makefile
security/apparmor/Makefile
security/apparmor/apparmorfs.c
security/apparmor/domain.c
security/apparmor/include/apparmor.h
security/apparmor/include/audit.h
security/apparmor/include/domain.h
security/apparmor/include/ipc.h
security/apparmor/include/label.h
security/apparmor/include/mount.h [new file with mode: 0644]
security/apparmor/include/sig_names.h [new file with mode: 0644]
security/apparmor/ipc.c
security/apparmor/label.c
security/apparmor/lsm.c
security/apparmor/mount.c [new file with mode: 0644]
security/apparmor/policy.c
security/apparmor/policy_ns.c
security/apparmor/policy_unpack.c
security/commoncap.c
security/device_cgroup.c
security/integrity/Makefile
security/integrity/ima/Makefile
security/keys/Kconfig
security/keys/Makefile
security/keys/big_key.c
security/keys/encrypted-keys/Makefile
security/keys/encrypted-keys/encrypted.c
security/keys/encrypted-keys/encrypted.h
security/keys/gc.c
security/keys/internal.h
security/keys/key.c
security/keys/keyctl.c
security/keys/keyring.c
security/keys/permission.c
security/keys/proc.c
security/keys/process_keys.c
security/keys/request_key.c
security/keys/request_key_auth.c
security/keys/trusted.c
security/keys/trusted.h
security/keys/user_defined.c
security/min_addr.c
security/selinux/Makefile
security/selinux/include/avc.h
security/selinux/include/avc_ss.h
security/selinux/include/classmap.h
security/selinux/include/initial_sid_to_string.h
security/selinux/include/security.h
security/selinux/include/xfrm.h
security/selinux/ss/constraint.h
security/selinux/ss/context.h
security/selinux/ss/ebitmap.c
security/selinux/ss/ebitmap.h
security/selinux/ss/hashtab.c
security/selinux/ss/hashtab.h
security/selinux/ss/mls.c
security/selinux/ss/mls.h
security/selinux/ss/mls_types.h
security/selinux/ss/services.h
security/selinux/ss/sidtab.c
security/selinux/ss/sidtab.h
security/selinux/ss/symtab.c
security/selinux/ss/symtab.h
security/smack/smack_lsm.c
security/tomoyo/Makefile
security/tomoyo/audit.c
security/tomoyo/common.c
security/tomoyo/common.h
security/tomoyo/condition.c
security/tomoyo/domain.c
security/tomoyo/environ.c
security/tomoyo/file.c
security/tomoyo/gc.c
security/tomoyo/group.c
security/tomoyo/load_policy.c
security/tomoyo/memory.c
security/tomoyo/mount.c
security/tomoyo/network.c
security/tomoyo/realpath.c
security/tomoyo/securityfs_if.c
security/tomoyo/tomoyo.c
security/tomoyo/util.c
sound/Makefile
sound/aoa/codecs/Makefile
sound/aoa/codecs/tas-basstreble.h
sound/aoa/codecs/tas-gain-table.h
sound/aoa/core/Makefile
sound/aoa/soundbus/sysfs.c
sound/arm/Makefile
sound/core/Makefile
sound/core/compress_offload.c
sound/core/oss/Makefile
sound/core/pcm_compat.c
sound/core/pcm_param_trace.h
sound/core/pcm_trace.h
sound/core/seq/Makefile
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_lock.c
sound/core/seq/seq_lock.h
sound/core/seq/seq_ports.c
sound/core/seq/seq_virmidi.c
sound/core/timer_compat.c
sound/core/vmaster.c
sound/drivers/Makefile
sound/drivers/opl3/Makefile
sound/drivers/opl4/Makefile
sound/drivers/pcsp/pcsp.h
sound/drivers/pcsp/pcsp_input.h
sound/drivers/pcsp/pcsp_lib.c
sound/drivers/pcsp/pcsp_mixer.c
sound/firewire/Makefile
sound/firewire/amdtp-am824.h
sound/firewire/amdtp-stream.h
sound/firewire/bebob/Makefile
sound/firewire/cmp.h
sound/firewire/dice/dice-interface.h
sound/firewire/fcp.h
sound/firewire/iso-resources.h
sound/firewire/lib.h
sound/firewire/motu/Makefile
sound/firewire/packets-buffer.h
sound/hda/Makefile
sound/hda/hdac_controller.c
sound/hda/hdac_sysfs.c
sound/hda/local.h
sound/hda/trace.h
sound/i2c/Makefile
sound/i2c/other/Makefile
sound/isa/Makefile
sound/isa/gus/Makefile
sound/isa/msnd/Makefile
sound/isa/opti9xx/Makefile
sound/isa/sb/Makefile
sound/oss/Makefile
sound/oss/ad1848.h
sound/oss/bin2hex.c
sound/oss/dmasound/dmasound.h
sound/oss/hex2hex.c
sound/oss/midi_ctrl.h
sound/oss/midi_synth.h
sound/oss/mpu401.h
sound/oss/os.h
sound/oss/pas2.h
sound/oss/sb.h
sound/oss/sb_ess.c
sound/oss/sb_ess.h
sound/oss/sleep.h
sound/oss/sound_calls.h
sound/oss/sound_firmware.h
sound/oss/tuning.h
sound/oss/ulaw.h
sound/oss/v_midi.h
sound/oss/waveartist.h
sound/parisc/harmony.h
sound/pci/Makefile
sound/pci/ad1889.h
sound/pci/asihpi/hpi_version.h
sound/pci/asihpi/hpifunc.c
sound/pci/asihpi/hpioctl.c
sound/pci/au88x0/Makefile
sound/pci/au88x0/au8810.c
sound/pci/au88x0/au8810.h
sound/pci/au88x0/au8820.c
sound/pci/au88x0/au8820.h
sound/pci/au88x0/au8830.c
sound/pci/au88x0/au8830.h
sound/pci/au88x0/au88x0_eq.h
sound/pci/au88x0/au88x0_eqdata.c
sound/pci/au88x0/au88x0_mixer.c
sound/pci/au88x0/au88x0_wt.h
sound/pci/azt3328.h
sound/pci/cs5535audio/cs5535audio.h
sound/pci/ctxfi/cttimer.h
sound/pci/echoaudio/Makefile
sound/pci/echoaudio/echoaudio.c
sound/pci/emu10k1/Makefile
sound/pci/hda/Makefile
sound/pci/hda/dell_wmi_helper.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_controller_trace.h
sound/pci/hda/hda_intel_trace.h
sound/pci/hda/local.h
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/thinkpad_helper.c
sound/pci/ice1712/Makefile
sound/pci/ice1712/juli.h
sound/pci/ice1712/maya44.h
sound/pci/ice1712/prodigy192.h
sound/pci/ice1712/psc724.h
sound/pci/ice1712/quartet.h
sound/pci/ice1712/se.h
sound/pci/ice1712/stac946x.h
sound/pci/ice1712/wtm.h
sound/pci/nm256/nm256_coef.c
sound/pci/oxygen/Makefile
sound/pci/oxygen/ak4396.h
sound/pci/oxygen/cm9780.h
sound/pci/oxygen/cs2000.h
sound/pci/oxygen/cs4245.h
sound/pci/oxygen/cs4362a.h
sound/pci/oxygen/cs4398.h
sound/pci/oxygen/oxygen.h
sound/pci/oxygen/oxygen_regs.h
sound/pci/oxygen/pcm1796.h
sound/pci/oxygen/wm8766.h
sound/pci/oxygen/wm8785.h
sound/pci/oxygen/xonar.h
sound/pci/oxygen/xonar_dg.h
sound/pci/rme9652/Makefile
sound/ppc/tumbler_volume.h
sound/soc/Kconfig
sound/soc/Makefile
sound/soc/amd/acp.h
sound/soc/atmel/Makefile
sound/soc/atmel/atmel-classd.h
sound/soc/atmel/atmel-pdmic.h
sound/soc/au1x/Makefile
sound/soc/blackfin/Makefile
sound/soc/cirrus/Makefile
sound/soc/codecs/Makefile
sound/soc/codecs/adau-utils.h
sound/soc/codecs/adau1373.h
sound/soc/codecs/adau17x1.c
sound/soc/codecs/adau17x1.h
sound/soc/codecs/cs4271.h
sound/soc/codecs/es8328.h
sound/soc/codecs/hdac_hdmi.c
sound/soc/codecs/hdac_hdmi.h
sound/soc/codecs/inno_rk3036.h
sound/soc/codecs/max98090.c
sound/soc/codecs/msm8916-wcd-analog.c
sound/soc/codecs/msm8916-wcd-digital.c
sound/soc/codecs/rt5514-spi.c
sound/soc/codecs/rt5514-spi.h
sound/soc/codecs/rt5514.c
sound/soc/codecs/rt5514.h
sound/soc/codecs/rt5616.c
sound/soc/codecs/rt5631.h
sound/soc/codecs/rt5659.c
sound/soc/codecs/rt5663.c
sound/soc/codecs/tlv320aic26.h
sound/soc/codecs/uda134x.h
sound/soc/codecs/wm8993.h
sound/soc/codecs/wm8998.c
sound/soc/codecs/wm9713.h
sound/soc/davinci/Makefile
sound/soc/davinci/davinci-mcasp.c
sound/soc/fsl/Makefile
sound/soc/fsl/imx-audmux.h
sound/soc/fsl/mpc5200_dma.h
sound/soc/generic/Makefile
sound/soc/img/Makefile
sound/soc/intel/Kconfig
sound/soc/intel/Makefile
sound/soc/intel/atom/Makefile
sound/soc/intel/atom/sst-mfld-platform-compress.c
sound/soc/intel/atom/sst-mfld-platform.h
sound/soc/intel/atom/sst/Makefile
sound/soc/intel/atom/sst/sst_acpi.c
sound/soc/intel/atom/sst/sst_loader.c
sound/soc/intel/atom/sst/sst_stream.c
sound/soc/intel/boards/Kconfig [new file with mode: 0644]
sound/soc/intel/boards/Makefile
sound/soc/intel/boards/bxt_da7219_max98357a.c
sound/soc/intel/boards/bytcht_da7213.c
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/boards/bytcht_nocodec.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c
sound/soc/intel/boards/cht_bsw_max98090_ti.c
sound/soc/intel/boards/cht_bsw_rt5645.c
sound/soc/intel/boards/cht_bsw_rt5672.c
sound/soc/intel/boards/kbl_rt5663_max98927.c
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
sound/soc/intel/boards/skl_nau88l25_max98357a.c
sound/soc/intel/boards/skl_nau88l25_ssm4567.c
sound/soc/intel/common/Makefile
sound/soc/intel/common/soc-acpi-intel-byt-match.c [new file with mode: 0644]
sound/soc/intel/common/soc-acpi-intel-cht-match.c [new file with mode: 0644]
sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c [new file with mode: 0644]
sound/soc/intel/common/sst-acpi.c
sound/soc/intel/common/sst-acpi.h [deleted file]
sound/soc/intel/common/sst-firmware.c
sound/soc/intel/skylake/Makefile
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-nhlt.c
sound/soc/intel/skylake/skl-pcm.c
sound/soc/intel/skylake/skl-sst-utils.c
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h
sound/soc/intel/skylake/skl.c
sound/soc/intel/skylake/skl.h
sound/soc/mediatek/mt8173/Makefile
sound/soc/mxs/Makefile
sound/soc/nuc900/Makefile
sound/soc/omap/Makefile
sound/soc/pxa/Makefile
sound/soc/qcom/Makefile
sound/soc/rockchip/Makefile
sound/soc/rockchip/rockchip_i2s.c
sound/soc/samsung/Makefile
sound/soc/samsung/i2s.c
sound/soc/sh/Makefile
sound/soc/sh/rcar/adg.c
sound/soc/sh/rcar/ssi.c
sound/soc/sirf/Makefile
sound/soc/soc-acpi.c [moved from sound/soc/intel/common/sst-match-acpi.c with 63% similarity]
sound/soc/soc-compress.c
sound/soc/soc-core.c
sound/soc/soc-dapm.c
sound/soc/soc-io.c
sound/soc/soc-pcm.c
sound/soc/soc-topology.c
sound/soc/spear/Makefile
sound/soc/stm/Makefile
sound/soc/stm/stm32_sai.c
sound/soc/stm/stm32_sai_sub.c
sound/soc/sunxi/Makefile
sound/soc/sunxi/sun8i-codec.c
sound/soc/tegra/Makefile
sound/soc/txx9/Makefile
sound/soc/ux500/Makefile
sound/sparc/Makefile
sound/spi/Makefile
sound/synth/Makefile
sound/synth/emux/Makefile
sound/usb/Makefile
sound/usb/caiaq/audio.h
sound/usb/caiaq/control.h
sound/usb/caiaq/device.c
sound/usb/caiaq/device.h
sound/usb/caiaq/input.h
sound/usb/caiaq/midi.h
sound/usb/card.c
sound/usb/card.h
sound/usb/clock.h
sound/usb/debug.h
sound/usb/endpoint.h
sound/usb/format.h
sound/usb/helper.h
sound/usb/line6/Makefile
sound/usb/line6/driver.c
sound/usb/line6/podhd.c
sound/usb/midi.h
sound/usb/mixer.c
sound/usb/mixer.h
sound/usb/mixer_quirks.h
sound/usb/mixer_scarlett.h
sound/usb/mixer_us16x08.h
sound/usb/pcm.h
sound/usb/power.h
sound/usb/proc.h
sound/usb/quirks.c
sound/usb/quirks.h
sound/usb/stream.h
sound/usb/usx2y/Makefile
sound/usb/usx2y/us122l.h
sound/usb/usx2y/usX2Yhwdep.h
sound/usb/usx2y/usb_stream.c
sound/usb/usx2y/usb_stream.h
sound/usb/usx2y/usbusx2y.h
sound/usb/usx2y/usx2yhwdeppcm.h
tools/Makefile
tools/accounting/Makefile
tools/accounting/getdelays.c
tools/arch/alpha/include/asm/barrier.h
tools/arch/alpha/include/uapi/asm/bitsperlong.h
tools/arch/alpha/include/uapi/asm/mman.h
tools/arch/arc/include/uapi/asm/mman.h
tools/arch/arm/include/uapi/asm/kvm.h
tools/arch/arm/include/uapi/asm/mman.h
tools/arch/arm/include/uapi/asm/perf_regs.h
tools/arch/arm64/include/asm/barrier.h
tools/arch/arm64/include/uapi/asm/bitsperlong.h
tools/arch/arm64/include/uapi/asm/kvm.h
tools/arch/arm64/include/uapi/asm/mman.h
tools/arch/arm64/include/uapi/asm/perf_regs.h
tools/arch/frv/include/uapi/asm/bitsperlong.h
tools/arch/frv/include/uapi/asm/mman.h
tools/arch/h8300/include/asm/bitsperlong.h
tools/arch/h8300/include/uapi/asm/mman.h
tools/arch/hexagon/include/uapi/asm/bitsperlong.h
tools/arch/hexagon/include/uapi/asm/mman.h
tools/arch/ia64/include/asm/barrier.h
tools/arch/ia64/include/uapi/asm/bitsperlong.h
tools/arch/ia64/include/uapi/asm/mman.h
tools/arch/m32r/include/uapi/asm/bitsperlong.h
tools/arch/m32r/include/uapi/asm/mman.h
tools/arch/microblaze/include/uapi/asm/bitsperlong.h
tools/arch/microblaze/include/uapi/asm/mman.h
tools/arch/mips/include/asm/barrier.h
tools/arch/mips/include/uapi/asm/bitsperlong.h
tools/arch/mips/include/uapi/asm/kvm.h
tools/arch/mips/include/uapi/asm/mman.h
tools/arch/mn10300/include/uapi/asm/mman.h
tools/arch/parisc/include/uapi/asm/bitsperlong.h
tools/arch/parisc/include/uapi/asm/mman.h
tools/arch/powerpc/include/asm/barrier.h
tools/arch/powerpc/include/uapi/asm/bitsperlong.h
tools/arch/powerpc/include/uapi/asm/kvm.h
tools/arch/powerpc/include/uapi/asm/mman.h
tools/arch/powerpc/include/uapi/asm/perf_regs.h
tools/arch/s390/include/asm/barrier.h
tools/arch/s390/include/uapi/asm/bitsperlong.h
tools/arch/s390/include/uapi/asm/kvm.h
tools/arch/s390/include/uapi/asm/kvm_perf.h
tools/arch/s390/include/uapi/asm/mman.h
tools/arch/s390/include/uapi/asm/sie.h
tools/arch/score/include/uapi/asm/bitsperlong.h
tools/arch/score/include/uapi/asm/mman.h
tools/arch/sh/include/asm/barrier.h
tools/arch/sh/include/uapi/asm/mman.h
tools/arch/sparc/include/asm/barrier.h
tools/arch/sparc/include/asm/barrier_32.h
tools/arch/sparc/include/asm/barrier_64.h
tools/arch/sparc/include/uapi/asm/bitsperlong.h
tools/arch/sparc/include/uapi/asm/mman.h
tools/arch/tile/include/asm/barrier.h
tools/arch/tile/include/uapi/asm/bitsperlong.h
tools/arch/tile/include/uapi/asm/mman.h
tools/arch/x86/include/asm/atomic.h
tools/arch/x86/include/asm/barrier.h
tools/arch/x86/include/asm/cmpxchg.h
tools/arch/x86/include/asm/cpufeatures.h
tools/arch/x86/include/asm/disabled-features.h
tools/arch/x86/include/asm/rmwcc.h
tools/arch/x86/include/asm/unistd_32.h
tools/arch/x86/include/asm/unistd_64.h
tools/arch/x86/include/uapi/asm/bitsperlong.h
tools/arch/x86/include/uapi/asm/kvm.h
tools/arch/x86/include/uapi/asm/kvm_perf.h
tools/arch/x86/include/uapi/asm/mman.h
tools/arch/x86/include/uapi/asm/perf_regs.h
tools/arch/x86/include/uapi/asm/svm.h
tools/arch/x86/include/uapi/asm/unistd.h
tools/arch/x86/include/uapi/asm/vmx.h
tools/arch/x86/lib/memcpy_64.S
tools/arch/x86/lib/memset_64.S
tools/arch/xtensa/include/uapi/asm/mman.h
tools/build/Makefile
tools/build/Makefile.build
tools/build/feature/Makefile
tools/build/feature/test-all.c
tools/build/feature/test-backtrace.c
tools/build/feature/test-bionic.c
tools/build/feature/test-bpf.c
tools/build/feature/test-clang.cpp
tools/build/feature/test-compile.c
tools/build/feature/test-cplus-demangle.c
tools/build/feature/test-cxx.cpp
tools/build/feature/test-dwarf.c
tools/build/feature/test-dwarf_getlocations.c
tools/build/feature/test-get_cpuid.c
tools/build/feature/test-glibc.c
tools/build/feature/test-gtk2-infobar.c
tools/build/feature/test-gtk2.c
tools/build/feature/test-jvmti.c
tools/build/feature/test-libaudit.c
tools/build/feature/test-libbabeltrace.c
tools/build/feature/test-libbfd.c
tools/build/feature/test-libcrypto.c
tools/build/feature/test-libdw-dwarf-unwind.c
tools/build/feature/test-libelf-gelf_getnote.c
tools/build/feature/test-libelf-getphdrnum.c
tools/build/feature/test-libelf-getshdrstrndx.c
tools/build/feature/test-libelf-mmap.c
tools/build/feature/test-libelf.c
tools/build/feature/test-libnuma.c
tools/build/feature/test-libperl.c
tools/build/feature/test-libpython-version.c
tools/build/feature/test-libpython.c
tools/build/feature/test-libslang.c
tools/build/feature/test-libunwind-aarch64.c
tools/build/feature/test-libunwind-arm.c
tools/build/feature/test-libunwind-debug-frame-aarch64.c
tools/build/feature/test-libunwind-debug-frame-arm.c
tools/build/feature/test-libunwind-debug-frame.c
tools/build/feature/test-libunwind-x86.c
tools/build/feature/test-libunwind-x86_64.c
tools/build/feature/test-libunwind.c
tools/build/feature/test-llvm-version.cpp
tools/build/feature/test-llvm.cpp
tools/build/feature/test-lzma.c
tools/build/feature/test-numa_num_possible_cpus.c
tools/build/feature/test-pthread-attr-setaffinity-np.c
tools/build/feature/test-sched_getcpu.c
tools/build/feature/test-sdt.c
tools/build/feature/test-stackprotector-all.c
tools/build/feature/test-sync-compare-and-swap.c
tools/build/feature/test-timerfd.c
tools/build/feature/test-zlib.c
tools/build/fixdep.c
tools/build/tests/ex/Makefile
tools/build/tests/ex/a.c
tools/build/tests/ex/arch/e.c
tools/build/tests/ex/arch/f.c
tools/build/tests/ex/b.c
tools/build/tests/ex/c.c
tools/build/tests/ex/d.c
tools/build/tests/ex/ex.c
tools/build/tests/ex/inc.c
tools/build/tests/run.sh
tools/cgroup/Makefile
tools/cgroup/cgroup_event_listener.c
tools/firewire/Makefile
tools/firewire/decode-fcp.c
tools/firewire/list.h
tools/firewire/nosy-dump.h
tools/gpio/Makefile
tools/hv/Makefile
tools/hv/hv_get_dhcp_info.sh
tools/hv/hv_set_ifconfig.sh
tools/hv/lsvmbus
tools/iio/Makefile
tools/include/asm-generic/atomic-gcc.h
tools/include/asm-generic/bitops.h
tools/include/asm-generic/bitops/__ffs.h
tools/include/asm-generic/bitops/__fls.h
tools/include/asm-generic/bitops/arch_hweight.h
tools/include/asm-generic/bitops/atomic.h
tools/include/asm-generic/bitops/const_hweight.h
tools/include/asm-generic/bitops/find.h
tools/include/asm-generic/bitops/fls.h
tools/include/asm-generic/bitops/fls64.h
tools/include/asm-generic/bitops/hweight.h
tools/include/asm-generic/bitsperlong.h
tools/include/asm-generic/hugetlb_encode.h [new file with mode: 0644]
tools/include/asm/alternative-asm.h
tools/include/asm/atomic.h
tools/include/asm/barrier.h
tools/include/asm/bug.h
tools/include/asm/export.h [new file with mode: 0644]
tools/include/linux/atomic.h
tools/include/linux/bitmap.h
tools/include/linux/bitops.h
tools/include/linux/bug.h
tools/include/linux/compiler-gcc.h
tools/include/linux/compiler.h
tools/include/linux/debug_locks.h
tools/include/linux/err.h
tools/include/linux/filter.h
tools/include/linux/hardirq.h
tools/include/linux/hashtable.h
tools/include/linux/irqflags.h
tools/include/linux/kallsyms.h
tools/include/linux/kern_levels.h
tools/include/linux/kernel.h
tools/include/linux/kmemcheck.h
tools/include/linux/list.h
tools/include/linux/lockdep.h
tools/include/linux/module.h
tools/include/linux/poison.h
tools/include/linux/rcu.h
tools/include/linux/refcount.h
tools/include/linux/spinlock.h
tools/include/linux/stacktrace.h
tools/include/linux/string.h
tools/include/linux/stringify.h
tools/include/linux/time64.h
tools/include/linux/types.h
tools/include/linux/unaligned/packed_struct.h
tools/include/tools/be_byteshift.h
tools/include/tools/endian.h
tools/include/tools/le_byteshift.h
tools/include/uapi/asm-generic/ioctls.h
tools/include/uapi/asm-generic/mman-common.h
tools/include/uapi/asm-generic/mman.h
tools/include/uapi/drm/drm.h
tools/include/uapi/drm/i915_drm.h
tools/include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf_common.h
tools/include/uapi/linux/fcntl.h
tools/include/uapi/linux/hw_breakpoint.h
tools/include/uapi/linux/kvm.h
tools/include/uapi/linux/mman.h
tools/include/uapi/linux/perf_event.h
tools/include/uapi/linux/sched.h
tools/include/uapi/linux/stat.h
tools/include/uapi/linux/vhost.h
tools/include/uapi/sound/asound.h
tools/kvm/kvm_stat/Makefile
tools/laptop/dslm/Makefile
tools/laptop/freefall/Makefile
tools/leds/Makefile
tools/leds/led_hw_brightness_mon.c
tools/leds/uledmon.c
tools/lib/api/Makefile
tools/lib/api/cpu.c
tools/lib/api/cpu.h
tools/lib/api/debug-internal.h
tools/lib/api/debug.c
tools/lib/api/debug.h
tools/lib/api/fd/array.h
tools/lib/api/fs/fs.c
tools/lib/api/fs/fs.h
tools/lib/api/fs/tracing_path.c
tools/lib/api/fs/tracing_path.h
tools/lib/bpf/Makefile
tools/lib/hweight.c
tools/lib/lockdep/Makefile
tools/lib/lockdep/common.c
tools/lib/lockdep/include/liblockdep/common.h
tools/lib/lockdep/include/liblockdep/mutex.h
tools/lib/lockdep/include/liblockdep/rwlock.h
tools/lib/lockdep/lockdep.c
tools/lib/lockdep/preload.c
tools/lib/lockdep/run_tests.sh
tools/lib/lockdep/tests/AA.c
tools/lib/lockdep/tests/ABA.c
tools/lib/lockdep/tests/ABBA.c
tools/lib/lockdep/tests/ABBA_2threads.c
tools/lib/lockdep/tests/ABBCCA.c
tools/lib/lockdep/tests/ABBCCDDA.c
tools/lib/lockdep/tests/ABCABC.c
tools/lib/lockdep/tests/ABCDBCDA.c
tools/lib/lockdep/tests/ABCDBDDA.c
tools/lib/lockdep/tests/WW.c
tools/lib/lockdep/tests/common.h
tools/lib/lockdep/tests/unlock_balance.c
tools/lib/str_error_r.c
tools/lib/string.c
tools/lib/subcmd/Makefile
tools/lib/subcmd/exec-cmd.c
tools/lib/subcmd/exec-cmd.h
tools/lib/subcmd/help.c
tools/lib/subcmd/help.h
tools/lib/subcmd/pager.c
tools/lib/subcmd/pager.h
tools/lib/subcmd/parse-options.c
tools/lib/subcmd/parse-options.h
tools/lib/subcmd/run-command.c
tools/lib/subcmd/run-command.h
tools/lib/subcmd/sigchain.c
tools/lib/subcmd/sigchain.h
tools/lib/subcmd/subcmd-config.c
tools/lib/subcmd/subcmd-config.h
tools/lib/subcmd/subcmd-util.h
tools/lib/symbol/kallsyms.c
tools/lib/symbol/kallsyms.h
tools/lib/traceevent/Makefile
tools/lib/traceevent/plugin_cfg80211.c
tools/lib/traceevent/plugin_scsi.c
tools/lib/traceevent/plugin_xen.c
tools/lib/vsprintf.c
tools/net/Makefile
tools/nfsd/inject_fault.sh
tools/objtool/Documentation/stack-validation.txt
tools/objtool/Makefile
tools/objtool/arch/x86/decode.c
tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk
tools/objtool/check.c
tools/objtool/elf.c
tools/pci/pcitest.sh
tools/pcmcia/Makefile
tools/perf/Documentation/perf-record.txt
tools/perf/MANIFEST
tools/perf/Makefile
tools/perf/arch/arm/annotate/instructions.c
tools/perf/arch/arm/include/dwarf-regs-table.h
tools/perf/arch/arm/include/perf_regs.h
tools/perf/arch/arm/tests/dwarf-unwind.c
tools/perf/arch/arm/tests/regs_load.S
tools/perf/arch/arm/util/unwind-libdw.c
tools/perf/arch/arm/util/unwind-libunwind.c
tools/perf/arch/arm64/Makefile
tools/perf/arch/arm64/annotate/instructions.c
tools/perf/arch/arm64/include/dwarf-regs-table.h
tools/perf/arch/arm64/include/perf_regs.h
tools/perf/arch/arm64/tests/dwarf-unwind.c
tools/perf/arch/arm64/tests/regs_load.S
tools/perf/arch/arm64/util/unwind-libunwind.c
tools/perf/arch/common.c
tools/perf/arch/common.h
tools/perf/arch/powerpc/Makefile
tools/perf/arch/powerpc/annotate/instructions.c
tools/perf/arch/powerpc/include/arch-tests.h
tools/perf/arch/powerpc/include/dwarf-regs-table.h
tools/perf/arch/powerpc/include/perf_regs.h
tools/perf/arch/powerpc/tests/arch-tests.c
tools/perf/arch/powerpc/tests/dwarf-unwind.c
tools/perf/arch/powerpc/tests/regs_load.S
tools/perf/arch/powerpc/util/book3s_hcalls.h
tools/perf/arch/powerpc/util/book3s_hv_exits.h
tools/perf/arch/powerpc/util/header.c
tools/perf/arch/powerpc/util/kvm-stat.c
tools/perf/arch/powerpc/util/perf_regs.c
tools/perf/arch/powerpc/util/unwind-libdw.c
tools/perf/arch/s390/annotate/instructions.c
tools/perf/arch/s390/include/dwarf-regs-table.h
tools/perf/arch/s390/util/Build
tools/perf/arch/s390/util/dwarf-regs.c
tools/perf/arch/s390/util/machine.c
tools/perf/arch/s390/util/sym-handling.c [deleted file]
tools/perf/arch/sh/include/dwarf-regs-table.h
tools/perf/arch/sparc/include/dwarf-regs-table.h
tools/perf/arch/x86/Makefile
tools/perf/arch/x86/annotate/instructions.c
tools/perf/arch/x86/entry/syscalls/syscalltbl.sh
tools/perf/arch/x86/include/arch-tests.h
tools/perf/arch/x86/include/dwarf-regs-table.h
tools/perf/arch/x86/include/perf_regs.h
tools/perf/arch/x86/tests/arch-tests.c
tools/perf/arch/x86/tests/dwarf-unwind.c
tools/perf/arch/x86/tests/insn-x86-dat-32.c
tools/perf/arch/x86/tests/insn-x86-dat-64.c
tools/perf/arch/x86/tests/insn-x86-dat-src.c
tools/perf/arch/x86/tests/insn-x86.c
tools/perf/arch/x86/tests/intel-cqm.c
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/arch/x86/tests/rdpmc.c
tools/perf/arch/x86/tests/regs_load.S
tools/perf/arch/x86/util/group.c
tools/perf/arch/x86/util/header.c
tools/perf/arch/x86/util/kvm-stat.c
tools/perf/arch/x86/util/perf_regs.c
tools/perf/arch/x86/util/pmu.c
tools/perf/arch/x86/util/tsc.c
tools/perf/arch/x86/util/unwind-libdw.c
tools/perf/arch/x86/util/unwind-libunwind.c
tools/perf/arch/xtensa/include/dwarf-regs-table.h
tools/perf/bench/bench.h
tools/perf/bench/futex-hash.c
tools/perf/bench/futex-lock-pi.c
tools/perf/bench/futex-requeue.c
tools/perf/bench/futex-wake-parallel.c
tools/perf/bench/futex-wake.c
tools/perf/bench/futex.h
tools/perf/bench/mem-functions.c
tools/perf/bench/mem-memcpy-arch.h
tools/perf/bench/mem-memcpy-x86-64-asm-def.h
tools/perf/bench/mem-memcpy-x86-64-asm.S
tools/perf/bench/mem-memset-arch.h
tools/perf/bench/mem-memset-x86-64-asm-def.h
tools/perf/bench/mem-memset-x86-64-asm.S
tools/perf/bench/numa.c
tools/perf/bench/sched-messaging.c
tools/perf/bench/sched-pipe.c
tools/perf/builtin-annotate.c
tools/perf/builtin-bench.c
tools/perf/builtin-buildid-cache.c
tools/perf/builtin-buildid-list.c
tools/perf/builtin-c2c.c
tools/perf/builtin-config.c
tools/perf/builtin-data.c
tools/perf/builtin-diff.c
tools/perf/builtin-evlist.c
tools/perf/builtin-help.c
tools/perf/builtin-inject.c
tools/perf/builtin-kmem.c
tools/perf/builtin-kvm.c
tools/perf/builtin-list.c
tools/perf/builtin-lock.c
tools/perf/builtin-mem.c
tools/perf/builtin-record.c
tools/perf/builtin-report.c
tools/perf/builtin-sched.c
tools/perf/builtin-script.c
tools/perf/builtin-version.c
tools/perf/builtin.h
tools/perf/check-headers.sh
tools/perf/jvmti/jvmti_agent.h
tools/perf/jvmti/libjvmti.c
tools/perf/perf-archive.sh
tools/perf/perf-completion.sh
tools/perf/perf-read-vdso.c
tools/perf/perf-sys.h
tools/perf/perf.c
tools/perf/perf.h
tools/perf/pmu-events/jevents.h
tools/perf/pmu-events/jsmn.h
tools/perf/pmu-events/json.h
tools/perf/pmu-events/pmu-events.h
tools/perf/python/tracepoint.py
tools/perf/scripts/perl/Perf-Trace-Util/Makefile.PL
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
tools/perf/scripts/python/event_analyzing_sample.py
tools/perf/scripts/python/net_dropmonitor.py
tools/perf/scripts/python/netdev-times.py
tools/perf/scripts/python/stackcollapse.py
tools/perf/scripts/python/stat-cpi.py
tools/perf/tests/attr.c
tools/perf/tests/attr.py
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bitmap.c
tools/perf/tests/bp_signal.c
tools/perf/tests/bp_signal_overflow.c
tools/perf/tests/builtin-test.c
tools/perf/tests/clang.c
tools/perf/tests/code-reading.c
tools/perf/tests/cpumap.c
tools/perf/tests/dso-data.c
tools/perf/tests/dwarf-unwind.c
tools/perf/tests/event-times.c
tools/perf/tests/event_update.c
tools/perf/tests/evsel-roundtrip-name.c
tools/perf/tests/evsel-tp-sched.c
tools/perf/tests/expr.c
tools/perf/tests/fdarray.c
tools/perf/tests/hists_common.c
tools/perf/tests/hists_common.h
tools/perf/tests/hists_cumulate.c
tools/perf/tests/hists_filter.c
tools/perf/tests/hists_link.c
tools/perf/tests/hists_output.c
tools/perf/tests/is_printable_array.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/kmod-path.c
tools/perf/tests/llvm.c
tools/perf/tests/llvm.h
tools/perf/tests/mmap-basic.c
tools/perf/tests/mmap-thread-lookup.c
tools/perf/tests/openat-syscall-all-cpus.c
tools/perf/tests/openat-syscall-tp-fields.c
tools/perf/tests/openat-syscall.c
tools/perf/tests/parse-events.c
tools/perf/tests/parse-no-sample-id-all.c
tools/perf/tests/perf-hooks.c
tools/perf/tests/perf-record.c
tools/perf/tests/perf-targz-src-pkg
tools/perf/tests/pmu.c
tools/perf/tests/python-use.c
tools/perf/tests/sample-parsing.c
tools/perf/tests/sdt.c
tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
tools/perf/tests/stat.c
tools/perf/tests/sw-clock.c
tools/perf/tests/switch-tracking.c
tools/perf/tests/task-exit.c
tools/perf/tests/tests.h
tools/perf/tests/thread-map.c
tools/perf/tests/thread-mg-share.c
tools/perf/tests/topology.c
tools/perf/tests/unit_number__scnprintf.c
tools/perf/tests/vmlinux-kallsyms.c
tools/perf/trace/beauty/beauty.h
tools/perf/trace/beauty/eventfd.c
tools/perf/trace/beauty/flock.c
tools/perf/trace/beauty/futex_op.c
tools/perf/trace/beauty/mmap.c
tools/perf/trace/beauty/mode_t.c
tools/perf/trace/beauty/msg_flags.c
tools/perf/trace/beauty/open_flags.c
tools/perf/trace/beauty/perf_event_open.c
tools/perf/trace/beauty/pid.c
tools/perf/trace/beauty/sched_policy.c
tools/perf/trace/beauty/seccomp.c
tools/perf/trace/beauty/signum.c
tools/perf/trace/beauty/socket_type.c
tools/perf/trace/beauty/waitid_options.c
tools/perf/ui/browser.c
tools/perf/ui/browser.h
tools/perf/ui/browsers/annotate.c
tools/perf/ui/browsers/header.c
tools/perf/ui/browsers/hists.c
tools/perf/ui/browsers/hists.h
tools/perf/ui/browsers/map.c
tools/perf/ui/browsers/map.h
tools/perf/ui/browsers/scripts.c
tools/perf/ui/gtk/annotate.c
tools/perf/ui/gtk/browser.c
tools/perf/ui/gtk/gtk.h
tools/perf/ui/gtk/helpline.c
tools/perf/ui/gtk/hists.c
tools/perf/ui/gtk/progress.c
tools/perf/ui/gtk/setup.c
tools/perf/ui/gtk/util.c
tools/perf/ui/helpline.c
tools/perf/ui/helpline.h
tools/perf/ui/hist.c
tools/perf/ui/keysyms.h
tools/perf/ui/libslang.h
tools/perf/ui/progress.c
tools/perf/ui/progress.h
tools/perf/ui/setup.c
tools/perf/ui/stdio/hist.c
tools/perf/ui/tui/helpline.c
tools/perf/ui/tui/progress.c
tools/perf/ui/tui/setup.c
tools/perf/ui/tui/tui.h
tools/perf/ui/tui/util.c
tools/perf/ui/ui.h
tools/perf/ui/util.c
tools/perf/ui/util.h
tools/perf/util/PERF-VERSION-GEN
tools/perf/util/annotate.c
tools/perf/util/annotate.h
tools/perf/util/block-range.c
tools/perf/util/block-range.h
tools/perf/util/bpf-loader.c
tools/perf/util/bpf-loader.h
tools/perf/util/bpf-prologue.c
tools/perf/util/bpf-prologue.h
tools/perf/util/build-id.c
tools/perf/util/build-id.h
tools/perf/util/c++/clang-c.h
tools/perf/util/c++/clang-test.cpp
tools/perf/util/c++/clang.cpp
tools/perf/util/c++/clang.h
tools/perf/util/cache.h
tools/perf/util/callchain.c
tools/perf/util/callchain.h
tools/perf/util/cgroup.c
tools/perf/util/cgroup.h
tools/perf/util/cloexec.c
tools/perf/util/cloexec.h
tools/perf/util/color.c
tools/perf/util/color.h
tools/perf/util/comm.c
tools/perf/util/comm.h
tools/perf/util/compress.h
tools/perf/util/config.c
tools/perf/util/config.h
tools/perf/util/counts.c
tools/perf/util/counts.h
tools/perf/util/cpumap.c
tools/perf/util/cpumap.h
tools/perf/util/ctype.c
tools/perf/util/data-convert-bt.h
tools/perf/util/data-convert.h
tools/perf/util/data.c
tools/perf/util/data.h
tools/perf/util/debug.c
tools/perf/util/debug.h
tools/perf/util/demangle-java.c
tools/perf/util/demangle-java.h
tools/perf/util/demangle-rust.c
tools/perf/util/demangle-rust.h
tools/perf/util/dso.c
tools/perf/util/dso.h
tools/perf/util/dump-insn.c
tools/perf/util/dump-insn.h
tools/perf/util/dwarf-regs.c
tools/perf/util/env.c
tools/perf/util/env.h
tools/perf/util/event.c
tools/perf/util/event.h
tools/perf/util/evlist.h
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/evsel_fprintf.c
tools/perf/util/expr.h
tools/perf/util/find-vdso-map.c
tools/perf/util/genelf.h
tools/perf/util/generate-cmdlist.sh
tools/perf/util/group.h
tools/perf/util/header.c
tools/perf/util/header.h
tools/perf/util/help-unknown-cmd.c
tools/perf/util/hist.c
tools/perf/util/hist.h
tools/perf/util/include/asm/asm-offsets.h
tools/perf/util/include/asm/cpufeature.h
tools/perf/util/include/asm/dwarf2.h
tools/perf/util/include/asm/uaccess.h
tools/perf/util/include/dwarf-regs.h
tools/perf/util/include/linux/linkage.h
tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
tools/perf/util/intlist.h
tools/perf/util/jit.h
tools/perf/util/jitdump.c
tools/perf/util/kvm-stat.h
tools/perf/util/levenshtein.c
tools/perf/util/levenshtein.h
tools/perf/util/libunwind/arm64.c
tools/perf/util/libunwind/x86_32.c
tools/perf/util/llvm-utils.c
tools/perf/util/llvm-utils.h
tools/perf/util/lzma.c
tools/perf/util/machine.c
tools/perf/util/machine.h
tools/perf/util/map.c
tools/perf/util/map.h
tools/perf/util/mem-events.c
tools/perf/util/mem-events.h
tools/perf/util/memswap.c
tools/perf/util/memswap.h
tools/perf/util/ordered-events.c
tools/perf/util/ordered-events.h
tools/perf/util/parse-branch-options.c
tools/perf/util/parse-branch-options.h
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/parse-events.l
tools/perf/util/parse-regs-options.c
tools/perf/util/parse-regs-options.h
tools/perf/util/path.c
tools/perf/util/path.h
tools/perf/util/perf-hooks.c
tools/perf/util/perf-hooks.h
tools/perf/util/perf_regs.c
tools/perf/util/perf_regs.h
tools/perf/util/pmu.c
tools/perf/util/pmu.h
tools/perf/util/print_binary.c
tools/perf/util/print_binary.h
tools/perf/util/probe-event.h
tools/perf/util/probe-file.h
tools/perf/util/probe-finder.h
tools/perf/util/pstack.c
tools/perf/util/pstack.h
tools/perf/util/python.c
tools/perf/util/quote.c
tools/perf/util/quote.h
tools/perf/util/rb_resort.h
tools/perf/util/rblist.h
tools/perf/util/record.c
tools/perf/util/sane_ctype.h
tools/perf/util/session.c
tools/perf/util/session.h
tools/perf/util/sort.c
tools/perf/util/sort.h
tools/perf/util/srcline.c
tools/perf/util/srcline.h
tools/perf/util/stat-shadow.c
tools/perf/util/stat.c
tools/perf/util/stat.h
tools/perf/util/strbuf.c
tools/perf/util/strbuf.h
tools/perf/util/strfilter.c
tools/perf/util/strfilter.h
tools/perf/util/string.c
tools/perf/util/string2.h
tools/perf/util/strlist.h
tools/perf/util/svghelper.h
tools/perf/util/symbol-elf.c
tools/perf/util/symbol-minimal.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h
tools/perf/util/symbol_fprintf.c
tools/perf/util/syscalltbl.c
tools/perf/util/syscalltbl.h
tools/perf/util/target.h
tools/perf/util/term.c
tools/perf/util/term.h
tools/perf/util/thread.c
tools/perf/util/thread.h
tools/perf/util/thread_map.c
tools/perf/util/thread_map.h
tools/perf/util/time-utils.c
tools/perf/util/time-utils.h
tools/perf/util/tool.h
tools/perf/util/top.h
tools/perf/util/trace-event.c
tools/perf/util/trace-event.h
tools/perf/util/trigger.h
tools/perf/util/tsc.c
tools/perf/util/tsc.h
tools/perf/util/units.c
tools/perf/util/units.h
tools/perf/util/unwind-libdw.c
tools/perf/util/unwind-libdw.h
tools/perf/util/unwind-libunwind-local.c
tools/perf/util/unwind-libunwind.c
tools/perf/util/unwind.h
tools/perf/util/usage.c
tools/perf/util/util-cxx.h
tools/perf/util/util.c
tools/perf/util/util.h
tools/perf/util/values.c
tools/perf/util/values.h
tools/perf/util/vdso.c
tools/perf/util/vdso.h
tools/perf/util/xyarray.c
tools/perf/util/xyarray.h
tools/perf/util/zlib.c
tools/power/cpupower/Makefile
tools/power/cpupower/bench/Makefile
tools/power/cpupower/debug/i386/Makefile
tools/power/cpupower/debug/kernel/Makefile
tools/power/cpupower/debug/x86_64/Makefile
tools/power/cpupower/lib/cpuidle.h
tools/power/cpupower/lib/cpupower.h
tools/power/cpupower/lib/cpupower_intern.h
tools/power/cpupower/utils/builtin.h
tools/power/cpupower/utils/cpuidle-set.c
tools/power/cpupower/utils/helpers/amd.c
tools/power/cpupower/utils/helpers/bitmask.c
tools/power/cpupower/utils/helpers/bitmask.h
tools/power/cpupower/utils/helpers/cpuid.c
tools/power/cpupower/utils/helpers/misc.c
tools/power/cpupower/utils/helpers/msr.c
tools/power/cpupower/utils/helpers/pci.c
tools/power/cpupower/utils/helpers/sysfs.h
tools/power/cpupower/utils/version-gen.sh
tools/power/pm-graph/Makefile
tools/power/x86/turbostat/Makefile
tools/power/x86/turbostat/turbostat.c
tools/power/x86/x86_energy_perf_policy/Makefile
tools/scripts/Makefile.arch
tools/scripts/Makefile.include
tools/spi/spidev_fdx.c
tools/testing/fault-injection/failcmd.sh
tools/testing/ktest/compare-ktest-sample.pl
tools/testing/nvdimm/Kbuild
tools/testing/nvdimm/Makefile
tools/testing/nvdimm/config_check.c
tools/testing/nvdimm/test/Kbuild
tools/testing/nvdimm/test/nfit.c
tools/testing/radix-tree/Makefile
tools/testing/radix-tree/linux.c
tools/testing/radix-tree/linux/gfp.h
tools/testing/radix-tree/linux/kernel.h
tools/testing/radix-tree/linux/percpu.h
tools/testing/radix-tree/linux/preempt.h
tools/testing/radix-tree/linux/radix-tree.h
tools/testing/radix-tree/linux/rcupdate.h
tools/testing/radix-tree/linux/slab.h
tools/testing/radix-tree/main.c
tools/testing/radix-tree/regression.h
tools/testing/radix-tree/regression1.c
tools/testing/radix-tree/regression2.c
tools/testing/radix-tree/regression3.c
tools/testing/radix-tree/tag_check.c
tools/testing/radix-tree/test.c
tools/testing/radix-tree/test.h
tools/testing/selftests/Makefile
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_endian.h
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/bpf_util.h
tools/testing/selftests/bpf/include/uapi/linux/types.h
tools/testing/selftests/bpf/sockmap_verdict_prog.c
tools/testing/selftests/bpf/test_kmod.sh
tools/testing/selftests/bpf/test_lpm_map.c
tools/testing/selftests/bpf/test_maps.c
tools/testing/selftests/bpf/test_tag.c
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/breakpoints/Makefile
tools/testing/selftests/capabilities/Makefile
tools/testing/selftests/capabilities/test_execve.c
tools/testing/selftests/capabilities/validate_cap.c
tools/testing/selftests/cpu-hotplug/Makefile
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh
tools/testing/selftests/cpufreq/Makefile
tools/testing/selftests/cpufreq/cpu.sh
tools/testing/selftests/cpufreq/cpufreq.sh
tools/testing/selftests/cpufreq/governor.sh
tools/testing/selftests/cpufreq/main.sh
tools/testing/selftests/cpufreq/module.sh
tools/testing/selftests/cpufreq/special-tests.sh
tools/testing/selftests/drivers/gpu/drm_mm.sh
tools/testing/selftests/drivers/gpu/i915.sh
tools/testing/selftests/efivarfs/create-read.c
tools/testing/selftests/efivarfs/efivarfs.sh
tools/testing/selftests/efivarfs/open-unlink.c
tools/testing/selftests/exec/Makefile
tools/testing/selftests/filesystems/Makefile
tools/testing/selftests/filesystems/dnotify_test.c
tools/testing/selftests/firmware/fw_fallback.sh
tools/testing/selftests/firmware/fw_filesystem.sh
tools/testing/selftests/ftrace/Makefile
tools/testing/selftests/ftrace/test.d/00basic/basic2.tc
tools/testing/selftests/ftrace/test.d/00basic/basic3.tc
tools/testing/selftests/ftrace/test.d/event/event-enable.tc
tools/testing/selftests/ftrace/test.d/event/event-pid.tc
tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc
tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc
tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc
tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc
tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
tools/testing/selftests/ftrace/test.d/instances/instance.tc
tools/testing/selftests/ftrace/test.d/kprobe/add_and_remove.tc
tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_ftrace.tc
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc
tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_maxactive.tc
tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc
tools/testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc
tools/testing/selftests/futex/Makefile
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/gpio/Makefile
tools/testing/selftests/gpio/gpio-mockup-sysfs.sh
tools/testing/selftests/gpio/gpio-mockup.sh
tools/testing/selftests/ia64/Makefile
tools/testing/selftests/intel_pstate/Makefile
tools/testing/selftests/intel_pstate/aperf.c
tools/testing/selftests/intel_pstate/msr.c
tools/testing/selftests/intel_pstate/run.sh
tools/testing/selftests/ipc/Makefile
tools/testing/selftests/ipc/msgque.c
tools/testing/selftests/kcmp/kcmp_test.c
tools/testing/selftests/lib.mk
tools/testing/selftests/lib/bitmap.sh
tools/testing/selftests/lib/prime_numbers.sh
tools/testing/selftests/lib/printf.sh
tools/testing/selftests/locking/ww_mutex.sh
tools/testing/selftests/media_tests/Makefile
tools/testing/selftests/media_tests/bind_unbind_sample.sh
tools/testing/selftests/media_tests/open_loop_test.sh
tools/testing/selftests/membarrier/membarrier_test.c
tools/testing/selftests/memfd/Makefile
tools/testing/selftests/memfd/fuse_mnt.c
tools/testing/selftests/memfd/fuse_test.c
tools/testing/selftests/memfd/memfd_test.c
tools/testing/selftests/memfd/run_fuse_test.sh
tools/testing/selftests/memfd/run_tests.sh [changed mode: 0644->0755]
tools/testing/selftests/memory-hotplug/Makefile
tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
tools/testing/selftests/mount/Makefile
tools/testing/selftests/mount/unprivileged-remount-test.c
tools/testing/selftests/mqueue/Makefile
tools/testing/selftests/net/.gitignore
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/msg_zerocopy.c
tools/testing/selftests/net/netdevice.sh
tools/testing/selftests/net/reuseaddr_conflict.c [new file with mode: 0644]
tools/testing/selftests/net/reuseport_bpf_cpu.c
tools/testing/selftests/net/reuseport_bpf_numa.c
tools/testing/selftests/net/reuseport_dualstack.c
tools/testing/selftests/net/run_afpackettests
tools/testing/selftests/net/run_netsocktests
tools/testing/selftests/net/socket.c
tools/testing/selftests/net/test_bpf.sh
tools/testing/selftests/networking/timestamping/Makefile
tools/testing/selftests/networking/timestamping/hwtstamp_config.c
tools/testing/selftests/networking/timestamping/rxtimestamp.c
tools/testing/selftests/nsfs/owner.c
tools/testing/selftests/nsfs/pidns.c
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/benchmarks/Makefile
tools/testing/selftests/powerpc/cache_shape/Makefile
tools/testing/selftests/powerpc/copyloops/Makefile
tools/testing/selftests/powerpc/copyloops/asm/export.h
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/copyloops/validate.c
tools/testing/selftests/powerpc/dscr/Makefile
tools/testing/selftests/powerpc/include/basic_asm.h
tools/testing/selftests/powerpc/include/instructions.h
tools/testing/selftests/powerpc/math/Makefile
tools/testing/selftests/powerpc/mm/Makefile
tools/testing/selftests/powerpc/mm/hugetlb_vs_thp_test.c
tools/testing/selftests/powerpc/pmu/Makefile
tools/testing/selftests/powerpc/pmu/ebb/Makefile
tools/testing/selftests/powerpc/ptrace/Makefile
tools/testing/selftests/powerpc/signal/Makefile
tools/testing/selftests/powerpc/stringloops/Makefile
tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/stringloops/memcmp.c
tools/testing/selftests/powerpc/switch_endian/Makefile
tools/testing/selftests/powerpc/switch_endian/check.S
tools/testing/selftests/powerpc/switch_endian/common.h
tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S
tools/testing/selftests/powerpc/syscalls/ipc.h
tools/testing/selftests/powerpc/tm/Makefile
tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
tools/testing/selftests/powerpc/tm/tm-syscall-asm.S
tools/testing/selftests/powerpc/vphn/test-vphn.c
tools/testing/selftests/prctl/Makefile
tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
tools/testing/selftests/prctl/disable-tsc-test.c
tools/testing/selftests/pstore/Makefile
tools/testing/selftests/ptp/Makefile
tools/testing/selftests/ptrace/peeksiginfo.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/Makefile
tools/testing/selftests/rcutorture/formal/srcu-cbmc/include/linux/types.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/assume.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/bug_on.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/combined_source.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/include_srcu.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/int_typedefs.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/locks.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/misc.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/percpu.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/simple_sync_srcu.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/workqueues.h
tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/Makefile
tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/store_buffering/test.c
tools/testing/selftests/rcutorture/formal/srcu-cbmc/tests/test_script.sh
tools/testing/selftests/seccomp/Makefile
tools/testing/selftests/seccomp/seccomp_benchmark.c [new file with mode: 0644]
tools/testing/selftests/seccomp/seccomp_bpf.c
tools/testing/selftests/sigaltstack/sas.c
tools/testing/selftests/splice/Makefile
tools/testing/selftests/splice/default_file_splice_read.c
tools/testing/selftests/splice/default_file_splice_read.sh
tools/testing/selftests/static_keys/test_static_keys.sh
tools/testing/selftests/sync/Makefile
tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
tools/testing/selftests/tc-testing/tdc.py
tools/testing/selftests/tc-testing/tdc_batch.py [new file with mode: 0755]
tools/testing/selftests/tc-testing/tdc_config.py
tools/testing/selftests/tc-testing/tdc_helper.py
tools/testing/selftests/timers/Makefile
tools/testing/selftests/timers/set-timer-lat.c
tools/testing/selftests/user/test_user_copy.sh
tools/testing/selftests/vDSO/Makefile
tools/testing/selftests/vm/Makefile
tools/testing/selftests/vm/compaction_test.c
tools/testing/selftests/vm/hugepage-mmap.c
tools/testing/selftests/vm/hugepage-shm.c
tools/testing/selftests/vm/map_hugetlb.c
tools/testing/selftests/vm/mlock-random-test.c
tools/testing/selftests/vm/mlock2-tests.c
tools/testing/selftests/vm/mlock2.h
tools/testing/selftests/vm/on-fault-limit.c
tools/testing/selftests/vm/run_vmtests
tools/testing/selftests/vm/thuge-gen.c
tools/testing/selftests/vm/userfaultfd.c
tools/testing/selftests/watchdog/Makefile
tools/testing/selftests/watchdog/watchdog-test.c
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/ioperm.c
tools/testing/selftests/x86/iopl.c
tools/testing/selftests/x86/ldt_gdt.c
tools/testing/selftests/x86/mpx-debug.h
tools/testing/selftests/x86/mpx-dig.c
tools/testing/selftests/x86/mpx-hw.h
tools/testing/selftests/x86/mpx-mm.h
tools/testing/selftests/x86/pkey-helpers.h
tools/testing/selftests/x86/protection_keys.c
tools/testing/selftests/x86/ptrace_syscall.c
tools/testing/selftests/x86/raw_syscall_helper_32.S
tools/testing/selftests/x86/test_FCMOV.c
tools/testing/selftests/x86/test_FCOMI.c
tools/testing/selftests/x86/test_FISTTP.c
tools/testing/selftests/x86/test_vdso.c
tools/testing/selftests/zram/Makefile
tools/testing/selftests/zram/zram.sh
tools/thermal/tmon/Makefile
tools/thermal/tmon/tmon.8
tools/usb/Makefile
tools/usb/ffs-aio-example/multibuff/host_app/Makefile
tools/usb/hcd-tests.sh
tools/usb/usbip/Makefile.am
tools/usb/usbip/cleanup.sh
tools/usb/usbip/libsrc/Makefile.am
tools/usb/usbip/libsrc/list.h
tools/usb/usbip/libsrc/sysfs_utils.c
tools/usb/usbip/libsrc/sysfs_utils.h
tools/usb/usbip/libsrc/usbip_common.c
tools/usb/usbip/libsrc/usbip_common.h
tools/usb/usbip/libsrc/vhci_driver.c
tools/usb/usbip/libsrc/vhci_driver.h
tools/usb/usbip/src/Makefile.am
tools/usb/usbip/src/usbip_network.h
tools/virtio/Makefile
tools/virtio/asm/barrier.h
tools/virtio/linux/bug.h
tools/virtio/linux/compiler.h
tools/virtio/linux/dma-mapping.h
tools/virtio/linux/err.h
tools/virtio/linux/kernel.h
tools/virtio/linux/module.h
tools/virtio/linux/scatterlist.h
tools/virtio/linux/slab.h
tools/virtio/linux/uaccess.h
tools/virtio/linux/virtio.h
tools/virtio/linux/virtio_byteorder.h
tools/virtio/linux/virtio_config.h
tools/virtio/ringtest/Makefile
tools/virtio/ringtest/noring.c
tools/virtio/ringtest/ptr_ring.c
tools/virtio/ringtest/run-on-all.sh
tools/virtio/uapi/linux/virtio_ring.h
tools/virtio/virtio-trace/Makefile
tools/virtio/virtio-trace/trace-agent.h
tools/virtio/virtio_test.c
tools/virtio/vringh_test.c
tools/vm/Makefile
tools/vm/page_owner_sort.c
tools/vm/slabinfo.c
usr/Kconfig
usr/Makefile
usr/gen_init_cpio.c
usr/initramfs_data.S
virt/kvm/Kconfig
virt/kvm/arm/arm.c
virt/kvm/arm/trace.h
virt/kvm/arm/vgic/trace.h
virt/kvm/arm/vgic/vgic-its.c
virt/kvm/coalesced_mmio.c
virt/kvm/coalesced_mmio.h
virt/kvm/eventfd.c
virt/kvm/vfio.h

index 5273cfd70ad62996ba8374698fb5e22e91d33f45..4757d361fd333ee109a5c09bf825bb3a89ebf01a 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -15,6 +15,7 @@ Adriana Reus <adi.reus@gmail.com> <adriana.reus@intel.com>
 Alan Cox <alan@lxorguk.ukuu.org.uk>
 Alan Cox <root@hraefn.swansea.linux.org.uk>
 Aleksey Gorelov <aleksey_gorelov@phoenix.com>
+Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com>
 Al Viro <viro@ftp.linux.org.uk>
 Al Viro <viro@zenIV.linux.org.uk>
 Andreas Herrmann <aherrman@de.ibm.com>
@@ -43,6 +44,7 @@ Corey Minyard <minyard@acm.org>
 Damian Hobson-Garcia <dhobsong@igel.co.jp>
 David Brownell <david-b@pacbell.net>
 David Woodhouse <dwmw2@shinybook.infradead.org>
+Deng-Cheng Zhu <dengcheng.zhu@mips.com> <dengcheng.zhu@imgtec.com>
 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 Domen Puncer <domen@coderock.org>
 Douglas Gilbert <dougg@torque.net>
@@ -68,6 +70,8 @@ Jacob Shin <Jacob.Shin@amd.com>
 James Bottomley <jejb@mulgrave.(none)>
 James Bottomley <jejb@titanic.il.steeleye.com>
 James E Wilson <wilson@specifix.com>
+James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
+James Hogan <jhogan@kernel.org> <james@albanarts.com>
 James Ketrenos <jketreno@io.(none)>
 Javi Merino <javi.merino@kernel.org> <javi.merino@arm.com>
 <javier@osg.samsung.com> <javier.martinez@collabora.co.uk>
@@ -98,6 +102,7 @@ Leonid I Ananiev <leonid.i.ananiev@intel.com>
 Linas Vepstas <linas@austin.ibm.com>
 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de>
 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
+Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com>
 Mark Brown <broonie@sirena.org.uk>
 Martin Kepplinger <martink@posteo.de> <martin.kepplinger@theobroma-systems.com>
 Martin Kepplinger <martink@posteo.de> <martin.kepplinger@ginzinger.com>
@@ -112,9 +117,11 @@ Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@s-opensource.com>
 Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.com>
 Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
 Matt Ranostay <matt.ranostay@konsulko.com> <matt@ranostay.consulting>
+Matt Redfearn <matt.redfearn@mips.com> <matt.redfearn@imgtec.com>
 Mayuresh Janorkar <mayur@ti.com>
 Michael Buesch <m@bues.ch>
 Michel Dänzer <michel@tungstengraphics.com>
+Miodrag Dinic <miodrag.dinic@mips.com> <miodrag.dinic@imgtec.com>
 Mitesh shah <mshah@teja.com>
 Mohit Kumar <mohit.kumar@st.com> <mohit.kumar.dhaka@gmail.com>
 Morten Welinder <terra@gnome.org>
@@ -125,6 +132,7 @@ Mythri P K <mythripk@ti.com>
 Nguyen Anh Quynh <aquynh@gmail.com>
 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
 Patrick Mochel <mochel@digitalimplant.org>
+Paul Burton <paul.burton@mips.com> <paul.burton@imgtec.com>
 Peter A Jonsson <pj@ludd.ltu.se>
 Peter Oruba <peter@oruba.de>
 Peter Oruba <peter.oruba@amd.com>
index 33e96f74063925fb253b7ac16c73f43b76c334c8..147d4e8a140393ce06a1076183b5a4a62432c7da 100644 (file)
@@ -14,3 +14,11 @@ Description:
                Show or set the gain boost of the amp, from 0-31 range.
                18 = indoors (default)
                14 = outdoors
+
+What           /sys/bus/iio/devices/iio:deviceX/noise_level_tripped
+Date:          May 2017
+KernelVersion: 4.13
+Contact:       Matt Ranostay <matt.ranostay@konsulko.com>
+Description:
+               When 1 the noise level is over the trip level and not reporting
+               valid data
index d188afebc8ba77409785e47da76b548368ec77d2..c3afe9fab6463beb775709866f75c6f725d63337 100644 (file)
@@ -1,6 +1,6 @@
 What:          /sys/class/remoteproc/.../firmware
 Date:          October 2016
-Contact:       Matt Redfearn <matt.redfearn@imgtec.com>
+Contact:       Matt Redfearn <matt.redfearn@mips.com>
 Description:   Remote processor firmware
 
                Reports the name of the firmware currently loaded to the
@@ -11,7 +11,7 @@ Description:  Remote processor firmware
 
 What:          /sys/class/remoteproc/.../state
 Date:          October 2016
-Contact:       Matt Redfearn <matt.redfearn@imgtec.com>
+Contact:       Matt Redfearn <matt.redfearn@mips.com>
 Description:   Remote processor state
 
                Reports the state of the remote processor, which will be one of:
index 587db52084c7c21a6db250dffd9b794859d7466a..94672016c26810799328ee6a56bd7f66bf7ef73e 100644 (file)
@@ -14,13 +14,3 @@ Description: Enable/disable VMA based swap readahead.
                still used for tmpfs etc. other users.  If set to
                false, the global swap readahead algorithm will be
                used for all swappable pages.
-
-What:          /sys/kernel/mm/swap/vma_ra_max_order
-Date:          August 2017
-Contact:       Linux memory management mailing list <linux-mm@kvack.org>
-Description:   The max readahead size in order for VMA based swap readahead
-
-               VMA based swap readahead algorithm will readahead at
-               most 1 << max_order pages for each readahead.  The
-               real readahead size for each readahead will be scaled
-               according to the estimation algorithm.
index 713cab1d5f12dca9baaa68f9ca053a4ab90d7ab0..a1d1612f36519f832c2d307293527083cf025271 100644 (file)
@@ -127,7 +127,7 @@ Description:
 
 What;          /sys/power/pm_trace_dev_match
 Date:          October 2010
-Contact:       James Hogan <james@albanarts.com>
+Contact:       James Hogan <jhogan@kernel.org>
 Description:
                The /sys/power/pm_trace_dev_match file contains the name of the
                device associated with the last PM event point saved in the RTC
index 8282099e0cbf446bbebaaf63868ca04610999408..5da10184d9084a77c15e42b56f76a4571193344a 100644 (file)
@@ -352,44 +352,30 @@ Read-Copy Update (RCU)
 ----------------------
 
 .. kernel-doc:: include/linux/rcupdate.h
-   :external:
 
 .. kernel-doc:: include/linux/rcupdate_wait.h
-   :external:
 
 .. kernel-doc:: include/linux/rcutree.h
-   :external:
 
 .. kernel-doc:: kernel/rcu/tree.c
-   :external:
 
 .. kernel-doc:: kernel/rcu/tree_plugin.h
-   :external:
 
 .. kernel-doc:: kernel/rcu/tree_exp.h
-   :external:
 
 .. kernel-doc:: kernel/rcu/update.c
-   :external:
 
 .. kernel-doc:: include/linux/srcu.h
-   :external:
 
 .. kernel-doc:: kernel/rcu/srcutree.c
-   :external:
 
 .. kernel-doc:: include/linux/rculist_bl.h
-   :external:
 
 .. kernel-doc:: include/linux/rculist.h
-   :external:
 
 .. kernel-doc:: include/linux/rculist_nulls.h
-   :external:
 
 .. kernel-doc:: include/linux/rcu_sync.h
-   :external:
 
 .. kernel-doc:: kernel/rcu/sync.c
-   :external:
 
index 3943b5bfa8cffacc8b760db0f94dfce636cb957f..00a5ba51e63fb79803e01539cc9f40dcd757c9e4 100644 (file)
@@ -39,8 +39,8 @@ up.
 Although MT wq wasted a lot of resource, the level of concurrency
 provided was unsatisfactory.  The limitation was common to both ST and
 MT wq albeit less severe on MT.  Each wq maintained its own separate
-worker pool.  A MT wq could provide only one execution context per CPU
-while a ST wq one for the whole system.  Work items had to compete for
+worker pool.  An MT wq could provide only one execution context per CPU
+while an ST wq one for the whole system.  Work items had to compete for
 those very limited execution contexts leading to various problems
 including proneness to deadlocks around the single execution context.
 
@@ -151,7 +151,7 @@ Application Programming Interface (API)
 
 ``alloc_workqueue()`` allocates a wq.  The original
 ``create_*workqueue()`` functions are deprecated and scheduled for
-removal.  ``alloc_workqueue()`` takes three arguments - @``name``,
+removal.  ``alloc_workqueue()`` takes three arguments - ``@name``,
 ``@flags`` and ``@max_active``.  ``@name`` is the name of the wq and
 also used as the name of the rescuer thread if there is one.
 
@@ -197,7 +197,7 @@ resources, scheduled and executed.
   served by worker threads with elevated nice level.
 
   Note that normal and highpri worker-pools don't interact with
-  each other.  Each maintain its separate pool of workers and
+  each other.  Each maintains its separate pool of workers and
   implements concurrency management among its workers.
 
 ``WQ_CPU_INTENSIVE``
@@ -249,8 +249,8 @@ unbound worker-pools and only one work item could be active at any given
 time thus achieving the same ordering property as ST wq.
 
 In the current implementation the above configuration only guarantees
-ST behavior within a given NUMA node. Instead alloc_ordered_queue should
-be used to achieve system wide ST behavior.
+ST behavior within a given NUMA node. Instead ``alloc_ordered_queue()`` should
+be used to achieve system-wide ST behavior.
 
 
 Example Execution Scenarios
index 03a7cee6ac73a4f2dd48248196994538d81f6a4e..c15e75386a0523d5398290aa9a63cc1d9f40f45e 100644 (file)
@@ -32,8 +32,6 @@ cpufreq-stats.txt -   General description of sysfs cpufreq stats.
 
 index.txt      -       File index, Mailing list and Links (this document)
 
-intel-pstate.txt -     Intel pstate cpufreq driver specific file.
-
 pcc-cpufreq.txt -      PCC cpufreq driver specific file.
 
 
index 4a0a7469fdd7bbcd93e26ea5ae9c11e4285f7c7f..32df07e29f6860d4c1de9e3c3c63d2b4d0fc454f 100644 (file)
@@ -344,3 +344,4 @@ Version History
        (wrong raid10_copies/raid10_format sequence)
 1.11.1  Add raid4/5/6 journal write-back support via journal_mode option
 1.12.1  fix for MD deadlock between mddev_suspend() and md_write_start() available
+1.13.0  Fix dev_health status at end of "recover" (was 'a', now 'A')
index a135504c7d57148b938285919130d8dfc8fa18d3..cac24ee10b72ebc3765d29708fa27c5ae6848950 100644 (file)
@@ -32,7 +32,7 @@ Example:
                compatible = "st,stm32h743-rcc", "st,stm32-rcc";
                reg = <0x58024400 0x400>;
                #reset-cells = <1>;
-               #clock-cells = <2>;
+               #clock-cells = <1>;
                clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
 
                st,syscfg = <&pwrcfg>;
index 38d74314b7abe5c52999d77f36489a0486f222f7..b6c1afa6f02d3663fd547cb3f34b1d70d2d63049 100644 (file)
@@ -16,6 +16,10 @@ Optional properties:
        - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping
          value 0 - 120pF. This will require using the calibration data from
          the manufacturer.
+       - ams,nflwdth: Set the noise and watchdog threshold register on
+         startup. This will need to set according to the noise from the
+         MCU board, and possibly the local environment. Refer to the
+         datasheet for the threshold settings.
 
 Example:
 
@@ -27,4 +31,5 @@ as3935@0 {
        interrupt-parent = <&gpio1>;
        interrupts = <16 1>;
        ams,tuning-capacitor-pf = <80>;
+       ams,nflwdth = <0x44>;
 };
index 4c29cdab0ea5b72985168100891e2422e8dbb252..5eb108e180fa282711a4d448c8353196ae6cadf1 100644 (file)
@@ -99,7 +99,7 @@ Examples:
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                        #msi-cells = <1>;
-                       reg = <0x0 0x2c200000 0 0x200000>;
+                       reg = <0x0 0x2c200000 0 0x20000>;
                };
        };
 
@@ -124,14 +124,14 @@ Examples:
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                        #msi-cells = <1>;
-                       reg = <0x0 0x2c200000 0 0x200000>;
+                       reg = <0x0 0x2c200000 0 0x20000>;
                };
 
                gic-its@2c400000 {
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                        #msi-cells = <1>;
-                       reg = <0x0 0x2c400000 0 0x200000>;
+                       reg = <0x0 0x2c400000 0 0x20000>;
                };
 
                ppi-partitions {
index 12c5ef26ec73924566361aa2ad96710d1e12b210..fdc40e354a64dd582d86841afac520a73d6fa5f0 100644 (file)
@@ -15,11 +15,14 @@ Required properties
 
 compatible     : Must be "ams,as3645a".
 reg            : The I2C address of the device. Typically 0x30.
+#address-cells : 1
+#size-cells    : 0
 
 
-Required properties of the "flash" child node
-=============================================
+Required properties of the flash child node (0)
+===============================================
 
+reg: 0
 flash-timeout-us: Flash timeout in microseconds. The value must be in
                  the range [100000, 850000] and divisible by 50000.
 flash-max-microamp: Maximum flash current in microamperes. Has to be
@@ -33,20 +36,21 @@ ams,input-max-microamp: Maximum flash controller input current. The
                        and divisible by 50000.
 
 
-Optional properties of the "flash" child node
-=============================================
+Optional properties of the flash child node
+===========================================
 
 label          : The label of the flash LED.
 
 
-Required properties of the "indicator" child node
-=================================================
+Required properties of the indicator child node (1)
+===================================================
 
+reg: 1
 led-max-microamp: Maximum indicator current. The allowed values are
                  2500, 5000, 7500 and 10000.
 
-Optional properties of the "indicator" child node
-=================================================
+Optional properties of the indicator child node
+===============================================
 
 label          : The label of the indicator LED.
 
@@ -55,16 +59,20 @@ Example
 =======
 
        as3645a@30 {
+               #address-cells: 1
+               #size-cells: 0
                reg = <0x30>;
                compatible = "ams,as3645a";
-               flash {
+               flash@0 {
+                       reg = <0x0>;
                        flash-timeout-us = <150000>;
                        flash-max-microamp = <320000>;
                        led-max-microamp = <60000>;
                        ams,input-max-microamp = <1750000>;
                        label = "as3645a:flash";
                };
-               indicator {
+               indicator@1 {
+                       reg = <0x1>;
                        led-max-microamp = <10000>;
                        label = "as3645a:indicator";
                };
index b878a1e305af6e143a646b3473be522c82a62e8a..ed1456f5c94dda21ecaf2eebd86bcd7934d11376 100644 (file)
@@ -16,11 +16,13 @@ Required Properties:
 
 - clocks:
   Array of clocks required for SDHC.
-  Require at least input clock for Xenon IP core.
+  Require at least input clock for Xenon IP core. For Armada AP806 and
+  CP110, the AXI clock is also mandatory.
 
 - clock-names:
   Array of names corresponding to clocks property.
   The input clock for Xenon IP core should be named as "core".
+  The input clock for the AXI bus must be named as "axi".
 
 - reg:
   * For "marvell,armada-3700-sdhci", two register areas.
@@ -106,8 +108,8 @@ Example:
                compatible = "marvell,armada-ap806-sdhci";
                reg = <0xaa0000 0x1000>;
                interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>
-               clocks = <&emmc_clk>;
-               clock-names = "core";
+               clocks = <&emmc_clk>,<&axi_clk>;
+               clock-names = "core", "axi";
                bus-width = <4>;
                marvell,xenon-phy-slow-mode;
                marvell,xenon-tun-count = <11>;
@@ -126,8 +128,8 @@ Example:
                interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>
                vqmmc-supply = <&sd_vqmmc_regulator>;
                vmmc-supply = <&sd_vmmc_regulator>;
-               clocks = <&sdclk>;
-               clock-names = "core";
+               clocks = <&sdclk>, <&axi_clk>;
+               clock-names = "core", "axi";
                bus-width = <4>;
                marvell,xenon-tun-count = <9>;
        };
index 7e2dad08a12e92c1baa0290116cbd032f5bb1e88..1814fa13f6ab8078a52a32fa2a55156124d696bb 100644 (file)
@@ -21,8 +21,9 @@ Required properties:
        - main controller clock (for both armada-375-pp2 and armada-7k-pp2)
        - GOP clock (for both armada-375-pp2 and armada-7k-pp2)
        - MG clock (only for armada-7k-pp2)
-- clock-names: names of used clocks, must be "pp_clk", "gop_clk" and
-  "mg_clk" (the latter only for armada-7k-pp2).
+       - AXI clock (only for armada-7k-pp2)
+- clock-names: names of used clocks, must be "pp_clk", "gop_clk", "mg_clk"
+  and "axi_clk" (the 2 latter only for armada-7k-pp2).
 
 The ethernet ports are represented by subnodes. At least one port is
 required.
@@ -78,8 +79,9 @@ Example for marvell,armada-7k-pp2:
 cpm_ethernet: ethernet@0 {
        compatible = "marvell,armada-7k-pp22";
        reg = <0x0 0x100000>, <0x129000 0xb000>;
-       clocks = <&cpm_syscon0 1 3>, <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
-       clock-names = "pp_clk", "gop_clk", "gp_clk";
+       clocks = <&cpm_syscon0 1 3>, <&cpm_syscon0 1 9>,
+                <&cpm_syscon0 1 5>, <&cpm_syscon0 1 18>;
+       clock-names = "pp_clk", "gop_clk", "gp_clk", "axi_clk";
 
        eth0: eth0 {
                interrupts = <ICU_GRP_NSR 39 IRQ_TYPE_LEVEL_HIGH>,
index 6af8eed1adeb1429cf9bdda435ac4e7ab27c5c21..9c16ee2965a2ce756acc23d6956fedc38157144b 100644 (file)
@@ -4,6 +4,7 @@ The device node has following properties.
 
 Required properties:
  - compatible: should be "rockchip,<name>-gamc"
+   "rockchip,rk3128-gmac": found on RK312x SoCs
    "rockchip,rk3228-gmac": found on RK322x SoCs
    "rockchip,rk3288-gmac": found on RK3288 SoCs
    "rockchip,rk3328-gmac": found on RK3328 SoCs
diff --git a/Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt b/Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
new file mode 100644 (file)
index 0000000..830069b
--- /dev/null
@@ -0,0 +1,28 @@
+Binding for the Synopsys HSDK reset controller
+
+This binding uses the common reset binding[1].
+
+[1] Documentation/devicetree/bindings/reset/reset.txt
+
+Required properties:
+- compatible: should be "snps,hsdk-reset".
+- reg: should always contain 2 pairs address - length: first for reset
+  configuration register and second for corresponding SW reset and status bits
+  register.
+- #reset-cells: from common reset binding; Should always be set to 1.
+
+Example:
+       reset: reset@880 {
+               compatible = "snps,hsdk-reset";
+               #reset-cells = <1>;
+               reg = <0x8A0 0x4>, <0xFF0 0x4>;
+       };
+
+Specifying reset lines connected to IP modules:
+       ethernet@.... {
+               ....
+               resets = <&reset HSDK_V1_ETH_RESET>;
+               ....
+       };
+
+The index could be found in <dt-bindings/reset/snps,hsdk-reset.h>
index 3eca6de6369d773ef70bba048345aaed1d2737df..a65d7b71e81a2a22bfc23ab79ede461a25d2de37 100644 (file)
@@ -8,6 +8,12 @@ Required properties:
                    the firmware event log
 - linux,sml-size : size of the memory allocated for the firmware event log
 
+Optional properties:
+
+- powered-while-suspended: present when the TPM is left powered on between
+                           suspend and resume (makes the suspend/resume
+                           callbacks do nothing).
+
 Example (for OpenPower Systems with Nuvoton TPM 2.0 on I2C)
 ----------------------------------------------------------
 
index 4fc96946f81d6afc781f7007eaa9dd945f52ed52..cf504d0380aeb9d0749cc2ab1f90e2f35a781146 100644 (file)
@@ -41,6 +41,8 @@ Required properties:
     - "renesas,hscif-r8a7795" for R8A7795 (R-Car H3) HSCIF compatible UART.
     - "renesas,scif-r8a7796" for R8A7796 (R-Car M3-W) SCIF compatible UART.
     - "renesas,hscif-r8a7796" for R8A7796 (R-Car M3-W) HSCIF compatible UART.
+    - "renesas,scif-r8a77970" for R8A77970 (R-Car V3M) SCIF compatible UART.
+    - "renesas,hscif-r8a77970" for R8A77970 (R-Car V3M) HSCIF compatible UART.
     - "renesas,scif-r8a77995" for R8A77995 (R-Car D3) SCIF compatible UART.
     - "renesas,hscif-r8a77995" for R8A77995 (R-Car D3) HSCIF compatible UART.
     - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
index 1ea1fd4232ab2ac9c0e736169ef98a02e05ccf8b..1afd298eddd73147ebf6a1dcbc56bf404559cff1 100644 (file)
@@ -3,8 +3,8 @@ Device tree binding vendor prefix registry.  Keep list in alphabetical order.
 This isn't an exhaustive list, but you should add new prefixes to it before
 using them to avoid name-space collisions.
 
-abcn   Abracon Corporation
 abilis Abilis Systems
+abracon        Abracon Corporation
 actions        Actions Semiconductor Co., Ltd.
 active-semi    Active-Semi International Inc
 ad     Avionic Design GmbH
index bedd32388dac51d8a603dd1389c3b4de24807d7a..a0dc2879a152c89dbb9d5f715ec07fbfe6a4cd8e 100644 (file)
@@ -675,7 +675,7 @@ sub-domain of the parent domain.
 
 Support for power domains is provided through the :c:member:`pm_domain` field of
 |struct device|.  This field is a pointer to an object of type
-|struct dev_pm_domain|, defined in :file:`include/linux/pm.h``, providing a set
+|struct dev_pm_domain|, defined in :file:`include/linux/pm.h`, providing a set
 of power management callbacks analogous to the subsystem-level and device driver
 callbacks that are executed for the given device during all power transitions,
 instead of the respective subsystem-level callbacks.  Specifically, if a
index 4421135826a2e5fb8526288afa06473cb2137027..d661e6f7e6a0cb6b161e30ab1ad800bc8bd581f6 100644 (file)
@@ -196,12 +196,13 @@ struct driver_attribute {
 };
 
 Device drivers can export attributes via their sysfs directories. 
-Drivers can declare attributes using a DRIVER_ATTR macro that works
-identically to the DEVICE_ATTR macro. 
+Drivers can declare attributes using a DRIVER_ATTR_RW and DRIVER_ATTR_RO
+macro that works identically to the DEVICE_ATTR_RW and DEVICE_ATTR_RO
+macros.
 
 Example:
 
-DRIVER_ATTR(debug,0644,show_debug,store_debug);
+DRIVER_ATTR_RW(debug);
 
 This is equivalent to declaring:
 
index c98800df677fef0e18103415af6a0333e8c6a10a..9f4f87e1624036349533adf9534bfd3c4b08535d 100644 (file)
@@ -41,6 +41,11 @@ Igor Mammedov (DFS support)
 Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code)
 Scott Lovenberg
 Pavel Shilovsky (for great work adding SMB2 support, and various SMB3 features)
+Aurelien Aptel (for DFS SMB3 work and some key bug fixes)
+Ronnie Sahlberg (for SMB3 xattr work and bug fixes)
+Shirish Pargaonkar (for many ACL patches over the years)
+Sachin Prabhu (many bug fixes, including for reconnect, copy offload and security)
+
 
 Test case and Bug Report contributors
 -------------------------------------
index a54788405429dce03af2dd950f6dd817df0d9a56..a9da51553ba3e15049c17aecbad840eb607ef056 100644 (file)
@@ -1,10 +1,14 @@
-The CIFS VFS support for Linux supports many advanced network filesystem 
-features such as hierarchical dfs like namespace, hardlinks, locking and more.  
+This module supports the SMB3 family of advanced network protocols (as well
+as older dialects, originally called "CIFS" or SMB1).
+
+The CIFS VFS module for Linux supports many advanced network filesystem
+features such as hierarchical DFS like namespace, hardlinks, locking and more.
 It was designed to comply with the SNIA CIFS Technical Reference (which 
 supersedes the 1992 X/Open SMB Standard) as well as to perform best practice 
 practical interoperability with Windows 2000, Windows XP, Samba and equivalent 
 servers.  This code was developed in participation with the Protocol Freedom
-Information Foundation.
+Information Foundation.  CIFS and now SMB3 has now become a defacto
+standard for interoperating between Macs and Windows and major NAS appliances.
 
 Please see
   http://protocolfreedom.org/ and
@@ -15,30 +19,11 @@ for more details.
 For questions or bug reports please contact:
     sfrench@samba.org (sfrench@us.ibm.com) 
 
+See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
+
 Build instructions:
 ==================
-For Linux 2.4:
-1) Get the kernel source (e.g.from http://www.kernel.org)
-and download the cifs vfs source (see the project page
-at http://us1.samba.org/samba/Linux_CIFS_client.html)
-and change directory into the top of the kernel directory
-then patch the kernel (e.g. "patch -p1 < cifs_24.patch") 
-to add the cifs vfs to your kernel configure options if
-it has not already been added (e.g. current SuSE and UL
-users do not need to apply the cifs_24.patch since the cifs vfs is
-already in the kernel configure menu) and then
-mkdir linux/fs/cifs and then copy the current cifs vfs files from
-the cifs download to your kernel build directory e.g.
-
-       cp <cifs_download_dir>/fs/cifs/* to <kernel_download_dir>/fs/cifs
-       
-2) make menuconfig (or make xconfig)
-3) select cifs from within the network filesystem choices
-4) save and exit
-5) make dep
-6) make modules (or "make" if CIFS VFS not to be built as a module)
-
-For Linux 2.6:
+For Linux:
 1) Download the kernel (e.g. from http://www.kernel.org)
 and change directory into the top of the kernel directory tree
 (e.g. /usr/src/linux-2.5.73)
@@ -61,16 +46,13 @@ would simply type "make install").
 If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on 
 the CIFS VFS web site) copy it to the same directory in which mount.smbfs and 
 similar files reside (usually /sbin).  Although the helper software is not  
-required, mount.cifs is recommended.  Eventually the Samba 3.0 utility program 
-"net" may also be helpful since it may someday provide easier mount syntax for
-users who are used to Windows e.g.
-       net use <mount point> <UNC name or cifs URL>
+required, mount.cifs is recommended.  Most distros include a "cifs-utils"
+package that includes this utility so it is recommended to install this.
+
 Note that running the Winbind pam/nss module (logon service) on all of your
 Linux clients is useful in mapping Uids and Gids consistently across the
 domain to the proper network user.  The mount.cifs mount helper can be
-trivially built from Samba 3.0 or later source e.g. by executing:
-
-       gcc samba/source/client/mount.cifs.c -o mount.cifs
+found at cifs-utils.git on git.samba.org
 
 If cifs is built as a module, then the size and number of network buffers
 and maximum number of simultaneous requests to one server can be configured.
@@ -79,6 +61,18 @@ Changing these from their defaults is not recommended. By executing modinfo
 on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
 at module initialization time (by running insmod cifs.ko) can be seen.
 
+Recommendations
+===============
+To improve security the SMB2.1 dialect or later (usually will get SMB3) is now
+the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0"
+on mount (or vers=2.0 for Windows Vista).  Note that the CIFS (vers=1.0) is
+much older and less secure than the default dialect SMB3 which includes
+many advanced security features such as downgrade attack detection
+and encrypted shares and stronger signing and authentication algorithms.
+There are additional mount options that may be helpful for SMB3 to get
+improved POSIX behavior (NB: can use vers=3.0 to force only SMB3, never 2.1):
+     "mfsymlinks" and "cifsacl" and "idsfromsid"
+
 Allowing User Mounts
 ====================
 To permit users to mount and unmount over directories they own is possible
@@ -98,9 +92,7 @@ and execution of suid programs on the remote target would be enabled
 by default. This can be changed, as with nfs and other filesystems, 
 by simply specifying "nosuid" among the mount options. For user mounts 
 though to be able to pass the suid flag to mount requires rebuilding 
-mount.cifs with the following flag: 
-        gcc samba/source/client/mount.cifs.c -DCIFS_ALLOW_USR_SUID -o mount.cifs
+mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
 
 There is a corresponding manual page for cifs mounting in the Samba 3.0 and
 later source tree in docs/manpages/mount.cifs.8 
@@ -189,18 +181,18 @@ applications running on the same server as Samba.
 Use instructions:
 ================
 Once the CIFS VFS support is built into the kernel or installed as a module 
-(cifs.o), you can use mount syntax like the following to access Samba or Windows 
-servers: 
+(cifs.ko), you can use mount syntax like the following to access Samba or
+Mac or Windows servers:
 
-  mount -t cifs //9.53.216.11/e$ /mnt -o user=myname,pass=mypassword
+  mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword
 
 Before -o the option -v may be specified to make the mount.cifs
 mount helper display the mount steps more verbosely.  
 After -o the following commonly used cifs vfs specific options
 are supported:
 
-  user=<username>
-  pass=<password>
+  username=<username>
+  password=<password>
   domain=<domain name>
   
 Other cifs mount options are described below.  Use of TCP names (in addition to
@@ -246,13 +238,16 @@ the Server's registry.  Samba starting with version 3.10 will allow such
 filenames (ie those which contain valid Linux characters, which normally
 would be forbidden for Windows/CIFS semantics) as long as the server is
 configured for Unix Extensions (and the client has not disabled
-/proc/fs/cifs/LinuxExtensionsEnabled).
-  
+/proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
+"mapposix" can be used on CIFS (vers=1.0) to force the mapping of
+illegal Windows/NTFS/SMB characters to a remap range (this mount parm
+is the default for SMB3). This remap ("mapposix") range is also
+compatible with Mac (and "Services for Mac" on some older Windows).
 
 CIFS VFS Mount Options
 ======================
 A partial list of the supported mount options follows:
-  user         The user name to use when trying to establish
+  username     The user name to use when trying to establish
                the CIFS session.
   password     The user password.  If the mount helper is
                installed, the user will be prompted for password
index 066ffddc3964917d75287198ffd178daacc1cac6..396ecfd6ff4a0da40f099dfef57ef6111ae8da71 100644 (file)
@@ -1,4 +1,4 @@
-Version 2.03 August 1, 2014
+Version 2.04 September 13, 2017
 
 A Partial List of Missing Features
 ==================================
@@ -8,73 +8,69 @@ for visible, important contributions to this module.  Here
 is a partial list of the known problems and missing features:
 
 a) SMB3 (and SMB3.02) missing optional features:
-   - RDMA
+   - RDMA (started)
    - multichannel (started)
    - directory leases (improved metadata caching)
    - T10 copy offload (copy chunk is only mechanism supported)
-   - encrypted shares
 
 b) improved sparse file support
 
 c) Directory entry caching relies on a 1 second timer, rather than
-using FindNotify or equivalent.  - (started)
+using Directory Leases
 
 d) quota support (needs minor kernel change since quota calls
 to make it to network filesystems or deviceless filesystems)
 
-e) improve support for very old servers (OS/2 and Win9x for example)
-Including support for changing the time remotely (utimes command).
+e) Better optimize open to reduce redundant opens (using reference
+counts more) and to improve use of compounding in SMB3 to reduce
+number of roundtrips.
 
-f) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
-extra copy in/out of the socket buffers in some cases.
-
-g) Better optimize open (and pathbased setfilesize) to reduce the
-oplock breaks coming from windows srv.  Piggyback identical file
-opens on top of each other by incrementing reference count rather
-than resending (helps reduce server resource utilization and avoid
-spurious oplock breaks).
-
-h) Add support for storing symlink info to Windows servers
-in the Extended Attribute format their SFU clients would recognize.
-
-i) Finish inotify support so kde and gnome file list windows
+f) Finish inotify support so kde and gnome file list windows
 will autorefresh (partially complete by Asser). Needs minor kernel
 vfs change to support removing D_NOTIFY on a file.   
 
-j) Add GUI tool to configure /proc/fs/cifs settings and for display of
+g) Add GUI tool to configure /proc/fs/cifs settings and for display of
 the CIFS statistics (started)
 
-k) implement support for security and trusted categories of xattrs
+h) implement support for security and trusted categories of xattrs
 (requires minor protocol extension) to enable better support for SELINUX
 
-l) Implement O_DIRECT flag on open (already supported on mount)
+i) Implement O_DIRECT flag on open (already supported on mount)
 
-m) Create UID mapping facility so server UIDs can be mapped on a per
+j) Create UID mapping facility so server UIDs can be mapped on a per
 mount or a per server basis to client UIDs or nobody if no mapping
-exists.  This is helpful when Unix extensions are negotiated to
-allow better permission checking when UIDs differ on the server
-and client.  Add new protocol request to the CIFS protocol 
-standard for asking the server for the corresponding name of a
-particular uid.
+exists. Also better integration with winbind for resolving SID owners
+
+k) Add tools to take advantage of more smb3 specific ioctls and features
+
+l) encrypted file support
+
+m) improved stats gathering, tools (perhaps integration with nfsometer?)
 
-n) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too)
+n) allow setting more NTFS/SMB3 file attributes remotely (currently limited to compressed
+file attribute via chflags) and improve user space tools for managing and
+viewing them.
 
-o) mount check for unmatched uids
+o) mount helper GUI (to simplify the various configuration options on mount)
 
-p) Add support for new vfs entry point for fallocate
+p) autonegotiation of dialects (offering more than one dialect ie SMB3.02,
+SMB3, SMB2.1 not just SMB3).
 
-q) Add tools to take advantage of cifs/smb3 specific ioctls and features
-such as "CopyChunk" (fast server side file copy)
+q) Allow mount.cifs to be more verbose in reporting errors with dialect
+or unsupported feature errors.
 
-r) encrypted file support
+r) updating cifs documentation, and user guid.
 
-s) improved stats gathering, tools (perhaps integration with nfsometer?)
+s) Addressing bugs found by running a broader set of xfstests in standard
+file system xfstest suite.
 
-t) allow setting more NTFS/SMB3 file attributes remotely (currently limited to compressed
-file attribute via chflags)
+t) split cifs and smb3 support into separate modules so legacy (and less
+secure) CIFS dialect can be disabled in environments that don't need it
+and simplify the code.
 
-u) mount helper GUI (to simplify the various configuration options on mount)
+u) Finish up SMB3.1.1 dialect support
 
+v) POSIX Extensions for SMB3.1.1
 
 KNOWN BUGS
 ====================================
index 2fac91ac96cf7484aae9e148e5841755feba5f70..67756607246e767a9105bc06c00a7b97730abbb1 100644 (file)
@@ -1,24 +1,28 @@
-  This is the client VFS module for the Common Internet File System
-  (CIFS) protocol which is the successor to the Server Message Block 
+  This is the client VFS module for the SMB3 NAS protocol as well
+  older dialects such as the Common Internet File System (CIFS)
+  protocol which was the successor to the Server Message Block
   (SMB) protocol, the native file sharing mechanism for most early
   PC operating systems. New and improved versions of CIFS are now
   called SMB2 and SMB3. These dialects are also supported by the
   CIFS VFS module. CIFS is fully supported by network
-  file servers such as Windows 2000, 2003, 2008 and 2012
+  file servers such as Windows 2000, 2003, 2008, 2012 and 2016
   as well by Samba (which provides excellent CIFS
-  server support for Linux and many other operating systems), so
+  server support for Linux and many other operating systems), Apple
+  systems, as well as most Network Attached Storage vendors, so
   this network filesystem client can mount to a wide variety of
   servers.
 
   The intent of this module is to provide the most advanced network
-  file system function for CIFS compliant servers, including better
-  POSIX compliance, secure per-user session establishment, high
-  performance safe distributed caching (oplock), optional packet
+  file system function for SMB3 compliant servers, including advanced
+  security features, excellent parallelized high performance i/o, better
+  POSIX compliance, secure per-user session establishment, encryption,
+  high performance safe distributed caching (leases/oplocks), optional packet
   signing, large files, Unicode support and other internationalization
   improvements. Since both Samba server and this filesystem client support
-  the CIFS Unix extensions, the combination can provide a reasonable 
-  alternative to NFSv4 for fileserving in some Linux to Linux environments,
-  not just in Linux to Windows environments.
+  the CIFS Unix extensions (and in the future SMB3 POSIX extensions),
+  the combination can provide a reasonable alternative to other network and
+  cluster file systems for fileserving in some Linux to Linux environments,
+  not just in Linux to Windows (or Linux to Mac) environments.
 
   This filesystem has an mount utility (mount.cifs) that can be obtained from
 
index 36f528a7fdd64d18c7ee7b3a50849b45bc046ef3..8caa60734647f70a777b8a568ba9f2dd99182fb8 100644 (file)
@@ -210,8 +210,11 @@ path as another overlay mount and it may use a lower layer path that is
 beneath or above the path of another overlay lower layer path.
 
 Using an upper layer path and/or a workdir path that are already used by
-another overlay mount is not allowed and will fail with EBUSY.  Using
+another overlay mount is not allowed and may fail with EBUSY.  Using
 partially overlapping paths is not allowed but will not fail with EBUSY.
+If files are accessed from two overlayfs mounts which share or overlap the
+upper layer and/or workdir path the behavior of the overlay is undefined,
+though it will not result in a crash or deadlock.
 
 Mounting an overlay using an upper layer path, where the upper layer path
 was previously used by another mounted overlay in combination with a
index 24da7b32c489fd65408dbd8b33f7bc0402ddba0b..9a3658cc399ed459f1e21d613dbf8e5b1b2bc647 100644 (file)
@@ -366,7 +366,8 @@ struct driver_attribute {
 
 Declaring:
 
-DRIVER_ATTR(_name, _mode, _show, _store)
+DRIVER_ATTR_RO(_name)
+DRIVER_ATTR_RW(_name)
 
 Creation/Removal:
 
index 0500193434cb2957eec34124d621ccc176eac555..d477024569269ff741720537ef609cafb60166f2 100644 (file)
@@ -36,6 +36,7 @@ Supported adapters:
   * Intel Gemini Lake (SOC)
   * Intel Cannon Lake-H (PCH)
   * Intel Cannon Lake-LP (PCH)
+  * Intel Cedar Fork (PCH)
    Datasheets: Publicly available at the Intel website
 
 On Intel Patsburg and later chipsets, both the normal host SMBus controller
index 329e740adea70db91ac2c9cd9f671f79ca58790e..f6f80380dff2fa0851c5ae02de27497e9bc9c0df 100644 (file)
@@ -1108,14 +1108,6 @@ When kbuild executes, the following steps are followed (roughly):
     ld
        Link target. Often, LDFLAGS_$@ is used to set specific options to ld.
 
-    objcopy
-       Copy binary. Uses OBJCOPYFLAGS usually specified in
-       arch/$(ARCH)/Makefile.
-       OBJCOPYFLAGS_$@ may be used to set additional options.
-
-    gzip
-       Compress target. Use maximum compression to compress target.
-
        Example:
                #arch/x86/boot/Makefile
                LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
@@ -1139,6 +1131,19 @@ When kbuild executes, the following steps are followed (roughly):
              resulting in the target file being recompiled for no
              obvious reason.
 
+    objcopy
+       Copy binary. Uses OBJCOPYFLAGS usually specified in
+       arch/$(ARCH)/Makefile.
+       OBJCOPYFLAGS_$@ may be used to set additional options.
+
+    gzip
+       Compress target. Use maximum compression to compress target.
+
+       Example:
+               #arch/x86/boot/compressed/Makefile
+               $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
+                       $(call if_changed,gzip)
+
     dtc
        Create flattened device tree blob object suitable for linking
        into vmlinux. Device tree blobs linked into vmlinux are placed
@@ -1219,7 +1224,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.3 generic-y" for further info on syntax etc.
+       See "7.2 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1254,13 +1259,13 @@ 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 no-export-headers
+--- 7.1 no-export-headers
 
        no-export-headers is essentially used by include/uapi/linux/Kbuild to
        avoid exporting specific headers (e.g. kvm.h) on architectures that do
        not support it. It should be avoided as much as possible.
 
-       --- 7.2 generic-y
+--- 7.2 generic-y
 
        If an architecture uses a verbatim copy of a header from
        include/asm-generic then this is listed in the file
@@ -1287,7 +1292,7 @@ See subsequent chapter for the syntax of the Kbuild file.
                Example: termios.h
                        #include <asm-generic/termios.h>
 
-       --- 7.3 generated-y
+--- 7.3 generated-y
 
        If an architecture generates other header files alongside generic-y
        wrappers, generated-y specifies them.
@@ -1299,7 +1304,7 @@ See subsequent chapter for the syntax of the Kbuild file.
                        #arch/x86/include/asm/Kbuild
                        generated-y += syscalls_32.h
 
-       --- 7.5 mandatory-y
+--- 7.4 mandatory-y
 
        mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
        to define the minimum set of headers that must be exported in
index 57f52cdce32e42c9d170e8e475a02e8a08e1f454..9ba04c0bab8db6e1a74947770a028ebca43e1651 100644 (file)
@@ -2387,7 +2387,7 @@ broadcast: Like active-backup, there is not much advantage to this
        and packet type ID), so in a "gatewayed" configuration, all
        outgoing traffic will generally use the same device.  Incoming
        traffic may also end up on a single device, but that is
-       dependent upon the balancing policy of the peer's 8023.ad
+       dependent upon the balancing policy of the peer's 802.3ad
        implementation.  In a "local" configuration, traffic will be
        distributed across the devices in the bond.
 
index 789b74dbe1d96af46fae8a3504a242eaa0b11c3c..87814859cfc21c5c6a64c1dfb83a1d6cff596731 100644 (file)
@@ -337,7 +337,7 @@ Examples for low-level BPF:
   jeq #14, good           /* __NR_rt_sigprocmask */
   jeq #13, good           /* __NR_rt_sigaction */
   jeq #35, good           /* __NR_nanosleep */
-  bad: ret #0             /* SECCOMP_RET_KILL */
+  bad: ret #0             /* SECCOMP_RET_KILL_THREAD */
   good: ret #0x7fff0000   /* SECCOMP_RET_ALLOW */
 
 The above example code can be placed into a file (here called "foo"), and
index b3345d0fe0a67e477a6754848e7fc7be144322d5..77f4de59dc9ceb3cdb36692d1ea41e1d861468b0 100644 (file)
@@ -1680,6 +1680,9 @@ accept_dad - INTEGER
        2: Enable DAD, and disable IPv6 operation if MAC-based duplicate
           link-local address has been found.
 
+       DAD operation and mode on a given interface will be selected according
+       to the maximum value of conf/{all,interface}/accept_dad.
+
 force_tllao - BOOLEAN
        Enable sending the target link-layer address option even when
        responding to a unicast neighbor solicitation.
@@ -1727,16 +1730,23 @@ suppress_frag_ndisc - INTEGER
 
 optimistic_dad - BOOLEAN
        Whether to perform Optimistic Duplicate Address Detection (RFC 4429).
-               0: disabled (default)
-               1: enabled
+       0: disabled (default)
+       1: enabled
+
+       Optimistic Duplicate Address Detection for the interface will be enabled
+       if at least one of conf/{all,interface}/optimistic_dad is set to 1,
+       it will be disabled otherwise.
 
 use_optimistic - BOOLEAN
        If enabled, do not classify optimistic addresses as deprecated during
        source address selection.  Preferred addresses will still be chosen
        before optimistic addresses, subject to other ranking in the source
        address selection algorithm.
-               0: disabled (default)
-               1: enabled
+       0: disabled (default)
+       1: enabled
+
+       This will be enabled if at least one of
+       conf/{all,interface}/use_optimistic is set to 1, disabled otherwise.
 
 stable_secret - IPv6 address
        This IPv6 address will be used as a secret to generate IPv6
index 5e40e1f68873b0f2b594c22a6e69ddb218ce56ec..82236a17b5e65198be004d2cdd6a7c5bd8a9b7d4 100644 (file)
@@ -13,42 +13,42 @@ an example setup using a data-center-class switch ASIC chip.  Other setups
 with SR-IOV or soft switches, such as OVS, are possible.
 
 
-                             User-space tools
-
-       user space                   |
-      +-------------------------------------------------------------------+
-       kernel                       | Netlink
-                                    |
-                     +--------------+-------------------------------+
-                     |         Network stack                        |
-                     |           (Linux)                            |
-                     |                                              |
-                     +----------------------------------------------+
+                             User-space tools
+
+       user space                   |
+      +-------------------------------------------------------------------+
+       kernel                       | Netlink
+                                    |
+                     +--------------+-------------------------------+
+                     |         Network stack                        |
+                     |           (Linux)                            |
+                     |                                              |
+                     +----------------------------------------------+
 
                            sw1p2     sw1p4     sw1p6
-                      sw1p1  +  sw1p3  +  sw1p5  +          eth1
-                        +    |    +    |    +    |            +
-                        |    |    |    |    |    |            |
-                     +--+----+----+----+-+--+----+---+  +-----+-----+
-                     |         Switch driver         |  |    mgmt   |
-                     |        (this document)        |  |   driver  |
-                     |                               |  |           |
-                     +--------------+----------------+  +-----------+
-                                    |
-       kernel                       | HW bus (eg PCI)
-      +-------------------------------------------------------------------+
-       hardware                     |
-                     +--------------+---+------------+
-                     |         Switch device (sw1)   |
-                     |  +----+                       +--------+
-                     |  |    v offloaded data path   | mgmt port
-                     |  |    |                       |
-                     +--|----|----+----+----+----+---+
-                        |    |    |    |    |    |
-                        +    +    +    +    +    +
-                       p1   p2   p3   p4   p5   p6
-
-                             front-panel ports
+                      sw1p1  +  sw1p3  +  sw1p5  +          eth1
+                        +    |    +    |    +    |            +
+                        |    |    |    |    |    |            |
+                     +--+----+----+----+----+----+---+  +-----+-----+
+                     |         Switch driver         |  |    mgmt   |
+                     |        (this document)        |  |   driver  |
+                     |                               |  |           |
+                     +--------------+----------------+  +-----------+
+                                    |
+       kernel                       | HW bus (eg PCI)
+      +-------------------------------------------------------------------+
+       hardware                     |
+                     +--------------+----------------+
+                     |         Switch device (sw1)   |
+                     |  +----+                       +--------+
+                     |  |    v offloaded data path   | mgmt port
+                     |  |    |                       |
+                     +--|----|----+----+----+----+---+
+                        |    |    |    |    |    |
+                        +    +    +    +    +    +
+                       p1   p2   p3   p4   p5   p6
+
+                             front-panel ports
 
 
                                     Fig 1.
index 82fc399fcd33d1628289ec5ccfeb3193a368c2fc..61e43cc3ed171e2371b6372609533dc16fc9b057 100644 (file)
@@ -25,6 +25,7 @@ Below are the essential guides that every developer should read.
    submitting-patches
    coding-style
    email-clients
+   kernel-enforcement-statement
 
 Other guides to the community that are of interest to most developers are: 
 
diff --git a/Documentation/process/kernel-enforcement-statement.rst b/Documentation/process/kernel-enforcement-statement.rst
new file mode 100644 (file)
index 0000000..b317067
--- /dev/null
@@ -0,0 +1,157 @@
+Linux Kernel Enforcement Statement
+----------------------------------
+
+As developers of the Linux kernel, we have a keen interest in how our software
+is used and how the license for our software is enforced.  Compliance with the
+reciprocal sharing obligations of GPL-2.0 is critical to the long-term
+sustainability of our software and community.
+
+Although there is a right to enforce the separate copyright interests in the
+contributions made to our community, we share an interest in ensuring that
+individual enforcement actions are conducted in a manner that benefits our
+community and do not have an unintended negative impact on the health and
+growth of our software ecosystem.  In order to deter unhelpful enforcement
+actions, we agree that it is in the best interests of our development
+community to undertake the following commitment to users of the Linux kernel
+on behalf of ourselves and any successors to our copyright interests:
+
+    Notwithstanding the termination provisions of the GPL-2.0, we agree that
+    it is in the best interests of our development community to adopt the
+    following provisions of GPL-3.0 as additional permissions under our
+    license with respect to any non-defensive assertion of rights under the
+    license.
+
+       However, if you cease all violation of this License, then your license
+       from a particular copyright holder is reinstated (a) provisionally,
+       unless and until the copyright holder explicitly and finally
+       terminates your license, and (b) permanently, if the copyright holder
+       fails to notify you of the violation by some reasonable means prior to
+       60 days after the cessation.
+
+       Moreover, your license from a particular copyright holder is
+       reinstated permanently if the copyright holder notifies you of the
+       violation by some reasonable means, this is the first time you have
+       received notice of violation of this License (for any work) from that
+       copyright holder, and you cure the violation prior to 30 days after
+       your receipt of the notice.
+
+Our intent in providing these assurances is to encourage more use of the
+software.  We want companies and individuals to use, modify and distribute
+this software.  We want to work with users in an open and transparent way to
+eliminate any uncertainty about our expectations regarding compliance or
+enforcement that might limit adoption of our software.  We view legal action
+as a last resort, to be initiated only when other community efforts have
+failed to resolve the problem.
+
+Finally, once a non-compliance issue is resolved, we hope the user will feel
+welcome to join us in our efforts on this project.  Working together, we will
+be stronger.
+
+Except where noted below, we speak only for ourselves, and not for any company
+we might work for today, have in the past, or will in the future.
+
+  - Laura Abbott
+  - Bjorn Andersson (Linaro)
+  - Andrea Arcangeli
+  - Neil Armstrong
+  - Jens Axboe
+  - Pablo Neira Ayuso
+  - Khalid Aziz
+  - Ralf Baechle
+  - Felipe Balbi
+  - Arnd Bergmann
+  - Ard Biesheuvel
+  - Tim Bird
+  - Paolo Bonzini
+  - Christian Borntraeger
+  - Mark Brown (Linaro)
+  - Paul Burton
+  - Javier Martinez Canillas
+  - Rob Clark
+  - Jonathan Corbet
+  - Dennis Dalessandro
+  - Vivien Didelot (Savoir-faire Linux)
+  - Hans de Goede
+  - Mel Gorman (SUSE)
+  - Sven Eckelmann
+  - Alex Elder (Linaro)
+  - Fabio Estevam
+  - Larry Finger
+  - Bhumika Goyal
+  - Andy Gross
+  - Juergen Gross
+  - Shawn Guo
+  - Ulf Hansson
+  - Stephen Hemminger (Microsoft)
+  - Tejun Heo
+  - Rob Herring
+  - Masami Hiramatsu
+  - Michal Hocko
+  - Simon Horman
+  - Johan Hovold (Hovold Consulting AB)
+  - Christophe JAILLET
+  - Olof Johansson
+  - Lee Jones (Linaro)
+  - Heiner Kallweit
+  - Srinivas Kandagatla
+  - Jan Kara
+  - Shuah Khan (Samsung)
+  - David Kershner
+  - Jaegeuk Kim
+  - Namhyung Kim
+  - Colin Ian King
+  - Jeff Kirsher
+  - Greg Kroah-Hartman (Linux Foundation)
+  - Christian König
+  - Vinod Koul
+  - Krzysztof Kozlowski
+  - Viresh Kumar
+  - Aneesh Kumar K.V
+  - Julia Lawall
+  - Doug Ledford
+  - Chuck Lever (Oracle)
+  - Daniel Lezcano
+  - Shaohua Li
+  - Xin Long
+  - Tony Luck
+  - Catalin Marinas (Arm Ltd)
+  - Mike Marshall
+  - Chris Mason
+  - Paul E. McKenney
+  - David S. Miller
+  - Ingo Molnar
+  - Kuninori Morimoto
+  - Trond Myklebust
+  - Martin K. Petersen (Oracle)
+  - Borislav Petkov
+  - Jiri Pirko
+  - Josh Poimboeuf
+  - Sebastian Reichel (Collabora)
+  - Guenter Roeck
+  - Joerg Roedel
+  - Leon Romanovsky
+  - Steven Rostedt (VMware)
+  - Frank Rowand
+  - Ivan Safonov
+  - Anna Schumaker
+  - Jes Sorensen
+  - K.Y. Srinivasan
+  - Heiko Stuebner
+  - Jiri Kosina (SUSE)
+  - Willy Tarreau
+  - Dmitry Torokhov
+  - Linus Torvalds
+  - Thierry Reding
+  - Rik van Riel
+  - Geert Uytterhoeven (Glider bvba)
+  - Eduardo Valentin (Amazon.com)
+  - Daniel Vetter
+  - Linus Walleij
+  - Richard Weinberger
+  - Dan Williams
+  - Rafael J. Wysocki
+  - Arvind Yadav
+  - Masahiro Yamada
+  - Wei Yongjun
+  - Lv Zheng
+  - Marc Zyngier (Arm Ltd)
index ce61d1fe08cacb5af99260241b058d139838029a..694968c7523cc28620c8ac51a28a33dc1b14336e 100644 (file)
@@ -75,6 +75,7 @@ show up in /proc/sys/kernel:
 - reboot-cmd                  [ SPARC only ]
 - rtsig-max
 - rtsig-nr
+- seccomp/                    ==> Documentation/userspace-api/seccomp_filter.rst
 - sem
 - sem_next_id                [ sysv ipc ]
 - sg-big-buff                 [ generic SCSI device (sg) ]
index f71eb5ef1f2df4154a0a31dd0307da00c5fde42f..099c412951d6b9dea515b08384e023e2c2d69025 100644 (file)
@@ -87,11 +87,16 @@ Return values
 A seccomp filter may return any of the following values. If multiple
 filters exist, the return value for the evaluation of a given system
 call will always use the highest precedent value. (For example,
-``SECCOMP_RET_KILL`` will always take precedence.)
+``SECCOMP_RET_KILL_PROCESS`` will always take precedence.)
 
 In precedence order, they are:
 
-``SECCOMP_RET_KILL``:
+``SECCOMP_RET_KILL_PROCESS``:
+       Results in the entire process exiting immediately without executing
+       the system call.  The exit status of the task (``status & 0x7f``)
+       will be ``SIGSYS``, not ``SIGKILL``.
+
+``SECCOMP_RET_KILL_THREAD``:
        Results in the task exiting immediately without executing the
        system call.  The exit status of the task (``status & 0x7f``) will
        be ``SIGSYS``, not ``SIGKILL``.
@@ -141,6 +146,15 @@ In precedence order, they are:
        allow use of ptrace, even of other sandboxed processes, without
        extreme care; ptracers can use this mechanism to escape.)
 
+``SECCOMP_RET_LOG``:
+       Results in the system call being executed after it is logged. This
+       should be used by application developers to learn which syscalls their
+       application needs without having to iterate through multiple test and
+       development cycles to build the list.
+
+       This action will only be logged if "log" is present in the
+       actions_logged sysctl string.
+
 ``SECCOMP_RET_ALLOW``:
        Results in the system call being executed.
 
@@ -169,7 +183,41 @@ The ``samples/seccomp/`` directory contains both an x86-specific example
 and a more generic example of a higher level macro interface for BPF
 program generation.
 
+Sysctls
+=======
 
+Seccomp's sysctl files can be found in the ``/proc/sys/kernel/seccomp/``
+directory. Here's a description of each file in that directory:
+
+``actions_avail``:
+       A read-only ordered list of seccomp return values (refer to the
+       ``SECCOMP_RET_*`` macros above) in string form. The ordering, from
+       left-to-right, is the least permissive return value to the most
+       permissive return value.
+
+       The list represents the set of seccomp return values supported
+       by the kernel. A userspace program may use this list to
+       determine if the actions found in the ``seccomp.h``, when the
+       program was built, differs from the set of actions actually
+       supported in the current running kernel.
+
+``actions_logged``:
+       A read-write ordered list of seccomp return values (refer to the
+       ``SECCOMP_RET_*`` macros above) that are allowed to be logged. Writes
+       to the file do not need to be in ordered form but reads from the file
+       will be ordered in the same way as the actions_avail sysctl.
+
+       It is important to note that the value of ``actions_logged`` does not
+       prevent certain actions from being logged when the audit subsystem is
+       configured to audit a task. If the action is not found in
+       ``actions_logged`` list, the final decision on whether to audit the
+       action for that task is ultimately left up to the audit subsystem to
+       decide for all seccomp return values other than ``SECCOMP_RET_ALLOW``.
+
+       The ``allow`` string is not accepted in the ``actions_logged`` sysctl
+       as it is not possible to log ``SECCOMP_RET_ALLOW`` actions. Attempting
+       to write ``allow`` to the sysctl will result in an EINVAL being
+       returned.
 
 Adding architecture support
 ===========================
diff --git a/Kbuild b/Kbuild
index 94c752762bc26530f8024162140c9da9d08b5167..af161aa1facd194baeb574e9d36a530274411702 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Kbuild for top-level directory of the kernel
 # This file takes care of the following:
diff --git a/Kconfig b/Kconfig
index c13f48d65898487105f0193667648382c90d0eda..8c4c1cb0f9cd44321d340d8ae7e243677437adfb 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
index 2281af4b41b6ce2000be7f3305db98475fdd7df6..2f4e462aa4a214d188bbed5aa612b60b34374448 100644 (file)
@@ -352,6 +352,18 @@ L: linux-acpi@vger.kernel.org
 S:     Maintained
 F:     drivers/acpi/arm64
 
+ACPI PMIC DRIVERS
+M:     "Rafael J. Wysocki" <rjw@rjwysocki.net>
+M:     Len Brown <lenb@kernel.org>
+R:     Andy Shevchenko <andy@infradead.org>
+R:     Mika Westerberg <mika.westerberg@linux.intel.com>
+L:     linux-acpi@vger.kernel.org
+Q:     https://patchwork.kernel.org/project/linux-acpi/list/
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
+B:     https://bugzilla.kernel.org
+S:     Supported
+F:     drivers/acpi/pmic/
+
 ACPI THERMAL DRIVER
 M:     Zhang Rui <rui.zhang@intel.com>
 L:     linux-acpi@vger.kernel.org
@@ -861,7 +873,7 @@ F:  drivers/android/
 F:     drivers/staging/android/
 
 ANDROID GOLDFISH RTC DRIVER
-M:     Miodrag Dinic <miodrag.dinic@imgtec.com>
+M:     Miodrag Dinic <miodrag.dinic@mips.com>
 S:     Supported
 F:     Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt
 F:     drivers/rtc/rtc-goldfish.c
@@ -2853,7 +2865,6 @@ S:        Supported
 F:     drivers/scsi/bnx2i/
 
 BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
-M:     Yuval Mintz <Yuval.Mintz@cavium.com>
 M:     Ariel Elior <ariel.elior@cavium.com>
 M:     everest-linux-l2@cavium.com
 L:     netdev@vger.kernel.org
@@ -5248,7 +5259,8 @@ S:        Maintained
 F:     drivers/iommu/exynos-iommu.c
 
 EZchip NPS platform support
-M:     Noam Camus <noamc@ezchip.com>
+M:     Elad Kanfi <eladkan@mellanox.com>
+M:     Vineet Gupta <vgupta@synopsys.com>
 S:     Supported
 F:     arch/arc/plat-eznps
 F:     arch/arc/boot/dts/eznps.dts
@@ -5334,9 +5346,7 @@ M:        "J. Bruce Fields" <bfields@fieldses.org>
 L:     linux-fsdevel@vger.kernel.org
 S:     Maintained
 F:     include/linux/fcntl.h
-F:     include/linux/fs.h
 F:     include/uapi/linux/fcntl.h
-F:     include/uapi/linux/fs.h
 F:     fs/fcntl.c
 F:     fs/locks.c
 
@@ -5345,6 +5355,8 @@ M:        Alexander Viro <viro@zeniv.linux.org.uk>
 L:     linux-fsdevel@vger.kernel.org
 S:     Maintained
 F:     fs/*
+F:     include/linux/fs.h
+F:     include/uapi/linux/fs.h
 
 FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 M:     Riku Voipio <riku.voipio@iki.fi>
@@ -6643,8 +6655,8 @@ M:        Alexander Aring <alex.aring@gmail.com>
 M:     Stefan Schmidt <stefan@osg.samsung.com>
 L:     linux-wpan@vger.kernel.org
 W:     http://wpan.cakelab.org/
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next.git
 S:     Maintained
 F:     net/ieee802154/
 F:     net/mac802154/
@@ -6659,7 +6671,7 @@ F:        include/net/ieee802154_netdev.h
 F:     Documentation/networking/ieee802154.txt
 
 IFE PROTOCOL
-M:     Yotam Gigi <yotamg@mellanox.com>
+M:     Yotam Gigi <yotam.gi@gmail.com>
 M:     Jamal Hadi Salim <jhs@mojatatu.com>
 F:     net/ife
 F:     include/net/ife.h
@@ -6721,13 +6733,13 @@ S:      Maintained
 F:     drivers/usb/atm/ueagle-atm.c
 
 IMGTEC ASCII LCD DRIVER
-M:     Paul Burton <paul.burton@imgtec.com>
+M:     Paul Burton <paul.burton@mips.com>
 S:     Maintained
 F:     Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
 F:     drivers/auxdisplay/img-ascii-lcd.c
 
 IMGTEC IR DECODER DRIVER
-M:     James Hogan <james.hogan@imgtec.com>
+M:     James Hogan <jhogan@kernel.org>
 S:     Maintained
 F:     drivers/media/rc/img-ir/
 
@@ -7551,7 +7563,7 @@ F:        arch/arm64/include/asm/kvm*
 F:     arch/arm64/kvm/
 
 KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
-M:     James Hogan <james.hogan@imgtec.com>
+M:     James Hogan <jhogan@kernel.org>
 L:     linux-mips@linux-mips.org
 S:     Supported
 F:     arch/mips/include/uapi/asm/kvm*
@@ -7559,7 +7571,7 @@ F:        arch/mips/include/asm/kvm*
 F:     arch/mips/kvm/
 
 KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc)
-M:     Alexander Graf <agraf@suse.com>
+M:     Paul Mackerras <paulus@ozlabs.org>
 L:     kvm-ppc@vger.kernel.org
 W:     http://www.linux-kvm.org/
 T:     git git://github.com/agraf/linux-2.6.git
@@ -8253,6 +8265,12 @@ L:       libertas-dev@lists.infradead.org
 S:     Orphan
 F:     drivers/net/wireless/marvell/libertas/
 
+MARVELL MACCHIATOBIN SUPPORT
+M:     Russell King <rmk@armlinux.org.uk>
+L:     linux-arm-kernel@lists.infradead.org
+S:     Maintained
+F:     arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+
 MARVELL MV643XX ETHERNET DRIVER
 M:     Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 L:     netdev@vger.kernel.org
@@ -8586,6 +8604,12 @@ M:       Sean Wang <sean.wang@mediatek.com>
 S:     Maintained
 F:     drivers/media/rc/mtk-cir.c
 
+MEDIATEK PMIC LED DRIVER
+M:     Sean Wang <sean.wang@mediatek.com>
+S:     Maintained
+F:     drivers/leds/leds-mt6323.c
+F:     Documentation/devicetree/bindings/leds/leds-mt6323.txt
+
 MEDIATEK ETHERNET DRIVER
 M:     Felix Fietkau <nbd@openwrt.org>
 M:     John Crispin <john@phrozen.org>
@@ -8719,7 +8743,7 @@ Q:        http://patchwork.ozlabs.org/project/netdev/list/
 F:     drivers/net/ethernet/mellanox/mlxsw/
 
 MELLANOX FIRMWARE FLASH LIBRARY (mlxfw)
-M:     Yotam Gigi <yotamg@mellanox.com>
+M:     mlxsw@mellanox.com
 L:     netdev@vger.kernel.org
 S:     Supported
 W:     http://www.mellanox.com
@@ -8868,7 +8892,7 @@ F:        Documentation/devicetree/bindings/media/meson-ao-cec.txt
 T:     git git://linuxtv.org/media_tree.git
 
 METAG ARCHITECTURE
-M:     James Hogan <james.hogan@imgtec.com>
+M:     James Hogan <jhogan@kernel.org>
 L:     linux-metag@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag.git
 S:     Odd Fixes
@@ -8969,7 +8993,7 @@ F:        Documentation/mips/
 F:     arch/mips/
 
 MIPS BOSTON DEVELOPMENT BOARD
-M:     Paul Burton <paul.burton@imgtec.com>
+M:     Paul Burton <paul.burton@mips.com>
 L:     linux-mips@linux-mips.org
 S:     Maintained
 F:     Documentation/devicetree/bindings/clock/img,boston-clock.txt
@@ -8979,7 +9003,7 @@ F:        drivers/clk/imgtec/clk-boston.c
 F:     include/dt-bindings/clock/boston-clock.h
 
 MIPS GENERIC PLATFORM
-M:     Paul Burton <paul.burton@imgtec.com>
+M:     Paul Burton <paul.burton@mips.com>
 L:     linux-mips@linux-mips.org
 S:     Supported
 F:     arch/mips/generic/
@@ -8995,7 +9019,7 @@ F:        drivers/*/*loongson1*
 F:     drivers/*/*/*loongson1*
 
 MIPS RINT INSTRUCTION EMULATION
-M:     Aleksandar Markovic <aleksandar.markovic@imgtec.com>
+M:     Aleksandar Markovic <aleksandar.markovic@mips.com>
 L:     linux-mips@linux-mips.org
 S:     Supported
 F:     arch/mips/math-emu/sp_rint.c
@@ -9189,7 +9213,6 @@ F:        include/linux/isicom.h
 MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
 M:     Bin Liu <b-liu@ti.com>
 L:     linux-usb@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
 S:     Maintained
 F:     drivers/usb/musb/
 
@@ -9337,7 +9360,7 @@ NETWORK BLOCK DEVICE (NBD)
 M:     Josef Bacik <jbacik@fb.com>
 S:     Maintained
 L:     linux-block@vger.kernel.org
-L:     nbd-general@lists.sourceforge.net
+L:     nbd@other.debian.org
 F:     Documentation/blockdev/nbd.txt
 F:     drivers/block/nbd.c
 F:     include/uapi/linux/nbd.h
@@ -10156,7 +10179,6 @@ F:      Documentation/parport*.txt
 
 PARAVIRT_OPS INTERFACE
 M:     Juergen Gross <jgross@suse.com>
-M:     Chris Wright <chrisw@sous-sol.org>
 M:     Alok Kataria <akataria@vmware.com>
 M:     Rusty Russell <rusty@rustcorp.com.au>
 L:     virtualization@lists.linux-foundation.org
@@ -10536,6 +10558,8 @@ M:      Peter Zijlstra <peterz@infradead.org>
 M:     Ingo Molnar <mingo@redhat.com>
 M:     Arnaldo Carvalho de Melo <acme@kernel.org>
 R:     Alexander Shishkin <alexander.shishkin@linux.intel.com>
+R:     Jiri Olsa <jolsa@redhat.com>
+R:     Namhyung Kim <namhyung@kernel.org>
 L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
 S:     Supported
@@ -10659,10 +10683,9 @@ S:     Maintained
 F:     drivers/pinctrl/spear/
 
 PISTACHIO SOC SUPPORT
-M:     James Hartley <james.hartley@imgtec.com>
-M:     Ionela Voinescu <ionela.voinescu@imgtec.com>
+M:     James Hartley <james.hartley@sondrel.com>
 L:     linux-mips@linux-mips.org
-S:     Maintained
+S:     Odd Fixes
 F:     arch/mips/pistachio/
 F:     arch/mips/include/asm/mach-pistachio/
 F:     arch/mips/boot/dts/img/pistachio*
@@ -10866,7 +10889,7 @@ S:      Maintained
 F:     drivers/block/ps3vram.c
 
 PSAMPLE PACKET SAMPLING SUPPORT:
-M:     Yotam Gigi <yotamg@mellanox.com>
+M:     Yotam Gigi <yotam.gi@gmail.com>
 S:     Maintained
 F:     net/psample
 F:     include/net/psample.h
@@ -11047,7 +11070,6 @@ S:      Supported
 F:     drivers/scsi/qedi/
 
 QLOGIC QL4xxx ETHERNET DRIVER
-M:     Yuval Mintz <Yuval.Mintz@cavium.com>
 M:     Ariel Elior <Ariel.Elior@cavium.com>
 M:     everest-linux-l2@cavium.com
 L:     netdev@vger.kernel.org
@@ -12915,9 +12937,9 @@ F:      drivers/mmc/host/dw_mmc*
 SYNOPSYS HSDK RESET CONTROLLER DRIVER
 M:     Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
 S:     Supported
-F:     drivers/reset/reset-hsdk-v1.c
-F:     include/dt-bindings/reset/snps,hsdk-v1-reset.h
-F:     Documentation/devicetree/bindings/reset/snps,hsdk-v1-reset.txt
+F:     drivers/reset/reset-hsdk.c
+F:     include/dt-bindings/reset/snps,hsdk-reset.h
+F:     Documentation/devicetree/bindings/reset/snps,hsdk-reset.txt
 
 SYSTEM CONFIGURATION (SYSCON)
 M:     Lee Jones <lee.jones@linaro.org>
index 64cbc66cebcaa7bbf8c0d10a09412ce6693437b9..bee2033e7d1de0e6a459a78919000890390d1433 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc8
 NAME = Fearless Coyote
 
 # *DOCUMENTATION*
@@ -130,8 +131,8 @@ endif
 ifneq ($(KBUILD_OUTPUT),)
 # check that the output directory actually exists
 saved-output := $(KBUILD_OUTPUT)
-$(shell [ -d $(KBUILD_OUTPUT) ] || mkdir -p $(KBUILD_OUTPUT))
-KBUILD_OUTPUT := $(realpath $(KBUILD_OUTPUT))
+KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
+                                                               && /bin/pwd)
 $(if $(KBUILD_OUTPUT),, \
      $(error failed to create output directory "$(saved-output)"))
 
@@ -697,11 +698,11 @@ KBUILD_CFLAGS += $(stackp-flag)
 
 ifeq ($(cc-name),clang)
 ifneq ($(CROSS_COMPILE),)
-CLANG_TARGET   := -target $(notdir $(CROSS_COMPILE:%-=%))
+CLANG_TARGET   := --target=$(notdir $(CROSS_COMPILE:%-=%))
 GCC_TOOLCHAIN  := $(realpath $(dir $(shell which $(LD)))/..)
 endif
 ifneq ($(GCC_TOOLCHAIN),)
-CLANG_GCC_TC   := -gcc-toolchain $(GCC_TOOLCHAIN)
+CLANG_GCC_TC   := --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
 KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
 KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
@@ -933,7 +934,11 @@ ifdef CONFIG_STACK_VALIDATION
   ifeq ($(has_libelf),1)
     objtool_target := tools/objtool FORCE
   else
-    $(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+    ifdef CONFIG_ORC_UNWINDER
+      $(error "Cannot generate ORC metadata for CONFIG_ORC_UNWINDER=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+    else
+      $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+    endif
     SKIP_STACK_VALIDATION := 1
     export SKIP_STACK_VALIDATION
   endif
@@ -1172,11 +1177,11 @@ headers_check: headers_install
 
 PHONY += kselftest
 kselftest:
-       $(Q)$(MAKE) -C tools/testing/selftests run_tests
+       $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests
 
 PHONY += kselftest-clean
 kselftest-clean:
-       $(Q)$(MAKE) -C tools/testing/selftests clean
+       $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean
 
 PHONY += kselftest-merge
 kselftest-merge:
@@ -1395,7 +1400,7 @@ help:
        @echo  '                    Build, install, and boot kernel before'
        @echo  '                    running kselftest on it'
        @echo  '  kselftest-clean - Remove all generated kselftest files'
-       @echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existed'
+       @echo  '  kselftest-merge - Merge all the config dependencies of kselftest to existing'
        @echo  '                    .config.'
        @echo  ''
        @echo 'Userspace tools targets:'
index 1aafb4efbb51dfea8c5639f2bd68379c930825d4..057370a0ac4ec7cf133f6f4c2ee9106a1d576958 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # General architecture dependent options
 #
@@ -937,9 +938,6 @@ config STRICT_MODULE_RWX
          and non-text memory will be made non-executable. This provides
          protection against certain security exploits (e.g. writing to text)
 
-config ARCH_WANT_RELAX_ORDER
-       bool
-
 config ARCH_HAS_REFCOUNT
        bool
        help
index 0e49d39ea74add90d066a9d7bf07e63a6e4394c9..69b875880754f5f54d7e4eeaa026c63bc283a894 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ALPHA
        bool
        default y
index 3f6265f2d9d4749a032bb28e325622bc92d81a1f..5e93dffb818aceae9b840c13dd1116aac03d0abb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 31c081ce1d502b805c1ac1220edd6a68524e3750..8cdff54c6e41aa6aba125ed647c2a28e4ea7317c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 OUTPUT_FORMAT("elf64-alpha")
 ENTRY(__start)
 printk = srm_printk;
index 2a542a506557dc83e2643a2480031eb291dd2ab9..95c0359f485895676cba97b1f8defc15b0970852 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/boot/bootp.c
  *
index d6ad191698dad32858f7e94cda5b1bf68f660065..99b8d7dc344bffc5e879c46eeeebc857c605594e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/boot/bootpz.c
  *
index 8efb26686d4789e2afbfc910921b2327e8fbe2c1..06a7c95fe9ad05878678bc707ef63f02d1773867 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/boot/head.S
  *
index dd6eb4a33582e63def4b015c0a1ad496889feacd..8f5ed861097037bbf3d01e6b5672c68c02cd4b3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/boot/main.c
  *
index 1b568ed74f95576dcb9e9e43fca312c8cc2c74ff..d6519220270360d2bc4f70e1c7f1a1a98ace0898 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c
  * 
index 1185778e6a1e0731a3b33fbbf0a6c42f3cb17aa2..fc47f33f8a444f59b81a947ff69cc34c389dd9f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* This utility makes a bootblock suitable for the SRM console/miniloader */
 
 /* Usage:
index dee82695f48bad69b0d9cf81457196e321d2ff55..825a16f5f6224695b5fdadea5ac829d2b1144d8f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/boot/tools/objstrip.c
  *
index 5b974ab8425c8606d1c46420350b55bf67cfccf1..47f3fba3e41ff1089aa317222b695c393d0a4434 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 
 generic-y += clkdev.h
index 9abbd2455306fffe6822ec9cc9ec12466efc353b..d2346b7caff1b1bf3b3ab6d1992afd2d72ac974a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_A_OUT_H__
 #define __ALPHA_A_OUT_H__
 
index a94d48b8677feba13f6e49b1b1b96c9f688b29d4..7173eada1567872d89712121218cda8b720f4748 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AGP_H
 #define AGP_H 1
 
index 55dd44a2cea7d3b9e95d90b4ccecb6438631ae2d..2718802407d61e49a56858e45554f8f6a061a81c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_AGP_BACKEND_H
 #define _ALPHA_AGP_BACKEND_H 1
 
index 498933a7df97e9831ed3957349777c817f64a2b1..85867d3cea649a093d90ff8c053475084ed3b9e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_ATOMIC_H
 #define _ALPHA_ATOMIC_H
 
index 77516c87255d6e7abc909f827b930c4bbb154756..92ec486a4f9ef089ed7f124a2d8a7cad1df7eea8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BARRIER_H
 #define __BARRIER_H
 
index 4bdfbd444e632a3050b0e7ebb5c3b93d1da7fc0f..ca43f4d0b93751b3cb262889fb638cf9c07a7011 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_BITOPS_H
 #define _ALPHA_BITOPS_H
 
index f091682e3cc84b4a9bffccc136147870b42fa6e0..b88ebdfedf7c2c27c82510883195f83bafbac76c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_BUG_H
 #define _ALPHA_BUG_H
 
index ad368a93a46a6c5c7e1bf0d25ab17f08ebc19fd8..6ce508c6890714669c98681ea53356e62c30759f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-alpha/cache.h
  */
index a9cb6aa447aadcf0c437097e4b42c83154f2d867..89128489cb598b27aa97c90f71da6564a96ce2c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_CACHEFLUSH_H
 #define _ALPHA_CACHEFLUSH_H
 
index f2bbdd2ace511464bd9c6ca0a671a0aedca6bc5c..473e6ccb65a3949daf6efcedffaf83dade12dfdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_CHECKSUM_H
 #define _ALPHA_CHECKSUM_H
 
index e5117766529e87ff99170fd4a53fde8d89bba4ff..46ebf14aed4e55348b1b96aa82516348e00171c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_CMPXCHG_H
 #define _ALPHA_CMPXCHG_H
 
index a7720b96bcc9ec515f8efe7553590e9f539d2e8b..5159ba259d652db9711c7e29d56a32fa0ff3d71d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_COMPILER_H
 #define __ALPHA_COMPILER_H
 
index f2b584fe0994e351479ff1b0f4c5c1e3940ec36a..088b7b9eb15ae1fcace56bc69c264fd3ac00ae32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AXP_CONSOLE_H
 #define __AXP_CONSOLE_H
 
index 6785ff7e02bc464fcd6eeefdea630055f47334aa..0a07055bc0fe87654c86c76aaf65fbf9ca10fee2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_APECS__H__
 #define __ALPHA_APECS__H__
 
index 9e0516c0ca27b33895082d7ecec6e06a1db72943..c706a7f2b061ea4032209a5ee5a963d624a9c282 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_CIA__H__
 #define __ALPHA_CIA__H__
 
index 24b2db541501c60c193cbc713369c88ed72d4a04..1c8906bf76c62191670e8bb8cf1dd2795d0c2536 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_IRONGATE__H__
 #define __ALPHA_IRONGATE__H__
 
index 8ee6c516279cbd8943982875416000968d9029dc..84d5e5b84f4fec825ab5e29539afad3b24972a6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_LCA__H__
 #define __ALPHA_LCA__H__
 
index 8dcf9dbda618e6587b7d6870a7633642a49e7a5a..cc6fd92d5fa9142088223aea8505e9dc9a89d264 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Marvel systems use the IO7 I/O chip provides PCI/PCIX/AGP access
  *
index ad44bef29fbaaeafd0b5799d9bc9c2f00e75722b..b30dc128210d2f661df57c74d26b11735f4e14ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_MCPCIA__H__
 #define __ALPHA_MCPCIA__H__
 
index 2f966b64659dce3bd1ce7bf532c256b5c915696a..1c56dea647b525836eafd135c93a17e8f759fd76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_POLARIS__H__
 #define __ALPHA_POLARIS__H__
 
index ade9d92e68b40760dd31b6363d22e1be44ea73e8..e0b33d09e93a654a1667753667e0d16f20288f48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_T2__H__
 #define __ALPHA_T2__H__
 
index 8cf79d1219e159ccda9985df9f4511c04dc78fc1..dcc02682c1e1b0c440f036cb6f09ee5dcde3d355 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_TITAN__H__
 #define __ALPHA_TITAN__H__
 
index 8e39ecf09419c890c8b8ec4e30b44e53eff3a11a..3391e95754f27694e0475924e12e4461fbfcd17e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_TSUNAMI__H__
 #define __ALPHA_TSUNAMI__H__
 
index cd562f544ba2deb9c1c77d0ec3fe36b0a939f16e..5d1b37f412cdedf7c90d8f99a39cd4fbc91bbb28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_WILDFIRE__H__
 #define __ALPHA_WILDFIRE__H__
 
index 2aa3f410f7e65309e0163a7014e51042cb36fad5..868aa61aba2f052da724f1dac45e99353cbad550 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_DELAY_H
 #define __ALPHA_DELAY_H
 
index 5d53666935e6bacf733bb4c03d46c1c241618ff0..e542cb272b673b543c254a81cc558553a86bbf2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_DMA_MAPPING_H
 #define _ALPHA_DMA_MAPPING_H
 
index 87cfdbdf08fc8e278f4d12386456c31cf900acf7..28610ea7786d9d6db3f98674de9d5a354c4c4e40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-alpha/dma.h
  *
index 968d9991f5ee2b06968c16359ce5618ce304e3c6..8049997fa372aef0a123fd9202d31ba46b4e8681 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ALPHA_ELF_H
 #define __ASM_ALPHA_ELF_H
 
index c250959421073bb48503119d6a6a7d02c1746190..610e01fe73abe72cb506a884819102443e3d366d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     linux/include/asm-alpha/err_common.h
  *
index 87f99777c2e4bccc216fea1ef49ccb4fb34500b9..ab17e6333764eca4c8a385c388744a71c39cb5c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_ERR_EV7_H
 #define __ALPHA_ERR_EV7_H 1
 
index 048e209e524c29f8335e41fe09f75aa4df7fa302..e42592390ee0d209966b3715866b633f4b0088a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_EXTABLE_H
 #define _ASM_EXTABLE_H
 
index 71c20956b905d33eb3d198d7bfb8e3c6b6f40368..b9691405e56b32cf457448bb29a9eab69499b646 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ALPHA_FPU_H
 #define __ASM_ALPHA_FPU_H
 
index 05a70edd57b66fe634021b0e9451f858fcf06ca0..d2e4da93e68ca0c20c3d7e62e166f8e2b339d39e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ALPHA_FUTEX_H
 #define _ASM_ALPHA_FUTEX_H
 
index 3504c704927c2c84c4df00632d068ac4317d98f4..2847449fb168bed7028b696cf5dd3bc175c8a501 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_GCT_H
 #define __ALPHA_GCT_H
 
index 242c09ba98c452d86308bbd1144035d05ca8e97a..5ce5b34e8a1a48ee24568e08763570543149b30e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_HARDIRQ_H
 #define _ALPHA_HARDIRQ_H
 
index 5050ac81cd90281effea54f2e9c0e2c9f2da5198..e2d81ac0d93400e9af1cb1251f0abf7654ba3c9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_HW_IRQ_H
 #define _ALPHA_HW_IRQ_H
 
index 8e8f871af7cf033a27b7407d0475cf93ba747585..d8180e527a1e8f68de7164fcf7b954199bc06fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_HWRPB_H
 #define __ALPHA_HWRPB_H
 
index 4d61d2a50c525aab2531e3bf670227cbd5e66bca..d123ff90f7a833fcdb113f3d11a565ba51991cbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_IO_H
 #define __ALPHA_IO_H
 
index 1c77f10b4b36328ffbf69a2f4bae5d8529a4272d..ba3d8f0cfe0c02fe1d575721f711385716796c62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Trivial implementations of basic i/o routines.  Assumes that all
    of the hard work has been done by ioremap and ioportmap, and that
    access to i/o space is linear.  */
index 06377400dc09b4750d54c32a6d433c0224cb3857..4d17cacd146222c7c099eb1af0611eb68ec59c91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_IRQ_H
 #define _ALPHA_IRQ_H
 
index ffb1726484af60125afb6056c81da3c3e7ed8527..9f25d4e0d37eac738fa38d4bd501bce89f268185 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_IRQFLAGS_H
 #define __ALPHA_IRQFLAGS_H
 
index 964b06ead43b07ec12bd56d54cbcbb967b6b367c..436dc905b6ad36817a452979cc758aafa1e91798 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_JENSEN_H
 #define __ALPHA_JENSEN_H
 
index a8d4ec8ea4b60f679c3986f0548fe055888d5755..651714b45729a1901d8418df9f19c37ab6e19124 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
index 7cfd06e8c935163801c01c79dd420c7c1e6e665f..aa8661fa60dc6bb8a49f9c0f695c9da684234eb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 9c94b8456043cdceda6e76c951fbbeb0921e5816..fab26a1c93d5af7412e69271f4467b56bb64576c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_LOCAL_H
 #define _ALPHA_LOCAL_H
 
index 75cb3641ed2f0b507c1bcd6a86cb2d8da2966044..a6b73c6d10eed9ae9687b8a4757d1e045ef73f5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_MACHVEC_H
 #define __ALPHA_MACHVEC_H 1
 
index 097703f1c8cb8d635a7624dd0f8f0170b3b1830a..2154fd4f7857d43106c56b061c0fef3ba9c19302 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index 660285b9aca82f31174a3832f7582e0aeaddb7f6..200e04e98a2f0daf19385ac119e576a9beb4972e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_MCE_H
 #define __ALPHA_MCE_H
 
index 3dc127779329e9a076d6c7736d66a8190acaa2f4..dadfc1b6e3e7c3c298a5fb971ae6bbad9bd1e736 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_MMU_H
 #define __ALPHA_MMU_H
 
index 384bd47b5187179f4e40ee63399117c14f40eb0d..6d7d9bc1b4b87feaea2f0dd4dff7b00b04b072ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_MMU_CONTEXT_H
 #define __ALPHA_MMU_CONTEXT_H
 
@@ -8,6 +9,7 @@
  */
 
 #include <linux/mm_types.h>
+#include <linux/sched.h>
 
 #include <asm/machvec.h>
 #include <asm/compiler.h>
index 14ce27bccd24136a8808c10e325c0294bac96bb7..889b5d3ad8253da0e15f68f2634f8a4a28e66fc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
  * Adapted for the alpha wildfire architecture Jan 2001.
index 9cd13b55155f2f4083f44a8fcec3a79b935570c9..1e96e42f5d54de8599d0e80779c40b8e374461e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_MODULE_H
 #define _ALPHA_MODULE_H
 
index 07af062544fb75fd68866e05d4983850863b0f45..f3fb2848470ab665b77074644607bad565d57b73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_PAGE_H
 #define _ALPHA_PAGE_H
 
index 5422a47646fc20add2047b57d41a91593905e242..db2b3b18b34c7038401cedb4f85f822e2f847a75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_PAL_H
 #define __ALPHA_PAL_H
 
index a5b68b268bcf34835a6376d8b8e2cb349d03feed..cfe947ce94615b4edd82def5291eb2fb44c4b450 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ALPHA_PARAM_H
 #define _ASM_ALPHA_PARAM_H
 
index 6abd0af11f13513bf1a31c9fc7d66b31e58cafbb..0519a51e61f80c086eef344b1279debfb7e3f56a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * parport.h: platform-specific PC-style parport initialisation
  *
index a06c24b3a2e13baaca1a4f41f16544a012f009a9..fc988c16e8944c18ccc39338776d855ce7fb62e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_PCI_H
 #define __ALPHA_PCI_H
 
index 2c12378e3aa95404e6b7045db0aaf5aaacd550a8..6923249f2d49c7ef90cfc3ce853cbb8281ab0a72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_PERCPU_H
 #define __ALPHA_PERCPU_H
 
index c2ebb6f36c9d3358699eac1ebb5f9dfad081b68f..ab3e3a8638fbe56c40cd0d2eeb0d83f89aa240b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_PGALLOC_H
 #define _ALPHA_PGALLOC_H
 
index a9a1195923722ffc249918fb1d10c3a588892173..89c2032f99606b51968a41b4fd449af49fcd9d0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_PGTABLE_H
 #define _ALPHA_PGTABLE_H
 
index 2fec2dee3020ba5047e672aa69ce5fc4516b8d3f..bfe784f2d4aff2b37a64eacc59a7d20439d66d09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-alpha/processor.h
  *
index 9047c2fe8f23f4bf7378e04cf8dc2ef6fb79524d..df5f317ab3fcba67152fae5971c3471f105b125d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMAXP_PTRACE_H
 #define _ASMAXP_PTRACE_H
 
index 77873d0ad2937b130ab0a8fa737b5a61b821d087..3925f06afd6ba17d3a7dd4c7eab1751d24309a99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_RWSEM_H
 #define _ALPHA_RWSEM_H
 
index e31557fc06cc1056511dc15d81583ee84ec85fc7..91115447319c644176353283cd5f3d278952abf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-alpha/serial.h
  */
index cc901d58aebbd6b9a9eb63d30699352cbe489012..0c04fde1aeba50ec09b2d4a8f516461c1c247f6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMAXP_SHMPARAM_H
 #define _ASMAXP_SHMPARAM_H
 
index 963f0494dca78621715d19226f965e013bc41c2a..a40f0201166737aaa00a606c804eca4641b84318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMAXP_SIGNAL_H
 #define _ASMAXP_SIGNAL_H
 
index c46e714aa3e024ccd04ec7cf11207ba0a1243b13..2264ae72673be5cb18cc8bfa553fdf9d0ee88e6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SMP_H
 #define __ASM_SMP_H
 
index 8d806d80ed2476d1941da47cf07b76e9a38eb617..76a32817e7bedf4340350e0921aeae0d8620279e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
index 88d3452b21f028dcb3b5c7ccef4e6730a38803f0..ca2c5c30b22ea78a4591a218732b4ad7c7864e17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_SPECIAL_INSNS_H
 #define __ALPHA_SPECIAL_INSNS_H
 
index 718ac0b64adf78ce770e1e1e56f82694550e24c9..aa4304afbea6468dc47492ec979d1361b01aefda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_SPINLOCK_H
 #define _ALPHA_SPINLOCK_H
 
index 54c2afce0a1d7a4b117d4fd5332cb77bee787e62..1d5716bc060bed0a3b00109478c6faa81dae3c12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_SPINLOCK_TYPES_H
 #define _ALPHA_SPINLOCK_TYPES_H
 
index 9eb9933d845fb8dc82f321e1a049641a4cd4c125..f043f91ff98830c8557217c7b4a6a66cc6a732a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_STRING_H__
 #define __ALPHA_STRING_H__
 
index 44c0d4f2c0b2d474a7c7c96a3e0bd2e709409047..762b7f975310c088472d82a6e60c0b9a0550cbe3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_SWITCH_TO_H
 #define __ALPHA_SWITCH_TO_H
 
index 88d28eb2a5662f9daf8f1527cd19863b1fcc1b5d..d73a6fcb519cb79d4ccb318aa76b0f30932de892 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ALPHA_SYSCALL_H
 #define _ASM_ALPHA_SYSCALL_H
 
index 7fde0f88da888b8cf52a0bc636cce4b655ef518e..6a8c53dec57e6e3aa22a5be371b922ebb1bd154d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_TERMIOS_H
 #define _ALPHA_TERMIOS_H
 
index e9e90bfa2b50a6ef0595fd6615ed547cdf2dabfc..8c20c5e35432b3ba3b8f07fd24cda9fa1b2e48da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_THREAD_INFO_H
 #define _ALPHA_THREAD_INFO_H
 
index afa0c45e3e987a80b91c0db09aa3352d95628c36..b565cc6f408e95d04c0fe4a1c58df6c16b15a750 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-alpha/timex.h
  *
index 42866759f3fabd022c07c431a01bc9f45f6d91f4..8f5042b61875fdd4c308f2b3e3accab95ff571e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_TLB_H
 #define _ALPHA_TLB_H
 
index e89e0c2e15b17f7eda39cd753b5e4f918a0fa902..f8b492408f514993fb439a746e0eb3cf4787d46a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_TLBFLUSH_H
 #define _ALPHA_TLBFLUSH_H
 
index 9251e13e144f668d0749528a8ffa2a89497f5730..e6e13a85796a609153f9c3738ca04c5d68af7d79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ALPHA_TOPOLOGY_H
 #define _ASM_ALPHA_TOPOLOGY_H
 
index 0bc66e1d3a7e9c81f1cca84943f60cd91d85a625..b60b60276484f71b78f295d9e3887209f1212034 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_TYPES_H
 #define _ALPHA_TYPES_H
 
index 133a4884ed441065cd98fd5f32ff7cde66a9ddb4..87d8c4f0307d11539c15df2aa8dace09656a6560 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ALPHA_UACCESS_H
 #define __ALPHA_UACCESS_H
 
index 47578ab421520b7b8752e4eea13650aefd5cf969..af1f3465b8d7d2f90b84ffd1e45fa3a35293a455 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMAXP_UCONTEXT_H
 #define _ASMAXP_UCONTEXT_H
 
index 3787c60aed3fa716f366b7cf9868e4bcbef63eea..863c807b66f89926cab2829ea07ca94292f480ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ALPHA_UNALIGNED_H
 #define _ASM_ALPHA_UNALIGNED_H
 
index db7fc0f511e2ae9cc905a6bae64f9195562c013f..d6e29a1de4cc982a96f08d6b2c31e181a61efb30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_UNISTD_H
 #define _ALPHA_UNISTD_H
 
index a4eb6a4ca8d19b19724be4a02ebb58a13da54459..3df37492c7b70688b17c44f7bc408cbb48c9be7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_USER_H
 #define _ALPHA_USER_H
 
index 3c1c2b6128e77f41a714649bb4dbee92205f0c38..4c347a8454c7023a7911fe2e73ce137760e6a533 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 902e6ab00a066fead53614ed86cb88980aea2fba..4035265f1ad9fcff91ea002a913080516d6c9ab3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_WORD_AT_A_TIME_H
 #define _ASM_WORD_AT_A_TIME_H
 
index 319bf6788d87dd6a940355d0d32740ba830cbd44..c97b82a1f7db5269f5e38af1a27ad94623dbfaab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for use with the Alpha wrperfmon PAL call.
  */
index 0ca9724597c1603024ff26d366013bc2da92387b..68dfb3cb71454384dd187edfd0dded0fe4b65117 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ALPHA_CMPXCHG_H
 #error Do not include xchg.h directly!
 #else
index 547707246f63af046e6f1533b8c147b2bd1b54d9..7d692df04ba920adf2e6144cb398ccb2d8d167b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ALPHA_A_OUT_H__
 #define _UAPI__ALPHA_A_OUT_H__
 
index a3a579dfdb4d2d283d8c54b7bd33a3467ffa4936..57cae8780d8110dbc352e88e52eae22cff053e83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ALPHA_AUXVEC_H
 #define __ASM_ALPHA_AUXVEC_H
 
index ad57f78682038065c7eaa5c6825537ed8f6963dc..6c5bf7d03f4e3ddcb8a91617169a133ae420f3d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ALPHA_BITSPERLONG_H
 #define __ASM_ALPHA_BITSPERLONG_H
 
index 73683093202da1160edce0942b8b40b2eb41292c..efa9b51b45952cac703700a86d44d90a510ed307 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_BYTEORDER_H
 #define _ALPHA_BYTEORDER_H
 
index 32cc7833f0c18035161911d20acacad270e00af1..0e00c0e13374cef58998369c6f59f525a6449844 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ALPHA_COMPILER_H
 #define _UAPI__ALPHA_COMPILER_H
 
index fd08a191f3600e2ae821186f63c1d745652e8c7d..5fcb65300b56ce14fc7de8e4c5c05d0a4a4c210c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__AXP_CONSOLE_H
 #define _UAPI__AXP_CONSOLE_H
 
index 17f92aa76b2f82cf312b28d009fa97cd3cdde837..3d265f6babaf0a10f2c2baa67c46bb4ca52e1bef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_ERRNO_H
 #define _ALPHA_ERRNO_H
 
index 09f49a6b87d18a85451e2d457df84bb9c6f2e2ed..50bdc8e8a271b2a22f8b4d9c92585df1ce8578f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_FCNTL_H
 #define _ALPHA_FCNTL_H
 
index 21a053ca2233ce2dc21e7474c175dcff9a92ead4..cea9eafa056fc0593231f0a0e9aaadcff83f0bb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_ALPHA_FPU_H
 #define _UAPI__ASM_ALPHA_FPU_H
 
index ae50cc3192c7be4ff0408b69af10e0671e6d74bd..c02ccc5ecec06ea917c244d98cffdfbaeac8ba42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMAXP_GENTRAP_H
 #define _ASMAXP_GENTRAP_H
 
index fc63727f41783e09aeb673d0e0e09a792e129ce8..a9d68a08ee845ea672271bb7ee07d2f1fd63d97d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_IOCTL_H
 #define _ALPHA_IOCTL_H
 
index 1cd7dc7d487012fc1fa19cc636d1da562c905203..3729d92d3fa854599a99ba57c56aa33b40b4e0c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ALPHA_IOCTLS_H
 #define _ASM_ALPHA_IOCTLS_H
 
index 84c7e51cb6d0befd2b3c013c8bbbbaad6ae02297..90d6445a14df81c369ea5e0b04f0d48086c10a7d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ipcbuf.h>
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 3b26cc62dadb08d64b2d91780a92fd5458da76b6..6bf730063e3f00105ace8c911aa9dc65cd54649f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ALPHA_MMAN_H__
 #define __ALPHA_MMAN_H__
 
index 98496501a2bb8677b3b9a8248a3c3082ce62a3c2..8c5d4d8c1b16ee4a75e2924685a4ebf8d4c88d4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_MSGBUF_H
 #define _ALPHA_MSGBUF_H
 
index dfc8140b908821d46a3d82f30baaa121c1bf64ef..7427e028db64643927db77a99b590baf02347c8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ALPHA_PAL_H
 #define _UAPI__ALPHA_PAL_H
 
index dbcd9834af6d7f58eaad342356eee7a7dd12c5d2..49c7119934e222e67c0fd788b932f03160404c23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_ALPHA_PARAM_H
 #define _UAPI_ASM_ALPHA_PARAM_H
 
index c98509d3149e637951f5edf96116a70ed9d8bc51..b7132a305a476847d1b05aabc8087c89e6523c1d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/poll.h>
index 5a8a48320efe9f5c577f9cc8363a4de2a6725559..04f1ea57505b7d6ba4810fc7b593a687a3ebef40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_POSIX_TYPES_H
 #define _ALPHA_POSIX_TYPES_H
 
index 5ce83fa9a05b81d68e18ae655ff9cb111eb00560..1dfd065e45b1de1547e1207904a3f3f1817a5c1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASMAXP_PTRACE_H
 #define _UAPI_ASMAXP_PTRACE_H
 
index 86ff916fb0690f7e9055844b11e92822ce32bf11..2652f3a385f7f8032e960dae6dbc39bb9fa3e3c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __reg_h__
 #define __reg_h__
 
index 142df9c4f8b85e85e10515af777c5ed1271a33ed..cc99df0c60a564097aef8607b6907301b1bcef68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __alpha_regdef_h__
 #define __alpha_regdef_h__
 
index c10874ff597364035cd55a703f0bc616dbb77be0..362423ffe10b441b245e765d019b57ac64cd462f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_RESOURCE_H
 #define _ALPHA_RESOURCE_H
 
index 7b38b1534784f29eef7fd20e9c3ce2176d1d3ad5..f28ffa668b2f63b3bc1f0b832fa2fa7bcd96399d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_SEMBUF_H
 #define _ALPHA_SEMBUF_H
 
index b50014b30909b4107b9e44688759e37018700582..13b7ee465b0e521c7ffd6ac621935d09018fee8d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ALPHA_SETUP_H
 #define __ALPHA_SETUP_H
 
index 37ee84f05085eeb807955891acbb8cf31c55e4a3..7e041ca2eb40937b47e575ed5fc3a9515b4e158f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_SHMBUF_H
 #define _ALPHA_SHMBUF_H
 
index 323cdb0261988011276a4dff1e8da045127c3661..5428c42567e6a19fea0bf1ce73ecf6c901c3a8e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMAXP_SIGCONTEXT_H
 #define _ASMAXP_SIGCONTEXT_H
 
index 70494d1d8f297e17f59f319570067c08a15b9271..0cf3b527b274bc384299512a67d102e7948942e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_SIGINFO_H
 #define _ALPHA_SIGINFO_H
 
index dd4ca4bcbb4a0488cfd6c42334cb8dae97e2b16d..74c750bf1c1a26298fc2179b44ae784b577b7e75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASMAXP_SIGNAL_H
 #define _UAPI_ASMAXP_SIGNAL_H
 
index c6133a045352828f24c970f3d37fd9831df86d67..be14f16149d5faf64902441f39ba5c1a08be6104 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SOCKET_H
 #define _UAPI_ASM_SOCKET_H
 
index 7932c7ab4a4d4d0ae3b7243e1558283b415d1aba..ba287e4b01bfb5e1bd137cf28c7e5410aa1271ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ALPHA_SOCKIOS_H
 #define _ASM_ALPHA_SOCKIOS_H
 
index 07ad3e6b3f3e795f40ac73ffacf0774cf8c6dd45..3f454fbd307a2b28f78cbbe69d71374932ae27f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_STAT_H
 #define _ALPHA_STAT_H
 
index ccd2e186bfd8244e5892b181bcb43906cfdd4b08..95852a4f576d33db7d86e43a3651366e5999695c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_STATFS_H
 #define _ALPHA_STATFS_H
 
index 4d682b16c7c448b2e07d9c64abfaf5ed9417904b..1cc70d2727f795885c832ddd47fc34a0692f3c23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_SWAB_H
 #define _ALPHA_SWAB_H
 
index 0b80e79d75e5460df614e7e3a39d3e2d8046896d..188ea76c7f2fd131633f55cdec6c1a5ed3056499 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-alpha/sysinfo.h
  */
index 879dd35899218b850e154f64c4477375ca804432..05e0398a83a6ed98a9336dd181d7a18b4cc2219f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ALPHA_TERMBITS_H
 #define _ALPHA_TERMBITS_H
 
index 580ed1e4854c03482a51903682bf546cc07f7232..e1b981222a2431442a29d8569801268a383f18fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ALPHA_TERMIOS_H
 #define _UAPI_ALPHA_TERMIOS_H
 
index 8d1024d7be0546bc744adf163e87f9dc723539fe..6c3d49938126a6d9161993a1ecce45e99b0bbe5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ALPHA_TYPES_H
 #define _UAPI_ALPHA_TYPES_H
 
index 53de540e39a79c9197d11de2ba7bb7e6935558a8..e153ca6e15d6f62259744f6c42d6cbfa619bf4ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ALPHA_UNISTD_H
 #define _UAPI_ALPHA_UNISTD_H
 
index 8ce13d7a2ad389cb26d356b2954e7034326203ac..bf7b41fa7b01a91e5a3b9f0e681bd6d352966991 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 6ff8886e7e22b9c4af281abe417a99a88596a3d1..2e125e5c1508c388e200d1eb38383ccd68ebc8a4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed to extract
index 9525660c93c0f1808c9180cb382d142e88ae3bb2..a8d0d6e06526037b60a45a49b0a99b55c0cfa5c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/file.h>
index 6a61deed4a853ce8fdbb6b753070f2ca29aef08f..8e9a41966881bfa82b704a6f1826c1faabf3ff02 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/console.c
  *
index 708c831efa76594a1cd2299b7d3214f06f3ccc69..1bf3eef34c22f6c1203ff7bcde4ec8f0f2f3822f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_apecs.c
  *
index c44339e176c163718ae7cc33cd4b762210ea77c2..4b38386f6e62c7d2dc495c372b711d49a473fd0e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_cia.c
  *
index 83d0a359a1b2e79181082394f41b5fe9fc9cd441..aec757250e074cc2b95c1a903a4c45dd0be9bb7a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_irongate.c
  *
index cb2801cfd3df5578c3caea9159ba8486bfbe14fe..81c0c43635b0710753ec6aaf9470abb651fece79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_lca.c
  *
index b10c316475dde2082abd33e8933fe5c0b566a392..bdebb8c206f10d99f4ca0d6dd5d6e678c7008398 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_marvel.c
  *
index da7bcc372f16c50f6cc3f048b6a6956df748aec4..b1549db54260fe99f6f6a3f36f35dfee22f3d87b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_mcpcia.c
  *
index c5a271d37abd734b248e669b506d886844ab1791..75d622d96ff258ec19035e7af3727491a621e754 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *      linux/arch/alpha/kernel/core_polaris.c
  *
index 3ada4f7b085d42987dbb14bd0d78af2311935d9a..2c00b61ca379e309b41cebad1cbe264b4b4640c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_t2.c
  *
index b532d925443d50b02f3a54481de122c36d948f79..132b06bdf9031f7105b81738325110f33a37bb6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_titan.c
  *
index 61893d7bdda552ac50e9fadadf957c6b6badb668..e7c956ea46b64497e3a7cb70928a37e758225375 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/core_tsunami.c
  *
index 7e072443d7fdecdf9e8adc0eb85be4c1f1b24dee..cad36fc6ed7de05b4db8046ac9d9b0b5733ad955 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/core_wildfire.c
  *
index 98703d99b565af7a10cc44322d3ae1ec1230cf64..d92abb01c24951915583a0d281b5e394e5de935b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/kernel/entry.S
  *
index 13d53b1c9657f7ceaa855d99ad6cd31f7753bab0..94e1b3dcf6d430d0db2635f02d8ccea6af39d3cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/err_common.c
  *
index 51267ac5729b9c7276a0e838357bfb8ffd29e7db..8144f2045b5bc130d18cd7050fbf20c60fab6dc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/err_ev6.c
  *
index d738a67112d4da890dc3bd39abd0cd471bdb76a9..565de1acf1f53d21de448e8c4a7d0ca5d5fc5832 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/err_ev7.c
  *
index ae529c4160374ab1a280bd2a934db6118499768b..737b958a586d402b494b75e141361d9a1d2992f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     linux/arch/alpha/kernel/err_impl.h
  *
index ae54ad91e18f97c15d826047860998fb692b9a89..c0c0ccefc467b1d9b2e5df50134561227b6a55a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/err_marvel.c
  *
index 14b26c466c8996cc1e4f7e03ff4391bcbb2bc3c8..0ffb2feea42a82074ce8f77e7772bf4f629906c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/err_titan.c
  *
index d584c85fea7aa5cfd4f4fdde9f10922dd89b98ad..297476bb08fb484ccaa4f3e58b2633933b53d2c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/es1888.c
  *
index c0c7155448e08805c44ead133e2c19e5e9c4ece8..8ac0088dca546898475d88d9d29769616db37f07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/gct.c
  */
index c352499ab9f8d1432fbfea07e8e69dee411e153d..bb48a8ae4e79fd9e16a173d7fb1f9f349e2a9845 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/kernel/head.S
  *
index 19c5875ab398f930040d0ac8fda2071c9af523a8..3e3d49c254c52ef09d80c1b964530c9289d00ec7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alpha IO and memory functions.
  */
index 2f26ae74b61aeab153d2ab3acecca495e45974a0..f6d2946edbd2465c5488292ceb8b2f6f12154673 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/irq.c
  *
index 1c8625cb0e253fbc57e1b341fe48867bd7369e96..da3e10d5f7fe522d614f92d0fcc6e50140ecad39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alpha specific irq code.
  */
index e1861c77dabc209f4a4ceb2fddc8709b673713dc..5d54c076a8ae8347d5b1d6589d3314750cb36b84 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *      linux/arch/alpha/kernel/irq_i8259.c
  *
index d507a234b05da8ec6b3eefe2b07d140ac19a5e1a..16f2b0276f3a9f7b8b7b8c23df03a8fc65fe9925 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     linux/arch/alpha/kernel/irq_impl.h
  *
index 13c97a5b31e88848ad8c496ba1e2f163a7db660f..a968b10e687d58c42b1ff77da4f3a4f2b60eed86 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/irq_pyxis.c
  *
index a79fa30e75528cac1bedb940482f4388d99aca1a..bfacd6a0619410028f384df6554d2903af450d97 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Handle interrupts from the SRM, assuming no additional weirdness.
  */
index b7d69604b6d2e522b8aabc0e904c0ab78b0e637a..38f045ec5cd296a168d61b2bc2bf7734572cb28a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     linux/arch/alpha/kernel/machvec_impl.h
  *
index df0d0a5e93535d421910568dc602510249b4928f..ce3a675c0c4bd76b3a4447daa9da32c18ee1459a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/osf_sys.c
  *
index 27dcbff85613aa1716b60e2548027aea3505c2cb..63aee5d86e022e1018b37404e0d1a037093a44aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ioport.h>
 #include <asm/io.h>
 
index 25e16956fe3e473d59f38608044f73f3dd60d3c5..04353302757397ef4f0e1ce95df5c2f191feecd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _PC873xx_H_
 #define _PC873xx_H_
index 676bab6e31235db014dc1d09d741b18bd8bb8dc4..b995987b1557e1cb9e4e54bfd0546367f3e58ba4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/pci-noop.c
  *
index cbecd527c696c7a0b508c8e67e54399d8a54c38d..f94c732fedebb46b7a6f4ef9b7303adbfd5c1316 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/kernel/pci-sysfs.c
  *
index 564114eb85e143f384d1b814cc29df48150ed933..08235bb1f0356405716a22a84cd845fcf18db17f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/pci.c
  *
index 2b0ac429f5ebc4912e34b41029810fa914124479..26231601630ed7a9d0dca38e52fa2bb18910a526 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     linux/arch/alpha/kernel/pci_impl.h
  *
index 7fd2329038a3ef1664de33f4f9759ea15c56e7c7..83b34b9188ea192517ce72a0d9d260abb5b2e2ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/pci_iommu.c
  */
index 5c218aa3f3df425e1220e3d1c607b53d5c77dd55..a1f6bc7f1e4c956cfd712bb644721de20ff30004 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Hardware performance events for the Alpha.
  *
index 0b963504072167e0d37cbc80490b281a3e1fcd38..74bfb1f2d68e32b11e0d4da70da1c1fa19d58059 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/process.c
  *
index da2d6ec9c37065ca48265597cc6cd8b91f6e2796..f1fce942fddcf3ceec4a7616c0f98912934afd3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/interrupt.h>
 #include <linux/io.h>
 
index 285a82d491efb9730adc4f8c6530a6fc72384340..cb8d599e72d661a080e8012e4d3ba499b349650c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ptrace.c */
 /* By Ross Biro 1/23/92 */
 /* edited by Linus Torvalds */
index ceed68c7500bab70a18d39c55dda9c87432b7867..b3da0dcda47d7efbd2beba60248f71c638411cd4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/rtc.c
  *
index 249229ab49424fcefb9d38830280b81151a7a9db..5576f7646fb6b4b8e736e39f96b7ef1fa7c3d4bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/setup.c
  *
index 8129dd92cadc2ed012362161b560530a98094a0f..9ebb3bcbc626b20150a1f6ca31b51563a6f3042a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/signal.c
  *
index 6886b834f4871f54c6eb6fd7a232a20ca12d0d0b..733f08966fd217806593c03cbb91c994a3cc9425 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SMC 37C93X initialization code
  */
index f6726a74642703381c2151e9d927e267fcba0975..d0dccae53ba9f1ce0e5e15021d84c8cafdbd4bae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/smp.c
  *
index e9c45b65a9058672e217cbfcef50ff595b1c8e2c..5da0aec8ce904d1bacc7a4811bcb5b17f3276fcf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/srmcons.c
  *
index 118dc6af1805098e1f69439b07dc4885627a21d6..e56efd5b855fed163d93d96a7ed5b2c4c5a5b361 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_alcor.c
  *
@@ -181,10 +182,10 @@ alcor_init_irq(void)
  * comes in on.  This makes interrupt processing much easier.
  */
 
-static int __init
+static int
 alcor_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[7][5] __initdata = {
+       static char irq_tab[7][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                /* note: IDSEL 17 is XLT only */
                {16+13, 16+13, 16+13, 16+13, 16+13},    /* IdSel 17,  TULIP  */
index 4c50f8f40cbbfe73c39ffd0062d1937dd892b9a6..10bc46a4ec40b29fb2207d77f572dc6779d40dc0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_cabriolet.c
  *
@@ -173,10 +174,10 @@ pc164_init_irq(void)
  * because it is the Saturn IO (SIO) PCI/ISA Bridge Chip.
  */
 
-static inline int __init
+static inline int
 eb66p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[5][5] __initdata = {
+       static char irq_tab[5][5] = {
                /*INT  INTA  INTB  INTC   INTD */
                {16+0, 16+0, 16+5,  16+9, 16+13},  /* IdSel 6,  slot 0, J25 */
                {16+1, 16+1, 16+6, 16+10, 16+14},  /* IdSel 7,  slot 1, J26 */
@@ -203,10 +204,10 @@ eb66p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  * because it is the Saturn IO (SIO) PCI/ISA Bridge Chip.
  */
 
-static inline int __init
+static inline int
 cabriolet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[5][5] __initdata = {
+       static char irq_tab[5][5] = {
                /*INT   INTA  INTB  INTC   INTD */
                { 16+2, 16+2, 16+7, 16+11, 16+15}, /* IdSel 5,  slot 2, J21 */
                { 16+0, 16+0, 16+5,  16+9, 16+13}, /* IdSel 6,  slot 0, J19 */
@@ -287,10 +288,10 @@ cia_cab_init_pci(void)
  * 
  */
 
-static inline int __init
+static inline int
 alphapc164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[7][5] __initdata = {
+       static char irq_tab[7][5] = {
                /*INT   INTA  INTB   INTC   INTD */
                { 16+2, 16+2, 16+9,  16+13, 16+17}, /* IdSel  5, slot 2, J20 */
                { 16+0, 16+0, 16+7,  16+11, 16+15}, /* IdSel  6, slot 0, J29 */
index 6c35159bc00eb47860516bda8868801a74bbe868..d335086218207d9327df05499ded58ea2b4deeff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_dp264.c
  *
@@ -356,7 +357,7 @@ clipper_init_irq(void)
  *  10  64 bit PCI option slot 3 (not bus 0)
  */
 
-static int __init
+static int
 isa_irq_fixup(const struct pci_dev *dev, int irq)
 {
        u8 irq8;
@@ -372,10 +373,10 @@ isa_irq_fixup(const struct pci_dev *dev, int irq)
        return irq8 & 0xf;
 }
 
-static int __init
+static int
 dp264_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[6][5] __initdata = {
+       static char irq_tab[6][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {    -1,    -1,    -1,    -1,    -1}, /* IdSel 5 ISA Bridge */
                { 16+ 3, 16+ 3, 16+ 2, 16+ 2, 16+ 2}, /* IdSel 6 SCSI builtin*/
@@ -394,10 +395,10 @@ dp264_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return isa_irq_fixup(dev, irq);
 }
 
-static int __init
+static int
 monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[13][5] __initdata = {
+       static char irq_tab[13][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {    45,    45,    45,    45,    45}, /* IdSel 3 21143 PCI1 */
                {    -1,    -1,    -1,    -1,    -1}, /* IdSel 4 unused */
@@ -423,7 +424,7 @@ monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
 }
 
-static u8 __init
+static u8
 monet_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        struct pci_controller *hose = dev->sysdata;
@@ -456,10 +457,10 @@ monet_swizzle(struct pci_dev *dev, u8 *pinp)
        return slot;
 }
 
-static int __init
+static int
 webbrick_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[13][5] __initdata = {
+       static char irq_tab[13][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {    -1,    -1,    -1,    -1,    -1}, /* IdSel 7 ISA Bridge */
                {    -1,    -1,    -1,    -1,    -1}, /* IdSel 8 unused */
@@ -478,10 +479,10 @@ webbrick_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP);
 }
 
-static int __init
+static int
 clipper_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[7][5] __initdata = {
+       static char irq_tab[7][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                { 16+ 8, 16+ 8, 16+ 9, 16+10, 16+11}, /* IdSel 1 slot 1 */
                { 16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 2 slot 2 */
index ad40a425e841c2f1c99904a43c45fa2c9a281d1d..5251937ec1b469129ae16088c57248846482d61e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_eb64p.c
  *
@@ -167,10 +168,10 @@ eb64p_init_irq(void)
  * comes in on.  This makes interrupt processing much easier.
  */
 
-static int __init
+static int
 eb64p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[5][5] __initdata = {
+       static char irq_tab[5][5] = {
                /*INT  INTA  INTB  INTC   INTD */
                {16+7, 16+7, 16+7, 16+7,  16+7},  /* IdSel 5,  slot ?, ?? */
                {16+0, 16+0, 16+2, 16+4,  16+9},  /* IdSel 6,  slot ?, ?? */
index 15f42083bdb3501fc041c2e1634225674fe849b3..016f79251141a547f47f1c98c0bfc13c1ca98851 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_eiger.c
  *
@@ -141,7 +142,7 @@ eiger_init_irq(void)
        }
 }
 
-static int __init
+static int
 eiger_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        u8 irq_orig;
@@ -158,7 +159,7 @@ eiger_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return irq_orig - 0x80;
 }
 
-static u8 __init
+static u8
 eiger_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        struct pci_controller *hose = dev->sysdata;
index 608f2a7fa0a30f415e2bdef4c7424957080b8641..d0d44f543d77c9d715dfcbc5ed5913ac6dded773 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_jensen.c
  *
index 3e533920371fe1e90ffa663295f46e1c1b825273..8d34cf6e002a057cd4571eb4e6257fcca695a8e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/alpha/kernel/sys_marvel.c
  *
index d5b9776a608d91d957b8a362c3da3e8c93ccaad5..6fa07dc5339d2c70f4c969d7a77bc7246772a49b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_miata.c
  *
@@ -149,10 +150,10 @@ miata_init_irq(void)
  * comes in on.  This makes interrupt processing much easier.
  */
 
-static int __init
+static int
 miata_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-        static char irq_tab[18][5] __initdata = {
+        static char irq_tab[18][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {16+ 8, 16+ 8, 16+ 8, 16+ 8, 16+ 8},  /* IdSel 14,  DC21142 */
                {   -1,    -1,    -1,    -1,    -1},  /* IdSel 15,  EIDE    */
@@ -196,7 +197,7 @@ miata_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return COMMON_TABLE_LOOKUP;
 }
 
-static u8 __init
+static u8
 miata_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        int slot, pin = *pinp;
index 5e82dc1ad6f2dc096cdc217f9c32f46180c6a7a6..3af4f94113e1701e6729b2932a8055b3c6902201 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_mikasa.c
  *
@@ -145,10 +146,10 @@ mikasa_init_irq(void)
  * comes in on.  This makes interrupt processing much easier.
  */
 
-static int __init
+static int
 mikasa_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[8][5] __initdata = {
+       static char irq_tab[8][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {16+12, 16+12, 16+12, 16+12, 16+12},    /* IdSel 17,  SCSI */
                {   -1,    -1,    -1,    -1,    -1},    /* IdSel 18,  PCEB */
index 8ae04a121186e2b090256956b3e7e425a571e1c4..239dc0e601d536ab05d08c83dfebfcc02567a405 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_nautilus.c
  *
@@ -62,7 +63,7 @@ nautilus_init_irq(void)
        common_init_isa_dma();
 }
 
-static int __init
+static int
 nautilus_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        /* Preserve the IRQ set up by the console.  */
index 063e594fd96934f90971172c25f84fc8e9a89255..b106f327f765268541a6f4f29033eda9f3898328 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_noritake.c
  *
@@ -193,10 +194,10 @@ noritake_init_irq(void)
  * comes in on.  This makes interrupt processing much easier.
  */
 
-static int __init
+static int
 noritake_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[15][5] __initdata = {
+       static char irq_tab[15][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                /* note: IDSELs 16, 17, and 25 are CORELLE only */
                { 16+1,  16+1,  16+1,  16+1,  16+1},  /* IdSel 16,  QLOGIC */
@@ -221,7 +222,7 @@ noritake_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return COMMON_TABLE_LOOKUP;
 }
 
-static u8 __init
+static u8
 noritake_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        int slot, pin = *pinp;
index dfd510ae5d8c82701b5a5fbf278bc0af699d56a5..b76f65d0e8b54f51e3874116ebd37e4223c33bb5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_rawhide.c
  *
@@ -221,10 +222,10 @@ rawhide_init_irq(void)
  * 
  */
 
-static int __init
+static int
 rawhide_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[5][5] __initdata = {
+       static char irq_tab[5][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                { 16+16, 16+16, 16+16, 16+16, 16+16}, /* IdSel 1 SCSI PCI 1 */
                { 16+ 0, 16+ 0, 16+ 1, 16+ 2, 16+ 3}, /* IdSel 2 slot 2 */
index a3f4852571700183d033126a8b82ff46613c2943..07830cccabf995b098f203e90ec5728f9e39b62e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_ruffian.c
  *
@@ -117,10 +118,10 @@ ruffian_kill_arch (int mode)
  *
  */
 
-static int __init
+static int
 ruffian_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-        static char irq_tab[11][5] __initdata = {
+        static char irq_tab[11][5] = {
              /*INT  INTA INTB INTC INTD */
                {-1,  -1,  -1,  -1,  -1},  /* IdSel 13,  21052       */
                {-1,  -1,  -1,  -1,  -1},  /* IdSel 14,  SIO         */
@@ -139,7 +140,7 @@ ruffian_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return COMMON_TABLE_LOOKUP;
 }
 
-static u8 __init
+static u8
 ruffian_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        int slot, pin = *pinp;
index 08ee737d4fba1559c6fe09ce2cb7a98e2fc23ffe..a3db719d3c3873d788f42b50d6ba03367f5ae134 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_rx164.c
  *
@@ -142,7 +143,7 @@ rx164_init_irq(void)
  * 
  */
 
-static int __init
+static int
 rx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 #if 0
@@ -156,7 +157,7 @@ rx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
          { 16+1, 16+1, 16+6, 16+11, 16+16},      /* IdSel 10, slot 4 */
        };
 #else
-       static char irq_tab[6][5] __initdata = {
+       static char irq_tab[6][5] = {
          /*INT   INTA  INTB  INTC   INTD */
          { 16+0, 16+0, 16+6, 16+11, 16+16},      /* IdSel 5,  slot 0 */
          { 16+1, 16+1, 16+7, 16+12, 16+17},      /* IdSel 6,  slot 1 */
index 8a0aa6d67b5319c18d9ba050f4d6364d4108dc5b..3cf0d32da5d80adf41c4357a927bda5617e933c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_sable.c
  *
@@ -192,10 +193,10 @@ sable_init_irq(void)
  * with the values in the irq swizzling tables above.
  */
 
-static int __init
+static int
 sable_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[9][5] __initdata = {
+       static char irq_tab[9][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                { 32+0,  32+0,  32+0,  32+0,  32+0},  /* IdSel 0,  TULIP  */
                { 32+1,  32+1,  32+1,  32+1,  32+1},  /* IdSel 1,  SCSI   */
@@ -374,10 +375,10 @@ lynx_init_irq(void)
  * with the values in the irq swizzling tables above.
  */
 
-static int __init
+static int
 lynx_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[19][5] __initdata = {
+       static char irq_tab[19][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                {   -1,    -1,    -1,    -1,    -1},  /* IdSel 13,  PCEB   */
                {   -1,    -1,    -1,    -1,    -1},  /* IdSel 14,  PPB    */
@@ -404,7 +405,7 @@ lynx_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return COMMON_TABLE_LOOKUP;
 }
 
-static u8 __init
+static u8
 lynx_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        int slot, pin = *pinp;
index febd24eba7a6a26d7251dfdd85473d00b531669a..37bd6d9b8eb9633ba398c81be1744694abdf021c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_sio.c
  *
@@ -144,7 +145,7 @@ sio_fixup_irq_levels(unsigned int level_bits)
        outb((level_bits >> 8) & 0xff, 0x4d1);
 }
 
-static inline int __init
+static inline int
 noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        /*
@@ -165,7 +166,7 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
         * that they use the default INTA line, if they are interrupt
         * driven at all).
         */
-       static char irq_tab[][5] __initdata = {
+       static char irq_tab[][5] = {
                /*INT A   B   C   D */
                { 3,  3,  3,  3,  3}, /* idsel  6 (53c810) */ 
                {-1, -1, -1, -1, -1}, /* idsel  7 (SIO: PCI/ISA bridge) */
@@ -183,10 +184,10 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return irq >= 0 ? tmp : -1;
 }
 
-static inline int __init
+static inline int
 p2k_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[][5] __initdata = {
+       static char irq_tab[][5] = {
                /*INT A   B   C   D */
                { 0,  0, -1, -1, -1}, /* idsel  6 (53c810) */
                {-1, -1, -1, -1, -1}, /* idsel  7 (SIO: PCI/ISA bridge) */
index d063b360efedc49d7690af17d87d39a93205f56d..1ec638a2746a055ea6ca6d0560b035b727c19f1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_sx164.c
  *
@@ -94,10 +95,10 @@ sx164_init_irq(void)
  *   9  32 bit PCI option slot 3
  */
 
-static int __init
+static int
 sx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[5][5] __initdata = {
+       static char irq_tab[5][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                { 16+ 9, 16+ 9, 16+13, 16+17, 16+21}, /* IdSel 5 slot 2 J17 */
                { 16+11, 16+11, 16+15, 16+19, 16+23}, /* IdSel 6 slot 0 J19 */
index dd0f1eae3c68d27122718485760ce2f2db276bf2..e230c68640883e3733059a99e3dfc7c83140677a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_takara.c
  *
@@ -155,10 +156,10 @@ takara_init_irq(void)
  * assign it whatever the hell IRQ we like and it doesn't matter.
  */
 
-static int __init
+static int
 takara_map_irq_srm(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[15][5] __initdata = {
+       static char irq_tab[15][5] = {
                { 16+3, 16+3, 16+3, 16+3, 16+3},   /* slot  6 == device 3 */
                { 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot  7 == device 2 */
                { 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot  8 == device 1 */
@@ -210,7 +211,7 @@ takara_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return COMMON_TABLE_LOOKUP;
 }
 
-static u8 __init
+static u8
 takara_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        int slot = PCI_SLOT(dev->devfn);
index a53cf03f49d503cee6e17f043e851d07b847c882..c8390d8de14003849665a154bf251d590b210bda 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/alpha/kernel/sys_titan.c
  *
index ee1874887776bd5c732ce6c964cbe8cb7154d8ef..8e64052811abc7701a89e56ac7fb660a84096729 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/sys_wildfire.c
  *
@@ -288,10 +289,10 @@ wildfire_device_interrupt(unsigned long vector)
  *   7  64 bit PCI 1 option slot 7
  */
 
-static int __init
+static int
 wildfire_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       static char irq_tab[8][5] __initdata = {
+       static char irq_tab[8][5] = {
                /*INT    INTA   INTB   INTC   INTD */
                { -1,    -1,    -1,    -1,    -1}, /* IdSel 0 ISA Bridge */
                { 36,    36,    36+1, 36+2, 36+3}, /* IdSel 1 SCSI builtin */
index 5b4514abb23450998515530ebc824ae1857f27b9..1374e591511f2fadb5615408dca457f9309b5817 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/kernel/systbls.S
  *
index 3bfe058d75d996796ff8992962a1fcb2632b6311..0069360697eeac6c0bb1362f0cf48cb81dbd859a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/kernel/time.c
  *
index 49d3b1e63ce5e2cd0423dff25728ed54c2592de1..4bd99a7b1c41f43e17be62cc09e1d45fd917d059 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/kernel/traps.c
  *
index cebecfb76fbf6e87e02836651d5b7279cff00350..c4b5ceceab52f6a4cea05221cd0f06cb30de79bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/thread_info.h>
 #include <asm/cache.h>
index a8081596036457af2149b37d356c64f2f1e7acc6..04f9729de57c351c7e142b9aab9d9bca0878a2f3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for alpha-specific library files..
 #
index 6093addc931a5bf3dec4d7c13f6cf84c88417e39..b13c4a231f1b7fd088d2338585beb28fd5de8faa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     arch/alpha/lib/callback_srm.S
  */
index b57f8007db14f78565200134f6f519165d3970ea..3f35c3ed694886547e37825d95e6892ed5bee425 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/lib/checksum.c
  *
index 263d7393c0e7a83fd15e570bb171bc726b55afbc..ce02de7b049347b99c7eed9ee7c7deceb41af895 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/clear_page.S
  *
index 006f469fef73a65923605d0f61d5a528be6edb7e..db6c6ca45896c8d3b643cf61df2bf935e8d5a8b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/clear_user.S
  * Contributed by Richard Henderson <rth@tamu.edu>
index 2ee0bd0508c5943aa8eb64e074b6f5bb86de3920..5439a30c77d069ac50c7c97ab333e92d5b378ae1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/copy_page.S
  *
index c277a1a4383e5fbb4bbb76b8c2c7802b8bbd6a26..32ab0344b1853cf2032e76bd8cdbdceaf4454b03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/copy_user.S
  *
index e74b4544b0cce0962dd9715f063224a89ed066d4..c7b213ab01abbc35dc32da97c600351b7b1513cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/csum_ipv6_magic.S
  * Contributed by Richard Henderson <rth@tamu.edu>
index ab42afba17200daafdc23b4c77eacbc50048a0a2..ddb9c2f376fa2965035311f48b77e049581ed982 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * csum_partial_copy - do IP checksumming and copy
  *
index e6d071015f9bf680129e6bd063b2610b64cc30fd..be66121312774918505fc1cd3fd9b85463799e30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/dbg_current.S
  * Contributed by Richard Henderson (rth@cygnus.com)
index 78f6b924ad8f18f5502b555b4a58b85b5748be44..b3b6fc94f7f321439f60ba0bcb853eb0af9636a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/dbg_stackcheck.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index c1e40a1a43d5f82d9b9f556341b7bc21f189912e..6d9197e52a425af943920556f8572b21e5b548cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/dbg_stackkill.S
  * Contributed by Richard Henderson (rth@cygnus.com)
index 4221b40167eed5b85284e6d9bc831cdc31094666..a117707f57fe2a5d9008bc7a208f5792791166de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/lib/dec_and_lock.c
  *
index 1e33bd1276213493b44c37acb877de57870cb445..2b60eb45e50b68993b6225c8c7f23cacedd00651 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/divide.S
  *
index abe99e69a1945a2bac7ce4062bd43a7503c52907..325864c81586daa94d1b04534ed54016fadad6d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-clear_page.S
  *
index e179e4757ef89df85eea2ecb79cd0a2cecce42e2..7e644f83cdf2905807b15b6cd788770c1be732d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-clear_user.S
  * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
index 77935061bddbb652c746938de8e8875239330cab..fd7212c8dcf1848533ed8dc07c2f19c6a7aa673e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-copy_page.S
  *
index 954ca03ebebef371a4e1dd873efce4493de53309..f3e43375439743c54a2e58b2e7928339f50642bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-copy_user.S
  *
index de62627ac4fe1dce24f68cf94df29afb9099a35d..9a73f90700a13a63cb3929d9ba3db7daab0250fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-csum_ipv6_magic.S
  * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
index d18dc0e96e3d7987f0d2b977406a36ef4889b8d7..137ff1a07356311d598cd8c254cb8214c8707ec7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-divide.S
  *
index 419adc53ccb4e599217aedd3bdb9a6af43bab400..56bf9e14eeeefadf510cbe4d52fba27c0f1f5701 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-memchr.S
  *
index b19798b2efc09a30fce801eda1587e817fcb434b..ffbd056b6eb2905d72d01b6f5bc65d9ac4a06340 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-memcpy.S
  * 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
index fed21c6893e8e7c295fcaeac56d0b70bb6051133..316a99aa9efe5896df8612643d67825b9215ece4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-memset.S
  *
index 4643ff2ffc8d1871b63c068a96935933c7b9e3c1..65f5f7310d802d8f98cf91c61667a82fa367a9ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-stxcpy.S
  * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
index 1aa6e97e04b5c72df684a2aefa9f1a3f08117ca0..76da205282eec7aa1115568beb1f16f184e4a08d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev6-stxncpy.S
  * 21264 version contributed by Rick Gorton <rick.gorton@api-networks.com>
index b69f60419be1bc940c81dac67fdd78b1932c8fb9..ec3096a9e8d409558f7a29d19868688f7971dc81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev67-strcat.S
  * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
index ea8f2f35db9cef2487524b93038885ed9b71ce94..fbf89e0b6dc3b7bbb70560f1852728c01f3bf26d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev67-strchr.S
  * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
index 736fd41884a8c11ba44b5b057f23c46e4908c521..b73106ffbbc7c7e32e286a92ec9f2cc276038bfd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev67-strlen.S
  * 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
index cd35cbade73ae8f46fcf7efff8763646e92efbf4..ceb0ca528789aa67026ed17e1e2b6db7245de242 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev67-strncat.S
  * 21264 version contributed by Rick Gorton <rick.gorton@api-networks.com>
index 747455f0328cf35bfaeac86ac56101d70e841016..7f80e398530f564666cfac6f8b1fa8c836b028d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/ev67-strrchr.S
  * 21264 version by Rick Gorton <rick.gorton@alpha-processor.com>
index ddd048c0d825a0fd7597f2b82096f383368ff859..02e156776645d556433ade0dd05046adfcd5edca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* 
  * arch/alpha/lib/fls.c
  */
index 4aa6dbfa14eecce36fcafcf800e79c4f0a93ee84..34fea465645ba4f76111cd6b4844c68af3ae4bf6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/alpha/lib/fpreg.c
  *
index 57d9291ad172c6a2660104a6af6d4392efac1efb..cbac3dc6d9635840f99c8c71c23a94edde76cc24 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/lib/memcpy.c
  *
index 6872c85cb5e54d35125ebb8bc61b47fa26f33785..42d1922d0edfca212abebd5bbc674257723ba0ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/memmove.S
  *
index f824969e9e77a61eb2750cf82c41c8da3d0e2557..00393e30df259150a5bafe4d0e370987c3fce1e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/arch/alpha/lib/memset.S
  *
index 31b53c49435ec20811b01bd8774e1939e0788c92..6276eed76276b2864cf121546c560c585a657a56 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     arch/alpha/lib/srm_printk.c
  */
index 7b60a6f75a786a7ec40603fca1b26f62ee5ab9d4..df7991f6fc694db01a434986cd9a7e7a4c68832f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     arch/alpha/lib/srm_puts.c
  */
index 5e832161e6d2ff00fc7c83b3e2d7361347d67c3c..62454a7810e275c92b3a3ad523c023eac562af46 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 
 typedef unsigned int instr;
index 249837b03d4b9958d9131ca1cd2a9ab8c02f75a7..055877dccd276869895b8a48ad6d6c2590c019e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strcat.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 7412a173ea393617f1b65022b06bc8cbfe5b627e..17871dd00280489f80b381a2610ca9b547058c9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strchr.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 98deae1e4d085d5dfb54210aeeb854b6328af6a5..cb74ad23a90df8a79a38ea157ac434bc7a7ac567 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strcpy.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 79c416f71bacd5704a8d9f6a2841b9cb9566606b..dd882fe4d7e3076469dbdba9d6c3a6135583c75a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * strlen.S (c) 1995 David Mosberger (davidm@cs.arizona.edu)
  *
index 6c29ea60869ae4c3a3d3c4bff10839b1a764e67d..522fee3e26ac148f8d0175f1964d7f586aa2fb64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strncat.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index e102cf1567ddd21314efd9d1fd1f8725cb538410..cc57fad8b7ca7728c28824dbc506357a562b3b8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strncpy.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 4bc6cb4b9812e1e42a2ac2db7df182cd9810dafb..7650ba99b7e2c877cb26d97351fa09bfe50b0e5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/strrchr.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 2a8d51bfc05dc8719f777b81f3ade6b756923466..58723b0a36d4a12c7c28e8be821876152f2b8584 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/stxcpy.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index 3dece25283a317f418000261029692756a069ed0..011d9091c6e16deb49f8d7b76c47e384bf599b23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/alpha/lib/stxncpy.S
  * Contributed by Richard Henderson (rth@tamu.edu)
index f2d81ff38aa6474f6443412889443cfb4904b3e0..8736482634309c2957c85d34dd3010ab18c5ba33 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1993, 2000 Linus Torvalds
  *
index f53707f7745569c3a1ab48526ccf5d6753a1221e..ae30f3417522673f88b7b8402f7ba64c249de628 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/types.h>
index c25e8827e7cd03ef1c46147dbe553916c9c05fe1..cd3c572ee9127f55e5a3079ac7fd7f8566eee8e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/mm/fault.c
  *
index 0542e973c73dcf483bc662e989ac0f58b8c7531c..9d74520298abb3bc6d04302a8a0ce1fdaf171b23 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/mm/init.c
  *
index d543d71c28b4e4ce08e30587e41bae3786a35f7f..a9e86475f169c15056cb7891a261f49c071fabfa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/alpha/mm/numa.c
  *
index 3473de751b03b7d033bb9dca3407e94b8edec2be..79f32820a42f8367e811c7c2d9a0e78365cd096a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Werror -Wno-sign-compare
 
 obj-$(CONFIG_OPROFILE) += oprofile.o
index a598641eed98ef4d60dc65a25a4279a70be7e134..c84e67fdea095cbed225edac052f4ce07007abb9 100644 (file)
@@ -24,7 +24,7 @@ config ARC
        select GENERIC_SMP_IDLE_THREAD
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_TRACEHOOK
-       select HAVE_FUTEX_CMPXCHG
+       select HAVE_FUTEX_CMPXCHG if FUTEX
        select HAVE_IOREMAP_PROT
        select HAVE_KPROBES
        select HAVE_KRETPROBES
index ff6a4b5ce92781442aa10f37537d0d6afb1d15f3..03da1a6b307213e4d051b9a80a5ab758851944b5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 3a4b52b7e09d61456daf12335e7e5b7c75ec7077..d37f49d6a27f40f65d3e34bd3e2df5343a97d1e4 100644 (file)
@@ -6,8 +6,6 @@
 # published by the Free Software Foundation.
 #
 
-UTS_MACHINE := arc
-
 ifeq ($(CROSS_COMPILE),)
 ifndef CONFIG_CPU_BIG_ENDIAN
 CROSS_COMPILE := arc-linux-
index f94cf151e06ab2e142bbf2b867ae8a2de0e255af..538b92f4dd2530459c190c80517412200a46bd6e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 targets := vmlinux.bin vmlinux.bin.gz uImage
 
 # uImage build relies on mkimage being availble on your host for ARC target
index a09f11b71e663d59f5f636339c0fb24704563b34..83c9e076ef6309f7b6d49fd43764eb6a2342bad5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Built-in dtb
 builtindtb-y           := nsim_700
 
index 2367a67c5f10bd3e99ce757dafed25dfa95ecb35..e114000a84f56c9e07ddd3a2e623c4dfeb3df6a2 100644 (file)
 
                        mmcclk: mmcclk {
                                compatible = "fixed-clock";
-                               clock-frequency = <50000000>;
+                               /*
+                                * DW sdio controller has external ciu clock divider
+                                * controlled via register in SDIO IP. It divides
+                                * sdio_ref_clk (which comes from CGU) by 16 for
+                                * default. So default mmcclk clock (which comes
+                                * to sdk_in) is 25000000 Hz.
+                                */
+                               clock-frequency = <25000000>;
                                #clock-cells = <0>;
                        };
 
index 229d13adbce426c1690684f7e8dcb344a001429d..8f627c200d609148c55731aac99b2a353e72f126 100644 (file)
@@ -12,6 +12,7 @@
 /dts-v1/;
 
 #include <dt-bindings/net/ti-dp83867.h>
+#include <dt-bindings/reset/snps,hsdk-reset.h>
 
 / {
        model = "snps,hsdk";
                };
        };
 
-       core_clk: core-clk {
+       input_clk: input-clk {
                #clock-cells = <0>;
                compatible = "fixed-clock";
-               clock-frequency = <500000000>;
+               clock-frequency = <33333333>;
        };
 
        cpu_intc: cpu-interrupt-controller {
 
                ranges = <0x00000000 0xf0000000 0x10000000>;
 
+               cgu_rst: reset-controller@8a0 {
+                       compatible = "snps,hsdk-reset";
+                       #reset-cells = <1>;
+                       reg = <0x8A0 0x4>, <0xFF0 0x4>;
+               };
+
+               core_clk: core-clk@0 {
+                       compatible = "snps,hsdk-core-pll-clock";
+                       reg = <0x00 0x10>, <0x14B8 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&input_clk>;
+               };
+
                serial: serial@5000 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x5000 0x100>;
 
                mmcclk_ciu: mmcclk-ciu {
                        compatible = "fixed-clock";
-                       clock-frequency = <100000000>;
+                       /*
+                        * DW sdio controller has external ciu clock divider
+                        * controlled via register in SDIO IP. Due to its
+                        * unexpected default value (it should divide by 1
+                        * but it divides by 8) SDIO IP uses wrong clock and
+                        * works unstable (see STAR 9001204800)
+                        * We switched to the minimum possible value of the
+                        * divisor (div-by-2) in HSDK platform code.
+                        * So add temporary fix and change clock frequency
+                        * to 50000000 Hz until we fix dw sdio driver itself.
+                        */
+                       clock-frequency = <50000000>;
                        #clock-cells = <0>;
                };
 
                        clocks = <&gmacclk>;
                        clock-names = "stmmaceth";
                        phy-handle = <&phy0>;
+                       resets = <&cgu_rst HSDK_ETH_RESET>;
+                       reset-names = "stmmaceth";
 
                        mdio {
                                #address-cells = <1>;
index 6980b966a36403b6170130fa1389ea9fb66095b8..ec7c849a5c8e9887fbd60acf176f194cc0c4ba03 100644 (file)
@@ -105,7 +105,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index 2233f5777a71f82cb5defb9ae99bbfc11772fdac..63d3cf69e0b02efe45fca035649951836fc1e948 100644 (file)
@@ -104,7 +104,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index 30a3d4cf53d20af6f202a61e3f5a980e7f1e7c2e..f613ecac14a750e6008dc817d3a06727a4631989 100644 (file)
@@ -107,7 +107,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index 821a2e562f3f12422844556630d7136ad63097a8..3507be2af6fe3684f4acca6de7009903da82b97e 100644 (file)
@@ -84,5 +84,5 @@ CONFIG_TMPFS=y
 CONFIG_NFS_FS=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 # CONFIG_DEBUG_PREEMPT is not set
index 9a3fcf44638820d905895b2bf0ba5a6f18511f4c..7b8f8faf8a24315d3379d189cab69506539e04a8 100644 (file)
@@ -72,7 +72,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index c0d6a010751a9f80e4139fa6a9b833de4b24b6a8..4fcf4f2503f61a9e802b82e2cbb4aad9617725d8 100644 (file)
@@ -94,7 +94,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_SHIRQ=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index 5c0971787acf4c18066c4bc537f36c1dae37232f..7b71464f6c2f2904e18893d8ba80c65471fc4ef5 100644 (file)
@@ -98,7 +98,7 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_SHIRQ=y
-CONFIG_LOCKUP_DETECTOR=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_PREEMPT is not set
index 353dae386b2fa86d8dcff6f2f6204638780c1b41..cd8398daccee886187d3fb1b001e6fe66ed090bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 generic-y += bugs.h
 generic-y += clkdev.h
 generic-y += device.h
index ba8e802dba80bd0776508ff70945e6e8b54ea43e..b1c56d35f2a938e59c9677454499aeecb1da4f7e 100644 (file)
@@ -98,6 +98,7 @@
 
 /* Auxiliary registers */
 #define AUX_IDENTITY           4
+#define AUX_EXEC_CTRL          8
 #define AUX_INTR_VEC_BASE      0x25
 #define AUX_VOL                        0x5e
 
@@ -135,12 +136,12 @@ struct bcr_identity {
 #endif
 };
 
-struct bcr_isa {
+struct bcr_isa_arcv2 {
 #ifdef CONFIG_CPU_BIG_ENDIAN
        unsigned int div_rem:4, pad2:4, ldd:1, unalign:1, atomic:1, be:1,
-                    pad1:11, atomic1:1, ver:8;
+                    pad1:12, ver:8;
 #else
-       unsigned int ver:8, atomic1:1, pad1:11, be:1, atomic:1, unalign:1,
+       unsigned int ver:8, pad1:12, be:1, atomic:1, unalign:1,
                     ldd:1, pad2:4, div_rem:4;
 #endif
 };
@@ -263,13 +264,13 @@ struct cpuinfo_arc {
        struct cpuinfo_arc_mmu mmu;
        struct cpuinfo_arc_bpu bpu;
        struct bcr_identity core;
-       struct bcr_isa isa;
+       struct bcr_isa_arcv2 isa;
        const char *details, *name;
        unsigned int vec_base;
        struct cpuinfo_arc_ccm iccm, dccm;
        struct {
                unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2,
-                            fpu_sp:1, fpu_dp:1, pad2:6,
+                            fpu_sp:1, fpu_dp:1, dual_iss_enb:1, dual_iss_exist:1, pad2:4,
                             debug:1, ap:1, smart:1, rtt:1, pad3:4,
                             timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
        } extn;
index ac85380d14a4bb364bb9077e8c8b329f862845b8..257a68f3c2feef3a369093f5bade883e814b7648 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __ASM_ARC_ENTRY_ARCV2_H
 #define __ASM_ARC_ENTRY_ARCV2_H
index bd3f68c9ddfcaa25c6320dcc3eb0c8f3afcb0fa1..dc2e303cdbbb4d579fb250eb8c07da783d559ff0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index d400a2161935de5442c0ae1ddc7159ae16c003a4..8ee41e9881690b648bf1d4e5c385ddeef0a860c2 100644 (file)
@@ -78,9 +78,6 @@ struct task_struct;
 
 #endif
 
-#define copy_segments(tsk, mm)      do { } while (0)
-#define release_segments(mm)        do { } while (0)
-
 #define KSTK_EIP(tsk)   (task_pt_regs(tsk)->ret)
 #define KSTK_ESP(tsk)   (task_pt_regs(tsk)->sp)
 
index ea5ca444c7e3f2731bde6e21fe0b79273ece2f89..5540111531c7fae75eb617e4fbe6aa7accd2bec4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 51c73f0255b39d281b8ed580b39fd90ea06ae0a9..0e4f2affc7e9c93838dcdd4ed86cfa6dbbc9ce64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 06d95e611616a3f6ab884848f19cd065fb6a8680..3c1dae4e5aad857f778f909e5ae4c13622b8de12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 059aff38f10ab46892470a87e60ddd59e627d710..2a97e2718a219c72b1bfca8ab0ac5bd83ca7ed36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index dd206e6b482c11b2f605be711eb1ac8f9b2f9e47..2a6eff57f6dd814c9fa4797c366e228d7a397502 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 9678a11fc1582688e8543c97a91014e50ea3f6b0..95f8a4380e110dbab3fac6cd7dbec8aa1ad4af11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index fad62f7f42d6a730f07d4618e5eed8cdc8ad39d0..ba3143a1b37539b37e74f951e6f32be907ecd7f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 71f3918b0fc304bd0eeadb024bcbf9fa3ba32418..02109cd48ee1298b8a2d6da2eda5611b0d7d9643 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 9a34136d84b2c77b45ee3b3b7a739f2d994151d4..517178b1daef30f5c6c89fbcb3362ad38c12543f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  *
index 877cec8f5ea21256e233f4f353882ff02097537a..fb83844daeea3550aacd27de2525711a6aa5fddc 100644 (file)
@@ -51,6 +51,7 @@ static const struct id_to_str arc_cpu_rel[] = {
        { 0x51, "R2.0" },
        { 0x52, "R2.1" },
        { 0x53, "R3.0" },
+       { 0x54, "R4.0" },
 #endif
        { 0x00, NULL   }
 };
@@ -62,6 +63,7 @@ static const struct id_to_str arc_cpu_nm[] = {
 #else
        { 0x40, "ARC EM"  },
        { 0x50, "ARC HS38"  },
+       { 0x54, "ARC HS48"  },
 #endif
        { 0x00, "Unknown"   }
 };
@@ -119,11 +121,11 @@ static void read_arc_build_cfg_regs(void)
        struct bcr_generic bcr;
        struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
        const struct id_to_str *tbl;
+       struct bcr_isa_arcv2 isa;
 
        FIX_PTR(cpu);
 
        READ_BCR(AUX_IDENTITY, cpu->core);
-       READ_BCR(ARC_REG_ISA_CFG_BCR, cpu->isa);
 
        for (tbl = &arc_cpu_rel[0]; tbl->id != 0; tbl++) {
                if (cpu->core.family == tbl->id) {
@@ -133,7 +135,7 @@ static void read_arc_build_cfg_regs(void)
        }
 
        for (tbl = &arc_cpu_nm[0]; tbl->id != 0; tbl++) {
-               if ((cpu->core.family & 0xF0) == tbl->id)
+               if ((cpu->core.family & 0xF4) == tbl->id)
                        break;
        }
        cpu->name = tbl->str;
@@ -192,6 +194,14 @@ static void read_arc_build_cfg_regs(void)
                cpu->bpu.full = bpu.ft;
                cpu->bpu.num_cache = 256 << bpu.bce;
                cpu->bpu.num_pred = 2048 << bpu.pte;
+
+               if (cpu->core.family >= 0x54) {
+                       unsigned int exec_ctrl;
+
+                       READ_BCR(AUX_EXEC_CTRL, exec_ctrl);
+                       cpu->extn.dual_iss_exist = 1;
+                       cpu->extn.dual_iss_enb = exec_ctrl & 1;
+               }
        }
 
        READ_BCR(ARC_REG_AP_BCR, bcr);
@@ -205,18 +215,25 @@ static void read_arc_build_cfg_regs(void)
 
        cpu->extn.debug = cpu->extn.ap | cpu->extn.smart | cpu->extn.rtt;
 
+       READ_BCR(ARC_REG_ISA_CFG_BCR, isa);
+
        /* some hacks for lack of feature BCR info in old ARC700 cores */
        if (is_isa_arcompact()) {
-               if (!cpu->isa.ver)      /* ISA BCR absent, use Kconfig info */
+               if (!isa.ver)   /* ISA BCR absent, use Kconfig info */
                        cpu->isa.atomic = IS_ENABLED(CONFIG_ARC_HAS_LLSC);
-               else
-                       cpu->isa.atomic = cpu->isa.atomic1;
+               else {
+                       /* ARC700_BUILD only has 2 bits of isa info */
+                       struct bcr_generic bcr = *(struct bcr_generic *)&isa;
+                       cpu->isa.atomic = bcr.info & 1;
+               }
 
                cpu->isa.be = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN);
 
                 /* there's no direct way to distinguish 750 vs. 770 */
                if (unlikely(cpu->core.family < 0x34 || cpu->mmu.ver < 3))
                        cpu->name = "ARC750";
+       } else {
+               cpu->isa = isa;
        }
 }
 
@@ -232,10 +249,11 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
                       "\nIDENTITY\t: ARCVER [%#02x] ARCNUM [%#02x] CHIPID [%#4x]\n",
                       core->family, core->cpu_id, core->chip_id);
 
-       n += scnprintf(buf + n, len - n, "processor [%d]\t: %s %s (%s ISA) %s\n",
+       n += scnprintf(buf + n, len - n, "processor [%d]\t: %s %s (%s ISA) %s%s%s\n",
                       cpu_id, cpu->name, cpu->details,
                       is_isa_arcompact() ? "ARCompact" : "ARCv2",
-                      IS_AVAIL1(cpu->isa.be, "[Big-Endian]"));
+                      IS_AVAIL1(cpu->isa.be, "[Big-Endian]"),
+                      IS_AVAIL3(cpu->extn.dual_iss_exist, cpu->extn.dual_iss_enb, " Dual-Issue"));
 
        n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s%s%s\nISA Extn\t: ",
                       IS_AVAIL1(cpu->extn.timer0, "Timer0 "),
index f46267153ec2e971bb4b81e2513835d2ee2be635..6df9d94a953763eca43b20f02f1897308ab1ee7a 100644 (file)
@@ -23,6 +23,8 @@
 #include <linux/cpumask.h>
 #include <linux/reboot.h>
 #include <linux/irqdomain.h>
+#include <linux/export.h>
+
 #include <asm/processor.h>
 #include <asm/setup.h>
 #include <asm/mach_desc.h>
@@ -30,6 +32,9 @@
 #ifndef CONFIG_ARC_HAS_LLSC
 arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED;
 arch_spinlock_t smp_bitops_lock = __ARCH_SPIN_LOCK_UNLOCKED;
+
+EXPORT_SYMBOL_GPL(smp_atomic_ops_lock);
+EXPORT_SYMBOL_GPL(smp_bitops_lock);
 #endif
 
 struct plat_smp_ops  __weak plat_smp_ops;
index 9d6c1ca26af6d8bf4c035ae5f6085d8bfb6bc0be..fddecc76efb7c3e5146f6ceea2aed79f8484aa6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/syscalls.h>
 #include <linux/signal.h>
index ce417a6e70b849b6de0bbd5feb94dba144f1407b..698367bb41d03251ec73aa78bbe70067b42cd82d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index f1ac6790da5fe64782b59b720bf3ea80d999bff1..cf14ebc36916a2a0eca39728c0cc0f315d58bbeb 100644 (file)
@@ -111,6 +111,13 @@ static void __init axs10x_early_init(void)
 
        axs10x_enable_gpio_intc_wire();
 
+       /*
+        * Reset ethernet IP core.
+        * TODO: get rid of this quirk after axs10x reset driver (or simple
+        * reset driver) will be available in upstream.
+        */
+       iowrite32((1 << 5), (void __iomem *) CREG_MB_SW_RESET);
+
        scnprintf(mb, 32, "MainBoard v%d", mb_rev);
        axs10x_print_board_ver(CREG_MB_VER, mb);
 }
index e151e2067886ea52ec75d151210c9e71a4ec0a81..8eff057efcaebeae04b1fb801c003418090551eb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
index 5a6ed5afb009a160e617a5e2fd81f1be6f56fcd3..19ab3cf98f0f34904b8431a6d4cf36642066c513 100644 (file)
@@ -6,4 +6,6 @@
 #
 
 menuconfig ARC_SOC_HSDK
-       bool "ARC HS Development Kit SOC"
+       bool "ARC HS Development Kit SOC"
+       select CLK_HSDK
+       select RESET_HSDK
index a2e7fd17e36d36a4e0f29c183834ae349e5a8786..fd0ae5e38639a8756c86d7882c6e74c88f0e07e5 100644 (file)
@@ -38,6 +38,46 @@ static void __init hsdk_init_per_cpu(unsigned int cpu)
 #define CREG_PAE               (CREG_BASE + 0x180)
 #define CREG_PAE_UPDATE                (CREG_BASE + 0x194)
 
+#define CREG_CORE_IF_CLK_DIV   (CREG_BASE + 0x4B8)
+#define CREG_CORE_IF_CLK_DIV_2 0x1
+#define CGU_BASE               ARC_PERIPHERAL_BASE
+#define CGU_PLL_STATUS         (ARC_PERIPHERAL_BASE + 0x4)
+#define CGU_PLL_CTRL           (ARC_PERIPHERAL_BASE + 0x0)
+#define CGU_PLL_STATUS_LOCK    BIT(0)
+#define CGU_PLL_STATUS_ERR     BIT(1)
+#define CGU_PLL_CTRL_1GHZ      0x3A10
+#define HSDK_PLL_LOCK_TIMEOUT  500
+
+#define HSDK_PLL_LOCKED() \
+       !!(ioread32((void __iomem *) CGU_PLL_STATUS) & CGU_PLL_STATUS_LOCK)
+
+#define HSDK_PLL_ERR() \
+       !!(ioread32((void __iomem *) CGU_PLL_STATUS) & CGU_PLL_STATUS_ERR)
+
+static void __init hsdk_set_cpu_freq_1ghz(void)
+{
+       u32 timeout = HSDK_PLL_LOCK_TIMEOUT;
+
+       /*
+        * As we set cpu clock which exceeds 500MHz, the divider for the interface
+        * clock must be programmed to div-by-2.
+        */
+       iowrite32(CREG_CORE_IF_CLK_DIV_2, (void __iomem *) CREG_CORE_IF_CLK_DIV);
+
+       /* Set cpu clock to 1GHz */
+       iowrite32(CGU_PLL_CTRL_1GHZ, (void __iomem *) CGU_PLL_CTRL);
+
+       while (!HSDK_PLL_LOCKED() && timeout--)
+               cpu_relax();
+
+       if (!HSDK_PLL_LOCKED() || HSDK_PLL_ERR())
+               pr_err("Failed to setup CPU frequency to 1GHz!");
+}
+
+#define SDIO_BASE              (ARC_PERIPHERAL_BASE + 0xA000)
+#define SDIO_UHS_REG_EXT       (SDIO_BASE + 0x108)
+#define SDIO_UHS_REG_EXT_DIV_2 (2 << 30)
+
 static void __init hsdk_init_early(void)
 {
        /*
@@ -52,6 +92,18 @@ static void __init hsdk_init_early(void)
 
        /* Really apply settings made above */
        writel(1, (void __iomem *) CREG_PAE_UPDATE);
+
+       /*
+        * Switch SDIO external ciu clock divider from default div-by-8 to
+        * minimum possible div-by-2.
+        */
+       iowrite32(SDIO_UHS_REG_EXT_DIV_2, (void __iomem *) SDIO_UHS_REG_EXT);
+
+       /*
+        * Setup CPU frequency to 1GHz.
+        * TODO: remove it after smart hsdk pll driver will be introduced.
+        */
+       hsdk_set_cpu_freq_1ghz();
 }
 
 static const char *hsdk_compat[] __initconst = {
index 7888c9803eb00b3ad1d166923182d5d1f4294bda..d1346a16076033acb8d3d60e5de846d7ee2e0e3b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARM
        bool
        default y
index b7576349528c12a8ef7533b6b66bc9a68b8dc9f9..22f34c423be68a92b6435c6f0ebd2766d4de4380 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Kconfig for uClinux(non-paged MM) depend configurations
 # Hyok S. Choi <hyok.choi@samsung.com>
index 6dcea8e8e941eabe79790f97e3e8f69ccd3220e9..954ba8b810521296e5fb6e1800deab756aa41c12 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 47d3a1ab08d2491aff178040b309180226d131e8..36ae4454554ce1a11cc65848c60569bf8b3e0abe 100644 (file)
@@ -44,10 +44,12 @@ endif
 
 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
 KBUILD_CPPFLAGS        += -mbig-endian
+CHECKFLAGS     += -D__ARMEB__
 AS             += -EB
 LD             += -EB
 else
 KBUILD_CPPFLAGS        += -mlittle-endian
+CHECKFLAGS     += -D__ARMEL__
 AS             += -EL
 LD             += -EL
 endif
@@ -131,7 +133,7 @@ endif
 KBUILD_CFLAGS  +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
 KBUILD_AFLAGS  +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
 
-CHECKFLAGS     += -D__arm__
+CHECKFLAGS     += -D__arm__ -m32
 
 #Default value
 head-y         := arch/arm/kernel/head$(MMUEXT).o
index 5e4acd253b300db5ed40af0f9a424b0493f4de6c..83e1a076a5d64a095d558d214f541f9407e027fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/arm/boot/bootp/Makefile
 #
index d81ea183785cdc74bdd5fe8fd3bab826283bcaab..dd3d04971c42123581569003992286fe03e0e9ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .type   initrd_start,#object
        .globl  initrd_start
 initrd_start:
index b87a25c7ef887a06db2e51e88ef01f196256424b..dc6236c173d241267021eed2245434e2826ad077 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .globl  kernel_start
 kernel_start:
        .incbin "arch/arm/boot/zImage"
index d50430c40045dd3e43fe37abf63f11a011e4c687..a5889238fc9fc6fe6f3c2dc1b2c7e172fc597594 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/arm/boot/compressed/Makefile
 #
index 9448aa0c66869d807751407a5243f8664e6a1b1a..41fa7316c52b9014b63bae76896a4288b5ff4e30 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/setup.h>
 #include <libfdt.h>
 
index 25ab26f1c6f0334b1a2ce687db00e34ed5e67325..88e2a88d324b2535a6610c1a914e81ef3a010b8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/arm/boot/compressed/big-endian.S
  *
index 5392ee63338fac3453f30b125366e03241158133..6bf2917a46214f09215e35debe7ddfdc5df4d5d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
@@ -23,7 +24,11 @@ ENTRY(putc)
        strb    r0, [r1]
        mov     r0, #0x03               @ SYS_WRITEC
    ARM(        svc     #0x123456       )
+#ifdef CONFIG_CPU_V7M
+ THUMB(        bkpt    #0xab           )
+#else
  THUMB(        svc     #0xab           )
+#endif
        mov     pc, lr
        .align  2
 1:     .word   _GLOBAL_OFFSET_TABLE_ - .
index f3a4bedd1afc15121e72a22f13a6287a4d46bb8f..a2ac3fe7dbf8ab4e355e0ce43147d0fd689d6ebe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _LINUX_STRING_H_
 
 #include <linux/compiler.h>    /* for inline */
index 3115e313d9f65a31ad746b7d8d282741a5b1f765..95abdd850fe35bcb2257b4449e0112cd9b478aa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * linux/arch/arm/boot/compressed/head-sa1100.S
  * 
index eb0084ea1ec49e15760be80ff818d6172291fdb8..992e784500fa6ea4e8ef44843d8a410ba2376c3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/arch/arm/boot/compressed/head-sharpsl.S
  *
index 6ab0599c02dda7ff89c24ca944b25b56a9f09cf0..20fa44d59f82db667c6572b78905afd3296536ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/arch/arm/boot/compressed/head-xscale.S
  *
index 17ae0f3efac8e71d45043252e32298772ee43237..07437816e0986876079aa64e9ae6450c2d45d763 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARM_LIBFDT_ENV_H
 #define _ARM_LIBFDT_ENV_H
 
index d4f891f5699655efd8dbce63e25e509859ccbc71..16a8a804e95804fd7ce3140bf7e174e35d169fdd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c
  * 
index f72088495f439d7a830c096b1f935653e12c13d2..0284f84dcf38049f643c144d4f86dd76df88fabe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .section .piggydata,#alloc
        .globl  input_data
 input_data:
index 68946744873677292a32652828cd7accedd3e858..309e1bbad75d57870fcb16ae6fc92a7343c8a0e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/boot/compressed/string.c
  *
index 7a4c59154361d00ee88c2d03cb6af5aa8cace7e7..7d06aa19c3e6b5664c0e17a4de826b0810e78730 100644 (file)
@@ -85,6 +85,15 @@ SECTIONS
 
   _edata = .;
 
+  /*
+   * The image_end section appears after any additional loadable sections
+   * that the linker may decide to insert in the binary image.  Having
+   * this symbol allows further debug in the near future.
+   */
+  .image_end (NOLOAD) : {
+    _edata_real = .;
+  }
+
   _magic_sig = ZIMAGE_MAGIC(0x016f2818);
   _magic_start = ZIMAGE_MAGIC(_start);
   _magic_end = ZIMAGE_MAGIC(_edata);
index faf46abaa4a2773721a0c30b012a2ae52308daae..eff87a3445662c767bf6f4b24a94620148ab11e3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifeq ($(CONFIG_OF),y)
 
 dtb-$(CONFIG_ARCH_ALPINE) += \
index 7d7ca054c557b4b66e5da847c53e6c20fd36cd5b..e58fab8aec5df2a885ea8c04f9eefda09cf2d307 100644 (file)
@@ -36,6 +36,8 @@
                phy1 = &usb1_phy;
                ethernet0 = &cpsw_emac0;
                ethernet1 = &cpsw_emac1;
+               spi0 = &spi0;
+               spi1 = &spi1;
        };
 
        cpus {
index 9d276af7c539f3dd1cb382f12d4bca7d9bd2fb3d..081fa68b6f98049ad2edb1c9c6d579c0958a7a2d 100644 (file)
        pinctrl-0 = <&cpsw_default>;
        pinctrl-1 = <&cpsw_sleep>;
        status = "okay";
+       slaves = <1>;
 };
 
 &davinci_mdio {
        phy-mode = "rmii";
 };
 
-&cpsw_emac1 {
-       phy_id = <&davinci_mdio>, <1>;
-       phy-mode = "rmii";
-};
-
 &phy_sel {
        rmii-clock-ext;
 };
index c183654464e9492267a634b100c9e937c9279a7f..3eed6e09c8841f36f2d532ae3532d6dfc04329b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &cpu_alert0 {
        temperature = <80000>; /* milliCelsius */
 };
index 70c8c4ba1933d052b5c9fdc4e7a31c5689d7467e..422f953fc8d88a2c10bebfab82ac7d7ff9761713 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &cpu_alert0 {
        temperature = <90000>; /* milliCelsius */
 };
index 7225c7ce9a8dbca5cb909c0c1b55376072c2e263..2cb1bcd309760a01b0e99b33b444c01032344518 100644 (file)
                                reg = <0x8000 0x1000>;
                                cache-unified;
                                cache-level = <2>;
-                               arm,double-linefill-incr = <1>;
+                               arm,double-linefill-incr = <0>;
                                arm,double-linefill-wrap = <0>;
-                               arm,double-linefill = <1>;
+                               arm,double-linefill = <0>;
                                prefetch-data = <1>;
                        };
 
index 7ff0811e61db3ad73be8f0c9ea8f79ebde1681c7..00ff549d4e391798ab119dc85b165db05d1b93d1 100644 (file)
                                reg = <0x8000 0x1000>;
                                cache-unified;
                                cache-level = <2>;
-                               arm,double-linefill-incr = <1>;
+                               arm,double-linefill-incr = <0>;
                                arm,double-linefill-wrap = <0>;
-                               arm,double-linefill = <1>;
+                               arm,double-linefill = <0>;
                                prefetch-data = <1>;
                        };
 
                        };
 
                        i2c0: i2c@11000 {
-                               compatible = "marvell,mv64xxx-i2c";
+                               compatible = "marvell,mv78230-a0-i2c", "marvell,mv64xxx-i2c";
                                reg = <0x11000 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                        };
 
                        i2c1: i2c@11100 {
-                               compatible = "marvell,mv64xxx-i2c";
+                               compatible = "marvell,mv78230-a0-i2c", "marvell,mv64xxx-i2c";
                                reg = <0x11100 0x20>;
                                #address-cells = <1>;
                                #size-cells = <0>;
index ea657071e27888c49294556e047f556d499f6300..5218bd2a248d0e8768f60b37a328bc02fc3d617a 100644 (file)
                                reg = <0x8000 0x1000>;
                                cache-unified;
                                cache-level = <2>;
-                               arm,double-linefill-incr = <1>;
+                               arm,double-linefill-incr = <0>;
                                arm,double-linefill-wrap = <0>;
-                               arm,double-linefill = <1>;
+                               arm,double-linefill = <0>;
                                prefetch-data = <1>;
                        };
 
index ba332e399be42d42da19ddb44a7f98f4efe00ac1..26f5443d85e18cd7853270ab235b9821e9a3a415 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        nvic: interrupt-controller@e000e100  {
                compatible = "arm,armv7m-nvic";
index 7c90dac9982236b75e6a9a9e197291f1864830e4..f53e89d63477ee1cef6bf3b6e6ee9f995f4e4525 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "aspeed-g5.dtsi"
index 112551766275c38cfc5831e48d88a5369a05d42b..e1b523bd5b8b3b90616ccc272120c5ed52593819 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "aspeed-g4.dtsi"
index 1190fec1b5d023d44039439da04c53afd56cc1bf..6dd77cba191c01a66ec57da0a27575394a31ea45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "aspeed-g5.dtsi"
index 22b958537d31ada6dac768be3de7e2eddf31bfdb..fcc5efbd0879b7ab4fdbdd545fff0404c413e6d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "skeleton.dtsi"
 
 / {
index 9cffe347b828a7fd3b85b85e01c0b0fcda65a464..eab8f549a6fed49351d86b5fa408c03545e19779 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "skeleton.dtsi"
 
 / {
index c514502081d2d871f61b98d64acc0522de888249..21c5b56c92e083cb618b4e05d8a30733b89ee519 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for Arietta G25
  * This device tree is minimal, to activate more peripherals, see:
index 63a5af8981659fb7f3162323be34e55dbcc345d6..cf0087b4c9e184259eb63667f8322067c80b584b 100644 (file)
@@ -67,8 +67,8 @@
                                pinctrl-0 = <&pinctrl_macb0_default>;
                                phy-mode = "rmii";
 
-                               ethernet-phy@1 {
-                                       reg = <0x1>;
+                               ethernet-phy@0 {
+                                       reg = <0x0>;
                                        interrupt-parent = <&pioA>;
                                        interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
                                        pinctrl-names = "default";
index 9c9088c99cc4cdb36d963c61e648216ee7fc4c4c..60cb084a8d927e40303a377a40fd283d2eb29f45 100644 (file)
 
                usb1: ohci@00400000 {
                        num-ports = <3>;
-                       atmel,vbus-gpio = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
+                       atmel,vbus-gpio = <0 /* &pioA PIN_PD20 GPIO_ACTIVE_HIGH */
+                                          &pioA PIN_PA27 GPIO_ACTIVE_HIGH
+                                          0
+                                         >;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb_default>;
                        status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_mikrobus2_uart>;
                                atmel,use-dma-rx;
-                               atmel-use-dma-tx;
+                               atmel,use-dma-tx;
                                status = "okay";
                        };
 
                        uart4: serial@fc00c000 {
                                atmel,use-dma-rx;
                                atmel,use-dma-tx;
-                               pinctrl-name = "default";
+                               pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_mikrobus1_uart>;
                                status = "okay";
                        };
                                };
 
                                pinctrl_led_gpio_default: led_gpio_default {
-                                       pinmux = <PIN_PA27__GPIO>,
+                                       pinmux = <PIN_PA10__GPIO>,
                                                 <PIN_PB1__GPIO>,
                                                 <PIN_PA31__GPIO>;
                                        bias-pull-up;
                                };
 
                                pinctrl_usb_default: usb_default {
-                                       pinmux = <PIN_PA10__GPIO>,
+                                       pinmux = <PIN_PA27__GPIO>,
                                                 <PIN_PD19__GPIO>;
                                        bias-disable;
                                };
 
                red {
                        label = "red";
-                       gpios = <&pioA PIN_PA27 GPIO_ACTIVE_LOW>;
+                       gpios = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
                };
 
                green {
                        label = "green";
-                       gpios = <&pioA PIN_PB1 GPIO_ACTIVE_LOW>;
+                       gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
                };
 
                blue {
                        label = "blue";
-                       gpios = <&pioA PIN_PA31 GPIO_ACTIVE_LOW>;
+                       gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
                };
        };
index c7e9ccf2bc8724304f44c574bc901b3e9b3999af..cbc26001247bea2fabcf186ad784f187810dbc63 100644 (file)
                                vddana-supply = <&vdd_3v3_lp_reg>;
                                vref-supply = <&vdd_3v3_lp_reg>;
                                pinctrl-names = "default";
-                               pinctrl-0 = <&pinctrl_adc_default>;
+                               pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
                                status = "okay";
                        };
 
                                        bias-disable;
                                };
 
+                               /*
+                                * The ADTRG pin can work on any edge type.
+                                * In here it's being pulled up, so need to
+                                * connect it to ground to get an edge e.g.
+                                * Trigger can be configured on falling, rise
+                                * or any edge, and the pull-up can be changed
+                                * to pull-down or left floating according to
+                                * needs.
+                                */
+                               pinctrl_adtrg_default: adtrg_default {
+                                       pinmux = <PIN_PD31__ADTRG>;
+                                       bias-pull-up;
+                               };
+
                                pinctrl_charger_chglev: charger_chglev {
                                        pinmux = <PIN_PA12__GPIO>;
                                        bias-disable;
index 9f866491efdf5ac6c3bad1f785a9837fce33073c..f81ae0a10310f4063c569cf4ff739f3bdb6e7a44 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
index 4b1af06c8dc03157113781ab27e9085346cd59d9..7a960a048204bc3a7ed0a38799db80f51fc58440 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
index a846f1e781d8a30e2e0afeaed5e67c32005f9b97..0161a8483e39d003e76f1c7c3a1261f629095e92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
index e860964e39fa9ce61fee3f858924019df37fdf81..4bc70efe43d6f227c60cb473d3a5d66c662eb6b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
index 5d77f3f8c4c58475fcf5948af3d5815f7b6cd728..cca4a75a56517455af94c975f181c55f644e0f49 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
index 82651c3eb682a749652a31eadbb4f910961151f7..b8565fc33eea6bc18b88ab72cf8774b15f3c678d 100644 (file)
        compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
        model = "Raspberry Pi Zero W";
 
-       /* Needed by firmware to properly init UARTs */
-       aliases {
-               uart0 = "/soc/serial@7e201000";
-               uart1 = "/soc/serial@7e215040";
-               serial0 = "/soc/serial@7e201000";
-               serial1 = "/soc/serial@7e215040";
+       chosen {
+               /* 8250 auxiliary UART instead of pl011 */
+               stdout-path = "serial1:115200n8";
        };
 
        leds {
index 659b6e9513b1d28fdd28171fd7973dc3cc968e3f..0e3d2a5ff2081425bd5ccb0097736ebdef3f99a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcm283x.dtsi"
 
 / {
index e8de41444b68eed33efa16e92ddf29e3ace5fd1c..6669355fd655da471db2adf9e8735311b3793ded 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2836.dtsi"
 #include "bcm2835-rpi.dtsi"
index 2c26d0be8b0316792188890ed677e87fc1fb13ea..61e1580035097017f37b9b8e660e2f3b829f9d4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcm283x.dtsi"
 
 / {
index 20725ca487f30afd5e84059fbcb1513d3399cfa8..eb1a28da57e3122c0f650af5a3e26f34f12e0ab4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm2837.dtsi"
 #include "bcm2835-rpi.dtsi"
@@ -8,6 +9,11 @@
        compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
        model = "Raspberry Pi 3 Model B";
 
+       chosen {
+               /* 8250 auxiliary UART instead of pl011 */
+               stdout-path = "serial1:115200n8";
+       };
+
        memory {
                reg = <0 0x40000000>;
        };
index 9a0599f711ff3382a7b908bb72e9f0392db5e1bf..967e081cb9c2b5569b2fda82f76184007f25db6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        aliases {
                ethernet0 = &ethernet;
index e7d217c967a1cb53500072d4aa0ff4f65f620087..e2fd9610e125291045679a4808a92d7f9e840064 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &usb {
        dr_mode = "otg";
        g-rx-fifo-size = <256>;
index 431dcfc900c024d85a88231d1df007916dafdfeb..013431e3d7c3140d3a0645bdf4f130e9a860f984 100644 (file)
        #address-cells = <1>;
        #size-cells = <1>;
 
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
        chosen {
-               bootargs = "earlyprintk console=ttyAMA0";
+               stdout-path = "serial0:115200n8";
        };
 
        thermal-zones {
index d0560e8cd6de745aff3a0c1e8fb7d84e7d0617d7..43ee992ccdcf70230cf1f50a33c3c51a6b483f2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Broadcom BCM63138 DSL SoCs Device Tree
  */
index 0bb8d17e4c2d037439ecd9165bba6d1b9730febc..8006c69a3fdf6e738b50f3fff86b0ab7f60e496f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "bcm7445.dtsi"
 
index 4791321969b3ff835b29bb8d9cf19472ca720da1..c859aa6f358caef8f78706c8a86307fc789ff615 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 #include "skeleton.dtsi"
index 370aa2cfddf207293a0642e4dce9c9880e7a4e25..c61673638fa8a090c0a9688478a55e7952f2e1bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Broadcom BCM63138 Reference Board DTS
  */
index 67e72bc72e805be995b0d44fa68f74e29161b140..c75507922f7d7998ee0e45bb875b8b6495b3d8d7 100644 (file)
        compatible = "ti,da850-evm", "ti,da850";
        model = "DA850/AM1808/OMAP-L138 EVM";
 
+       aliases {
+               serial0 = &serial0;
+               serial1 = &serial1;
+               serial2 = &serial2;
+               ethernet0 = &eth0;
+       };
+
        soc@1c00000 {
                pmx_core: pinmux@14120 {
                        status = "okay";
index e28ef056dd17dd63b5c6f230396558f5c1ea438e..ad361ec1361de1a2ce32a4c22cdf10147163992c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "dove-cubox.dts"
 
 / {
index af3cb633135fc68885c12e30536290ae4e097e12..580e3cbcfbf7cf8fe83a6479a147d763bafa46b3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "dove.dtsi"
index c11d3636c8e5635004aa5ae73ceb3ab450882dd2..273f12ca2512a3ded3833f107394c10d36b66436 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "dove.dtsi"
index e88ff83f1dec8eb6a67332aedbb4e46cd4c4d957..826026c28f909c93b7b31d7e7f70d126e0d90648 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "dove.dtsi"
index bb725dca3a1000f7f8de5a9e9cd79bc2d9be38df..1754a62e014e2e1f83c78fcc161fd538c295e26a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "dove.dtsi"
index 1475d3672e56343e286f0883efbf1ed49fdb2e72..f4a07bb7c3a29ec69b63edba91b2d9f4c948e21f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /include/ "skeleton.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
index cf229dfabf6173872d23ea380a436109b5424caf..e62b62875cbad7ed97dd7f23c0f290a38839d3be 100644 (file)
                clocks = <&abe_24m_fclk>, <&abe_sys_clk_div>, <&func_24m_clk>, <&atl_clkin3_ck>, <&atl_clkin2_ck>, <&atl_clkin1_ck>, <&atl_clkin0_ck>, <&sys_clkin2>, <&ref_clkin0_ck>, <&ref_clkin1_ck>, <&ref_clkin2_ck>, <&ref_clkin3_ck>, <&mlb_clk>, <&mlbp_clk>;
                ti,bit-shift = <24>;
                reg = <0x1868>;
+               assigned-clocks = <&mcasp3_ahclkx_mux>;
+               assigned-clock-parents = <&abe_24m_fclk>;
        };
 
        mcasp3_aux_gfclk_mux: mcasp3_aux_gfclk_mux@1868 {
index 98fc667d22c736ae52b9caa79fbe788871ef338e..c9f3ea29cf9e51477f1454c398f5b48635f7bb34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device tree for EFM32GG-DK3750 development board.
  *
index b78c57e51ed5139a69e6d4773675a5cbdca52219..8a58e49144cce12f8a7af30917a8e53f9eb805ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device tree for Energy Micro EFM32 Giant Gecko SoC.
  *
index f97f70f83374cd4baad62eaccb99624bb0bdc205..d87ee4794f836ea0c98ad0a42150e2ba4fa8e8bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common devices used in different OMAP boards
  */
index b4fc58c8cf8d7b855a5a686beb2dfedede1add50..d6a22e677c7a1cffeccad0b079a617fd047c65f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for the Gemini-based Raidsonic NAS IB-4220-B
  */
index 3613b264f45faff79459cb5d9daf76f158406e08..500057b6570efe99f92f61da727d8d0e2cf1763b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for Teltonika RUT1xx
  */
index 7cfa9caf47d4e642031a2315bd41f743ace7a75b..63c02ca9513c408ee9a67e6d31f718722ea5cef6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for ITian Square One SQ201 NAS
  */
index 38a49e7504785077bd809a078d082fd51a2f4dbf..b413fd12c5ba519d6735c531e1bd4ee018b56b9c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for Wiliboard WBD-111
  */
index f77e34e0df0bcdead3b341dd1e155deaee10b37b..3ba710538662c5d850d8ab5004f7cf982c953f98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for Wiliboard WBD-222
  */
index c68e8d430234c3824198d46b336f0d689cf38611..b9b07d0895cfaef1ba465cc4b12542bd89660ad1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree file for Cortina systems Gemini SoC
  */
                };
 
                watchdog@41000000 {
-                       compatible = "cortina,gemini-watchdog";
+                       compatible = "cortina,gemini-watchdog", "faraday,ftwdt010";
                        reg = <0x41000000 0x1000>;
                        interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
                        resets = <&syscon GEMINI_RESET_WDOG>;
                        clocks = <&syscon GEMINI_CLK_APB>;
+                       clock-names = "PCLK";
                };
 
                uart0: serial@42000000 {
index 1092b761d7acc9bd06b0b0b5b333b94e04bf7280..d2a91976e67f69ad5aed3307ac08d8e3295fff03 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 #include "imx28.dtsi"
 
index d78312c63672dc71d2ebbf102c77144c9b8778f2..ebe7a8bddf040d599dc71ffceb516606ef9f2d94 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/gpio/gpio.h>
 
 / {
index f46814a7ea44100ff0dbd44f054bb17ed6c9d740..4d308d17f040c71157db72a8d81abf8de9dd4d8e 100644 (file)
                interrupt-names = "msi";
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 0x7>;
-               interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-map = <0 0 0 1 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 2 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 3 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 4 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>,
                         <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>,
                         <&clks IMX7D_PCIE_PHY_ROOT_CLK>;
index 6fe0dd1d3541361538bf9c6f1d52ff99f46ac655..380f9ae60c78856f083dbd1370f80cc92dbbda1a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SoC core Device Tree for the ARM Integrator platforms
  */
index e8b249f92fb3ae274bd50895545a1fd40a46845b..a5d88a213dcda47c0756a53dc6c516dffeb4455b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ARM Integrator/AP platform
  */
index 97f38b57a702f3cf0c0a5f2233f4803c016f9964..a185ab8759fa7f10eebe21161fd02dac52d1bb0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ARM Integrator/CP platform
  */
index f003f3f1bd659d39139f03890565162cc6e321b6..396bcba08adba427a4b44f322d371c9201a9dbe0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        mbus@f1000000 {
                pciec: pcie@82000000 {
index 47d4b3d3d9e969ee5ca47dd32fb0c53035c8e700..faa05849a40d49409d68b3275127ba7789050114 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        mbus@f1000000 {
                pciec: pcie@82000000 {
index a13dad0a7c080b84db015d36d949daa544bcb05f..e84c54b77dead570c6e25324f838f91ddb3ae771 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        mbus@f1000000 {
                pciec: pcie@82000000 {
index 90d4d71b6683cbaa196a9fe16581dce41ef44ea1..299c147298c35120f9b122ef780e61ef8f18c31b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        mbus@f1000000 {
                pciec: pcie@82000000 {
index 555b7e4c58a5750646515a30e72cb5f499a441d0..448b0cd23b5f146ab6779f259f745934b0bebee7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index d85ef0a91b5019d005dbbd199072aff4e90b14aa..d6b0f418fd0183a9beec46bbec127e3b6c2e0b34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-dnskw.dtsi"
index 5e586ed04c58a45d2f6ddb61db84b4e9cd53e457..94d9c06cbbf5cd81a915acea05556a678ec94751 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-dnskw.dtsi"
index d8fca9db46d084efcc4e9e2506f4c93ab2c166bb..cbaf06f2f78e25abf993dead9ecebba23b8b2b2b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "kirkwood.dtsi"
 #include "kirkwood-6281.dtsi"
 
index 849736349511433644dcf749633ff317737efb17..6a3f1bf6d9f12496816bbffbc5306687c37a36f0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index e2abc8246bf3370ef4e2a360a0e15239ad474a60..7f326e2674945c3176500f7a1ab393f72fecc6b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index aa60a0b049a7722dcb4b587e2f9cfd5fc56ae3de..02d87e0a10616549214839c10de81cb423b1a053 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index b2d9834bf4584e651b442166568c59e8c981608b..ff1260ee3fe8bce18bf85ba9c54e489943141a8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 5bf62897014cd2c505258203812b757931916365..962a910a6f5ca63703ffac5ee85eba1f6078060a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index d25184ae4af324c2bece562d19e2c7e8aaade216..4a512d80912c7bb6e62447853a73ca2c85a061d1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 8474bffec0ca43870b47d6d9cf2bca8d2b077bd3..62272d58664f14098d92c9c83c0e64914ef391f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 4121674abd1c35fbca7212def1e08af3061317e2..1bc16a5cdbaabdd2534b0394f0d52167f550f628 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/leds/leds-ns2.h>
index 7962bdefde4922cda2a91cebb34ae9f29203afce..75dc83914f568c91ca4987f76fb99c41b2f6033e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        chosen {
                bootargs = "console=ttyS0,115200n8 earlyprintk";
index 9895f2b10f8aef9d7cb9a2b1e3bc0b5bda67a98b..515be7bccc0a9559452ed60b65e771c1c51f0217 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 235bf382fff936fce858296c7357a37811146595..f035eff1c111bbc0f93cfff5414d9fd326e20ccc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index e2fa368aef25b5292eaa58fb7d328d1052a26b14..1d737d903f5f782bdfedd34f8c68e57c8ae75c83 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-lsxl.dtsi"
index 8d89cdf8d6bf2bdb8ec5ca92256b509ecaa32cbf..a56e0d797778c3591904cd3545dec98e7a462efe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-lsxl.dtsi"
index 8b7c6ce79a41a7a1d259b66ffdcbb81bb421b918..7b151acb99846f21e68404bab0bdc76d838475fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "kirkwood.dtsi"
 #include "kirkwood-6281.dtsi"
 
index aa413b0bcce28ae6cdd47d528c314a22bbe7dc8e..b80d12f6aa4992a8fe5e5e858fd12a8d7d1587d7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 282605f4c92c5163fabd46c155707104a55bd6ac..51530ea86622af05fc09eaa993e52c6dd9918aad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "kirkwood.dtsi"
 #include "kirkwood-6281.dtsi"
 
index 190189d235e60151bfd46b7835cce645a9c951d4..7b67083e1ec01544e0ac4861dfad1cef64db40e0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/leds/leds-ns2.h>
index 2c661add0cc031e5e2a35f08878aad209f289634..b0cb5907ed63f1b648bd24e4299084cc039cb10a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-ns2-common.dtsi"
index 55cc41d9c80c2184d2580e43b5075b05113a8480..c0a087e774084869e239d00a220778076b1a320c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/leds/leds-ns2.h>
index 9935f3ec29b4f6b026e580a3ce7cb9d3ac181115..5b9fa14b642861f89d38a3602a5eb71dddb6ba55 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/leds/leds-ns2.h>
index 0b69ee4934fa314c28ef0ad16940f839bf192e2e..9b861c2e76c58068bba68c5cc7b47f84cd24bc4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-nsa3x0-common.dtsi"
index 3d2b3d494c1913eafb7e43c3034cac912f1f5591..b85e314f045a77916b50f9f87975a84774bfdedf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood-nsa3x0-common.dtsi"
index e09b79ac73fd3e40568b49914e1469ffe07f9a79..2c4037b0728218a8c700623a212ed5be1a170e6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "kirkwood.dtsi"
 #include "kirkwood-6281.dtsi"
 
index c75da5f0ca48629a6dbdb4f5659971fddf41fa41..8ea430168ea54952cc9219df0e24817be577b5a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index b2f26239d29822c975b8ffef5dc80aeb4f645f84..5ce220ac9611fa7872df3026c8b3f7f00963ef06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kirkwood-pogoplug-series-4.dts - Device tree file for PogoPlug Series 4
  * inspired by the board files made by Kevin Mihelich for ArchLinux,
index 330aada6d33fb512795a0068f1831a8a7acf4499..a5b51e29f63ee0ffbef67f2c7fd64bd2bfd27548 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index ee62204e4ecdfaa7a87293e3aea2c740ecc32e40..30892c19aceb82d4ccf5b63e0a3120eb06e90bc4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 3437bb3968445f20ff409093c60b9b8c1f3aa494..aba1205981f1ef91a12c3187bb5979311599024a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "kirkwood.dtsi"
index 62e5e2d5c348c864fb57fa7a1bcec712f7a1093a..4faea1d9facf1058d6bdcc073a9eafabda893163 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        model = "QNAP TS219 family";
        compatible = "qnap,ts219", "marvell,kirkwood";
index 29b8bd7e0d9384157a6da10fd870434268f90276..a70fc7f01fc391e619710c1e17871aadd9e77454 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /include/ "skeleton.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
index 1f4c795d3f7210223d7cdab4b5e430affa133a35..da7b3237bfe9811ff9e8908310b8f146f938f21e 100644 (file)
                };
 
                watchdog: watchdog@98500000 {
-                       compatible = "moxa,moxart-watchdog";
+                       compatible = "moxa,moxart-watchdog", "faraday,ftwdt010";
                        reg = <0x98500000 0x10>;
                        clocks = <&clk_apb>;
+                       clock-names = "PCLK";
                };
 
                sdhci: sdhci@98e00000 {
index 445fafc732543a15bc50b0a39a362b63ebc325ab..ded7e8fec9ebae76ec82c66b264bb231ccc422c2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common file for GPMC connected smsc911x on omaps
  *
index 73e272fadc202fe6cb949f786b076c25d606ef0b..7f6aefd134514b9108865b8e086088b7c9809cf5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common file for GPMC connected smsc9221 on omaps
  *
index 46ef3e443861982ee840bf1091079ae7bd227ccd..d4ad9e58b199f8b02a600099616dd03800c1eeba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common features on the Zoom debug board
  */
index d8c1b423606afdde834b75c65ac64843f301ca1d..f06d767e818b0b44ed149c8086bb89135e30691e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "omap2420-n8x0-common.dtsi"
index 6b25b0359ac938b233d93aec8284a724c2029bd5..ac9acbd609b69be2c46142bff63f47c0402bcbf6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "omap2420-n8x0-common.dtsi"
index b604d26bd48c3493155b22081209525b2fcb2070..7c485fbfa5353dfc9031e746c5c4539a4a890030 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "omap2420-n8x0-common.dtsi"
index 91886231e5a87217acdb6266285e67c2dc581eb7..1de80c7886abaa7f9bb25432519c65a112a501ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "omap2420.dtsi"
 
 / {
index 3d293b345e9940e31f525f38ea46153a170aa50b..4994e33bf663d7fcbf5de4c2e61a2911029cbab4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for CompuLab CM-T3517
  */
index 8dd14fcf68258db40e852e089dfff47e7045e697..76e52c78cbb4aa4f0b084bc07cdbe2dc1670005e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for CompuLab CM-T3530
  */
index bdf4b7fdda39c1c64e2493ecd8d00cfc4f106985..8c63ac5bbb12297911324d5df0efb687c4ced6e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for CompuLab CM-T3730
  */
index fccd5383243cc1cf8924e8464a699f0d6dbdd726..31d5ebf38892e77d04fc53fcd37922ffaca282e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common support for CompuLab CM-T3x CoMs
  */
index 046cd7733c4f9afac93d5f5382b61fd228759b8c..5e8943539fcc27129d66e450f4872e2235f63914 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common support for CompuLab CM-T3x30 CoMs
  */
index ff35803088e3455b2fa116e4e7e41872590f053b..dbc3f030a16c00cf8baf4e75cbd53fa5d21dc2a0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common support for omap3 EVM boards
  */
index 26c20e1167b9531ca1fde008787a714856b67c62..4acd32a1c4ef7c8801bbd516f2f317d50db21218 100644 (file)
                io-channel-names = "temp", "bsi", "vbat";
        };
 
-       rear_camera: camera@0 {
-               compatible = "linux,camera";
-
-               module {
-                       model = "TCM8341MD";
-                       sensor = <&cam1>;
-               };
-       };
-
        pwm9: dmtimer-pwm {
                compatible = "ti,omap-dmtimer-pwm";
                #pwm-cells = <3>;
                                clock-lanes = <1>;
                                data-lanes = <0>;
                                lane-polarity = <0 0>;
-                               clock-inv = <0>;
                                /* Select strobe = <1> for back camera, <0> for front camera */
                                strobe = <1>;
-                               crc = <0>;
                        };
                };
        };
index cb47ae79a5f9e87ed1e9ce84b148b6829c9e2935..1b0bd72945f21337d1e89c3e1636bbfb5cabeecd 100644 (file)
        clock-frequency = <400000>;
 
        as3645a@30 {
+               #address-cells = <1>;
+               #size-cells = <0>;
                reg = <0x30>;
                compatible = "ams,as3645a";
-               flash {
+               flash@0 {
+                       reg = <0x0>;
                        flash-timeout-us = <150000>;
                        flash-max-microamp = <320000>;
                        led-max-microamp = <60000>;
-                       peak-current-limit = <1750000>;
+                       ams,input-max-microamp = <1750000>;
                };
-               indicator {
+               indicator@1 {
+                       reg = <0x1>;
                        led-max-microamp = <10000>;
                };
        };
index 157345bb8e794548a97cfb974b745e032e87f2b3..25e100db7b1ac8ebf3de7449838196e9e91f7327 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common file for omap dpi panels with QVGA and reset pins
  *
index 4476fb685a1bf664de95111a259fa288cbb8a8d7..22b4c8bdcc65211f9f3fa8d52caa4d5d7ed0db96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common support for CompuLab SB-T35 used on SBC-T3530, SBC-T3517 and SBC-T3730
  */
index c2d5c28a1a70b05bed2d3aa8382452cb5dfbbe7b..a69d328604219e4dd434454d82c785da49daedcd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Suppport for CompuLab SBC-T3517 with CM-T3517
  */
index 834bc786cd123184a83891e5ff6e30bfb449008d..ae96002abb3b64ccdfa4e1639c489415d788b109 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Suppport for CompuLab SBC-T3530 with CM-T3530
  */
index 73c7bf4a4a087664a1a049356f492e8cdc39cb1a..7de6df16fc1753dd7b9eddecfd7fa542a7120920 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Suppport for CompuLab SBC-T3730 with CM-T3730
  */
index 552a5c4c594254aceecbc36281edd0bcdfeebd0a..5b172a04b6f1b14193f280228432adf19b00296d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for CompuLab CM-T54
  */
index 7b8810d13257eb6d984fac0d64427a97239c7de6..657df46251c2ecd3a4053389ad33645a38ff6ae5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Suppport for CompuLab CM-T54 on SB-T54 baseboard
  */
index 5f1d6da02a4c8f82f2f227cacbfad4c4d73b7125..747f750f675d96dd351d8ad5a02213dae10fb6bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* The pxa3xx skeleton simply augments the 2xx version */
 #include "pxa2xx.dtsi"
 #include "dt-bindings/clock/pxa-clock.h"
index 7a0cc4ea819adc4f6873f8a5c588d16a4d13ca9f..55c75b67351cbfb8273da7027f45aa9f86e3353f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* The pxa3xx skeleton simply augments the 2xx version */
 #include "pxa2xx.dtsi"
 
index a3efb9704fcd964e0eaa1aa6ed0f2f41dac367ee..8df73156b73a83f715601ec5cbf3c1fc19ec032b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &tlmm_pinmux {
        card_detect: card-detect {
                mux {
index f245064f320ef1fac22542acc22d6b763ca4cebd..76b56eafaab90caa6e1fef91297c8b0d857b9119 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064-v2.0.dtsi"
 #include "qcom-apq8064-arrow-sd-600eval-pins.dtsi"
 #include <dt-bindings/gpio/gpio.h>
index 3483a66e44c156d17b68b4129181f10482a07942..a701d4bac3205036c5dfd83bc927f37af4e83c0a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064-v2.0.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
index 5b151e425530e83bef4fd8263df389bf862e9c6b..b818ebce0978969a26a0367f5632e47e7ee4e4f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064-v2.0.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
index 053b5bdd7808c9b32765c5f1430f03940f5420ec..83aaf4a74398aa236e3d197fb70df50300867882 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064-v2.0.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
index 173ab7c299cea326055e1fa6cc9da27018895b89..cbe42c4153a0fd51f55e3df254c1e932249713bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 &tlmm_pinmux {
        sdc4_gpios: sdc4-gpios {
index 88a9aff41e2f59bb22e3f6546f2ccf7d65543a4c..8bf488fb86ad5e233742f9c77b33c0a64d5e31c0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064-v2.0.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
index 935c3945fc5e4115ac2a4ee347596a41db64ce24..46ed48f0244f200b1bc77953f0b6c5455cc0424e 100644 (file)
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8064.dtsi"
index f3db185a68090c50fc20f934e84913a2b8c22ce4..6089c8d56cd549c6476a519bb5efe82f29258315 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "skeleton.dtsi"
index 32f3b81f609ced1ba840226c9a9c4c6cb567e8eb..244f04e19c9d9ebd4b2fde6ab6faf13ccce97390 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
index 2052b84a77c6434e22367a948529cd2ee107e8f3..44cd72f1b1be4795e391d63c5088d8f00b54fa92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8084.dtsi"
 #include "qcom-pma8084.dtsi"
 
index d174d15bcf70d8a7bec9e3fcde771e7a5d4adca8..c6b6680248a69ee91fe2a102b7b9b5d7608ea6cb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-apq8084.dtsi"
 #include "qcom-pma8084.dtsi"
 
index 80d48867107f2a5c6b141786bacfbf250011b7bc..0e1e98707e3f25602bbe35b12a5e93891fc1ee17 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "skeleton.dtsi"
index 348503d1a1c1ae3d8d3543e1ede87ba9bf4b6f64..bcf53e37ed93c9ad5cc9a83d0828660af37e97b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-ipq8064-v1.0.dtsi"
 
 / {
index 7093b075e408cb27d61820513a0df5f05f814ae2..e1181194e8d3e03e1036b84fce32e715d96290b1 100644 (file)
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-ipq8064.dtsi"
index f1fbffe59b931f75d502979412ecb170fbed685e..1e0a3b446f7a8ab7a6625dd7cfe093251b73c7bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "skeleton.dtsi"
index 1adc04978a47fe575ddd30e601f58fb4c5663e1a..f01a11b18d6aa7ee305ff16ebb9b109d2957d8a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 
 #include "qcom-msm8660.dtsi"
index 1b5d31b33b5e0f56b27ab2cbb9f2fa3702cd5b61..221c4584552f9df40ababa4dc3cc22c2216d0811 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "skeleton.dtsi"
index b72a55462caf1b2aaf99d8a293ad47c79ef7858d..82d5d8267adfbd92e54b9280671fed0fd203d0d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 
 #include "qcom-msm8960.dtsi"
index 288f56e0ccf558b996774e12f6f7b0c3ead42782..1733d8f40ab15ddf39f2ad716d8b00e5c5dbb759 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "skeleton.dtsi"
index 382bcc3231a905a1e58228b07366ab886361fa30..4dc0b347b1eed522e696ecb85b98f8a9f936ab74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
index 50966378f9e4daa7f0dbd0a1a4821d89a7f726a7..450b8321e0a6828513ebb707c0e4978e0165545c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
index a39207625354cb947ba3ab509552034c76afba19..33002fed8cc3023d4e08a4f942c9bd0193439be5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
index 0512f645922e29e7b9c31067f9937724e1b041c0..2fd59c440903d8d4d58af61ce420dc5085b3e424 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
index 3fc9f34f45bbe58add404edd53723c84890f7c42..1d5ef55c7ee52ac3b33808033ec48af442e2def5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
index 82d258094156919d048f814492008c4cd990092a..aac7e73b687299f48430afbe4d75b89e8771a3bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
index 8a394f3360034455dc942d900d3054f45453c92a..e57191fb83de895ae0675966b2b3319410f7ed99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define PINMUX_PIN(no, func, ioset) \
 (((no) & 0xffff) | (((func) & 0xf) << 16) | (((ioset) & 0xff) << 20))
 
index 38d2216c7ead9ff422cce1e740a820e47977a700..b1a26b42d1904a82817e1986da79fd963b934d2f 100644 (file)
                                atmel,min-sample-rate-hz = <200000>;
                                atmel,max-sample-rate-hz = <20000000>;
                                atmel,startup-time-ms = <4>;
+                               atmel,trigger-edge-type = <IRQ_TYPE_EDGE_RISING>;
                                status = "disabled";
                        };
 
index 9657a5cbc3adfa295ffa132cc35a7b92a9fcc3f1..dbdda36179ee92b937d6f4c6c551e3100c01f580 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Timings and Geometry for Samsung K3PE0E000B memory part
  */
index 28b81d60b4074ea231bcb9fd4d7caa6c1ebae44d..34eda68d9ea21dfd4a421298157b7b173ecf2731 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file is deprecated, and will be removed once existing users have been
  * updated. New dts{,i} files should *not* include skeleton.dtsi, and should
index b5d7f36f33deeb5cbdc1d7c5879d1c185c40d559..54e637752b9dba7a642debe95012c254e600973a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Skeleton device tree in the 64 bits version; the bare minimum
  * needed to boot; just include and add a compatible value.  The
index 4851c387d52dfa843ed9eff81e5e098146854d27..d80551202292457fc38881a471cddad49c611e02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ST_PINCFG_H_
 #define _ST_PINCFG_H_
 
index 1ec46a794a4d401768cf316116c41e3b1d832153..12afdc7467e73bb301197c7a76a165870db98cc7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ST-Ericsson Nomadik S8815 board
  * Produced by Calao Systems
index 789329030658a20860b3e4fb642bfabca0578ef1..4445446fa8289dc00c0276588b527b93c3f49a98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ST-Ericsson Nomadik S8815 board
  * Produced by Calao Systems
index adb1c0998b813ef6df08e15bc722a9a4907f6444..68aab50a73abc46610cadef08cc8d8686e543dea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC
  */
index 2f5107ffeef047e4cce0d9925ae6d8fbc3f60079..62ecb6a2fa39e14aa99daf35782d7b2071852e93 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree for the ST-Ericsson U300 Machine and SoC
  */
index 97b1c2321ba9dd4f7791213b47beaeb740d6542f..293ecb95722715d6ec4dc36da07496134f51a631 100644 (file)
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include "stm32f429-pinctrl.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 
        stmpe1600: stmpe1600@42 {
                compatible = "st,stmpe1600";
                reg = <0x42>;
-               irq-gpio = <&gpioi 8 0>;
-               irq-trigger = <3>;
                interrupts = <8 3>;
-               interrupt-parent = <&exti>;
+               interrupt-parent = <&gpioi>;
                interrupt-controller;
                wakeup-source;
 
diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..7f3560c
--- /dev/null
@@ -0,0 +1,343 @@
+/*
+ * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
+#include <dt-bindings/mfd/stm32f4-rcc.h>
+
+/ {
+       soc {
+               pinctrl: pin-controller {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x40020000 0x3000>;
+                       interrupt-parent = <&exti>;
+                       st,syscfg = <&syscfg 0x8>;
+                       pins-are-numbered;
+
+                       gpioa: gpio@40020000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x0 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOA)>;
+                               st,bank-name = "GPIOA";
+                       };
+
+                       gpiob: gpio@40020400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x400 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOB)>;
+                               st,bank-name = "GPIOB";
+                       };
+
+                       gpioc: gpio@40020800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x800 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOC)>;
+                               st,bank-name = "GPIOC";
+                       };
+
+                       gpiod: gpio@40020c00 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0xc00 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOD)>;
+                               st,bank-name = "GPIOD";
+                       };
+
+                       gpioe: gpio@40021000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x1000 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOE)>;
+                               st,bank-name = "GPIOE";
+                       };
+
+                       gpiof: gpio@40021400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x1400 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOF)>;
+                               st,bank-name = "GPIOF";
+                       };
+
+                       gpiog: gpio@40021800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x1800 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOG)>;
+                               st,bank-name = "GPIOG";
+                       };
+
+                       gpioh: gpio@40021c00 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x1c00 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOH)>;
+                               st,bank-name = "GPIOH";
+                       };
+
+                       gpioi: gpio@40022000 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x2000 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOI)>;
+                               st,bank-name = "GPIOI";
+                       };
+
+                       gpioj: gpio@40022400 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x2400 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOJ)>;
+                               st,bank-name = "GPIOJ";
+                       };
+
+                       gpiok: gpio@40022800 {
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               reg = <0x2800 0x400>;
+                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOK)>;
+                               st,bank-name = "GPIOK";
+                       };
+
+                       usart1_pins_a: usart1@0 {
+                               pins1 {
+                                       pinmux = <STM32F429_PA9_FUNC_USART1_TX>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <0>;
+                               };
+                               pins2 {
+                                       pinmux = <STM32F429_PA10_FUNC_USART1_RX>;
+                                       bias-disable;
+                               };
+                       };
+
+                       usart3_pins_a: usart3@0 {
+                               pins1 {
+                                       pinmux = <STM32F429_PB10_FUNC_USART3_TX>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <0>;
+                               };
+                               pins2 {
+                                       pinmux = <STM32F429_PB11_FUNC_USART3_RX>;
+                                       bias-disable;
+                               };
+                       };
+
+                       usbotg_fs_pins_a: usbotg_fs@0 {
+                               pins {
+                                       pinmux = <STM32F429_PA10_FUNC_OTG_FS_ID>,
+                                                <STM32F429_PA11_FUNC_OTG_FS_DM>,
+                                                <STM32F429_PA12_FUNC_OTG_FS_DP>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <2>;
+                               };
+                       };
+
+                       usbotg_fs_pins_b: usbotg_fs@1 {
+                               pins {
+                                       pinmux = <STM32F429_PB12_FUNC_OTG_HS_ID>,
+                                                <STM32F429_PB14_FUNC_OTG_HS_DM>,
+                                                <STM32F429_PB15_FUNC_OTG_HS_DP>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <2>;
+                               };
+                       };
+
+                       usbotg_hs_pins_a: usbotg_hs@0 {
+                               pins {
+                                       pinmux = <STM32F429_PH4_FUNC_OTG_HS_ULPI_NXT>,
+                                                <STM32F429_PI11_FUNC_OTG_HS_ULPI_DIR>,
+                                                <STM32F429_PC0_FUNC_OTG_HS_ULPI_STP>,
+                                                <STM32F429_PA5_FUNC_OTG_HS_ULPI_CK>,
+                                                <STM32F429_PA3_FUNC_OTG_HS_ULPI_D0>,
+                                                <STM32F429_PB0_FUNC_OTG_HS_ULPI_D1>,
+                                                <STM32F429_PB1_FUNC_OTG_HS_ULPI_D2>,
+                                                <STM32F429_PB10_FUNC_OTG_HS_ULPI_D3>,
+                                                <STM32F429_PB11_FUNC_OTG_HS_ULPI_D4>,
+                                                <STM32F429_PB12_FUNC_OTG_HS_ULPI_D5>,
+                                                <STM32F429_PB13_FUNC_OTG_HS_ULPI_D6>,
+                                                <STM32F429_PB5_FUNC_OTG_HS_ULPI_D7>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <2>;
+                               };
+                       };
+
+                       ethernet_mii: mii@0 {
+                               pins {
+                                       pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>,
+                                                <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>,
+                                                <STM32F429_PC2_FUNC_ETH_MII_TXD2>,
+                                                <STM32F429_PB8_FUNC_ETH_MII_TXD3>,
+                                                <STM32F429_PC3_FUNC_ETH_MII_TX_CLK>,
+                                                <STM32F429_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>,
+                                                <STM32F429_PA2_FUNC_ETH_MDIO>,
+                                                <STM32F429_PC1_FUNC_ETH_MDC>,
+                                                <STM32F429_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>,
+                                                <STM32F429_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>,
+                                                <STM32F429_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>,
+                                                <STM32F429_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>,
+                                                <STM32F429_PH6_FUNC_ETH_MII_RXD2>,
+                                                <STM32F429_PH7_FUNC_ETH_MII_RXD3>;
+                                       slew-rate = <2>;
+                               };
+                       };
+
+                       adc3_in8_pin: adc@200 {
+                               pins {
+                                       pinmux = <STM32F429_PF10_FUNC_ANALOG>;
+                               };
+                       };
+
+                       pwm1_pins: pwm@1 {
+                               pins {
+                                       pinmux = <STM32F429_PA8_FUNC_TIM1_CH1>,
+                                                <STM32F429_PB13_FUNC_TIM1_CH1N>,
+                                                <STM32F429_PB12_FUNC_TIM1_BKIN>;
+                               };
+                       };
+
+                       pwm3_pins: pwm@3 {
+                               pins {
+                                       pinmux = <STM32F429_PB4_FUNC_TIM3_CH1>,
+                                                <STM32F429_PB5_FUNC_TIM3_CH2>;
+                               };
+                       };
+
+                       i2c1_pins: i2c1@0 {
+                               pins {
+                                       pinmux = <STM32F429_PB9_FUNC_I2C1_SDA>,
+                                                <STM32F429_PB6_FUNC_I2C1_SCL>;
+                                       bias-disable;
+                                       drive-open-drain;
+                                       slew-rate = <3>;
+                               };
+                       };
+
+                       ltdc_pins: ltdc@0 {
+                               pins {
+                                       pinmux = <STM32F429_PI12_FUNC_LCD_HSYNC>,
+                                                <STM32F429_PI13_FUNC_LCD_VSYNC>,
+                                                <STM32F429_PI14_FUNC_LCD_CLK>,
+                                                <STM32F429_PI15_FUNC_LCD_R0>,
+                                                <STM32F429_PJ0_FUNC_LCD_R1>,
+                                                <STM32F429_PJ1_FUNC_LCD_R2>,
+                                                <STM32F429_PJ2_FUNC_LCD_R3>,
+                                                <STM32F429_PJ3_FUNC_LCD_R4>,
+                                                <STM32F429_PJ4_FUNC_LCD_R5>,
+                                                <STM32F429_PJ5_FUNC_LCD_R6>,
+                                                <STM32F429_PJ6_FUNC_LCD_R7>,
+                                                <STM32F429_PJ7_FUNC_LCD_G0>,
+                                                <STM32F429_PJ8_FUNC_LCD_G1>,
+                                                <STM32F429_PJ9_FUNC_LCD_G2>,
+                                                <STM32F429_PJ10_FUNC_LCD_G3>,
+                                                <STM32F429_PJ11_FUNC_LCD_G4>,
+                                                <STM32F429_PJ12_FUNC_LCD_B0>,
+                                                <STM32F429_PJ13_FUNC_LCD_B1>,
+                                                <STM32F429_PJ14_FUNC_LCD_B2>,
+                                                <STM32F429_PJ15_FUNC_LCD_B3>,
+                                                <STM32F429_PK0_FUNC_LCD_G5>,
+                                                <STM32F429_PK1_FUNC_LCD_G6>,
+                                                <STM32F429_PK2_FUNC_LCD_G7>,
+                                                <STM32F429_PK3_FUNC_LCD_B4>,
+                                                <STM32F429_PK4_FUNC_LCD_B5>,
+                                                <STM32F429_PK5_FUNC_LCD_B6>,
+                                                <STM32F429_PK6_FUNC_LCD_B7>,
+                                                <STM32F429_PK7_FUNC_LCD_DE>;
+                                       slew-rate = <2>;
+                               };
+                       };
+
+                       dcmi_pins: dcmi@0 {
+                               pins {
+                                       pinmux = <STM32F429_PA4_FUNC_DCMI_HSYNC>,
+                                                <STM32F429_PB7_FUNC_DCMI_VSYNC>,
+                                                <STM32F429_PA6_FUNC_DCMI_PIXCLK>,
+                                                <STM32F429_PC6_FUNC_DCMI_D0>,
+                                                <STM32F429_PC7_FUNC_DCMI_D1>,
+                                                <STM32F429_PC8_FUNC_DCMI_D2>,
+                                                <STM32F429_PC9_FUNC_DCMI_D3>,
+                                                <STM32F429_PC11_FUNC_DCMI_D4>,
+                                                <STM32F429_PD3_FUNC_DCMI_D5>,
+                                                <STM32F429_PB8_FUNC_DCMI_D6>,
+                                                <STM32F429_PE6_FUNC_DCMI_D7>,
+                                                <STM32F429_PC10_FUNC_DCMI_D8>,
+                                                <STM32F429_PC12_FUNC_DCMI_D9>,
+                                                <STM32F429_PD6_FUNC_DCMI_D10>,
+                                                <STM32F429_PD2_FUNC_DCMI_D11>;
+                                       bias-disable;
+                                       drive-push-pull;
+                                       slew-rate = <3>;
+                               };
+                       };
+               };
+       };
+};
index c66d617e4245b4c7b83f45e2266480c1ac64759d..5ceb2cf3777ff425a41a59da6dc90fe08adc257e 100644 (file)
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include "stm32f429-pinctrl.dtsi"
 #include <dt-bindings/input/input.h>
 
 / {
diff --git a/arch/arm/boot/dts/stm32f429-pinctrl.dtsi b/arch/arm/boot/dts/stm32f429-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..3e7a17d
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "stm32f4-pinctrl.dtsi"
+
+/ {
+       soc {
+               pinctrl: pin-controller {
+                       compatible = "st,stm32f429-pinctrl";
+
+                       gpioa: gpio@40020000 {
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@40020400 {
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@40020800 {
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@40020c00 {
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@40021000 {
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@40021400 {
+                               gpio-ranges = <&pinctrl 0 80 16>;
+                       };
+
+                       gpiog: gpio@40021800 {
+                               gpio-ranges = <&pinctrl 0 96 16>;
+                       };
+
+                       gpioh: gpio@40021c00 {
+                               gpio-ranges = <&pinctrl 0 112 16>;
+                       };
+
+                       gpioi: gpio@40022000 {
+                               gpio-ranges = <&pinctrl 0 128 16>;
+                       };
+
+                       gpioj: gpio@40022400 {
+                               gpio-ranges = <&pinctrl 0 144 16>;
+                       };
+
+                       gpiok: gpio@40022800 {
+                               gpio-ranges = <&pinctrl 0 160 8>;
+                       };
+               };
+       };
+};
index dd7e99b1f43bc78111f0de584849367a8f07cf8a..5b36eb114ddc953067904afbd08497b2286c3785 100644 (file)
@@ -47,7 +47,6 @@
 
 #include "skeleton.dtsi"
 #include "armv7-m.dtsi"
-#include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
 #include <dt-bindings/clock/stm32fx-clock.h>
 #include <dt-bindings/mfd/stm32f4-rcc.h>
 
                        status = "disabled";
                };
 
-               pinctrl: pin-controller {
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       compatible = "st,stm32f429-pinctrl";
-                       ranges = <0 0x40020000 0x3000>;
-                       interrupt-parent = <&exti>;
-                       st,syscfg = <&syscfg 0x8>;
-                       pins-are-numbered;
-
-                       gpioa: gpio@40020000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x0 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOA)>;
-                               st,bank-name = "GPIOA";
-                       };
-
-                       gpiob: gpio@40020400 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x400 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOB)>;
-                               st,bank-name = "GPIOB";
-                       };
-
-                       gpioc: gpio@40020800 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x800 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOC)>;
-                               st,bank-name = "GPIOC";
-                       };
-
-                       gpiod: gpio@40020c00 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0xc00 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOD)>;
-                               st,bank-name = "GPIOD";
-                       };
-
-                       gpioe: gpio@40021000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x1000 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOE)>;
-                               st,bank-name = "GPIOE";
-                       };
-
-                       gpiof: gpio@40021400 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x1400 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOF)>;
-                               st,bank-name = "GPIOF";
-                       };
-
-                       gpiog: gpio@40021800 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x1800 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOG)>;
-                               st,bank-name = "GPIOG";
-                       };
-
-                       gpioh: gpio@40021c00 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x1c00 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOH)>;
-                               st,bank-name = "GPIOH";
-                       };
-
-                       gpioi: gpio@40022000 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x2000 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOI)>;
-                               st,bank-name = "GPIOI";
-                       };
-
-                       gpioj: gpio@40022400 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x2400 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOJ)>;
-                               st,bank-name = "GPIOJ";
-                       };
-
-                       gpiok: gpio@40022800 {
-                               gpio-controller;
-                               #gpio-cells = <2>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               reg = <0x2800 0x400>;
-                               clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOK)>;
-                               st,bank-name = "GPIOK";
-                       };
-
-                       usart1_pins_a: usart1@0 {
-                               pins1 {
-                                       pinmux = <STM32F429_PA9_FUNC_USART1_TX>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32F429_PA10_FUNC_USART1_RX>;
-                                       bias-disable;
-                               };
-                       };
-
-                       usart3_pins_a: usart3@0 {
-                               pins1 {
-                                       pinmux = <STM32F429_PB10_FUNC_USART3_TX>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <0>;
-                               };
-                               pins2 {
-                                       pinmux = <STM32F429_PB11_FUNC_USART3_RX>;
-                                       bias-disable;
-                               };
-                       };
-
-                       usbotg_fs_pins_a: usbotg_fs@0 {
-                               pins {
-                                       pinmux = <STM32F429_PA10_FUNC_OTG_FS_ID>,
-                                                <STM32F429_PA11_FUNC_OTG_FS_DM>,
-                                                <STM32F429_PA12_FUNC_OTG_FS_DP>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <2>;
-                               };
-                       };
-
-                       usbotg_fs_pins_b: usbotg_fs@1 {
-                               pins {
-                                       pinmux = <STM32F429_PB12_FUNC_OTG_HS_ID>,
-                                                <STM32F429_PB14_FUNC_OTG_HS_DM>,
-                                                <STM32F429_PB15_FUNC_OTG_HS_DP>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <2>;
-                               };
-                       };
-
-                       usbotg_hs_pins_a: usbotg_hs@0 {
-                               pins {
-                                       pinmux = <STM32F429_PH4_FUNC_OTG_HS_ULPI_NXT>,
-                                                <STM32F429_PI11_FUNC_OTG_HS_ULPI_DIR>,
-                                                <STM32F429_PC0_FUNC_OTG_HS_ULPI_STP>,
-                                                <STM32F429_PA5_FUNC_OTG_HS_ULPI_CK>,
-                                                <STM32F429_PA3_FUNC_OTG_HS_ULPI_D0>,
-                                                <STM32F429_PB0_FUNC_OTG_HS_ULPI_D1>,
-                                                <STM32F429_PB1_FUNC_OTG_HS_ULPI_D2>,
-                                                <STM32F429_PB10_FUNC_OTG_HS_ULPI_D3>,
-                                                <STM32F429_PB11_FUNC_OTG_HS_ULPI_D4>,
-                                                <STM32F429_PB12_FUNC_OTG_HS_ULPI_D5>,
-                                                <STM32F429_PB13_FUNC_OTG_HS_ULPI_D6>,
-                                                <STM32F429_PB5_FUNC_OTG_HS_ULPI_D7>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <2>;
-                               };
-                       };
-
-                       ethernet_mii: mii@0 {
-                               pins {
-                                       pinmux = <STM32F429_PG13_FUNC_ETH_MII_TXD0_ETH_RMII_TXD0>,
-                                                <STM32F429_PG14_FUNC_ETH_MII_TXD1_ETH_RMII_TXD1>,
-                                                <STM32F429_PC2_FUNC_ETH_MII_TXD2>,
-                                                <STM32F429_PB8_FUNC_ETH_MII_TXD3>,
-                                                <STM32F429_PC3_FUNC_ETH_MII_TX_CLK>,
-                                                <STM32F429_PG11_FUNC_ETH_MII_TX_EN_ETH_RMII_TX_EN>,
-                                                <STM32F429_PA2_FUNC_ETH_MDIO>,
-                                                <STM32F429_PC1_FUNC_ETH_MDC>,
-                                                <STM32F429_PA1_FUNC_ETH_MII_RX_CLK_ETH_RMII_REF_CLK>,
-                                                <STM32F429_PA7_FUNC_ETH_MII_RX_DV_ETH_RMII_CRS_DV>,
-                                                <STM32F429_PC4_FUNC_ETH_MII_RXD0_ETH_RMII_RXD0>,
-                                                <STM32F429_PC5_FUNC_ETH_MII_RXD1_ETH_RMII_RXD1>,
-                                                <STM32F429_PH6_FUNC_ETH_MII_RXD2>,
-                                                <STM32F429_PH7_FUNC_ETH_MII_RXD3>;
-                                       slew-rate = <2>;
-                               };
-                       };
-
-                       adc3_in8_pin: adc@200 {
-                               pins {
-                                       pinmux = <STM32F429_PF10_FUNC_ANALOG>;
-                               };
-                       };
-
-                       pwm1_pins: pwm@1 {
-                               pins {
-                                       pinmux = <STM32F429_PA8_FUNC_TIM1_CH1>,
-                                                <STM32F429_PB13_FUNC_TIM1_CH1N>,
-                                                <STM32F429_PB12_FUNC_TIM1_BKIN>;
-                               };
-                       };
-
-                       pwm3_pins: pwm@3 {
-                               pins {
-                                       pinmux = <STM32F429_PB4_FUNC_TIM3_CH1>,
-                                                <STM32F429_PB5_FUNC_TIM3_CH2>;
-                               };
-                       };
-
-                       i2c1_pins: i2c1@0 {
-                               pins {
-                                       pinmux = <STM32F429_PB9_FUNC_I2C1_SDA>,
-                                                <STM32F429_PB6_FUNC_I2C1_SCL>;
-                                       bias-disable;
-                                       drive-open-drain;
-                                       slew-rate = <3>;
-                               };
-                       };
-
-                       ltdc_pins: ltdc@0 {
-                               pins {
-                                       pinmux = <STM32F429_PI12_FUNC_LCD_HSYNC>,
-                                                <STM32F429_PI13_FUNC_LCD_VSYNC>,
-                                                <STM32F429_PI14_FUNC_LCD_CLK>,
-                                                <STM32F429_PI15_FUNC_LCD_R0>,
-                                                <STM32F429_PJ0_FUNC_LCD_R1>,
-                                                <STM32F429_PJ1_FUNC_LCD_R2>,
-                                                <STM32F429_PJ2_FUNC_LCD_R3>,
-                                                <STM32F429_PJ3_FUNC_LCD_R4>,
-                                                <STM32F429_PJ4_FUNC_LCD_R5>,
-                                                <STM32F429_PJ5_FUNC_LCD_R6>,
-                                                <STM32F429_PJ6_FUNC_LCD_R7>,
-                                                <STM32F429_PJ7_FUNC_LCD_G0>,
-                                                <STM32F429_PJ8_FUNC_LCD_G1>,
-                                                <STM32F429_PJ9_FUNC_LCD_G2>,
-                                                <STM32F429_PJ10_FUNC_LCD_G3>,
-                                                <STM32F429_PJ11_FUNC_LCD_G4>,
-                                                <STM32F429_PJ12_FUNC_LCD_B0>,
-                                                <STM32F429_PJ13_FUNC_LCD_B1>,
-                                                <STM32F429_PJ14_FUNC_LCD_B2>,
-                                                <STM32F429_PJ15_FUNC_LCD_B3>,
-                                                <STM32F429_PK0_FUNC_LCD_G5>,
-                                                <STM32F429_PK1_FUNC_LCD_G6>,
-                                                <STM32F429_PK2_FUNC_LCD_G7>,
-                                                <STM32F429_PK3_FUNC_LCD_B4>,
-                                                <STM32F429_PK4_FUNC_LCD_B5>,
-                                                <STM32F429_PK5_FUNC_LCD_B6>,
-                                                <STM32F429_PK6_FUNC_LCD_B7>,
-                                                <STM32F429_PK7_FUNC_LCD_DE>;
-                                       slew-rate = <2>;
-                               };
-                       };
-
-                       dcmi_pins: dcmi@0 {
-                               pins {
-                                       pinmux = <STM32F429_PA4_FUNC_DCMI_HSYNC>,
-                                                <STM32F429_PB7_FUNC_DCMI_VSYNC>,
-                                                <STM32F429_PA6_FUNC_DCMI_PIXCLK>,
-                                                <STM32F429_PC6_FUNC_DCMI_D0>,
-                                                <STM32F429_PC7_FUNC_DCMI_D1>,
-                                                <STM32F429_PC8_FUNC_DCMI_D2>,
-                                                <STM32F429_PC9_FUNC_DCMI_D3>,
-                                                <STM32F429_PC11_FUNC_DCMI_D4>,
-                                                <STM32F429_PD3_FUNC_DCMI_D5>,
-                                                <STM32F429_PB8_FUNC_DCMI_D6>,
-                                                <STM32F429_PE6_FUNC_DCMI_D7>,
-                                                <STM32F429_PC10_FUNC_DCMI_D8>,
-                                                <STM32F429_PC12_FUNC_DCMI_D9>,
-                                                <STM32F429_PD6_FUNC_DCMI_D10>,
-                                                <STM32F429_PD2_FUNC_DCMI_D11>;
-                                       bias-disable;
-                                       drive-push-pull;
-                                       slew-rate = <3>;
-                               };
-                       };
-               };
-
                crc: crc@40023000 {
                        compatible = "st,stm32f4-crc";
                        reg = <0x40023000 0x400>;
index 6ae1f037f3f0e5065eb80a6159a8bfb1d5eb3ba1..c18acbe4cf4e2448b085331fca86a72710eeb613 100644 (file)
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include "stm32f469-pinctrl.dtsi"
 
 / {
        model = "STMicroelectronics STM32F469i-DISCO board";
diff --git a/arch/arm/boot/dts/stm32f469-pinctrl.dtsi b/arch/arm/boot/dts/stm32f469-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..fff5426
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "stm32f4-pinctrl.dtsi"
+
+/ {
+       soc {
+               pinctrl: pin-controller {
+                       compatible = "st,stm32f469-pinctrl";
+
+                       gpioa: gpio@40020000 {
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@40020400 {
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@40020800 {
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@40020c00 {
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@40021000 {
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@40021400 {
+                               gpio-ranges = <&pinctrl 0 80 16>;
+                       };
+
+                       gpiog: gpio@40021800 {
+                               gpio-ranges = <&pinctrl 0 96 16>;
+                       };
+
+                       gpioh: gpio@40021c00 {
+                               gpio-ranges = <&pinctrl 0 112 16>;
+                       };
+
+                       gpioi: gpio@40022000 {
+                               gpio-ranges = <&pinctrl 0 128 16>;
+                       };
+
+                       gpioj: gpio@40022400 {
+                               gpio-ranges = <&pinctrl 0 144 6>,
+                                             <&pinctrl 12 156 4>;
+                       };
+
+                       gpiok: gpio@40022800 {
+                               gpio-ranges = <&pinctrl 3 163 5>;
+                       };
+               };
+       };
+};
index b147cb0dc14b26ce92db7ea70bba2a8f77bd0d38..eef072a21accaed0c29d6407d076331ad579a987 100644 (file)
                                        #size-cells = <0>;
                                        reg = <0>;
 
-                                       tcon1_in_drc1: endpoint@0 {
-                                               reg = <0>;
+                                       tcon1_in_drc1: endpoint@1 {
+                                               reg = <1>;
                                                remote-endpoint = <&drc1_out_tcon1>;
                                        };
                                };
                                        #size-cells = <0>;
                                        reg = <1>;
 
-                                       be1_out_drc1: endpoint@0 {
-                                               reg = <0>;
+                                       be1_out_drc1: endpoint@1 {
+                                               reg = <1>;
                                                remote-endpoint = <&drc1_in_be1>;
                                        };
                                };
                                        #size-cells = <0>;
                                        reg = <0>;
 
-                                       drc1_in_be1: endpoint@0 {
-                                               reg = <0>;
+                                       drc1_in_be1: endpoint@1 {
+                                               reg = <1>;
                                                remote-endpoint = <&be1_out_drc1>;
                                        };
                                };
                                        #size-cells = <0>;
                                        reg = <1>;
 
-                                       drc1_out_tcon1: endpoint@0 {
-                                               reg = <0>;
+                                       drc1_out_tcon1: endpoint@1 {
+                                               reg = <1>;
                                                remote-endpoint = <&tcon1_in_drc1>;
                                        };
                                };
index 0c8cad4d6ee62c3383857679020efcbf1484a0e1..12ab6e0c033149239c7476c8ea60262c697837d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Based on Mans Rullgard's Tango3 DT
  * https://github.com/mansr/linux-tangox
index eca33d56869011b69878d33c115150f52e59bf92..1c6a5bf1a86b3e778195a6c3b3ba84c17932db17 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tango4-common.dtsi"
 
 / {
index 13bcc460bcb2adf2ab17775bc0aa2c01bc694aed..d237d7f02c516d3e8636828e5e95b59bf19440b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tango4-smp8758.dtsi"
index 5af4dd3219520d265f4046d84b9c8cb64c73a000..acd6cf51b15ba471fa258cd49091be6185448cf1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This dts file supports Dalmore A04.
  * Other board revisions are not supported
index 966a7fc044af193295d5888af3e868ff8f3c70da..7ed7370ee67a9e3b12d7e4134a9a05fbd0374863 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index a161fa1dfb6136dcd598ba8064630049a2c832b3..7fc4a8b31e45c2a694dbd9b64a148a1668fd6313 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 8932ea3afd5f44bc6a728b257a2dee04167d34ce..0e4a13295d8aa73fe63b1cb600d1f7fc2acf01cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra114-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra114-mc.h>
index accb7055165a5d822155a17874a7cd686d37e8fd..784a529e1f1950c00f119610253a767640d11638 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        clock@60006000 {
                emc-timings-3 {
index 61873d642a45b207ef33c885b76469f9d9ed084b..e8e777b8ef1b33658f773b36fe0b064b15121d3c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 4458e86b27695b028e7ff3543636a2afa6697517..9af21fe93a5c5325591cf4afa306ceda364130c0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        clock@60006000 {
                emc-timings-1 {
index 12eb7809d9ab93f0a7778f329db5fceca8bf06d2..d97791b989588a493353892542471999b7d8ad85 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra124-nyan.dtsi"
index 4e7b59e25728ea7a8fec826a28347c058bcf0edb..c7c31d4c1a2b73cd4abe1ce4dab508760afa46ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        clock@60006000 {
                emc-timings-1 {
index 1078a73d5092560a132e7781e57fa92d8dabe27c..2a029ee86dd70e0ca57007d1bfa1cfc3201ca484 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra124-nyan.dtsi"
index 5cf987b5401eb6f45601ea37a3c3c591fd67a486..3609367037a6cbb3bcf4b924deb11dfd9c59ac13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 #include "tegra124.dtsi"
 
index 6e59cec0962ba0bb30c8f8e9b5739f899c060f28..32d9079f025bf2d9fbcb067f4fb80f8dcca38c04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 8baf00b89efb98d1693505aa3a8251f1e0a10ac8..a7e43dcbf74443738749512081edde1ff4738d14 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra124-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra124-mc.h>
index 1242b841f147284ddf6e0ad86cd9bc034cc7c5f0..813ae34edd6a33a9113d4f4bc2d6e44ea0e4cf2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tegra20.dtsi"
 
 / {
index 41749693ec3cd60e6ecc28c724e7cad926ec312b..628a55a9318befb6e098aaeb3e593185fb544dbc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index bb56dfe9e10c161c1ad3551c6e21d9bf822fd696..40126388946d992f24d894fca371df2e428dc950 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra20-colibri-512.dtsi"
index 34c6588e92ef830cfe025608142269addcaab89d..cda5448c2ace6e7036c1c63d30286030f8b73b5c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra20-tamonten.dtsi"
index bfa9421fcf94a0ea433c4f2ec2da08665a5193f1..30436969adc0e48761cefd136de13bc8e06b071d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index a10b415bbdee1e2f8391290dc355bb9405cf9774..429e4605fbdb4597da194f88487d0241225d59ce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra20-tamonten.dtsi"
index 2017acacc00ca501933e7c61baad5f2b52c00c07..284aae351ff234df64928b28d36a882a31bb2876 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 7361f4a82e80de212b6e4b30feee6782258b26c4..872046d48709a3e5f8abb701432f1891c72ad85c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tegra20.dtsi"
 
 / {
index 9cb534f4441e62d0fded7686c33108387176b573..4dec27737238351856414009ba5270c439f756ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra20-tamonten.dtsi"
index b902ab594afaade16ae4a78ecc8dd6f4b17074bb..d55c6b240a30db3b5dc1c075f642b4deec6bbbf1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 8f0aaabf7e28c4f57f9a3d259644f06a939c7be5..ee3fbf941e79871190fbe26c4796b9c33afc7a7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 7c85f97f72eac0b54913eced278fdec5c768a43a..914f59166a995f7b038493aa5660310e27e23f37 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra20-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/pinctrl/pinctrl-tegra.h>
index fc530e4a96c47106c77f0fd9c67f60d359a5c24c..07b945b0391a3de6b9733ca2990c9fdc9876a433 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 7a6a1a0146037311e8d7b49db463fbd256ad2982..faa8cd2914e8b13f54ff8ece5ef66469e3b20dc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tegra30.dtsi"
 
 /*
index 3e104ddeb220528c1ec984c428d4f64688e84b00..5331a8f7dcf894815350634ecb599ee73d988382 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra30.dtsi"
index c9bfedcca6ed5ddaa8821717e41d14e520bce94b..a02ec5082287d173f329c5fdca8126357b90798b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra30-cardhu.dtsi"
index fadf55e46b2ba4c3adea79322d9b7b0f1eec5ab9..4dbd4af679f017d0a8d32dd9d2141589172bd97f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra30-cardhu.dtsi"
index 83dc14a9b353acdb6856976a0be48fa7d0671e5e..92a9740c533f217a10cd6fb4421d2fc6871d015d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 #include "tegra30.dtsi"
 
index a8c0318743b6d4aaf4efbd9224c1dd21cf3e31af..3c5fb243021207fad7d85033ac5688fe10f72f39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra30-colibri.dtsi"
index 5360d638eedcb48d9c6c64d3f83294008aa52167..139bfa028b04a238edb235e5d64efae6ea52a8ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 #include "tegra30.dtsi"
 
index 13960fda747192959f3d7ef25b3fdb377bc691c2..c3e9f1e847db81c255975a9718b4b37d6f4a2e52 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra30-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra30-mc.h>
index 79183db5b386895781b21635407bce3fa7efb8ac..93586faf950f1bff750fe9821e4b7d1c60766fc7 100644 (file)
                        interrupts = <0 80 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb0>;
-                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 8>,
+                                <&mio_clk 12>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
                                 <&mio_rst 12>;
                };
                        interrupts = <0 81 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb1>;
-                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 9>,
+                                <&mio_clk 13>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
                                 <&mio_rst 13>;
                };
                        interrupts = <0 82 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb2>;
-                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 10>,
+                                <&mio_clk 14>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
                                 <&mio_rst 14>;
                };
index b3dbbd9b6e3955f3330cb3cb4bb5d71c617f4f9a..2a9bd7f9f5db3d43b1896162048e95faea18f299 100644 (file)
                        interrupts = <0 80 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb2>;
-                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 8>,
+                                <&mio_clk 12>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
                                 <&mio_rst 12>;
                };
                        interrupts = <0 81 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb3>;
-                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 9>,
+                                <&mio_clk 13>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
                                 <&mio_rst 13>;
                };
index b0839033297169272ed3688cb352385920a41ea1..ebd0c3f63e7fb6bf05d8e775367e6572f8931318 100644 (file)
                        interrupts = <0 80 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb0>;
-                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 8>,
+                                <&mio_clk 12>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
                                 <&mio_rst 12>;
                };
                        interrupts = <0 81 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb1>;
-                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 9>,
+                                <&mio_clk 13>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
                                 <&mio_rst 13>;
                };
                        interrupts = <0 82 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb2>;
-                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 10>,
+                                <&mio_clk 14>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
                                 <&mio_rst 14>;
                };
index 409e069b3a845667df387c1decc7c811aa8359bd..4a51612996bc245dbbbcafe43e11f5aeee53eb3b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "skeleton.dtsi"
 
index 9abe26028c8b835b987892445157d148f0b24c57..06a0fdf24026ca1ecd0a310c64d30c1fa35cabd8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "versatile-ab.dts"
 
 / {
index 1b6f6393be936d1114ea2dd5235eb18d70165cf9..b0021a816028781a9615c8ec6073aebaaeac3b1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index 0c8de0ca73ee8a67f1c7c419d8de28590888ebfd..a8ac4e2ed2907cfca6441a9f3e2ac09ce3a1bc99 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index 65ecf206388cc3b4ae1885daa67235b9bcdd1621..a4c7713edfcd5c9807cf5c4827978303aa8e1c95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index 6e69b8e6c1a7891af21b5b861128bef18cf89b96..32f1906ffecfed690e4a7d7c35f6bbc633e273c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index c9305b58afc23d8733d6d5ee600127b5a8888248..5814460e0549469e13d2200bc55cc3b81d683a0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index 336915151398d81a44d8f1521cf844ade6961237..384cd92f1f842af0ce26f405e7dd55e185a3e305 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen Virtual Machine for unprivileged guests
  *
index b0183c3a1d7c4627b008278e6290fbe908d0c6df..eedd3fcbc002de9420d45f81d195d1d4136fea49 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /dts-v1/;
 
index d45c8fcd7ab46bd716a9bbbb79a83b0e09d7d480..752d28e0f9b0181b5dd2d52cbb02e55b9ec9e63f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include "skeleton.dtsi"
 #include <dt-bindings/clock/zx296702-clock.h>
index 1181053e3ade766fd0ad5364831920b97d5632a5..e5ad0708849a2f57d14d6e1f8141f6469d44aeeb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config SA1111
        bool
        select DMABOUNCE if !ARCH_PXA
index 29fdf6a3601dcbdf4abfaaa224cc9b75c6bfc932..70b4a14ed9937aad24ff77f5dd16dd0a52934538 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index d2d75fa664a64338bc6bf0af3c3c65e3de0926f4..2a63fa10c813042bf2b98261964c7b6cd9f03790 100644 (file)
@@ -32,6 +32,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
 CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_LOWLEVEL is not set
 CONFIG_ATA=y
+CONFIG_PATA_FTIDE010=y
 CONFIG_INPUT_EVDEV=y
 CONFIG_KEYBOARD_GPIO=y
 # CONFIG_INPUT_MOUSE is not set
@@ -55,8 +56,8 @@ CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_GEMINI=y
 CONFIG_DMADEVICES=y
+CONFIG_AMBA_PL08X=y
 # CONFIG_DNOTIFY is not set
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
index 64e3a2a8cedec353203694d6f9f74b4fa09f962f..d5e1370ec303d5440c4572262f6918d4a047a170 100644 (file)
@@ -471,7 +471,7 @@ CONFIG_LCD_PLATFORM=m
 CONFIG_LCD_TOSA=m
 CONFIG_BACKLIGHT_PWM=m
 CONFIG_BACKLIGHT_TOSA=m
-CONFIG_FRAMEBUFFER_CONSOLE=m
+CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
index 44d4fa57ba0a346cde5f53d099a3be61b42d841a..070e5074f1ee5b118ed35612c9cd09d65f611255 100644 (file)
@@ -113,7 +113,7 @@ CONFIG_FB_PXA_PARAMETERS=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BACKLIGHT_PWM=m
 # CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=m
+CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
index 8d4c0c926c344d9f654a87d179488eb5bfff7096..09e7050d56532dabd512cc99e1038a6dae525d69 100644 (file)
@@ -112,7 +112,7 @@ CONFIG_FB_PXA=m
 CONFIG_FB_PXA_PARAMETERS=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 # CONFIG_VGA_CONSOLE is not set
-CONFIG_FRAMEBUFFER_CONSOLE=m
+CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
index ec72752d5668eb3bbe1e013ecf5f2b9f9406b69a..b8e69fe282b8db8338abd8c4405d8031022aa448 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 menuconfig ARM_CRYPTO
        bool "ARM Accelerated Cryptographic Algorithms"
index f2215fbeed138f01f8f816404bf37b67f4635a99..30ef8e291271dc264e96254b11a90e9cadb750b0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index ffd8bd08b1a73e67591c2c3bac1acf4fdf544c92..758db3e9ff0a93e69573d0c86e3dafdab92efbde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_ARM_CRYPTO_SHA1_H
 #define ASM_ARM_CRYPTO_SHA1_H
 
index 7cf0bf786ada13d49497eeb0af01cbc7bf75b78d..9f0d578bab5ffe09997e535867b363988968e4da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_SHA256_GLUE_H
 #define _CRYPTO_SHA256_GLUE_H
 
index a75d9a82988a9dd93c04cf6551881c86079f2325..e14572be76d1809cac3a9ba5446b7b657a454b87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 int sha512_arm_update(struct shash_desc *desc, const u8 *data,
                      unsigned int len);
index 721ab5ecfb9b0ff5901da2cea74a6947496c5608..0f2c8a2a81319c6b3cb2d93a9f10e6801a5a07bf 100644 (file)
@@ -20,7 +20,6 @@ generic-y += simd.h
 generic-y += sizes.h
 generic-y += timex.h
 generic-y += trace_clock.h
-generic-y += unaligned.h
 
 generated-y += mach-types.h
 generated-y += unistd-nr.h
index d4ebf5679f1fd90c9422589381423a2bcd70e5bc..9327e3a101dc4852e530a9ef6a6aaeb2e83e92f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_ARCH_TIMER_H
 #define __ASMARM_ARCH_TIMER_H
 
index f5d698182d5002179ecb4b5d2a81cc9dd0d23237..40f5c410fd8c30300e094f3323adffe63743161d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_BARRIER_H
 #define __ASM_BARRIER_H
 
index f308c8c40cb930c86b889e52c91cdaeecbc55224..ce5ee762ed66c6cbc94fd5ab0755ad588f6a0090 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 1995, Russell King.
  * Various bits and pieces copyrights include:
index ec291c350ea3814e4f16e13140a324a0b509a531..84ad8dde62d643e6602fdddbc3c9b5370bdaab6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_BITREV_H
 #define __ASM_BITREV_H
 
index 2244a94ed9c9d30af84c2ac220c8f3c2abeb7e2b..237aa52d87339fd65e551bd65ec11bfd2fcc0792 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMARM_BUG_H
 #define _ASMARM_BUG_H
 
index 75fe66bc02b420014f37459c1ad786d49b1529c0..1d65ed3a27559f1250eb1f462fe66d505afb48f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/include/asm/cache.h
  */
index 01509ae0bbecb61f65681f3d480ff4040bb07ad8..e8c30430be33f576bd328b3dc952b4c9c3bfdd47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_CACHETYPE_H
 #define __ASM_ARM_CACHETYPE_H
 
index 524692f4acabf48906a9a2a4de9a053dba707068..20043e0ebb07485084b822fcf92dd3c3fac62500 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/include/asm/checksum.h
  *
index 97882f9bad12938780b3455d5ae8f8b184d5f5be..8b701f8e175c05fe91be6c42d165d1b964c0b82b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_CMPXCHG_H
 #define __ASM_ARM_CMPXCHG_H
 
index 29fe85e5943907d7e7c8e20efdb4bf8c60721b6d..5e94e67d10830b22fdfb8369eaf1e23454286264 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_COMPILER_H
 #define __ASM_ARM_COMPILER_H
 
index dbdbce1b3a729a40de5f4913a66d9f181df7fcce..4c9fa72b59f5751c652d8bb0a89de1fce98e7303 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_CP15_H
 #define __ASM_ARM_CP15_H
 
index baefe1d515174d77effa6195b4adde27ef35085f..6b2ff7243b4b2cd51a6d3d41107226f0b31ff070 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_CPUIDLE_H
 #define __ASM_ARM_CPUIDLE_H
 
index b62eaeb147aa9a0b8caa73bf96a73a1d02e5f708..441933311bbf8a2eda92b5e1547f550a98a6b690 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_CPUTYPE_H
 #define __ASM_ARM_CPUTYPE_H
 
index 2381199acb7de9b7b32c1fdcc05663d34cd32f09..f8500e5d6ea801b62d63e6e316042963a61c27ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_CTI_H
 #define __ASMARM_CTI_H
 
index e986b7f717c4159f537e0d34b0abc1ae2d01b746..4f80b72372b4160594366199b53f5261fc6d3f14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1995-2004 Russell King
  *
index 7d919a9b32e5f6e251e1a42d2ccd8f7d33d62483..898e9c78a7e75714ae53d6dd4987f6a9791bd8d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_DIV64
 #define __ASM_ARM_DIV64
 
index 4f8e9e5514b14486c8b9a6fdcc652af966bceeda..d785187a6f8ac1c2e267e62cebb81e4b505c5651 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_DMA_CONTIGUOUS_H
 #define ASMARM_DMA_CONTIGUOUS_H
 
index c090ec675eac22d2e5a3e1cf32e33be389c278fa..0722ec6be692381cee16f3f2ea4e8c32ce05677d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_DMA_IOMMU_H
 #define ASMARM_DMA_IOMMU_H
 
index 4e0285a66ef87e5328c1af52ad801c332c011250..3ca1199978186b47b3858996da4005952c5dc72b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_DMA_MAPPING_H
 #define ASMARM_DMA_MAPPING_H
 
index bb4fa67da54193777ef6dfdb4eaeca46629b89c4..a81dda65c57622a253fb2437c53ecba2ad8e82c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_DMA_H
 #define __ASM_ARM_DMA_H
 
index eaea14676d5732798433ad91cb25f05482b75147..4befe8d2ae19dc0b1cc5a90ce1cd7083b2ee6f80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/ecard.h
  *
index f13ae153fb246b9d64f2c99f75a717b70c1e5a67..8c5ca92a87a990ea69d58b9167299fc53d2d9e92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_ELF_H
 #define __ASMARM_ELF_H
 
index 609184f522ee7b0881ca73076d49d9dfcf265744..dfc6bfa430121673015fb927349b161c94798217 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/assembler.h>
 
 /*
index bf1991263d2df2128f4564aaee76d1c1560fe141..a7273ad9587a2d323bd794c54bf22efc9893fa4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Annotations for marking C functions as exception handlers.
  *
index d493d0b742a1383e716ab1b3c8f3286756e27689..6bdfb4a47322066e0e344b97229abd03077571a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/include/asm/fiq.h
  *
index 8f967d1373f67ba96beeb1f70357ecce6a7bc95b..472c93db5dac50b31d75e854b48b69cb4748284a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FIXMAP_H
 #define _ASM_FIXMAP_H
 
index 29d3a1524bce818a287e32b754b8ba9e7ac427eb..f0c75ddeea23762503150d10d571917608fb89aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/flat.h -- uClinux flat-format executables
  */
index f379881d5cc3feba90ebda6a873fb4fb950a1cdf..9e842ff41768c35db80093d6a9b8532aa2d43e88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_FTRACE
 #define _ASM_ARM_FTRACE
 
index cc414382dab4b47613619293a0e6e9033e480ec6..ffebe7b7a5b743682c071fc14a7dd30f75ebfac9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_FUTEX_H
 #define _ASM_ARM_FUTEX_H
 
index 504dcddebfcca8ec45d31b36fc4f9a6232999aa0..c50e383358c4cf19f890f14ba2dd0bf0b5f53e50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_ARM_GPIO_H
 #define _ARCH_ARM_GPIO_H
 
index 3d7351c844aac0ae2392d441796ce9904dcaf717..cba23eaa607215aaaab9342c6a661b06ebd07db8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_HARDIRQ_H
 #define __ASM_HARDIRQ_H
 
index 076777ff3daa3c5db361ee481c8b8ba15aa00718..e175c2384f28700cf2514460eaf04aff24832922 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/arm/hardware/it8152.h
  *
index 8979fa3bbf2ddbba5eb19fc492b1107f9a5abbec..0bbf163d1ed3c6cdaa2d47cd08671bf1c9d800fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/hardware/sa1111.h
  *
index 0a0e2d1784c011ddf917312f51931cefb8fa5d8a..b03d3fa2e58d86595ad0df1df16abfdccbaf76be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HIGHMEM_H
 #define _ASM_HIGHMEM_H
 
index afcaf8bf971b72ebbe848ca85fc1a6b1d42a8427..e46e4e7bdba39974979b54ab137d13ba90f5d96d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARM_HW_BREAKPOINT_H
 #define _ARM_HW_BREAKPOINT_H
 
index 9beb92914f4df4313f2bd4fba410fb6f720b9a24..cecc13214ef1c39361cd32e649e994e7bb001384 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Nothing to see here yet
  */
index 6e183fd269fb8b02a001f827ae4bbf3f7252804d..e31d9f1b8549bfbcd476ac3985657d2c31c6037e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_HWCAP_H
 #define __ASMARM_HWCAP_H
 
index b90d9e523d6f218663dcc7a54a48def5c8dae7c4..df8524365637acf6e138ae223241157370b72385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_HYPERVISOR_H
 #define _ASM_ARM_HYPERVISOR_H
 
index b507ce8e5019af2b879f0a38005d71f235898b9f..a81e0b0d6747aa2fc56066fe972d1d82df2d714f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/include/asm/ide.h
  *
index bf863edb517dd162066f34b5537e1f99db6482ef..73ba956e379f752ed907d443c89187210c1a1a37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IDMAP_H
 #define __ASM_IDMAP_H
 
index e96065da4daebe8347f6dab3da2f3ba542ac320b..f20e08ac85aeb975e28e8dc29fb7f59737a5e578 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_INSN_H
 #define __ASM_ARM_INSN_H
 
index e53638c8ed8aafc4dccfe9509c8284405d6fde2a..b6f319606e306ad00864e81e3ead98a96cdf76ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_IRQ_H
 #define __ASM_ARM_IRQ_H
 
index 712d03e5973a8457cc4a690d75b4db6a599b4d6d..8895999834cc0b73f2b0266cdfd0ddb6015354d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_IRQ_WORK_H
 #define __ASM_ARM_IRQ_WORK_H
 
index e6b70d9d084ea5d369c237f9a3f81c92e331a429..aeec7f24eb75beb505c885973efe8c7d4f50c0b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_IRQFLAGS_H
 #define __ASM_ARM_IRQFLAGS_H
 
index 34f7b6980d21dc81dbdd54b75e4568685f885d29..e12d7d096fc034058bfaa094bf9b314a2a7a983d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_JUMP_LABEL_H
 #define _ASM_ARM_JUMP_LABEL_H
 
index 25021b798a1e4d857567df78349e5d7c781aa5a3..22751b5b57356d27c09453bc1daaee9ff64f857b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARM_KEXEC_H
 #define _ARM_KEXEC_H
 
index 0a9d5dd932941a1f0635574904ecd47259b87295..3b73fdcf3627af25207be6df16be69ac7a95ea0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ARM KGDB support
  *
index 83eb2f7729113f9a7d23caf67e80dc20f9150bea..5590940ee43d77950f597ae9a93c357899ac36a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARM_KMAP_TYPES_H
 #define __ARM_KMAP_TYPES_H
 
index 08d8c66008040af243d05ef073b1fd580016ee1e..ab159371d786e9e3b2b3343785b0b0bf14bc7fa9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PIPE_H
 #define __ASM_PIPE_H
 
index 5a25632b1bc079aac63f66af28cb5447b80bf2de..c4670694ada7964b34ec62cb83918d3232bda2c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index e8567bb99dfc5531012c14976f3f93f57615cf58..58922879a60037462842b55ac579af8fe06e32e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index f652ad65840a44c4dbd0e5b3bd26d3bab7d09f9d..529d2cf4d06f4adf88170ca6c84f3e39d3305188 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MCS_LOCK_H
 #define __ASM_MCS_LOCK_H
 
index bf47a6c110a2f642b665475b1e9a9bcd1315dbb7..b10fd358ccc5774a7ee7ccb8799f0cd9293a0916 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_MEMBLOCK_H
 #define _ASM_ARM_MEMBLOCK_H
 
index a5b47421059dc34153f7450a1cc7d2baf21200b5..65669b9ce128821e92178024d80507150411e1ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARM_MMU_H
 #define __ARM_MMU_H
 
index ed2319663a1ecc6f04e860bac4069bf0370da5fb..89ad0596033abab691d76ca426f81b4136932f86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_MODULE_H
 #define _ASM_ARM_MODULE_H
 
index c3247cc2fe083d1659245696391ae5a1b61ec919..0c3f774fa4b5dfc451b2180e576d3e910f15dbb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARM_MPU_H
 #define __ARM_MPU_H
 
index 04e5a557a88444e562a7d56468e6abd519dd88f9..0ec6f07c2d8ac72057770f88efae3361c8607901 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FLASH_H
 #define _FLASH_H
 
index 8435ff591386c4ab7c70357929ae98da6b36371c..d51e5cd31d015ac5945987d38d601f9e0f018369 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_PARAVIRT_H
 #define _ASM_ARM_PARAVIRT_H
 
index 77e054c2f6cd3f6a265a75adc0c27d5730fef36d..0b48247c4600c25ff8bd2419278fc0232889e153 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARM_KERNEL_PATCH_H
 #define _ARM_KERNEL_PATCH_H
 
index 396c92bcc0cf3a903276d9fea00365ad649fc9af..960d9dc4f380945402b8676bdcc04f6e3d560bda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_PCI_H
 #define ASMARM_PCI_H
 
index 803bbf2b20b87b397ee12ca0ef2f5b4eefc403d5..63dfe1f103350f174975089d735393420f9973a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_SECTIONS_H
 #define _ASM_ARM_SECTIONS_H
 
index a5223b3a9bf91803339511ce336375cbf041dad2..367a9dac6150a3f543153cb80146e6019024a28e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMARM_SHMPARAM_H
 #define _ASMARM_SHMPARAM_H
 
index c0eb412aff0497b1e6afc2d542cab424fd791edf..65530a042009b90dde5d667756ab05f1b2083cd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMARM_SIGNAL_H
 #define _ASMARM_SIGNAL_H
 
index f9080717fc88c6dd4f3e79e40a426de22100d8db..f2c36acf98862358b252fdd64ad0264e174bcd66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ARM specific SMP header, this contains our implementation
  * details.
index 5983f6bc62d57784b007f3ccad4e80cad47e5828..800f5228939fa669dbc255d43146e62a2309356f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_ARCH_SCU_H
 #define __ASMARM_ARCH_SCU_H
 
index 7b2899c2f7fc8a4f07221bb599df93c6c4756f5f..312784ee9936ae4fe6da6459d9ca452ada438d07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_SMP_TWD_H
 #define __ASMARM_SMP_TWD_H
 
index 73e5e851375157513495e698a5d894617f7c86ce..d362233856a5baaa4a3f2b063bd529141917802b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_SPARSEMEM_H
 #define ASMARM_SPARSEMEM_H
 
index c030143c18c6ea9709a5b42c44112549bd4503fc..25cb465c8538b22cc68de7cdd39e2852a8382f16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_H
 #define __ASM_SPINLOCK_H
 
index 47663fcb10ad7aad7e3bc87f31636a7a77342e36..5976958647fe16e71a4b0977b057911470f6c450 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_TYPES_H
 #define __ASM_SPINLOCK_TYPES_H
 
index de003327be97dfcb36532376d349f23c91d899d7..ef5f7b69443ec59e752038394b4ab6a4f12fe819 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * GCC stack protector support.
  *
index 7722201ead197623d83df01f1c5ff5119527cd84..2d76a2e29f059f01d7fb8cfc285e0f1a0dbc13a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_STACKTRACE_H
 #define __ASM_STACKTRACE_H
 
index fe1c6af3a1b1a4cab35c6d125b43262d3d21fd85..f54a3136aac6e36efbc3a809c1937fa401b39a8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_STRING_H
 #define __ASM_ARM_STRING_H
 
index a61905c86732973665f101be08cffac5a7d4c946..452bbdcbcc835fc838b4c957f2da3e6dafd2fdc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_SUSPEND_H
 #define __ASM_ARM_SUSPEND_H
 
index 537fc9b91889931459350ac8997cfb65e50b512b..c6051823048bf22c73e9a25b1e291b376c7efc87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/include/asm/byteorder.h
  *
index 12ebfcc1d539151bd8365594befaa2e9814fb3a9..d3e937dcee4d0832ce3602156931dc3ecfb0aabc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_SWITCH_TO_H
 #define __ASM_ARM_SWITCH_TO_H
 
index 9732b8e11e63f6e2cf49038d3f5b9ef6f0cac22f..39ff217136d1f6f51fdbc8c4f5effa30220a4175 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SYNC_BITOPS_H__
 #define __ASM_SYNC_BITOPS_H__
 
index e86c985b8c7ac3e564239457134e18574870d701..06dea6bce293b934e1146d26aa316ea8e36e80b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Access to user system call parameters and results
  *
index 3860cbd401ec15389c9c2476577b838a1f1592f0..ef7fdb588b5fe2e63b905119783ea92d785ef084 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_SYSTEM_INFO_H
 #define __ASM_ARM_SYSTEM_INFO_H
 
index 8c4a89f5ce7d5fe425f7918519930faccbf16224..78f6db114faf6e7b7dd3c0e9621fc0347931f14a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_SYSTEM_MISC_H
 #define __ASM_ARM_SYSTEM_MISC_H
 
index f002f0197d78a7d6eecf2a9272c743334aefd3bd..17b0bc9b5e9b44f41282cec475cf5ad7f6ab0aa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/therm.h: Definitions for Dallas Semiconductor
  *  DS1620 thermometer driver (as used in the Rebel.com NetWinder)
index 1d468b527b7b6928d2bb21c2152a3a282a7a366d..776757d1604ab3901996bb24bb02748e54c2aee7 100644 (file)
@@ -139,11 +139,10 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
 #define TIF_NEED_RESCHED       1       /* rescheduling necessary */
 #define TIF_NOTIFY_RESUME      2       /* callback before returning to user */
 #define TIF_UPROBE             3       /* breakpointed or singlestepping */
-#define TIF_FSCHECK            4       /* Check FS is USER_DS on return */
-#define TIF_SYSCALL_TRACE      5       /* syscall trace active */
-#define TIF_SYSCALL_AUDIT      6       /* syscall auditing active */
-#define TIF_SYSCALL_TRACEPOINT 7       /* syscall tracepoint instrumentation */
-#define TIF_SECCOMP            8       /* seccomp syscall filtering active */
+#define TIF_SYSCALL_TRACE      4       /* syscall trace active */
+#define TIF_SYSCALL_AUDIT      5       /* syscall auditing active */
+#define TIF_SYSCALL_TRACEPOINT 6       /* syscall tracepoint instrumentation */
+#define TIF_SECCOMP            7       /* seccomp syscall filtering active */
 
 #define TIF_NOHZ               12      /* in adaptive nohz mode */
 #define TIF_USING_IWMMXT       17
@@ -154,7 +153,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
 #define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
 #define _TIF_NOTIFY_RESUME     (1 << TIF_NOTIFY_RESUME)
 #define _TIF_UPROBE            (1 << TIF_UPROBE)
-#define _TIF_FSCHECK           (1 << TIF_FSCHECK)
 #define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
 #define _TIF_SYSCALL_AUDIT     (1 << TIF_SYSCALL_AUDIT)
 #define _TIF_SYSCALL_TRACEPOINT        (1 << TIF_SYSCALL_TRACEPOINT)
@@ -168,9 +166,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
 /*
  * Change these and you break ASM code in entry-common.S
  */
-#define _TIF_WORK_MASK         (_TIF_NEED_RESCHED | _TIF_SIGPENDING |  \
-                                _TIF_NOTIFY_RESUME | _TIF_UPROBE |     \
-                                _TIF_FSCHECK)
+#define _TIF_WORK_MASK         (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
+                                _TIF_NOTIFY_RESUME | _TIF_UPROBE)
 
 #endif /* __KERNEL__ */
 #endif /* __ASM_ARM_THREAD_INFO_H */
index 5f833f7adba1abdc8620a11020cb2c80dec24d26..5a66c3b13c92f2fec67a32b61640aface3cedc1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMARM_TLS_H
 #define __ASMARM_TLS_H
 
index 370f7a732900ae12e8831e6f3ce7390d16455fc8..f59ab9bcbaf956b8cac5568e62c54de17a7cd648 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_TOPOLOGY_H
 #define _ASM_ARM_TOPOLOGY_H
 
index 683d9230984a51c33a89dac39ae8e7904c7017f9..f9a6c5fc3fd14c8fa00de21f00ff018ddfa39592 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMARM_TRAP_H
 #define _ASMARM_TRAP_H
 
index 87936dd5d1510572993d4bcc9b4fa1222a4dd3b2..0bf2347495f13e4db7fdc1c560b0976ec1fbd619 100644 (file)
@@ -70,8 +70,6 @@ static inline void set_fs(mm_segment_t fs)
 {
        current_thread_info()->addr_limit = fs;
        modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER);
-       /* On user-mode return, check fs is correct */
-       set_thread_flag(TIF_FSCHECK);
 }
 
 #define segment_eq(a, b)       ((a) == (b))
index 921d8274855c74cc5f1ba170db869dbe056d03b4..3f0d95ab14b8ee03ed5735548a620fe04d8d63f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMARM_UCONTEXT_H
 #define _ASMARM_UCONTEXT_H
 
diff --git a/arch/arm/include/asm/unaligned.h b/arch/arm/include/asm/unaligned.h
new file mode 100644 (file)
index 0000000..ab905ff
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef __ASM_ARM_UNALIGNED_H
+#define __ASM_ARM_UNALIGNED_H
+
+/*
+ * We generally want to set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS on ARMv6+,
+ * but we don't want to use linux/unaligned/access_ok.h since that can lead
+ * to traps on unaligned stm/ldm or strd/ldrd.
+ */
+#include <asm/byteorder.h>
+
+#if defined(__LITTLE_ENDIAN)
+# include <linux/unaligned/le_struct.h>
+# include <linux/unaligned/be_byteshift.h>
+# include <linux/unaligned/generic.h>
+# define get_unaligned __get_unaligned_le
+# define put_unaligned __put_unaligned_le
+#elif defined(__BIG_ENDIAN)
+# include <linux/unaligned/be_struct.h>
+# include <linux/unaligned/le_byteshift.h>
+# include <linux/unaligned/generic.h>
+# define get_unaligned __get_unaligned_be
+# define put_unaligned __put_unaligned_be
+#else
+# error need to define endianess
+#endif
+
+#endif /* __ASM_ARM_UNALIGNED_H */
index 35917b3a97f915d24e48ab30facddd744b3e0775..c799a3c49342882df3ee00a5f3c07f598f55d4a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARM_USER_H
 #define _ARM_USER_H
 
index 1fd775c1bc5deb3425c6c7c72478b6efeff21b54..e6d9e29fcae44ce06c8829fd27dc30ac43c56049 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common defines for v7m cpus
  */
index d0295f1dd1a38864ee56fb05efefa441f4e00000..9c99e817535ecd4cfa6013e8dffba974e94a2bae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_VDSO_H
 #define __ASM_VDSO_H
 
index 22e414056a8c253822012c18d389122317fdbfc1..7157d2a30a49dd412525fe944fedd57828a6b45d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/vfp.h
  *
index 301c1db3e99b13e95a6e8882013e7c518b6011c7..ef5dfedacd8d642bdfe27147e37bdec0a6f055bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/include/asm/vfpmacros.h
  *
index 91f40217bfa53e6077d358259f0e81384738e899..7c0bee57855ab6ac71d954eb8bdda6e028536d07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_VGA_H
 #define ASMARM_VGA_H
 
index 5831dce4b51c33e9b95bd8d2300467c557143eb6..352ab213520d20948442ad229a93a310f6f0343a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARM_WORD_AT_A_TIME_H
 #define __ASM_ARM_WORD_AT_A_TIME_H
 
index 620dc75362e5972adb5933ce9f8875fe56072c0a..c83086f745cfc71573e61a0b4d8cc576dd2b5896 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_XEN_EVENTS_H
 #define _ASM_ARM_XEN_EVENTS_H
 
index 6824b2d1c38e60bd0a4019e8d0450b987fa72d08..aed59332e487bc2c1d475a7cb687e036d9f9abbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/serial_reg.h>
 
 #undef UART_TX
index 0e2949b0fae9576033705aa969fb21583004b66c..ff0b227290cb91b8ea6e8dcfee20741153d76360 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_DEBUG_UNCOMPRESS
 extern void putc(int c);
 #else
index 8e17fe80b55bf5c052556df20f01dca73fe58231..4d53de308ee089a7b745926ab8da16caa825806e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
index cb02a767a50068d3ff665da106a604c11d32787f..5c09da5965d4a02819b079ff9276ba5a26ef50f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_AUXVEC_H
 #define __ASM_AUXVEC_H
 
index 77379748b17135c6dc03e0542e1a80d5ce171063..cb8406afe162eed26fb0a730b3be577215ac47a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  arch/arm/include/asm/byteorder.h
  *
index a80b6607b2efe35281d476d852e106cd3d6ca31b..e6b5d7141c05b2bd0fd4b2f245ba32a192f04e6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ARM_FCNTL_H
 #define _ARM_FCNTL_H
 
index 20d12f230a2f4d0939ec7e409961016658fb6199..b5971dfa4b8c2c12b0921b2b605f899a2cef827e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASMARM_HWCAP_H
 #define _UAPI__ASMARM_HWCAP_H
 
index 9c9629816128b15059e94b0d4a4b1b4629575fb8..1bfe2854fb51fd382b66e51f59bf95663ce04362 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ARM_IOCTLS_H
 #define __ASM_ARM_IOCTLS_H
 
index 5db2d4c6a55faf7940be63b8b03ee2a7383fe988..1f57bbe82b6fb8582c2a3a1617345266c22e33e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 - Virtual Open Systems and Columbia University
  * Author: Christoffer Dall <c.dall@virtualopensystems.com>
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index ce59448458b22a86cc249919c039b832dfc5d462..a3c046174e6b698219483d919e2ad0040fe84fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ARM_PERF_REGS_H
 #define _ASM_ARM_PERF_REGS_H
 
index d2de9cbbcd9bcaf6a9e5b76eefac1f8c8eb7b39d..6bf11ad5d6ba96f4d5db5450f2fe3528c6b71c11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  arch/arm/include/asm/posix_types.h
  *
index 5af0ed1b825a2aa95dc0626c9e1a685924979e24..b67cda536c255b876cdf8fa6b0cbafae0f97b245 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  arch/arm/include/asm/ptrace.h
  *
index 979ff40164040f7e3e38ad699fd8d34a4f5af8c5..6b335a9ff8c80cf5a0e62ae8652e89d956419f6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  linux/include/asm/setup.h
  *
index fc0b80b6a6fcf21728910bccb87f509c719f10f9..e223c65adabdd717fb0d4d9d1ad6ee8c4c89d430 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMARM_SIGCONTEXT_H
 #define _ASMARM_SIGCONTEXT_H
 
index 33073bdcf091beaf32611cb93dffeb363233b45e..9b4185ba4f8a5baea01d7ce93d740780e05524bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASMARM_SIGNAL_H
 #define _UAPI_ASMARM_SIGNAL_H
 
index 42c0c13999d5ffa4f8458d2825cd121a41dd8595..9c6580bfc04d116485208292a79a0687e0208e0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMARM_STAT_H
 #define _ASMARM_STAT_H
 
index 079447c05ba7ea9ea970fee600f03a863e7eaebd..177f0854007914db24fd5d386f16a4bf6a448384 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMARM_STATFS_H
 #define _ASMARM_STATFS_H
 
index 6fcb32a5c453813905b8156ef179ef129b6d6aa5..301aa8d8e3208957196fc3040790858e88af558c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  arch/arm/include/asm/byteorder.h
  *
index 9435a42f575e02c76199f861b9e0c96ffb77e123..1a667bc26510c25d1ccba050f64af9eb1cea9120 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_TYPES_H
 #define _UAPI_ASM_TYPES_H
 
index 28bd456494a338206c9164a8d42624e8e8171fbc..39b2ad997e91ae8edf4aced8dd583599816db6c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  arch/arm/include/asm/unistd.h
  *
index ad325a8c7e1e5d1dfbad11e8846169696d36e6bc..499f978fb1fd612c5e0f1e6fce6c44fac5c5ef0b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index edfa2268c12779dc86ae2513e6ff36a37ad7e0ff..20110022630163e29183b7bac67ed39ff0c325e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 void convert_to_tag_list(struct tag *tags);
 
 #ifdef CONFIG_ATAGS
index 5a3379055f5531673733b106c661d854cf08b8d5..312cb89ec3648e7a6224229df45494a039e24cb1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
 #include <asm/setup.h>
index c1809fb549ddde428f8bec226c4c7106b89ab240..0cd0aefb3a8f89de546255bd1371e7016fe2a543 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/kernel/bios32.c
  *
index ea9646cc2a0ed7eba2fa4f7f7638c0802642edcc..0a498cb3fad88d046c23073a5d1b7785fdfaf1a7 100644 (file)
@@ -115,7 +115,11 @@ ENTRY(printascii)
                mov     r1, r0
                mov     r0, #0x04               @ SYS_WRITE0
        ARM(    svc     #0x123456       )
+#ifdef CONFIG_CPU_V7M
+       THUMB(  bkpt    #0xab           )
+#else
        THUMB(  svc     #0xab           )
+#endif
                ret     lr
 ENDPROC(printascii)
 
@@ -124,7 +128,11 @@ ENTRY(printch)
                strb    r0, [r1]
                mov     r0, #0x03               @ SYS_WRITEC
        ARM(    svc     #0x123456       )
+#ifdef CONFIG_CPU_V7M
+       THUMB(  bkpt    #0xab           )
+#else
        THUMB(  svc     #0xab           )
+#endif
                ret     lr
 ENDPROC(printch)
 
index d0d1e83150c9553619c4a7f6c76605504d8765bc..846dda2f3c48f1532569aad4d52a89af4d7b9340 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/sched.h>
 #include <linux/personality.h>
index ca3614dc6938e1595f71a095f53456eb26701bec..99c908226065cf6331324309edeadfa618597874 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/unistd.h>
 #include <asm/ftrace.h>
 #include <asm/unwind.h>
+#include <asm/memory.h>
 #ifdef CONFIG_AEABI
 #include <asm/unistd-oabi.h>
 #endif
@@ -48,12 +49,14 @@ ret_fast_syscall:
  UNWIND(.fnstart       )
  UNWIND(.cantunwind    )
        disable_irq_notrace                     @ disable interrupts
+       ldr     r2, [tsk, #TI_ADDR_LIMIT]
+       cmp     r2, #TASK_SIZE
+       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]            @ re-check for syscall tracing
-       tst     r1, #_TIF_SYSCALL_WORK
-       bne     fast_work_pending
-       tst     r1, #_TIF_WORK_MASK
+       tst     r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
        bne     fast_work_pending
 
+
        /* perform architecture specific actions before user return */
        arch_ret_to_user r1, lr
 
@@ -76,16 +79,16 @@ ret_fast_syscall:
  UNWIND(.cantunwind    )
        str     r0, [sp, #S_R0 + S_OFF]!        @ save returned r0
        disable_irq_notrace                     @ disable interrupts
+       ldr     r2, [tsk, #TI_ADDR_LIMIT]
+       cmp     r2, #TASK_SIZE
+       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]            @ re-check for syscall tracing
-       tst     r1, #_TIF_SYSCALL_WORK
-       bne     fast_work_pending
-       tst     r1, #_TIF_WORK_MASK
+       tst     r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK
        beq     no_work_pending
  UNWIND(.fnend         )
 ENDPROC(ret_fast_syscall)
 
        /* Slower path - fall through to work_pending */
-fast_work_pending:
 #endif
 
        tst     r1, #_TIF_SYSCALL_WORK
@@ -111,6 +114,9 @@ ENTRY(ret_to_user)
 ret_slow_syscall:
        disable_irq_notrace                     @ disable interrupts
 ENTRY(ret_to_user_from_irq)
+       ldr     r2, [tsk, #TI_ADDR_LIMIT]
+       cmp     r2, #TASK_SIZE
+       blne    addr_limit_check_failed
        ldr     r1, [tsk, #TI_FLAGS]
        tst     r1, #_TIF_WORK_MASK
        bne     slow_work_pending
index 6391728c8f0377019404c6a6744df1e24697b3a8..d523cd8439a3df250ec514e2137ba5754c157ffa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 #include <linux/linkage.h>
 
index 059c3da0fee34fb815ffaeb3f9d4a59f2b79661f..cd1234c103fcdd7c85fbb7862d05a01dd1734c5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/kernel/fiq.c
  *
index b760340b70146123bd05dbc32e47d042f8d243d1..2e844b70386b38c5290fa46d095e928f9a99d27a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/kernel.h>
 #include <asm/opcodes.h>
index eedefe0500225a4d4744bf45e3b0c63f54419910..60b621295d6cbee114dedb1ce710086178d656ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/types.h>
 #include <linux/io.h>
index 845a5dd9c42ba34503b550336852bf3a6ad79264..90bce3d9928e2f679c01d0bf13eabf2dead216f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/jump_label.h>
 #include <asm/patch.h>
index 1bb4c40a3135ff946909a2f423d6295e45add671..caa0dbe3dc6156b6f1d36db227ab11346157322a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/kernel/kgdb.c
  *
index fe1419eeb9321ea553fcd68462596dadaf385185..6b38d7a634c19ffd279f98ca8cc3a113484d1fd3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * machine_kexec.c - handle transition of Linux booting another kernel
  */
index eacb5c67f61e97d318631d0a129bb7150fa021a9..79cb6af565e585b92d81277ac9d72c6159cdd69b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 SECTIONS {
        .plt : { BYTE(0) }
        .init.plt : { BYTE(0) }
index a1a34722c655a60582e39246a09a0495d4f6404d..a50dc00d79a273fac9e5d5c3f8be75f37231f766 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/kprobes.h>
index 22bf1f64d99a44291bd037a74b61ec1d249ec01e..08e43a32a693bd810f98d366e19c03e1e3767d63 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM callchain support
  *
index 8226d0b71fd330605cbaa813ad7f330615c75461..1d7061a389222862c68ea4da2dd8063a5a503c25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARMv6 Performance counter handling code.
  *
index ab6522b436593c59c11aa733f0ccc718b04eabf3..870b66c1e4ef13a6a8753ba42dca9c38a9edee59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARMv7 Cortex-A8 and Cortex-A9 Performance Events handling code.
  *
index 0e51f5e4f879b3a3423b183c2a75ba91a9cb9ac1..fcf218da660e1317060aa2b60608538f5f334d7b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARMv5 [xscale] Performance counter handling code.
  *
index c366b83bf9550d7d6329ee40c6dc417fe91c23b9..05fe92aa7d989e2a4207f3269c9caa1b0a2dfd06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/errno.h>
 #include <linux/kernel.h>
index bf7a0b1f076edb1ecabd504d2380bad9611a8bca..189ab81b77b6e192f204ebd39c60e7512ffeb812 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef REBOOT_H
 #define REBOOT_H
 
index 35e72585ec1d56a541fa7afd9c332c24e28a65fc..7eaa2ae7aff58921607883cb7e6765a22185852a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * relocate_kernel.S - put the kernel image in place to boot
  */
index e2de50bf87425e4a55baa66ef68d1fe99e53e1f8..b67ae12503f30c3ba113f1d8c7a943d17e9db717 100644 (file)
@@ -614,10 +614,6 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
         * Update the trace code with the current status.
         */
        trace_hardirqs_off();
-
-       /* Check valid user FS if needed */
-       addr_limit_user_check();
-
        do {
                if (likely(thread_flags & _TIF_NEED_RESCHED)) {
                        schedule();
@@ -678,3 +674,9 @@ struct page *get_signal_page(void)
 
        return page;
 }
+
+/* Defer to generic check */
+asmlinkage void addr_limit_check_failed(void)
+{
+       addr_limit_user_check();
+}
index 9f08d214d05a91c216abe7542a9bf6340dc0f812..a8257fc9cf2a908c4dd2b5f19c819b4c7fc40588 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <linux/threads.h>
 #include <asm/asm-offsets.h>
index ef794c799cb660006f2ad19bd93075444bf3ed3b..a40ebb7c0896b2f7be17ebe7eea11c961b20fba7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/mm_types.h>
index 8265b116218de4f44314b16d7795acae2492b12d..0951df916b8577cec288aefd78e204827397b364 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make ARM Linux kernel
  * taken from the i386 version by Russell King
  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
index c83a7ba737d6a96dedfe1dec88967d824309e538..1845a5affb44290934ac15084aad0603a20cf36c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make ARM Linux kernel
  * taken from the i386 version by Russell King
  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
index 90d0176fb30d3f7e7c5359d5ad084c373bd457e3..f24628db540984bbff0d4274bd1b312746a6347c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index d9beee652d36cbba48d0900e896f46b82df5c39e..f550abd64a25df1f42de16547e6fd4a1aa092787 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Kernel-based Virtual Machine module
 #
index 0064b86a2c87936ccc69cb3d413ce151e85f5933..30a13647c54c6ef3bcf01b3db27892e929cd8e4e 100644 (file)
@@ -227,7 +227,7 @@ void kvm_inject_undefined(struct kvm_vcpu *vcpu)
        u32 return_offset = (is_thumb) ? 2 : 4;
 
        kvm_update_psr(vcpu, UND_MODE);
-       *vcpu_reg(vcpu, 14) = *vcpu_pc(vcpu) - return_offset;
+       *vcpu_reg(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
 
        /* Branch to exception vector */
        *vcpu_pc(vcpu) = exc_vector_base(vcpu) + vect_offset;
@@ -239,10 +239,8 @@ void kvm_inject_undefined(struct kvm_vcpu *vcpu)
  */
 static void inject_abt(struct kvm_vcpu *vcpu, bool is_pabt, unsigned long addr)
 {
-       unsigned long cpsr = *vcpu_cpsr(vcpu);
-       bool is_thumb = (cpsr & PSR_T_BIT);
        u32 vect_offset;
-       u32 return_offset = (is_thumb) ? 4 : 0;
+       u32 return_offset = (is_pabt) ? 4 : 8;
        bool is_lpae;
 
        kvm_update_psr(vcpu, ABT_MODE);
index 8679405b0b2bb1e7a23232554bf26f71d7ae75ac..5638ce0c95241f7f3afd3e994aaa9993347c9be7 100644 (file)
@@ -1,8 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
-ccflags-y += -fno-stack-protector
+ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
 
 KVM=../../../../virt/kvm
 
index b0d10648c4864b22c4566884d252d2554e2ceeb6..69a9d62a0ac6575fb48638b920339e19c6ec66b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_ARM_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_ARM_KVM_H
 
index 27f4d96258a2e66193d6a3701bb4cf9a44399aad..4cb0b9624d8ff6bd017a25c28475e33c94cd7231 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/arm/lib/Makefile
 #
index 7d807cfd8ef57ed2bdde29d98ddb6a7094f725f7..93cddab73072cc716b07c0353ec79bdbaec3757a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/assembler.h>
 #include <asm/unwind.h>
 
index 07cda737bb11f14ed1c873e7e2c5b97c2da2543e..591ba077e874de5f5fef18da11d0a5643d8c7ff1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
index ad9c5c89c683ac6adeb3426feb0b2436d786dd05..b5e0ac965ec0dd10de686a29f86f48481e1f659b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_ACTIONS
        bool "Actions Semi SoCs"
        depends on ARCH_MULTI_V7
index b41838a58ae4c2393f65500740c713812c80cdcd..e3cbb07fe1b4e717bc0fe4cd5925e459554ce942 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_ALPINE
        bool "Annapurna Labs Alpine platform"
        depends on ARCH_MULTI_V7
index ee34aa34cc51ec284ae2de38376d97f179c414c6..4ea93c9df77b06c0b2f7fb6ff176ca9f9c240745 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 5036f996e694a533d66f82743b901385ae048007..849014c01cf4d62a465ec6e54b829d4ff45f05a6 100644 (file)
@@ -533,8 +533,8 @@ static void __init at91_pm_backup_init(void)
        }
 
        pm_bu->suspended = 0;
-       pm_bu->canary = virt_to_phys(&canary);
-       pm_bu->resume = virt_to_phys(cpu_resume);
+       pm_bu->canary = __pa_symbol(&canary);
+       pm_bu->resume = __pa_symbol(cpu_resume);
 
        return;
 
index c0a73e62b7256b244c687e1755272a823c9f7319..f2d893c03cd94889855d1339017e680466a1b3a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/stddef.h>
 #include <linux/kbuild.h>
 #include "pm.h"
index fe627cbcfdc5231adbcde3ce1d3afd5305812a5b..bb2ce1c63fd963253787932140e152d6ff260d19 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_AXXIA
        bool "LSI Axxia platforms"
        depends on ARCH_MULTI_V7 && ARM_LPAE
index ec4f68b460c62f5d64bd45e039968be0d1af61b7..8df8fe76ad47ae1368d8f7d4ecf69ad5033ea947 100644 (file)
@@ -1,2 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          += axxia.o
 obj-$(CONFIG_SMP)              += platsmp.o
index 73be3d5788510e953a460c76437db3f22c3d7bda..5d2925e2ce1ff8b99ec219fbcc1c392d28e01835 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_BCM
        bool "Broadcom SoC Support"
        depends on ARCH_MULTI_V6_V7
index 9c6d50e2b111016fc3e49137d83b18e372fe5461..4e742604a0fdf19c9b309690f0a7d37ab058a768 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM63XX_SMP_H
 #define __BCM63XX_SMP_H
 
index f385b1fcafef5939f07b7201d3b1a32889c99dde..fc9188b54dd66a74de77faa8e53c3ace86916387 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_CLPS711X
        bool "Cirrus Logic EP721x/EP731x-based"
        depends on ARCH_MULTI_V4T
index bd0b7b5d6e9d4d0bb7281c78e92e5401d7fdff39..f18f330f5364c03893fee32c73895bb657ee5f0e 100644 (file)
@@ -1 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += board-dt.o
index 5fd836be2701fc02744acd91d86e5749fcafea8c..1ecf5466931ebad683ce1b6ec78693a6a5cd8ab1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_CNS3XXX
        bool "Cavium Networks CNS3XXX family"
        depends on ARCH_MULTI_V6
index a1ff10848698947f07f464180cfb61644a815c36..52ca6ed62304673dbf13c92d9c009cac1d750cdb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ARCH_CNS3XXX)             += cns3xxx.o
 cns3xxx-y                              += core.o pm.o
 cns3xxx-$(CONFIG_ATAGS)                        += devices.o
index 36c8f5324e4383b270f71791a7bdafb46610fea1..05c3eecf47cb8364ae6a25f2c53c37dc8803f2fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ARCH_DAVINCI
 
 config AINTC
index df96ca9eab6d49997374adabf687a2ca6026b3f9..4e8178050027458779f6685e921d8953c33a0891 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 4b81601754a2ab8de29ab5ebf3dc2a8fc2f235ad..d36b251f325ba98184f4a0cfa8f8308cf8fd078a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 zreladdr-$(CONFIG_ARCH_DAVINCI_DA8XX)          += 0xc0008000
 params_phys-$(CONFIG_ARCH_DAVINCI_DA8XX)       := 0xc0000100
 initrd_phys-$(CONFIG_ARCH_DAVINCI_DA8XX)       := 0xc0800000
index 1128e1d8e4b46690f3af8909c5e5d6829d642219..495aa6907cbce23f56528e00629a087b84ecef99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * TI DaVinci Audio definitions
  */
index c19e047d0e6af43580722cb279e04aae933b0bb3..4f7d7824b0c9ad79e1c0c6292eaa5d2fbf526972 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define DDR2_SDRCR_OFFSET      0xc
 #define DDR2_SRPD_BIT          (1 << 23)
 #define DDR2_MCLKSTOPEN_BIT    (1 << 30)
index 9a6af0bd5dc340690bbe794b972b0aeb529faeff..d480a02e12988493e0e12230b9efe03b3d0b92a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DA8xx USB
  */
index 0e7e89c1f3313f728b8a8bd788e6690c939ef13e..31ed7aa4722730f9b50656dfb629c8bd48f66117 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * USB
  */
index 9d05c6c4181d4a98774035678ec82b07063b47d2..90394433c4051cd8ec26ff28ca4cff2288826085 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_DIGICOLOR
        bool "Conexant Digicolor SoC Support"
        depends on ARCH_MULTI_V7
index 0bd6d894c5970474799c92c7fca5a1512acbd54c..7747fe64420a2c23233d7a5feabe932d70508495 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ARCH_DOVE
 
 menu "Marvell Dove Implementations"
index b608a21919fbf5c513046a7ed5ba1668099b1b7c..cdf163cab7387b5723bbbb9ed6746c947696c8af 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          += common.o
 obj-$(CONFIG_DOVE_LEGACY)      += irq.o mpp.o
 obj-$(CONFIG_PCI)              += pcie.o
index fbec7c52bfac79ee74d6baac07ad0171163d4e2d..2e4b89c86ca80f5747b53649efdf7949e5fd1c15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_DOVE_MPP_CODED_H
 #define __ARCH_DOVE_MPP_CODED_H
 
index b57980b435fd42f7938c3fe728799f4183faa12a..3c44dd3596eafb33a5691f1d640db17a9f7d8747 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mach-ebsa110/isamem.c
  *
index 2367495193c1d439041cbac3ec486fdbb61f7165..e9364b843641644611dd0c13d9b913070568784b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 
 #include <asm/v7m.h>
index b7ae4345ac080fb9657635d034dc32d1b6c962a4..86768495f61da9820f038bb43b9cfc5905f362b8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index c64d74246602450a5116179f07e347ba004e1826..6839ea032e5827f1633016c33f24a51a213b7c9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
  */
index 6d7c571a519f5a7e85305d3dae9ae6a57b19a13a..242af4a401ea34ba074e1c0b018f7eb530ae92b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Include file for the EP93XX GPIO controller machine specifics */
 
 #ifndef __GPIO_EP93XX_H
index efcd47815a9110d9b37c6c917ae03bd9d056562d..8938906e780a466abace6c71c9983f38a8dda5a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ep93xx/include/mach/hardware.h
  */
index ff98390bbf0ffebd4c21481bd8a279cb03b8c020..244daf83ce6d7a2a67ad43265d667726bbd81e9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ep93xx/include/mach/irqs.h
  */
index db0839691ef5e883fd5f4ea0748f2698332e4d6a..3bbe1591013e019837cef8524067867c0f6b613b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ep93xx/include/mach/platform.h
  */
index 874cbc91b66944e09e64f66d0bb833e684586cba..de998830f534fc00abde80c9443e58bf35373569 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/clocksource.h>
index 2255ba29fdd64d4bdc3102a69869184972a31f60..b89850f1a965103945d3e3e960a1fdd2de63580b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ep93xx/include/mach/ts72xx.h
  */
index e83d5c8396ff720a9c1cb8a3e9095fe4d9166f3c..a09f1041f14134fe7eb4918059089818e9cb0848 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 8f05489671b7f315aa763f6cc9124eac2fd263fb..e575dc0698cd0a622494daa93b52433dd203817a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/cats-hw.c
  *
index 5cec2567c9c5e53a5f7b627f3ae5a8b541ea4cb0..0b2fd7e2e9b429fd40ecef879a76f8f7cbb3bacb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/cats-pci.c
  *
index b911e5587ecf2116c57736aad32ef339bd08771a..e12587db59c4c8bb562d19546d55aaab6fa3eed4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/reboot.h>
 
 extern void footbridge_timer_init(void);
index 75395a720e6338b49636bef9157ea330f133025c..f76212d2dbf1fed88106325c7fa7f133af01fa6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mach-footbridge/dc21285-timer.c
  *
index 22536b85a81d5323cf1fda51ee9462279a9bcf1d..86618074a7a55fa87a1678ccd6ca106e7b844fad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/kernel/dma-ebsa285.c
  *
index fd12d8a36dc560a3c84e4edbe0c3024a5ef4a67e..6f28aaa9ca79b2c849b892535c192cb3fc290f5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/ebsa285-pci.c
  *
index aee8300f34906d584ba6e38df4ba7a4d54264a19..21cf9a358b90ea9e329a5805472d578eb6d213a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/ebsa285.c
  *
index 61c714c4920e1f7268d9a2fa6d7784b6efa50ccf..a5f41846ab9cadf9b2017aa13f3b5e078bb07094 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-footbridge/include/mach/irqs.h
  *
index 5bd4a0d338a8ff351e7125c206a11a53c66fc76d..8a1b991076e1668c7945dc81d6fcd0f8a489dec2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/arm/mach-footbridge/include/mach/isa-dma.h
  *
index 07fde4051f785f30dcb614b6d6933da78c90da00..b8f741a3a37ea02cee2558f951eb9bf297936168 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/arm/mach-footbridge/isa-rtc.c
  *
index b73f52e196b90e91b75ac6ae8ab628f72381a070..82f45591fb2cb7ef5e5eb949fe17f356fa342833 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mach-footbridge/isa-timer.c
  *
index cdee08c6d239711a6335d55529b20a07ab46bda9..5f7265b1b34c77040c45882fac1c06ab2f4c76ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/netwinder-hw.c
  *
index 0fba5134e4fea1c0842be502c82174e0795e5af8..9473aa0305e5f77883bb65e1f343ce7a8b9452e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/netwinder-pci.c
  *
index 5c9ee54613b2aa0ea931698ffce864d3b393b8d6..4391e433a4b2fc3f9bd0843fe1a4a68077818809 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/personal-pci.c
  *
index 7bdeabdcd4d8876f602a1548baa2cf29b3a3cdee..ca715754fc0077044601361ce5594fc0a8fb49de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-footbridge/personal.c
  *
index c0c0ebdd551e8d194ea80c1d30847c5a541d685a..de0afcc8d94a8e1e378fe37d4e55b1d656cefd45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Gemini Device Tree boot support
  */
index 7ec5edcd1336c06e7718517ce8fc9cc5b8ef213d..3991a6594ae5e9702599e7545c63a0ce5161be52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HIGHBANK_CORE_H
 #define __HIGHBANK_CORE_H
 
index c58b68ab0cb634906a7b510fa44b6abb4f7a8650..61245274fdaf0b73e2832eab34c69149c2c551a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HISILICON_CORE_H
 #define __HISILICON_CORE_H
 
index cab128913e72a710a0f405336b0d814e56935546..8ff71058207dc1a43939d985f9781d68219d73cd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y := cpu.o system.o irq-common.o
 
 obj-$(CONFIG_SOC_IMX21) += mm-imx21.o
index 94906ed4939236b4a3d9a1a4896e57a418b23b98..d4e55f2a897ef909ff2ec53597795dd38b1b8361 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/io.h>
index aa6cee87079534b266ce18c25a51a3232877fed1..e44758aaa11c1af7cfb7b23cd1a5fbf1ffdb52fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y := devices.o
 
 obj-$(CONFIG_IMX_HAVE_PLATFORM_FEC) += platform-fec.o
index 0e060023db8b3f7c38d50e75b39b2fb1c1051ae2..b7ad6175f5bf7d553787a3ff4a9be9e7363f78e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_IMX_EHCI_H
 #define __MACH_IMX_EHCI_H
 
index ee9b1f9215df78fd859e4274a3e31bde736c4b84..d9574671ca5c597d9e21db2d7dc8e29d301b69e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MX31_H__
 #define __MACH_MX31_H__
 
index 2af5d3a699c7271d56ba6d610ed1bb331547dd7d..760de6a0af7e1bb7b2f49044608107f33b4b1b3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MX35_H__
 #define __MACH_MX35_H__
 
index 7d167690e17dab2e2e3ff6318010bbaf3198965b..470d3c887e14e14f63f6029f668a20273ccf4168 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PCM037_H__
 #define __PCM037_H__
 
index 23f5c0349e807d737c3d9338b0f9efbd90dcf1ea..b367902c9c323f7b6ccc6d802d711c6d7390e464 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_ULPI_H
 #define __MACH_ULPI_H
 
index 1ebe45356b09ca18b85a7dc1da4b0e012685e885..a5a4470db482b6be9eb12a87627bfd0bb6ed4c33 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 5b8ba8247f45404d7d4c6d8f318a9295e9ce6e15..f09ea18a50f852e34ad4863161206bee7d1421be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * access the core module control register.
  */
index 96c9dc56cabfc2644d4cf7c832c26d4e87651574..f053aeebeb7aaa54477866f00ab91bf33613668a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/reboot.h>
 #include <linux/amba/serial.h>
 extern struct amba_pl010_data ap_uart_data;
index 76de4dc9bee405ba7b23319f8c87621472054ecb..36124d34c8f7cff2181a1fa2bd90f50b19976f02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define IMPD1_LEDS     0x0c
 #define IMPD1_INT      0x10
 #define IMPD1_SW       0x14
index 28186b6f2c0962780b6bb794d85dc283e79ba361..172966a699bdc33af03194d4fb0875263229b11e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 struct lm_device {
        struct device           dev;
index 06a9e2e7d007b847f650b8efbf0856a1f47978ae..cafc7174baab887d5d13de01fe2e9ecc66eeb6eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Simple oneliner include to the PCIv3 early init */
 #ifdef CONFIG_PCI
 extern int pci_v3_early_init(void);
index 40c2d689f2ebf417ef827306bb78a7e9011062e8..c4f04070b4c1a40c50c8894794bd8db0c53979d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ARCH_IOP13XX
 
 menu "IOP13XX Implementation Options"
index a3d9260e335f2f1e5f5e24119fc2e3cb247f00bd..5757c8f6e371eba5eefec034d22fb41cd0d23006 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ARCH_IOP13XX) += setup.o
 obj-$(CONFIG_ARCH_IOP13XX) += irq.o
 obj-$(CONFIG_ARCH_IOP13XX) += pci.o
index 786fa266fab3b40d80d39fd64e6b80b0014dbdf9..8c943fa6bbd71ddb71036412f2d0737a9a9fb0f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 #include <asm/types.h>
index 9311ee2126d67e7b921e3f31eab696afee7e0e1a..04bb6aca12c5d671ddc04159de0d9b8c66d3a125 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP13XX_HW_H_
 #define _IOP13XX_HW_H_
 
index ba2cf931e9ce1d0baae3b1933b8d9a35130dd5fb..d7ad27a955589435f3fe6a28a1aa6264759111c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IQ81340_H_
 #define _IQ81340_H_
 
index e8d24d32121a1811b2ddaa580ce7ff435692caee..cd6b6375c05066ba0efe3e8baf9a200a9f167f8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP13XX_IRQS_H_
 #define _IOP13XX_IRQS_H_
 
index 59307e7875886fcc3804829d6afb378ef853f717..32da0e09c6a31324e3de3540231c4e3bfb66b160 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
index c871e6874594cc25f178baf9ff8ce5abe0dfd80d..2c2d7532d5c3b43100fd79854ddf68042af93f16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP13XX_TIME_H_
 #define _IOP13XX_TIME_H_
 
index d3791ece2772a36c997b3422545236a747e46ee2..c62903041d119a8c55e25cc951d43034e4e79542 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/types.h>
 #include <linux/serial_reg.h>
 #include <mach/hardware.h>
index b80c5ae17e99eb760f039f91d9ed2905e6e9f7d7..766dcfaaa353b109a294841e2c9ced40d63f34a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP13XX_MSI_H_
 #define _IOP13XX_MSI_H_
 #ifdef CONFIG_PCI_MSI
index 8dc343cb887a594c361cd56a4753186888741309..736168d8c7ac0a999d091ca9a3ee5800315260ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP13XX_PCI_H_
 #define _IOP13XX_PCI_H_
 #include <linux/io.h>
index 5e8c6f7dfabb4cc8c351316ab50ffd6a32988204..f1f342cb05097b54896e2c1604b50ce667a4bc35 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ARCH_IOP32X
 
 menu "IOP32x Implementation Options"
index 2d4010abb82fb7e9bcd4e00199f14766d67a353b..71d62447d4d5e7eec6f79de921f824927eb48556 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 3c7309c02029704834503d5c58e81bc47df75bd2..20af87e4c5e849bab041b5c9f891aa01bbe45680 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static struct resource iop32x_gpio_res[] = {
        DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10),
 };
index 5ed92037dd1048ab39f07ade50a5779fc06e3771..2b20063123ad5e0fa1ef7d6e94b90011eec0991a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IOP32X_ADMA_H
 #define IOP32X_ADMA_H
 #include <asm/hardware/iop3xx-adma.h>
index 958eb91c09137c21a09346bcac2e3439452e7600..b9df2e4614cfcf6a5d85188289164e8aa97295af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/glantank.h
  *
index 48cb1b20ba9122a2d46dd24357c14591fee42ff3..6e5303e602268d2be6964f5607e5bcc0e8dd6886 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/hardware.h
  */
index 6b6b369e781c5488f6427db0f93d3f96058d2c5f..e62da5da6ed4078b706a182ebf6565d2e78206b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/iq31244.h
  *
index 498819b737e704f074007c31d9e551fb2578d46b..faf62c26f6f8758fed91376b97bbf73645573557 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/iq80321.h
  *
index 40b8a532b064c9c3cdf8ceb757fd5318423fe428..70bb660b643ab00929708cf271f54a3f15a480cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/n2100.h
  *
index 0f28c99496233f6b067245bcc28d4aab4acfbaf3..d08950ccebc477590c96a4afe0a5a38595b34f0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP32X_TIME_H_
 #define _IOP32X_TIME_H_
 #define IRQ_IOP_TIMER0 IRQ_IOP32X_TIMER0
index b3d45fd365e7be2a6411d40960b8c61549eeed8a..ed4ac3e28fa15eb03d889b8a97c51c355ab94bfb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop32x/include/mach/uncompress.h
  */
index 4b92f795f90ea009c5cc6433a225e9e0c6e9f2bc..8aa7159ab6d856c04c67f6b894fdd361cfd59467 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IOP33X_ADMA_H
 #define IOP33X_ADMA_H
 #include <asm/hardware/iop3xx-adma.h>
index 839285315e4e3b24d67280897fc81de24349a4fb..020bafbc36a569f8efdf66cf3274ec480bc91cbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop33x/include/mach/hardware.h
  */
index fe406b0127f7054be2e36e443bb3996885ea946d..c7e68d863e44d4ef81302e985df5ec9dfd681699 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop33x/include/mach/iq80331.h
  *
index 8325d71f2ed5bf3a0ba541f63985c9d0cfcbf38e..749b44bf7f62b2a9757ac080e87659d8a64e8d8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop33x/include/mach/iq80332.h
  *
index 4ac4d7664f850453dd9fad32240873a89d5f4dfb..801f8fd644ad625738d7430d420ab5e6e835229b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IOP33X_TIME_H_
 #define _IOP33X_TIME_H_
 #define IRQ_IOP_TIMER0 IRQ_IOP33X_TIMER0
index ed282e14176df0a2103b95a7c70db5a2bf9a7c68..62b71cde1f793155a6e37c8a94372a3c55c9d5eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-iop33x/include/mach/uncompress.h
  */
index eded94c96dd487375447aa456eba4eb5ad3cda17..f09994500a34c51d2d3c2d82cb7e51f65e525815 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 6beec150c060a6a7453ce2a080e5947b54b93dee..186df64ceae733de395f141e467935d96321cd91 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/avila-setup.c
  *
index 820cae8608fc2080259c9d8aefe04adb924e6157..7e40fe70933bcf4190117aa29a8cbb6b9dbe138d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/coyote-setup.c
  *
index b3bd0e137f6d1dec8d76e5305197002c7bf831fa..db488ecc98b54ea6f832bcba1b5e45d4edafd4f0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DSM-G600 board-setup
  *
index 5c4b0c4a1b3787bfe009e3d254db7c8d73b325ac..6e32cbc4f590c5069db11cc6ac3b04da749726d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/fsg-setup.c
  *
index 3d24b3fcee875f0c34857861c936e4c087458280..1be6faf6da9a3f69528c8196adefdef2df25ae38 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/gateway7001-setup.c
  *
index 80bd9d6d04de78addde68e35c1207b39e491e409..145ec5c1b0eb5dd2ece70b573a1e00289b78b70a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Goramo MultiLink router platform code
  * Copyright (C) 2006-2009 Krzysztof Halasa <khc@pm.waw.pl>
index e320db2457ae931eab7d6257f67ab8ea89d14f85..3a980845e5571aea09c8752237a0f1c283d37469 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IXP4XX_NPE_H
 #define __IXP4XX_NPE_H
 
index 34b3d3f3f1310350697ec066bdc730525cce81e3..342acbe20f7cde7905f9f315a5126b1abe1a81f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-ixp4xx/include/mach/platform.h
  *
index 93b89291c06be2baa7b981c6d493c290c48ab73b..8f5e01527b1be37373eeaaf34c79f61d22458057 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/ixdp425-setup.c
  *
index 4e0f762bc651a8d7b9ffd380825eb26cedf68a50..1b8170d65c748c06f4f300057b11706785701f1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/nas100d-setup.c
  *
index 88c025f52d8d729dd329013d1cd6479cd9992f02..bd8dc65b4ffca3d1245ae7b1226e36c18ae431a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/nslu2-setup.c
  *
index d599e354ca57fd6511db36fb8660636e6d152c81..731fb2019ecb84be4e268ff6fcb9a967b8217563 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/vulcan-setup.c
  *
index 8f9ea2f3a9a5c8971bf42497fc85679082db37ff..90b3c604e8b6108d1c8882e3bef0567c18cb8576 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/arm/mach-ixp4xx/wg302-setup.c
  *
index 25d92396fbfa1df7f4f7a0ac983d830ead5caa31..f8b0dccac8dca21a51460e1c30e847f13f9272a4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                                  := keystone.o smc.o
 
 plus_sec := $(call as-instr,.arch_extension sec,+sec)
index 8ecb7973ae542c4fa8f89a8f29e9f1ccb6d95c72..439b22255a3274a9967039b0a186b485d363c0ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # arch/arm/mach-ks8695/Makefile
 #
 # Makefile for KS8695 architecture support
index 7677ad5414e9e5f3c4b945ad3f2697eb4b7a145d..8f267c7bc6e86010c1cabbcfd8ce13d4586fb4cc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Marvell's PXA168 processors line
 #
index 835c3e7cc67e2ab11f1ec72f5c491ecc648fb449..7536398bf1c16554817683cbe994818f302afd29 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index f726a3692431eca9b88e23716b50492620da1e14..2d4a5d96a1ff4a791336255fe584c9dcd5722781 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index bca60a224e0787501c3b90871d8d53b93840d7fe..3cd83ff91bb08c63c1393f405f94a6f62aa86a8a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 7453a90c34bdf9d458e28aa287bcf939ec58aaba..7e284d9c429fbf738fdbb6d67ec73d6e08f253d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/reboot.h>
 #define ARRAY_AND_SIZE(x)      (x), ARRAY_SIZE(x)
 
index 8a3b56dfd35d7af96d47b367e5ccf0078d5d2f08..446edaeb78a71d07a8c719732455589ffa67b49e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_CPUTYPE_H
 #define __ASM_MACH_CPUTYPE_H
 
index 21217ef11b64f38639221e2717fbcf20cd63d487..4df596c5c201acd21c09f5cd24d71c41a97426c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_DEVICE_H
 #define __MACH_DEVICE_H
 
index fb492a50a817979f53aa95507c779b381aba849e..5acc4d532a432e0818b688fc17b4e6f36a074393 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_IRQS_H
 #define __ASM_MACH_IRQS_H
 
index b2744349725dae91b8bd3cbbcbf163a28caaa9a4..1620222981e3ff9f963b4c36ca0699603ee5bf0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MFP_MMP2_H
 #define __ASM_MACH_MFP_MMP2_H
 
index 9050d032377e6a03dea47b5620fee24ad476ad27..90d16d3419a49278361feb120cb59afcf13063ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MFP_PXA168_H
 #define __ASM_MACH_MFP_PXA168_H
 
index f06db5cd3ad31274fda87b86829dcdbcfb867297..6f900cade631cb70ad5bff06478737c6f34702ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MFP_PXA910_H
 #define __ASM_MACH_MFP_PXA910_H
 
index 62e510e80a58099bfefb363253a2fdae92537837..75a4acb33b1b60def710dc0a2e1a29aeea6546ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MFP_H
 #define __ASM_MACH_MFP_H
 
index 9b5e75ee9e4dabbfc0dcd259e612d518ef9e7a77..a4b82f719de154c425ca4157008be8f84ff1e731 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MMP2_H
 #define __ASM_MACH_MMP2_H
 
index 75841e9ccd739684b4667f74c36d28d3319ef3de..b39bff37ff11e0c28cc419e3ce05515d50df5d91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_PXA168_H
 #define __ASM_MACH_PXA168_H
 
index a211e81e5a082466fcef25bed6b5ce938e2fbb0c..cb3923dcf580d9bab069e8925e879bf6c72c408e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_PXA910_H
 #define __ASM_MACH_PXA910_H
 
index ddb3aa98a3c742364a8e2fdf8f0b8290ace97f87..a839e960b8c6f2fb6961090c29eb27c4cbf475c3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
 
 obj-y                          += common.o mpp.o irq.o pcie.o
index 6c6497e80a7b13433d833923d8c5003c52039d9a..cb106899dd7c8c220d75245add6342cc8cec1107 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
 
 AFLAGS_coherency_ll.o          := -Wa,-march=armv7-a
index 0e8ea95ea82268958b1dcfd5edf75b55b2d8f6b4..e8ccf51c6f292959c4f373d7a802c19ddf278c09 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index caa6c0d6f0ac40d93018b9561304489ae774c0a3..8018f410d0242720e38f0ea74eeb95d9049f924b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_CAMERA_H_
 #define __ASM_ARCH_CAMERA_H_
 
index d43ff0f1cbf8d339525415d65e249abff3e2fc61..1142560e0078f5eb6e0547916d8e18400ba3378c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-omap1/include/mach/memory.h
  */
index eb76628ff84310f28067bebf06b127e0bdb72cd5..77867778d4ec700844fefe14146303a9f35f17fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * FIXME correct answer depends on hmc_mode,
  * as does (on omap1) any nonzero value for config->otg port number
index d7b46880e4ca50538dd62c13c655b586a4c43cad..043bd02f3f2a55739c711af6da18f006a22a80aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/mmc/host.h>
 #include <linux/platform_data/mmc-omap.h>
 
index 72bf4bf4a7020476312858658965d3aeb4680101..af2c120b0c4eccf45ff017c968d32a98709f4287 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OMAP1 reset support
  */
index d5a6c836230122aeb1c99e6350480c84626faceb..73efabd119e80083bb134439330d3a628fc4dfb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <plat/sram.h>
 
 extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
index b3b3b3a19183507f736669ebc4f6a55302dfb571..38f1748a45009756672ea5963776b22d23eea08d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 125c37614848430f2e6f32eff0b5c008b335c148..a8408f9d0f3388cac2709d0c3819395f65837875 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * OMAP2 clock function prototypes and macros
  *
index 78d9f562e3ce796b76821c812ea3a7cf56050fb0..10a9f577dc1a07e46a4036d894c0d672e03f187b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * OMAP3-common clock function prototypes and macros
  *
index 7e76becf3a4ae7dae8119d68f8be46f8fdc2229b..ac4ffb5d2ffc29058d2615059b91bf7a0eea03e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OMAP2420 clockdomains
  *
index b923007e45d005c5657e667fa2d4b6e959195ed6..0e97e178abaae51b9836bc10924fb397d37026da 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OMAP2xxx clockdomains
  *
index 4972219653ce85b1bebcad5629ab92d733dfef45..220c22f5e0f5a0cf881693cfefcaff65237a1296 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OMAP2/3 clockdomain common data
  *
index f03dc97921ad934923ea78ffa7fad8204586cace..94bbd3831ac3276c7c303204fcc5beea46e187ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OMAP3xxx clockdomains
  *
index 335c7822fea1974e131dbb629f0554c0e897af02..b23962c38fb271a7841c629f6a019c748487f8a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OMAP_COMMON_BOARD_DEVICES__
 #define __OMAP_COMMON_BOARD_DEVICES__
 
index 5b614388d72f4b7ca8be1c851f1369f719ce2c29..6d28aa20a7d32c4142dba9a52cbaa06fc6c387f1 100644 (file)
@@ -58,10 +58,10 @@ void omap_hsmmc_late_init(struct omap2_hsmmc_info *c)
        struct platform_device *pdev;
        int res;
 
-       if (omap_hsmmc_done != 1)
+       if (omap_hsmmc_done)
                return;
 
-       omap_hsmmc_done++;
+       omap_hsmmc_done = 1;
 
        for (; c->mmc; c++) {
                pdev = c->pdev;
index 30d39b97e7dd3fdefe1f9e1d6064a275d97c9ec1..9145a6f720fcd14c7ecb50d0176997249a88ec41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #define OMAP24XX_NR_MMC                2
 #define OMAP2420_MMC_SIZE      OMAP1_MMC_SIZE
index a1ee8066958e772a22d6777d637a4c0ee1e0fb44..4ead077ea4e72c18854b34051c667131e7a5083e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * omap-pm-noop.c - OMAP power management interface - dummy version
  *
index 109bef5538ebd236a2636c8cbf5f2095bd46c701..5ba5df47f91b95272fbb99afae8e62da3f289a90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * omap-pm.h - OMAP power management interface
  *
index f040244c57e73f381c0004e730ff1664f9300e00..2f4f7002f38d0138e9d8cb9cb2d3cb9d97237675 100644 (file)
@@ -839,6 +839,7 @@ static struct omap_hwmod dra7xx_gpio1_hwmod = {
        .name           = "gpio1",
        .class          = &dra7xx_gpio_hwmod_class,
        .clkdm_name     = "wkupaon_clkdm",
+       .flags          = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
        .main_clk       = "wkupaon_iclk_mux",
        .prcm = {
                .omap4 = {
index a9e8cf21705d8da54bc18a891f1a050e977c1e37..18a448f938eabc5c83adcf1e937fe45365d89865 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * opp2420_data.c - old-style "OPP" table for OMAP2420
  *
index b2233b72b24d71e2a28144702da5341d56fbd56a..ded8b566a23a9ac4a5e050374f0cfb34d7ee89a4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * opp2430_data.c - old-style "OPP" table for OMAP2430
  *
index 8fae534eb15711fe81d5f203821b5cf4823c8ab6..a451182cdc027e246b38b549399232d7ed84a3dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * opp2xxx.h - macros for old-style OMAP2xxx "OPP" definitions
  *
index 3395365ef1db542bc2878b2231d79cf74234a434..740a499befce3ee99b690c6ab3bd7505e00e79b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/platform_data/usb-omap.h>
 
 /* AM35x */
index a3c30655aa300ee6ceb5daa02a8fcd6abfe4de6c..a709655b978cbcc966ca61412dea2be397f7c3cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 
index ae91872eeee4dfbe0f0f0cb393c22cb443c9965c..1a585a62d5e67de4159d111847408d50c614fe23 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include
 
 obj-y                          += common.o pci.o irq.o mpp.o
index 4c0c7de665c3cd1f43766c5aa4897fd4af7b26d0..eb96009e21c4ce3fcf07d93b61b7fe354882444f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_ORION5X_COMMON_H
 #define __ARCH_ORION5X_COMMON_H
 
index db70e79a11985f7705d2ce8ad90a7c7a9be97e49..be1c7866329161682dfa8d325bc9e3500d2d5ca8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_ORION5X_MPP_H
 #define __ARCH_ORION5X_MPP_H
 
index 97c393d39ae2527b2b1d4e8bbf19e54269cd97c9..2f4fe3ca5c1a9548779db82e8d41a45172190849 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define TS7800_FPGA_MAGIC 0x00b480
 #define FPGAID(_magic, _rev) ((_magic << 8) + _rev)
 
index 0984264616f028249097484ab20a83a7c0a33182..72bedc6b82fba35a89b1c60c20e83b534d6ca3d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_ORION5X_TSX09_COMMON_H
 #define __ARCH_ORION5X_TSX09_COMMON_H
 
index d7d02b04344927ef096c5f701e20557a99a83c70..0fd2763031e95201bc39d43f1e6afa98221579bf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += rstc.o
 obj-y += common.o
 obj-y += rtciobrg.o
index ef25dc597f30b2ac352530f1a4bc6b84726b5aff..0a8e9611052f16032029e7466f58f1871e2ee818 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index e24aad2e3ad70dffe299b5b91f03695114fcbbbd..93ffaaee75d715ff5fe14ee1dfb4acb2d57074ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 extern void __cmx2xx_pci_init_irq(int irq_gpio);
 extern void __cmx2xx_pci_suspend(void);
 extern void __cmx2xx_pci_resume(void);
index cb4236e98a0f429f55e21b776561c229befebd8b..673a131da875b1189c6a1a117322014284c215e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _COLIBRI_H_
 #define _COLIBRI_H_
 
index 5a221a49ea4de38bb37df529e0271baa9355ca31..527c9fdf979539b0c0752e61f3b241d42ec7ae0e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
index fffb697bbf0e3aa85c3eace051a23e3015271a8b..5a72456a19ce248bbcc75622619a653dba67d071 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 04580c407276cdd3b18ad9aae32a7d737219379b..905628dfbbbb3178fbf40fe921dc098e020928b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 extern struct platform_device pxa_device_pmu;
 extern struct platform_device pxa_device_mci;
 extern struct platform_device pxa3xx_device_mci2;
index 07b93fd244747312be8b2ab4fe1d7de68d617675..93cfe7dbfec697f089d04e14ecfc28d50e5e67ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_ADDR_MAP_H
 #define __ASM_MACH_ADDR_MAP_H
 
index a3449e35a6f554eb781d6203c294e648528edce9..7beebf7297b5fb92236144826e783ca587e549df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_AUDIO_H__
 #define __ASM_ARCH_AUDIO_H__
 
index f1f0e3387d9c6d2712d40ca356862e4a25b78db5..fe2ca441bc0a2674d7e65ed5ba0f08dc1e301ca3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     FILE            bitfield.h
  *
index cd78b7fe35677bb8fe3d69b439994fa68a70db2e..d54031c4f3df733d9b297dbb0ef702a88194d88e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-pxa/include/mach/io.h
  *
index b8d14bd9ae593e42d1921b3f349846872204aaae..1db96fd4df32dd26e257451f29d4a1e34d0bd071 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_REGS_AC97_H
 #define __ASM_ARCH_REGS_AC97_H
 
index f82dcea792d9523f7b25b149a900f6567de43cd5..e2b6e3d1f625529a1e15b553b0fe907db3d81d27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_REGS_LCD_H
 #define __ASM_ARCH_REGS_LCD_H
 
index 628819995c52a7df3b427e8e99adf62b612af4c9..deb564ed8ee76834e3d406b2f3aac5d966eb8917 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_REGS_OST_H
 #define __ASM_MACH_REGS_OST_H
 
index 55aeb7fb72f65e06f2b7e7888c7360a461579800..9a168f83afeb373b5489c3a0495a76da4909a836 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_REGS_UART_H
 #define __ASM_ARCH_REGS_UART_H
 
index b6c10556fbc7931ab2382fee61fa73e9c8291081..e1c4d100fd4588798348bae783f696501c338976 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_RESET_H
 #define __ASM_ARCH_RESET_H
 
index ae3ca013afabe82185104aecd3252f31a6a3434b..3cddb1428c5ee39b5e3c2b6ccd939cb6123ab172 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /************************************************************************
  * Include file for TRIZEPS4 SoM and ConXS eval-board
  * Copyright (c) Jürgen Schindele
index 8066be54e9f53701cc2fe80bae2bf85540f5419a..a0a8d2bf9d71dd2f658d55e460c84519414c4403 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_LITTLETON_H
 #define __ASM_ARCH_LITTLETON_H
 
index 1c59d4b3b19bf3708634c936e76538c89c508804..d0ebb21545038ef340ebce47d9bce922bd06cd4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_MFP_PXA25X_H
 #define __ASM_ARCH_MFP_PXA25X_H
 
index 9fe5601ce668314140e52f3e91b3cc0a2000cac5..9f5ffb785ff51e3ac122c8e2e77559728a99384e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_MFP_PXA27X_H
 #define __ASM_ARCH_MFP_PXA27X_H
 
index cbf51ae81855bc5bc255a4aa3abb606cf93bce68..980145e7ee99dcb5b505e51535c12dd3abb765ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_MFP_PXA2XX_H
 #define __ASM_ARCH_MFP_PXA2XX_H
 
index d375195d982b4d3bba1720c8b989233cffed0c8e..cdd830926d1c7358a1d4c82ec2961d749e87b531 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_MFP_PXA3XX_H
 #define __ASM_ARCH_MFP_PXA3XX_H
 
index e57f5c724e8a1e18ded7302bb6c7a29bd288c0ab..d94295c6746087a819dda567eb13225746e9ac04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MIOA701_H_
 #define _MIOA701_H_
 
index ffa15665a418691fe3ed5ac17f11ab42138b81a5..dcd32321c995e71fdfdd08ce4d4ebb1a26656253 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MXM_8X10_H
 #define __MACH_MXM_8X10_H
 
index 2011e8da0592df386e156dcf5ec26b837f036573..b58d0fbdb4db9a2b7d2e87d4f02ee383b4a869b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA25x_H
 #define __MACH_PXA25x_H
 
index 4cf28f6707063190cfb7dc3d06f3e5d21c2aa06e..faf73804697f52f2971a64f63130289061601f60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_PXA27X_UDC_H
 #define _ASM_ARCH_PXA27X_UDC_H
 
index 075131d83eab861bb9d09b63396224c5ef03298c..abdc02fb4f031d3abbbc23c6dc250b1ba54c7853 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA27x_H
 #define __MACH_PXA27x_H
 
index 59fa41025c80ec4a86343d17289460a3bbdbdc75..d02a8d15c7e87851e491ce3961cf0d657e65727e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA300_H
 #define __MACH_PXA300_H
 
index b9e5115a1c309bd5aec5b70c949d8f5bb51d69d6..c701e3f663b051476c57bad2e7c10fed2d41c256 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA320_H
 #define __MACH_PXA320_H
 
index b4143fb6631f155b26daa4d14a3c27dfbb4e29e6..6d4502aa9d067d38327f8ac944d8ff6365c46a24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA3XX_H        
 #define __MACH_PXA3XX_H
 
index 4eceb02978e8b4a8e561dc70241d20739c4222bd..bbf25c0446413bd120c3fef9038ef9180c3b8d37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_PXA930_H
 #define __MACH_PXA930_H
 
index f0e4a589bbe19aa462f312a3693cbe3e8daffe61..b1f9ff14e335937ada78be595f803683c05c826d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_REGS_RTC_H
 #define __ASM_MACH_REGS_RTC_H
 
index c15c0c57de08d857c4a9bc60b67c9d6bfd8b41a8..fe4c80ad87ec5ffb87df61dce4d90b7aa45b1cd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_PXA3xx_U2D_H
 #define __ASM_ARCH_PXA3xx_U2D_H
 
index f38aa890b2c915a1114bfe9c6bd281ee3bfdee57..32e82cc92ea57de64b5d8152308c8e80ca062381 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Static Memory Controller
  */
index ecca976f03d21e94a7cea73f825f6e029cb9a64b..7300ec2aac0d43b8944aaa36ee6d36170c3b6452 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_ZYLONITE_H
 #define __ASM_ARCH_ZYLONITE_H
 
index 48ddd57db16e57e8d3595c724b1719753495397b..0de83e9b0b39398231b5b543a6e6d0762961cfd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <mach/hardware.h>
index 7178368d7062073023453af09638fb8aeb8fb716..a6d1a9f4bb791b946641ceb5dd1e72129eba3758 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <mach/hardware.h>
 #include <asm/hardware/entry-macro-iomd.S>
 
index 66502e6207fea86a8289d8697cf2db6c8cb6363c..b8a61cb112073643256dbb693a8351e07c1f4335 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/io.h>
index 235c53647aa49929d13779ca4c8320be75085eef..f960e6d10114a4d5ca0c1a3a5e065b1da61f3c4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-s3c2410/include/mach/io.h
  *  from arch/arm/mach-rpc/include/mach/io.h
index 9c739eafe95c48a111721e9539907ee8bd8b95a4..40ca8de21096b35e752a9ac848c9a523a4e6cdd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/arch/arm/mach-s3c6400/include/mach/dma.h
  *
  * Copyright 2008 Openmoko, Inc.
index 3ceb00b5de070da7bbde56583f2f7ac4e71aeb26..c244e480e6b3f867adc0ac5044ccc246b30b0dd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/arch/arm/mach-s3c64xx/include/mach/irqs.h
  *
  * Copyright 2008 Openmoko, Inc.
index 81f7f6e6832e2bb7794f280f20130081ebac8158..592a2be3d2aa4f3fe42ca6f2c02cb86c773f6677 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/arch/arm/plat-s3c64xx/include/mach/regs-gpio.h
  *
  * Copyright 2008 Openmoko, Inc.
index b927593019f57a27ef8a72f0f9008fca539931c5..589afe1132d6c66d243003fc605cb1cd091a40f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2008 Openmoko, Inc.
  * Copyright 2008 Simtec Electronics
index ebc4d58e1a321e6e118676b03afd05b6e6e6c3cc..28c1cae0053fe0a7d4a08de9cb48d6aaaee88da0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 7d52cd97d96e4091adbcff105f9a0dc8db86c83e..b2eb3d232e39888fedbc7e6114a692a093648234 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mach-sa1100/clock.c
  */
index 68199b603ff717f7b5dfb514abd62c3b21704d1c..97502922a15d6aab1214598e390104fb95da197a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/arch/arm/mach-sa1100/generic.h
  *
index 7972617cca647a8fe2c3f05922606de72a442e65..6e6ff3e18f0fa675ff37faa8d107d153821f5f06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     FILE            SA-1100.h
  *
index c23fcdb047a5de3ea2260198ec6565a39626e059..558b45323a2d69bb0aec03f244029d432dd4a700 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/assabet.h
  *
index b478ca180c1974f73ea18fff7ec1b394601f2ed0..b7bc23ffd3c696284d0d75423e747d7e3879f771 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/collie.h
  *
index cc43f95f33ccb44054c083cd645883a02b06e307..6f2dbdc28663214c51b154e49c52564fdd9cf71e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/hardware.h
  *
index 734e30e406a354e38c783851f1c5fbb50c9552fc..f4a41e6652625375bc2fffe3d84f8d7469f0637e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/irqs.h
  *
index 2054051eb79779a9f60cdc3c50a49300eda6f1c0..fa5cf474499295b1b718feaabb1980966fbb6f5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/memory.h
  *
index 5516a52a329d66e167fe6bc435f0130764747387..18411cfdfe8edb9c84d8f5452c59abab4848c63a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/neponset.h
  *
index f61957e6842a50a88fd9d5cf042e253bf296ec6d..27695650a567f65c52d792a782be44001061aadd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_RESET_H
 #define __ASM_ARCH_RESET_H
 
index fff39e02b4965667d73ef6bde31a9dfb0ff7412a..d830375f329c3f1f5e858f739c384f6ba9460913 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_SHANNON_H
 #define _INCLUDE_SHANNON_H
 
index ac2ea767215d8574d9f62e70bb7de3891882f866..d53d680de3d93bfcd03d4e23f28349ddc821562a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/simpad.h
  *
index a1a041b9740bc58533b420cfc4ae7446b5a7dab5..f5eaa90a4576e574ea54468e844663e9a58ec033 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/arm/mach-sa1100/include/mach/uncompress.h
  *
index 51b0eb52c0141b8b134b7e3ae6c2a81b5e7f25fb..e3a0279750e396534a4f51cf81837761d7a97496 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-sa1100/lart.c
  */
index 8411985af9ff89addd5ae0cc04ff365842961c5d..a61a2432766b58a8c29dda0db0bb37bd94899185 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-sa1100/neponset.c
  */
index 88149f85bc49dfa7a62c6b395bdf7a3e3f770e7b..b2b0c9fc18f71bd332575c9278ca1a215364ec47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-sa1100/pleb.c
  */
index c8866bce738644217d74affbd8eb191aa50d5bcf..856664c783d9391dd4eba7e494575f1a18cbcce6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-sa1100/shannon.c
  */
index bb3ca9c763de0e6eaf0ddf87797c87929bb222b5..e8d25a7bbcb870460cbe97f39256dd6196646dc6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/arm/mach-sa1100/simpad.c
  */
index 64611a1b4276517bffb4947cdb2f0bfd984de48a..e16b81ec4b07d90473a59b71fe947b04d01eef80 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 1a8f7b3ab449db569d54cd2bd01296c8fb700068..f8fcd799d677b425d17ee79a54b954ab67d6b233 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_MACH_COMMON_H
 #define __ARCH_MACH_COMMON_H
 
index 916d25f6780e84a437ab37e9316a151b6a8d2743..39f6cd8e60031be1ceb086c8718e51dc679bd50f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_EMEV2_H__
 #define __ASM_EMEV2_H__
 
index 2a5f7730a03cd428f079707e640fe2e2450ab89d..30668aa6acc34647bb5f62407c657ac3debe3e9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_R8A7779_H__
 #define __ASM_R8A7779_H__
 
index 136f3455e9c7b6182009cbffbd26120f4ce03c01..669c8cd09e076e9b813ab44fcc8fb28682a5b599 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
index cf7a8405bd7fb91c8da1a096bf8c1f59de3fa93e..8c794aace938a7668d3e7e9177c08cc8f45bc209 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_R8A7791_H__
 #define __ASM_R8A7791_H__
 
index 6792e249cf56d5d51436cad32d9d6eca1340f70a..4777fff2de413b7e11a5e46abea5d718cf724b72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_RCAR_GEN2_H__
 #define __ASM_RCAR_GEN2_H__
 
index 50ef24f780b30ec3da1e0c89c02118379ec3ac60..85c7c7c60b1e4526d96bf7aac0cd5e8fe93e8ddb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH73A0_H__
 #define __ASM_SH73A0_H__
 
index ed15db19e561f56964480a13be39b36a0df3eb59..9ec31fad71362e5eaa5496f77e777c49c07568ed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index a946c19ab31a5db0a2f2766d9f68fc996175ff6e..176b14f83089c951c019c27a86c381e489075b32 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # SPEAr Platform specific Makefile
 #
index ebe15b93bbe870804eb17759b05096a8f7298167..25b2fd4348617ec1a65dc54803e3c9996cabd02b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_TANGO
        bool "Sigma Designs Tango4 (SMP87xx)"
        depends on ARCH_MULTI_V7
index 204fcd9fe180fc9cc3b9353e739ab0d7cc11deaa..da6c633d3cc04b337d0679afbd2a3118c7049b16 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 plus_sec := $(call as-instr,.arch_extension sec,+sec)
 AFLAGS_smc.o := -Wa,-march=armv7-a$(plus_sec)
 
index 2f0c6c050fed742de088c13b74e70f1537ca70ae..65012afbc1a39a18629d9ba8ee72c0d5d27274e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/smp.h>
index 406c0814eb6e6195bf61990d73febbec8109bdd7..028e50c6383fa4b1a15b36e23f961161ffb76dbe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/suspend.h>
 #include <asm/suspend.h>
index f14b6c7d255b4e3f34598980c13aceea2fa08cd0..677dd7b5efd9007412a5e7047573f02594337ef4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
 #include "smc.h"
index 5d932ce3c1bd747e4bec0332bc906d6599493388..361a8dc898042f2bbfeed0be7634c921518cfb5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 ENTRY(tango_smc)
index 57919539da1baddf94bff2af6a3161d79c18493b..455ce3e06daf6320bee87179b2baf6443948f60a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 extern int tango_smc(unsigned int val, unsigned int service);
 
 #define tango_set_l2_control(val)      tango_smc(val, 0x102)
index c8368d64774178ff6d2723c5d6a63a3256a483cb..1e0aeb47bac60f8f522c43a55a3b1929235cbaea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_TEGRA
        bool "NVIDIA Tegra"
        depends on ARCH_MULTI_V7
index 3b33f0bb78ae4bd9da4f1b1c810cdd3f740a75ba..6c1dff2eccc290e34c37c365512e5f0dbed9043b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 asflags-y                              += -march=armv7-a
 
 obj-y                                   += io.o
index 22dcbf5b76b2d49db66a38700a1be9b30dd32e57..4f43c1cd5db08acd77d5b8fe81a9459890a21f5e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_U300
        bool "ST-Ericsson U300 Series"
        depends on ARCH_MULTI_V5 && MMU
index 3930fbba30b4b3ccedd2039c552c5956cdd8d84a..779235a9147d0d7c266f17862fe136e4db55deee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_UNIPHIER
        bool "Socionext UniPhier SoCs"
        depends on ARCH_MULTI_V7
index 4740ac393297c228a8eb7b9afe77243bc62f573a..f98332ea2ef2e8c999f0b634270ec5b9b4fec95b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_U8500
        bool "ST-Ericsson U8500 Series"
        depends on ARCH_MULTI_V7 && MMU
index 71a34e8c345a5b19b98f42cc368f796118d3214f..57058ac46f49733887e439012afa3247f03e1737 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/mach/arch.h>
 
 #include "db8500-regs.h"
+#include "pm_domains.h"
 
 static int __init ux500_l2x0_unlock(void)
 {
@@ -157,6 +158,9 @@ static const struct of_device_id u8500_local_bus_nodes[] = {
 
 static void __init u8500_init_machine(void)
 {
+       /* Initialize ux500 power domains */
+       ux500_pm_domains_init();
+
        /* automatically probe child nodes of dbx5x0 devices */
        if (of_machine_is_compatible("st-ericsson,u8540"))
                of_platform_populate(NULL, u8500_local_bus_nodes,
index a970e7fcba9e02fe6e2651cd5cfca76321d26314..f6c33a0c1c610cf17881fc276725817acdb4b29d 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/of_address.h>
 
 #include "db8500-regs.h"
-#include "pm_domains.h"
 
 /* ARM WFI Standby signal register */
 #define PRCM_ARM_WFI_STANDBY    (prcmu_base + 0x130)
@@ -203,7 +202,4 @@ void __init ux500_pm_init(u32 phy_base, u32 size)
 
        /* Set up ux500 suspend callbacks. */
        suspend_set_ops(UX500_SUSPEND_OPS);
-
-       /* Initialize ux500 power domains */
-       ux500_pm_domains_init();
 }
index c257d40ca51df3f96d65167212019c55302d1fdd..f5c275434d6cb51958a36432221287c09d677184 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_VERSATILE
        bool "ARM Ltd. Versatile family"
        depends on ARCH_MULTI_V5
index 7c728ebc0b33b36d276ee93d3210150cdde3347d..726a68085c3b82c2804ab65f6f7a06433901b63e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_VEXPRESS
        bool "ARM Ltd. Versatile Express family"
        depends on ARCH_MULTI_V7
index 73caae71f3075f60f02b9acbd8eecf5aeb2c9922..51c35e2b737aa6eb6123b384ab36880d0f5fa633 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index a0400f4cca894f8c83cf99d76514214816b01f14..95886b3bb9ddbe3cdf24529d86bdd23e2de89f8d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/mach/arch.h>
 
 #include "core.h"
index c4f1dba7bd8aa8239be17e6808150cb8584a23f5..1156a585dafc93330e3a3f95c36fc84dd21f10f7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_VT8500
        bool
        select GPIOLIB
index 69bab32a8bc25b33a4bae37233e53dd5f3e74642..b16ffc03bbe598a9dfdb48b5bc98819d03791a98 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ARCH_W90X900
 
 config CPU_W90P910
index 828c0326441e74cf9fbedd4d852b61229ff98934..33b5bf53990fb6a25d1b691fd615a617ab97e63f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 209c97944de22028bdafbcb4f78107bb734335ec..ea29c84a7849a96638c5e21b05728021b5181e0e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ARCH_ZX
        bool "ZTE ZX family"
        depends on ARCH_MULTI_V7
index fd0aeeb098817fbd5c715b71a0c898ceae9e4840..1ca633e3d024d8e6c2ee8eb7572b7088f502a282 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_ZYNQ
        bool "Xilinx Zynq ARM Cortex A9 Platform"
        depends on ARCH_MULTI_V7
index 60cdfdc151aa3fb934e8b465fac261b92c46a3c9..fd9077a74fce9b50b3860891f4b5a229eeebca92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 comment "Processor Type"
 
 # Select CPU types depending on the architecture selected.  This selects
index 950d19babb5ffc635cddbffc9cad752beabb0862..f353ee569f6ba4eff2ca567371ed79914a71861a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux arm-specific parts of the memory manager.
 #
index b3b31e30cadd207f98991841b42f60f91d2a8097..a10bcb89594dd38ce31ca30bf97d68cf421afc42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 /*
index 9da704e7b86e64669a3ee42fffce8d045ac010b3..14743a2f6997fcae0eeb55f53dec07b7b2ec227c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include "abort-macro.S"
index a6a381a6caa5a32f6b4ad018ab10e702b01920cc..98c523118820798668bf04d065ad86ea05fb6d2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include "abort-macro.S"
index 00ab011bef5848cbcc750d8aa51770cea7ac9934..fec72f4fbaf508597d826e58d0dc084ee6e58dd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include "abort-macro.S"
index 8801a15aa10595a9288edaeca03ed434d33e86b1..c58bf8b43fea64f240ea66d079dc840c9c9d141f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include "abort-macro.S"
index e8d0e08c227fc5f36d864378bf5cf75dfbb00e10..f7cc5d68444b56217a613bead95bf0d492fc372e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 /*
index 4cdfab31a0b612d11f1ad88c7985e007620fdca1..fbd60a120f6684c56c63cea10b00200765473f1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 /*
index 4509bee4e081ce78f95bcd99cd890468d97a5d8c..bacf53fd0b70c6307e74ef8601d8dcc7db292700 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The ARM LDRD and Thumb LDRSB instructions use bit 20/11 (ARM/Thumb)
  * differently than every other instruction, so it is set to 0 (write)
index 119cb479c2aba0a8ff1b19a5e9e30964a0e892c6..6e2366a263219b379f4fdb43cc8e5413fb36e52a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 /*
index 70ea6852f94e41eafe8f165f562cb35a3aafafba..aaef64b7f1775367ec5b2fe31e33acb252d81488 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DMA_H
 #define DMA_H
 
index f436f7439e46d585777ee620fe3262b5897c204f..fc33564597b8c3bd89fe74b3a7c42866c193eef0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mm/extable.c
  */
index afc1f84e763b248b2193715e757d432cc055eac8..c063708fa5032a5b4393be25ecfdc886d534aa31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_ARM_FAULT_H
 #define __ARCH_ARM_FAULT_H
 
index 18ca74c0f341062665242a685044049ce2c3bc34..f2be95197265d3f9590da13aaffebfaf1af926f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static struct fsr_info fsr_info[] = {
        /*
         * The following are the standard ARMv3 and ARMv4 aborts.  ARMv5
index ab4409a2307e07a602f1fcba08519cbbf2201d00..d0ae2963656a6899f067257bc4a4c4be41648ebc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static struct fsr_info fsr_info[] = {
        { do_bad,               SIGBUS,  0,             "unknown 0"                     },
        { do_bad,               SIGBUS,  0,             "unknown 1"                     },
index 3e511bec69b836cb8a59d5dada7b683b346ec69f..10bfba85eb96b33af1d8ad30be60a5976fd28cad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
index 4614208369f1edc27a4809859dd5bd0e13276908..091ddc56827ea3f81238443b4c03234dec66d702 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mm/iomap.c
  *
index fda415e4ca8fe43e836d96f506241fa6b045aa89..fc01f1b18523653a4378421b6f89dd877bbb53fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * L2C-310 early resume code.  This can be used by platforms to restore
  * the settings of their L2 cache controller before restoring the
index ce727d47275c2a7f4430f54b617bba6fb8196df8..6b045c6653ea6acf82541ee615e86e43a207342e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_MMU
 #include <linux/list.h>
 #include <linux/vmalloc.h>
index f0701d8d24df5a8edd151055402c0cdf05e8a8e3..eb1de66517d5ead818285aca5ec57fcff40bd704 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/arm/mm/mmap.c
  */
index 3b8e728cc9443975c6cd66c63350a2074df310b7..91537d90f5f526e4e9135b2b0e5403141172a4cb 100644 (file)
@@ -344,6 +344,11 @@ void __init arm_mm_memblock_reserve(void)
         * reserved here.
         */
 #endif
+       /*
+        * In any case, always ensure address 0 is never used as many things
+        * get very confused if 0 is returned as a legitimate address.
+        */
+       memblock_reserve(0, 1);
 }
 
 void __init adjust_lowmem_bounds(void)
index 8bbff025269a26b7d436f70bc8806434c605f202..b2ffce4201062e3ec2045364ddc454cf706bab8d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
index 9627646ce7832adc9cc8026e9a8dccd101f297fc..8686265dc9418b29381942bfd87a937a3234d46e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
index 875761f44f3bbb7d5bb064ab0e6a06144de22a96..9c70b1a21dc9204f24524df9905fbc077a82f2dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
index 02e60f495608c8b8086771c496b5c904c469cf65..cf75819e4c137618cfe1c5c18ef91e7ede6b98bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/export.h>
 #include <linux/types.h>
index f944836da8a222cd97c4e29070afa3aa370e0cbb..f10e31d0730afa572cb6604d65813eb6df1dcfa9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * We need constants.h for:
  *  VMA_VM_MM
index 436e54aa02ec952601955f2587b4192aedc1c978..74389f5b0566532f8c829943ee70ff16748d9445 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
 -------------------------------------------------------------------------------
 The macro `BITS64' can be defined to indicate that 64-bit integer types are
index deb3a82ddbdf9aa23ab052a1e17cd79cd2b7c048..303400fa2cdf79d27c75e61595252ce403e44350 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (C) 1998, 1999, 2001 Philip Blundell
 #
index b2215c61cdf02a18df71849611007d97cfea4470..39688dc9f1811a498e9a3e852343b9792fee8eb8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index f2af203d601f2bb057921e3277f489797dc77fc4..4d839a3cf2845ec38291bcd570f0c00dd1770f19 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 3e27bffb352d444d30b4dda5f83cf32c05611323..7276afee30b3b7cba6ace72ecb1c15e7f7f3b64d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARCH_OMAP
        bool
 
index ba4525059a996d44f9ce8ddb83ae0bba6802fc79..fb061cf0d736d3203cf670d366cab227776e8264 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 int omap_sram_init(void);
 
 void omap_map_sram(unsigned long start, unsigned long size,
index 5c3e4fc9fa0cb1a7eac2dc497ce1f0e5328d3cbe..83fdaef23c2e0d7746d45898110156c63359f296 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARM_PLAT_SCHED_CLOCK_H
 #define ARM_PLAT_SCHED_CLOCK_H
 
index aa1f8590dcdd4d9d1f8428c9ffa2a154d411c740..8b0ea5ace100078ceddc6c9342efcf6b79cafdd0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_UPROBES)          += decode.o decode-arm.o uprobes/
 obj-$(CONFIG_KPROBES)          += decode.o kprobes/
 ifdef CONFIG_THUMB2_KERNEL
index 76a36bf102b7fc442337cf4da60f7e21f59f98da..14db56f49f0a3fb48e732b86eee0da3fab1306cf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_KPROBES)          += core.o actions-common.o checkers-common.o
 obj-$(CONFIG_ARM_KPROBES_TEST) += test-kprobes.o
 test-kprobes-objs              := test-core.o
index 92eb5c3b486c9b64c4927f5781d8a6cff1c7ecf7..ddb89a7db36fcd1662a7de96bf7dd115131e4237 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/arm/tools/Makefile
 #
index 04fef71d7be964f9cdaea5f30c80929e89befe78..cbe1c33bb87100b26fecf6df6b1114e0dbce794b 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk
+# SPDX-License-Identifier: GPL-2.0
 #
 # Awk script to generate include/generated/mach-types.h
 #
index 72d4b2e3bdec43ee8eec8048a32f404a2556390c..6b2f25cdd72197b875f7eae4992d258ff2df09b9 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 in="$1"
 out="$2"
index d2971296469a676763bfdda8c90bebd111db11a8..df3ccd0ca831fc4f7004d45360e78b836704e417 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 in="$1"
 out="$2"
 my_abis=`echo "($3)" | tr ',' '|'`
index 5ca834545ed3275685f471dd8914f70ce8e66403..ae7e93cfbfd3bf5a70685e0b074c72f8cc5e12c4 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 in="$1"
 out="$2"
 my_abis=`echo "($3)" | tr ',' '|'`
index 59a8fa7b8a3bd5541e58a7a1c6e811852aad30df..bb4118213feee5ae9b33f85abb853ae20d51721b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 hostprogs-y := vdsomunge
 
 obj-vdso := vgettimeofday.o datapage.o
index a2e60367931be2a5271048304df4603cedc3a1e7..9cd73b725d9fb89c2b9bb1d1178cce705baff38b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
 
index e71eefa2e427bf2703ba7f6c7fb7a6577d8ab390..0641ba54ab62ae9786cb12ab88b2666b5c783b7a 100644 (file)
@@ -1,7 +1,7 @@
 #include <linux/bootmem.h>
 #include <linux/gfp.h>
 #include <linux/export.h>
-#include <linux/rwlock.h>
+#include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/dma-mapping.h>
index 9b41f1e3b1a039cd45fe842e10abff0181186fdf..939b310913cf38cd7ca3136128fb5440340d7d12 100644 (file)
@@ -50,17 +50,22 @@ KBUILD_CFLAGS       += -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS  += $(call cc-option, -mpc-relative-literal-loads)
 KBUILD_AFLAGS  += $(lseinstr) $(brokengasinst)
 
+KBUILD_CFLAGS  += $(call cc-option,-mabi=lp64)
+KBUILD_AFLAGS  += $(call cc-option,-mabi=lp64)
+
 ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
 KBUILD_CPPFLAGS        += -mbig-endian
 CHECKFLAGS     += -D__AARCH64EB__
 AS             += -EB
 LD             += -EB
+LDFLAGS                += -maarch64linuxb
 UTS_MACHINE    := aarch64_be
 else
 KBUILD_CPPFLAGS        += -mlittle-endian
 CHECKFLAGS     += -D__AARCH64EL__
 AS             += -EL
 LD             += -EL
+LDFLAGS                += -maarch64linux
 UTS_MACHINE    := aarch64
 endif
 
index 8e1951273fd7e760c4323f24c4ac27bdd118344b..c6684ab8e201fc5dca8ce29726e8b3d8508e6fbd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dts-dirs += actions
 dts-dirs += al
 dts-dirs += allwinner
index 19c3fbd75eda663b9a3ed61993ed353bf465cc0f..ff35e184e422d9b7ca900c37c12ca8cc37440576 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
index caf8b6fbe5e350de2095d16489f19ce734ca4bc3..d06e34b5d192323ffef69303330e1f37a9a27310 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
-
-       reg_vcc3v3: vcc3v3 {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc3v3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-       };
 };
 
 &ehci0 {
@@ -91,7 +84,7 @@
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
-       vmmc-supply = <&reg_vcc3v3>;
+       vmmc-supply = <&reg_dcdc1>;
        cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
        cd-inverted;
        disable-wp;
index ba84770f789f5cff754fbdf2ac3b7df54ebbadc7..f9963d63006dee947b607a3deb9c3ddc35fd978d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SEATTLE) += amd-overdrive.dtb \
                        amd-overdrive-rev-b0.dtb amd-overdrive-rev-b1.dtb \
                        husky.dtb
index 8e3074a4947d0a6dd92f2071ce6617c7d8128429..8e341be9a3991aa0bed664f50c8e4b581f6e46d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle Overdrive Development Board
  * Note: For Seattle Rev.B0
index ed5e043f37aaff472bb8e34adda3c9957b3f762b..92cef05c6b74f50a5b1a11d491ad932e8b2084c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle Overdrive Development Board
  * Note: For Seattle Rev.B1
index 128fa942f09e9f5adccf6ac214f0e10510ca2015..41b3a6c0993dbc2691abb8403a4e435b7a9ca0bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle Overdrive Development Board
  *
index f623c46525a6b6a427e164aafed86bebebe04a8a..2dd2c28171ee32398b0161891650f34e72d19564 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle Clocks
  *
index bd3adeac374f4d230d74470aaf58c1be839e809a..125f4deb52fe9e0c08f866050788a941ca710b11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle SoC
  *
index 8e8631952497f81cbf53cfd7d15e4623013b9a8f..d97498361ce3b7f6565030d766c4f8a45a624d18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD Seattle XGBE (RevB)
  *
index 1381d4b2bf1bbdf19d90d446f977c597ec38ad97..7acde34772cbf7f2844a1dcb523cc32405d5639b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DTS file for AMD/Linaro 96Boards Enterprise Edition Server (Husky) Board
  * Note: Based-on AMD Seattle Rev.B0
index 7a9f48c27b1f5651bdd8065433c4e5071a6f6a6f..543416b8dff56cce74659456f7f4eea0db965463 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
index c89010e564888ee76f0f2764a10592fb59ab7672..4157987f4a3d2515053c1b5a49031c32f7f3b652 100644 (file)
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index 9697a7a794644bdfd5e7dbedfa6f71dcd8451e24..4b17a76959b2f6bff6275013d95b74c091032c51 100644 (file)
 
                states = <3300000 0>,
                         <1800000 1>;
+
+               regulator-settling-time-up-us = <100>;
+               regulator-settling-time-down-us = <5000>;
        };
 
        wifi_32k: wifi-32k {
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>, <&sdio_irq_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
+       sd-uhs-sdr104;
+       max-frequency = <200000000>;
        disable-wp;
 
        cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
 &sd_emmc_c {
        status = "disabled";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        max-frequency = <200000000>;
        non-removable;
        disable-wp;
index 9c59c3c6d1b6a5d2e3d8cd9d234caef971b352c3..38dfdde5c1473c71f5eb04ed779d1537d386fe31 100644 (file)
@@ -51,7 +51,7 @@
 / {
        compatible = "nexbox,a95x", "amlogic,meson-gxbb";
        model = "NEXBOX A95X";
-       
+
        aliases {
                serial0 = &uart_AO;
        };
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index d147c853ab054d86affa734311ae2c9df713ea58..1ffa1c238a725348cdcc10be5afe35be7dac1d60 100644 (file)
@@ -50,7 +50,7 @@
 / {
        compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
        model = "Hardkernel ODROID-C2";
-       
+
        aliases {
                serial0 = &uart_AO;
        };
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        max-frequency = <200000000>;
        non-removable;
        disable-wp;
index 81ffc689a5bf42532f25706545b1f84cb5dcdbac..23c08c3afd0ab499255ff4502bc9a472aa9d4548 100644 (file)
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
        max-frequency = <100000000>;
        disable-wp;
 
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index 346753fb632431f1c2e2af4d9c72b740a3f8c3b8..f2bc6dea1fc62235987f28d6ff1871913ee5753d 100644 (file)
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins &sdio_irq_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index 52f1687e7a099af5789ed97e3597b727a8ee4d82..af834cdbba791ab4432065eea6b855396e1937f9 100644 (file)
                        };
                };
 
+               emmc_clk_gate_pins: emmc_clk_gate {
+                       mux {
+                               groups = "BOOT_8";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "BOOT_8";
+                               bias-pull-down;
+                       };
+               };
+
                nor_pins: nor {
                        mux {
                                groups = "nor_d",
                        };
                };
 
+               sdcard_clk_gate_pins: sdcard_clk_gate {
+                       mux {
+                               groups = "CARD_2";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "CARD_2";
+                               bias-pull-down;
+                       };
+               };
+
                sdio_pins: sdio {
                        mux {
                                groups = "sdio_d0",
                        };
                };
 
+               sdio_clk_gate_pins: sdio_clk_gate {
+                       mux {
+                               groups = "GPIOX_4";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "GPIOX_4";
+                               bias-pull-down;
+                       };
+               };
+
                sdio_irq_pins: sdio_irq {
                        mux {
                                groups = "sdio_irq";
 
 &sd_emmc_a {
        clocks = <&clkc CLKID_SD_EMMC_A>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_A_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
 
 &sd_emmc_b {
        clocks = <&clkc CLKID_SD_EMMC_B>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_B_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
 
 &sd_emmc_c {
        clocks = <&clkc CLKID_SD_EMMC_C>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_C_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
index 2a5804ce7f4bd6bbfe1285f3cc40786778576a09..977b4240f3c1b0de15e0b32c70aafce1123acd01 100644 (file)
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <100000000>;
        non-removable;
index 69ca14ac10fa097633562cb96db4f088e543ebd9..64c54c92e214d686154de4b237f71a5212c5eb20 100644 (file)
@@ -91,6 +91,9 @@
 
                states = <3300000 0>,
                         <1800000 1>;
+
+               regulator-settling-time-up-us = <200>;
+               regulator-settling-time-down-us = <50000>;
        };
 
        vddio_boot: regulator-vddio_boot {
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
        max-frequency = <100000000>;
        disable-wp;
 
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
        cap-mmc-highspeed;
+       mmc-ddr-3_3v;
        max-frequency = <50000000>;
        non-removable;
        disable-wp;
index 4c2ac7650fcd3317a673efdd7308891a154272d8..1b8f32867aa10ab9ae75e90c995cdf16a088632e 100644 (file)
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index f3eea8e89d12b7a4479851a8d1e0482374235568..129af9068814d3b0f8e33090adbcda435ea3e202 100644 (file)
@@ -95,7 +95,8 @@
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index d6876e64979e7a5c5d539dc3eba7006fe4d79315..d8dd3298b15cfe5a37d653b8c6d5d39f5ca8c008 100644 (file)
                        };
                };
 
+               emmc_clk_gate_pins: emmc_clk_gate {
+                       mux {
+                               groups = "BOOT_8";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "BOOT_8";
+                               bias-pull-down;
+                       };
+               };
+
                nor_pins: nor {
                        mux {
                                groups = "nor_d",
                        };
                };
 
+               sdcard_clk_gate_pins: sdcard_clk_gate {
+                       mux {
+                               groups = "CARD_2";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "CARD_2";
+                               bias-pull-down;
+                       };
+               };
+
                sdio_pins: sdio {
                        mux {
                                groups = "sdio_d0",
                        };
                };
 
+               sdio_clk_gate_pins: sdio_clk_gate {
+                       mux {
+                               groups = "GPIOX_4";
+                               function = "gpio_periphs";
+                       };
+                       cfg-pull-down {
+                               pins = "GPIOX_4";
+                               bias-pull-down;
+                       };
+               };
+
                sdio_irq_pins: sdio_irq {
                        mux {
                                groups = "sdio_irq";
 
 &sd_emmc_a {
        clocks = <&clkc CLKID_SD_EMMC_A>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_A_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
 
 &sd_emmc_b {
        clocks = <&clkc CLKID_SD_EMMC_B>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_B_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
 
 &sd_emmc_c {
        clocks = <&clkc CLKID_SD_EMMC_C>,
-                <&xtal>,
+                <&clkc CLKID_SD_EMMC_C_CLK0>,
                 <&clkc CLKID_FCLK_DIV2>;
        clock-names = "core", "clkin0", "clkin1";
 };
index 9b10c5f4f8c0311af38380f7d5c4c2a0e709e747..22c697732f668c5fadb5c445a849a80e57956fe0 100644 (file)
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index 08f1dd69b6792e3ceb54bd1e56697ce14f35df12..470f72bb863c5ff8850508cefd828b1c2e4f5f24 100644 (file)
        pinctrl-names = "default";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
index c75f17a4947152da9fee611da3ace5d55a275fb6..a10fbdb34229c0fff83400bfaa3e7cc5043c4469 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-merlin.dtb
 
index 75cc2aa101013adbb4108738a4dc30778e834ab6..470378addca40a6a935a1239e737e59103e771b9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_VEXPRESS) += foundation-v8.dtb foundation-v8-gicv3.dtb
 dtb-$(CONFIG_ARCH_VEXPRESS) += juno.dtb juno-r1.dtb juno-r2.dtb
 dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb
index 35588dfa095c21ba19662ef015bcb583d94afb4a..4825cdbdcf469228ec916609e015b9c97d4fff9f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd.
  *
index 71168077312d5cbbb282a9a1fdfaf8eda8ae0bb3..8a9136f4ab7402a0f6e73ff08b7c413be944cd02 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd.
  *
index 8ecdd4331980e448f6a5c23ad2785cbfd19a9a10..f0b67e439f588c9afe74329bf5e9fc6a94bc19bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd.
  *
index fbafe62d6b22deaf3bc22b361c80d38a876f8d34..f165f04db0c9c48152a4a920a4a7df45b59b4a0a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "juno-clocks.dtsi"
 
 / {
index aa03050dd7df803b92a8517d24389b6845e9d6a5..0c43fb3525eb1db2d9886e56eea474f2951562bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        funnel@20130000 { /* cssys1 */
                compatible = "arm,coresight-funnel", "arm,primecell";
index a83ed2c6bbf79afd64c24577ca2530e7da6f0b87..7810632d343805fbd896f45eef467ed0d93c00cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Fast Models
  *
index 528875c7559871720d0577867737f3c0987ff1f7..e18fe006cc2a388bc4ce575b219b7488d53dc23e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Fast Models
  *
index e3a171162bb4775a8aceebc54662252c18288076..2cb6049578083527524be8662635f86e679c0377 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ARM Ltd. Versatile Express
  *
index 3eaef3895d663b150fcbe4b2974c8548620cbf12..3df2db7f88786eda0740067dbfe2aa5b22823b6d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
 
 dts-dirs       += northstar2
index 699d340a3437eaaca7b56d4124706c1533d1eacf..89b78d6c19bf19321e2941deff4783058b26ace5 100644 (file)
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "arm/bcm2837-rpi-3-b.dts"
index f70028edad63162e1a442f3c507e62c725dc83d5..04bb302f323305ac92be635f51886182b0e013fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_BCM_IPROC) += bcm958742k.dtb
 dtb-$(CONFIG_ARCH_BCM_IPROC) += bcm958742t.dtb
 
index 581b2c1c400abe1398e2c1543f09bddcbd1cacef..9f68c277302b2523d2bc37f7d96fea3b2255473b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_THUNDER) += thunder-88xx.dtb
 dtb-$(CONFIG_ARCH_THUNDER2) += thunder2-99xx.dtb
 
index 7ddea53769a71244141f84aa5aca90797bab82fd..6914b2cbd3979f791fa1a629a06650aac87ce77e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_EXYNOS) += \
        exynos5433-tm2.dtb      \
        exynos5433-tm2e.dtb     \
index 72c4b525726f9ddabbb872b575afbd147f1eeb93..dc02e82aba7c6c9202008ddef1549a4a9d041fcb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-frdm.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-qds.dtb
 dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-rdb.dtb
index 8960ecafd37db2aff5767bf296b41feb55388c34..521ed484a5d118419b56d13b53c615693b884f67 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_HISI) += hi3660-hikey960.dtb
 dtb-$(CONFIG_ARCH_HISI) += hi3798cv200-poplar.dtb
 dtb-$(CONFIG_ARCH_HISI) += hi6220-hikey.dtb
index fd4705c451e2697716daea41ff606aabb3bd39fc..e9f87cb61ade77b2724533835dd97b0ef6fa178f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for Hisilicon HiKey960 Development Board
  *
index b7a90d632959d95b0dee0cc93e37037700194b2d..13ae69f5a3270327cb09ee5ab7b798a3bfbd850f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for Hisilicon Hi3660 SoC
  *
index 2b526304ed2797e8052341adf50f6e63c96ccca0..3aee6123d161d7d30dd9e462c1694798d6c0d3cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for Hisilicon HiKey Development Board
  *
index 02a3aa4b2165d07e8af616998611923f60256ff9..ff1dc89f599e6b8cadecb8a7ce18b4cba8ad590a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for Hisilicon Hi6220 SoC
  *
index 0916e8459d6b1de800990d847dad5039a0d885e7..e7d22619a4c0b43e34d6e3d2493f9d3a640fd772 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * pinctrl dts fils for Hislicon HiKey development board
  *
index 7e542d28dadbd53a24529178b6314a0b75beeb66..d11efc81958cf873c73a4c450b621655f0aebd6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * pinctrl dts fils for Hislicon HiKey960 development board
  *
index 5c7b54c12adcdd0ce923fbd774cf4aa3d3cb9b0d..e345b8e58efe5795eff03fa756a143a80096f001 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_LG1K) += lg1312-ref.dtb
 dtb-$(CONFIG_ARCH_LG1K) += lg1313-ref.dtb
 
index 6d78d6bc7f9ca28cb08aa4e751f86858d550efc1..260a2c5b19e50812122f0efef90023b10cf472d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for lg1312 Reference Board.
  *
index fbafa24cd5335b90de29af9a3f3a731bc616ac10..860c8fb10795011f6e6f9894f0ad5e8d4e9444d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for lg1312 SoC
  *
index df0ece43cfbf765e8ff5d8173f00edf80ab6e6cc..e89ae853788a2ee23efc362bd2d618be19b4781e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for lg1313 Reference Board.
  *
index e703e1149c7570829201538d713c84688d72c180..1887af654a7db96685581b9f6953f8906073da11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dts file for lg1313 SoC
  *
index 6cff81eeaae2833829391a2b829115ede9a7860f..5633676fa9d00e8d8bbc2e76a7a5a778f59732ce 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Berlin SoC Family
 dtb-$(CONFIG_ARCH_BERLIN) += berlin4ct-dmp.dtb
 dtb-$(CONFIG_ARCH_BERLIN) += berlin4ct-stb.dtb
index 4d360713ed12459199ca726f34c32266739865dc..30d48ecf46e087b24063c0ac546d45ae9afb0d88 100644 (file)
 
                        ap_syscon: system-controller@6f4000 {
                                compatible = "syscon", "simple-mfd";
-                               reg = <0x6f4000 0x1000>;
+                               reg = <0x6f4000 0x2000>;
 
                                ap_clk: clock {
                                        compatible = "marvell,ap806-clock";
                                        compatible = "marvell,ap806-pinctrl";
                                };
 
-                               ap_gpio: gpio {
+                               ap_gpio: gpio@1040 {
                                        compatible = "marvell,armada-8k-gpio";
                                        offset = <0x1040>;
                                        ngpios = <20>;
index 8263a8a504a8fd11896da6aebc99eabdd4be928a..f2aa2a81de4dd2e982ec1e5fd5ae67f01bb08a63 100644 (file)
                                /* non-prefetchable memory */
                                0x82000000 0 0xf6000000 0  0xf6000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
                        num-lanes = <1>;
                        clocks = <&cpm_clk 1 13>;
                                /* non-prefetchable memory */
                                0x82000000 0 0xf7000000 0  0xf7000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
 
                        num-lanes = <1>;
                                /* non-prefetchable memory */
                                0x82000000 0 0xf8000000 0  0xf8000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cpm_icu ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
 
                        num-lanes = <1>;
index b71ee6c83668e8900a4a889614ed83e97e718f85..4fe70323abb3a58c374a762607bb63f08b2cb0e0 100644 (file)
                                /* non-prefetchable memory */
                                0x82000000 0 0xfa000000 0  0xfa000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 22 IRQ_TYPE_LEVEL_HIGH>;
                        num-lanes = <1>;
                        clocks = <&cps_clk 1 13>;
                                /* non-prefetchable memory */
                                0x82000000 0 0xfb000000 0  0xfb000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 24 IRQ_TYPE_LEVEL_HIGH>;
 
                        num-lanes = <1>;
                                /* non-prefetchable memory */
                                0x82000000 0 0xfc000000 0  0xfc000000 0 0xf00000>;
                        interrupt-map-mask = <0 0 0 0>;
-                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-map = <0 0 0 0 &cps_icu ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
                        interrupts = <ICU_GRP_NSR 23 IRQ_TYPE_LEVEL_HIGH>;
 
                        num-lanes = <1>;
index 151723b5c733d7f3ee91953098ab363ede6f8ff3..1d05d1824fa9c9a06de9cb01d7f3918edc1f1cc3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt2712-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt6755-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt6795-evb.dtb
index 18941458cb4dafe072e53734a74a4b31796d9198..6bc0c6ab4b7f5a18652c3c8f74b6dd44daecad54 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_TEGRA_132_SOC) += tegra132-norrin.dtb
 dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-0000.dtb
 dtb-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-p2371-2180.dtb
index 759af96a6b49bae9e6e0d2ba55e4863b3d530d19..a0385a386a3fc6c63e61c19442492adb783d6838 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index c2f0f27435784a2dea76f2c4f17bc4359f7f9add..fa5a7c4bc807c4463168e7d654862b00e838cfaf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra124-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra124-mc.h>
index 8daadadec63a5f4470cbde4864c3986693a5d564..c71d762bf697b4be7c31fd56f3c4f53a848d81f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/linux-event-codes.h>
index cf84d7046ad5847650b56226f5f7977f0d0c28b0..54f418d05e154814734707ff48a50392c216c083 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tegra186.dtsi"
 
 #include <dt-bindings/mfd/max77620.h>
index 0b0552c9f7dd4a7f3c2d38d4920f43ca9356803e..a9c3eef6c4e0911b6292b3a91fe4ccd1f9ddb61a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra186-clock.h>
 #include <dt-bindings/gpio/tegra186-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
index 906fb836d24188aa6b1b0471461d0d15086a2c4c..d10d4430537a0a549b49051fd68b27b880c7c469 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/mfd/max77620.h>
 
 #include "tegra210.dtsi"
index 1ddd8512e1000522b6dec9e28ba532d63ff52939..21c6d3749bc61d8139b0e65f74586cee6bda6825 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra210-p2530.dtsi"
index 7cb95e0421171d0a4cfcb77bcd2c1b382f938fd9..37e3c46e753f0d846349b5d796be3eb611c1f533 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "tegra210-p2180.dtsi"
index 0ec92578cacba54c8f47611af35ba79167f3ed5b..be6066ff97c97b8dcdfda3a0e210c6c675d5bdc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tegra210.dtsi"
 
 / {
index 576957a55801c9f8d7aed090f74ac0bd2e7cda04..e2a347e57215e3e70a4f3f69a06928b6a4412466 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index e008e3364d2a29f6bfe73db819cc7e4ade9a40ca..6ae292da7294962d29b27f9b8ad499e7f6e20179 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        model = "NVIDIA Tegra210 P2595 I/O board";
        compatible = "nvidia,p2595", "nvidia,tegra210";
index e5fc67bf46c229fef02c1416e4ab005fb53ab460..d67ef4319f3b4ba73e347728ed3db1cdc9cb14e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/input/input.h>
 
 / {
index 7703227f5d1addcf2c2f58cd65f7e1d903b21129..43cae4798870272d4f7427ca8e007998035bab09 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/input/input.h>
index 29f471e0f22a948023ce25ea0050dc75217ee80d..9bdf19f2cca72b8d57fa071ff8e5f218b65d9394 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/tegra210-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra210-mc.h>
index ff81d7e5805e8b9dc4ab8eb886836b28c25ddbfc..e7b25bee3f1e7da8bd68424f5ed8c32df23bf73b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_QCOM)        += apq8016-sbc.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += apq8096-db820c.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += ipq8074-hk01.dtb
index 790b7775b9016c899228a5be17ebb3fdbe5f4ab8..ec2f0de67993d03b9e1b587aad0e8bb37920ebe9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
 
index 185388de914c6503e75da530c0cd35b4458122f0..21d0822f1ca60f99fe1f93597fbddbbf78839a06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <dt-bindings/gpio/gpio.h>
 
index 8e379782597a258f84d934ef19a54ab6e6176e26..59b29ddfb6e91e8377f50ff98623de073d19b3a4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 &pm8994_gpios {
index ef2207afa86b4456f56503d17e45a139dcc17168..297b57bfa87a3b8bb6ec44a295b9016b96b06276 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
index 53deebf9f515da8c85a662d482ae361e626846de..0223e60d8b6afc524ffe02a438bf253216931dec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
index b413e44fd09e3d8cfd6df277e7ec0de09463885c..80024c0b1c7c26f7109cf0cd3750847ef961a08d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
index 57673f92805d00346559dc65e2c4d01fc17bc5dd..dae1cdc23f5433ba4bb3f7d14a937e491e491a61 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
index 381928bc1358fd9c97995109143cc72282bda1d4..d417701640bd933d9a7f15d81dd57ec03e7060b2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-xs.dtb
 dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb r8a7795-es1-h3ulcb.dtb
index 4786c67b5e6527fd99d27aa969ef0b2d4274b4ad..d9d885006a8e8c9a6630f635132b6d0c24370ccc 100644 (file)
@@ -62,6 +62,7 @@
                brightness-levels = <256 128 64 16 8 4 0>;
                default-brightness-level = <6>;
 
+               power-supply = <&reg_12v>;
                enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
        };
 
                regulator-always-on;
        };
 
+       reg_12v: regulator2 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-12V";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        rsnd_ak4613: sound {
                compatible = "simple-audio-card";
 
index f1c9b13cea5c21ce89efec347c61593e092a681e..84801892ee61f2a2d1e9ac6add9ab92b94f2d8b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb
index 6d615cb6e64d07cebcfa0a7ecebf04b8afb152b2..41d61840fb99ce52ec553c94e119ab63bb79cdbe 100644 (file)
        vop_mmu: iommu@ff373f00 {
                compatible = "rockchip,iommu";
                reg = <0x0 0xff373f00 0x0 0x100>;
-               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH 0>;
+               interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-names = "vop_mmu";
                #iommu-cells = <0>;
                status = "disabled";
index e0518b4bc6c2a018963787d0096077ab540b78e8..1070c8264c13376a578338e95421f71321825243 100644 (file)
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKL>;
-                       operating-points-v2 = <&cluster0_opp>;
+
                        #cooling-cells = <2>; /* min followed by max */
                };
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKL>;
-                       operating-points-v2 = <&cluster0_opp>;
                };
 
                cpu_l2: cpu@2 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x2>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKL>;
-                       operating-points-v2 = <&cluster0_opp>;
                };
 
                cpu_l3: cpu@3 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x3>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKL>;
-                       operating-points-v2 = <&cluster0_opp>;
                };
 
                cpu_b0: cpu@100 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKB>;
-                       operating-points-v2 = <&cluster1_opp>;
+
                        #cooling-cells = <2>; /* min followed by max */
                };
 
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x101>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKB>;
-                       operating-points-v2 = <&cluster1_opp>;
                };
 
                cpu_b2: cpu@102 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x102>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKB>;
-                       operating-points-v2 = <&cluster1_opp>;
                };
 
                cpu_b3: cpu@103 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x103>;
                        enable-method = "psci";
-                       clocks = <&cru ARMCLKB>;
-                       operating-points-v2 = <&cluster1_opp>;
-               };
-       };
-
-       cluster0_opp: opp-table0 {
-               compatible = "operating-points-v2";
-               opp-shared;
-
-               opp00 {
-                       opp-hz = /bits/ 64 <312000000>;
-                       opp-microvolt = <950000>;
-                       clock-latency-ns = <40000>;
-               };
-               opp01 {
-                       opp-hz = /bits/ 64 <408000000>;
-                       opp-microvolt = <950000>;
-               };
-               opp02 {
-                       opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <950000>;
-               };
-               opp03 {
-                       opp-hz = /bits/ 64 <816000000>;
-                       opp-microvolt = <1025000>;
-               };
-               opp04 {
-                       opp-hz = /bits/ 64 <1008000000>;
-                       opp-microvolt = <1125000>;
-               };
-       };
-
-       cluster1_opp: opp-table1 {
-               compatible = "operating-points-v2";
-               opp-shared;
-
-               opp00 {
-                       opp-hz = /bits/ 64 <312000000>;
-                       opp-microvolt = <950000>;
-                       clock-latency-ns = <40000>;
-               };
-               opp01 {
-                       opp-hz = /bits/ 64 <408000000>;
-                       opp-microvolt = <950000>;
-               };
-               opp02 {
-                       opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <950000>;
-               };
-               opp03 {
-                       opp-hz = /bits/ 64 <816000000>;
-                       opp-microvolt = <975000>;
-               };
-               opp04 {
-                       opp-hz = /bits/ 64 <1008000000>;
-                       opp-microvolt = <1050000>;
                };
        };
 
        iep_mmu: iommu@ff900800 {
                compatible = "rockchip,iommu";
                reg = <0x0 0xff900800 0x0 0x100>;
-               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH 0>;
+               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-names = "iep_mmu";
                #iommu-cells = <0>;
                status = "disabled";
index 7fd4bfcaa38e33c8b58ef60dc7adb99772b04cc1..fef82274a39dac27fc6e293affc81b4ff5d5d64b 100644 (file)
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <3300000>;
+                               regulator-max-microvolt = <3000000>;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3300000>;
+                                       regulator-suspend-microvolt = <3000000>;
                                };
                        };
 
index 53ff3d191a1d176cc0d7c6d380894b48e42ec7da..910628d18add07d9a39974bc6ce2ac4a403adb81 100644 (file)
                        vcc_sd: LDO_REG4 {
                                regulator-name = "vcc_sd";
                                regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <3300000>;
+                               regulator-max-microvolt = <3000000>;
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3300000>;
+                                       regulator-suspend-microvolt = <3000000>;
                                };
                        };
 
index 6c30bb02210d80a2d78843cccaca7a3d83f971cd..0f873c897d0de5a75f9d4e4d90d7c658b7a173d3 100644 (file)
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <3300000>;
+                               regulator-max-microvolt = <3000000>;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
-                                       regulator-suspend-microvolt = <3300000>;
+                                       regulator-suspend-microvolt = <3000000>;
                                };
                        };
 
index d79e9b3265b98cbe0955c8139950627d2af09492..ab7629c5b856d7a6ed2ac8e95600262e098a01d6 100644 (file)
                compatible = "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi";
                reg = <0x0 0xff960000 0x0 0x8000>;
                interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH 0>;
-               clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI0>,
-                        <&cru SCLK_DPHY_TX0_CFG>;
-               clock-names = "ref", "pclk", "phy_cfg";
+               clocks = <&cru SCLK_DPHY_PLL>, <&cru PCLK_MIPI_DSI0>,
+                        <&cru SCLK_DPHY_TX0_CFG>, <&cru PCLK_VIO_GRF>;
+               clock-names = "ref", "pclk", "phy_cfg", "grf";
                power-domains = <&power RK3399_PD_VIO>;
                rockchip,grf = <&grf>;
                status = "disabled";
index 4bc091b365fd1563999c5dc4fd62f16e64acce80..72dbe8acd9fd75dbaee0cf852618578cfb345983 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_UNIPHIER) += \
        uniphier-ld11-global.dtb \
        uniphier-ld11-ref.dtb \
index ee4aff53a5f5dc8063bf0779e23da47fe5f4e522..09c429cb6d6167454d3fbe988aa1945242f8018f 100644 (file)
                        interrupts = <0 243 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb0>;
-                       clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 8>,
+                                <&mio_clk 12>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 8>,
                                 <&mio_rst 12>;
                };
                        interrupts = <0 244 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb1>;
-                       clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 9>,
+                                <&mio_clk 13>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 9>,
                                 <&mio_rst 13>;
                };
                        interrupts = <0 245 4>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_usb2>;
-                       clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
+                       clocks = <&sys_clk 8>, <&mio_clk 7>, <&mio_clk 10>,
+                                <&mio_clk 14>;
                        resets = <&sys_rst 8>, <&mio_rst 7>, <&mio_rst 10>,
                                 <&mio_rst 14>;
                };
index f0535e6eaaaa0ae9e72a08ed0c2c2235b5962c1f..d7188be103c5b3c4d805bb7133566ae117b82114 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SPRD) += sc9836-openphone.dtb \
                        sp9860g-1h10.dtb
 
index 7ca54a76f6b9f1aabd8aaa52f313930702b718fc..70c517aa4501689cb2f58cc676184b56d4192552 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 menuconfig ARM64_CRYPTO
        bool "ARM64 Accelerated Cryptographic Algorithms"
index f08a6471d0341519ef3e52aa54b603cf82570411..fd9ecf07d88cbdcbf7e4cc5f04dc085f34a9bec6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key,
                  unsigned int key_len);
index 6e1cb8c5af4d6465e81fbdce2e2bd61920cb41e9..4a85c6952a221ec8e02df17b39b09ddf8f9c13d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ALTERNATIVE_H
 #define __ASM_ALTERNATIVE_H
 
index ecd9788cd29881074dd04bb9708eddef286677a6..b3da6c886835964a23288972e5d992b2aa87330d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ASM_UACCESS_H
 #define __ASM_ASM_UACCESS_H
 
index a5a0c366013773f980919591c252f0fab5d2ca74..6faf9fba8c65fac71de5fac87ca66b880435361e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_BITREV_H
 #define __ASM_BITREV_H
 static __always_inline __attribute_const__ u32 __arch_bitrev32(u32 x)
index ebf2481889c34848be0b34158647a4f60b770090..355e552a9175a0b81d4c51e89d62faf3f1584819 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __ASM_BOOT_H
 #define __ASM_BOOT_H
index 0b350a7e26f37c1dfec80cb85610add6b9bbef99..0ece64a26c8c94d04c7aac8a35b7bc8dd0000b85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CLOCKSOURCE_H
 #define _ASM_CLOCKSOURCE_H
 
index 0f74f05d662a76515e5938c6966c211bb5a554bb..3c5ddb429ea29bc925d959d2b382e59bca6a885f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPUIDLE_H
 #define __ASM_CPUIDLE_H
 
index f6580d4afb0e0c4e242e5171ecda679d927286d2..54ceae0874c7e247a63d44350a884cd47a80001c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CURRENT_H
 #define __ASM_CURRENT_H
 
index b93904b16fc2aadb7a4e8c85e1122d5c116788f5..650344d01124971d98819116b7e657c7fce7c6f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_EFI_H
 #define _ASM_EFI_H
 
index 42f50f15a44c05fdd639a9f44c34563849f7b12c..56a4f68b262efb02417943403e5dcbe7e1ef752e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_EXTABLE_H
 #define __ASM_EXTABLE_H
 
index d2c79049ff117059739a881da2583ec711956a5c..f9cc1d021791504ee87b18ee22bb8896f4193a99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM64_HYPERVISOR_H
 #define _ASM_ARM64_HYPERVISOR_H
 
index 5e6f772390644d9dbaf1f2c15033f2f9562522b8..a0fee6985e6a75b621644ea4e7d19f8b4f220643 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IRQ_H
 #define __ASM_IRQ_H
 
index 8e24ef3f7c82c7c9dc7af7ea9b07c34ed27a7631..8a1ef19077606465de320a46225877b09ac0c96d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
index 71ad0f93eb7153226a43d78e909d3e7c3690bf92..e266f80e45b78142e03e454cda2d72eca8b16c34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_KASAN_H
 #define __ASM_KASAN_H
 
index 636c1bced7d4a9dd60d3a6489997ebd82b83d96e..1b266292f0bee00ce1952005479053e820b5ca0e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
-#define __ALIGN                .align 4
-#define __ALIGN_STR    ".align 4"
+#define __ALIGN                .align 2
+#define __ALIGN_STR    ".align 2"
 
 #endif
index 606b20910a5c2a41a7ae425a10852a3bb75f87f1..eec95768eaad572938105ee4c0d904271cbf5aad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LSE_H
 #define __ASM_LSE_H
 
index 3585a5e2615105162f82510f64917b094974a2a4..f7c4d2146aed09b715a59506f7e01ab0d167f3de 100644 (file)
 #define KERNEL_END        _end
 
 /*
- * The size of the KASAN shadow region. This should be 1/8th of the
- * size of the entire kernel virtual address space.
+ * KASAN requires 1/8th of the kernel virtual address space for the shadow
+ * region. KASAN can bloat the stack significantly, so double the (minimum)
+ * stack size when KASAN is in use.
  */
 #ifdef CONFIG_KASAN
 #define KASAN_SHADOW_SIZE      (UL(1) << (VA_BITS - 3))
+#define KASAN_THREAD_SHIFT     1
 #else
 #define KASAN_SHADOW_SIZE      (0)
+#define KASAN_THREAD_SHIFT     0
 #endif
 
-#define MIN_THREAD_SHIFT       14
+#define MIN_THREAD_SHIFT       (14 + KASAN_THREAD_SHIFT)
 
 /*
  * VMAP'd stacks are allocated at page granularity, so we must ensure that such
index a0de9e6ba73fe27b281451ddf22a412e14d446e1..fa17e01d9ab27894a0c8ce443a0a8078cd5e8b24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MMZONE_H
 #define __ASM_MMZONE_H
 
index ef7b23863a7cb8b817d72a30575fbd7ac0e9bd4a..01bc46d5b43acae36bb09866ce342630c583af80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_NUMA_H
 #define __ASM_NUMA_H
 
index fd5f42886251b92abb1faca5b3d36f4a6fb41718..bb5dcea42003d64dccfe9e6bb11dd0ff9586562d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM64_PARAVIRT_H
 #define _ASM_ARM64_PARAVIRT_H
 
index 1fc19744ffe995f01f85a7cbc95c32410f763e94..8747f7c5e0e75a88b509749f91744fb6f73725e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PCI_H
 #define __ASM_PCI_H
 #ifdef __KERNEL__
index bc4e92337d1690045b7b5c97efd11ad4fb8bb453..b46e54c2399b58b6451ea9dacc5c033115b05c64 100644 (file)
@@ -401,7 +401,7 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd)
 /* Find an entry in the third-level page table. */
 #define pte_index(addr)                (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
-#define pte_offset_phys(dir,addr)      (pmd_page_paddr(*(dir)) + pte_index(addr) * sizeof(pte_t))
+#define pte_offset_phys(dir,addr)      (pmd_page_paddr(READ_ONCE(*(dir))) + pte_index(addr) * sizeof(pte_t))
 #define pte_offset_kernel(dir,addr)    ((pte_t *)__va(pte_offset_phys((dir), (addr))))
 
 #define pte_offset_map(dir,addr)       pte_offset_kernel((dir), (addr))
index ffcdf742cddf931e6ee0b5fcb52c5bd535d2249f..8e57c96ad45e5c08b409f09d3b6ac513f36269fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_STACK_POINTER_H
 #define __ASM_STACK_POINTER_H
 
index b86a0865ddf16a020ca2e5cf727d92878860d4d9..58d15be11c4d8032bf21b132ea3b8e8245b75e12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * GCC stack protector support.
  *
index de5600f40adfcb8185abb56461d4d9f3846a1d88..8939c87c4dcef4e93b62e35e30f0b7a5a47bc197 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SUSPEND_H
 #define __ASM_SUSPEND_H
 
index 8da0bf4f765918e4064d7f6e27583390b9989ba0..eee31a9f72a55111b455e28ed4eaae2cc8178217 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SYNC_BITOPS_H__
 #define __ASM_SYNC_BITOPS_H__
 
index 8b57339823e9b132b0d93d8934426bdf40f10afd..b3202284568b2e86708b6bc59800053995aa739b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TOPOLOGY_H
 #define __ASM_TOPOLOGY_H
 
index 4318866d053c513738c5fb3194652ceaf2a7770a..4e22b7a8c0388c96d6558efd8993f7a30eb7ed03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM64_XEN_EVENTS_H
 #define _ASM_ARM64_XEN_EVENTS_H
 
index ec154e719b1136ce1916e00ac8620858836b0837..e6e784051932b9f1a5e3dc3125876fe9d972d4a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_XEN_OPS_H
 #define _ASM_XEN_OPS_H
 
index fc28bd95c6d388e70751935a8b6b9b9ec4871033..198afbf0688f6d214e3156c9eab14842e6fdd707 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
index 4cf0c17787a84a0f996454e2131b426487b7da65..ec0a86d484e1a1f850ba5997b3a8bb4bdcd92a7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index fce9c2924fa3464877ae78a4e33b90728ce02d41..485d60bee26ca313ad15797f230efe10072befc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index dc19e9537f0decad3662b5036aa592466373c5e1..ca9cfdab33fc597ea139f539a55d414e3a98da4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index cd2e630c235e26f2d9528f6b7ff5a9315d273b10..f8db34f2622d3cdd4e2d638334e3b061c2948af9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 4b9344cba83ae30256af652ad56aa9d6cd9e8ac1..b3fdeee739eabb19ebc9f2ec54c52223ec6e2976 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 9f3ca24bbcc6c28da8e1fbaf0d97998c11e93261..51149ec75fe480b324fd74d2697579a936438fdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012,2013 - ARM Ltd
  * Author: Marc Zyngier <marc.zyngier@arm.com>
index 8e3a281d448a917feeb7f420c96066f7e61ab6c8..b115c555778175acafe9c325090006e93487102d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 172b8317ee49f8afc4395af2e0dc7dbb1d111f18..d54daafa89e3ff21782fff617d52d89b9dd388b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ARM64_PERF_REGS_H
 #define _ASM_ARM64_PERF_REGS_H
 
index 7985ff60ca3fff80f9086b3fa0df10ebd12492b6..b1c2e0df92dca1065440a4179b208f10acc0a3ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_POSIX_TYPES_H
 #define __ASM_POSIX_TYPES_H
 
index d1ff83dfe5deae580cdb0ebf93f25b32a63f5a74..67d4c33974e886d0a4798e341b2a0c5293a4a4b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Based on arch/arm/include/asm/ptrace.h
  *
index 9cf2e46fbbdfefbce75acfe232daf1c3eb03ca75..5d703888f35110d2a7a15ec1836bffcffae3c8bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Based on arch/arm/include/asm/setup.h
  *
index f0a76b9fcd6e3528b3dabf938e18238f8355527c..f6cc3061b1ae891cdcba2a6a064aee2a945faaa4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 5a74a0853db08eaaf425d2dd6698321b87286a30..574d12f860397f21f708417dd1d8ab705a19347b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 991bf5db2ca19aa19b617e4752d6fd65280b164b..bdf0cfb046c94acdc79f68f19d2086d1ca3060b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index eeb702e5074a0425d90c469653cee3f7682a4a92..313325fa22fa7c4ae24e7327b4ce9c1a5f5be199 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 6f6219050978ed8d4c40dae2b21339c9802cc51a..615357b6ba89d3be76cc8670a49cee0f64a2d14f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 791de8e89e359dcda635382ab69023303df61e6d..ee02721a704db2e662de4aa10ed01c92951756a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 043d17a21342e8168ca2e71933b72316cfd6eb5f..5072cbd15c82955ce3fcf1a3ca828103b882248d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index f2b4e816b6dec5d55d677ca55f9764ad4dcbbb0d..0029e13adb596a6e470159f8e1682f5e5c7e1917 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index f01fab637dab336d4aeda2ed73c65b3ec2fe86aa..d190a7b231bf9047f5b9db5073b11c2f63c3d692 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ACPI 5.1 based NUMA setup for ARM64
  * Lots of code was borrowed from arch/x86/mm/srat.c
index f0e6d717885b1fcf3b22f64c10c38f19c25f809d..d06fbe4cd38d7423c900aff64b0e728f995478d3 100644 (file)
@@ -649,4 +649,4 @@ static int __init armv8_deprecated_init(void)
        return 0;
 }
 
-late_initcall(armv8_deprecated_init);
+core_initcall(armv8_deprecated_init);
index cd52d365d1f01aefae2f63e6a0207e65e0fdcb57..21e2c95d24e72a8e339406af601f02690675d3d8 100644 (file)
@@ -1307,4 +1307,4 @@ static int __init enable_mrs_emulation(void)
        return 0;
 }
 
-late_initcall(enable_mrs_emulation);
+core_initcall(enable_mrs_emulation);
index 3a68cf38a6b36712e1a5a6a8463a19d32bbdb4f5..5d547deb6996c0091c64f14de18b5b8a75c88ae4 100644 (file)
@@ -321,6 +321,8 @@ void kernel_neon_end(void)
 }
 EXPORT_SYMBOL(kernel_neon_end);
 
+#ifdef CONFIG_EFI
+
 static DEFINE_PER_CPU(struct fpsimd_state, efi_fpsimd_state);
 static DEFINE_PER_CPU(bool, efi_fpsimd_state_used);
 
@@ -370,6 +372,8 @@ void __efi_fpsimd_end(void)
                kernel_neon_end();
 }
 
+#endif /* CONFIG_EFI */
+
 #endif /* CONFIG_KERNEL_MODE_NEON */
 
 #ifdef CONFIG_CPU_PM
@@ -440,4 +444,4 @@ static int __init fpsimd_init(void)
 
        return 0;
 }
-late_initcall(fpsimd_init);
+core_initcall(fpsimd_init);
index 7434ec0c7a271632adce1a497bc097306199e580..0b243ecaf7ac87faa81fed0a09db996757d71f4e 100644 (file)
@@ -384,6 +384,7 @@ ENTRY(kimage_vaddr)
  * booted in EL1 or EL2 respectively.
  */
 ENTRY(el2_setup)
+       msr     SPsel, #1                       // We want to use SP_EL{1,2}
        mrs     x0, CurrentEL
        cmp     x0, #CurrentEL_EL2
        b.eq    1f
index bd1b74c2436f5cdc42aa6668abf5cc80e038c75c..1d091d048d046cc6a5fc66debbba8e21c2c873a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/perf_event.h>
index 89b6df613dde8809752310ecca6a824c74184e0c..8e4be92e25b17017176b7f4e8a68acb95e934308 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_KPROBES)          += kprobes.o decode-insn.o      \
                                   kprobes_trampoline.o         \
                                   simulate-insn.o
index 5d6e7f14638c679b25579b3b54ebfe35fc22802a..45dce03aaeafc12ab196d6b444e9331654b7fad2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * trampoline entry and return code for kretprobes.
  */
index c45214f8fb5497fdaed8665b8b066bbfc0118ed2..0bdc96c61bc0f2b14f627142a2778409c9c6a7d0 100644 (file)
@@ -751,10 +751,10 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
         */
        trace_hardirqs_off();
 
-       /* Check valid user FS if needed */
-       addr_limit_user_check();
-
        do {
+               /* Check valid user FS if needed */
+               addr_limit_user_check();
+
                if (thread_flags & _TIF_NEED_RESCHED) {
                        schedule();
                } else {
index df67652e46f0de3fcfcfa18dbf5d69c7a97815a1..10dd16d7902d2807709a895da229985b3761cb29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/errno.h>
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
index 1e3be9064cfa0424ba6443d97f786917ed89782f..77cd655e6eb72bb72f284172f2cbb0685309fd81 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ftrace.h>
 #include <linux/percpu.h>
 #include <linux/slab.h>
index ae1dd598ea65f16f766b2650028e6c5be6f61296..6c40f58b844a3014ff6aed34f95dad0eaa61b941 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM emulation
 
index 5ea4b85aee0e96e93c80a7aca339ffb2e987a53e..8383af15a7598409a05f34fce45ffde706e34bcb 100644 (file)
@@ -118,7 +118,7 @@ static void __dump_instr(const char *lvl, struct pt_regs *regs)
        for (i = -4; i < 1; i++) {
                unsigned int val, bad;
 
-               bad = __get_user(val, &((u32 *)addr)[i]);
+               bad = get_user(val, &((u32 *)addr)[i]);
 
                if (!bad)
                        p += sprintf(p, i == 0 ? "(%08x) " : "%08x ", val);
index 62c84f7cb01b99e0105abef1d3bd3252249fc74c..b215c712d89704e3247951fde01bcd4224b0c190 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Building a vDSO image for AArch64.
 #
index 01924ff071ad6baee6781c61d21c4d4d557069b5..0664acaf61fffc65bece9187f3ccab2a9bd6fc7d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # Match symbols in the DSO that look like VDSO_*; produce a header file
index fe56c268a7d9c37374f8126cae0af243adace762..7da3e5c366a0726b92eec878da8edf040739731f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ld script to make ARM Linux kernel
  * taken from the i386 version by Russell King
index 52cb7ad9b2fdc5d156fba1d536fa843ddc89b6d6..13f81f97139088cdc870b7dcbc6b990355e10865 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index 5d9810086c254defd58046c6a34da6aabfa42fa3..861acbbac385626b0adcbc62ccd9107876e5ff6c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Kernel-based Virtual Machine module
 #
index 14c4e3b14bcb6f59a6de55db07de9cc8457be8ec..f04400d494b7a079393ddd5b2c5a2fbe10db3c72 100644 (file)
@@ -1,8 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
-ccflags-y += -fno-stack-protector
+ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
 
 KVM=../../../../virt/kvm
 
index da6a8cfa54a08f11874863bc643f84e103027768..3556715a774ec8f2dcc82e7b370c6827c639af37 100644 (file)
 #define LOWER_EL_AArch64_VECTOR                0x400
 #define LOWER_EL_AArch32_VECTOR                0x600
 
+/*
+ * Table taken from ARMv8 ARM DDI0487B-B, table G1-10.
+ */
+static const u8 return_offsets[8][2] = {
+       [0] = { 0, 0 },         /* Reset, unused */
+       [1] = { 4, 2 },         /* Undefined */
+       [2] = { 0, 0 },         /* SVC, unused */
+       [3] = { 4, 4 },         /* Prefetch abort */
+       [4] = { 8, 8 },         /* Data abort */
+       [5] = { 0, 0 },         /* HVC, unused */
+       [6] = { 4, 4 },         /* IRQ, unused */
+       [7] = { 4, 4 },         /* FIQ, unused */
+};
+
 static void prepare_fault32(struct kvm_vcpu *vcpu, u32 mode, u32 vect_offset)
 {
        unsigned long cpsr;
        unsigned long new_spsr_value = *vcpu_cpsr(vcpu);
        bool is_thumb = (new_spsr_value & COMPAT_PSR_T_BIT);
-       u32 return_offset = (is_thumb) ? 4 : 0;
+       u32 return_offset = return_offsets[vect_offset >> 2][is_thumb];
        u32 sctlr = vcpu_cp15(vcpu, c1_SCTLR);
 
        cpsr = mode | COMPAT_PSR_I_BIT;
index 5188c700716999fc4ab508f29ad55a390147ec04..3b82fb1ddd097783ef66d6ac0f0ab334b3ab6bb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_ARM64_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_ARM64_KVM_H
 
index a0abc142c92be627e8237b69017945a6fa0f2265..9a8cb96555d6b17c091cd1e45f6de1128fb78a92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 lib-y          := bitops.o clear_user.o delay.o copy_from_user.o       \
                   copy_to_user.o copy_in_user.o copy_page.o            \
                   clear_page.o memchr.o memcpy.o memmove.o memset.o    \
index 9b0ba191e48e387123974ec51be2b72dd7d5d48a..849c1df3d214b9bfe38cd60c04c201a0fbc6cca0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          := dma-mapping.o extable.o fault.o init.o \
                                   cache.o copypage.o flush.o \
                                   ioremap.o mmap.o pgd.o mmu.o \
index c9f118cd812bb0e435e402281d1289227a2a8608..81e694af5f8c26736df04b183382d02501811a81 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Based on arch/arm/mm/extable.c
  */
index 89993c4be1befe3d7629bf45174f10081027d2a2..b64958b23a7fa193c23dd1a9039f69f4e9f0b863 100644 (file)
@@ -97,7 +97,7 @@ static void data_abort_decode(unsigned int esr)
                         (esr & ESR_ELx_SF) >> ESR_ELx_SF_SHIFT,
                         (esr & ESR_ELx_AR) >> ESR_ELx_AR_SHIFT);
        } else {
-               pr_alert("  ISV = 0, ISS = 0x%08lu\n", esr & ESR_ELx_ISS_MASK);
+               pr_alert("  ISV = 0, ISS = 0x%08lx\n", esr & ESR_ELx_ISS_MASK);
        }
 
        pr_alert("  CM = %lu, WnR = %lu\n",
@@ -651,7 +651,7 @@ static const struct fault_info fault_info[] = {
        { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 0 translation fault"     },
        { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 1 translation fault"     },
        { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 2 translation fault"     },
-       { do_page_fault,        SIGSEGV, SEGV_MAPERR,   "level 3 translation fault"     },
+       { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 3 translation fault"     },
        { do_bad,               SIGBUS,  0,             "unknown 8"                     },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 1 access flag fault"     },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 2 access flag fault"     },
index 91371daf397c558232b80f2e14afda9827a2d006..67a9ba9eaa96bd1b900732e6c134010a5bf9c3a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/export.h>
 #include <linux/types.h>
index eee4d864350c3e03d1d1f1d0e3bf4f2479ed2efe..02b18f8b2905d6ae5b015772ea6d02ff7443b3a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 
index 89bdb8264305c6a0547948c31ff0781c0b31eaa4..af5369422032b1b81d2304ca0dd5e3abd39ae924 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MMU
        def_bool n
 
index f3337ee03621d5f79a31af217bbd4bdf99dee79b..4ddd1b73ee3e5e0bb962e3576f09fd9a79799b4e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 7ac2436856a523074f301c5c3f884efc3bc0bb72..ded0209348c7a177c82373674758c6ffe090faed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CLKDEV__H_
 #define __ASM_CLKDEV__H_
 
index 11ea1cb35036e68a580613c7032f12c5b62a20ef..e6458ddbaf7e3aa21e3f09e18221d3c5a82d92c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Changed from asm-m68k version, Lineo Inc.   May 2001        */
 
 #ifndef _ASM_BFIN_PCI_H
index 4a724b378971baabdb130a2e594062d92df91112..98ebc07cb28328b2d2c2e5dbcc9c349f2148a3ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_BLACKFIN_RWLOCK_H
 #define _ASM_BLACKFIN_RWLOCK_H
 
index 9f78a761c40a66318a7bd3c87b98e1aecdfeaa5a..71bcd74f83fdf6fd0eb1bd09b4db01e4ec0cceda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port A Masks
  */
index b81702f09ec6b707699ad1a7db8c3fd9d78cecda..8013cc8e839be9305960dbafc31c830118f21efb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port B Masks
  */
index 3cc665e0ba081349651c87b3c5c393051278fe77..94e71010ffe9aeaa631a592aa722b6dcb9dfdb8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port C Masks
  */
index 868c6a01f1b29aebb31d69661dbcefb40731feff..ba84a9fb34509e9a9f26a51fec58cf81ded19c06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port D Masks
  */
index c88b0d0dd443b6ae58418754573b7163ed52c084..2264fb58bc2b37fecdb1d5e7532f3c9b8466497d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port E Masks
  */
index d6af20633278d0f461bff87178804e8bfa78f061..2b8ca3ae2a8e6cce31d7a3c327b79ebe300173d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port F Masks
  */
index 09355d333c0e139688ad332ffa2e995a676cb60d..11ad917fcf914032d0ae85e54e42a7b5b171da25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port G Masks
  */
index fa3910c6fbd4da37ff0313221c4df3d0aba90572..511d088b80947f962eb57e42063cc4c43dcccb06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port H Masks
  */
index f176f08af6246056b55ba4036aabdb8cffd35ff1..21bbab166ae89ac99eeef6d095783d3b627cb8f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port I Masks
  */
index 924123ecec5a4024f215baaca5e3948f181427bf..96a252b0b0bd6dec551d46a3ea2c53b081e85faf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Port J Masks
  */
index c086de87ee6118270a96de071608465f3666ca1c..86c36a208dc5dcc21fc674370db56e7aef81d8e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * bfin_sport.h - interface to Blackfin SPORTs
  *
index 3b125da5dcb233d8541558676b4c577289a8fe40..bcab6670c7fe06c35b5c2d4d08e3cf40d9e6f901 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__BFIN_ASM_BYTEORDER_H
 #define _UAPI__BFIN_ASM_BYTEORDER_H
 
index 4fdab75dee15972853c5a417f4e8c0421e1bb573..b5c86fbbca94a937d20b60e75cc6ad1290fab81f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * based on the mips/cachectl.h
  *
index f51ad9a4f617ad221a4cba6bdb656d912252408d..0b02954f06c3f14554788eeee53a17c829da207e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2008 Analog Devices Inc.
  *
index 3bef1dca379f8e2cdd90bce23b24f1b468860a1c..707b9214bb26b3c19198c12bee0d9e658faaa683 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * This file defines the fixed addresses where userspace programs
  * can find atomic code sequences.
index 9a41c20fc83da49a829b84e866d369eb8f937265..422fee3e4776ae6009f7796f7d8d4f971cb6a9ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ARCH_BFIN_IOCTLS_H__
 #define _UAPI__ARCH_BFIN_IOCTLS_H__
 
index 99c7d6816da0bd3af15380153fb7f7bb57056f99..8b094d43e9b72b134bb1844e503bb6a66555ca1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2009 Analog Devices Inc.
  *
index 9608ef64dc473d7c4dbefbe0d415283b390a0d5f..8947c75cf6387543aa657434c856547d03f1e253 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2009 Analog Devices Inc.
  *
index fd48bd0739d2dcc871035e4a1f5118200133d598..e4423d5560da30ae79bea4d8df349a4f2ed167e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2008 Analog Devices Inc.
  *
index b58f12dc27bd232f2143afbed6ac3b6073a1200e..66b4d32af89ce4105699be72956f2dcd75a2f223 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2008 Analog Devices Inc.
  *
index 79dfe3979123872c99925b9d08cf2c2bf4e5453b..b1db506c8d2eaf15104dd4a814384d884db7c9a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2008 Analog Devices Inc.
  *
index f0a0d8b6663a6905bea90c968a6dc43f5c686ed2..f8e3b99ba0a2b788869157f684b42836db39d46f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_BLACKFIN_SIGNAL_H
 #define _UAPI_BLACKFIN_SIGNAL_H
 
index d3068a750b94fd333256b1c6aee0a511067150e6..458959d1a5ec56ce6aacbdd29aa340175804e75d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2004-2006 Analog Devices Inc.
  *
index f5626b77684a71bae2385af1c5ba8ca8aab848e8..d3437933b95fd037246c4169654bb6ef48a27554 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2009 Analog Devices Inc.
  *
index 0cb9078ef48271b8a83165e613c1d13efd3f2e42..2d392c09323c019b0c6ba2ebe3d816b0f1212770 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2004-2009 Analog Devices Inc.
  *
index 703dc7cf2ecc38a71b5a98e0925c6688cf454eea..1580791f0e3a248d6a2082b1bf6c6e00c64cc514 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/kernel/Makefile
 #
index 394d0b1b28fe318db1399f3019ae27ccde2da2e5..81baa27bc3892ca07594bbc6b0ba711606165cbc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/kernel/cplb-nompu/Makefile
 #
index 42c47dc9e12f965dfdcdb1becdba81b96f6d4daa..74ddde0eb2e70c3ca6fea6deb14b32eabb30b477 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/lib/Makefile
 #
index bde92a19970e11fe80243c61f1cf7e0b42711cb8..4731f6b27e47e3379f8c73444bededa889260830 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config BF51x
        def_bool y
        depends on (BF512 || BF514 || BF516 || BF518)
index 252261ec04c483be21666a946d773cd20ab2ea0c..f7b93b950ef4d32dd6e2ca6e7dfa171ae80b1df7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN518F_EZBRD
index 0ba54701af0b9373ed156f9539646aa50eb06f77..6df20f9c7bd438a0a9194388c0723515eade465c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config BF52x
        def_bool y
        depends on (BF522 || BF523 || BF524 || BF525 || BF526 || BF527)
index 1cc2667c10f1ea3a2839de763732bb043567400c..a76f02fae11cd6e2908fc1ebe990ae908dc57519 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN527_EZKIT
index 1d67da9f05ac9bee40a56008c7caeb4d35097036..6ada1537e20aa157d7440ad8337eb3f359912c4c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/mach-bf527/boards/Makefile
 #
index 4c572443147e62d0f32b81ca0cc9d1297ccb2625..4e1a05be71378ee4126ebb570daefebf50dbb49a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if (BF533 || BF532 || BF531)
 
 source "arch/blackfin/mach-bf533/boards/Kconfig"
index 8d8b3e7321e628fb52d1aecb9c34bc0ee9f00772..3fde0df1b5f28a28131db2faf8c3402d4e6ee980 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN533_STAMP
index ff1e832f80d2ea912e1317cc96de3c1ccb1d1abe..35256d2fc04012bc0d45eaf289789f4adc22da1b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/mach-bf533/boards/Makefile
 #
index 08b2b343ccecdfd825de3e3b35faf6bc3f71072c..1d69b043afd419a3955d81ff1b826c4a700bdf53 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if (BF537 || BF534 || BF536)
 
 source "arch/blackfin/mach-bf537/boards/Kconfig"
index a44bf3a1816e3fba97d5bd5e559855dc99936f98..60b7b29e512e0c40c6075711bb2ede6f3ddfd962 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN537_STAMP
index fe42258fe1f49ac7c69b35fb44bef101b82dc800..47a1acc5f389351dc540d391d5e6ff7d9ddae9bc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/mach-bf537/boards/Makefile
 #
index 2d280f504ab0a829178366118cb116b07248e42f..4aea85e4e5cf2c5d43cb46567b022f345140d73c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if (BF538 || BF539)
 
 source "arch/blackfin/mach-bf538/boards/Kconfig"
index 215249ba58bbb190aa440c0c43452266bb82625e..114cff440d43d58436e95f7c40d133cefbcd5e61 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN538_EZKIT
index 334ec7b12188d78932c57ef08e360e6e19d542dd..71c2a765af1d92ba9b7938413bc440ed764c0e27 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config BF542
        def_bool y
        depends on BF542_std || BF542M
index d38e52671853634a201d743f3f845a899effcc2e..e8ce579ae8f0159d3a858784572b059ae70480cc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN548_EZKIT
index cb97436415113f65725852e125af02d0197bc992..059c3cbdb5ec5e41258446dac216d269957e257b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if (BF561)
 
 source "arch/blackfin/mach-bf561/boards/Kconfig"
index 1aa529b9f8bb334a2cda9d70adf8dd7222e8f0b0..10e977b56710281ad651f335f8611a7253a56225 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN561_EZKIT
index 6584190faeb809c2b73b698bc565b84cdfa98dfa..7d6a8b8926ba71264b9208f2473ac57d13b58cee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config BF60x
        def_bool y
        depends on (BF609)
index 30e8b6b0d2ede49c5cce1fe53f3d4b5ef6540ec4..350154b2a3ee8329c961b003b4c5662c54f490dd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "System type"
        default BFIN609_EZKIT
index 392a59b9a504f3d1f56d7ffc311283376b4440f1..16e0b09e2197e40759d654b50d7334de8032bd13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
index 54d50c689db138ebfd9d187cd45cb998fbbafe60..fcb8f688a8b2e9d1cb7c2af8e6eec44665a97706 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/blackfin.h>
 #include <asm/dpmc.h>
index f099792040402fd9a08006c7f5c85782178cd625..fcef1c8e117ff8f9384ded3f4985d2a8ce7ab4ba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/mach-common/Makefile
 #
index 645ff460a1f24bd003ee76f68953222e12d7c3ac..fed851a51aafaa8bf347dbcacd377aa44b470f0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_COMMON_CLKDEV_H
 #define __MACH_COMMON_CLKDEV_H
 
index c70af3a01297486413f3b4778b49a92ea3a92fb7..e89e1c9f34967d11d1a6d0850147aceb9dd08f97 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/blackfin/oprofile/Makefile
 #
index 5aa8ea8bad2db1cde0719d2bec9144d1c894b832..c6b4dd1418b421970433cc10b44b01319431f1f1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
index 8734abee548ee251bd56a9600918c3e27e38d559..842b7b0bfe804a93f287a99d89518ec309a345a9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for bootable kernel images
 #
index c7528b02d0611fe49fbfaaaae9d30b05e41b91ca..7368838c6e71182334e8c96693266b5581ab003a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for device trees
 #
index a804ec1e018b8ef4541de7e677db10dffbd00a47..0b21cb30343bc0e211c412ddffd0c85ff069b199 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        #address-cells = <1>;
index 35f40709a719ca9979ea2ba90d6a2bffc2706c1c..e49f7ae1912484b71a888d44df0d9ac80e2ba53f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        #address-cells = <1>;
index b488aaec65c087e36699020efebf4546c3ec0afa..9dd4b04e78efde7fa6abfb57e83908ff4b0a7f76 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        #address-cells = <1>;
index cc601bf348a1e7e5b6d1ce9a0db01a3689e6c2a9..0ef5333629a6f8e9bc4be30d0d9c4b0d131739a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        #address-cells = <1>;
index 386196e5eae74957155d96097f11944f419b8b7d..da1e3f2bf06220b76e00bc99bf4f06ca8db85f93 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        #address-cells = <1>;
index 6f1feb00bd52bc0cb70dc866dd4b31c58965b311..76fd0bb962a3801c2a097767564d9caee7538d23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_C6X_FLAT_H
 #define __ASM_C6X_FLAT_H
 
index 376925c47d57ae4bfa28555b269dc00dd605d4e6..1ad615da647960ea7bbf90d030ea721038926fa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_C6X_LINKAGE_H
 #define _ASM_C6X_LINKAGE_H
 
index eca0a867803447d2a1837e9dcc6f606e451a0a90..a0a6d596bf9bae148c9f094174bbfde0adfe83db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _C6X_MEGAMOD_PIC_H
 #define _C6X_MEGAMOD_PIC_H
 
index d18e2b0c7aea8e86bba0ef01499e0aac7b2f6d2a..70db1e7632bc0c16561acd282c4f2033711f70da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_C6X_PAGE_H
 #define _ASM_C6X_PAGE_H
 
index 7c87b5be53b5b74c76fbe03829034b1e96ac3c7c..8f7cce829f8e2630cb88e81cdb024a8375a59e4f 100644 (file)
@@ -92,9 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
 {
 }
 
-#define copy_segments(tsk, mm)         do { } while (0)
-#define release_segments(mm)           do { } while (0)
-
 /*
  * saved kernel SP and DP of a blocked thread.
  */
index f703989d837a6de4bbbbb65c5f813cbf0a0cd95b..d6c591ab5b7ef9b25c4afcd3a3cac4370a2155e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_C6X_SECTIONS_H
 #define _ASM_C6X_SECTIONS_H
 
index bbe27bb9887e01ce9f47516232ea24a83d462d66..b850dfef1f79bf3da919b413ea91b6422c536ab4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _C6X_TIMER64_H
 #define _C6X_TIMER64_H
 
index 8709e5e29d2d2e834c9cfb72d6a31a08a8cd3db5..34525dea1356645c12a4c3c9b6d1a5f57eec3851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_C6X_TLB_H
 #define _ASM_C6X_TLB_H
 
index 166038db342bb7b712f0339a9a964c236bd84455..ab61f867391cdbca3b6ac80e82aa9e1ea505077a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_C6X_BYTEORDER_H
 #define _ASM_C6X_BYTEORDER_H
 
index cc0a4d99151e0e4d82a077011056b7124d50cef3..9b51110a084276a87075b2225aa205e2327e8729 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Copyright (C) 2004, 2006, 2009, 2010 Texas Instruments Incorporated
  *  Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
index ad9ac97a8dad3be119ab72754ab24f871c6ff880..e90548cebec3d9d08b7a0b21d59b5c0797a13927 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_C6X_SETUP_H
 #define _UAPI_ASM_C6X_SETUP_H
 
index eb702f39cde7330532849468fbbccdc601cc7cd5..4e5a9a260861a2b4c3b6b6d5a7efc52ab853ac56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Port on Texas Instruments TMS320C6x architecture
  *
index fd4bb0520e5e86efdac59b5e6e68b51e3fcd9bc4..c407c0497718d7ece6bc3def5ecf426c7dafe4f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Copyright (C) 2011 Texas Instruments Incorporated
  *  Author: Mark Salter <msalter@redhat.com>
index 12d73d9d81f55ceba344eb91ca95130a308a35f9..0d2daf7f9809c37e68c2bdb7c49cb270be1f298f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2011 Texas Instruments Incorporated
  *
index 580a515a94438cd29c1c15565ea748a2b0b84893..02f340d7b8fee9c9412dbad11fb1360909de16f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for arch/c6x/kernel/
 #
index 60f1e437745dd2f60eb5bf5a9c9c2c92326e6b1c..cff57764fcad1fbbfc3bdbbf024045a4ee87398b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed
index 29ebea49ddd5ae2b957c9fb8c4d60f674750989a..1fba5b421eee57f74756e5dc85d3ec91f1a84076 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ld script for the c6x kernel
  *
index c4a0fad89aafc117a116e00ff2ff3280ec91e9f3..f3a9ae6e0e82b5babb593743bdd0ce66cc960c35 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 config SOC_TMS320C6455
        bool "TMS320C6455"
index 71b758dc3a96f9a005a4e9da0ed2e7d21826e513..54d3f426763bf9abc7185b73e27a68fb910b8dbd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MMU
        bool
        default y
index 14881e81e8a34c4ca5e369ec5b455a9265c57831..6084d5e0c5129e57e9b94ae2ddbf43a737c7e02f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config PROFILING
index df9a38b4f18faa58e82c8d44ec9539e7378f9a01..d4015a931374bc52d05cd013907a49d4fcbd9507 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ETRAX_ARCH_V10
 
 menu "CRIS v10 options"
index 239dab0b95c131034a8aaba771bcb53c833be3e9..8792af63c049f4d99565accb5bde8ad9671e9044 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ETRAX_ARCH_V10
 
 config ETRAX_ETHERNET
index e5c13183b97c99fd52ad454cf2dfd7593bcb6c7d..d5549dca81bf1e3c2393c139da3a914c9f6efdb9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Etrax-specific drivers
 #
index 33558d270a53636c6ff1efceaa19500348b30279..2d312c8a4dd56921a8149c91b60d556f938e3792 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*!*****************************************************************************
 *!
 *!  Implements an interface for i2c compatible eeproms to run under Linux.
index dfd3b3ba5e4ec438fdda67c287bad41ff0d31352..68dbe261dc57a8f9fc6ed3523595a55275a5350d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Etrax general port I/O device
  *
index b3d1f9ed1b9881730b3583bb03df58f2acc08229..ec35d62e8e63ad0b17517505512a5b171713b5ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*!***************************************************************************
 *!
 *! FILE NAME  : i2c.c
index e36c96276478e38dd6fce5cf9edd83832e3a51ff..de45c1ffbd7b7ac8bab12ce8aa43397ecd9f48e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* i2c.h */
 int i2c_init(void);
 
index cc62572c1b94602268f32e2efd41488c501a3163..cfe9176f2205c3a68a30480666aaa60c401cb318 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simple synchronous serial port driver for ETRAX 100LX.
  *
index 4841e822cdd1aec04d38e7c23d63bb360e767b5e..7ec04b4a285e75c2de28f99ea2e0b65188d75325 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 1ca6fc2832327a3e9dc7bab72852d3139a348209..e1d897ed5b3757e2aa61728e81f3e31ddeaeabcb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <asm/io.h>
 #include <arch/svinto.h>
index b6549e54be293bccfd98502cdede64366f6845f2..d30834d4dd7e97a18ee0ef10cb7e2ba7f4f47a66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Serialport functions for debugging
  *
  * Copyright (c) 2000-2007 Axis Communications AB
index 5795047359b2e825ac61dab09516521c159cb8d6..c68e978def059c27f25b19fbe0d616b2b062bc4d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Wrapper for DMA channel allocator that updates DMA client muxing.
  * Copyright 2004-2007, Axis Communications AB
  */
index b5622521dad50b18fc4065e823d7bd9c686279a3..1f066eebbd2b06ec3d838c4a26a33ff0be38dfe4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/cris/entry.S
  *
index e9298739d72edb5da7d077974e53c23d89e90f93..94abbff557ff9b2e70d479a15ecb9f5131a72b67 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/cris/kernel/fasttimer.c
  *
index a74aa233b84ede4c0b50a740a3558b821ec65e26..b260a8833903b89cb48dc77df0b660a649dd35a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Head of the kernel - alter with care
  *
index ad64cd1c861aa81d97d69bd4fa205c4fc2234d1b..13a887ce115a245005bca7abefb97ed535653299 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* IO interface mux allocator for ETRAX100LX.
  * Copyright 2004-2007, Axis Communications AB
  */
index 09cae80a834a341d11c5790d8b267b9cc742be35..df11e383acdd269e864950704b080882caf72486 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/cris/kernel/irq.c
  *
index ed71ade93a73aea9a3be5a23b74ef87adcd9fa9d..79b13564d15ccd98e31d6b205174e6773cbc5f16 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*!**************************************************************************
 *!
 *! FILE NAME  : kgdb.c
index a2cdb1521aca4db4069d449f56094ee822e0313d..16848b2c61c838ee4348b2751279f5a79f02fb6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/kernel/process.c
  *
index c2f2b9b83cc4dacb1ccb49917e02df308747baab..b89f57ae096e71fcc87b77f54cd454a224312575 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2000-2003, Axis Communications AB.
  */
index 7ab31f1c754090fe489f8fe400c2ad78ce6d3443..8e4fc248f96fc334d57d083b58540aa63375cd50 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  *  linux/arch/cris/arch-v10/kernel/setup.c
index 2454a0b02f54640e5a6fd29896c2ad849fa3beb0..2e9565e868f2b61d9c223f61cefb5916c15176a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Various shadow registers. Defines for these are in include/asm-etrax100/io.h
  */
index bab4a8dd6bfda2b39b0fc4a72c543a3f0a40e4e6..2beffc37faf86a073bbb92b6776687454a4bc004 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/kernel/signal.c
  *
index b5eb5cd2f60b1381b990d7ead6cba07d6c72f405..3d78373db2541b29603ff91521af06c0523fa757 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/arch-v10/kernel/time.c
  *
index c0a501f29bd89dffc8173cf9a0c7fa62b19768ff..876d45b957f4544b795c51ea7cf6023c8d96a076 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Helper functions for trap handlers
  *
index 7d552f4bd5aea201586e371d88aac828b9aa6162..a3b96391706f59cf6f3e13ae180190aedb8945c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A fast checksum routine using movem
  * Copyright (c) 1998-2001 Axis Communications AB
index 540db8a5f849f3d47d5ce45dbaf66e61d213a2b3..b21449cb1ad3e433ef009a2c0b00f7417fbc242b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A fast checksum+copy routine using movem
  * Copyright (c) 1998, 2001 Axis Communications AB
index 5f41ccd62754425b5d849f6ecd23ec3d050df48d..beb8992ed47887121c6a690bc771c1c9f301c583 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Add-on to transform csum_partial_copy_nocheck in checksumcopy.S into
  * csum_partial_copy_from_user by adding exception records.
index 93310124333fed01e272163ff0792f8aa1138fab..fd7437577938580963ac311379f77d5ddf593852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * DRAM/SDRAM initialization - alter with care
  * This file is intended to be included from other assembler files
index c09f19f478a586b04c252ca6d2ed43433cdaa049..0d449852517e9ba9f34093b47917c49b5ab1cb21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This table is used by some tools to extract hardware parameters.
  * The table should be included in the kernel and the decompressor.
index 48fa37fe0f9b549b443b28ca1998cd0309dac70b..3f1e2f4680f708c0e4bf3af9ced90963d1084cae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User address space access functions.
  * The non-inlined parts of asm-cris/uaccess.h are here.
index 75210cbe61ce36a82afce035eecb2c3eb5f552cb..e6c225169642bb727ec385daa2ca0dcb67539f2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/mm/fault.c
  *
index 85e3f1b1f3aca848ed20b80270e915e79428e1a2..4da99a0e3b57c5353de3f2dc5b20c938ab742e37 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/arch-v10/mm/init.c
  *
index 3225d38bdaea29c04fe87cf3bacb3c88acd9d589..7f1f752f2445b695f7d6a6fdca65f150da274291 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/arch-v10/mm/tlb.c
  *
index 17dbe03af5f4d1f61e4e60c24d48d284849a78f5..958dabfca7ebdc71e3120bd80815ff660add0ef2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ETRAX_ARCH_V32
 
 source arch/cris/arch-v32/mach-fs/Kconfig
index b7cd6b9209a9e19027391931798de6bd1a0eb93e..4d2d744bced254f149a7dfefb87563a0ba3d3943 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ETRAX_ARCH_V32
 
 config ETRAX_ETHERNET
index b5a75fdce77bef639d65ce62ec824059fc541af5..57c9568707b0c9e7769bfeda732cb8c942d31402 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Etrax-specific drivers
 #
index 14970f11bbf2b60cc1d9e7ce26adffa1bf15f63e..d688fe117dca6806404e8ff445f7b2d64c6889d1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Stream co-processor driver for the ETRAX FS
  *
index 5cc622c0225e0497406bdb7227e7638a05835062..6b9e6cfaa29e59ad31d19abdae1c598603be4b7e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/kernel.h>
 #include <hwregs/intr_vect.h>
index 7072341995ff23651e6ac748a58d314f2e831199..dbbd3816cc0bd9285daadb1890621f51137a390b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dynamic DMA mapping support.
  *
index d9fc617ea25346c739cea8894f282405a933efc1..2db7e4f7c1fabf89fb69a54a784a9da7ac47eb1c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index f38433b1f86167259e1707ba69473e9ae2452d40..a080d2fa480371cdf3548d324d83b2d9b51b959e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <asm/io.h>
 #include <arch/cache.h>
index 6fc3d95d7029da92c568b9ea3c75c369edee23c7..2a54d793f96cc72e681f910b4d4a3e4390a5f87b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .global cris_flush_cache_range
        .type   cris_flush_cache_range, @function
 cris_flush_cache_range:
index b0566350a840319d0e8e4d603e0e892792510d36..8cc8ad1cb532f9f4d8ccf1e4d53c53cf03c024d1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <arch/dma.h>
index d2f3f9c37102365eaed4c6e07bda0fd6cccf2bf1..69247fd2090a49c7e0b9098bae115680b4c06e34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2003, Axis Communications AB.
  */
index b17a20999f87b2812c553dbe39c0b44a90a8d20e..0793a52b2c346fba24055e44047a3e4b5bd4aba0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 2000-2003 Axis Communications AB
  *
index eb4e0ff3629566abf69c2b46de720d5e99b3de1e..7452c70f61ffede8ae9ecb497061697e470d8c9c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/cris/kernel/fasttimer.c
  *
index 5ce83eb54f584dd173ea00355f25efbf0918dbf0..92f9fb1f684524504480192e5e589b2d70b13006 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CRISv32 kernel startup code.
  *
index b07da4b695aafd8d6a182c28197834cba2dff220..414afd54323212a6a03f267b13c7a34050a6d208 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2003, Axis Communications AB.
  */
index e0fdea706ecad9d10e4a87f5191e9a64b2628659..3d6f516763a5ac024a1da9f801cca0a2f8df25d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/cris/arch-v32/kernel/kgdb.c
  *
index f3a47605902aa067ac0dec641832d0131f84a129..c26ea6b0e334fcb5e4557657e9800494b1f62afd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 2004 Axis Communications AB
  *
index fe87b383fbf3fc45522d8ce74a122c8469347993..a02f276d0ed4205329168f3e3d5f630eba666e3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2000-2003  Axis Communications AB
  *
index 0461e95bbb629a62a19dee5ae48d3d3afac69e4e..ccac1aaadc8a145cc4264f5b90b65b0ce00a7c3c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2000-2007, Axis Communications AB.
  */
index fe50287aa928c415bc98dd359eff13bcaaba76b6..a36372e35e9673d1a716c3ca7db53ef7cd2b0db0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Display CPU info in /proc/cpuinfo.
  *
index ea2e8e1398e875b6c342a0a9ba523555d6383605..4f2e3ba3bf40c63457c7aa49f62593ec71988174 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2003, Axis Communications AB.
  */
index d2a84407654a45603a44d6b0bdb2233a4f0d67e0..d07a3912687ee4b2a2cd72fc42a0a238719aa423 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/arch-v32/kernel/time.c
  *
index a34256515036c4ff44914b554bdaf91c481c4ff8..ba54c7eccbaa6fe80e6b7d78d87ac74ecd306b7c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2003-2006, Axis Communications AB.
  */
index 4a72a94a49ad6d5a60718e6fc19eec59bc268fd1..f773d4d936096cd87b17c4c61c6f1555efec7480 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A fast checksum routine using movem
  * Copyright (c) 1998-2007 Axis Communications AB
index 54e209f18b06bd1a9f7fc9ddc2d703351e64048d..a76e586d4114b4ba5094e2ded71f997b63d085df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A fast checksum+copy routine using movem
  * Copyright (c) 1998-2007 Axis Communications AB
index 600ec16b9f28abc34fd38a990eab6b9789d2b271..093cd757fcfa7e05d279acf65cf14cc70b38bd9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Add-on to transform csum_partial_copy_nocheck in checksumcopy.S into
  * csum_partial_copy_from_user by adding exception records.
index 39f1ac9995b42b86841aba148b11ddc89c20010c..db06a94ef646246a7cf52446181a3e0095391fbd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Precise Delay Loops for ETRAX FS
  *
index 20b6080269139736529c2c098d87b2db1ba5355c..04e78b6ffa228a590778a795680bbe9311a9dede 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User address space access functions.
  * The non-inlined parts of asm-cris/uaccess.h are here.
index 87547271a595fca051e42e998a19f853a50a1a8f..7b63755544dd56b50c0ee13a8f2d729abe2b11a3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if CRIS_MACH_ARTPEC3
 
 menu "Artpec-3 options"
index 735a9b0abdb835d44f46eaf7cf7a61f19f0340db..076182cc65a34d8cf844e917ee653ad298a6cdb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory arbiter functions. Allocates bandwidth through the
  * arbiter and sets up arbiter breakpoints.
index 11f417f4da98388fb6a37aa24238251ba3b432a0..3f4e923b2527356c2195803e298a02caa538f6b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Wrapper for DMA channel allocator that starts clocks etc */
 
 #include <linux/kernel.h>
index 7dc26bdb26b53dead04222f855c2145682f65062..733c3564ad79fe37bcd84e19eb846ea6a5b86479 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * DDR SDRAM initialization - alter with care
  * This file is intended to be included from other assembler files
index 0145725a1ce5656c17a80021ff8f9d3e96d3e4b5..7c325cc59e1f7c4850ecbef120bc2e76ce19ca5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This table is used by some tools to extract hardware parameters.
  * The table should be included in the kernel and the decompressor.
index 591f77526746d7b3525a72c0ea53b82968200a25..4875bf7aa53f74e96c249b281869dd495a696727 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Allocator for I/O pins. All pins are allocated to GPIO at bootup.
  * Unassigned pins and GPIO pins can be allocated to a fixed interface
index 7d1ab972bc0f91600719ffe844969538ca603c20..743ba3bcbaecba9a4ce6540e53e02090ce349e33 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ETRAXFS
 
 menu "ETRAX FS options"
index 047c70bdbb23b4896422c7bcb843eceda9e3c4e7..c4750d97e46c5793ec1f01c47e7115ef27d5b18d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory arbiter functions. Allocates bandwidth through the
  * arbiter and sets up arbiter breakpoints.
index 7c93679c02add4ffbbc7a25251470d1a7112d284..c0347a4f8c65d98a5e09e92db851af7c1770361f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Wrapper for DMA channel allocator that starts clocks etc */
 
 #include <linux/kernel.h>
index 2ed51e247e8f88d81de184e191a24982e1c1c5fb..e1a01fa4c272dc140a8537d95da8a50a79bde71c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * DRAM/SDRAM initialization - alter with care
  * This file is intended to be included from other assembler files
index 8bde93c36214f2de7266862e6dba8f59f8a83e17..7fbadcc48c0cae95f76600b8d1cb8b7ae6c3fada 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This table is used by some tools to extract hardware parameters.
  * The table should be included in the kernel and the decompressor.
index d8a3a3c439dd0810bd1593b18587840a92b35ad0..a0b2f101003a91d532885c0c3f093691fa63dbef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Allocator for I/O pins. All pins are allocated to GPIO at bootup.
  * Unassigned pins and GPIO pins can be allocated to a fixed interface
index f5438ca8122df9cd33139dde81fad698a4f39b2c..784876afa0013b6d645fbf3138c6cb90f89a43e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Set up paging and the MMU.
  *
index c807284014872955ee09f22c7dd72d816340046a..928b94d1d320d4fa3a258fe9519686a8a0e140a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simple allocator for internal RAM in ETRAX FS
  *
index 332ff10dcc6b0b84381aa1081881f4f7ed203295..4fef321d5606fd4837b4ebbc803bb05e82357f19 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
index c0981044eccbc0a43c4aca85b2f32c0856e2907f..f24965703f6d784b5d61fe423340178894d47908 100644 (file)
@@ -1,3 +1,4 @@
+; SPDX-License-Identifier: GPL-2.0
 ; WARNING : The refill handler has been modified, see below !!!
 
 /*
index bc3de5b5e27c01fbfb51fd09f0d9d4fe2078b226..9e4b5ab4971d20d4d7b03951adce23eb19844967 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Low level TLB handling.
  *
index 6e3b509fd7fce7dadc5469197bd4c48d5eee0759..859d275f862b93a934bfd835aa4cc8748f7612a0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/cris/boot/Makefile
 #
index e4ba0be0e782513c57e1aa69c3b76e2bab711a17..e149c3467c93ad5f164e812e0c4e611475e636ba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/cris/boot/compressed/Makefile
 #
index e80f4594d54300cf22480725fd80856eddd2f04b..d8326779dda21b31a0e3525cc89cb07f8418067e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* OUTPUT_FORMAT(elf32-us-cris) */
 OUTPUT_FORMAT(elf32-cris)
 
index 3c837feca3acab37affe4ff5923874d6778b7a63..91d311c243edc6c2b33f3ed34dfacbdd850b45c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*#OUTPUT_FORMAT(elf32-us-cris) */
 OUTPUT_ARCH (crisv32)
 
index 9edb8ade7e1fa90da627cd067258607a8b7f50e9..08198d8cd37fe447b738616157ee52cb2cf3ac98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/cris/boot/compressed/head.S
  *
index f483005f3d483757c05425d1db15ef6f18ec2a73..a997947d31e3268643c271a5f63bcf506713d760 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Code that sets up the DRAM registers, calls the
  *  decompressor to unpack the piggybacked kernel, and jumps.
index 548d886b03d3a00cdb4f7412ec1f3e39d349ba55..1ad464a117b867528aa612e4ae6ddebe565e60c7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c
  *
index faf69fb9919f07ded5afb768df315d412a105391..3318c630caa225dffb6d9689b40e074d26f141a1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB)).dtb.o
 ifneq ($(CONFIG_BUILTIN_DTB),"")
 obj-$(CONFIG_OF) += $(BUILTIN_DTB)
index be15be67b6537beeca837e7a71f520eedf65c4b3..f857300f4edd2d35707cf19b006a62afee3f687a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index b9a230d108748d97fcc2f81f2b6b6db0d97dfd0a..415270ea53090e5390504705fbfa6ed90812a4f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index bf1b8582d4d803408411c59e779b46ea22f8dba8..4513edf7254526f79ba3cbd38d3c632e65b401c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index fab7bdbd0f15f15aa34e38d3cdd2297c88db4616..6030561d457402a8199aac6dc043f09df5a26f70 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index a82025940006acd8a297f26c80f878c40ed9b02a..f73ac4c83b96d104d2ed19995fc8554444c4d9b8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for rescue (bootstrap) code
 #
index 1c05492f3eb20a2c219e7e6ce5f1a58d48dfc882..11eedb1bf31afd0e26496df0a2431cf0558a10d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Rescue code, made to reside at the beginning of the
  * flash-memory. when it starts, it checks a partition
index 5f846b7700a32c0464dd21d6e9615cb8ee935b0f..9eb04abaa0c004e9fc2223e1521cf21e30b6e5f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Just get started by jumping to CONFIG_ETRAX_PTABLE_SECTOR to start
  * kernel decompressor.
index 655b511fecf37ff3e9ada767f8a8b06ba488377b..3306098dee1588312723aa84dfc72c2572accba9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Rescue code to be prepended on a kimage and copied to the
  * rescue serial port.
index 0b52a9490db65618f77d532fd758d328128718e0..e58a53f917287f8d072f2708a607fa79d14b74db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 MEMORY 
        {
        flash : ORIGIN = 0x00000000,
index 8ac646bc1a2bbd54e124b1f9e378c2867ddf68a6..f1542183f26349428ef96880f33f50495448d129 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*#OUTPUT_FORMAT(elf32-us-cris) */
 OUTPUT_ARCH (crisv32)
 /* Now that NAND support has been stripped, this file could be simplified,
index fc7ec674eca5769fa7d75365f21002e4fa2436a0..06f78a0b0622abf679b624066ea6adaf47f29ff5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Simple testcode to download by the rescue block.
  * Just lights some LEDs to show it was downloaded correctly.
index c8adef364160daa8fedb6ac4af2049df263d6a87..3ae48504977910695a672856042f2e110560df0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/tools/build.c
  *
index 03d9cfd92c8ab3d2acdb1737712929f58731a58b..c18f81858899958e2ae0d2fd1b5d491c3b3988a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* asm/arch/bitops.h for Linux/CRISv10 */
 
 #ifndef _CRIS_ARCH_BITOPS_H
index 3485d6b34bb07532922940d2d27b6dcf944020dc..905afeacfedf53de44b3ba08487b04b46141e564 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRISv10_ARCH_BUG_H
 #define __ASM_CRISv10_ARCH_BUG_H
 
index aea27184d2d26645a14bda4e75e58bd2aeaaf7db..d4049bcab3c5ebe42c6344b56d6903941cabd4d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_CACHE_H
 #define _ASM_ARCH_CACHE_H
 
index d1d1bd9e1090118906145490f5c6a721e3d24412..eb186be4fb3243c14ae52bb80435cefea1452196 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_CHECKSUM_H
 #define _CRIS_ARCH_CHECKSUM_H
 
index 39481f6e0c3018e58a1bc06bc4627738a7753f61..a57d2cc0baf7a9196a8ff4231a594cfa13931fab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_DELAY_H
 #define _CRIS_ARCH_DELAY_H
 
index ecb9dba6fa4fc462b18e8738c16da7ea5b42e2c8..ea794a32cf5e351ca7ce63ff8924ab69833a73fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Defines for using and allocating dma channels. */
 
 #ifndef _ASM_ARCH_DMA_H
index 4a724172877f81cd88b2c25dbdcabce144455d0a..bae5f77cfabc1a206473b8e06a12925ed1734813 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_CRIS_IO_H
 #define _ASM_ARCH_CRIS_IO_H
 
index d92500080883542ebadd4f9fa455621800cb8aca..2d5617e67ab02ccd1c7b7f5e78a3e0afa0712498 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* IO interface mux allocator for ETRAX100LX.
  * Copyright 2004, Axis Communications AB
  * $Id: io_interface_mux.h,v 1.1 2004/12/13 12:21:53 starvik Exp $
index 6aecb835037d3cf2c02da7c637f7653ce43cd4a5..c4e8a78e33d16beac8cb0b70949e5af4f777968d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Interrupt handling assembler and defines for Linux/CRISv10
  */
index 75ef18991240f04211996d6b2f8cf9562d45257a..9959b0a8a58c9004ec081cf311afae6b4aefdeec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_ARCH_IRQFLAGS_H
 #define __ASM_CRIS_ARCH_IRQFLAGS_H
 
index 13f3b971407fdbf68c4436184c7ad2a5c3b7a44d..b6b171f48b2929af73beb4475d2b0713d0d26af1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_MEMMAP_H
 #define _ASM_ARCH_MEMMAP_H
 
index 47a5dd21749d6de1334fb4a4ce1194319a38c19d..74c53048be79253a131d42afdaaf7f8aa1a82606 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CRIS MMU constants and PTE layout
  */
index 675b51d856397a1c9f603c12e0ca0b6f1433c840..6f0f2b4a163f5de0c304a172ac604776dce7e4c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_OFFSETS_H__
 #define __ASM_OFFSETS_H__
 /*
index ffafc99c3472456ec9c40e19690d1b8cfea2000c..a4bbff64868c70bfa1bf49973ef354485c52496c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_PAGE_H
 #define _CRIS_ARCH_PAGE_H
 
index 2a2576d1fc97a4850a81f107865157b3134ec553..a61532d06acb9a9c005983cb8fbc0dce6b7de7ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_PGTABLE_H
 #define _CRIS_ARCH_PGTABLE_H
 
index 93feb2a487d83d28747adf82101b52511f046c4d..b2df646bc1ebd679c68038d23a477b6332783f83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_ARCH_PROCESSOR_H
 #define __ASM_CRIS_ARCH_PROCESSOR_H
 
index e4e847d8a05e5099f4c7900c8590259096b65d1c..8cc27dfb9d3a50604e27fbf0b762b8927b581f66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_SWAB_H
 #define _CRIS_ARCH_SWAB_H
 
index 9b5580f58b96cb0b7c61d8892673585111dc40e9..4c63f728122bde0c58978b47d6209a72e40c28d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_ARCH_SYSTEM_H
 #define __ASM_CRIS_ARCH_SYSTEM_H
 
index 218f4152d3e594f303ce1f9b386eb2ac5c41289e..0ef1223998c1de35ffbdc40bee97cda97e68ceb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_THREAD_INFO_H
 #define _ASM_ARCH_THREAD_INFO_H
 
index e48447d94faf093f380dfa2f6e944099f8d316d5..9c9583e5aed6564d394060d619f3ea5d196fbfbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Use prescale timer at 25000 Hz instead of the baudrate timer at 
  * 19200 to get rid of the 64ppm to fast timer (and we get better 
index 31525bbe75c3b27ae20e05a7ab177fb41c744ad9..9f039d83f21b5f2e19275abc8dbf5a5200cb4bc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_TLB_H
 #define _CRIS_ARCH_TLB_H
 
index 5477c98c2281d1850ed853b35733fe3a8b787dc0..8d033c534f1fb17dfac81d3c5450111d40eef0e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * Authors:    Bjorn Wesen (bjornw@axis.com)
  *            Hans-Peter Nilsson (hp@axis.com)
index d1a38b9e6264d8ae00fec35a33465fdf6603fd8d..03cd0b8652f4e211e33df073ea85bf840bc537af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_UNISTD_H_
 #define _ASM_CRIS_ARCH_UNISTD_H_
 
index 147689d6b624bc806ccfe5e2603506ac7672b00a..7df94798f063d5c9178a0467da98245e1e09f3de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_BITOPS_H
 #define _ASM_CRIS_ARCH_BITOPS_H
 
index fb59faaaae0af41ff8e0908a776bdbc3edcd5ab8..982c6b08fdf193b1290a58cd09e904eeb08715a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRISv32_ARCH_BUG_H
 #define __ASM_CRISv32_ARCH_BUG_H
 
index 7caf25d58e6b6e3b76f75251e0831e1251ced43a..f61f3088c45b82d247864423b739d663aefe9210 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_CACHE_H
 #define _ASM_CRIS_ARCH_CACHE_H
 
index 65cf205b13294ba4fa0c618620233b33cebc091d..fea1341ef2446c253af43640bd59bb581e63bb63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_CHECKSUM_H
 #define _ASM_CRIS_ARCH_CHECKSUM_H
 
index a56ac61a9931cddff42f5fa1232cd0b5399084fc..f2f8eda1ffb1260af392b65bcf5553d1697ad99a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The device /dev/cryptocop is accessible using this driver using
  * CRYPTOCOP_MAJOR (254) and minor number 0.
index e9fda03810a97f6039d234ffdd63d50712773e9e..94307c1fbb1cd2aace3546a420c453c3a390cfc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_DELAY_H
 #define _ASM_CRIS_ARCH_DELAY_H
 
index b8b3f8d666e40566a7675d24ff2dda3ea4c36830..bb5ffa7ff9f4ede497c351d1ba5490723b597402 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile to generate or copy the latest register definitions
 # and related datastructures and helpermacros.
 # The official place for these files is at:
index 866191418f9cb677b66d6fe85269b67451a070fa..6886ba3c2d53c01a019489c6e12133341549bd02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ata_defs_asm_h
 #define __ata_defs_asm_h
 
index c686cb335621ba8008d98ce497a5bfd9291eabd5..1d75d8c31cc02085d635143bd4dff9753fe6d355 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_core_defs_asm_h
 #define __bif_core_defs_asm_h
 
index 71532aa181683510d60544df0e66ff6959759887..a07447fa75f85a779e111471694405ac5f8781c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_dma_defs_asm_h
 #define __bif_dma_defs_asm_h
 
index 031f33a365bb703e8d148999bbf5ce6ad13020b1..55697fec603eaa7b1156c68860b565d662635252 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_slave_defs_asm_h
 #define __bif_slave_defs_asm_h
 
index e98476332e1f15e419a6c4194450e56f8f00fcce..6455b4897bcc5f52d5cc75cfdf2b3ea6e56a54c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __config_defs_asm_h
 #define __config_defs_asm_h
 
index 7f768db272e2dc8e09cecee16b9845247e4e7bc5..bd048296d2f892a22f9d023c9e81886148f27f2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __cris_defs_asm_h
 #define __cris_defs_asm_h
 
index 7d3689a6f80d8366e5e56041a3bb29780cca1d5c..429fe0d4ffe4427ca8473b9d2893c4ffcfb59702 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define RW_GC_CFG      0
 #define RW_GC_CCS      1
 #define RW_GC_SRS      2
index 0cb71bc127aee20a8623ed0487e662c2d17c2ae2..fec451d2a3dbfce9f3766f63cd2bd67ce6784f77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __dma_defs_asm_h
 #define __dma_defs_asm_h
 
index c9f49864831b77361e41552cf5091cbb6260d8d5..97fe523d4d72845f9f0603f0077fc5f8eb6b88bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __eth_defs_asm_h
 #define __eth_defs_asm_h
 
index 35356bc086294146f98274887718b25e6bd8e270..41bc2f83795cf29f8e24a04d36ea96b40ed8de2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __gio_defs_asm_h
 #define __gio_defs_asm_h
 
index c8315905c571930479697e36026954eecc06b5d3..e371052fa1bcd1434221cc750771bc869a04b3d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
  from ../../inst/intr_vect/rtl/guinness/ivmask.config.r
 version . */
index 6df2a433b02d612c1656d97cf3361d516d04095c..8d0c788b286b1f649efba0d063649e01f880b30a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __intr_vect_defs_asm_h
 #define __intr_vect_defs_asm_h
 
index 0c80840548406c6682f47cc8424d7a1ed39a434c..f624468346af18f2e23549c7a081f29fb0265c89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __irq_nmi_defs_asm_h
 #define __irq_nmi_defs_asm_h
 
index 45400eb8d38952ea2c911cad8f15dfa596bb3567..6a5ce2141860cbcedbd2af03ede33b85b9f675ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_defs_asm_h
 #define __marb_defs_asm_h
 
index 505b7a16d878cf8742ac0ea6cc589a3af5c1e58e..083174678961116313c43d60fda4d3d5cac2d2a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __mmu_defs_asm_h
 #define __mmu_defs_asm_h
 
index 339500bf3bc0d9664ef2f01fb48d143ff88bc11e..fd66daa792599961a441d781ef5f8bbeec11f561 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define RW_MM_CFG      0
 #define RW_MM_KBASE_LO 1
 #define RW_MM_KBASE_HI 2
index 10246f49fb28c71022da866650b9bb9c2ebdfc80..72b3d231d80f7a09827615b9f3303e99790d955f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __rt_trace_defs_asm_h
 #define __rt_trace_defs_asm_h
 
index 4a2808bdf3909ba5fc729fc88fde635a78749dab..944f4c7666b4dbea6813d72bb734fb90486c1f89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ser_defs_asm_h
 #define __ser_defs_asm_h
 
index 27d4d91b3abde0bf0a4c68885441d20be30c5fa2..607b505100fa4dd5e642bd642ab43ad2f14f3c80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __sser_defs_asm_h
 #define __sser_defs_asm_h
 
index 55083e6aec93ff56ccd95ee36cdc86f25c23c88a..fab117b00ab673fe01e388a7de9adf1464eaa207 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __strcop_defs_asm_h
 #define __strcop_defs_asm_h
 
index 69b299920f7156fe8fa2e98c51b5340da37f7875..73755fa8a5261c1f900fa7716263987a8703a05c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __strmux_defs_asm_h
 #define __strmux_defs_asm_h
 
index 43146021fc16ca1f0de43e15f20f90045f283cc8..cc67986d7437ca390e00fdc0bb3a774efcc26af7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __timer_defs_asm_h
 #define __timer_defs_asm_h
 
index 43b6643ff0d3d3bb589e0316cd85cedc95265dbd..2a8adbcf75d8ebf6a5cef01558dd34dc4afc31a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ata_defs_h
 #define __ata_defs_h
 
index a56608b50359e5c27c841a59f3d41e715e77c174..054841c454665020e4501f9d748d62a90fd4e736 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_core_defs_h
 #define __bif_core_defs_h
 
index b931c1aab679d4bfa9ac1fac098578ef1f6b36bb..5c4abf5c0167104d83123f4dc7bd9d54d6f4dfd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_dma_defs_h
 #define __bif_dma_defs_h
 
index d18fc3c9f569f8b7f757d6ec9e9282bb9f5383a0..80c740b3c78516a24f017e4d82201dd9b4214cae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_slave_defs_h
 #define __bif_slave_defs_h
 
index 45457a4e3817f8c99050f98129db5d6e39aad1cf..1c5da14f27f329ede42007a3425a1d7059561886 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __config_defs_h
 #define __config_defs_h
 
index 8370aee8a14a95a72cf23f527ce9ac41877d3568..913f918bba1499a09283295eae49eca49d465192 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
  from ../../inst/crisp/doc/cpu_vect.r
 version . */
index 52bf67907f2843ad6c89f8d0e8ef4fca631b7846..dd24c6da09e0fef3863725367bd2948d842ed050 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * DMA C definitions and help macros
  *
index 48ac8cef7ebe9c7a5cad38e70d48300e2c17c3ef..a67826f5fe21fc599d36f0f03e46fe3f186fb86d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __dma_defs_h
 #define __dma_defs_h
 
index 90fe8a28894f6f77123579a7c278c9852fdf6237..d8021b44e5e6ab1944c893078aa47110f9661bb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __eth_defs_h
 #define __eth_defs_h
 
index c47b5ca48ece9181f3ad36abda53d9dd41681660..5937ed7a5228fdabd68291c6412140cd1108afd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __extmem_defs_h
 #define __extmem_defs_h
 
index 0747a22e3c077b4e44993c67f66ab269cf13c9dd..1b9467ae65c12dbed0f0f1baceb6c40fb38e0c92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $
 # Makefile to generate or copy the latest register definitions
 # and related datastructures and helpermacros.
index a4b58000c1647030c52c0610fdeccc188db4a62c..10443d789a663eb286eae7e44f3aaeb97fdefa66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_crc_par_defs_asm_h
 #define __iop_crc_par_defs_asm_h
 
index e7d539feccb15709f6a6d0c261a97b6bb85616da..fdee9bbe1fd49f4596b04daa6861c727ae5793f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_dmc_in_defs_asm_h
 #define __iop_dmc_in_defs_asm_h
 
index 9fe1a805437140f044460288572fdb6dd59c1ecf..a97b741bd36acc4accb806e3b72379898d414067 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_dmc_out_defs_asm_h
 #define __iop_dmc_out_defs_asm_h
 
index 974dee082f9f3e4b8cd7bd1b222f50bb41c12142..e2c0990246f22bbd030658fe7f0849819fdf82d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_in_defs_asm_h
 #define __iop_fifo_in_defs_asm_h
 
index e00fab0c9335dcf6a3f896dc72aa57298c3fbe70..50837b989c90606ef2dc4102de2b2dd7d9866d7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_in_extra_defs_asm_h
 #define __iop_fifo_in_extra_defs_asm_h
 
index 9ec5f4a826dfb58c8f0709e0157a690e97127b47..9f06dddf33a0457d14828c4dbebf3ef1398baaaf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_out_defs_asm_h
 #define __iop_fifo_out_defs_asm_h
 
index 0f84a50cf77cc0a7692c77f85a11240feee0f44f..e8c488c389e4427786676c23718146355001109d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_out_extra_defs_asm_h
 #define __iop_fifo_out_extra_defs_asm_h
 
index 80490c82cc2991fbd427168f9c298b809d4782f8..48869d445e07c233cd122bb23543aaef1721ee3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_mpu_defs_asm_h
 #define __iop_mpu_defs_asm_h
 
index a20b8857b4d050197b7ff92a912fe9ee55611c03..615f869a6de96eadb679b76aea0269938bd878e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Autogenerated Changes here will be lost!
  * generated by ../gen_sw.pl Mon Apr 11 16:10:18 2005 iop_sw.cfg
  */
index a4a10ff300b34a2a85d541e60be9f14eb5b6c242..fe8c90e015b060687ca9d4acfe924e5041b444ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_in_defs_asm_h
 #define __iop_sap_in_defs_asm_h
 
index 0ec727f92a254311d350a3ef8d8a9a77509dc69a..a5e46f0bbf6fbab8e3039e71dc69694a571cf73d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_out_defs_asm_h
 #define __iop_sap_out_defs_asm_h
 
index 2cf5721597fcf21b7cf3ebecb20745b8063a5c7a..169aaf8d44b275dc6307f9c67e5976d08a88441d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_scrc_in_defs_asm_h
 #define __iop_scrc_in_defs_asm_h
 
index 640a25725f209305b30f9a510c2609b85e956aca..0e9bca149bc68538f85b7a87e2977364c4ec4d71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_scrc_out_defs_asm_h
 #define __iop_scrc_out_defs_asm_h
 
index bb402c1aa76129c1feecbb2bb3e48c6c5e627a6e..cf2b64a9d42c0360a83d2d9687f591c04891bf89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_spu_defs_asm_h
 #define __iop_spu_defs_asm_h
 
index 3be60f9b024cfcf4a472d8c16f20ee901daa2177..4f4c7340d39a0875ba356d582568dd81708f3f67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cfg_defs_asm_h
 #define __iop_sw_cfg_defs_asm_h
 
index db347bcba0251e50a1df21e3a2ec5ce77abcd0e1..ef04a57a06802dece1c83151a8aa8357db341fa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cpu_defs_asm_h
 #define __iop_sw_cpu_defs_asm_h
 
index ee7dc0435b5967aa2f9485f6482719082f9e4a05..22292069e4fdb8bab095a1a9c9aa303833f0d888 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_mpu_defs_asm_h
 #define __iop_sw_mpu_defs_asm_h
 
index 0929f144cfa16b1eb4f040b613145d769d5cf711..82729218621c8d500d252ab3fd33952291e9d655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_spu_defs_asm_h
 #define __iop_sw_spu_defs_asm_h
 
index 7129a9a4bedce6b1a8a10b9a93c5b1282ff9d405..4f1cf73d86cd861df619af0714a3641b2aced59f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_timer_grp_defs_asm_h
 #define __iop_timer_grp_defs_asm_h
 
index 1005d9db80dc7bc7bf18fdc8fdef991dd176cb49..7bc882c62952a0ad50ee381806a4edd1b6b3d632 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_trigger_grp_defs_asm_h
 #define __iop_trigger_grp_defs_asm_h
 
index e13feb20a7e3fe768fde0e37f830948c6984cebe..2e239957e34ae2b83444d524c8c75b3b31fa6c63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_version_defs_asm_h
 #define __iop_version_defs_asm_h
 
index 90e4785b64744c9aa69aedf121649d9fd97f85f0..8690034d9bec3fb228efdae55a8dfe8b5c66a5a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_crc_par_defs_h
 #define __iop_crc_par_defs_h
 
index 76aec6e37f3e0c41f113c20b456933a503445092..3dd4e870a3a5eae6821c8c0674ac51c83abc9dc6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_dmc_in_defs_h
 #define __iop_dmc_in_defs_h
 
index 938a0d4c4604d9b34f3d4053a28961e9fb95fac2..7ed17bc553c3e38e9f4663eb07214611b47f8f5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_dmc_out_defs_h
 #define __iop_dmc_out_defs_h
 
index e0c982b263fa7de43a991e0146458d955fedbd97..dc14868680e60b3cce538dfabe5ce0e643099961 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_in_defs_h
 #define __iop_fifo_in_defs_h
 
index 798ac95870e90cd12c0884342e5e42a0db648f88..ee7dc07a78621fa24db716b7c708d65959dfd941 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_in_extra_defs_h
 #define __iop_fifo_in_extra_defs_h
 
index 833e10f02526bb0be353ab60c3229ba099972040..ee8194fcfa82db5ae8f34fc9de02ba222cdbf61a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_out_defs_h
 #define __iop_fifo_out_defs_h
 
index 4a840aae84eecf34c197baf52fb9f55cd6bb5692..b9721649f6fdc21dd37bf51395b3d39bb5047a46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_fifo_out_extra_defs_h
 #define __iop_fifo_out_extra_defs_h
 
index c2b0ba1be60f6e6d91aeaffddc425a8f4056a73d..28e1c59036770019c608e113d16c938412ac21a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_mpu_defs_h
 #define __iop_mpu_defs_h
 
index 2ec897ced1667ce308f43fe8c3e09766dce009ad..41f5178a65b8160d777f0985e9340bfdaf99d658 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ************************************************************************* */
 /* This file is autogenerated by IOPASM Version 1.2                          */
 /* DO NOT EDIT THIS FILE - All changes will be lost!                         */
index 756550f5d6cb74622b9c2f93bfd8cf215f4d35b0..95e9ce8c042a16ed9913675a79e0854832376c24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Autogenerated Changes here will be lost!
  * generated by ../gen_sw.pl Mon Apr 11 16:10:18 2005 iop_sw.cfg
  */
index 5548ac10074f5777ad51acb62e6e261f1e4174aa..22a74eafb8b0c5ab68a120da727d53b209256eee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_in_defs_h
 #define __iop_sap_in_defs_h
 
index 273936996183c19c7e6cc8bf836285ca0df445f3..380133910105177a8b841c7d1d2317db9e533859 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_out_defs_h
 #define __iop_sap_out_defs_h
 
index 4f0a9a81e737b98627a200d5e68179e89ebbbc81..65d662046ca96228cbc76186722b42b3c6d2679c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_scrc_in_defs_h
 #define __iop_scrc_in_defs_h
 
index fd1d6ea1d484fe4db025e3f0f5dcea4d1e5c46dd..ba39605b9737032c0aeb039c550e11ebfaf92d34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_scrc_out_defs_h
 #define __iop_scrc_out_defs_h
 
index 0fda26e2f06fe6aceb7ddd5606e9a68d4e67a028..7681fdab93fc0400bdbe5ff59d6199728adcee3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_spu_defs_h
 #define __iop_spu_defs_h
 
index d7b6d75884d2790b54a7944a7185b17bbc38599b..86e5c9b3e5936ac0fbeb3a2f04b56286bec2bcd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cfg_defs_h
 #define __iop_sw_cfg_defs_h
 
index 5fed844b19e2a1ed755311a8286207e4e15a5f15..31055d3fcd76b3b10980ec3a74c9ec552d00ff1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cpu_defs_h
 #define __iop_sw_cpu_defs_h
 
index da718f2a8cad13b7de0b86074e4fe32b6a961816..5038c08e8a957140b5bed13236478c3c28a0acc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_mpu_defs_h
 #define __iop_sw_mpu_defs_h
 
index b59dde4bd0d1e039f567711ecdbd13ad06a1c0f6..aeebd57af7f73a138cb8f3e641c67e91ca16be3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_spu_defs_h
 #define __iop_sw_spu_defs_h
 
index c994114f3b5158e128f48d54c73fe8281ac9ca94..b4095422adf6b8b772b6f7bb66fc330d943f47b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_timer_grp_defs_h
 #define __iop_timer_grp_defs_h
 
index 36e44282399db024f28362530e368af2609adb0b..aff694506e7f2435bf0cd9b71aa7234592336746 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_trigger_grp_defs_h
 #define __iop_trigger_grp_defs_h
 
index b8d6a910c71cf053ff3d9fa0d5d67b521911ab4a..53a4b8cda969d36f963fb564e7672085a9139e87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_version_defs_h
 #define __iop_version_defs_h
 
index 7b167e3c05729e42d3ce35ca52a0972fa8e315cf..63b20dee2fd1f5dfabbe3bc8e902478821dc60f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __irq_nmi_defs_h
 #define __irq_nmi_defs_h
 
index a11fdd3cd907e9d40bcfb0e560766b0e146c0da3..da29a8a2225022c13a4946d7e077ddeb0c4810d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_bp_defs_h
 #define __marb_bp_defs_h
 
index 71e8af0bb3a444a0ef89ccb9b36443cce72c14ce..2858de48a5e0107787d66e74d62adb0a36e9edc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_defs_h
 #define __marb_defs_h
 
index 236f91efe7e88527e4334f51778cf629fd93a100..8fabdd2115072d0fbc1acfc4f3ab2d970d7f9b10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Read/write register macros used by *_defs.h
  */
index d9f0e924fb23a7329b70a91a9fddf075f0535344..ebb6bbc6e778ce3d5d779548baf84b6796802b99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __rt_trace_defs_h
 #define __rt_trace_defs_h
 
index 01c2fab97d437a2ca10536f32de9c3d674c3628a..3b04cf9012cf2b8d797b01effd3b39070e996ba9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ser_defs_h
 #define __ser_defs_h
 
index 8d1dab218b910b9e5a57206f03f518c91205c211..02971f9b655866b39d08da54dd97136ce3d208d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __sser_defs_h
 #define __sser_defs_h
 
index 35131ba466f398fa433487941192fe1a77fec056..2c522b024ee70a4f29d954678adeec064723f476 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 // $Id: strcop.h,v 1.3 2003/10/22 13:27:12 henriken Exp $
 
 // Streamcop meta-data configuration structs
index bd145a49b2c4d618e03ac454ed9229aec5f15252..069b2ed9def556c183b93cb62a740c2a5a2cb615 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __strcop_defs_h
 #define __strcop_defs_h
 
index ffe49625ae36b88e7de626ed11926cd6dae5681d..c3fa0c06c558ac0d94250b15a7d59730ecd9f8ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUPP_REG_H__
 #define __SUPP_REG_H__
 
index c0ada33bf90f7d43caa01161cff75b303ef630e3..2bcb21c9b25f53a0ffd29d089caec99aa65ef3ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_INTMEM_H
 #define _ASM_CRIS_INTMEM_H
 
index 8270a1bbfdb6d0a7468f39f52884792281b5f2d3..5259084001d4f5ed7cecb997421c70448a6dbd5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_IRQ_H
 #define _ASM_ARCH_IRQ_H
 
index 5f6fddf9950997ea56936e43c6ebd070dc8850ca..d55bf82de77c6f59de7faeb67cc062ffde61b729 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_ARCH_IRQFLAGS_H
 #define __ASM_CRIS_ARCH_IRQFLAGS_H
 
index e6db1616dee53ff16b9f7fb6d8ae93f249777e51..a8eec1312de0211c85d99558bf537a2c1c28349a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_MMU_H
 #define _ASM_CRIS_ARCH_MMU_H
 
index 4442c4bd52f41f24589653b3b958ae9581a9755d..10a670443386f778c346fb953b1d57c5c3787565 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_OFFSETS_H__
 #define __ASM_OFFSETS_H__
 /*
index e5b5aab52de81ce29ef5b2994400185e2e617295..7ac04f61519318ca7a5d9bebc22ad352d232e034 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_PAGE_H
 #define _ASM_CRIS_ARCH_PAGE_H
 
index c1051a8da33d2362cd190bb7a26d34121f7ce310..e787b19b700e727e354e3eec98dd7fb0cb742a8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_PGTABLE_H
 #define _ASM_CRIS_ARCH_PGTABLE_H
 
index 568759271ab537a954548cab4d562cb85bd43b07..554088ab5f012c4feabe36cd4b4ddfff9600f7e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_PROCESSOR_H
 #define _ASM_CRIS_ARCH_PROCESSOR_H
 
index 9a4ea5e209c227a65dfbfe64e63f823c820ea8d0..280dd7093e4f6e746dc94b198f9c9a53824aa744 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_SWAB_H
 #define _ASM_CRIS_ARCH_SWAB_H
 
index db853fb3a45803bb1c875bd956274f272625aadf..84f00e5d4652fc00a12a08f82805cb94f91b96ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_SYSTEM_H
 #define _ASM_CRIS_ARCH_SYSTEM_H
 
index d6936956a3c6c073fe7e47c5da9399c597d783d1..8514669e5fabd47f6bee59a2c001ef602b14ce62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_THREAD_INFO_H
 #define _ASM_CRIS_ARCH_THREAD_INFO_H
 
index 2591d3c5ed9d7526cc2fa163122aeaa8e27df6b6..2cd8e704a73ba9418c1dee575268dc6385e4aa73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_TIMEX_H
 #define _ASM_CRIS_ARCH_TIMEX_H
 
index 4effb12536601cc00f2c45fd5ce2a628c8762c00..50452802738fe3b16a171ede24a53b69c95c6de7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_ARCH_TLB_H
 #define _CRIS_ARCH_TLB_H
 
index dc2ce090f624bf7fda006a7fef32b1736bdd5b9d..214bd26efcd951a9a68fd1162151b2f9ca7ad655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Authors:    Hans-Peter Nilsson (hp@axis.com)
  *
index 0051114c63c7004f404b3f6d46f47bf3593c2971..764435b3b28eee88116d19111411ce356acc136a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_UNISTD_H_
 #define _ASM_CRIS_ARCH_UNISTD_H_
 
index 65e9d6ff05208aa69deeab9bf38756b917a011d3..7fafc370def2ea231b84513efbae95b6b770ef6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_ARBITER_H
 #define _ASM_CRIS_ARCH_ARBITER_H
 
index f01dca1ad10856261c86ab38beb6057a82950358..92a74eab439576e2ef6ab1f79dc81438a2d7b324 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_CRIS_DMA_H
 #define _ASM_ARCH_CRIS_DMA_H
 
index 02855adf63e89845b87703355ef835fca08af289..3d7f12ec1c5446a7814ea30bfab0f8abcb52a8cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __clkgen_defs_asm_h
 #define __clkgen_defs_asm_h
 
index b12be03edacb32130147d53040e4f525e38733a4..df79e5a7f02aeb35f0aadefcfe071a280d1c9c59 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ddr2_defs_asm_h
 #define __ddr2_defs_asm_h
 
index df6714fda179b5fdf8760b39b4cf5cb94bc2fdda..04b7ff3f70a27a22de305aac2dd97a7a7e506497 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __gio_defs_asm_h
 #define __gio_defs_asm_h
 
index c3dc9c666c46ca6d8b4067f15bb46353236f033e..a73168a8e93afd74b2cf2a96cfcd9df7897feb71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pinmux_defs_asm_h
 #define __pinmux_defs_asm_h
 
index 3907ef4921c8abb05c0bdf9283b46aa52e5e1426..463bb9e2c38ebabb8b40cbd0ac1d07bf65b5e62e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pio_defs_asm_h
 #define __pio_defs_asm_h
 
index 89439e9610e27ddfd2470f826555cf1e3df146b0..e3bf8e0692a65b58c357cc11024b9c662554de83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __reg_map_asm_h
 #define __reg_map_asm_h
 
index b129e826fc34abc6de02407f0568d704b740bb14..82da59c382c217d116d4e98ee44aa8216c8fb073 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __timer_defs_asm_h
 #define __timer_defs_asm_h
 
index c1e9ba93b3a3dd718f24d8261ecffb17e450bc09..32d58fed3b032806a24e41fd071e93d9abc05d47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __clkgen_defs_h
 #define __clkgen_defs_h
 
index 0f30e8bf946d5a4747f3dd8a20aedc1c3c059061..84684c335d7de8a2a532ea799b4c5870d1bb3456 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ddr2_defs_h
 #define __ddr2_defs_h
 
index 5d88e0db23ae5d78a74a83c3a7eba01542fd9a95..83ab1f4956122f4b6f8897b451284512c7f9264b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __gio_defs_h
 #define __gio_defs_h
 
index bea699aa480e1fce3c20f59a5c78df2579528e8e..55dab5bd7bd30d1e95c8c3d34a724f77f39dd4dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Interrupt vector numbers autogenerated by ../../../tools/rdesc/bin/rdes2intr 
    from intr_vect.r */
 
index b820f6347c7408c0cad81236d506feae4e7f627e..71a28d1ed74ae3b2df55af272d0465e3f17dc805 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __intr_vect_defs_h
 #define __intr_vect_defs_h
 
index d75a74e90458051bd0ae5fcf8970f6124d8f4371..5e5f4d94aecf3eefb147fc63cc0c3ead4c1d1784 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Autogenerated Changes here will be lost!
  * generated by ./gen_sw.pl Wed Feb 14 09:27:48 2007 iop_sw.cfg 
  */
index 7f90b5a0460dfa75e45b524a2b6277007e9160ee..ee0587ec433c74c57cfbef824a93cd5fc93fce22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_in_defs_asm_h
 #define __iop_sap_in_defs_asm_h
 
index 399bd656406b613bf7464c19a591b877839deabb..9bbe0b920c939d2414cc5c8816789e57338d67f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_out_defs_asm_h
 #define __iop_sap_out_defs_asm_h
 
index 3b3949b51a665444d637cec3423368a260712728..c4b8bc386cb68208f0ff68c886194fdaa3d266ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cfg_defs_asm_h
 #define __iop_sw_cfg_defs_asm_h
 
index 3f4fe1b31815470570dadc17b55492d833858a67..89f36dc1f96da74eea625e8165adaf27147d65ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cpu_defs_asm_h
 #define __iop_sw_cpu_defs_asm_h
 
index ffcc83b22d21fb5917fa3366e4660c18ce928ab4..45e19d79dba9918621de84f91ea1deb17911773e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_mpu_defs_asm_h
 #define __iop_sw_mpu_defs_asm_h
 
index 67a745338087de9f60b1245317c2143ac5f4df1e..55afb6e320e4d58e564dd64e7876d0e223716646 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_spu_defs_asm_h
 #define __iop_sw_spu_defs_asm_h
 
index 4ad671202af014f07e80cd77b52dc00f4667aa77..79ff8fafd3bfd2361b067a80e9f92814e165886f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_version_defs_asm_h
 #define __iop_version_defs_asm_h
 
index af3196c60a4695a4e6d7b04b5fcbaa0423f0721c..23d731f36145ee3cba6c4b34e3c84905ca2d67a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Autogenerated Changes here will be lost!
  * generated by ./gen_sw.pl Wed Feb 14 09:27:48 2007 iop_sw.cfg 
  */
index 51dde016c03a276eead36016c4cf329a7e92de34..1d6c09a3230df4adb251ff84141edda3b26a873a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_in_defs_h
 #define __iop_sap_in_defs_h
 
index 5af88baa2ac13b2329afa7212fa3587851cd9859..1cbd30efadb71c6c44a4b40ccca28342c11da34b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sap_out_defs_h
 #define __iop_sap_out_defs_h
 
index 98ac95275a1c045a7da81c9fb47e68be318a9f91..07050b053bb44582c645893a70c99cdf46c17abb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cfg_defs_h
 #define __iop_sw_cfg_defs_h
 
index a16f556370eb3a0b1200219b93545f2fe570b106..b4acdae4f6538e8163b15e3f753da2610e70aa98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_cpu_defs_h
 #define __iop_sw_cpu_defs_h
 
index a2e4e1a33e57b269fb550d0003ff189e7136dd9b..bc1abb5fb3087eb7132c461882e7b2bd7597ee9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_mpu_defs_h
 #define __iop_sw_mpu_defs_h
 
index c8560b865a1abbf168af2f3b0fed1d6ab4800050..82b64360a4d361c1eb0821be237530c1098f53c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_sw_spu_defs_h
 #define __iop_sw_spu_defs_h
 
index 20de425e652b5322f85a31b6d3ae1db0dc590b9d..d944c6ce5f9b1b48d7748ccc358a8e0b3e9f8fb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __iop_version_defs_h
 #define __iop_version_defs_h
 
index 243ac3c882cbfc8e6720aaa06636697053e0d6d8..5c72116f10677a4d3d9abe22974ce4a50b900d08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __l2cache_defs_h
 #define __l2cache_defs_h
 
index c0e7628cbf7d7daf4fa381a48d5423245bd359b5..84f68755a75cc18c6f795ec7120a04c9d13211e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_bar_defs_h
 #define __marb_bar_defs_h
 
index 2baa833f109a6f4d976f47b7f0ad34fe69c48610..13539bc5d6136bfd5511817acf87d25955da706a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_foo_defs_h
 #define __marb_foo_defs_h
 
index 4b96cd2cba8ad0906510bf1514964e2905006c1e..d604042a52bf0cef18d84c7b43f041ff39c498e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pinmux_defs_h
 #define __pinmux_defs_h
 
index 2d8e4b4cc602ed61cc82b6b2cbd1fed7bfd84b27..348e39f419e005a65ff500826a878efeb085b9cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pio_defs_h
 #define __pio_defs_h
 
index 36e59d6e96b601d779f430488f6f8b0e1db65cac..04ef87d425132cc861f46ecbc75aa58ce9e4cd32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __reg_map_h
 #define __reg_map_h
 
index 14f718a4ecc36b1821cb82c5f3c72c64c6bca54b..a19955fa8d94284a1007600bd564fe2ee9aba6a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __strmux_defs_h
 #define __strmux_defs_h
 
index 2c33e097d60a93cd6736f518d904c4314be995a2..de849a6362f65c9c0d78833d6e562340c44aa02e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __timer_defs_h
 #define __timer_defs_h
 
index 7e15c9eb4e4902dffe4e0631f8111c34830174ce..7b9a9a5699b2102d271e85e17d7b081f581c0278 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_MEMMAP_H
 #define _ASM_ARCH_MEMMAP_H
 
index db42a7254584892176d4c16b1b9224d321fb76da..35e3fc97d6a3c22c82bbb6e325528ba7bca2d967 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_PINMUX_H
 #define _ASM_CRIS_ARCH_PINMUX_H
 
index a2e0ec8faa7d616ec3c2f964a95ff05d093727eb..f9401a3de83c81bfe77ddb1ca9ae978619da2316 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_ARBITER_H
 #define _ASM_CRIS_ARCH_ARBITER_H
 
index a8c59292586ab51a4a483569e17e9ff1882255d6..53a59944a48bafe94953d8444a406a2a368842ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_CRIS_DMA_H
 #define _ASM_ARCH_CRIS_DMA_H
 
index 0a409c92837eb5ca716a2c4dda510e9d3ad17a76..092cad384b86c374c5ea08938c7d7b7278d940b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_core_defs_asm_h
 #define __bif_core_defs_asm_h
 
index a9908dfc293793c5188df95d3db9e066f10712fc..5b38835b42f7cbcd26a3e5e8fe7ee990a3550742 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __config_defs_asm_h
 #define __config_defs_asm_h
 
index be4c63936d9091e7e948da3e63b51cb87cf6343c..3d20568928328fd8d5e7df954c5c994480336f2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __gio_defs_asm_h
 #define __gio_defs_asm_h
 
index 30cf5a936b64a5f644a41d54427842121c75aebd..99968cfa446a231db4593c3c60c8126ada3040b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pinmux_defs_asm_h
 #define __pinmux_defs_asm_h
 
index 87517aebd2cb672ebca2809a6f727bc5966f69fa..412b8748e9524409b6e44b5f28a4fdbba121239e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __reg_map_h
 #define __reg_map_h
 
index e1197194d5c12907e442cec6926401197c2e2d9f..3eb17cfbdc75cbe4262986eba73f47d87151c802 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __timer_defs_asm_h
 #define __timer_defs_asm_h
 
index 44362a62b47ccdb9369c8a241b9e04b61427b3c8..a9ffb7edaf918e4b3e0129674079db0898a62aff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_core_defs_h
 #define __bif_core_defs_h
 
index 3cb51a09dba7119a0b6a9f6cdf9b899e70f32cb2..d1fa172f58f4f52b78e76b37d0ed93e7bb345955 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_dma_defs_h
 #define __bif_dma_defs_h
 
index 0c434585a3f94d069cfd6c3b4d40362e7124ba93..a8d7cc528546bb8dbe6124a772c5fc5420d099c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __bif_slave_defs_h
 #define __bif_slave_defs_h
 
index abc5f20705f7533a90e8b505dd05f9cc2fa6e61d..cc8b20d17237d0ad8abd216f36a648aa581afe72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __config_defs_h
 #define __config_defs_h
 
index 26aa3efcf91bfab6f9119c33739d9e9e1656ef0b..da0b1103b66d44de1dffe87906a1f9115f9c4752 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __gio_defs_h
 #define __gio_defs_h
 
index bacc2a895c2146a120f4b923f7e87883f3bb466c..ea752a2d8ee23cfa16723f202f65fd5dd7ed156c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Interrupt vector numbers autogenerated by /n/asic/design/tools/rdesc/src/rdes2intr version
  from ../../inst/intr_vect/rtl/guinness/ivmask.config.r
 version . */
index aa65128ae1aa2c1fb51359c7a626d0207cc71534..11ebd66585cd5e948b6b25aed998850f50d32535 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __intr_vect_defs_h
 #define __intr_vect_defs_h
 
index dcaaec4620baf2416c11e19192b8408279a2c48d..fb7e20d77591596cfaca65e19ae32825968c6242 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_bp_defs_h
 #define __marb_bp_defs_h
 
index 254da08549863550565b6bb8e9d975d0320a4181..872a7942916aa2e20c396207a8f6b38616cab937 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __marb_defs_h
 #define __marb_defs_h
 
index 751eab5f191cabdfa6f1da4007770817aaec5319..0a316dc36a6bdf5394a0c3839c39408e8b9b7617 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __pinmux_defs_h
 #define __pinmux_defs_h
 
index 4146973a58b318f4762c67662c3120c356654bf1..1bfca2666158403e60d8804b83980cc36d05b84b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __reg_map_h
 #define __reg_map_h
 
index cbfaa867829e9e6211b12394e3da8a44c1ce6057..0ab49edb1c81a0bb0188a344c09a8d1f1ad2ae6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __strmux_defs_h
 #define __strmux_defs_h
 
index 76bcc591921d81b582a9c770487d6669a045ebe1..59c70ba9959bca59f98f26d8ef1d63e83436b2ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __timer_defs_h
 #define __timer_defs_h
 
index d29df5644d3e4114667cf66027ae5cd58be818f9..94328936cc91669de1c5feced65b117230c5d7ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARCH_MEMMAP_H
 #define _ASM_ARCH_MEMMAP_H
 
index 09bf0c90d2d3d59ee924003ce963cc10d9b07328..1d87f1392dc8a7579fdaf518fea1ab9cac5156af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_ARCH_PINMUX_H
 #define _ASM_CRIS_ARCH_PINMUX_H
 
index 015ca5445ddde7705abf9f17b3aafed6a43f2d68..185596c2caab1bb990ae6f6230a9f0f9e110a97a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_AXISFLASHMAP_H
 #define __ASM_AXISFLASHMAP_H
 
index 8062cb52d343220eb596a49a7cc383368e17b5f6..78f975ad42d9db05b48df65761f3e4e3f5595589 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* asm/bitops.h for Linux/CRIS
  *
  * TODO: asm versions if speed is needed
index 3b39589638019746b82c44aef0c401d1163275be..f1fa72a426c2d2d4d384e1016358a895b0f38815 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_BUG_H
 #define _CRIS_BUG_H
 #include <arch/bug.h>
index a692b9fba8b9e2b5549ebda0e57512be92eca7b6..8dac0922721c144bb7561e77db2bcd57017d36b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CACHE_H
 #define _ASM_CACHE_H
 
index 36795bca605e5a92233648de32d8478356fb54e4..0da1c76a2bbc6361eb4652bc68d442b701ef297d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_CACHEFLUSH_H
 #define _CRIS_CACHEFLUSH_H
 
index ea949c60b1905df4349dc009117fa53259277cd3..61b6a4f6a002e9289199202dc046a73a8e0bbb24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* TODO: csum_tcpudp_magic could be speeded up, and csum_fold as well */
 
 #ifndef _CRIS_CHECKSUM_H
index 75ec581bfeadca832c1ae6f2b32f72b501d765fb..2dfdb13e1a9e6125277e86db362c4e8b09b452a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_DELAY_H
 #define _CRIS_DELAY_H
 
index 256169de3743defd576df3e5f119359e228a991a..1c9bf14807db82829f0fd89c257435d0c4c82f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_DMA_MAPPING_H
 #define _ASM_CRIS_DMA_MAPPING_H
 
index 30fd715fa5899e45f8ba242096667b52d23dbe95..e1f7d6d9bfc2969daac67f53212cf6d609189d98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: dma.h,v 1.2 2001/05/09 12:17:42 johana Exp $ */
 
 #ifndef _ASM_DMA_H
index 70aa448256b0ba69828e487ab4ab345f7d07f5c1..88940556c2db6efc2fb69582d6f340c9da51a10d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*!**************************************************************************
 *!
 *! FILE NAME  : eshlibld.h
index e369a7620893230a51894d9aa503fc1c82f00e81..0fa6f03d93e7d506ec3c06c83102df62679b0d5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: etraxi2c.h,v 1.1 2001/01/18 15:49:57 bjornw Exp $ */
 
 #ifndef _LINUX_ETRAXI2C_H
index 8f8a8d6c9653077ea956a60cd25502190e83c2ed..bc109f4a8377bdab2352e10206c75d251484136a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-cris/fasttimer.h
  *
index c7df3803099200c9e3a9a6721138d0fe8b26ae92..e10150073c30953ade999b265f577286ea0e19c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 #include <linux/fb.h>
index fe0b2a0ae03bbdf76e93158148d482f3780b40b4..c92712d30f547ffae94a503fa276bbdc32ead308 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_IO_H
 #define _ASM_CRIS_IO_H
 
index ce0fcf540d622f03bc71b51429b309329a710ab4..6a932f7db58ed759b382824722e9a2fc2dabf442 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IRQ_H
 #define _ASM_IRQ_H
 
index e06ea94ecffd330751210182c29c6c793e15de6b..54da8f64b37a588f9a824ad34d4da37dcf6dbe57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CRIS MMU constants and PTE layout
  */
index 349acfd25d2f6164248104e3390cfdaa24a13b53..178f3b72e9e39bf9ef696aedbc1683827a2e5768 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CRIS_MMU_CONTEXT_H
 #define __CRIS_MMU_CONTEXT_H
 
index dfc53f9b88ec60d49a262f965329882142af43c3..5b5b3dad7484b96e5c9d3fa8358049e070c5ae44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_PAGE_H
 #define _CRIS_PAGE_H
 
index 6e505332b3e36d165a960e222e9593994c7eaf83..6f8b366a226ae1326d87380d31a1c865490f8974 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_PCI_H
 #define __ASM_CRIS_PCI_H
 
index 42f1affb9c2dda555041404be054b9ae5e873f85..d8dc1b834b7da440cf90e7a22dceac20778532f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_PGALLOC_H
 #define _CRIS_PGALLOC_H
 
index fa3a73004cc570b564e1c36a66c644f1d86f0c94..03fca401e23ce36b36b00a433df7d39da9f526bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CRIS pgtable.h - macros and functions to manipulate page tables.
  */
index bc2729e4b2c97e89b5a9dd3daf30df555dee1e0f..124dd5ec7f65eda88760756d39dcb9f5a60ee55c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-cris/processor.h
  *
index 9e788d04a4ef1b9c5d956f578fe4ee53b3bb9c2a..d69295f1a7c8f9b7d12a23ccd5d6fb67bb7cbde2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_PTRACE_H
 #define _CRIS_PTRACE_H
 
index c067513beaaf235c14f8717bd3ce41a3b2529d4d..6ac914b098bfe5fc92a13df5c57ae8c8929cdf5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SEGMENT_H
 #define _ASM_SEGMENT_H
 
index af7535a955fbd9d3d10ca9bc5098e630afc47329..f51e0e10faa7cb3620cba22f8e4d67a2a6e54ee6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SERIAL_H
 #define _ASM_SERIAL_H
 
index d29d122706874227af710a61635734e62ad18fd7..704a7257cb0dbae3fa5d76f4dec2b47ebec252a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_SHMPARAM_H
 #define _ASM_CRIS_SHMPARAM_H
 
index c11b8745cecee2b6899fb8b07ef3c24a1434e8ef..64b0943c0b00bbf388f4bc8318d4054b8b14722e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_SIGNAL_H
 #define _ASM_CRIS_SIGNAL_H
 
index 2d90856943ad017c3a94919a820f298589896916..154f0c90d0fad35ba79c82fa8eff740ea6b76d2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CRIS_STACKTRACE_H
 #define __CRIS_STACKTRACE_H
 
index d5db39f9eea1535541a4962e0a027df0a6599bf8..bae5a0867785917b4010ffdaadc491ca1839ef0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_STRING_H
 #define _ASM_CRIS_STRING_H
 
index 991b6ace1ba9b25886ecb22aee4217ca6cd9230c..5e1d8cf277fb871342fdeabba34e7e8d86faa6c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_SWAB_H
 #define _CRIS_SWAB_H
 
index d842e1163ba1edf1b61b99995007c7a326ba4b37..dde4acf6e54d893ea30dfb93c02524db62a5b2f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_SWITCH_TO_H
 #define __ASM_CRIS_SWITCH_TO_H
 
index 1991cd9e4083dae7b2e2f8b2fcc0b8e67ad49f29..9832bf3221d0a27ff6d1d8fa2ac51021d910e79e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_TERMIOS_H
 #define _CRIS_TERMIOS_H
 
index 4ead1b40d2d743dab304678f2f872762447477ed..472830c90997d53a7cdb01441bad96dc200945dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: CRIS low-level thread information
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
index 980924ae751850c9fea6600ae8bfb28d45d5493e..3840a556612becc86e46d0ade6f3c73b4ea34f0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-cris/timex.h
  *
index 77384ea2f29d6f095cd6b2f5e6a226f18d1a95a4..1f6a8a67cfda12025d23d542015934e3458d3f29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_TLB_H
 #define _CRIS_TLB_H
 
index b424f43a9fd6a41e87b5bbabc16001978c5df356..e7cb964536d04929fd445f10090900c0eec060b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRIS_TLBFLUSH_H
 #define _CRIS_TLBFLUSH_H
 
index b0c6b077b6321e55551eecc3147ee39e416d7e24..3b42ab0cae9371c1172e9ad77d5872b0fa2bc027 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Authors:    Bjorn Wesen (bjornw@axis.com)
  *            Hans-Peter Nilsson (hp@axis.com)
index eed6ad5eb3f24682067063793bcf3fd6c0c0b1f5..22f7e7cf59c83f0cd0ba4282b0604f7be810baee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_UCONTEXT_H
 #define _ASM_CRIS_UCONTEXT_H
 
index 7b3f3fec567ca4fd3a742f2ea6fef986e2ac3fb9..21772cf600dd4c19e15bb659af79ccded5052243 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_UNALIGNED_H
 #define _ASM_CRIS_UNALIGNED_H
 
index 9c23535821c01c37f1fb404b7e7d8d8f11f3f27b..6a92c05051567126834ede0879225e875821defd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CRIS_UNISTD_H_
 #define _ASM_CRIS_UNISTD_H_
 
index 59147cf43cf65d7bbdf9e3923a1bec3f37ecb48c..a19c39547248614a20dae2c4748871772c509892 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CRIS_USER_H
 #define __ASM_CRIS_USER_H
 
index c4b6b0e9b1da0514019fab93f4689341ec126865..2644bcbe4490d09ba3450929c5ccdb1eb9bffe24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*!**************************************************************************
 *!                                                            
 *! MACROS:
index da5c152726524a78926aeeb36c5430efafb5375e..793a4275d26a0ec6fcc0e6f166422e3b535341f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_CRIS_SVINTO_H
 #define _ASM_CRIS_SVINTO_H
 
index 9303ea77c915b54e37f90991203a12af02a6268e..5b9288527b9804a297bf958699107ee3a07623f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_CRIS_ARCH_USER_H
 #define __ASM_CRIS_ARCH_USER_H
 
index 694fd13ce1cfce5203cdfbd9522c3552bcfab9c3..1072d5bf7d4fdf4ed10e72d162c13e63a279c00b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * The device /dev/cryptocop is accessible using this driver using
  * CRYPTOCOP_MAJOR (254) and minor number 0.
index 03fa1f3c3c00b58999c52dcd2b6d05a435e4f0ed..3576b540ba78b338affc0bff42d218bf6ba4c124 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_CRIS_ARCH_USER_H
 #define _ASM_CRIS_ARCH_USER_H
 
index bcd189798e2665191043c150958c2a7d6a9fd479..6e19891e06ee48c5d6e1055dc4c0df5c08b4e89c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CRIS_BYTEORDER_H
 #define _CRIS_BYTEORDER_H
 
index a5df05bfee66cd7376f71d35536735de6cedb021..ea4cbdafe88524cdb21e7bc28a7e0604712caf04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASMCRIS_ELF_H
 #define __ASMCRIS_ELF_H
 
index 3ea65cef529db963c0d5bbedf79265b5fde8d62f..b1515f2684da802878b01ca70e5dad19607769a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASMCRIS_ARCH_ELF_H
 #define __ASMCRIS_ARCH_ELF_H
 
index f09fe49005c01032689c547ad79a255a9373316f..cc00ffdb7f9c18063f7e9a26626d63c5adcfbbb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_CRIS_ELF_H
 #define _ASM_CRIS_ELF_H
 
index 4d58652c3a49b1f75b2b2581cabd1a7597398806..e0c1a6322824168a0962055e28f098ca6e3ca714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*  
  * ioctl defines for ethernet driver
  *
index c6e7d57c8b248dff6d7b0cf57d113c98499852b1..10ab0dd45bfebafc0616b6d9e6034bfa358318f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * The following devices are accessible using this driver using
  * GPIO_MAJOR (120) and a couple of minor numbers.
index 488fbb3f5e842e98bc12f528c94b67353ced747e..92d654ce3d84c99227e128cae1fb188e5f7fe487 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_CRIS_IOCTLS_H__
 #define __ARCH_CRIS_IOCTLS_H__
 
index 484fcf8667c01500fa46d71dcdbef0a7fce314f8..ae296115c7c9166a3f36dab5e9904842a68cc37e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMCRIS_PARAM_H
 #define _ASMCRIS_PARAM_H
 
index 0f22e6a67ea5588d765f1c98515289e508a18001..c75d8b0acc998d444846da06e8313906b201144c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: posix_types.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
 
 /* We cheat a bit and use our C-coded bitops functions from asm/bitops.h */
index bd8946f83ed3a13ffb94c64a53db435b8e32ac67..99de59e5461341763e6a4e19d09bdc436a619d26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifdef __arch_v32
 #include <asm/ptrace_v32.h>
 #else
index 1a232739565e59f77019dce77b06b6a439bbafcb..4ffffb7ab1021f5c50701ee73334a801a220174e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CRIS_ARCH_PTRACE_H
 #define _CRIS_ARCH_PTRACE_H
 
index 19773d3bd4c440bc315cf003cd04aebcc1dfd9d9..a91c4aacb14f0da07f030b2689a515c92e899176 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CRIS_ARCH_PTRACE_H
 #define _CRIS_ARCH_PTRACE_H
 
index ad40f9fbcb8ae7459a43985bc3b9748f30c19022..041d31fa33d5885372ab3bcdc2a06d2cd1a2f324 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* RS-485 structures */
 
 /* Used with ioctl() TIOCSERSETRS485 for backward compatibility!
index b90728652d1a0570bf9d25e1ba15648a86143959..4854ace9db7621aa69d6fcca7b4098d9d8611372 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CRIS_SETUP_H
 #define _CRIS_SETUP_H
 
index a1d634e120df241949ae1b8f67d72854fad7eb0d..97565ce3f0b9a84b7b0bd31a4bd6de5ee945be94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: sigcontext.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
 
 #ifndef _ASM_CRIS_SIGCONTEXT_H
index ce42fa7c32ad614ba6671a81dd1d2882588509d1..e4ab00f00111ffabb055fcdaf9e80d3b3049c4e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_CRIS_SIGNAL_H
 #define _UAPI_ASM_CRIS_SIGNAL_H
 
index 9e558cc3c43b4315597a829d672187e27d16a174..cdb74d5862e41f14306c6a81e711a1318c70e439 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CRIS_STAT_H
 #define _CRIS_STAT_H
 
index 7f827fea30e7bbabf54cbb33115ac0d9287abfef..f2d468889ba9e8cffaa87d06b049b1047799c4b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ioctl defines for synchronous serial port driver
  *
index 1c43bc874ccf2202e41800da881377f4d5b43078..86925dc1fcae06a467f684fa2dd0de273cb3cc40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: termbits.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
 
 #ifndef __ARCH_ETRAX100_TERMBITS_H__
index 0a0386a55027ae9fe369829e3b1e3aaf4f21d656..d87800a6d854d52738a3136d0f76793b3e5a5879 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_CRIS_TERMIOS_H
 #define _UAPI_CRIS_TERMIOS_H
 
index 062b648b27e1b1c707d620cce8615b766e2d30d9..7aba513b082db75d18eef2d35fed23373d4b743f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_CRIS_UNISTD_H_
 #define _UAPI_ASM_CRIS_UNISTD_H_
 
index 5fae398ca9152749155b4e5f3dfd0209a9cab832..af075a5fb9aa82593af9d9d8f8bf32a7e59e2ae4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # $Id: Makefile,v 1.12 2004/10/19 13:07:43 starvik Exp $
 #
 # Makefile for the linux kernel.
index a5fd88d816a6c590d145808eecdd7196b9a4ee72..0a512994148578e1f2ea0077bda22f981ab08d6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kbuild.h>
 #include <linux/sched.h>
 #include <asm/thread_info.h>
index 3166d1cf2f84a0149b8698c3691a2ab56601a2c2..7024f7278c899ba4e87572517bb1d7adaded3ad5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/user.h>
 #include <linux/elfcore.h>
index 53ff8d73e7e13c7ed63a00d07838d55ed9ad30cd..36e1c658229fadd8cf28f7fac78ab00d742421ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/printk.h>
index 09b864f46f8a760d1b814cb9b78bfa92ca063938..726cdf4bf2d82cfe13a94df75281f5c66209e122 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  *     linux/arch/cris/kernel/irq.c
index 0bbd3a0c3d7087d6f7fe7fb9b66fea5a0f9f0c9a..50e5cf09841d6f62a985ab6b25357db1e75e116a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/kernel/process.c
  *
index ad56b37f8e11b204a856854d9e4e157706908475..d2f978ad129aa7794a9920f14a014c0dfc502a0f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
index 806b764059d5c6a4cd5c8b7cd51b01419d7ad74c..af42789a15448248345c7acb9f10cf85a8858fe5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/kernel/ptrace.c
  *
index 4b4853d914e275c18753d50092ccc78494f1575c..524d47501a236cd29dac9759d33e71be323a245e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  *  linux/arch/cris/kernel/setup.c
index 8febb032fdd783abdd365c539bcaef8c603bebc4..ecea13f1d76095e369ca68808f5d92b4191fe663 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: sys_cris.c,v 1.6 2004/03/11 11:38:40 starvik Exp $
  *
  * linux/arch/cris/kernel/sys_cris.c
index bc562cf511a6305ebef1feebd6d98bb65704fe10..593239274f980d5c56226051c562591c56b2b401 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/kernel/time.c
  *
index d98131c45bb56ba712d46659c7cadb68eb8841df..d4bc80469218b60662e9ef293cfebb29f6dce6b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/traps.c
  *
index 867f237d7c5c361a8bd02c2cb28d9f35794532a9..6d1dbc1ba7671ecf60578af8e5bf2374785d21bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make the Linux/CRIS kernel
  * Authors: Bjorn Wesen (bjornw@axis.com)
  *
index 1fca464f1b9e75d85e47b323d785add006dfd131..29cc58038b98c0683b9375bd12e51fb8e0c3ffb9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/cris/mm/fault.c
  *
index 1e7fd45b60f82af0beefb2c609151a3879a2b6a7..e41d9c833e1c537bd70d50cdf60600c22b8bd16a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/mm/init.c
  *
index 80fdb995a8ce406abcfd207a5faccd28094a8636..350bd2a86ade2f273b0d0b96ed508eeddc265a4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/cris/mm/ioremap.c
  *
index 8413741cfa0fbd9a7257fe14b52e5bfecab7e3eb..e0dbea62cb81d9761abd86d9bc9be06eb9302a11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/cris/mm/tlb.c
  *
index 1cce8243449e03da1855e39c180e9a459bb3ccc7..af369b05fed570620f726043b468724ec6f9a90c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config FRV
        bool
        default y
index 98c99a3ed2be6b7233f872a44536896aa51bca6d..ecab6d8a79ed810764457e86fc1abd8bcfbe3001 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index d4912c88b829dbd8115ad25336101cd47d0f8567..ce3b8a4efc1277f3564fa3a95a12cc584407860b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <asm/spr-regs.h>
 
index 354900917585a220fe840aecb4b2a081616f6d42..273defa02a025e84e7255a7afe884648264a35a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_DMA_MAPPING_H
 #define _ASM_DMA_MAPPING_H
 
index d73c60b56641bfa9d4b06e53d216481f2284f8fa..2f0929333f911688133c78aa162aa6725f38f9f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_FPU_H
 #define __ASM_FPU_H
 
index ab346f5f8820a465f681f8ea54bf32352b7d45ed..dfcc3484231d44b4d6c3f41b2078bb5cccf81fa0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FUTEX_H
 #define _ASM_FUTEX_H
 
index 43901f2209637b2aeea32905389f62e2217237bc..0849db1362d671901155847b3ad7527bac18768b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
index c27bdf04630e2749a61139ff662a22b9251325c6..259ae7b041a78f3dca1f3603355e94f37bbd129d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_LOCAL_H
 #define _ASM_LOCAL_H
 
index 0c8f731b2180e06a8c5c1f227524fa360d0318d9..8af762dd61093bf5566bd93a9c57f3368da125d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MATH_EMU_H
 #define _ASM_MATH_EMU_H
 
index ec5eebce4fb3c127ed912bee838aa2f389d8df90..0f76a0d586f66e36904ea4568d0fa4f56fe66d12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PAGE_H
 #define _ASM_PAGE_H
 
index 2cad3f874dedea8e4e6d697c9c3cc15d50edadb6..4209fe5fe0a2360b3d22fefb6dea23a2fbe55512 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PERCPU_H
 #define __ASM_PERCPU_H
 
index e4d08d74ed9f8dc4f81140fcf60442378f02cf58..021cce78b4010d7b5c727d1e86812f85e81671bf 100644 (file)
@@ -92,10 +92,6 @@ static inline void release_thread(struct task_struct *dead_task)
 extern asmlinkage void save_user_regs(struct user_context *target);
 extern asmlinkage void *restore_user_regs(const struct user_context *target, ...);
 
-#define copy_segments(tsk, mm)         do { } while (0)
-#define release_segments(mm)           do { } while (0)
-#define forget_segments()              do { } while (0)
-
 unsigned long get_wchan(struct task_struct *p);
 
 #define        KSTK_EIP(tsk)   ((tsk)->thread.frame0->pc)
index ab711009cfaaa557ce8c3cea74cb5e936792b19c..50ea51f26c46bd870f9d4903983a28af6435c9c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SHMPARAM_H
 #define _ASM_SHMPARAM_H
 
index eca0abcb79d6efb7ee2909174e97218d35999ffd..796394113904a10c45d6bf2d2332b65e56a46d68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SIGNAL_H
 #define _ASM_SIGNAL_H
 
index 38349ec8b61b4f69692e900e6f28d1504cf2061c..0d7fa409312d872bb7ed754866b2e683ac750d6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SMP_H
 #define __ASM_SMP_H
 
index 9f753fc0953217dbd0f5b84d7ea46552249b4ed5..5a8c63554617cd5cf2ed0ec1196d92859a1e96ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_TERMIOS_H
 #define _ASM_TERMIOS_H
 
index 139093fab3260debefb4da2fbd33e37778784298..bf53166f2793413c6bc4fafe38ba81854a323fc3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* timex.h: FR-V architecture timex specifications
  */
 #ifndef _ASM_TIMEX_H
index cd458eb6d75ed113469d257d62a901ffb7f18701..d3e361ad725afb20befedb0e72b9b2aaae389c60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_TLB_H
 #define _ASM_TLB_H
 
index 94272435270552b4fe0b266c00796ec1aa4fbd9c..207603071f7813c7d5215da79def84303a95f77d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_TOPOLOGY_H
 #define _ASM_TOPOLOGY_H
 
index 8d8c0c948007a8149f4bc42ddf2e6b24529f5dda..0cc2d95dd209ce374fa3777da9ae6d14a0260724 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UCONTEXT_H
 #define _ASM_UCONTEXT_H
 
index 17b5df8fc28a1a932ba530565adfdcde63eff170..b4b3f9b26b813b5f1e8ec3f2b406d3f91d4386da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UNISTD_H_
 #define _ASM_UNISTD_H_
 
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index f29b7593e0882c440decdaa880a8425c22f0f590..a46f6472acdce8c5817ad0ed03e2584aa82c20c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_BYTEORDER_H
 #define _ASM_BYTEORDER_H
 
index d010795ceefec7b98f43ad50206e8e4d1a2fe915..c5b82f2f2970a258adc37a89f4b9900459c6d9c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ERRNO_H
 #define _ASM_ERRNO_H
 
index 46ab12db57397dfc44a7aa84f9c10ac5e97509d9..a77648c505d1784915fc69283e7448b24b471c1e 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/fcntl.h>
index b279fe06dfe5bea925eccf4b39c8908b23379b6a..b809c4566e5f8b119f98aa55173938912203723d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ioctl.h>
index 2f9fb436ec3c6c47881e0aa41ed4533435aa0536..dd9f5eb9fedab12b30d689fe395762371fa8714c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_IOCTLS_H__
 #define __ASM_IOCTLS_H__
 
index 84c7e51cb6d0befd2b3c013c8bbbbaad6ae02297..90d6445a14df81c369ea5e0b04f0d48086c10a7d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ipcbuf.h>
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 8eebf89f5ab17884a98543f3b37a3b710355083b..306fc0460b800861b885674420275436a55ca4c3 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/mman.h>
index 97ceb55a06fb778e1ce326c4ab3a6f4a9ee86ab8..156c81bb46d711aab157abe87a47d940447f3159 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
index a52dca9a956660eb1656ad201cbed950db4f305c..d3e0168d8937e3ee711e06b3a9f54d1ab15d0196 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_PARAM_H
 #define _ASM_PARAM_H
 
index 0d01479ccc563eb133518052a69abad68b9750cb..887b672883400d5d3a3aaafafe94908f0864b004 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POLL_H
 #define _ASM_POLL_H
 
index fe512af74a5afbb57dbc1490214155cdbbeb220d..2995777227b33ea21c9542e6487041b13366f29d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POSIX_TYPES_H
 #define _ASM_POSIX_TYPES_H
 
index 3887e4934683ed5c08715dbce4fcaea3606774c8..f1d2f652d083df65e24918f1ceaa32a3df08b7b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* ptrace.h: ptrace() relevant definitions
  *
  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
index 9666119fcf6e2429ee6849a062d12cdbe3e83d94..4caf09b6c193fbeeb1bc148077ae0101213a99bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* registers.h: register frame declarations
  *
  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
index 5fc60548fd025a7e1c082fdd5319dcc3369ef8bf..2100305f9b3e060645a02b2fa00497fcbb62080f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_RESOURCE_H
 #define _ASM_RESOURCE_H
 
index 164b12786d6d7672f7f4a30e8f94c46e33c4b2a2..d5477f95832b13482d6d2594dfb3ccfdb95ead28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
index fbf3fc96aae96816bcb59d4e6b90ce7f1f708ee9..f54957047900bf6233b92715e3500f51fda932ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* setup.h: setup stuff
  *
  * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
index 4c6e711a47798646bda682006fa0a06fca71f837..1de8f892e41277db85090127d90924762f5da200 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
index 3b263f3cc96f6077867e559df91d35c6ca9d2e53..8fbb0b00afdd83d74df2cf29105b2cccd01bc1c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* sigcontext.h: FRV signal context
  *
  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
index f55d9e0e906805dcc5590292d23368e270f2f7b4..4c8c975747ac341152c0719bae5476807e051e5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SIGINFO_H
 #define _ASM_SIGINFO_H
 
index bf3b162f9beaa46cf3cf19a1021d361c9b3e7c72..603bb796cf46811b0874d582c9f07b0035eba6ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SIGNAL_H
 #define _UAPI_ASM_SIGNAL_H
 
index 9abf02d6855a6d28a3cb4ce8b263662be46e02ed..9168e78fa32ae16c043814de33c0d728ed32e40c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
index 5dbdd13e6de344f32dbe68ef3f93479854bcb061..2f62caf1ce845d6c41a6819a478d9e0af3523cdf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SOCKIOS__
 #define _ASM_SOCKIOS__
 
index ce56de9b37ba60eb19b13e3fcf245c3b09ed140e..0ff9fab915a49681e511dbda3a46ce6c81b69edb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_STAT_H
 #define _ASM_STAT_H
 
index 741f586045ba1c9916df2d09b5832dbe2282c719..2a378cbff07f9a02a64c8a27e275f074a2a61fe6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_STATFS_H
 #define _ASM_STATFS_H
 
index f305834b4799123df5d3e1efeb499ef13336ef8a..c78257d172e516cc3485d5a223770ced89d11931 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SWAB_H
 #define _ASM_SWAB_H
 
index 7722e19cc349b2058ac02eb065df8e8a476a61d4..b1dcd8d0ff78a69b859e043cd1a41123c993cb47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_TERMBITS_H__
 #define _ASM_TERMBITS_H__
 
index edcc08a22382bfcdd76536c5d2b93278a3bd1a81..ae35bedae6a2eccb3e46f58765b5907a040b0b5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_TERMIOS_H
 #define _UAPI_ASM_TERMIOS_H
 
index cf23149943f9536c2a2d59b5e36baa845b132d2f..db74ad9ba6c075705194721822f12f6723502794 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* types.h: FRV types
  *
  * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
index 9e2612ff1c9d2a44c649eb6e5b8c3471c7920c8c..4b46acaf832b3dd0f90d65866b6b0607bc3755a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_UNISTD_H_
 #define _UAPI_ASM_UNISTD_H_
 
index 3cbb3294b9f9ae61022e1c38cdf5799f48e34a6e..216ddf30c3c10ca1352252dc56d0d9aa6556bf36 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 20c5b79b55f9bdafb53423488b4ea7761ce0d548..0a468e9b51add897d2307582b4a8c910952d1bab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed
index cdb4ce9960ebe229e21dde50c48be6e13b617f0d..6ea430d58149b90a626093595d17cee4dbd98073 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/linkage.h>
 #include <linux/sched.h>
index 3f44dcbbad4d5b3605d2b088c154d36db531cf00..42806c512758e7ad821747df87645be43beb58b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make FRV Linux kernel
  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
  */
index 4d1b887c248bda4e3af585aacfa0fc5f97caa279..3027576f7782b515c31afc78b99813c4b8b2320c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/export.h>
 #include <asm/atomic.h>
index 21f1df1b378af0647664113f18734dd45ebb24c5..bcb03ebb3583b05327bfcc31a532a73953346900 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the MB93090-MB00 motherboard stuff
 #
index d51992ff5a61b601a98b69d59af4f0f469e268ea..41fbb6bae558dc1c1f6236d111efb8ad5edc513a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Low-Level PCI Access for FRV machines.
  *
index 1c35c93f942bd17967e68edd8c07692107260a91..a40aa8663056ff9bbd141ea69938ec7dbb799f8f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci-irq.c: PCI IRQ routing on the FRV motherboard
  *
  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
index 9198ddd16092107e98aa2a94d89fade42fe41dd4..77c0c5ba88bc1d4e4c96485a96620cc814c253e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/frv/mm/extable.c
  */
index 179e79e220e569278e6cb131d96307c5c240c8a7..cbe7aec863e30a450985c7650b7f31baedf4453d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/frv/mm/fault.c
  *
index 3089f7fe2abdb2aafa7bb613c45319720ea77a4f..f8d3fde0819092e651969a07791d487317a1f973 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config H8300
         def_bool y
        select GENERIC_ATOMIC64
index 8d0ff20c749a1acdb4a2573d7993a4977e632f44..b5e14d513e6229a12698683d66062a4820482ba6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config CPU_H8300H
        bool
 
index 2f6393a5da57b2fa868309e43feaa87db1f69a7c..8e62df20ebf91c41ad55cec68bf56e4936e86957 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # arch/h8300/boot/Makefile
 
 targets := vmlinux.srec vmlinux.bin zImage
index 613bfe6f52727d5739e25a6a8102ac1b5b041ac6..9e2701069bbefb035b425f0790d46730156c5cad 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/sh/boot/compressed/Makefile
 #
index 0436350c1df5813950ef04905581a9b07993e8aa..11ef509579cfa651ca3b087c38a97e0ada253fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/h8300/boot/compressed/head.S
  *
index a947dbb4fd91d815f478171ab005a2e8c1e433f2..8915d8fe2e536c3628daf45b7030c7611c58242f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/h8300/boot/compressed/misc.c
  *
index ad848a72fd3f4e80b9586dbbd43b065713b8db40..7f7bb419ce153adc8435c8faa786e381e6a70ee7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 SECTIONS
 {
         .text :
index 6c08467c6a3ab56e9c3b6a323421f7fd2b706317..14593b51b2b245a27215da4e98faf1df6f50016d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_H8300_BUILTIN_DTB)).dtb.o
 endif
index 6ae884bf66a5268c9dba08db6111df7dc9f40d06..d1733805ea67a5aa68a06631ea71512b0c132efc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 / {
        compatible = "renesas,edosk2674";
index 9c733d920f1f0dc3eab70dd53e76d22a4860c3f3..f1c31cecdec8a2e1be00c741d5bf40bf81f8c4e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 / {
        compatible = "gnu,gdbsim";
index 97e1f4b17ef067d5f10738e8aed5983359ce61c4..932cc3c5a81bcdd2753681d671c5214c19d2fff5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 / {
        compatible = "gnu,gdbsim";
index 349a47a918db7252229445838357990d7ce8c598..941e7554e886aea0339a19acc2823299cde3501f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_H8300_ATOMIC__
 #define __ARCH_H8300_ATOMIC__
 
index 05999aba1d6ab3647ad67966c6b984b8de17e053..ea0cb0cf6a8bb2ed519a6176dec51ef92b77d1b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_BITOPS_H
 #define _H8300_BITOPS_H
 
index 1e1be8119935b5e47bd2818883fbdd926e415274..00fe5e966bb5bf19659fcc59e27e3e24585908b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_BUG_H
 #define _H8300_BUG_H
 
index 888478a381452118e37385ad35fbc54b009b70cf..ecff2d1ca5a389b82614600464f0ab70981a766a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __H8300_BYTEORDER_H__
 #define __H8300_BYTEORDER_H__
 
index 0ef1edc5a6a62e33cd63f51e1cc3b6e8da065000..4243eb319acf3f0050a7ca7db222085f51bcc139 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_H8300_CACHE_H
 #define __ARCH_H8300_CACHE_H
 
index 95fec4cd10810543c5baa40ef2eb7e861d2140ab..c64bb38ce2428bde959432b14a772c6c4fa1f638 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_H8300_CMPXCHG__
 #define __ARCH_H8300_CMPXCHG__
 
index 847c7562e04607c19324ad7c8f720dcf8c9e4503..21bb1fc3a6f1a401badf2004b1041d61e794906e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_DMA_MAPPING_H
 #define _H8300_DMA_MAPPING_H
 
index 09031d0127a3c993b9f40e940deb0b70fb07605a..029647cda44c99f97644743555e62e9e4c2c8ab6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_H8300_ELF_H
 #define __ASM_H8300_ELF_H
 
index 7e0bd6fa15324495ea5875fd3180c7f8081c54e3..f4cdfcbdd2baeffaf2206f4b0c8218589d37ca6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/h8300/asm/include/flat.h -- uClinux flat-format executables
  */
index 04cfbd2bd850905d8a52a109e510dae937aac41b..2960b4c9e4edf0cb94d079a1450a0446413b148e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HASH_H
 #define _ASM_HASH_H
 
index f86918aed9e1181e3dc2546a1b0520f814138164..096d99580db66be5269050c6b407a4839b6a8762 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_IO_H
 #define _H8300_IO_H
 
index 69f23f0981b3b82f2ffe0643337732dd259d6d7a..5fc5b436dde9827fa8075cc5f61ffee8c87f48a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_IRQ_H_
 #define _H8300_IRQ_H_
 
index 5e1e3242e47035c948cdfe89e99c57a423e659bf..48756b7f405e252c1e8a0925402d31fd3a71e19c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_IRQFLAGS_H
 #define _H8300_IRQFLAGS_H
 
index 3a987a567258fb21e835c1d32b37ebc7f5329ce9..8da5124ad344025fcb801c7eb1c3f379627f8442 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_PAGE_H
 #define _H8300_PAGE_H
 
index 0b2acaa3dd84c266000880ee604218fd4547a78b..7c9e55d622158ed778bf5ffd15bbd2b61024f50f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_H8300_PCI_H
 #define _ASM_H8300_PCI_H
 
index 7d265d28ba5eecd2a6770c2dd161253b1a9a89b6..a99caa49d26563ff6c69c37dc45a128356b0a04c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_PGTABLE_H
 #define _H8300_PGTABLE_H
 #define __ARCH_USE_5LEVEL_HACK
index afa53147e66a82e24d8d9e100b4706a9ce2ee760..985346393e4aa2122848144ca72cb58823b55a39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-h8300/processor.h
  *
index e693fb463ea8ef481ee901deb34f9599b42f1781..313cafa853807866927bbf7f0a792e521f4b3fd6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_PTRACE_H
 #define _H8300_PTRACE_H
 
index 48424c6e169f6f6d3b720a4773240f1b479a1447..9adbf7e1aaa395e4337ab3b2e5e4729db9c2dc2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_SEGMENT_H
 #define _H8300_SEGMENT_H
 
index 5870835c0470d429e88de2a8568e6c9f907b4937..a42f32ca530f31cea994474251d07f9aff2028cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_SIGNAL_H
 #define _H8300_SIGNAL_H
 
index 5dc5a8ac054453bcd87e5de55d8d9fa6622017d9..78e45bb2fef0dae2c2bed5dc348c3c54b9323182 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_STRING_H_
 #define _H8300_STRING_H_
 
index 7ad1bf92dbc312c84bbea0b9acb380cd0344eb28..2b7e9555bcd16e3f9fc364c0cc8da23bd3168efd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_SWITCH_TO_H
 #define _H8300_SWITCH_TO_H
 
index b41f688d02cf55d3ec821cd566b543a4e3724010..924990401237126585ea8fd105e4b57e8f9e5b24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_H8300_SYSCALLS_32_H
 #define __ASM_H8300_SYSCALLS_32_H
 
index 3cef06875f5ca32930c06b07db027e86f362ce94..072b92c0d8b5017f666605c7d29f4797e10db583 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: h8300 low-level thread information
  * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp>
  *
index 2c6fa4eed448acd222d6b67e99f7fb6e7eea90b2..98f344279904a684d367c4d55556c06bab3e74ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __H8300_TLB_H__
 #define __H8300_TLB_H__
 
index 6f6144a240ce851fe4c62e078591a7e728f88a59..bc8031949d07b3de3653939e71425100ed7482bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UACCESS_H
 #define _ASM_UACCESS_H
 
index 2e3555f451f088a3054f2b36230e16b994ef9af6..2298909f24c633da17559f65dc3e0ede2e677b88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _H8300_USER_H
 #define _H8300_USER_H
 
index 34212608371e9c48874a337f8b8b7c72282063cc..a33e358f1c1b42a13a4b949f8419649934bee48b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_H8300_BITS_PER_LONG
 #define _UAPI__ASM_H8300_BITS_PER_LONG
 
index 13539da99efd7477631db1fa549cfd136dff9ee3..1fe2f93444584a7d26aa886a88668011934e3ca1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _H8300_BYTEORDER_H
 #define _H8300_BYTEORDER_H
 
index e132670d70ec52d01daa60a33d3df4ca5194f1a0..78167f517ca426897395c0b7d024981a9d312173 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_H8300_PTRACE_H
 #define _UAPI_H8300_PTRACE_H
 
index c41fdaa04657caa18808a0a2cac0eeeda6854848..f77273c857d7061ae6e93f5433d57457ac102aef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_H8300_SIGCONTEXT_H
 #define _ASM_H8300_SIGCONTEXT_H
 
index af3a6c37fee68f7ce22e43ba076d75ce46ffd2f7..e155210373487eab9c1c655de2d1559dae28d5c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_H8300_SIGNAL_H
 #define _UAPI_H8300_SIGNAL_H
 
index 253f8e322ecc7ccddf59079694d6dad02448322e..b62e830525c67d162ee7b4036f9800308da13267 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index dc2d16ce8a0d5c78acb9689428aa6fe25d3453d7..85e60509f0a839e9bbf678674d3f1f273ac80359 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This program is used to generate definitions needed by
  * assembly language modules.
index 4f67d4b350d520a6ce1b293133490bb1f221c789..4ade5f8299baed742c24b839d5bb3bec867b3d78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *  linux/arch/h8300/kernel/entry.S
index a9033c838968b2a9fc925476e39823df55fc18ce..1c6f902e82a5f81c6d3d584156d4a802715b600c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/linkage.h>
 
index 84ac5c3ed31a8aac089a2f7bc0b313b42acdd937..dbf8429f5fab5f91071242a059f159fbe92c0c62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <linux/sys.h>
 #include <linux/init.h>
index 9868a4121a1f3f680a145d1df45a062999cd2b84..ab55a9cb2f367cf2cdbe9c2dd18c845b70ca5a82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 #include <asm/thread_info.h>
 
index da79f95216993fd7eca5d2cbde35672a62bfd961..834e4d7b1bcf8aad6d809342894fb74725642c43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/h8300/kernel/irq.c
  *
index 515f6c4e8d808af2d0d31ba14d146beb8f2c8c39..cd802cc78d977a3cc757786a62d638e58183bee7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/moduleloader.h>
 #include <linux/elf.h>
 #include <linux/vmalloc.h>
index d1ddcabbbe8383fc6160db3946a334286676b5ae..e35cdf092e074353bd64856bc46ec6c6c0fe55b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/kernel/process.c
  *
index 6be15d6346505394988ca75841ac3da1196435f2..a4d0470c10a9ff98356ca33ff68152e072865c74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/kernel/setup.c
  *
index 1f9123a013d30c4f50d898938ddeb5ff91609b94..9022036fb3d2d17efcfbba9f78eed4f77124772e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/syscalls.h>
 #include <linux/signal.h>
 #include <linux/unistd.h>
index 7f11da1b895e1351fd93af0804ae228212bd57cd..35716a3048de0b5da2a88fc03449c9d27cbe274b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/page.h>
 #include <asm/thread_info.h>
index efda749db03eb199f73470d0cf5f1beedadb0d67..6e1a4ed3af53369871ac530a282953bea89c20d0 100644 (file)
@@ -1,3 +1,4 @@
+;;; SPDX-License-Identifier: GPL-2.0
 ;;; abs.S
 
 #include <asm/linkage.h>
index c6aa8ea5f4be2fb40e696a44a062d970ea09bef7..430720c0c5d874eae9075b0579f062764530c695 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 DWtype
index 070adf96d3b6a5fd83539aad309e10b90dfe9e57..2c6cd424eb3e33d25506f4766d9f49e003ef3250 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 DWtype __ashrdi3(DWtype u, word_type b)
index 463f6b3afb523c573b0082428a92582191ac19a1..f4277529a9b94b7d7e4e115a1bf167644febd0d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * delay loops
  *
index 468a8f78197a1b97b05fd75b37070d40973b4a40..b8bcf7035ff58b1317760d0a119331b818341c24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __H8300_LIBGCC_H__
 #define __H8300_LIBGCC_H__
 
index a86bbe395f178604706d982ec77b960c9b8bde33..8dbc861ca58961b093b54681d2507a33e558eb47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 DWtype __lshrdi3(DWtype u, word_type b)
index 0c9a51fcdea1819c1d21503384f03c5f9879bac5..f1cd67d5e3ea68e165402673f01bab686bc32b81 100644 (file)
@@ -1,3 +1,4 @@
+;;; SPDX-License-Identifier: GPL-2.0
 ;;; memcpy.S
 
 #include <asm/linkage.h>
index 18d4e709b5f4bb7b6b046f9e11a1bcd44fa3e5d7..2d1abc37fd08b0a78856190fdb00e41f4a264fca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* memset.S */
 
 #include <asm/linkage.h>
index c803129e877f47e3de568956e83e594f3662d9e2..9e33ab0456c7501d89e9fedba025b50e1ed584ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "libgcc.h"
 
 ; numerator in A0/A1
index 68b1dfc32824e00db913419f2334cbad0a4cd750..bdc8a002921df129a5ff9a584b87a96035cb483d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "libgcc.h"
 
 ; numerator in A0/A1
index 7905122435311be7ba3ac62bf4fa829eb82678d2..9cb11b134e546d1db14089e6887d72d0f88be035 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 #define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
index 451f0e0538ee6d5f10f69f2c68524f3cc4c1c678..5a062fd298d128b0d7f505655e908448b6557388 100644 (file)
@@ -1,3 +1,4 @@
+; SPDX-License-Identifier: GPL-2.0
 ;
 ; mulsi3 for H8/300H - based on Renesas SH implementation
 ;
index d00396a378f41008a6db30b050b99679a0dc3910..8b65d7c4727b280ee30b406a1091642683369f04 100644 (file)
@@ -1,3 +1,4 @@
+;;; SPDX-License-Identifier: GPL-2.0
 ;;; strncpy.S
 
 #include <asm/linkage.h>
index 772399d705cbe920bdd4dbe39f1be6b153463b5c..9f646885f3d7698250bd69c97fbfa056f7194ac3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 word_type __ucmpdi2(DWtype a, DWtype b)
index bbe65610f316854f2099b831f9208a085f469344..b810aba8e1009603c5cf07b88ad3c5ebd3333f4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "libgcc.h"
 
        ;; This function also computes the remainder and stores it in er3.
index 5924ff555ded40ed7d4e1919bdf744e7cfe90083..fabffb83930af24e214d27637eb90deb976492d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/mm/fault.c
  *
index 495a3d6b539b107718d35a3356d090908b33c08c..eeead51bed2db4dd080d7b7b32da869c0aee451c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/mm/init.c
  *
index 4974aa40bcb874c26fb1da7785db54861e3d8920..3785f72bf3fc9f9135bdf6cd75c67ee611160601 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/mm/memory.c
  *
index 1941e4baaee63fdd360da51e6a8c607132addaaf..76d2f20d525e3e08b7ae50291587acd0d61dd115 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Hexagon configuration
 comment "Linux Kernel Configuration for Hexagon"
 
index 207711a0fd0c3a63220675a3752b636a33f6e762..48fe08230a8088c669822a5ebb05e705318644ae 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #  Makefile for the Hexagon arch
 
 KBUILD_DEFCONFIG = comet_defconfig
index 34013683d123e06742d5e438a448db08fe607f6f..4a23e527d6510be9a2a32fe7bb1a317cd5bf8587 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 generic-y += barrier.h
 generic-y += bug.h
 generic-y += bugs.h
index c607b77c8215d2995e2f30f1df5bcf497bd1e65b..c889f5993ecd35f1646e06fa1fab846860655ac6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HEXAGON_FUTEX_H
 #define _ASM_HEXAGON_FUTEX_H
 
index 4a658151383d2538357e3c1e0a57bdbdc37ba186..5adca0d26913e0b4fa2fd724d7765df316454696 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index e31f3f7d9a455feee14ec3af79aaa31533bda862..1364fa4b27e8251be140db5f8a0ea821ff921604 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 5cec8c0417fbee62ae36869cc44dd7172560b237..a1283866d59952f2a4b319ef5fac671e1981aece 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 065e5b32313f1884b76365cba3e002d297ee3612..f79de05b8689bb5498151e9597ff64f1c60381a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Ptrace definitions for the Hexagon architecture
  *
index e7be31840a90330d2abc472eceece6e3d15926df..d51270f3b35821100e36851f6dd80242d0322cdf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Register definitions for the Hexagon architecture
  */
index 7e3952d6221cdf68ac4abf87275dc5d1b9496d2b..8ce9428b15832649513211593248487a90fa79f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index b6ba5369ccc69131ee3b4c53e74f54c7853683cf..7171edb1b8b712b1c2e3352ec86ba6001f80dee1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 24b998888916a663659f0f4f8fa0befc88f40cdd..a08fc425387d410c2cd451e471ff572c14ac2ed7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 9069e9247a2e26f476dc960b80008859f8bdb801..b39f12104da43b9ba35e9ef63726e798a4edc3ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 21517600432b42e529ea9a1bc2fb68771e97b16a..ea181e79162e7a14051e565f40caa2d77d4657d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Syscall support for Hexagon
  *
index 3dae94d9ced754f339dcaec3daf6044164847e05..7327ec59b22f54f334b213a3155f93186d4bc019 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef HEXAGON_ASM_USER_H
 #define HEXAGON_ASM_USER_H
 
index 009228b8611ca0483f221250d6c57c56ce341b87..fae3dce32fde81fc7767fe25a78577726fbe1156 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 extra-y := head.o vmlinux.lds
 
 obj-$(CONFIG_SMP) += smp.o
index 6a15083cc366df9c13962206952d266625034c7f..1efc444f5fa1a5120108c094cbc72ff124e298a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PGTABLE_LEVELS
        int "Page Table Levels" if !IA64_PAGE_SIZE_64KB
        range 3 4 if !IA64_PAGE_SIZE_64KB
index 4763887ba3682112f5fe5020622391c81c830d73..677c409425df238cd51d6ca1eac259c9e14a2c94 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index ae16ec4f630821176721c21c9215021add9d672c..e7f83082547009e3d5fbe3ddc339ad254cc2f3bc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # ia64/platform/dig/Makefile
 #
index 98131e1db7a091cc53561cab79a388aa02ac15aa..cc14fdce6db6b783b7e880766f9983f44fe4d73c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Platform dependent support for DIG64 platforms.
  *
index 0310078a95f8a8a78bf360cc7aa7d0f6680a11a0..63d8e1d2477f746c8ddcde400c42200e86615376 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2004 Hewlett-Packard Development Company, L.P.
  *   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
index d84707d5520343876312a76bf15ee68ba6117445..56fb4f1d4f7c7c501567f41dd9e18f17da89ff97 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 menu "HP Simulator drivers"
        depends on IA64_HP_SIM || IA64_GENERIC
index d10da47931d7d56d8ab39e914434f6f717545778..0224a13d2c5b88efafe94aa183e6a598d2316ba2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # ia64/platform/hp/sim/Makefile
 #
index 8808565491fb51b6d8e5a949d580d08646da8095..a7d178fb41e8f5360824fe06a1589909b681bfa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1998-2003 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index 28f4b230b8cbe44aea2dad385ab2b3e2d54811b3..6d804608dc812e4246af9ac7ed117cd0f4799cba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/ia64/hp/sim/boot/bootloader.c
  *
index 3977f25a1265031979ad807a961cf06862ffe1ee..f3f284d6514caf7c934ff0ae398bcf5601e683c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 OUTPUT_FORMAT("elf64-ia64-little")
 OUTPUT_ARCH(ia64)
 ENTRY(_start)
index 87bf9ad8cf0f6ee9015de1ec0253fd994fc7f0cf..517fb2822e04b2ec365f9a5649f278b4e520836c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PAL & SAL emulation.
  *
index 3b94c03e43a97381f643f71c16fe78a53695ad37..88752c7509e04dd91ab93388761f0b8f692482f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1998-2003 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index ff16e8a857d1267c4c252b196e44f9d0198d2e41..44b4d53e1689cee99eee576daad6abaf5ef5dd1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/asmmacro.h>
 
 /*
index 01663bc42b1a25e8c18d72f93f6ec318ac5d10fb..bffd9f67a8a17b13ee11d7c29331ada9400cad7c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Platform dependent support for HP simulator.
  *
index 0aa70ebda49dde6e178713c149e496fcc149d067..2f1cc59650ab58a1ae6ab8b2cc9ab484c7713bf8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Platform dependent support for HP simulator.
  *
index 664a5402a6957439d733801a862c49cec7faa591..41d21d51dc4d0b5697cbbffaf81523ae7291a7fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Platform dependent support for HP simulator.
  *
index bfa3906274b396de2f00c83c440adcbdf78d4681..6fd97a487811ab32a9b965bfc4d0d1383ae374bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Platform dependent support for HP simulator.
  *
index d1b04c4c95e308061c1292d09f0e6642489abdd7..f39ef2b4ed72a3f25193404fa69363624f17ee6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simulated Ethernet Driver
  *
index 085047f3a545b283c41ec546cb2b71e623a4c7fa..7e1426e76d966e927140102929506c3b73bf2844 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simulated SCSI driver.
  *
index 70d52e9bb575ed5e3ab68616126acd53654a9ae5..a419ccf33cde04ba19c1d24b7c82522e05ad5f5b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simulated Serial Driver (fake serial)
  *
index c86a947f5368633b86d1a8e5dc7ddd1803982c64..a3d0211970e95e5152edbaeeecd8ab3a42041ac6 100644 (file)
@@ -112,6 +112,8 @@ static inline void arch_acpi_set_pdc_bits(u32 *buf)
        buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP;
 }
 
+#define acpi_unlazy_tlb(x)
+
 #ifdef CONFIG_ACPI_NUMA
 extern cpumask_t early_cpu_possible_map;
 #define for_each_possible_early_cpu(cpu)  \
index 01d09c401c5c3b8c269b946ce31bee78edff9f23..2b451c4496da7d42c2dc3a1cc7580b26e7b649c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_AGP_H
 #define _ASM_IA64_AGP_H
 
index a2c139808cfead2fd97964a5cb4d9b464aed638f..c711536674e3d8d0009ec53003e99865946b82af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_ASM_PROTOTYPES_H
 #define _ASM_IA64_ASM_PROTOTYPES_H
 
index 3ab6d75aa3dbdd68e59cc7dab789ab60ccd9d356..52619c517f099e5450f7930a10ff94e571983687 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_ASMMACRO_H
 #define _ASM_IA64_ASMMACRO_H
 
index 65d4bb2b6685978f708f34aebf4cd2d00ac4681b..28e02c99be6d72efca8128d8a11011e20bd89936 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_ATOMIC_H
 #define _ASM_IA64_ATOMIC_H
 
index 588f1614cafc2a86c2dcb816c4c1f71d633551f2..751cdd3534469da41f4a19fb3d40d14ccdbe1da6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Memory barrier definitions.  This is based on information published
  * in the Processor Abstraction Layer and the System Abstraction Layer
index 71e8145243ee885426ad24f1f07dc7fedbba5a66..56a774bf13fa73fe3b9523f1d1f25bd3237f0243 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_BITOPS_H
 #define _ASM_IA64_BITOPS_H
 
index 823616b5020b366ba5b20e06529d0095748e7477..bd3eeb8d1cfa379a56456a3fd27909dbeaf2b55b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_BUG_H
 #define _ASM_IA64_BUG_H
 
index 433523e3b2ed9404cfd0c6a7ed61a642928170d8..0d6b9bded56c6ba2d9c1e381fd05496cf25f86ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is included by init/main.c to check for architecture-dependent bugs.
  *
index 988254a7d34944d5e0cc8f22bb66823af349c86f..4eb6f742d14f592a6b57ed55dab27de2a71c4ac0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_CACHE_H
 #define _ASM_IA64_CACHE_H
 
index 429eefc93ee7ebb454fc18ae99a6fdd9fad8e415..6d3478f8abc89d392b9e4d9bd7e285159eaacf47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_CACHEFLUSH_H
 #define _ASM_IA64_CACHEFLUSH_H
 
index 7accf54162b2d978c4e78410f0435678a44c4ee6..0ed18bc3f6cf2f416fe44a1baeee6e1d39b9b94a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_CHECKSUM_H
 #define _ASM_IA64_CHECKSUM_H
 
index 5c8596e4cb0286cc89a3436647d7b6f75f1d7a4e..71a517751afa80c3d121089f5a7f5e2ee33f965c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* IA64-specific clocksource additions */
 
 #ifndef _ASM_IA64_CLOCKSOURCE_H
index fcca30b9f110bead57460586b466912d0eb77d68..db125df9e08882284a6454c598d1823067dd0d38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_CPU_H_
 #define _ASM_IA64_CPU_H_
 
index c659f90fbfd9c3c6e1ff1c1a978a3effe0f53e5f..86fbcc88dff2155ba112aa206c2aef273deeac91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_CURRENT_H
 #define _ASM_IA64_CURRENT_H
 
index 88f6500e84abb989980a249607f869939139c8eb..a481393647e9e32cbf2a305c37e867c748dfe4bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_IA64_CYCLONE_H
 #define ASM_IA64_CYCLONE_H
 
index a30a62f235e1107ce9134a2ddd38ff60aa5b75da..0227ac586107652c02773c3a01cab8efc459df7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_DELAY_H
 #define _ASM_IA64_DELAY_H
 
index 3ce5ab4339f310460a94db3565fd490c874e3f8b..5da9421fb0fffca0d652c84ec1347a3dcedd7f5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_DMA_MAPPING_H
 #define _ASM_IA64_DMA_MAPPING_H
 
index 4d97f60f1ef57ce71194932ca8301741e0c6cfa2..186850eec934453c36798acdbf6a530047558fe1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_DMA_H
 #define _ASM_IA64_DMA_H
 
index f365a61f5c717741967cf556bc41e007f777a41a..ecd9e0a0f5f98ee1b46726c52091cb30e970c1be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_DMI_H
 #define _ASM_DMI_H 1
 
index eec9e1d1b833cb3cc7ec728522b8bc45d3d952ba..934191b1e2e3eaa499e6f8e29e09e58cfb04cd0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_EARLY_IOREMAP_H
 #define _ASM_IA64_EARLY_IOREMAP_H
 
index 5a83c5cc3dc8779e8411238eb651bbc62764b055..c70bb9c11f52608e229055de065778a888cf8d35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_ELF_H
 #define _ASM_IA64_ELF_H
 
index 40991c6ba6476530b79b5781217599b325b5e661..56d1310af06e548962de838ecdab743a51942315 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ESI service calls.
  *
index 20376e71eab4c5fbd720c910a6264857a6d7202b..83eac6aa063901460e975ab1fa00dc71a2c77283 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_EXTABLE_H
 #define _ASM_IA64_EXTABLE_H
 
index 89a397cee90aebe402f408cf46cc8c171cec628f..5f95782bfa46d6658bc5c76bf23cf10686889b22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index 62edfceadaa6ba2ac123950d38fd399ca309c9d9..2a0c23728b2639358732682c2641c67856915047 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_FPSWA_H
 #define _ASM_IA64_FPSWA_H
 
index fbd1a2470cae0cc9152621a3765814cbd53c2858..a07a8e57545388a70216b0175e2c596fdceb147d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_FTRACE_H
 #define _ASM_IA64_FTRACE_H
 
index 6d67dc1eaf2be247815629184f68da72050b61eb..db2dd85918c2923ce2877e76eed8d7d693885b2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FUTEX_H
 #define _ASM_FUTEX_H
 
index f9495b1757a81d949a200a9938a2e3e94422f424..83f230b23867c29b9e7f254863079d93f00cfb52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com>
index 8fb7d33a661f9e6de23ec01be699e4300ad4f363..bdc4669c71c3dcbfca5cc3f886fe6da68a64205c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_HARDIRQ_H
 #define _ASM_IA64_HARDIRQ_H
 
index 0fe50225daa457aef3a773c645f95d4819be866a..00fbd5cc8ab86d6a15ea043efb4a3750a3f44514 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMIA64_HPSIM_H
 #define _ASMIA64_HPSIM_H
 
index ef65f026b11e6fd7766a1976bfedb48749d1be49..74d2a5540aaf9519a261dd112690e3bc16369670 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_HUGETLB_H
 #define _ASM_IA64_HUGETLB_H
 
index 74347ebf7d68ecab3df5bc014f4a9359897dca0a..5dd3c6485c3aaf54e471dfc5bee1754cdc443d7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_HW_IRQ_H
 #define _ASM_IA64_HW_IRQ_H
 
index b7685015a8baa98e205b1fdd23adf137b6b033a1..97c55b97e0ba556a1985eb452a44ee4dedf63b37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_IDLE_H
 #define _ASM_IA64_IDLE_H
 
index ec970a9201329a65bcbe17d6a98cb19a3826ddd1..035b17fe12ef032e185c7ca21f8828b9fd0027d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Compiler-dependent intrinsics.
  *
index a2540e21f9192f819e314cab812c4e2d7c73d370..fb0651961e2c2ecf336c4ba1e348bc6b891d9e31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_IO_H
 #define _ASM_IA64_IO_H
 
index 1d1212901ae70138466b7b32a6e04538d8f73a9d..156b9d8e19327970a73e2f7ed102af6d26416809 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_IOMMU_H
 #define _ASM_IA64_IOMMU_H 1
 
index 92c8d36ae5aeb8ef5466886ee02cb80131dceac4..cc96116ac276a17e2d2ed870c223224f01746428 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_IOMMU_TABLE_H
 #define _ASM_IA64_IOMMU_TABLE_H
 
index 4ae1fbd7f10e54b65e20dc249c71062901a634af..f48556cb8afccf2980b65f7e78ecd1fadfc2b96d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IA64_IOSAPIC_H
 #define __ASM_IA64_IOSAPIC_H
 
index 820667cbea7e337b3c2b655c30501418e7670b9e..8b84a55ed38a11a1b2e503ffe6b0d2cb9c454390 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_IRQ_H
 #define _ASM_IA64_IRQ_H
 
index a8687b1d8906912ab458b9640db72c8655115a3f..547a6e87018c4b61f101b830c24f9792a7a7eeb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IA64_INTR_REMAPPING_H
 #define __IA64_INTR_REMAPPING_H
 #define irq_remapping_enabled 0
index cec6c06b52c0fba49a53bb1ee7a925520bf27b9d..d97f8435be4f828025da9f89fae0f7e14c68c5e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IRQ flags defines.
  *
index aea2b81b03a3c89f6faaa5da09db1c364e145dd9..294b1e1ebd2d99dfb34ed34cc04d6323859a6ee5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_KEXEC_H
 #define _ASM_IA64_KEXEC_H
 
index 05d5f9996105223e0e61908c6622ab99fdf02e7d..5c268cf7c2bd5c55b84451e45d9871a977ef75aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_KMAP_TYPES_H
 #define _ASM_IA64_KMAP_TYPES_H
 
index 39e65f6639f5a780b163c40c7412b19c56fe12e3..44113b75e4ebbd57b32a14263b8210f41a14029a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_KREGS_H
 #define _ASM_IA64_KREGS_H
 
index 7a1f8310596bede26f78d60a2bee0a4ac97a9242..757f84e5dc6e83fab09c3e501876719a20fd7bf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IA64_LIBATA_PORTMAP_H
 #define __ASM_IA64_LIBATA_PORTMAP_H
 
index 787575701f1ca94c34b872e3b2f37fd97da3afc7..5178af560925e1efa6abb184d8a96b458a83766d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index af285c423e1e4d7a339404beb6d6dd48c2e15d44..267f4f17019166111a969e8666ce89230e8165a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine vector for IA-64.
  *
index 1f7403a2fbee03407f767a6571392b7147793684..bc230f69faebcee28337e74591eff78ccf65f726 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MACHVEC_DIG_h
 #define _ASM_IA64_MACHVEC_DIG_h
 
index 44308b4c3f6e4cbe0635038f2bec0fc021d9eaf0..bb44eb9039ddf80e0b1cfb09c31fb97ad80b613a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MACHVEC_DIG_VTD_h
 #define _ASM_IA64_MACHVEC_DIG_VTD_h
 
index e757112793664d3df43ab6faf68605efb4e8bd0c..056f8405822eda428ed9023182464fa6af0b2122 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MACHVEC_HPSIM_h
 #define _ASM_IA64_MACHVEC_HPSIM_h
 
index c74d3159e9ebcfaa3ae46e79b67d1e5c45046f6c..5299ac38bfb6d018c959ce85896df46d79c2a8b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MACHVEC_HPZX1_h
 #define _ASM_IA64_MACHVEC_HPZX1_h
 
index 906ef621077448d3e6a35243078a2da7ca9f4368..5aec6a008c61312aa6a603fed7eb64d4b7e9f9ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
 #define _ASM_IA64_MACHVEC_HPZX1_SWIOTLB_h
 
index 37a469849ab9f94d3e56a2f73f2f9525de3eb1ab..2b32fd06b7c64c2ad83a00cab46bfbbfa99f7f9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/iommu.h>
 #include <asm/machvec.h>
 
index 8c709616871626f175164a5f237bfa0cec1af2d9..726df17f1b5166c6157f9b532dd8efd525cb326b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       mca.h
  * Purpose:    Machine check handling specific defines
index 13c1d4994d4951413d1d2aaf1c7c9ad16bdd18d9..e3ab1f41f1c3cf3488c19637f88167e741b1e54a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       mca_asm.h
  * Purpose:    Machine check handling specific defines
index fdd5f5229f78dacf048ff09d6d817aca42c23db0..15cf100add0e7bd616363f95316a3524cf79ffa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Based on <asm-i386/mman.h>.
  *
index 611432ba579c0d91f64c402c2fc115f0ef1fe487..f75f44f531c2e865efa0456d25152990f9f6345f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 9b99368633b5adc525dcdda89bb146b2446cb801..2da0e2eb036b99c73a6375804fb8f01db27d075b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MMU_CONTEXT_H
 #define _ASM_IA64_MMU_CONTEXT_H
 
index f31894b2a35482dc5c37db58644b0ed811bc6c6f..f319144260ce13fcb316e1d0b40715f9a6f427b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_MODULE_H
 #define _ASM_IA64_MODULE_H
 
index 592c1047a0c541c4acccda819baf9355f06b724f..18d0e4226748d5bfbd768ff3bcb309317ac16088 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IA64_MSI_DEF_H
 #define _IA64_MSI_DEF_H
 
index e8c486ef0d76b1352b12fab907223139e6479c71..5798bd2b462c46c6ee8b1b35c2ceb88413351167 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PAGE_H
 #define _ASM_IA64_PAGE_H
 /*
index 2e69284df8e77b8bbf7701b8a5e260aa6dee746d..f9d2b3b2dfad4f7a81601642bbd65ceb26b45c93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PAL_H
 #define _ASM_IA64_PAL_H
 
index 1295913d6a8211cab60659ed889bc6f1c07dcf56..f0b786227c409132b335e31ccc68a395f3eb6c75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Fundamental kernel parameters.
  *
index 638b4d271b994b91b0481535adcf9615e4de72cd..360ca9bf2f6f77dd4585fa4236a07c43f3fe7cca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * parport.h: platform-specific PC-style parport initialisation
  *
index 295fe6ab4584c4db9585c6a84ff9ac450d590c77..bd487ed22bf597154673c5b6901fcd696ab13e65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PATCH_H
 #define _ASM_IA64_PATCH_H
 
index 6459f2d46200581b2b5288a54aab090cde2d20d1..e20d77f6a3c1558bb059631d68824945852cbf15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PCI_H
 #define _ASM_IA64_PCI_H
 
index b9295793a5e24b3f7aa6c4df05b8228977d9c35c..f357b9bb3576a109da86ef589dd76e9f262279f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PERCPU_H
 #define _ASM_IA64_PERCPU_H
 
index 15476dd3a8b07f28b5ba5131434f82f411511958..e0545869cc8ce3dc3d262e14492c53cf856a01ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2001-2003 Hewlett-Packard Co
  *               Stephane Eranian <eranian@hpl.hp.com>
index f5e70e9619486d6347dd61687e463b80db25885a..3ee5362f2661457d04059c1d4cc564d61391bd2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PGALLOC_H
 #define _ASM_IA64_PGALLOC_H
 
index 6cc22c8d8923e9c294f8736190b3e55e38e7698a..165827774bea75e7d20953d63e030059d010cf49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PGTABLE_H
 #define _ASM_IA64_PGTABLE_H
 
index ab982f07ea681253d42f351c230c976a83258f95..10061ccf0440db1ef6ebb2d258bf944655a91299 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_PROCESSOR_H
 #define _ASM_IA64_PROCESSOR_H
 
index 845143990a1d66f2c5bb77b8b69225cfe7eb195f..7ff574d56429c2357446d685ed52d7db90b803c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1998-2004 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index 8fa98dd303b4b4733f862cce39cca2b82235f1b7..7d6fceb3d5671c12e5e69330cfa1f79382e31673 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * R/W semaphores for ia64
  *
index e504f382115eebcc26e62d3123a74bff10b72025..588f33156da6901053bc1022856b59ca86a1aea6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SAL_H
 #define _ASM_IA64_SAL_H
 
index 2ab2003698ef6acd2fa7e5ffd5cabb31be3317b4..f3481408594e029b5bbac1c1cd117384ae07725c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SECTIONS_H
 #define _ASM_IA64_SECTIONS_H
 
index d07508dc54ae6962bbb432fd92f0728aa9e26346..43bd8324ab71505996102957c3fd66b7f42c3577 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SHMPARAM_H
 #define _ASM_IA64_SHMPARAM_H
 
index c62afa4a0dc2a94828c2f38112aa9d2da86e141b..80f067f9b3ce85d397ae57e2fdee6a46ab3a5c5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Modified 1998-2001, 2003
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
index fea21e986022e447fe54a37d1b21f29f9c05aa4b..7847ae40a181e91dc6da96382ec255f3e8d5f021 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SMP Support
  *
index 6eaa3cc1e919a3d01387019f697880d00bf9e8d7..d4a524951df36276c9141e97b162d9ad2863ec32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2005 Silicon Graphics, Inc.
  */
index 67a7c40ec27f4e1b7f5b68bd3a96fd3d6e10aa34..336d0570e1fab4d3479c59fb034860c07709d0a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SPARSEMEM_H
 #define _ASM_IA64_SPARSEMEM_H
 
index df2c121164b8d03e3a9c355e9199d62482fd2c93..aa057abd948ec8eb01447e978e50f29616b0cd8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SPINLOCK_H
 #define _ASM_IA64_SPINLOCK_H
 
index e2b42a52a6d3f266f00355691d43d9d67c6ab5e2..6e345fefcdcab0e1962b15a1f03180667b3533f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_SPINLOCK_TYPES_H
 #define _ASM_IA64_SPINLOCK_TYPES_H
 
index 85fd65c52a8c0a7449e60d2f84cdf56b393b23af..8b84df0dbfad025f8da0f0909917476f3c33ba6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_STRING_H
 #define _ASM_IA64_STRING_H
 
index f0acde68aaea5c3dd685b853f542647393bbbd6b..841e2c7d0b2199df80a9192d4ec242588a46d9ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_IA64__SWIOTLB_H
 #define ASM_IA64__SWIOTLB_H
 
index e8f3585e7e7a9b5133c3f7f9c71b2d7476e848c9..b10f31ec522c4d3867485a76175308306a011a8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Low-level task switching. This is based on information published in
  * the Processor Abstraction Layer and the System Abstraction Layer
index a42f870ca4f6cc7770ae25811639d066b1382ae4..589c026444cc5fb48ea58fb07ce3074a2ac873d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Modified 1999
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
index 8742d741d19adcaaf0fe7ae8d757f6d9b568066b..1d172a4119a7100ad448ae4fd60f086ba5817326 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2002-2003 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index 86c7db86118034bcc8ed60162112786afd30c4f5..869a3ac6bf23a240497affb45f9dd878c3394d44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_TIMEX_H
 #define _ASM_IA64_TIMEX_H
 
index cbe5ac3699bf0f9dbdfd726c112f6fc6bd1271f0..44f0ac0df30823d49807d91c4234c6556d0a885b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_TLB_H
 #define _ASM_IA64_TLB_H
 /*
index 3be25dfed16466c8e541a298c9e7d26feac202f1..25e280810f6c423700e4f13a52a936c45dc6682b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_TLBFLUSH_H
 #define _ASM_IA64_TLBFLUSH_H
 
index 4c351b169da2a48532ce7e5719757c7679fdfaaf..5ddc7703de99c06c540479dff36ae745dc69bc76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is never included by application software unless explicitly
  * requested (e.g., via linux/types.h) in which case the application is
index 0890ded638f0308e03432af9cf4b11fd3a0a3d4c..a74524f2d625f2f6669fafc9f9eead31b78a15ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_UACCESS_H
 #define _ASM_IA64_UACCESS_H
 
index 7bddc7f5858469630fc27787fedda38edf7636e0..328942e3cbceecc6cb0dc2db0fee316fefbd7b20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_UNALIGNED_H
 #define _ASM_IA64_UNALIGNED_H
 
index 8c85209753abc210bdcec5be8f7f9afb6abae369..ffb705dc9c130c0e56b6f443ce18e11872b8a3ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IA-64 Linux syscall numbers and inline-functions.
  *
index 1af3875f1a57b1be81467582f9951788ddcfc3a8..c5bd4b3e3a364e5f4a9ff5a42c40ad578b71e880 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_UNWIND_H
 #define _ASM_IA64_UNWIND_H
 
index 8b982111034892e3ead84caff7e4ed90ce810b26..0ba486651b7cb0b4a3ce362ece2cb701bd559665 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_USER_H
 #define _ASM_IA64_USER_H
 
index b275401b96d344bccdce2dc192a15baa2639fa92..112d40a0fec20676238d193bf45c47927ea08f0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_USTACK_H
 #define _ASM_IA64_USTACK_H
 
index 8f6cbaa742e9c02c308c2c07f9b7ca1471bdd49d..71df93ee3bc024ef3beccb35e4b231b4844cd27a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IA64_UV_UV_H
 #define _ASM_IA64_UV_UV_H
 
index 02184ecd820822af282794071456ebba12502c07..30cb373f3de8a3c3602c6a9495421edb2e639303 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 58277fc650ef205954604394e9dc6ccda93fdd06..09969a5d2e0a9e6002f9e11b2f4fc1b32660eee8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_AUXVEC_H
 #define _ASM_IA64_AUXVEC_H
 
index ec4db3c970b7705e87ced26e39f85fbf115757a2..1146d55563db37731ebbfe1abdaf104789efb53b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_IA64_BITSPERLONG_H
 #define __ASM_IA64_BITSPERLONG_H
 
index f034020398962d34987431971c4f9c33006597aa..5d742bcb0018391cdb7fbc8bf153704e85fa9402 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_BREAK_H
 #define _ASM_IA64_BREAK_H
 
index a8dd735581505ae07f20e6eee7a4f7290c2f71b9..f85d0faaaf34bca6d9d451d3312ef165e975e4ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_BYTEORDER_H
 #define _ASM_IA64_BYTEORDER_H
 
index a0e3620f8f133f7ea798ae9458abf10cc168f3c3..d69c979936d41e4a3225091efcd31b46cde5c230 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_CMPXCHG_H
 #define _ASM_IA64_CMPXCHG_H
 
index 4c82b503d92ffabcc6eb558a50ae5d6dba8a5f7c..9addba5926463b5644233f6b9ab4b0a8fe492abe 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/errno.h>
index 7b485876cad495ac02e70bbcfb5b06f411a797c8..7b95523efe5a8eb801d27a1998a1193f71c6ae1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_FCNTL_H
 #define _ASM_IA64_FCNTL_H
 /*
index b6395ad1500a00f7d2a133b3633bed96fd91be2f..0df392982ce8ab08b0138618a07b000a5d8452fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_FPU_H
 #define _ASM_IA64_FPU_H
 
index 61d0d0111978e8738602cf3407b90e0b0908d150..c60696fd1e37cfd05a61c1bec410ed964c167b92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
  * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com>
index 1757f1c11ad4b66cb470e17172a1e8e9f11927af..d7d10cec8b9f3386e451e2c8c4e9863104bda318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2002,2003 Intel Corp.
  *      Jun Nakajima <jun.nakajima@intel.com>
index 53cec577558a9aac345a6661acb43213b1015a25..ab649691545a5b7bdb3658fc570a92d43fb13b1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_INTEL_INTRIN_H
 #define _ASM_IA64_INTEL_INTRIN_H
 /*
index 5829978ff4666ac4b1e35588b22ac34faef6a6f3..aecc217eca634a5aa8a7f5ada937002d6262fd15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Compiler-dependent intrinsics.
  *
index b279fe06dfe5bea925eccf4b39c8908b23379b6a..b809c4566e5f8b119f98aa55173938912203723d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ioctl.h>
index f3aab5512e98462904fe89be3ecf29db1a1a1590..b86001940209c1f5e16339865199d5dcadd99941 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_IOCTLS_H
 #define _ASM_IA64_IOCTLS_H
 
index 84c7e51cb6d0befd2b3c013c8bbbbaad6ae02297..90d6445a14df81c369ea5e0b04f0d48086c10a7d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ipcbuf.h>
index 8740819adc54f676de8ca12ee3a476aa36e7a792..ce0cc3d7509e2b56da84fc5c2d2be31b307ac9bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Based on <asm-i386/mman.h>.
  *
index 6c64c0d2aae187ff3e413970cf64eba59050409d..aa25df92d9dc6cb4d40433951aa568b5e7e9916a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_MSGBUF_H
 #define _ASM_IA64_MSGBUF_H
 
index d7da41d9497d4daeb0b238d6cf3e04734a2bdd34..123ab45940b46a3ed9bdd27d0a663c54a8666d35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Fundamental kernel parameters.
  *
index 1a10a2dd58a1ce9ae01ac5f16f0b0ad18576dc25..017548365e5c3f56ef83b85bc10a4f0898243437 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2001-2003 Hewlett-Packard Co
  *               Stephane Eranian <eranian@hpl.hp.com>
index a2d560c67230d963065f2b378f9bfa44a49b931e..d3f36aff0e1f08d63a02f3f45e77c02aa24d26da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2002-2003 Hewlett-Packard Co
  *               Stephane Eranian <eranian@hpl.hp.com>
index c98509d3149e637951f5edf96116a70ed9d8bc51..b7132a305a476847d1b05aabc8087c89e6523c1d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/poll.h>
index 99ee1d6510cfc98a7dc66128fca841af022b133f..bded40f7defe5724af5598a7c82364acabe032e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_POSIX_TYPES_H
 #define _ASM_IA64_POSIX_TYPES_H
 
index 0a02f634e12baaf2409c1435d2ab2dde7b1b50b6..f52655b44414591d4b053494b228d19cf5a0b76a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 1998-2004 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index b712773c759e9748e3a0f25234eb670cf1700c9b..2847c18139ef8a134be3460e112baa5420f1c25f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_PTRACE_OFFSETS_H
 #define _ASM_IA64_PTRACE_OFFSETS_H
 
index ba2272a87fc7b4ce41c99f202c5598bc7055c65c..d488d2b22ac40e6bd1999485a9a23d43cc5e40db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_RESOURCE_H
 #define _ASM_IA64_RESOURCE_H
 
index 02830a3b0196dba7e7f658fc6b23ef55fd4d19d0..6d260af571c5d42b1c9aa8536540b21a5dc48c58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_RSE_H
 #define _ASM_IA64_RSE_H
 
index 1340fbc04d3e85c6d33c20fec25f3823b68153ff..6ed058760afc23a191848a31770d288bd4aab01a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SEMBUF_H
 #define _ASM_IA64_SEMBUF_H
 
index 8d56458310b316406a0b69aabc3839de23f9ebf0..8d13ce8fb03aede3623dbd143c6d8c7d605d0147 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __IA64_SETUP_H
 #define __IA64_SETUP_H
 
index 585002a77acd72180ddb6f6b0f1e7e507080fa96..6ef57cb70dee95e55472ff5692418bf86a9a3b7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SHMBUF_H
 #define _ASM_IA64_SHMBUF_H
 
index 57ff777bcc40a583bb4347b4534ed9f875ff9499..1bb6f0f2bd73933edd4504deff18bd53831bab02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SIGCONTEXT_H
 #define _ASM_IA64_SIGCONTEXT_H
 
index 33389fc36f239144be69df0c4c11acc49c22a823..f3a02a10c3a316ba0dbb27762a1b5c806efadec8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Based on <asm-i386/siginfo.h>.
  *
index c0ea2855e96baccec34bd781211217300a6aa363..aa98ff1b9e228baef39845a8195cab1e119cdef5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Modified 1998-2001, 2003
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
index 002eb85a6941e73d255a6d5f15dc99a6a6843746..3efba40adc5411ce5981ce611390c084ce7eddf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SOCKET_H
 #define _ASM_IA64_SOCKET_H
 
index 15c92468ad38e28bb3913129e50db4540153fe7c..f27a12f95d2096bd3614956ee47f0384756c5250 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SOCKIOS_H
 #define _ASM_IA64_SOCKIOS_H
 
index 367bb90cdffa13b8dabeee1d90a5df9d86adb408..3265ed5aac0f429a79f4c9cb770803feefcaa625 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_STAT_H
 #define _ASM_IA64_STAT_H
 
index 1e589669de56fee4f2dd1c718efd2191776c5770..de3bae4f137debb9f1d07fe870c24682eb8edb46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_STATFS_H
 #define _ASM_IA64_STATFS_H
 
index c89a8cb5d8a592f7c89ac30e198642a91d4d5bcd..79f3fef1a05ea73c92313c2d6b7f4b4998a8d882 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_SWAB_H
 #define _ASM_IA64_SWAB_H
 
index c009b94e58d913b17f00325647f31e0a27fdd0bc..000a1a297c7592d42a453efc40457ecff119a50d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_TERMBITS_H
 #define _ASM_IA64_TERMBITS_H
 
index d59b48c307f812c9735a8f70554fb78410d5a23e..199742d08f2c527ee1c5df1020872254954055a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Modified 1999
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
index 321193b05eed98794e19b4fe4b150be1b0a980af..2000de474be63ce37357c7a25f77e5d898b8e149 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is never included by application software unless explicitly
  * requested (e.g., via linux/types.h) in which case the application is
index bf573dc8ca6afb84a1a6114c3fc39162745aff79..46f51e535e049d60cc62406ef9aedac80931449f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IA64_UCONTEXT_H
 #define _ASM_IA64_UCONTEXT_H
 
index ea5363daa7bd1e967c9f4674545e5eae0e57befa..5fe71d4a43de91bec54dfbe47256480fcfd8455f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * IA-64 Linux syscall numbers and inline-functions.
  *
index 1dfebc622692588cb19ecc533beece5ab118f5e4..703cc5f546ff63e52c0cd0c52e56f686b9678ebe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_IA64_USTACK_H
 #define _UAPI_ASM_IA64_USTACK_H
 
index 9edda5466020df4e18bb3c060e07304993c58a1e..14ad79f394e50fa7071d0c15a5ff0c4e8f5103c7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 7da7c65a9bb1a9d9ad4b43628c8bdd1993790f18..f53faf48b7ce4670e05005a11256c1c08d5ee3ac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # The gate DSO image is built using a special linker script.
 
 targets += gate.so gate.lds gate.o gate-dummy.o
index 798bdb209d0004bfda2aad4a24d2119ea682f446..b385ff2bf6ce206de3e90d22b8abc777e9c900ce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed
index 96a9d18ff4c4c87c0c469b9d3ecd7cbd3c6963ca..5192ca899fe608be2345b48dcdc30292d9447569 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index 987b11be0021db2751609fdf9f641769f09d14b3..9bcc908bc85e9e3678f4e843203ea8d2b7a106d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Emulation of the "brl" instruction for IA64 processors that
  *  don't support it in hardware.
index 75859a07d75bd6e754a3cec5b2e548be74452c86..39f4433a6f0e2dba8bcd0a46985b4b53832f0d87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/ia64/kernel/crash.c
  *
index 9c12b794e7741ee380c52f30acca3145d59b2c31..0ed3c3dee4cde90889c3e53b4df9b458a496d10c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     kernel/crash_dump.c - Memory preserving reboot related code.
  *
index ee1a4afbf9da0167ffa80e9bd8a775c4cffd71c8..f80eb7fb544d71f80ff852c6333d6cdd7fb22a5c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/time.h>
index e0dd97f4eb693fe131cddb668f4031f5c3291c99..7a82c92596092712c254a2ecfa99fd846ae074ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/dma-mapping.h>
 #include <linux/export.h>
 
index 81416000c5e07c18f16032bb0b9c9f77abc8b883..9c09bf390ccea55fd1272d69e2445dcb44935327 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Extensible Firmware Interface
  *
index a56e161d7515695aee5a213b93a526c981a32b08..58233bb7976dfa46651f80ef2aaa67df9f8627b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * EFI call stub.
  *
index 04bc8fd5f893ed3dacd7ff487257277c193de571..94680521fbf919cf736b96ec1264dc9e50e9d92b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/elf.h>
 #include <linux/coredump.h>
 #include <linux/fs.h>
index e7a716b09350d0a08dd96244f2a38daf0771132b..68362b30ea47d1b72a5195fdd4f2474af4c63de4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/ia64/kernel/entry.S
  *
index b83edac029659f3824ce63915a8d8592806042e0..6463dc316263c5b584d18489aa1e0b6729525dc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  * Preserved registers that are shared between code in ivt.S and
index edbf7af958492b1624cd7c3c748c9185f9782d9f..c0e7c9af2bb997ad9e713a5b8c40788279f36ef1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the light-weight system call handlers (fsyscall-handlers).
  *
index dcc5149177315a4a4aabcb78a70298cbc9eb1f72..0914c02a1eb0b09323b0fc7415a82a674e9f3a12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
  *        Contributed by Peter Keilty <peter.keilty@hp.com>
index 0bd1b3bfaf1cad6d6995bdc2087b8138d4d02bc4..9f235cd551abf0479377943f86a036129c438928 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the code that gets mapped at the upper end of each task's text
  * region.  For now, it contains the signal trampoline code only.
index 3e8271e85a1e11d3755fa369a8d6ff364942dc12..461c7e69d46565771b58dc2aa0070f36b629276f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for gate DSO.  The gate pages are an ELF shared object
  * prelinked to its virtual address, with only one read-only segment and
index 3204fddc439c4ea5712f668e0f511842c239029e..e6f45170a4b97a80d9f63f4eeace13d0b9e2f64b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Here is where the ball gets rolling as far as the kernel is concerned.
  * When control is transferred to _start, the bootload has already
index d111248af7191ad5480b554e370effb015e54245..6b51c88e357811ff6a3203dbc23140e39f2b2970 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific kernel symbols
  */
index fa8ee64adac2ff21bdb557a5c07d3bbdd2a9d9db..8df9245e29d9061aec6ac1ba829608fdb1e61e1b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is where we statically allocate and initialize the initial
  * task.
index 90fde5b8669d96411bc9741801cf24efa2a9aa07..550243a94b5dbc13a0ab5cf793e3df749f4a29de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * I/O SAPIC support.
  *
index 2ff1df7b14eaf7e619096aaf4de6fcafa3729bf0..8ed81b252694a008c130632412816761f98a357c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/arch/ia64/kernel/irq.c
  *
index eaa3199f98c8e0ed190b17686ad9023959b8bf92..ab87d6c25b152984c354134e56373661daa9d87b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/ia64/kernel/irq_ia64.c
  *
index 1b3a776e5161363ea82efcba50a1ecc7657b43f0..23bf4499a75d9937432a3b67316f1c6ae75cd80e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * LSAPIC Interrupt Controller
  *
index 44a103a5de2b355278e086abc02b834ea959c743..1efcbe5f0c78183f7571a58a5c0fe98767a04d34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/ia64/kernel/ivt.S
  *
index f5a1e5246b3e02e3f1039c848c894407b6e273b2..7bfe98859911a41b90cb5ddfc6e50014709e1c4c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <asm/machvec.h>
index d5bdf9de36b6362f81a039b4494f0fa657497e87..086cfa4999fd2ac29d452d823220513aee3d4f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       mca_asm.S
  * Purpose:    assembly portion of the IA64 MCA handling
index 53b8ecb5b4b9de8b6c08e1a78acdd7ef2a47697c..45bc4e3ae14f23f86851274e321a08822f9f404e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       mca_drv.h
  * Purpose:    Define helpers for Generic MCA handling
index 767ac2c20d16a1eb28c9a7ec9a6ecea140740a15..4428f57bee73565b34b3e043ad5391e31cd783e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:        mca_drv_asm.S
  * Purpose:     Assembly portion of Generic MCA handling
index 5704700fb703723b77a6e61a498f7b6a98dfa86c..d6eab2a1084d207161f15428b21eceb25889a04f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <asm/cache.h>
 
index d1d945c6bd05f05d567be65357210210bfaae48e..853b5611a894d5a2770606f983782ea1a9a6dbc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IA-64-specific support for kernel module loader.
  *
index af4eaec0f7c348019eb787ef2224106925bfac35..519d9432f407e264ca178749f1eaa4549add119a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MSI hooks for standard x86 apic
  */
index f6769cd54bd93ce70f698d233ca7c1d16a39e3b2..f2633b22d3be2ba1256c742e3865802b5e5df113 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * calculate
  * NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...)
index 94fb2e3954983b899393beb7636f6341c858fad9..d3e22c018b68acd9a8d02e41214e25835ec1c0e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PAL Firmware support
  * IA-64 Processor Programmers Reference Vol 2
index 944a8e2438a641aac50bb2c7f00b69c71cad8c0f..7f21a8c57ed7c033291f9415ee9f2438d0e7fe15 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Instruction-patching support.
  *
index 9094a73f996f30ebfa036d43122eb29410f6fa70..3ba87c22dfbcdaa4f6944c324361539b74ad670c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dynamic DMA mapping support.
  */
index a14989dacded81301734c3b12de8d17759c290f0..5e50939aa03e12edd501010ebd0b7f5db01a3678 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Glue code to lib/swiotlb.c */
 
 #include <linux/pci.h>
index 67489478041e2bd1fba8b2e5217c70b43bf0dccf..96af4696cea96b8dab0b1f36d4ee9e308ec6826a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the generic PMU register description tables
  * and pmc checker used by perfmon.c.
index d1d508a0fbd3673b45950bb68a5423de3dddc8e9..f2d348648a0376aef2fcf92537d07c8e043c4a7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the Itanium PMU register description tables
  * and pmc checker used by perfmon.c.
index c4bec7a9d18ffa0fafa8ca973e62ee118a5c30fa..a993249e58bc512bab520c8fb44f5b4a50a0dbd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the McKinley PMU register description tables
  * and pmc checker used by perfmon.c.
index 7f8da4c7ca67db4babab4d95a5d80885754f630e..c0b5b9110c88478a1a748804ddc568eb292d95d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the Montecito PMU register description tables
  * and pmc checker used by perfmon.c.
index d344d0d691aacadc4123389a9d3255b3d7d56451..dda0082056b38109f90e5c1ce93effbdbf02307a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific setup.
  *
index 3f8293378a8304505ff48f49668e247501158150..427cd565fd61d38429c9ed66cb9b2534a21ee7c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Kernel support for the ptrace() and syscall tracing interfaces.
  *
index 23e3fd61e335e4723e2d92556bb6a4ac9a8161a5..dee56bcb993dcd5f5b06424fa70ffd430c3fe4e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific setup.
  *
index 9fd9a1933b3dc784df6dff6b837a7081a21096cd..58a36ce6c26eec4b1476f16ca29d88f061d66084 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 struct sigscratch {
        unsigned long scratch_unat;     /* ar.unat for the general registers saved in pt */
        unsigned long ar_pfs;           /* for syscalls, the user-level function-state  */
index 6146d53b6ad7df76c5c8a3d7e17b97a01fce58eb..a254cc98f95c6c201c9d3307e2a3bb0df2f2dc5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific signal handling support.
  *
index 5af2783a87f441eb3773a6d4b32a7be76fda6793..6e583a6bd2f681bc1fe150d41f4fddf6dc624699 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/ia64/kernel/stacktrace.c
  *
index 5ce927c854a68ccae65bc2274d60fdfa5d079a78..085adfcc74a4c3fadee3628d93a376909d769aab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains various system calls that have different calling
  * conventions on different platforms.
index 3cb17cf9b3620d386bae6e08415cbd9f14646bb9..6d4e76a4267f15d6ee39d2e055cd22f1eea40db4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific trap handling.
  *
index a13680ca1e611837c1abd513565e4a00aee552f4..72e9b42425642459450d4900432aad861737b865 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture-specific unaligned trap handling.
  *
index 9704e2cd9878cfaf3ec91badec8c51d10299aac2..e04efa08890293779a4f2806ad5fc1144e40ef64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1999-2004 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index 50ac2d82f9bf5102a9c1e109496225859c8abbf5..83f54f7929b5ea339ef071547782c216c7ac4ca3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2000 Hewlett-Packard Co
  * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
index 96693a6ae370a4c60333a68815b707cee5e15b11..67994a7e58166e0ff86588f38d52c825af5bce19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2000, 2002-2003 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
index 798026dde52e42b81455bcd4547778a2f3369616..58db59da0bd87042c8d0d457a77268f7b043e40f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <asm/cache.h>
 #include <asm/ptrace.h>
index 1a36a3a39624c16cf78a7d539cc870fdf66fbd0f..82118b38532fdfdb3c9ee3da5b963aa2ef4dc3d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ia64-specific library routines..
 #
index d0674c3603642872770af4409f9603ec01152e9e..1a4a639dc42f05a73fff3c29b5ad26481befd91c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Fast, simple, yet decent quality random number generator based on
  * a paper by David G. Carta ("Two Fast Implementations of the
index 2cb23cb0c2e1d1a98bb5a4db9d6e6407555c17e7..d26517fe3500a1f7d83cb3fd5ebbbcd990f31305 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Network checksum routines
  *
index 3cf5b76e587ff18d4d995b02d31a0ea458d04eaa..65b75085c8f46c231586745f22dc14a6aa13c11a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999-2002 Hewlett-Packard Co
  *     Stephane Eranian <eranian@hpl.hp.com>
index 7b40731ee5d86e13dbac5d49e363912a401eeab6..a28f39d349ebeabb784962f18f3df8df0ae220ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This routine clears to zero a linear memory buffer in user space.
  *
index cbdb9e323ffbd5be111a8b7b654633ad264f7112..176f857c522e8a9d620026db1903c0e36206439a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Optimized version of the standard copy_page() function
index c13f69036876c8ad0bcd191c0afcc76329b13041..d6fd56e4f1c1dcac5965ce4cb03516a7f15d4587 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * McKinley-optimized version of copy_page().
  *
index 66facd52e8d007581c4df4b361532fd9bb28bf80..f681556c6b86d99525c3674daa071ff4d5c3e6d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Optimized version of the copy_user() routine.
index 42f7678ef6ad13291206a51fb5b035dc8e7c30b5..bf9396b1ed329139769a03d91d5d3ba5f8f14cf6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Network Checksum & Copy routine
  *
index 1a431a5cf86ffb8d57f1b3adc417c4985818d055..6004dad2597c3e3842052344306594455c4c06ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Optmized version of the standard do_csum() function
index 715aed79a9ce34e64a66839405c1a2307383cd67..def92b708e6e1f209ff6f26fb3158c20917509a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2000 Hewlett-Packard Co
  * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
index 25840f6977532ab6b2d26aa53976f10bf685287d..a8ba3bd3d4d8cc545eaab2c62584ba4234efe15f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999-2000 Hewlett-Packard Co
  * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
index bcd16f8ad9d958ef9981c6504f3028cd48ba1a81..d107eaf3790ddcf634f7a487253befbc6a21d0fe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/types.h>
 
index 648e0d4a48390a455caca3da555074af78d33351..dc9e6e6fe87695a48160d634890987dac93ebcca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Optmized version of the ip_fast_csum() function
  * Used for calculating IP header checksum
index ba172fd6acf4e8571a4fe873b3bf3942a8006769..91a625fddbf0599e78b2419013be61f33ff727b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Optimized version of the standard memcpy() function
index bbbadc478f5b6642e2f75a5bc3798a45a7470555..cc4e6ac914b6c2699749a700b7ff6e97a72ee02a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Itanium 2-optimized version of memcpy and copy_user function
  *
index 87b974704075f1f5d5570260c09e4fddf74b0e7d..07a8b92c64965e2578e3607532325c170ae220c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Optimized version of the standard memset() function.
 
    Copyright (c) 2002 Hewlett-Packard Co/CERN
index 1a6e17c657b4219e902fd1d2dc5472deebdf75de..d66de596697441c8cab0c73589a017ca0fc6c466 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Optimized version of the standard strlen() function
index ca9ccf280e2e5c634938cad13ea759c7fae8c7d2..49eb81b69cd224f77addd7853d87079eac6c7994 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Just like strncpy() except that if a fault occurs during copying,
  * -EFAULT is returned.
index 80a5dfd1d402b9d28581315f5a59424fc149d7ce..4b684d4da10644db089c5b84e4a62e835883c06a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Returns 0 if exception before NUL or reaching the supplied limit (N),
  * a value greater than N if the string is longer than the limit, else
index bb0a01a8187895fd6e072c2191cb4415dc24e2ca..99a35039b548505890cce3d7562e6196af2f3513 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ia64-specific parts of the memory manager.
 #
index 8786268053693cac4ed3114becc62a488a905999..9b2d994cddf68cfe4d8417148df393aff76b7f8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2000, 2003 Silicon Graphics, Inc.  All rights reserved.
  * Copyright (c) 2001 Intel Corp.
index 10dd4a66e16748ecaa3502279316ba5c2508ccf2..da477c11770b056b7bc4d13200f10acb10e3d50b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Kernel exception handling table support.  Derived from arch/alpha/mm/extable.c.
  *
index 15f09cfff335b9c99e55de639d028af9782e95b9..dfdc152d6737b3176c6b8fe74c115e377212eae9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MMU fault handling support.
  *
index ae35140332f70ba7f749ffc1fa095efacaf8b000..d16e419fd7129fd1c165056ad91f500fdf0a7a98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IA-64 Huge TLB Page Support for Kernel.
  *
index a4e8d6bd9cfaf10de334d95872377b591d7df468..7af4e05bb61e785989dac50c236b2cef64713f8f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Initialize MMU support.
  *
index 6481f42fbd8cb5d1b4689036225e6298c025e126..eff68f362793ab855d4b65cd6a7192403a68246d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 SECTIONS {
        /* Group unwind sections into a single section: */
        .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
index aad27a718ee0aba3579fe8db1dc498230123deaf..cd134d6643bfff4cd572292ea32c2f5923d70088 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
index 41caa99add513964a638bda32eb725848b9e4d53..e1fa45b2148c12045f8f2a950ba39e2193b958f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Exceptions for specific devices. Usually work-arounds for fatal design flaws.
  * Derived from fixup.c of i386 tree.
index 2499e0b2243d30f8ece494ca768e1b60eea83f9b..787cf9b6b04a68374047748a231b7fe6dee2c7b1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 dir=$(dirname $0)
 CC=$1
 OBJDUMP=$2
index 3be4e3dbeb83b26221e5ce9aebf814fc8f23aa5c..65d6378adaaaa5fbc791fe32608c3a285d432175 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .rodata
        data4 @segrel(start)
        .data
index 85a0d54fb5abf928fb48af225d7d2b2f119bd202..c385d246e45846e234037540375c38e17923e718 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 SECTIONS {
        . = SIZEOF_HEADERS;
        .rodata : { *(.rodata) } :ro
index 03f586abb73454f66ae3c9cdd3df3d4c8b8ac2ab..107fa1c88c2e115f5bb497900f2619749e28b520 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .proc foo
        .prologue
 foo:   .save rp, r2
index 3f0c2adacb70c9427b5a825fcee59aa77e9097dd..12dff5c981cf1cf3cf610c1acb5d4ee8b9226c2b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # Check whether linker can handle cross-segment @segrel():
 #
index 2bfd941ff7c7cdb5a96622875e5d7507125623b3..89f3a1480a637ffcf8b51ff64ddd1c7dd8e1aa46 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# SPDX-License-Identifier: GPL-2.0
 #
 # Usage: unwcheck.py FILE
 #
index 66edc36426edecfd69649c542572fae469e526fe..3009d9d86f2973a65f31102901cd1d5da3d873ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/ia64/sn/kernel/sn2/timer.c
  *
index 87cde1e4b38ca026483729dec6ea61ad5c242a97..0d9446c37ae879863a6f5f01b40dbd8fbde6d5b7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config M32R
        bool
        default y
@@ -194,6 +195,10 @@ config TIMER_DIVIDE
        int "Timer divider (integer)"
        default "128"
 
+config CPU_BIG_ENDIAN
+        bool "Generate big endian code"
+       default n
+
 config CPU_LITTLE_ENDIAN
         bool "Generate little endian code"
        default n
index 6c612b7691b09816508f7aa0f34391ec1bc6d335..ffca1e194f91ea9df6f509d5b7003a3d82130eb8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index def8dd0b6bc58bb6309a4e29dabcad8814d58e53..d73b58c847a63f3786ac3e69da0795363ee74ca7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # m32r/Makefile
 #
index 0606a727aab234382f6ea790db35f434f108a500..abd3c75ebd32c3b26c3a457985e55f5982da8bba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/m32r/boot/compressed/Makefile
 #
index 9272e38d1104e734ffee7749fa468bf6eecd2876..7fce713e8aac67cf158d9f23a28b24b6ec95521b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * 1. load vmlinuz
  *
index 95a0563ff076e9665f553416a4b3ef1d1816829a..39b693640375f06830472811acf19fe1a3e93fc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/boot/compressed/head.S
  *
index cf3023dced49d7fbe55ab50a8f357b95e5f5194a..9d34bd063c318277400ec17efe62da45e06a1e1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/m32r/boot/compressed/m32r_sio.c
  *
index 3a76927458681d3785e2ed558a88961ba5b18532..43e36705566926a5c3534c0431d3af3ba3a5b916 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/m32r/boot/compressed/misc.c
  *
index dd11963f6939251bd91185eca8ff637893201301..c393eb559c4ce7d788c118cf219796117dfa6c50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 OUTPUT_ARCH(m32r)
 ENTRY(startup)
index ef843d63083d3a522bc51288e439b81db2f702c1..5909a825e2ed1d288f6b43843cad63865f848f70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/boot/setup.S -- A setup code.
  *
index 728799fc70aad7d967c8c9ad7b4a95eca6cbf4aa..ed90d894f285913c7979d3095c34e40320f82018 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_ASSEMBLER_H
 #define _ASM_M32R_ASSEMBLER_H
 
index 640cc1c7099f293700fe8d2ecbb4535da547632b..8bf67e55ff5493789cdaff84ff61f6797d859827 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_ATOMIC_H
 #define _ASM_M32R_ATOMIC_H
 
index 86ba2b42a6cfa0c1f0a499997bd3ffea5a489a30..64e70e57c15417ec701d911364c7622ab3bbd2dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_BITOPS_H
 #define _ASM_M32R_BITOPS_H
 
index 4cc0462c15b827ae1aaa2450655abc0e6a431a06..7197688254da73bdc5dfa9330a109cb465108855 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M32R_BUG_H
 #define _M32R_BUG_H
 #include <asm-generic/bug.h>
index f77214eff1368e858e207bae6c73dd763bda5780..74a6d428aebe50e967d32f9076b0644debf65788 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_BUGS_H
 #define _ASM_M32R_BUGS_H
 
index 40b3ee98193dbf5177299ee1cfb82c673e749a7d..47a766a258f86da33ddd33c63834725e85e3837a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_CACHE_H
 #define _ASM_M32R_CACHE_H
 
index 2aab8f6fff41139b013d7ca09004a7ae871969d2..12f73f6c17590e376bc7dab2843ec331f1919c4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * cachectl.h -- defines for M32R cache control system calls
  *
index 8e8e04516c39920df6ee906ff6521b2f3a9dfab7..5ad2a304548320df63d0fb69a88556d4732af267 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_CACHEFLUSH_H
 #define _ASM_M32R_CACHEFLUSH_H
 
index 23c9d0537201e6c2666d119db128280181ce4708..1ccdce5ff0ac5e4dbc9989a97befdd05f17c4142 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_CMPXCHG_H
 #define _ASM_M32R_CMPXCHG_H
 
index aff3ae8b62f76286c6739b63acc995f3584c971a..4abfc07f4762d5eba112517090b005b7713167c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_DMA_MAPPING_H
 #define _ASM_M32R_DMA_MAPPING_H
 
index 52f6a22dd232c5ddc18af72d76431e4d0cf447f7..661bc3b343ed22d2e0a4451760598b342b71a17e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_DMA_H
 #define _ASM_M32R_DMA_H
 
index 8acc9da9a15e23c78f62d0d8d6c5b29626b7dc63..576b2ff57957376eaef3bab6f9bcc8fa8202e76b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R__ELF_H
 #define _ASM_M32R__ELF_H
 
index 108d8c48e42e86978077354f2fa1b151f25c41df..cca44d5ae264efdc23ffcfa58dcfad98e603e31e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_EMERGENCY_RESTART_H
 #define _ASM_EMERGENCY_RESTART_H
 
index d92e99cd8c8aba17b2e80a33beb1ed466af3cea7..9a0bca2686fd3d34a7a89aa6be34cc587256b48f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index 5f2ac4f64ddfd125e197ee045bba122cde8fa900..10c23de02b3abfaaf5c652760714de1f90c8fd5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __KERNEL__
 #ifndef __ASM_HARDIRQ_H
 #define __ASM_HARDIRQ_H
index 4b0f5e001d4d5ab2a545e62dcc276b9815df5821..1b653bb16f9a3e5558bf4336116c35dfc6235db1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_IO_H
 #define _ASM_M32R_IO_H
 
index 242028b4d86a1dc858a8df7b606bf80a97e8066d..85b475fff90ed1f2f4704c4b7da74e4baa9e1b35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __KERNEL__
 #ifndef _ASM_M32R_IRQ_H
 #define _ASM_M32R_IRQ_H
index 4cdb5e3a06bfa6714bd724878f8e5c252d4be16e..3dcba0d17d40a5b389afd7e34f997d7073662190 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M32R_KMAP_TYPES_H
 #define __M32R_KMAP_TYPES_H
 
index a9fb151cf64809ac0188db7413659b25b9a04a32..f1aee6ec5bc3db6d27f8eb9ffdaad6ce2a378910 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 4045db3e4f6519593439c40edd65473739bc77eb..6780680c185d91db62659c6568b0d43d0d18e574 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M32R_LOCAL_H
 #define __M32R_LOCAL_H
 
index 52807f8db1660793bfcab02d5c787beff80b8f8b..f0a986fece65b62bb0981b48153fa586ab2b88b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M32102_H_
 #define _M32102_H_
 
index 214b44b40757582a8d48f82b5aeadf35d8d545a2..d27f056d92f314ff3e4fac0096c058a139457381 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_M32R_H_
 #define _ASM_M32R_M32R_H_
 
index 976d2b995919b86b5aabaebbc3b38d2e700f0c97..8eeaa9a420c59768d00f9f20195418ba9b5e4688 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_M32R_MP_FPGA_
 #define _ASM_M32R_M32R_MP_FPGA_
 
index aa1b7bf84f5115afabcb6a1f890e082a17ca3ab4..4effa4704347b6316b41f84a17cac40923fae32a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index 150cb92bb6664e0ead1795a81e93ebed8f33f579..34bcccd8007d9ee6fd0223d9a377fc7b679c022a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_MMU_H
 #define _ASM_M32R_MMU_H
 
index 1230b7050d8e30dfbef786c4d28f0f8f532a589d..8a499d0fb3a2f099e9a6121ffb117b7161ab3d17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_MMU_CONTEXT_H
 #define _ASM_M32R_MMU_CONTEXT_H
 #ifdef __KERNEL__
index 115ced33febdbe59de005c23f07abbf01371423a..568946c13ba67744818746606782ce798c09c781 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Pat Gaughen (gone@us.ibm.com) Mar 2002
  *
index 725ede8f28890efc8494888f17b3f7fbe1d6ba78..fe4e38b394d307c56ec88f2c74ae30e1bfc5ddd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_PAGE_H
 #define _ASM_M32R_PAGE_H
 
index 07d3834c6dec106645851972be2c171917e1694a..cbcb28b5f6ffd09e390630712bc192dc1b91308c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_PCI_H
 #define _ASM_M32R_PCI_H
 
index e3169301fe666c5a070db88c09d254443124030c..41e1680d1117462bf56f931f754af6ab4cc5131e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_M32R_PERCPU__
 #define __ARCH_M32R_PERCPU__
 
index 2d55a064ccac5ac335e339ce649cf210804842fd..eed2cad57d6818ed897242b5c7420fa1013eea05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_PGALLOC_H
 #define _ASM_M32R_PGALLOC_H
 
index 421e6ba3a173794d5a9cc8ba3b0465f2056a328f..d7ab1e94e3cb10266965e8a101c108b894f497b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_PGTABLE_2LEVEL_H
 #define _ASM_M32R_PGTABLE_2LEVEL_H
 #ifdef __KERNEL__
index 8c1fb902a9ceaeeee6d9cb24305d7f09349a2373..eb7f9050c8d612264bc1bcb2e7a3d62713d0dd4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_PGTABLE_H
 #define _ASM_M32R_PGTABLE_H
 
index 657874eeeccc262c11268094e0f0ba530e05dd92..c70fa9ac71690d2529d97e1040a87ed01a8a35da 100644 (file)
@@ -118,14 +118,6 @@ struct mm_struct;
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 
-/* Copy and release all segment info associated with a VM */
-extern void copy_segments(struct task_struct *p, struct mm_struct * mm);
-extern void release_segments(struct mm_struct * mm);
-
-/* Copy and release all segment info associated with a VM */
-#define copy_segments(p, mm)  do { } while (0)
-#define release_segments(mm)  do { } while (0)
-
 unsigned long get_wchan(struct task_struct *p);
 #define KSTK_EIP(tsk)  ((tsk)->thread.lr)
 #define KSTK_ESP(tsk)  ((tsk)->thread.sp)
index 0340633f3f4d23def1c11f78fa4184faa4df227f..a94cf1edc60f91c4402d027ce9b65afa01161b8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RTC_H__
 #define __RTC_H__
 
index 248d36a82d797de511b23c5686c5a0d52d66479b..79e98a259ebe8b6e2d46a649a95b0f42a1efb28b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 //----------------------------------------------------------------------------
 //
 //  File generated by S1D13806CFG.EXE
index 42b11aeb3249e630403fc0cb8702711624fd536a..4095f14728e54432514a11485666119a2c901eca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SEGMENT_H
 #define _ASM_M32R_SEGMENT_H
 
index 5ac244c72f1539b2d4ce0ac54fdde10bd49d14b4..b1375c841b4dadd4df4ef7be4d54ec2979652dc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SERIAL_H
 #define _ASM_M32R_SERIAL_H
 
index bbe59a9ce8c655785d3d95da0fdb4d51accfe62d..71b4d651407887117775a21760b59182cd602174 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SETUP_H
 #define _ASM_M32R_SETUP_H
 
index 35986d81a5285fd5aa23858513cf21b30e922ba7..1af73d92c96dabf9130ba6c3be96c20f09b110cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SHMPARAM_H
 #define _ASM_M32R_SHMPARAM_H
 
index ed3ded6601e81dca6716d62ea13f48ec55c2f0b7..8bf57950d21ee558f841a86e4060287079e92837 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SIGNAL_H
 #define _ASM_M32R_SIGNAL_H
 
index c689b828dfe2b0b218d6ec523c0233fddd086785..763f22700ce65b94febd6b52de334abc9c3a6e37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SMP_H
 #define _ASM_M32R_SMP_H
 
index a56825592b90a070b48a41145fb84332fd6f50fe..604af84427ff3c3ea5e03469edfc1fb147dae723 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SPINLOCK_H
 #define _ASM_M32R_SPINLOCK_H
 
index 92e27672661f8c367ed1359bacdc207b7832d9f6..bb0d17b64198e53b9466175779a7c8137b5f31bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SPINLOCK_TYPES_H
 #define _ASM_M32R_SPINLOCK_TYPES_H
 
index e61e2b0bfc1f4c423a84ca6e6c6b6de2905d4e24..a9ea3b6c3e5a20bed15d66cfb5a4b874cbf2c5d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_STRING_H
 #define _ASM_M32R_STRING_H
 
index 25f316f2b78dc8420efb405e94465fc56c81236f..22c8516d3c181559b712ed63e87b865670ae62a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_SYSCALL_H
 #define _ASM_M32R_SYSCALL_H
 
index 680898f0b3d6306be1b2f3629b10d43929553760..40274b89cea5299f268aa5b7ac3908711b8d4d41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M32R_TERMIOS_H
 #define _M32R_TERMIOS_H
 
index f630d9c30b28ff5d9fca0e7b0331df834b36a03c..b3a215b0ce0aaa15a947c89bbf48eacd69b4b4b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_THREAD_INFO_H
 #define _ASM_M32R_THREAD_INFO_H
 
index bb9fe4feb12d51847cf0a42de2183699b270b41c..a4f9f852d9e604c82cbffece43b0bda9cdca6699 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_TIMEX_H
 #define _ASM_M32R_TIMEX_H
 
index c7ebd8d48f3b3ab7875db212c81ab5e243231fe3..3576f88b6ea4c94dedaf382849616a400e9647e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M32R_TLB_H
 #define _M32R_TLB_H
 
index 92614b0ccf1754e2cae1f653b30e797b613792d8..f6c7237316d0ef07d526df9c817116b396e331d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_TLBFLUSH_H
 #define _ASM_M32R_TLBFLUSH_H
 
index d607eb32bd7ef5d3a8030a139a3d4174d15aa509..ee79404e88783a6c63dcad9a4a1d0b58d1072aeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_TOPOLOGY_H
 #define _ASM_M32R_TOPOLOGY_H
 
index 04a44c6ee34d189112459a502ba22c8622126b23..fce0bf60536c2535955038301d4e7b0b070fc41f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_TYPES_H
 #define _ASM_M32R_TYPES_H
 
index 496c4716dbc81e12ded302d85fd8288f988be68e..9d89bc3d81812f79d1fc27450860f5af5dcf8a6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_UACCESS_H
 #define _ASM_M32R_UACCESS_H
 
index 09324741eec39780f483212f00fda95b75c5ffa9..5f9de37366244f36a830f92b41a7984e053336dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_UCONTEXT_H
 #define _ASM_M32R_UCONTEXT_H
 
index 377eb20d1ec6dfdac60920f04bc6dbd2e4175ac0..5981361672f9a39b96d4b41022e40f5583a08646 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_UNALIGNED_H
 #define _ASM_M32R_UNALIGNED_H
 
index de602533a3bd28f410b13542e010404ca81a0cab..dee4c196972e0dea001c2b9e18c08c8a6a758c6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_UNISTD_H
 #define _ASM_M32R_UNISTD_H
 
index 03b3c11c2aff2ba5b2580d96c2c534d65b1f074d..489b60d4aec21e3b29d0dcbc64c00bdb1b007562 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_USER_H
 #define _ASM_M32R_USER_H
 
index a1b63061c06fee0a28571f13d100f72e95fe8f4e..783d5bf779c220a56c736bd8fc95db26a1c2b270 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_VGA_H
 #define _ASM_M32R_VGA_H
 
index 6d525259df3ed0e1effb85afc62ef886ca9c9fe2..a4d546752c777654c8f486d191d9b7c9c3ea4555 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M32R_XOR_H
 #define _ASM_M32R_XOR_H
 
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index 21855d8b028b5ddd62dd2600ff4ef5e3ab92fb9e..9b4a8ba483cdad4199422442b13f222a10945d71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_BYTEORDER_H
 #define _ASM_M32R_BYTEORDER_H
 
index 777149262aada2d5abfcc13a1659f3458b6ee77c..ab38ef607882a1daf2ca2cdea318abdb63eda5f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_ERRNO_H
 #define _ASM_M32R_ERRNO_H
 
index 46ab12db57397dfc44a7aa84f9c10ac5e97509d9..a77648c505d1784915fc69283e7448b24b471c1e 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/fcntl.h>
index b279fe06dfe5bea925eccf4b39c8908b23379b6a..b809c4566e5f8b119f98aa55173938912203723d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ioctl.h>
index 349bf87bfbd050131fd25a662110231fd77749b7..31da4c3bab9401b3b0f3e2bb91e260e58e3f737b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_M32R_IOCTLS_H__
 #define __ARCH_M32R_IOCTLS_H__
 
index 84c7e51cb6d0befd2b3c013c8bbbbaad6ae02297..90d6445a14df81c369ea5e0b04f0d48086c10a7d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ipcbuf.h>
index 0d5a877b813e4390c24edfe5e84ca007eb4df660..4386ff2735ba56f71108a0e6069a91b69a162fe2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_MSGBUF_H
 #define _ASM_M32R_MSGBUF_H
 
index fa207bdf96e75eb444f8e4687a8e6f2185211479..0bff6d6133f507291bb26fb03aa88b3bbd9b1ef8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_PARAM_H
 #define _ASM_M32R_PARAM_H
 
index c98509d3149e637951f5edf96116a70ed9d8bc51..b7132a305a476847d1b05aabc8087c89e6523c1d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/poll.h>
index 236de26a409b3f9a3d85df67129d88a488d025d1..63316fcb1b570c28a67e2cc6764120dc7494e30f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_POSIX_TYPES_H
 #define _ASM_M32R_POSIX_TYPES_H
 
index f6930a822517e3ec32ed1bdbfae11ee47377c769..99aec86cf5c0f73fc287397905b86283ca55eb52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/asm-m32r/ptrace.h
  *
index b1ce766e37a02e5c2dbd2c290f84219db812e823..3282f3c4a5caf9c395830a4fafa26949a55fe397 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_RESOURCE_H
 #define _ASM_M32R_RESOURCE_H
 
index c9873d6890e283cfd035a1d5be8b3e50981dc1ba..de34664d8cd720750730a29dd790fb6c2a26decd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SEMBUF_H
 #define _ASM_M32R_SEMBUF_H
 
index 96961a42e5f48162591369bdd2ed1d3b68291d87..d936a64bbafdfa147e02558a04a8becb910aa2f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_M32R_SETUP_H
 #define _UAPI_ASM_M32R_SETUP_H
 
index b0cdf0aa7d654ca4a7aa8c0531323eed2c91eeaf..44c2ea924829391b11245c77106f8af68b34d145 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SHMBUF_H
 #define _ASM_M32R_SHMBUF_H
 
index da4a9c36d09b9e224db4de75ff2f765acfb9cc64..cc9ee73525ff8ef2322dfd8d9f82092f477980cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SIGCONTEXT_H
 #define _ASM_M32R_SIGCONTEXT_H
 
index 54acacb1f1f7f69df43bf17006c251f09a6c1abd..c2ac3417fb9846b92868e68df309e88fa32e217a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_M32R_SIGNAL_H
 #define _UAPI_ASM_M32R_SIGNAL_H
 
index e268e51a38d1db46a07cf5304d4eca099d360911..cf5018e82c3d897bdc9a5fae027bff343c4ff686 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SOCKET_H
 #define _ASM_M32R_SOCKET_H
 
index 6c1fb9b43bdb1fb928d5c14fc10f7e97e5c51e48..948229e474c5ce704047e79bc3c7f661b69637b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SOCKIOS_H
 #define _ASM_M32R_SOCKIOS_H
 
index 98470fe483b67861b952f7c35bb946111016c9db..0fe9f96ce8f058fca2fe1171abd56c5fc1ac0672 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_STAT_H
 #define _ASM_M32R_STAT_H
 
index 6eb4c6007e6bf364211434801d60b6b66141000b..d42ae20dbb2b60d724caead217a6c00df6218007 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_STATFS_H
 #define _ASM_M32R_STATFS_H
 
index 54dab001d6d12d86766fe75e4eed06158a823a50..18dce47d28417021ab72e0dc6fa5cb7f75f2ac9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_SWAB_H
 #define _ASM_M32R_SWAB_H
 
index 957a3c688549f48c1981dba0d0364bc0e6471513..6cbbae9695b4fb479c17a11dab5baf5336cb68dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M32R_TERMBITS_H
 #define _ASM_M32R_TERMBITS_H
 
index 07ad27b8f7db136821d9a157386c52b4e277dc20..9b80a85e83acf5077a807bea117957498924b70d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_M32R_TERMIOS_H
 #define _UAPI_M32R_TERMIOS_H
 
index 5a54f2ae3b51e59d4a1edba318a5d3560f34cd54..adf8666a68ef42d5dca5db7aff0414b1cc1125be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_M32R_UNISTD_H
 #define _UAPI_ASM_M32R_UNISTD_H
 
index 0c09dad8b1f8ca41fe0b5b6e8a55a98665ac7fe7..bd94dca5159682b6b40949d8e1286034368c49a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/M32R kernel.
 #
index ec51e5b34860bcfd5ccca990e78ef9553b566450..2919a6647affe3869b85acd23d1fd5c74dc96143 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * align.c - address exception handler for M32R
  *
index cd3d2fc9c8df032ca9173af69e0ce0026981b333..7cb90b459e07946238b9a4ee2d59b4706f679959 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/thread_info.h>
 #include <linux/kbuild.h>
 
index c639bfa32232a29fe001ec47b956a60e9bffb305..bbf48f2aa2a71db9a86cb3d1283e117385b75c9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/kernel/entry.S
  *
index a46652dd83e625c24bd3362a9437af4ff45332d8..1f040973df1cbcf57b75f5e3c6fedc049c1d3291 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/kernel/head.S
  *
index 5537f73972976cdfb634144fbb9424e9bcbd5984..83b5032f176cda472d93d0fbb73d60c04fbd0ab1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m32r/kernel/irq.c
  *
index 68da6b800453108cd093845dce7b18c950b04501..46ebe071e4d6ebae6d9c5146f2c0353e10ab9b65 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/user.h>
index 8cd7e03f4370c06a633d2a12b5db70299ffa41ae..a1a4cb136e9983df4515d2101d85356ae6d2da9c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/kernel/process.c
  *
index 2d887400e30e3e77ca852c00fbcbc6bc5ab383bc..d702a5ca0f928e25286e90045a75aeebba076904 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m32r/kernel/ptrace.c
  *
index 1a9e977287e61578604c79801564e6239bb8e139..b72d5db39f00c52bd825b6c724d512298db23c96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/kernel/setup.c
  *
index 1ed597041fba46b85961ec31a77481652843e082..ba4d8d6330f1538a6a74226bc7cf01072a9b2626 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/kernel/signal.c
  *
index f34957032504e3dfa10a159caae7588dd1be9992..22a50fc49ab7282c48a577d1d1b5df40029e7ed8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m32r/kernel/sys_m32r.c
  *
index f365c19795ef52df3da1429fc83fed3237fc09aa..cf0bcf014b9810177dfc96c7916d75c5c6bdc038 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 ENTRY(sys_call_table)
        .long sys_restart_syscall       /* 0  -  old "setup()" system call*/
        .long sys_exit
index 093f2761aa51429e904cea297d14b3e405e9f65c..521749fbbb564f084beb4799e4cbaa09f22d57d2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/kernel/time.c
  *
index 647dd94a0c399f13f8311e751d273b033908328e..cb79fba79d4391dbe07cd517309f77cbc5b05506 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/kernel/traps.c
  *
@@ -114,6 +115,15 @@ static void set_eit_vector_entries(void)
        _flush_cache_copyback_all();
 }
 
+void abort(void)
+{
+       BUG();
+
+       /* if that doesn't kill us, halt */
+       panic("Oops failed to kill thread");
+}
+EXPORT_SYMBOL(abort);
+
 void __init trap_init(void)
 {
        set_eit_vector_entries();
index ad1fe56455aae60b05b9e1a30294ccd2ab7b48ab..7e4d957f7f7f00c62a2facbc1ad1f155d6d1f9ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make M32R Linux kernel
  */
 
index 7fc0c19801ba4a3a688a8e8bd6e95daa8c1d9137..cd1acca539119604869514f5d30b6f32b1dc1549 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/arch/m32r/lib/ashxdi3.S
  *
index 940f4837e42b92a359fe7d56fcdcda555f22e504..ae1fe90892f913e4decbbbffcd49567d83bb297a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m32r/lib/delay.c
  *
index 267aa435bc35ddcfa90c51e1c5192379c4ec0778..4854690d944a7e6ae33395795a65e883a1f8715b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LIBGCC_H
 #define __ASM_LIBGCC_H
 
index 05987cd639ef70b9fa193ff3c0351e4f9215b4e0..249da3e3358dd66882bcf542b8b5d4dceef876b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/lib/memcpy.S
  *
index 2b2831a379273730c79c026e64bc911d3e456caa..e7f45e6c73f53351f504bb470b5a5fd25be06553 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/lib/memset.S
  *
index 916de9e8f80121cdbdc51d733b11d382636a0292..41c77e387593804a731351c6edbe3ad8156e1ceb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/strlen.S --  strlen code.
  *
index 9d3c682c89b558f99833fe742e0d5d18e59f270a..e20fa3484fd8ee23145ef3d3b496b5bc311acf89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "libgcc.h"
 
 int __ucmpdi2(unsigned long long a, unsigned long long b)
index b723b11107c70f9ae119d608f98bb47fbec55094..0892a4341b3a44f865f795930ecd1651724e6a73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User address space access functions.
  * The non inlined parts of asm-m32r/uaccess.h are here.
index c51c1c3b4a5f15cde1436d3a81af95263115b3b3..cb20d90c51d170f465fc3e128c55bf7375402043 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux M32R-specific parts of the memory manager.
 #
index fac759584875a63e6b3209af10749469a2fd4408..0d1ae744e56f3b656eb4bc4b6df36361b52dfedc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/mm/cache.c
  *
index 27196303ce36e3ba9c83e8574a99f2d0a36717b2..eb8e7966dcaff177ea417526a8a3379d9c107633 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/mm/discontig.c
  *
index 8ac8ba6ef60c47db41474bc097ebed6d26084f57..066982756a4e53db0dc1b0182c58c0f2ada49e00 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m32r/mm/extable.c
  */
index e22d5ddae5cbf35c885561d3d4bda96973e3fa9b..240e00067d5e0c8b937b2b643519738e366c3d32 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/mm/fault.c
  *
index a05dc31845940db842997f691e5a5d7c440ab77a..46d9a5ca0e3ac6eaece464a1b327e7dc16ecf2a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/mm/fault.c
  *
index 11fa717d93b19f2858eec15acce07a9c82617ca7..93abc8c3a46e3cceb7ebed0e7d22f2479a2f904f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/mm/init.c
  *
index e9491a5ae827a99f530afd409f1800ff4e54a9fd..fd8f9c9b7b079eabc3142a0241d913084d965753 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/m32r/mm/mmu.S
  *
index 06e7c81ead2e5cb39bd39573562dd35fe1886675..8e63a3a5a64cde01b5c9e2ebbca43f4b34221042 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \
index da03e1a8fe91dac52dcc49c64d3a895d24382264..9e1a82529ad9a7ca97bac63af6b463f73e6ca765 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # arch/m32r/platforms/Makefile
 obj-$(CONFIG_PLAT_M32104UT)    += m32104ut/
 obj-$(CONFIG_PLAT_M32700UT)    += m32700ut/
index e5d8be6fbb2d333bb86b4a685109f58fb785978b..ff2bb3b58bb5e5b6c8cf0fc0ce1f792141c46a5b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/m32104ut/io.c
  *
index e2dd778aeac76cacadee6954b534a774e6485260..297936003b1fcbba244b638a2cd259a18aad094c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/m32104ut/setup.c
  *
index ac1c396d477de375a271efeaf810c71945d2cc6f..06ea6d9bc576adf3bc00ff73fbad9a1d8b1fc166 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi/io.c
  *
index 767d2f4d6ded8e0a1738c5fc708586b30a9d0fac..c8d642ec4bfb55f320fac47a60a0fefb5a219a48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi/setup.c
  *
index da58960b3f8ac2a52b86e52b0c012ce73912a73f..18a408ff3fd10d7e7fcb8d721fc043d6b8a3d622 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi2/io.c
  *
index 76d665abf51e1cac475ae9a7983a9570a509d9cd..7253258a788008fa64d530928de5f284437affbf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi2/setup.c
  *
index 1bc3f90fdc53feed873a857e37339b1050ddf4ac..e7edcab72a6bf17d1f745c159d4cac055eecea15 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi3/io.c
  *
index a3646d4b05bddf67fb268727dbd0371488806a56..87d2000081f76aed63dcdb00689ca5e0b3685df7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/mappi3/setup.c
  *
index 364a3b2e8907d50e57bc86e1462ded25e6157652..3ce1f3ac0d16128c5009401ed121aa85d7271329 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/oaks32r/io.c
  *
index f8373c0695248fc573b22136fc9e2bb2120a0d72..8188c0baa06422ff5c61f16f3bb2db779b71e88d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/oaks32r/setup.c
  *
index dcde0ec777f6637a2cc418d88f7ce55418009323..ba828b16c6e31d86f9d425b2a8d4aff1881f4914 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m32r/platforms/usrv/setup.c
  *
index 1eab70c7194baa0020b7942efd43c0a28475f2f0..4f7d4b45a46fccc291e592ab0283f80288b77d09 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ##################################################
 #
 # Makefile for 68000 core based cpus
index 6ff09beba1baef02f391a4d8bc0ca4dc2bdee27d..1afa33955368667c2fd5917cbda02d3305bbd788 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/compiler.h>
 
 #define splash_width 640
index c466db3ca3a835289b29ab1d6cb29c4101d0b685..b4d7e6c26cad1f77d210b5fe3bf867e4a2be320e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/compiler.h>
 
 #define bootlogo_width 160
index 536ef9616dada6544b994cf8b20f121b5b74bc18..140220662e33e9932e6d8442f0346ec74b48138c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * head.S - Common startup code for 68000 core based CPU's
  *
index 353d90487c2b9e74bb56e3b35205ae74901b6325..785612b576f7df4de1f6287426ce79a49aed8255 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config M68K
        bool
        default y
index 675b087198f6a0adb0d5080420669a7d31faaee8..d5e66ec136db9a119b2a00cfca3088233c27f3a1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MMU
 
 comment "Bus Support"
index d2219f30b78f0f48900abe98cf2820c50d1b9677..ff5f0896318bdd70b5b5ea4ea8155241cf9431f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 comment "Processor Type"
 
 choice
index 50a67d08aec44da323a0f82b620ebe7cc1df24a7..04690b179a6e27869ad7929adc50ec9238143976 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 42b6fcfc30ef5ae7089cf76c051118957ff5ee8d..3e9b0b826f8a17d22d06c4823b105f409ef563d5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MMU
 
 config ARCH_MAY_HAVE_PC_FDC
index 9225b4ad9aeba7e8b8a13d0c4c1718e8af51aeb9..5cd57b4d3615625c21ff6193c6739e455082da25 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 comment "Machine Types"
 
 if M68KCLASSIC
index ba03cec3f711e024422fe916a407b4cf56556f76..a537953bc10cc6820f160d87df7db0f483d3b7b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
 **  linux/amiga/chipram.c
 **
index 432bc8bacfc2b376dcfcb5a439a6f16e637ab503..0d27706f14d4c01967e051b2c6221cd049435883 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
index 17be1e7e2df296dae497bebb81cd45d25184bd6d..02cff7efc8342aa6ea302c4aa46b21269ebf3561 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 
index e4f1faffe32bad16b950dfd51037077d6df372eb..b43eeef0982c117fdb39f63a6feab59e18e99502 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Real Time Clock interface for Linux on the BVME6000
  *
index 4aa2c57afc352abd8f0f4f36f1a60f0bd430c410..f8cef9681416c7b1753f0648c4cd166210e3dd9a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the m68knommu kernel.
 #
index 71beeaf0c5c4663210d8f0dab0a7b4c449187a3b..98ee89b87439cdc47cf251f40e0a55224809ab33 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 856069a3196d224d7ee39a980289dcc738b691b8..849cd208e2ed99e68c3244f6146c8f4c88d5dde1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index df5ce20d181ce8c8b5e8eedf79a7cd4b1f8242ca..c3279f7467d7cbc5ca8d249dce570a23db0f40b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 8273eea5787455d34e93f281b9c368d490bde9e3..cbb28943960651fc172a77e3f1124ab4f35bc07c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dma_timer.c -- Freescale ColdFire DMA Timer.
  *
index 46d50534f981a30891c9053998d57332af86ceb4..3b9d4fc6f12e2f32db29fd3198226eceb73e225c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index bdb472c48401d791eb6cb7ca1886dec417a1880b..c6d7fd28c60237f1a05659f3527efe1d81ca2887 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*****************************************************************************/
 
 /*
index a3bcf0883f9827aef906d3c6ec90fc13f770ffc0..2f14ea95c39119bc081c2c01cfdae4994afb3f28 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 5ba69217ce6c792b887815873151a28e8cccbd3a..b5b2a267dada3f8cc9f33eeec7ad264bc2754a43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index f7a0fcc5618c3fe86bb64c4b5850064227d6fe60..ddf2496ed117424c49e06a35c34bbe9f7e4bddc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index b16cf9b4580ca69b25cdeef11553a89c6ccfe74c..0590f8c421f194fc1acf105fcba13e3241433263 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 110e2cd34e62e53132c0f67ade2ae69771635c74..1772359c416cef4c0c38561bf1ebb6b145df108a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 9abb1a441da082e2fcf8724a0171adec50e4e7b1..ad1185c68df739eb9f99d6d847e5007810205255 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index b10b436b5a31919df7bdc50ff0bc18e18707faa9..cad462df6861bf46d283361ef21c6a8b9a4234ce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index ea76998d5ab97c20144ae4c84de6f200f911ee22..7ad3193887e87b396ab0d369229c32763e4dced0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index cc5e8a50a4231142cf9b015f7725e88e20acb39a..64b4b1fd34ffdee95e078dc0030bfd82b3a2ccdd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 38863ddbeab0905909ac595693a8e02028176812..0400d76115a18dfdaed678e5031ae526f294c659 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 04fd7fde9fb399e2b7c1c32f60e61f35e2d71d27..315d14b0dca06b523237ec0a9202b49ba203ce39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     m5441x.c -- support for Coldfire m5441x processors
  *
index c552851ec61762fa3e476fdc2a547b396a4e62f4..e53ffed13ba882fe7eb218b8bd7850aeafaa3e98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index ddc48ec1b800300d6496479c8e4d4a1cd5090102..ea8df6e7a6cc6fed2705a16b4b1d3996f4baff51 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 6c0878018b44b616020687af52af40d3056860c4..eb6f16b0e2e6cdf64b8ce9d396c02ea1df8db695 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 3292c0d68b18b69ddbdce8a37d24dfa06d6d8c27..1b11e7bacab32191452d8e0a56f64e2cf800424d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 2dc7a58204f654b69af1b6323927dd5cf2934071..227aa5d1370968265c9f10b3ff3f982b6adae78d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 08923fe600e013d95610376959016e77064f3f91..3bf0d69eec9ef74d5767a295fabdcf6af6859c0e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /***************************************************************************/
 
 /*
index 9506d883ace542bb0e438779f73f331fb2b755ff..aab04d372ae7d5abf38fa115602d5c668d6cb5bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Linux arch/m68k/fpsp040 source directory
 #
index 7cfab158fb616218cadeab81f202a684f05d9565..a19bcd23f80b30820694cb0d2787319ae5384444 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/hp300/config.c
  *
index 749543b425a4b2c6b547485af5fe55c02583f933..289d928a46cbe1c2cbcce1f5e94dc9fbd43db331 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/hp300/time.c
  *
index b61230e74e636066da66ca895ef6ea7b90f0a41d..6e14e92260fd855f980d616e1f09ff8faf19b0d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* include/asm-m68knommu/MC68328.h: '328 control registers
  *
index 703331ece32861c1c1d38f13361b44e02d61b8e3..c50b9f6a8f66afdf1e5bb08f85c7a45c166ba487 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* include/asm-m68knommu/MC68EZ328.h: 'EZ328 control registers
  *
index fbaed7ddfb41526a6a44bb849f1724724eb2bc61..dc894cfcff684209841197724c1e30051a83726e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* include/asm-m68knommu/MC68VZ328.h: 'VZ328 control registers
  *
index 8a48e56f2d62cab6e90562bf0e0bab87dd759268..195d7fb1268c9a9e7d90285b4705a26695e0070c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ADB through the IOP
  * Written by Joshua M. Thompson
index 87fc899d32eeba4fa057d52ce172e25fa8bb0664..52066f3b8658a54c45fdcda08a08445b9a4d6e92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* apollohw.h : some structures to access apollo HW */
 
 #ifndef _ASMm68k_APOLLOHW_H_
index 8456889ee7da275662978afa3c1453f77a416d30..ad7014cad6339ea6efdf5f16aedbb9ceb22f3390 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_FD_H
 #define _ASM_M68K_FD_H
 
index bbf80949fd9f29b743c241cef0b5417e020cabd2..c31b4919ed2d5af8e86838cd72ba816dd43a995f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FDREG_H
 #define _LINUX_FDREG_H
 
index 93be7da9f2c72edc697a0da893511e1cdb6de013..c4a6a06e68c82a59325b441b0f7bdb90b9119bb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ATARI_JOYSTICK_H
 #define _LINUX_ATARI_JOYSTICK_H
 
index d24e34d870dc4c4a25bc450e3b218c298ce6cbed..70de9b12470a9b65713b414236a4f714c56dbb05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _atari_stdma_h
 #define _atari_stdma_h
index 4e771c22d6a97f56beb71e59b59dc2f1df12d39d..1fc19102aac95af4ca135ccc0c3f7d97e77e18c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_ATARI_STRAM_H
 #define _M68K_ATARI_STRAM_H
 
index cf4c3a7b1a45d2bfac701d4e6a8a44e2f7f260d4..e993e2860ee141ec711a5115ccbee577dad35b58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_M68K_ATOMIC__
 #define __ARCH_M68K_ATOMIC__
 
index e518f5a575b73aa42ed0e73298944b3798d4480b..1dab93ddb090d87015bb5d9f922905f9a309a619 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* bootstd.h:  Bootloader system call interface
  *
  * (c) 1999, Rt-Control, Inc.
index 5bc8d91d68d42bf0e046fd046e3f5c9a623a7df6..b7e2bf1ba4a60d1e139aedf50c7a82fc0b0235cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_BUG_H
 #define _M68K_BUG_H
 
index d06207b9ba5ad25f449831d72975f1136b0d3207..745530651e0bfd39a6b1c06c464eb8e4cbdd66ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/asm-m68k/bugs.h
  *
index f40d2f8510ee9c536f0a49efc03c22bac1a50028..7b1309bb2c0715ffe8048cfea89b00e84188b3c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_BVME6000HW_H_
 #define _M68K_BVME6000HW_H_
 
index 0395c51e46a6cab11bb510271ca9413f671f9314..9c06458f3bc9e4829e56da928f4e375bf62cd960 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-m68k/cache.h
  */
index 4fc738209bd1b2585110c9fc93716c8d1c5b3e47..29b8e638b912ff806e0d0ec8d11b543825f8f3ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __uClinux__
 #include <asm/cacheflush_no.h>
 #else
index fa2c3d681d84cb5d0abcd562fcd64642cbcdcb2a..1e2544ecaf88c403ec420084ffc3cf491d7362d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_CACHEFLUSH_H
 #define _M68K_CACHEFLUSH_H
 
index d2b3935ae147ae68b4747c3e56e9185e98c6e527..11e9a9dcbfb243018eb990d7f1a03300a912e607 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68KNOMMU_CACHEFLUSH_H
 #define _M68KNOMMU_CACHEFLUSH_H
 
index 75e91f03b17825290bb5b76b07b501da86232d5c..f9b94e4b94f97b9ca473f8679ed0dcec46fa829f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_CHECKSUM_H
 #define _M68K_CHECKSUM_H
 
index 83b1df80f0ac0e69c9cf0662981a24358f29a166..38e1d7acc44dc5b7da058989d329f305e55b2d66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_M68K_CMPXCHG__
 #define __ARCH_M68K_CMPXCHG__
 
index 50aa4dac9ca28ba444ced005a251e9de54bfbd7d..d9cb26fb3e65709ddf3b25b441d8464e51858c7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index d1ea750bddfe05fbce1f9226b77ebd72a2ca1803..f82ca0ab38bc263206c882cba8f067dfeb9fb592 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_CONTREGS_H
 #define _M68K_CONTREGS_H
 
index 91fcc5358cfea7c77b44e62792bb1e6ae497180f..6390ef2f7f864908e706827587e422e7e365c139 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_CURRENT_H
 #define _M68K_CURRENT_H
 
index c598d847d56b214a653dfa09924471206e44f123..7f474121e4ca5c067c622359211504929335ec0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_DELAY_H
 #define _M68K_DELAY_H
 
index ef881cfbbca90987bf0e93c9271537317c15886c..365f39f5e256f08bf12b887bd8a935cb4cbf0eb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_DIV64_H
 #define _M68K_DIV64_H
 
index 9210e470771bd43e5a7be7a8df08f9c05487713b..3e1a3ffba291a5006c556d0b22702936fc50a37f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_DMA_MAPPING_H
 #define _M68K_DMA_MAPPING_H
 
index 208b4daa14b334f4ce4365e8eb88ca91ab30b818..b0978a23bad1d7ee8fde98c13eec52a419fd5d29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_DMA_H
 #define _M68K_DMA_H 1
 
index 890bbf7e7758b1f3613479d562b084c99ae19442..f609ec1de36d0d2c29243259a520b2505427c2f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-m68k/dma.h
  *
index b1c26de438be21c7b22f8a2de1247f35fa7c8cd9..3d387ceaea3fdfe2dc0489525640b6e90fe94db8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMm68k_ELF_H
 #define __ASMm68k_ELF_H
 
index d7de0f1a8957b2d5669f475cd073ea12cbffd3ba..9b52b060c76abeedc000b0cffb9274543ccf99ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68K_ENTRY_H
 #define __M68K_ENTRY_H
 
index be4e4c6797e822eb497e72d59f33145efbb099f1..b86c6e2e26ddc04f8197a516b333b9e32771da28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index 0a21da87f7d6b409dff755b0e34434c2917ce278..590b923c470d3e560834745d6b58e219ed07c908 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_FBIO_H
 #define __LINUX_FBIO_H
 
index b2a41f5b3890a524d0335b89aaa3111194cd189d..4f1d1e373420422542a4ed9d567ae46cd2c59cf6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * flat.h -- uClinux flat-format executables
  */
index 526db9da9e43a3e6adf4bd939f4ff2e5c6347d74..ab12be88d75f426b753d3c7b97e1f57c8d562c5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68K_FPU_H
 #define __M68K_FPU_H
 
index 6c618529d9b96e3815568a486a146c31b4b6a005..11793165445df45aaa8c26928d03455b8656f76b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68K_HARDIRQ_H
 #define __M68K_HARDIRQ_H
 
index 6407af84a9948f512b58cf9a21a4bcd4896ce5da..6d0d0c893f16dd4954a8ee76ef7dcb5b0b3f527b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HASH_H
 #define _ASM_HASH_H
 
index 64f5271dd7be2ec70f4503af410a7af48362dfad..0909800beef4e22f452f094c931468ae9d117bd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_HP300HW_H
 #define _M68K_HP300HW_H
 
index 402c8a4401febe14ac2b73d421a072224988c816..f8d646205ba38c9de4c1f2b269dd9ecd60bfafa7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Routines to test for presence/absence of hardware registers:
  * see arch/m68k/mm/hwtest.c.
  *  -- PMM <pmaydell@chiark.greenend.org.uk> 05/1998
index 492fee8a1ab2e6491f52c961b1a93017eef49a41..05cc7dc00e0c14371ec7a5b7ddcbc5b06ca1642e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1994-1996  Linus Torvalds & authors
  */
index 160616a89e05159f105a84befa7fc4d89b7c81e3..13b099d011b5f09b421cbc5725c86826896da9c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_IDPROM_H
 #define _M68K_IDPROM_H
 /*
index f482902cac8a90ac0fb83fa4051936664e49bf23..b696348f9ab81da1dfc5149dbc0e0135910b741a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SUN3_INTERSIL_H
 #define _SUN3_INTERSIL_H
 /* bits 0 and 1 */
index bccd5a914eb6fc6c733990141f8e78f60391efda..756089cc019cca08259230ba6c7688d3e06ad690 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __uClinux__
 #include <asm/io_no.h>
 #else
index c98ac81582ac5c967d7bddb04ae6325bc230f8b1..ed5333e87879b40781ba233ff07276dca5a0f408 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-m68k/io.h
  *
index ad7bd40e67428fe420a71ed7e35018a2bd1236e4..86f45b403bcc8d287c9178569328b0edd502f4fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68KNOMMU_IO_H
 #define _M68KNOMMU_IO_H
 
index a644f4a53b94d73fce835168f49ee75e6c10fbc7..91dd493791d7469fad2281e8bb5973128a3669ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_IRQ_H_
 #define _M68K_IRQ_H_
 
index b5941818346f65dfbaad65823d2e61a59673f44a..3799a248109578cef4b3edc62eb61c12590c03f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_IRQFLAGS_H
 #define _M68K_IRQFLAGS_H
 
index 3df97abac147edacadea2aedfa8712471ee2d24f..f5a8b2defa4bcee418aea24ab85b23c9d6fd1b06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_KEXEC_H
 #define _ASM_M68K_KEXEC_H
 
index 066e74f666ae95e4c9f58c42010bc857ca6454ca..c8b84282764c088e1fa1beb17c94462691428bb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 0ddf3efbcae92d2b1ee01cbc254d05ceded3fc3b..ceb42670aee51d94bd17fc9cc6fb5e3b31cc8477 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 6d50cefa76c3b65ab556e7715c698b562348a080..8b3da5624a736afbbc4709133dff87cc07a40020 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index d43f6ab1edc956d7734248845d226903b47b5584..a3082411abeefaf4b0b77b4d1ad6437129f10d2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 699f20c8a0fee4fbe6e093ccf0cee8cf042f3cfb..de01b701d95fafa26bf5e766b13f8835ae8927ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 1fb01bb05d6ca263e73b4756623ed310584d1f67..135dd50f0f8f2f8506b4285ca8772a592281ce5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 35f6fbc89b92e71ba685491abb6c0c24b8329deb..d92814bf991530bc1ae2be3f5bf7f8ed56c3955c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 67f6182d10a4aa10f7464b05a4caa2284ae1a21b..7b60a57e9b70507f186c69521e2de59ee24552e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index abc391a9ae8db5b827433d85fea931276ce624d5..2cb29ed5266c7f413d3c113e0cfe374dacb10185 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index d2595e04eb1daba4602fa1c990d02ae243572ae8..25059f20524b8957989e9942a21092a302b03612 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 3177ce8331d6916d5c83362f6810d4fd28728cd5..9138a624c5c81339d8bf59246e8703134dca247b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 53329ae4d3e35cb1ceb3e2831af221bd7e4206f1..22c1c92b981115db887462b4b52ce2aa828e0b31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index ab40c16ba9890c3b15cf391ca038d4c475e23b2c..0c2720d8ede908c9d084bb7e68a164603a8bd534 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 64f60be47066ead408dd1079a4daf40295727203..4e9095b9480a4f79f38b5e74a0fe6b4b97301f49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     m5441xsim.h -- Coldfire 5441x register definitions
  *
index c6ac05cda282c791f0261dba9bed7b5ec6afad31..466df7b03c6b1fb00d3336f45d13a8537bfa05e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Bit definitions for the MCF54xx ACR and CACR registers.
  */
index 0b69cd1ed0edc3af48077b5f395dddba810e9634..b1f912157be9b022594362a66523817bc686dbd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       m54xxgpt.h
  * Purpose:    Register and bit definitions for the MCF54XX
index 7758d0a1a84d88423d2b43bf94d14035c362e0d2..2a3305f6fac6e2da02391e46d282347175f550d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     m54xxsim.h -- ColdFire 547x/548x System Integration Unit support.
  */
index fc2e5467b41e28e9cb55fb28bb6ec8b53f27a35a..0759902513458a8d549a40417b8cced86e0b8c4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Apple Sound Chip
  */
index a2d32f6589f948703462903ec844e2f4d59233cb..08d9b8829a1ab268d1dc3b4097ee5b18892d7be9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for the "Baboon" custom IC on the PowerBook 190.
  */
index 42566fd052bc0e091a4143f9fbd168c40752985c..73dae2abeba3b98e5f730aad711c805a4d2591ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * I/O Processor (IOP) defines and structures, mostly snagged from A/UX
  * header files.
index 425fbff4f4d80dce4cf1b172aa9e0d66a72b1860..56ef986c0a9b1ea529545d04c9b502e2366c4b63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     OSS
  *
index 923305117a69ad5b947129da664aa97a96daf7c5..86a5a5eab89ed57497b16504635a2eb0b0c31a86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Apple Peripheral System Controller (PSC)
  *
index 53c632c85b0377ac9bc07cf9bc09d4dbf6b8941c..de1470c4d829bb23c10e036147ef7654c31ab1f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     6522 Versatile Interface Adapter (VIA)
  *
index 953ca21da8eec1e09d1c8a8d9077e0bfce543d57..1605da48ebf2244556be005c1ca3b7e822eeb961 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_MACHDEP_H
 #define _M68K_MACHDEP_H
 
index be667e84f01b4e5c5e7fd241876985baa6fabc70..1332bad001fa47c4de85d1b00d299f6032ba1831 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * machines.h:  Defines for taking apart the machine type value in the
  *              idprom and determining the kind of machine we are on.
index 5b81ab188aa58b5ffed0e754eaee72d2a6d98fa0..f42c27400dbc4461526be21517f69b0dd8a19bbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACINTOSH_H
 #define __ASM_MACINTOSH_H
 
index b062696d5a0d99aa3b9f42fe23977c704060d4e0..eefaa3a2b596f4ce31fdf3b9213728baee873347 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_SETUP_H
 #define _ASM_M68K_SETUP_H
 
index 05b43bf5cdf3909f7ea23b2da4ed4dbb6d9dd9bb..6e9f319ce47801fb741c1f8cd14a94d0a4f3474f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index a72a20819a54535d90eef74c75ff91951e757572..412360ef1dc1d61bf6878bfa24721473cf8fc5a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index fb95aed5f428110ef54a43ef355c12ab0bf59389..8b707c249026032ac8bef80c6f1666c105d9b50d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef M68K_MCF_PGALLOC_H
 #define M68K_MCF_PGALLOC_H
 
index 2500ce04fcc412ea1be8b62830385bf047df3836..5d5502cb2b2d240dd387e0c742bf3531761a9f1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MCF_PGTABLE_H
 #define _MCF_PGTABLE_H
 
index ea4791e3a55759c77ac3dd4fe17b2c9b016a0983..0aca504fae31c87aa8603f336bea7bfc4d5cab01 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mcfclk.h -- coldfire specific clock structure
  */
index 10bc7e391c149fce54aef10aa84b633b1f6fd13d..6227317dd0f73ec8bcfac9452a2c5fd55705e229 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 4183320a3813cde14729b643f990e6df6ebe206c..8bcfa33efa0f3722bf54a41ea239e4727e5db2d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 9fd321ca0725be004416303979138c78b863cf9f..20c81e07df1b1985778b235bed23a2fbfc475726 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index bc867de8a1e9a232f879c7c12eaf042a04e7c43e..bef089510e5577bf45a17fc7432ea8455ccaa222 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index c2314b6f8caa82b3135bfda004fd6ea016ed3d39..a539f0eccfcb8217831dc12a6840cacfb5817ffd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 1150e42c3f19db6c3241bee5156a60cdde79b434..4fe83db6497da22bb85ce846c2b268b79ddaba89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index b40c20f66647120c90f044e3438b2825129c7ea0..a1f35352f32831c666d1a56445db2a311872af76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 27f70e45d700808cebcdebdb9afa4500fff0957b..bbe06cf036d157380136e9a8c29fa6e034565222 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index 8a11a63ee15a4e228d7622165f73095f59714326..5c15aacb137093e055be4aa7084c5ad548a7f341 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 4a6ae6dffa345f65ad92b69e24a1817cae5733c4..836acea8f758e321b74fd5daca970d2c75889d47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68K_MMU_CONTEXT_H
 #define __M68K_MMU_CONTEXT_H
 
index e1f1ec7b70062acc77f7bb73a4346be42a28f504..64573fe8e60d1c19b23d008c64c3ec1c197740b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_MMZONE_H_
 #define _ASM_M68K_MMZONE_H_
 
index 8b58fce843ddc2bf06a4f6f030f241a2add7b312..36cb06cc03e6cd39671d24805a1bb6c0b7c72f95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_MODULE_H
 #define _ASM_M68K_MODULE_H
 
index c895b987202cd07fbc9f38ad727bf79b53587a29..7859a86319cf7ba52127c994fde1fa2514042be2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MOTOROLA_PGALLOC_H
 #define _MOTOROLA_PGALLOC_H
 
index 0085aab80e5a76aaaabb5099be62204c5bbb72ca..7f66a7bad7a55363b23bc92ffed1dada205d4905 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MOTOROLA_PGTABLE_H
 #define _MOTOROLA_PGTABLE_H
 
index 67dbea36960fb3a7e2ba369312248285a7267143..390d7b47b8ebb5639c4742150b38db672284b2af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef  __MOVS_H__
 #define __MOVS_H__
 
index b8104310847226a1184df565b03c2f6abbb47649..9c7ff67c5ffd616d20f13d0d08cf60aded9845af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MVME147HW_H_
 #define _MVME147HW_H_
 
index 1eb89de631e5c09d1be76d0c043d2e467906b9a6..cc7f5ae1220ff73e898c58b9a56247fd118c515a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_MVME16xHW_H_
 #define _M68K_MVME16xHW_H_
 
index 926375d538ecebc4a0d898c1a02ae5739f598ba0..45716ead7b9d1a3ec47e748e665561c3f348df2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
index d6be9976f1ae723839026d22c25c57694a045a4a..d0d2039e434ece3811953af8849718dd1170b362 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_NUBUS_H
 #define _ASM_M68K_NUBUS_H
 
index d33cdadf78e1ea0dcff6b26fa412cb07b01efe2e..dd22e649f5c565aa7b05ccfddf2e49a8a5b65f77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_OPENPROM_H
 #define __SPARC_OPENPROM_H
 
index f082d03336bde13163b2b0ea715c20c00bb62a5c..48cb4fd09f8d9cce948773acd81cc16ac28dac21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * oplib.h:  Describes the interface and available routines in the
  *           Linux Prom library.
index d8a02c7e72d3e610dd85206114dd3d7b943166c2..700d8195880cf05018dda489d504487d4ba3c1f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_PAGE_H
 #define _M68K_PAGE_H
 
index e7a1946455a88a295afb4d9a7b16607e626c5943..e6b75992192b3079b35d5eb21bbfb6803d4e3549 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_PAGE_MM_H
 #define _M68K_PAGE_MM_H
 
index fa7f32d9836b3a4e58c055ce4ea57c5f6c7e6c45..e644c4daf540e97e30aaba6c2761364ea5f17f55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_PAGE_NO_H
 #define _M68K_PAGE_NO_H
 
index 82626a8f1d0a951597718ae68852050be20a60a7..11dc3cb8c35bc00501d7534c63426639564f008e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* This handles the memory map.. */
 
 #if defined(CONFIG_RAMBASE)
index c85cece778e8fdefc7c697a4704c9b1cb00b713f..becfebd5c6b753c9b785b1d88ca10594737d868e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * parport.h: platform-specific PC-style parport initialisation
  *
index 3a3dbcf4051dbb5aca1a5841762c69426146b85b..ef26fae8cf0bd68f2b7255e80a0b8c6c248f992a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_PCI_H
 #define _ASM_M68K_PCI_H
 
index 37bee7e3223d0eb6da4fe7e5c2e782fb26aa21cb..24ca46d2e0908871a3b9b18895a81253cd390b8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef M68K_PGALLOC_H
 #define M68K_PGALLOC_H
 
index a3d733b524d205778fe60769ac587f5d621096b5..ad15d655a9bfb3b5a8234ada9d97f62cd66fe207 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __uClinux__
 #include <asm/pgtable_no.h>
 #else
index 35ed4a9981aefb627ed785ce311198c59000c396..6181e4134483c26aa1a34d55e4b316ddad98f5f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_PGTABLE_H
 #define _M68K_PGTABLE_H
 
index ac7d87a02335e2280281ec99e5e60fe30532e81d..fc3a96c77bd87626a249533001ca0366d4d39d61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68KNOMMU_PGTABLE_H
 #define _M68KNOMMU_PGTABLE_H
 
index 94c36030440cc825c4688244a0b973ba60be3863..464e9f5f50ee4236f255ae013bcad86837d69a53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-m68k/processor.h
  *
index a45cb6894ad36c86c663ff77798c4b419db07c1f..ea5a80ca1ab33acfae53dea48014c2e9420908f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_PTRACE_H
 #define _M68K_PTRACE_H
 
index c48d21b68f0485fbce8dc5a85bf553b51ac05642..3a89c088800ceaacad14480209e09667a13aae04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Q40 master Chip Control
  * RTC stuff merged for compactness.
index 22f12c9eb910d62f4d693e9a26f9f01696670034..7c93ac4117b8e4d01eca0c90e501049c44f3f0bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * contains some Q40 related interrupt definitions
  */
index c3636932d4bc9093a8be79a7b55b79028560be00..b9e2808b44ac9ba5f9e06d89e6d153427d5f5b0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /***********************************
  * $Id: quicc_simple.h,v 1.1 2002/03/02 15:01:10 gerg Exp $
  ***********************************
index 932faa35655b1b4d35d870e8c881559f02ac38c5..05e940c29b54390506289930d6947ca2299ed55d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-m68k/raw_io.h
  *
index 98216b8111f08b764abcff1a472c26c54064b6bb..0b4cc1e079b5e5a8cf37df88b720198417f2de24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_SEGMENT_H
 #define _M68K_SEGMENT_H
 
index 6d4497049b4b0e5e10d4a3954f0e79738804611e..3f76bc7b9edb2f75aed1600b98ad87bcd3b8fa4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-m68k/serial.h
  *
index 3bc64d02ba5f959efbd1f6a39c5ff67e5890e4ad..8af85c38d37718968ee3f02efb7e01dc4422c474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_SIGNAL_H
 #define _M68K_SIGNAL_H
 
index c30c03d985815a83978cd583c07e7bd3b1bb76ad..f759d944c44994047aa3460f0cad77c0920960c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_STRING_H_
 #define _M68K_STRING_H_
 
index 05af2f18b3bd880fcc3468209e501efe5378d96e..5656a265ea58622507a0a65f43e36ba504fe7b14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUN3_HEAD_H
 #define __SUN3_HEAD_H
 
index 1901f61f926f5ec5b855d51c9b3fea7f835b29da..11485d38de4e6ed569c71fcd155859160e1dbb9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sun3_pgalloc.h --
  * reorganization around 2.3.39, routines moved from sun3_pgtable.h
  *
index d5104a7b5388535fbc830a3bdaa4344725876533..c987d50866b40af4ae334cc8aec81f9d5f844b57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SUN3_PGTABLE_H
 #define _SUN3_PGTABLE_H
 
index d8f17a0d8c9f6f872c513b6d5850c98e76d01465..21a75daa278f20a72e0ce008aeed166dd261efb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for Sun3 custom MMU.
  */
index f5691a1ed7cc939d1ca1a8c06c9597c22b39d3b5..b3a83bcaf47eb29f999445e2db33b2982014b644 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SUN3X_H
 #define SUN3X_H
 
index 159269b7f2e8d61e55e283f94d7e55232a210dc3..ef04c43acd13458c6d8fb2c50c5b2304d4ad6153 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sun3xflop.h: Sun3/80 specific parts of the floppy driver.
  *
  * Derived partially from asm-sparc/floppy.h, which is:
index 6735efcf5f6dd6bb97910dfb7b24a720d897c8e4..d244ca4a9149be10b413a8b1f0525ffa84b94495 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Useful PROM locations */
 
 #ifndef SUN3X_PROM_H
index 16fd6b6349822686928494e682ad66bb0631ee6e..94f02f46c5fbab84b3a50b7f13e49f53813a4fb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_SWITCH_TO_H
 #define _M68K_SWITCH_TO_H
 
index cee13c2e5161f4d3b67ba00e634c7c8b3664a97a..928035591f2e8447e68f3d8489fd6e62f047f56d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_THREAD_INFO_H
 #define _ASM_M68K_THREAD_INFO_H
 
index efc1f48923573d4731806326b1e72395775fde3d..6a21d93582805540bdaba6b7699c157a9f73cc31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-m68k/timex.h
  *
index 1785cff73449acaf43432b6a9929f7c64c314556..b4b9efb6f963be8761e0cdc830be3cb5fb3bf3ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_TLB_H
 #define _M68K_TLB_H
 
index 965ea35c9a4059dcda1d5975fdad3ac5af94a954..191e75a6bb249ed68a1350ead5a41ce15c5a5dd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_TLBFLUSH_H
 #define _M68K_TLBFLUSH_H
 
index 63ba18e4c9a26b32bbbda25eb8856c8238589ec3..e896466a41a422d99f9de5cda793777263cdd286 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __uClinux__
 #include <asm/uaccess_no.h>
 #else
index 1da1e23de74c5ed37cd42d6e5ad13499c1c63485..75c172e909acdf18f5e080c943350cb3d0067cfb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68K_UACCESS_H
 #define __M68K_UACCESS_H
 
index 53d7b792a43d93af873e1174aeda1a78a071dc62..892efb56beef81b184a8cf6e21f9cd998d613eb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __M68KNOMMU_UACCESS_H
 #define __M68KNOMMU_UACCESS_H
 
index e4e22669edc0669c55c1edc9a1947664b3c1d4bc..1523a8e5ff224fbaf0b7e037c480fd17cf27b83c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_UCONTEXT_H
 #define _M68K_UCONTEXT_H
 
index 2b3ca0bf7a0df900b6442a9611e9da857020c0dc..98c8930d3d3599077b26dfab069634045e35e059 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_UNALIGNED_H
 #define _ASM_M68K_UNALIGNED_H
 
index aab1edd0d4bade511f2ea92230d3bd533a58ad34..30d0d3fbd4ef9cfa0f67b9521a0d1c2f7c7e831b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_UNISTD_H_
 #define _ASM_M68K_UNISTD_H_
 
index f1f478d6e050d1f11e730c92a9663993e4304337..509d555977c8adae9cc11c0d6d051d1170ff5e58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _M68K_USER_H
 #define _M68K_USER_H
 
index d3aa1401e7aadef7aedd58dcd241bcf62c8e1608..010a624d1b39e91b0f21ae185a51f914f09fe12a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_VGA_H
 #define _ASM_M68K_VGA_H
 
index b8a82fb1cef8066ba99a8ccc645354d847b7da62..4aea6be7b220d962aedc1b7df6a89a472286e822 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __VIRT_CONVERT__
 #define __VIRT_CONVERT__
 
index 5ce97c22b582e316aac672db4887ee8486aa239d..96f64bf7bcaa39c4a14b45c514d928c70c3726d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_M68K_ZORRO_H
 #define _ASM_M68K_ZORRO_H
 
index 3885fe43432a79089d22527d1617927aa6ecc5e8..3eb24fd8b810be4fd4f3293f7fa28f02829c939b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __M68K_A_OUT_H__
 #define __M68K_A_OUT_H__
 
index daad3c58d2da58fc6102da2a73b2110909cdd82d..69bf4dda341e06180ad2ee37f3465372f484011e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-amiga.h -- Amiga-specific boot information definitions
 */
index a93e0af1c6fe11977c1502e87f72111bb120f65e..c226f7957938b8c530f1a2681c81f213fc3e6148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-apollo.h -- Apollo-specific boot information definitions
 */
index a817854049bb563eb2bf2287357e73dc82f5d697..f2218a090fdb37f9a637a6643cb0d9910ab44473 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-atari.h -- Atari-specific boot information definitions
 */
index c90cb71ed89a95d6ed841dab79dbe68485c5639b..2141c4f5f0a772b8e928079a6882208608c42e65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-hp300.h -- HP9000/300-specific boot information definitions
 */
index b44ff73898a9cb96f6f511d037a1863823b0f86e..449928cfcbf24cbf919324129c110ebca38f577c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions
 */
index c79fea7e555bc0bc6682c3a8dca02daf2904c440..78bda04bf78864d7923da8fb9f1bb92842aa4db6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-q40.h -- Q40-specific boot information definitions
 */
index a135eb41d6725d46797e65e084fd9cb97decf1da..f36a09ab5e79bd863cc0fabe11256d51161da885 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/bootinfo-vme.h -- VME-specific boot information definitions
 */
index a48cf544c7628dda39721a669335a668d47b84ec..38d3140381fa8e4355c71456c71199c760351cf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * asm/bootinfo.h -- Definition of the Linux/m68k boot information structure
  *
index 31b260a88803b97afecd337a9bbe509f48f2d51e..1fb5732f4a91a3c90c55f3af307fb4d6f3741b64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_BYTEORDER_H
 #define _M68K_BYTEORDER_H
 
index 525978e959e36ee13a81a8eb48cafe56c9ba8a59..6171e246ca7b943a784ae03592c9bceeb50f5377 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_CACHECTL_H
 #define _M68K_CACHECTL_H
 
index 1c369b20dc45b7587ad0993cb272dd57390b50d1..c6861e6ee31309ee6539cf2fc5b70bcc88603a08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_FCNTL_H
 #define _M68K_FCNTL_H
 
index 1332bb4ca5b0ea37342a6b453c0891f020051714..d92d7c7786bf1d4433f492e45da3b439f67ffc12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_M68K_IOCTLS_H__
 #define __ARCH_M68K_IOCTLS_H__
 
index 36265ccf5c7b520577d3729db545cfc8ea1a8b6b..726b2e7ec70dbd5c637d91fa6f07ae5e5ea267af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_PARAM_H
 #define _M68K_PARAM_H
 
index f080fcdb61bf617696c7bdc8ea9ab87e7e1a5460..c3e3fcc15e1dc0874540ab58085ce5430df442a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __m68k_POLL_H
 #define __m68k_POLL_H
 
index cf4dbf70fdc73f116f95a83c698511fd7b5f4a62..10a65149b5f224cb575432e7a445ebe4579c72c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_M68K_POSIX_TYPES_H
 #define __ARCH_M68K_POSIX_TYPES_H
 
index caf92fd34939cb6532c330af58e4ec589ea60ef2..19a1b9d0d858148599a732825bcd84c55be0a351 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_M68K_PTRACE_H
 #define _UAPI_M68K_PTRACE_H
 
index 6a6dc636761eaa210844f10614ad1633cff41bc3..25fe26d5597cc6adb3090c300e5e1c1004b374df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
 ** asm/setup.h -- Definition of the Linux/m68k setup information
 **
index 523db2a51cf304137b52315cae08ee2e4a7c8144..6cc8421c8a734f92a9379a09b7d1a3513099303e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_M68k_SIGCONTEXT_H
 #define _ASM_M68k_SIGCONTEXT_H
 
index cba6f858bb46b90bc9a3d0f03ef8f60bdd4e59be..915cc755a1841c5172ea103191af77149788a18a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_M68K_SIGNAL_H
 #define _UAPI_M68K_SIGNAL_H
 
index dd38bc2e9f989288681ea087c123c867189f8f10..1e15e6517b9c9d6f254cd35a4785537bb6050b89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_STAT_H
 #define _M68K_STAT_H
 
index b7b37a40defc82d167a354fd9a8a63aeb4e4cf48..9ef4fafba7d46519add52d70a8751d1ecaad5049 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _M68K_SWAB_H
 #define _M68K_SWAB_H
 
index 25589f5b8669631d5cf2441d7fb405a97c5561f5..de3054f8a681ef1c685a84d217ce3e53b0a98aff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_M68K_UNISTD_H_
 #define _UAPI_ASM_M68K_UNISTD_H_
 
index 74c898ced8cc0481e3fa70dc0b7e6d8b86d1994f..dbac7f8743fcc44df067d6d7137f283d14ec5866 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 3a386341aa6e282336a5ceea41b248fc45943191..ccea355052efad8994f9682eed160b9fde6ba57c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This program is used to generate definitions needed by
  * assembly language modules.
index 2a33a9645ad822a3482fc29b7dd28baed5450fb7..3b9cab84917d2831f02aa422b77bde4a4d7bc7f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Based on arch/arm/kernel/atags_proc.c
  */
index d4affc917d9da11258c72e3c61470dd4a656faee..206f849831203ca1bfd40045732b630903b4950d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * machine_kexec.c - handle transition of Linux booting another kernel
  */
index 7df92f8b0781dd2651096f83f8c45185a26be803..4e77a06735c1b8a8d591bee7bde4677495307ef3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/kernel/process.c
  *
index 3e09a89067add5a5a5bde1d42d58b390a5ea2baa..ab0f1e7d465353b87ffb243cf798a6d04bff4b19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 #include <asm/asm-offsets.h>
index 4bf129f1d2e2f83a7c9a86d5c5d129a9ba03b382..854e09f403e7eb70dfbf08a0be26e36a0f9ede26 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef CONFIG_MMU
 #include "setup_mm.c"
 #else
index 7a2c212128200920311f972a359fffd66709c40e..657a9843ebfa89d9df67f922ce2862acdb66f37a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/kernel/setup.c
  *
index 8afe6f651c1c83a3c6dc3b5c991c7b880c7b9c74..a98af10182016c4cc8426c68f05573d616712833 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68knommu/kernel/setup.c
  *
index 43036bf4aeed87acee54d7d1519fc6d707b33314..faf18f4fab1fdd9b7c2555faaa284e68a9ce5d9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <linux/init.h>
 
index 933e4815dac8609baa213f495c7c0ec4005d3c7f..27e10af5153a300f27923e9dedc9fd27bbcdddec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m68k/kernel/sys_m68k.c
  *
index 8c9fcfafe0dd90ba5f67f860e7eafb351cb156ef..2c8402e75f623a1d973feda2a2c5144de0924e61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 2002, Greg Ungerer (gerg@snapgear.com)
  *
index d2c8abf1c8c4eac6688504f2a2dfaa7ea7177e65..3aa571a513b5dfa1f48bf2e17c120289f1a0d246 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     vmlinux.lds.S -- master linker script for m68knommu arch
  *
index 5b5ce1e4d1ed90b9e40dc68fa50c3b87671a8df0..89172b8974b95444f4def01ce4104b664391eaea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make m68k Linux kernel */
 
 #include <asm-generic/vmlinux.lds.h>
index fe5ea1974b16c2efcd34b0f134dcf17a24d388b5..293990efc9173288d38313e22c81e2c93aea0909 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make m68k Linux kernel */
 
 #include <asm-generic/vmlinux.lds.h>
index 69ec796388706bbda7dbccfaf6e5ffa1e6f9d4a8..d3d3c305ebc95b10f5b3b5377b8dc10ce8fbca28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
 PHDRS
 {
index fcd8eb1d7c7d268a4a30978d0923a14544b4d4e8..eca17f14b4d5ef968f485cd9d974c2ab9dbeecc6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # Makefile for m68k-specific library files..
index 514acde3cd4005067adf3a0f7adddbc2334ea263..850f0dc284ca9e2e49f492e0a1954306f79c1028 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Baboon Custom IC Management
  *
index b3ce30b6071d76c91092db9c27c8e70798137ff9..359e63bb632d78e0375b7ce3f5b24fb89559b0a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 .byte \
 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
index ffaa1f6439aed73f84d16bfee7c99413ed874436..fa2b9604fd24331415a0e8d29250028ff4216b43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Mac bong noise generator. Note - we ought to put a boingy noise
  *     here 8)
index 9637dee90dac0ed683a58e3f78f0e62d88a45236..e3575388cd05a8ccc3e7e0ad23581460a1b23410 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Macintosh interrupts
  *
index d96348a52362ba74c98386f7fb0d2ab59b5efb7b..4956edaac926d112675b41ead4378e07b1910b2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Miscellaneous Mac68K-specific stuff
  */
index ca84dcf41fc971dd5518b2f67bf6b56e2cce8f62..34c0993dc689d07e097893c651ab2cdc18c780dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Operating System Services (OSS) chip handling
  *     Written by Joshua M. Thompson (funaho@jurai.org)
index 16629e91feba517f08d8b2ff09914871d247c681..9f59a662ace57dbc4b2dbfb7c0bb006216ec7e0f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     6522 Versatile Interface Adapter (VIA)
  *
index cfbf3205724a03c011c3f809716a16830f8c80b0..b3adb52533935eb633a6485fe76c854b1391d5e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux m68k-specific parts of the memory manager.
 #
index 3d84c1f2ffb2ef8765b5adae4bd8d334b8c78b6d..079e64898e6a534cbff8a89db39cf7e9afbc71d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/mm/cache.c
  *
index 2795e4ca09d7b4df170a83ede8d694f20dee55e4..127d7c1f2090cc931942424eaea4dd3da2237344 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/mm/fault.c
  *
index fb8be4dd38c448d75382bf5a32daf55eff0f4a03..fe99aa99987e9c38f153d54ad2b1cc512016fc8a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Tests for presence or absence of hardware registers.
  * This code was originally in atari/config.c, but I noticed
  * that it was also in drivers/nubus/nubus.c and I wanted to
index a6ffead9bef5df15cfc0f473f0be2cc853f4cf80..e85acd131fa8fe767605d0afdeacc45f8bafd505 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/mm/init.c
  *
index 6e4955bc542bfc591721aa23fdac1fdbaf66b586..c2a38321c96d6dd94e96554687db7d2b362fea05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/mm/kmap.c
  *
index 87131cd3bc8f8686ed65ad98e345b3e4648f5705..8d1408583cf42c96ce9a7f54b06f3dab862cf629 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Based upon linux/arch/m68k/mm/sun3mmu.c
  * Based upon linux/arch/ppc/mm/mmu_context.c
index 4902b681a9fccf3f1cfa7db758e8054c67ad441e..b86a2e21693ba49edf1ca178334d8e563c58bdc4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/mm/memory.c
  *
index 7cb72dbc2eaa78bdfeb0eaed19d2fd91b6888b39..e490ecc7842c9db3e8c6ace9d6d11061ed49cad1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m68k/mm/motorola.c
  *
index 177d776de1a09d5557984b9597b692c361c068c6..4a99799083576ff32beac547f7ef2972a4fe4850 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m68k/mm/sun3mmu.c
  *
index 7b24577a7bd0b24c107ee05d479375c1bd9594a7..ccbaae1125e6f11bb7cf432b4685e388ae8ebc37 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Real Time Clock interface for Linux on the MVME16x
  *
index ca02ee25894cc4a5df94fa88b9c499c4be079f54..5f92c72b05c31739b10116ca90b495da600415ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m68k/sun3/dvma.c
  *
index 9c23f506d60df450c809a4f774f8924278fb7961..1ace5353d78f537735dfadf25e5ad3a2688a146e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * idprom.c: Routines to load the idprom into kernel addresses and
  *           interpret the data contained within.
index aad2e0a0682ec23116876fe10edcc92a83d3bf59..7c67b58ebf13fa4aa7f89d32bd6f5f9d66036792 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/contregs.h>
 #include <asm/sun3mmu.h>
 #include <asm/io.h>
index 7fdc61525e0b7365ec3608dc6bffb44ad8edd784..d30da12a1702b5ef8779ebff8b295388aad4117b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
 ** Tablewalk MMU emulator
 **
index e92364373b07f8adc0b5ef7e48ab71c2addf9848..eb4f6c903fb828c3210f7fb02eaaac9d00f5e032 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * console.c: Routines that deal with sending and receiving IO
  *            to/from the current console device using the PROM.
index eeba067d565f4470937da6a40a61dcaf8caaae18..0c6d99df6aee00e9a2ca9553f15f783edbdcdc2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * init.c:  Initialize internal variables used by the PROM
  *          library functions.
index 3d60e1337f752bec5aa05e82aec8acd40800fba4..b8c95940d0897aa702027e3ac26c8146cf8c0915 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c:  Miscellaneous prom functions that don't belong
  *          anywhere else.
index 5b82bea03493e8e3741c2cb877e4e949884d409e..b6724cc6679579bdc5337b772317c0bdf803f9d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * printf.c:  Internal prom library printf facility.
  *
index d36bd15f9fdcda46d0c0459ad4a694b32fdefbf2..8546922adb47384943b937ce14aa268efd26a1fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/m68k/sun3/sun3dvma.c
  *
index 0532d64d191e75646be2e725e245e0689978512f..33d3a1c6fba042db36988b571645bcb422f9d06b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Setup kernel for a Sun3x machine
  *
index 9413c8724b0d3372bbf063118404ab5866c434fa..b2acbc862f60eb772bd43739804a10bcfc8bff42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Virtual DMA allocation
  *
index 5d60e65c1ee5274edb9b3a2898df912a246a0f5b..be14c899ab7d55b6b40ac8f88b9a205b04a6d699 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Prom access routines for the sun3x */
 
 #include <linux/types.h>
index 431d3c4306dd8da594f485dbb297830dc7f0293d..7a2c53d9f779aff6beb908eedab1a28130ad992d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/m68k/sun3x/time.c
  *
index a4f9126be7e28495cc0dca6fb439fc43a3332272..496f406412adc1df3b94efe3d98cdf29ad5d8688 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SUN3X_TIME_H
 #define SUN3X_TIME_H
 
index 113436136089e5c3abaa74dcf5b07b3198451b86..e6425b367ca8af51b5183c69eba99dd29b8f02be 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 CC =           m68k-cbm-amigados-gcc
 CFLAGS =       -Wall -O2
index 7d8b322e5101d7bd00835be59db1d494be164ad8..c7b62a3395390e38765956f8cd3b119e82be41c5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config METAG
        def_bool y
        select EMBEDDED
index cb5c9286054021273f5945880d038e7cd380cc28..ac4516c605db4460fc9cf45f907be0672e1abad3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 50f979c2b02d912b8530d869b293da0cb530ca73..c521f0e00d8ef44b1b78e0cb75598db9a7052bf7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "SoC Type"
        default META21_FPGA
index 097c6da4547fb2d1b8896e31d28a3b230912a47b..ad5dde558db10aeb65101ccb72865c1a5e02b41e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-y  += skeleton.dtb
 dtb-y  += tz1090_generic.dtb
 
index 78229eacced7ac13abdb4bc656f900b0744b3696..43e2ffe73c271ec2c15c74126f7f59b3b46ec11b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Skeleton device tree; the bare minimum needed to boot; just include and
  * add a compatible value.  The bootloader will typically populate the memory
index 8ff0a70865f65cc9f9f71d9b9f126dd7fb820793..97ae189c2dd88b1ff149f24aec741780d2a92407 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_ATOMIC_H
 #define __ASM_METAG_ATOMIC_H
 
index def2c642f05308b84815fe5bc61b748d882e3d86..17e8c61c946de4562ea7fdc9c724fa9fcfae0105 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_ATOMIC_LNKGET_H
 #define __ASM_METAG_ATOMIC_LNKGET_H
 
index eee779f26cc4c633b9e5c47e2b156e6f4f2481ce..2ce8fa3a79c2d23b3826a12da727c9a6594d22c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_ATOMIC_LOCK1_H
 #define __ASM_METAG_ATOMIC_LOCK1_H
 
index 5418517aa5eb35fdec4ab71656ff9daa5fc379f9..2661fec5696a78185aef0ee1d4f29bc75a985930 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_BARRIER_H
 #define _ASM_METAG_BARRIER_H
 
index 2671134ee74593bc89eceafaa15ae8b5f4bff12b..766ad43010ad315aeadf9cefe5012907a7b33968 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_BITOPS_H
 #define __ASM_METAG_BITOPS_H
 
index 9f8967f10f8cf20bd1f208d715da24e7ecf30e0a..ee07a943f931b7849c0f1b78b5a1727bc03cded7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_BUG_H
 #define _ASM_METAG_BUG_H
 
index a43b650cfdc00eeb287d0ea2822290469536e27f..b5df02239c8d111f1c08449cde78610162d2eeca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CACHE_H
 #define __ASM_METAG_CACHE_H
 
index 7787ec5e3ed0c344817224169297be370e828f83..2584a51eca1a68a763683295cfd9884efa6e4299 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_CACHEFLUSH_H
 #define _METAG_CACHEFLUSH_H
 
index cf6b44e916b59087d97c3a203fe71e1fc96cbaf0..79411e977586c1fa30c6f9f97aba0520bdad0394 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Meta cache partition manipulation.
  *
index f65fe83b17305b4e38db043b8d00590d8db07786..6533d14e97899b5956d68a05ba3690f5af55a880 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_CHECKSUM_H
 #define _METAG_CHECKSUM_H
 
index be29e3e44321a1aa2d3adcf069522bd5152cf4ff..68c4ab1466fdbd8b3471bdf47c2ccbc3aac8f0e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CMPXCHG_H
 #define __ASM_METAG_CMPXCHG_H
 
index 649573168b0547065c2f44c1f8716692d3a01309..5255e37f849642562a2b8c2f8e1e78f9b2a54b2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CMPXCHG_IRQ_H
 #define __ASM_METAG_CMPXCHG_IRQ_H
 
index 2369ad39487607c26ebc5c1f2bb3c61765bd67c1..c69be00a473912ff121194ca3b485f0a1a58ef60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CMPXCHG_LNKGET_H
 #define __ASM_METAG_CMPXCHG_LNKGET_H
 
index fd68504749699ea19fb8d57294dc7dac35c453bf..5976e39db2b4b2ff74ff206a25e468be5e7a2938 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CMPXCHG_LOCK1_H
 #define __ASM_METAG_CMPXCHG_LOCK1_H
 
index bdbc3a51f31cc70efd302596161f7c5bb90c901b..ca70a0a29b6145f98ecf80e4bf7494c8e17af02b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_CORE_REG_H_
 #define __ASM_METAG_CORE_REG_H_
 
index decf12969268ffa05f0c2188f24f4ca4e5b86df3..9dac67de4748ea51a23a0ea6955f51239bec25aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_CPU_H
 #define _ASM_METAG_CPU_H
 
index 81bd5212fb03eb6498904a67e376e7458a811dd3..901daa540e6e0475ef8fbe7fe5ff4bd9775d1ae6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Meta DA JTAG debugger control.
  *
index 9c92f996957a05ed8c752a1d651c0469941763c8..fd73d3d5d2942d0ea829eafcc82a30cf0116b398 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_DELAY_H
 #define _METAG_DELAY_H
 
index 0fdd11676212efb572557789d9e1061c2147385a..e3686d2ae20e1d612b1da7580ced23c0574ffb08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_DIV64_H__
 #define __ASM_DIV64_H__
 
index ea573be2b6d0550e46a170c8a72178953022f4f3..7465ce54a4a9b024e96f2c91b858efcf0fae98d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_DMA_MAPPING_H
 #define _ASM_METAG_DMA_MAPPING_H
 
index 87b0cf1e0acb0d6b4f0f38830e9be45b83697454..a6c33800ba66224f69f404ce03fccbe5d84c195d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_ELF_H
 #define __ASM_METAG_ELF_H
 
index a2269d60a945bc3cfc9f088afd0731228a27583b..b1c8c76fb77208881735cd91b5bc9d0ca0098c9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_FTRACE
 #define _ASM_METAG_FTRACE
 
index fc831c88c22abbe5988d3a7e12c6bf3204e5af64..4d3da9682233f1cc9da4e045439f502272ce1488 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_GLOBAL_LOCK_H
 #define __ASM_METAG_GLOBAL_LOCK_H
 
index 9b1d172cd884ad822627bf0f4dab12cddab47674..8b0dfd684e1538fa855e1199b3557d5574284ecc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HIGHMEM_H
 #define _ASM_HIGHMEM_H
 
index 905ed422dbeb36139cb78537692fca381d2e049e..1607363d26395f4c014e29f20adb7d5bbeab463e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_HUGETLB_H
 #define _ASM_METAG_HUGETLB_H
 
index 8f9786619b1da3555c05bcfa108cf0824a075ff0..8d2171da5414e698842d440b0f35e337b2928e15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008 Imagination Technologies
  */
index 9890f21eadbe867ef4c48f5141ce4ceadb54965f..71cd2bc547181cb99dc3f378fc95af6f6c904239 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_IO_H
 #define _ASM_METAG_IO_H
 
index 6ac6d4a051ddd6ad812571080b1c7c1f8f9e8a6d..cb02c29935a4d9ec0f13cb62c28af1e25fcfb52d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_IRQ_H
 #define __ASM_METAG_IRQ_H
 
index 339b16f062eba90c24cbb47e9ec09c38294ed9b3..e2fe34acb93b9c5da8004eae411ad3a4d47b3d17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IRQ flags handling
  *
index bffbeaa4d93bfac4cf5abc42c9ac3d4e4d840e11..f260b158b8feaf99d508dcb194b2a68bb80d689e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_L2CACHE_H
 #define _METAG_L2CACHE_H
 
index 73bf25ba4e18cd8ab9ae7b1da3e68316a68f0014..3a9024ecb827ed971a9d515bc725905cd33282b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 17999dba9275f36565a9add6364eea421ffbe4ed..dcb0d20a64fd8f7120b31cf408c0a9ef58b81011 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __METAG_MMAN_H__
 #define __METAG_MMAN_H__
 
index 9c321147c0b476e54621f6c21e962c43f80735fb..cab5a01c3dcb8ff89643fb9b0aa72411d73cfdb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 2e0312748197dbdd58bd5dd7620bcc39492bd447..7b476637962220dc99a1bd51323ff551bdab4657 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __METAG_MMU_CONTEXT_H
 #define __METAG_MMU_CONTEXT_H
 
index 9c88a9c65f5986f43b63e60e3021c99af072574f..8627fb53220626e88a4492fb2ddf65967e4f7360 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_MMZONE_H
 #define __ASM_METAG_MMZONE_H
 
index e47e60941b2b4dbccf114805f485c68be9435c37..e957171c320b09e3ff60234966df713e299cfbba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_MODULE_H
 #define _ASM_METAG_MODULE_H
 
index 1e8e281b8bb711ef89802724e55f882f11009102..9e994d77069d754fca04de5b7266ef028502111e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_PAGE_H
 #define _METAG_PAGE_H
 
index c2caa1ee436057368753bfea9fb839078d41b636..0b9d95d78b61a587aeff69790e7de34bac7c53cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_PGALLOC_H
 #define _METAG_PGALLOC_H
 
index 25ba6729f49658adeef8f3e6c1918f7adabb0f2b..5f6b82282a415e0a3cd8bb9dcebdbfe8cbc700bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Meta page table definitions.
  */
index 0c151e5af079288aeebb8deb55994ec0106f5507..a3422f06c03b0a85e787744d48a28ea71bf2d2d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Macros and functions to manipulate Meta page tables.
  */
index ec6a49076980fff90dc04ece4b389ea1782449b9..9a0c502cd4a0379a5925529b37c24e729380f587 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2005,2006,2007,2008 Imagination Technologies
  */
@@ -131,9 +132,6 @@ static inline void release_thread(struct task_struct *dead_task)
 {
 }
 
-#define copy_segments(tsk, mm)         do { } while (0)
-#define release_segments(mm)           do { } while (0)
-
 /*
  * Return saved PC of a blocked thread.
  */
index fcabc18daf2509e231b7ce11ddad12e86bfa9ef7..9074f254c9ca821ac10adc649310fc8727f540e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_PTRACE_H
 #define _METAG_PTRACE_H
 
index e9fdee9452b1f17c90700e8b29db8fdccd543490..504621d79ef5957926356e1cc9e7efc7066793bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_SETUP_H
 #define _ASM_METAG_SETUP_H
 
index 1d7e770f7a54bfca3c9382b5fe5b657885037612..8d3683d83680467e2147283a080d16d89b1d5068 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SMP_H
 #define __ASM_SMP_H
 
index 03fe255d697a3ad03e1a97ac02ad36d7a1a90425..2942894bace53b45110ac294b5e44d34d0a717af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_SPARSEMEM_H
 #define __ASM_METAG_SPARSEMEM_H
 
index ddf7fe5708a6ba079a3f50496eeec34f8de8fbc2..349938c35f2dde38776610a0832bfdc8db0922aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_H
 #define __ASM_SPINLOCK_H
 
index ad8436feed8d06234a7d6cb867c2b83466dc3353..029935560b7f9d44c14899aebea028f0604a0f58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_LNKGET_H
 #define __ASM_SPINLOCK_LNKGET_H
 
index c630444cffe90a62d331e6d47590f4ee4b458c1b..12de9862d19028c7a88dcc789a730960bd2d7c63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_LOCK1_H
 #define __ASM_SPINLOCK_LOCK1_H
 
index b76391405fea3c287bf512cf5ff172df7fbda308..cd197f1bed595c3a1340b72d4370f68c8d48814c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_SPINLOCK_TYPES_H
 #define _ASM_METAG_SPINLOCK_TYPES_H
 
index 2830a0fe7ac98ee081dc55334136537470f38608..f45e3cb2bbb543173c224fed5b4ab969a3b0ea91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_STACKTRACE_H
 #define __ASM_STACKTRACE_H
 
index 53e3806eee04f5894dc284f4bc733819a9e65c44..86f9614d5fc61ec4a187e72fd7075c552b6c38fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_STRING_H_
 #define _METAG_STRING_H_
 
index a02b955565223d29cd990cc17445934bd33c570d..eac0cf12032318b2b8fe9eb204972bb2f4c4e550 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_SYSCALLS_H
 #define _ASM_METAG_SYSCALLS_H
 
index 7711c317b1d2cca027aa9c1140e28863e98c4bc8..a0a4997e4b8a2fe9f32606ea6b027f212d19fac6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TCM_H__
 #define __ASM_TCM_H__
 
index 32677cc278aa16d310b84bfda09a6bc317ba4115..554f73a77e6e38229264d0f5a5b7aa013aeb77f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: Meta low-level thread information
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
index 048282f1cc1f805c00469d5ce3ab36c1bcbc4bd1..fbe6ee91e8e72d52fedd4b2c20cc39a1f75670de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_TLB_H
 #define __ASM_METAG_TLB_H
 
index 566acf918a646a7601d523a51bfdd16eed7e73bf..f3e5d99a3891b8bef4052dfcc401056263469ae5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_METAG_TLBFLUSH_H
 #define __ASM_METAG_TLBFLUSH_H
 
index 707c7f7b6beabb3647c70c39d34e64d7efdacc36..df0d9e6b7f129b7f09ec26986965447731538a19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_METAG_TOPOLOGY_H
 #define _ASM_METAG_TOPOLOGY_H
 
index 47469e26641aa0ea5093a8bde02e5c226d7a2ff3..a5311eb36e32ff9fc7920653f5c4010a488e7369 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __METAG_UACCESS_H
 #define __METAG_UACCESS_H
 
index e404c09e3b74a1a962585d0eb2829d8ba0a45bc3..cf2392b95a56e6d236d173d917cb46b0f1709a42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2010 Imagination Technologies
  */
index 9558416d578b58f939e1969c268fe58da6c19331..e5e03ff7e20d0df96a47cf3902278f9fa50f39ef 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <linux/byteorder/little_endian.h>
index ac94d1cf9be452f845d4328220d6f99adce423f0..1e09f1ea4f7fd0d0c7dd3363aa08ae7b189a0525 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_METAG_ECH_H
 #define _UAPI_METAG_ECH_H
 
index 45d97809d33e2c516e36ea2159ec8d783c6fd007..8ad9daa841c39e17bc2be654c1ff575378ed91ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_METAG_PTRACE_H
 #define _UAPI_METAG_PTRACE_H
 
index ef79a910c1c44dd2b55781019e72e599c0486674..ac7e1f28d584c8c124763bb8528c177c60d2b748 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_METAG_SIGCONTEXT_H
 #define _ASM_METAG_SIGCONTEXT_H
 
index b2e0c8b62aef6323b61434a6e15e589a9ff339b4..b54ef7186ca3d4d5b7eadc8cb768efd4f28a776c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _METAG_SIGINFO_H
 #define _METAG_SIGINFO_H
 
index 1076b3a6387aae8f08dd97840261c1d8280767da..30d696fcc237739beba520f1ce9146fab397b730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_METAG_SWAB_H
 #define __ASM_METAG_SWAB_H
 
index 459b6ec1584862e20212a34c56b7ed7ce57082d3..9f72c4cfcfb5e40a0c3266fd6274c66036a1b0ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 Imagination Technologies Ltd.
  *
index d7675f4a5df83a1471ea2994eafd3001058cf554..73441d8c0369ec77a4f74e73a5ac87d90b32c35f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/Meta kernel.
 #
index bfc9205f964767491a2b7ae91450388f7ca53a43..d9b348b99ff216d7b067981265b53497f2dc0ea3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This program is used to generate definitions needed by
  * assembly language modules.
index db944c2e7d889a1c32d55a750e78a2db6dce6905..6e0f8a80cc960e33de35de72ef9b4f2a6a0e0b5a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Meta cache partition manipulation.
  *
index 671cce8c34f2d9744cef693583368b7e2a99262c..df2833f2766fa57cb269df53083d08cd00f03225 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Support for reading and writing Meta core internal registers.
  *
index 713f71d1bdfe209c66c6be7adc93a07a912dbf39..3ed27813413e09609ed525a0170c50dadfe4c42f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        ! Copyright 2005,2006,2007,2009 Imagination Technologies
 
 #include <linux/init.h>
index c9939604a38f03a5c4ceb2943348d965b16c1711..704cf17f8370edfae3951b62c54e4590c78b480b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux/Meta general interrupt handling code
  *
index 1edf6ba193b15328fba4c9a714d51cf8c64a9d1a..e49790181051d4071e001db9336d9239003824f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/metag/kernel/machines.c
  *
index 215c94ad63ac15bff017c1e8422ad901452d0de3..e312386efb72fdc728894713581597b752966b52 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/types.h>
 
index 3e8e048040dfc96c0f73fbd48fb7c75d036937d9..d325ba101de0151de61cb189fd12b338c2320d1a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Perf callchain handling code.
  *
index c4606ce743d240d512861519ff0b0161722dc3d4..0909834c83a7d1cf35f6c81bba89095f29bee835 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2005,2006,2007,2008,2009,2010,2011 Imagination Technologies
  *
index 338925d808e6daa171b3abd88de2b29377c64467..e64e8b0a936321f18bd16794055af3830774db95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991,1992  Linus Torvalds
  *  Copyright (C) 2005-2012  Imagination Technologies Ltd.
index efe833a452f752fc9c549b0d49e3d103bd881b92..27d96499dd3844d036b79e66f6af5cb5fe970c57 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains various random system calls that
  * have a non-standard calling sequence on the Linux/Meta
index 907bbe0b2e68a0ce5d3150a252b038bd7665686f..2664808086c7377ddb641a4b962ae82d0cd9624f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Pass a breakpoint through to Codescape */
 
 #include <asm/tbx.h>
index 5d102b31ce84b5983dc961ded161688c537c545c..1d7b4e33b114785388020ddc7c953f905497bf18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2010 Imagination Technologies Ltd.
  */
index f1c8c53dace78aaf6bcced3e008b49000f841e99..1e809e3b43d14e26b105bff2c700ac2f7b527ada 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2005-2013 Imagination Technologies Ltd.
  *
index 7167f3e8db6b6a8ca314868922a9f8ef1018b249..7833fb8f9ddd6dc796d21c91ba42754738ec739c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2010 Imagination Technologies Ltd.
  *
index e6c700eaf207174544687895522cb5b0405b0a01..1efadae2ea8e3b88418b46cea35f54c70ffd8a8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make Meta Linux kernel */
 
 #include <asm/thread_info.h>
index a41d24e270e6acff2831a70eb265cb14e44f4a10..3982850d692cd00662c52280746c7cd6a23f0737 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Meta-specific library files.
 #
index 78d6974cffef3f55002a6322eebd93c1d027215f..5055df9e5c7bdb5fda62991c6ac8922f4e1ad867 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit arithmetic shift left routine.
index 7cb7ed3bb1ad6f422e687641e5f50274141caa1f..0c838fd9da85917cdce991773645931e1abf7ce9 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit arithmetic shift right routine.
index 43144eebec55b4733d66957d1c868f271f0e537a..87756a5d1367839b28d5378225eccdee7ec4a332 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
         ! Copyright 2007,2008,2009 Imagination Technologies Ltd.
 
 #include <asm/page.h>
index 9c5c663c5aea2433d6eb1f9182e65f40abefc565..ab70bd94fd81e06e27a3ffad667d7848b6a40923 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit signed compare routine.
index 91f7d461239cd33c2770e37a556cb2c167402cd2..abbc75e94374c7b3def01e63b514dc1568b20f60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
         ! Copyright 2007,2008 Imagination Technologies Ltd.
 
 #include <asm/page.h>
index 0b308f48b37a20cf35836674b5abc6b6e0216a0d..6754012a261ffa71105d6c45ce7d42b85d9bdd73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Precise Delay Loops for Meta
  *
index 1cfc93498f709d8b4af19a2a6ba2ec9efe43aeef..55eece273a6b822bcaf2b94764a6d5ac2d59e9c7 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 Imagination Technologies Ltd.
 !
 ! Signed/unsigned 64-bit division routines.
index 11124cc93dee8759bf8eabd51afd53e83418d105..9e31abefb160688a71f86967baea3f2fcf6a73a4 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
 !               Imagination Technologies Ltd
 !
index 533b1e73deac657bec31f5907566ab995939e65c..441f489d6a81c80e71533e40563eee5ed48796ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
        .text
 /*
index 47f72028307749850a640a69715fc9dbf440f316..cf7ffc9b377feae845013e4e068900f9e4fbe38e 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit logical shift right routine.
index 46b7a2b9479eaad4592e02bfa94cd46a1597d734..c2e8395f94562d15e566b4bc779a752160e33ab0 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 !   Copyright (C) 2008-2012 Imagination Technologies Ltd.
 
        .text
index 228ea04d7b39e6d4da4e5cb4979fd68ec8606551..934abda0e68009e8bd5690c46da5c49f60616781 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 !   Copyright (C) 2008-2012 Imagination Technologies Ltd.
 
        .text
index 721085bad1d23ecf296fffa5c899230981687c1c..6ee246d831c77477f5a3d558620a56b0d3adab20 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 !   Copyright (C) 2008-2012 Imagination Technologies Ltd.
 
        .text
index 210cfa856593e5b1170b76591ba69673b6692dae..d65a2e5b315478d55bcea34f360ebac8c1a9b320 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
 !               Imagination Technologies Ltd
 !
index ee66ca8644d08884d149a9e0f76d697f9c794639..9d106790244deabd8208b83a3004d960875a6210 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit multiply routine.
index 6f3347f7daebf63afb08c77e08bf495dba64b8a9..46f5686db8b1c728e3ce64e70146c61d40648aac 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! Copyright (C) 2012 by Imagination Technologies Ltd.
 !
 ! 64-bit unsigned compare routine.
index c941abdb8f85586bf648c2a6fe53ba9350dcb5f0..a48ef522c02dc28d52089dc243dcb7c25ee58796 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User address space access functions.
  * The non-inlined parts of asm-metag/uaccess.h are here.
index 03fb8f1555a1a5778a04b817ce57c2fa2ad47647..9d4b2c67dcc1e13100266aaefab2f814b5f5286a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Memory management options"
 
 config PAGE_OFFSET
index 99433116412502601aa8d47051e6d45d770c7b73..0c7c91ba9fb9645c144904ee41d139d2471fbcd9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux Meta-specific parts of the memory manager.
 #
index 3aa90b78b43d4d0a25c53052d358d77ecc41d746..9b92d3ad7f9c598b263414c53f73ddef4f47d9c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/extable.h>
 #include <linux/uaccess.h>
 
index 5055477486b6f13d3159431766e1bb0cde63f7aa..de54fe686080bffbed727196ec79f6f3f25f1633 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Meta page fault handling.
  *
index f19a87f2c1ec3401cbe3290bedc4146c5b716646..83527fc7c8a745da38db0187e8aa8157126d272f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/highmem.h>
 #include <linux/sched.h>
index 67fd53e2935a2fc2de72d96606344588998e0d9d..012ee4c80dc7a9506a4391047bdf5a905847593a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/metag/mm/hugetlbpage.c
  *
index 188d4d9fbed4d9418dcbb94e556d8a155814d16e..0e2ca905899839cd36aa9e819f08dce4ff2afa49 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2005,2006,2007,2008,2009,2010 Imagination Technologies
  *
index a136a435fdaad0555a32ab9b4addcd57af7a7084..df2b59cb02eb140cc3410e433e0d185d6a806aab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Re-map IO memory to kernel address space so that we can access it.
  * Needed for memory-mapped I/O devices mapped outside our normal DRAM
index c64ee615cf9006eb20f3b5a2b5635faf6119ebb5..addffc58989c87337f2cd5ac1a37336e2b68bc2b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
index eba2cfc935b10fc4a731d4b97f87df186cea86bd..c22755165df999aa0d4d660bb9b52e6ed0b3d0af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * safe read and write memory routines callable while atomic
  *
index 62ebab90924d358016c174cc19786f0ab53dc657..53190b13dc54425b0b24ba74a315abdd1eabf7b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2005,2006,2007,2008,2009 Imagination Technologies
  *
index 81dcbb0bba342c4c63f4ef3c16c87b2b982b9c85..8b668a69c98068ab8d5d5c15d6547c03478da5ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2008,2009,2010,2011 Imagination Technologies Ltd.
  *
index c9639d4734d67fc61c2c05db3a44bb6133220944..dc92a4a3d6181616b18bf61e8f28d34947e08d3a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 oprofile-core-y        += buffer_sync.o
index c0fcc4265abb4c144c114f7e2b31d0441da4b8e8..60adb862aa2cb5d4ee74004f702ad99672c9c553 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METAG_OPROFILE_BACKTRACE_H
 #define _METAG_OPROFILE_BACKTRACE_H
 
index e994239e518c4f1916255b2382d65ae9abdaa3d2..98bc5453cf24549e85767f40317a3b5f7e73fdee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for TBX library files..
 #
index 9d26abdf0dc1c2349e5822b01416f0f0cd154b58..4f798aa671ddd2f481c35689f03be1ea73318ae8 100644 (file)
@@ -39,7 +39,7 @@ config MICROBLAZE
 # Endianness selection
 choice
        prompt "Endianness selection"
-       default CPU_BIG_ENDIAN
+       default CPU_LITTLE_ENDIAN
        help
          microblaze architectures can be configured for either little or
          big endian formats. Be sure to select the appropriate mode.
index 1f6c486826a0ee19880b8e7c6eb97f2a267f1bb5..830ee7d42fa0957b29155d4fa5bba04e191df14b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 KBUILD_DEFCONFIG := mmu_defconfig
 
 ifeq ($(CONFIG_MMU),y)
index 91d2068da1b9bcc1848155268e7b70a661904b4e..47f94cc383b65746eb5698db4038c2fea0c1b522 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/microblaze/boot/Makefile
 #
index a3d2e42c3c979d5365257f9ee2dcd78759f55183..1f77913d404df2c264f91bf32cb7c6cbc9e33978 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 
 obj-y += linked_dtb.o
index e7bc9dc11b579c4c150a0d6d4d3686ba7c37c7e2..c05259ce2d2c2d175b20cafd2d8b7a3018f3434c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_ASM_COMPAT_H
 #define _ASM_MICROBLAZE_ASM_COMPAT_H
 
index 42ac382a09daf3109fbcad4a2f7ba96ffd1a8de5..41e9aff23a6239270ef24ff5acf862d5d5d19c8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_ATOMIC_H
 #define _ASM_MICROBLAZE_ATOMIC_H
 
index 538afc0ab9f3d60f15d70c1a9ec53394c429475c..596300c7450942e952ae654ae5dc396883fea2aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_CMPXCHG_H
 #define _ASM_MICROBLAZE_CMPXCHG_H
 
index da0144f40d99d5bc5590838dec4b59e07e0a9b31..5db7f4489f057e117e58102cfb437e9850fad27c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_FTRACE
 #define _ASM_MICROBLAZE_FTRACE
 
index a9dad9e5e132f1c0f3aa3df6af6efdfba8edf1a6..2572077b04eaa48db06861d63a4322e4922dbd7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_FUTEX_H
 #define _ASM_MICROBLAZE_FUTEX_H
 
index 753513ae8cb0a7c209b84f42af5660bf2a6b915d..ef4741a4058310413cc453da0d758ef8985e7c1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HASH_H
 #define _ASM_HASH_H
 
index 67925ef18cfa3ce0c433b8da11727be67d1d32d1..332c78e15198ec919bb6c3eb1a9a287cf1e91941 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * highmem.h: virtual kernel memory mappings for high memory
  *
index ad27acb2b15f0de99d514beb5cd596acde155a0e..8dc5ebb07fd5a68d7ca9f09b7d8ed94ec62eed3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __KERNEL__
 #ifndef __MICROBLAZE_KGDB_H__
 #define __MICROBLAZE_KGDB_H__
index 0ccd8c402cd9deee0181a8172d0cadffa1bbbbc2..f74f9da07fdc983f0ddbbe2be35e73972a20f546 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_MMU
 # include <asm/mmu_context_mm.h>
 #else
index 204618a2ce844ef6bca4d994c5539271d7896485..95cdcabee28c3771f48e9765a89fb571ae437148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MICROBLAZE_SECCOMP_H
 #define _ASM_MICROBLAZE_SECCOMP_H
 
index 04a5bece8168912e963bd614c126fd045d4b32cf..220decd605a4aded46a99b445e54bf27c4adc821 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MICROBLAZE_SYSCALL_H
 #define __ASM_MICROBLAZE_SYSCALL_H
 
index e77a596f3f1efcfe94c4bc89b9b3cc860d589210..06609ca361150ab77529bf0999d8e258ad25d62c 100644 (file)
@@ -7,6 +7,7 @@ generic-y += fcntl.h
 generic-y += ioctl.h
 generic-y += ioctls.h
 generic-y += ipcbuf.h
+generic-y += kvm_para.h
 generic-y += mman.h
 generic-y += msgbuf.h
 generic-y += param.h
index 8b137891791fe96927ad78e64b0aad7bded08bdc..93dd07bd0af701d6b0458d5825338898f191616d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 
index 31902762a42699079fd1d40d0a3416a0e4d4d1c0..763660169456f2b8cf34d4b4adb3cd7f2d6adb1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_MICROBLAZE_BYTEORDER_H
 #define _ASM_MICROBLAZE_BYTEORDER_H
 
index e9bcdb6e0086ba2b911621700b7712bc5b442057..6b656de29f00d68d3ff645491e8f852be98e30c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
  * Copyright (C) 2008-2009 PetaLogix
index 0e15039673e34f46df971fcb21444321345ac0de..f3249da69121ab73d0380b5f79215b253a4b9c21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_MICROBLAZE_POSIX_TYPES_H
 #define _ASM_MICROBLAZE_POSIX_TYPES_H
 
index d31238a5f94609c3985c0d97284cb6db9355f001..46dd94cb78021f359945c4bccab5974c7937909b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
  *
index 76bc2acee6afa72f98086b9deeee9aeac98c1923..6831794e6f2c2dfe64aaa413252dfbeb5ebb333c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
  * Copyright (C) 2007-2009 PetaLogix
index 55873c80c91744e907dc05250b7c4a99f0bf9562..47eb2e2111bbb8c6c73fe1e2f165453b8b64074e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2006 Atmark Techno, Inc.
  *
index a88b3c11cc20064c5e5430de5bc72384fb1f515b..eb156f914793b29b558c9b48853af8d833f3d3d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007-2008 Michal Simek <monstr@monstr.eu>
  * Copyright (C) 2006 Atmark Techno, Inc.
index e098381af92834a74d4806eaa8e5f3b6ee1b09e7..0da76fa1ab17066d35232e9f6a796e03df8383ec 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile
 #
index fceed4edea41966a4de1502b52d745b452966bbf..059afc75a976fe3a6ac61a8d44c2240fbcb638b7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Build the appropriate CPU version support
 #
index e45ada8fb00669a8889284db230908ed64f2dda1..e63f154be9645679caa57ef047b539193b89745a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2009-2010 PetaLogix
  * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corporation
@@ -165,7 +166,7 @@ int dma_direct_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
                             unsigned long attrs)
 {
 #ifdef CONFIG_MMU
-       unsigned long user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+       unsigned long user_count = vma_pages(vma);
        unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT;
        unsigned long off = vma->vm_pgoff;
        unsigned long pfn;
index c48ff4ad2070db17aff17432b20295b3ec40ff58..56bcf313121fb6bd31be14dc5d9f676a132cb85c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 ENTRY(sys_call_table)
        .long sys_restart_syscall       /* 0 - old "setup()" system call,
                                         * used for restarting */
index 70c7ae6a3fb5659013912aa5cb362d50437a7c82..9fe7ab688ca5053103027ad053841db8a9df54de 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile
 #
index 1af904cd972d064e2a249b6299da8d06106393a5..4d0f9481bdb71c3db20aad9b0f9795d5d6b291be 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 32c334c05d048d335131c88fdd66068de55556eb..268098a962a1cf06120cb81ec69645661000097f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 67abc9ac1bd4fa070e0ef655c38f59ba2851e53e..b3f89638518c92c28bcfa83ca928266df2a82f34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 595b02d6e86ba041743ca4b3e27f98f46ffe9baf..919fb69f858953ef238ce99f378c40bb872b88ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /*
index ab077ef7e14b14c28656ed5ac3589353f1926a18..a909366c202e821e1b58da6600d7d95e183b9540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LIBGCC_H
 #define __ASM_LIBGCC_H
 
index adcb253f11c81f540dd93ca65b49ce84100fb5bb..00eb8268227a5810ecee2de178e4ca911adfa3ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 84e0bee6e8c716bc8c8222ca2b3bd8dda9f84146..64154865c1c5865d860b30284f43d7a2bb734480 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /*
index a3f9a03acdcda454a99e780b898bfcef4ae7e046..8e6bc17e2cd3882e99546b72f30d80f2db27adf0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 90bd7b93afe66929f936d21ab70ed1c3dab25ae5..d6703a4d91f610b7f325c43bd9baff175a00dd0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /*
index d05f1585121caf7cf6c325909ca45036b37d8d20..c60e068ff8bb8f4d93ec723fff25decd58399aee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 64cf57e4bb859d76aacedf5e9bfd61cfd094fd72..acdc667235c4747eaf4ce01921e1e5ee2fdb2330 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /*
index 17d16bafae585d7b6952472344d2125367f05912..f4b814e88ce317b9a4ea6b8e217c2592fbe9badb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /*
index ed4454c5ce352549988b3d02213892f35783cb9f..d7569f77fa158ee9e1ae632cf06e12ff5b7a8c5a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * highmem.c: virtual kernel memory mappings for high memory
  *
index 0d0348c8af976ceb8c860c9f06ad5b45ee2ba732..107f2f55d995bb264d8823cb1a6f2f8d9acba971 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # arch/microblaze/oprofile/Makefile
 #
index 94149f5e6ebe2a152d686757fc19f85690b4410b..bde74af4c1cd8dc93e61db61d9b475ede03d0c2e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ppc64 "iomap" interface implementation.
  *
index cb7fcc4216fdfa5d25e6a76265efc0b66b81e0ad..5d3284d20678a388efac9153adfa0bf60f8850b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MIPS
        bool
        default y
index 42a97c59200f817e9ea297441ea11edb07a00232..464af5e025d67d60ba6ab9641da26965f1ac95e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 4b7f5a648c7986355a81d641fa39b3895d0197b5..4eea4188cb204a2b789ef0bdb4d8ce11d4d201f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ===========================================================================
 # Post-link MIPS pass
 # ===========================================================================
index 88b4d6a792c1e977fa22b33cc5f8b5c73af44bee..7d73f7f4202ba90a02448a78986067962a48b439 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # au1000-style gpio and interrupt controllers
 config ALCHEMY_GPIOINT_AU1000
        bool
index 7ba7ea0a22f80f033242cdee3b9a7da3abc55d03..a83c7b7e2eb1f4439f304aaba5f1724dcf717d6c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alchemy clocks.
  *
index cd1ae29f95a378e76fea3d8f189ee904197bde99..efb318e03e0a3d53163307d84c0d850c6a747869 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DBAu1300 init and platform device setup.
  *
index 421bd5793f7e3d6281973336d74424248aa16b5b..7d3dfaa10231754e8d3eb683c8ab2439e1192a9b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alchemy Db1550/Pb1550 board support
  *
index c9ad28995cd2d637ca4bc37ffeec5e7f853d26bc..e6d25aad8350ed639683b2c6fa6d013690c74913 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alchemy DB/PB1xxx board support.
  */
index be139a0198b0bf40d3488dd7926f16cd58106afc..4640edab207c4cb5a3a1c44e4f7255669eaf344e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * devoard misc stuff.
  */
index 5ac055d2cda9b678dd4816254a04af8418b70964..23d98fc09a43eb8243cc7568023d722975f73329 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DEVBOARD_PLATFORM_H_
 #define _DEVBOARD_PLATFORM_H_
 
index 93024dc6b314d904dc297ec5691975b5fd35ea6c..73c77814687aeebb9eeb245d18756ff60239442c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alchemy Development Board example suspend userspace interface.
  *
index 7435e44b396404b355fe60dc1bf7e9de96e33665..cd51c6c6e686e78f4eededf251d30c87d5aa3e9a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-y := \
        prom.o \
index fc19dd57e42d1d24150dce22f07b96ef486c55ad..7070b4bcd01dd566d275e600da70f24e08c2140c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config SOC_AR5312
        bool "Atheros AR5312/AR2312+ SoC support"
        depends on ATH25
index 877afe63eed571f82ae16126a8f59108e01e0c67..fccc64f6db6c884644bf4fbc403acb4b007282e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AR2315_H
 #define __AR2315_H
 
index 470abb0052bd84dc4d599f610c31f8b373a3e5d5..67518a59ac3cefde3f9cc5aa16c174839449eea9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AR5312_H
 #define __AR5312_H
 
index 7a64567d1ac30bdc92e36ff4159a9cbcb05d69bf..e1156347da53f6cb7516e5f016568028a434b978 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/serial_8250.h>
index 04d4141153563168fd149c063a7693c93f53bfd5..44cf690634b84a545702ca5ce147b786e4525f0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATH25_DEVICES_H
 #define __ATH25_DEVICES_H
 
index dfc60209dc63ca231a687175a9e9545c1cd9833a..9547cf1ea38d2701b52115be7816f18798cbd2d1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if ATH79
 
 menu "Atheros AR71XX/AR724X/AR913X machine selection"
index 730c0b03060d0c941eaf29ee394f3c55be121954..b816cb4a25ff95eb7ca737f3296a71c5aea54830 100644 (file)
 #include "pci.h"
 
 static int (*ath79_pci_plat_dev_init)(struct pci_dev *dev);
-static const struct ath79_pci_irq *ath79_pci_irq_map __initdata;
-static unsigned ath79_pci_nr_irqs __initdata;
+static const struct ath79_pci_irq *ath79_pci_irq_map;
+static unsigned ath79_pci_nr_irqs;
 
-static const struct ath79_pci_irq ar71xx_pci_irq_map[] __initconst = {
+static const struct ath79_pci_irq ar71xx_pci_irq_map[] = {
        {
                .slot   = 17,
                .pin    = 1,
@@ -41,7 +41,7 @@ static const struct ath79_pci_irq ar71xx_pci_irq_map[] __initconst = {
        }
 };
 
-static const struct ath79_pci_irq ar724x_pci_irq_map[] __initconst = {
+static const struct ath79_pci_irq ar724x_pci_irq_map[] = {
        {
                .slot   = 0,
                .pin    = 1,
@@ -49,7 +49,7 @@ static const struct ath79_pci_irq ar724x_pci_irq_map[] __initconst = {
        }
 };
 
-static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = {
+static const struct ath79_pci_irq qca955x_pci_irq_map[] = {
        {
                .bus    = 0,
                .slot   = 0,
@@ -64,7 +64,7 @@ static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = {
        },
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
+int pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
 {
        int irq = -1;
        int i;
index e970fd9cf7693fcc23dc5cedf508c63c20d63882..29471038d817ef415f2de4b946808ceabc71f2e8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if BCM47XX
 
 config BCM47XX_SSB
index 0367ac7286fe34998d558d426680e0347a49765d..bb96743bb92ed1055e939d7d88e56fd9e1561f9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCM47XX_PRIVATE_H_
 #define LINUX_BCM47XX_PRIVATE_H_
 
index 8cbe60cc51d42e056e3bb446a99e8063b5034df1..edfaef0d73a4592a4ab89e4bc4f5ae0571ba05d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/export.h>
 #include <linux/string.h>
index 8a760d80189529349c7f0dff5871bd54677eff99..88a8fb2bbc71a9e9ae1949319f173e80ad61cdfd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcm47xx_private.h"
 
 #include <linux/input.h>
index a35f1d5cde9fd175fbb2f42039edd5094cc06062..d4f2407a42c60c62cb0a5680a13fa3e341dcd427 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcm47xx_private.h"
 
 #include <linux/leds.h>
index e81ce4623070ea1ea36d926b16018a0ed1b2c661..1a8a07e7a5633d0c92056989ab1dfddbc834615e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcm47xx_private.h"
 
 #include <linux/gpio.h>
index a057fdf111c6c3f233f02c8fc2fbb7ebd7823880..96ed735a4f4a6996f70c5714e975b78e48f25016 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "CPU support"
        depends on BCM63XX
 
index 9019f54aee69feee4dde1471d8bbfaf72a8126ab..c69f297fc1df3d29d3ddd9c1147f58a7cbb59847 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y          += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
                   setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
                   dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
index c6aed33d893e65442a16587dd3ec0ad75cd33dd7..6ff0a74810818b9db13923e8a965f6868826ac90 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "Board support"
        depends on BCM63XX
index 2d60f25403de1128833a2b525061acf97c46cfbe..63dfc695087b3ac339471abd27144a900a96cdac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if BMIPS_GENERIC
 
 choice
index 06c6a5bd175d97ebb463d159836951f7fffd8f84..f6728a8fd1c3d2647695224825d40e52073945e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MIPS-specific debug support for pre-boot environment
  *
index 9de9885acd0dbcac06604aa5ce4cc7e0e09ae7b5..43beecc3587cdd92b9cbe8ddbb293ba179b5cd01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/mips/boot/compressed/string.c
  *
index f7521142deda55fb439fa0857a2383b4dad7cc83..b3043c08f7694244604af5a09065800e7a97f587 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * 16550 compatible uart based serial debug support for zboot
  */
index 4bee55b93f6a2fc2416ff0aa7ec0424a44ca1572..8ec63011e7dcf0030fe8e429d7bd8c10a5440df9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/mach-au1x00/au1000.h>
 
 void putc(char c)
index 1c3d51bc90bb8b6f800261f5976e101830b8cae3..d6f0fee0a151a62329738428395d5e84bbc6029d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 extern void prom_putchar(unsigned char ch);
 
index cbac26ce063ef2954472d9ec0cae42855c7b35d7..e0a4e939f843f48170c4f9a2f3da4b62bd1bfb7f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dts-dirs       += brcm
 dts-dirs       += cavium-octeon
 dts-dirs       += img
index d61bc2aebf69b423ba65fe1d02284fb2feed0814..9e09cc4556b387efa9815c4643a67fe94f976528 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DT_BCM93384WVG)           += bcm93384wvg.dtb
 dtb-$(CONFIG_DT_BCM93384WVG_VIPER)     += bcm93384wvg_viper.dtb
 dtb-$(CONFIG_DT_BCM96368MVWG)          += bcm96368mvwg.dtb
index 2f2e80fdcde8721fed8161ef5c2d6eaf9aae81ec..ed6023a917635b8ca233f05d2c97f22aaf6afe59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm3368.dtsi"
index bee855cb8073580073adbed58f0b58a5d53a2c40..277cde02b744a17c6956dfed659091a0bebae595 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index aa406b43c65f965d873d779260db8a038b45e90e..eb2a9c6ed60444cda1e51c1fc1397e84a96d8971 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index a7bd8564e9f61330383265384920a8be33822ff1..d7ad769a42fcbdc2548789dc08dc50bc3e506439 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 430d35ca33d5910ae2720a7bf1c333ee8c0c0deb..2bc0d8401ad677ff32b1265e46798ab2811a1286 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm63268.dtsi"
index 7e6bf2cc0287f77eb9c3b7d8c47d4e09ff58fa16..3b09f44e67fbf77ea55198206a5569d06f5ae7b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 5633b9d90f5549bceac0c8a8f468ac8bffdd5243..644486fe4159c4c25a6be5efdce29fdc6a131ab3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 702eae2a22a0b2dd987a842e7fe2378bc19db5aa..5e62190aa3d5ea04a20e86f82e5ee01e3dbee4bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm6358.dtsi"
index f9d8d392162b1c6c6b6cdd3f640d18cc6005b502..682df7fb706993d57b7c473710256ac0bc1da5e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 480f2a5bf1da4701440c57ceaa680f879530231e..3e83bee5b91e8707c5d9d8490392e2df6507fb3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm6362.dtsi"
index c507da594f2fbe2ded3b7bd5a3b0cdaedea5cdb8..a82a5e5de672c0d2a89cd66cb372e4bf31131287 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index d0e3a70b32e2e65d43e8ab1706a5bcc0579e318e..7a72f59ae4575a92be61b8ab1c1d82d349e1f3a0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 79f838ed96c5e681d50f2754437c5bde72044df7..2f9ef565e5d08976ffd14a13a9b51e5f2de82e01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index da7bfa45a57d1b01cc055291c62a81ae08bdebfb..02e426fe6013227c01a1319e2c2f4bb96dc7046e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 9b05760453f0913d36316826c30c8c5abdf9befb..1089d6ebc84161c8f78ad55f30bbd26f0e8600a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 57b613c6acf27ba635f277fbbcec068bddd7a00b..4b87ebec407af0e9e1e567d72e22b26db7d5e6db 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index c2a2843aaa9a7b0573aba98681bf732b28224bc8..ca657df34b6d9e4a0c8fbaee0238de97c907d0c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 532fc8a157962c789ed96bb3d6b5ff02303c2a03..d262e11bc3f905945bbc94f43a313b5f347de7cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index f56fb25f2e6b5ce7894a3e08aeb8879f28e7fe1f..e4fb9b6e6dce920b283b7418eae5d9cbb067ef87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index f2cead2eae5c0037caae6fa68e81ea0ddfb46011..1484e8990e52a11364e9622cff7664a164b31582 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index d1e44a17d41a0bde3bf289d2e9d750dfe5df9277..601e4d9293ab6e3da533682130e2069205395fdd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm3384_zephyr.dtsi"
index 1ecb2696aca87fdd205065499b2feccab8aa2cfd..938a8e66128ca5681bc803381e10148e36d1206a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm3384_viper.dtsi"
index 8c71c684573032091f05c66f9c716284993327aa..6d772c394e41b264370cae54f2aa55e329c25b57 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm6368.dtsi"
index d72bc423ceaaed1229b81ec10f0a173eafc4c1ca..7f59ea2ded6cb3ac37e8357a439baa46aee3428b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7125.dtsi"
index ea52d7b5772f88137bb2e4b29f239adcbddbf47c..9e7d5228f2b7177fe48eb04c4ce984d872b411f0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7346.dtsi"
index 71357fdc19afe57b8b8e44a2d5a4b312d0361a94..708207a0002d676c75baf367a3d1eedb5b5b41b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7358.dtsi"
index e2fed406c6ee5db1d5ab98d72d291d27044b8ee5..73c6dc9c8c6db9fb55738363b4d5d507c1c26c57 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7360.dtsi"
index 78bffdf1187203573d29c3677aa895bf85cb109c..37bacfdcf9d9df288cdee1a95320a7898721c8a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7362.dtsi"
index d62b448a152dee118b1f8cc93034075516580215..f96241e94874315bd5532a9e660d30fd004c6590 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7420.dtsi"
index 73aa006bd9ce11c46d1695252f5537ad281b8861..ce762c7b2e549dbfc0ba33c22dc0ce96b593dbd2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7425.dtsi"
index 0a915f3feab6c304609413f361dec9f10b9d1e45..d4dd31a543fd7ff87547643017674d0af2fdd90a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm7435.dtsi"
index 3c24f97de9223ebfdc504a5dc0abd408a428ec0d..96c30d857be47ee19e15e40920c6655df3f92ba7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &nand {
        nandcs@1 {
                compatible = "brcm,nandcs";
index cb531816ef4ce6ba411fd0e2330d18d059b914c7..7b5afefbbfab9bf79c76603e2cf440215d40acf9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 &nand {
        nandcs@1 {
                compatible = "brcm,nandcs";
index 1da4608680aa0db12f734e6a0020d04515e4f2c3..8d58c1971b306bf64f3930c1c12663b2bb2cdda6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "bcm6328.dtsi"
index 5b99c40a058f50c90f75152cacab734549fc30a4..35300e091573d47d4d27690a7a1109e77f8dbb24 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_CAVIUM_OCTEON_SOC)        += octeon_3xxx.dtb octeon_68xx.dtb
 
 obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
index ca6b4467bcd374a69c891d455ccd81183ccff829..0fa3dd1819ff611076a2592dfc3ffee0b3c83aca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OCTEON 3XXX, 5XXX, 63XX device tree skeleton.
  *
index 5302148e05a3088eaacf3615f1e6aa0ac0fa5a73..3c296623d8709f9ad0568a58eacb2c5d7af24a89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* OCTEON 3XXX DTS common parts. */
 
 /dts-v1/;
index 79b46fcb0a1141756bacc047f1ae11328d4d214d..3d0acbb2e15f31e7b3ba66afa806dc090c04694b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /*
  * OCTEON 68XX device tree skeleton.
index 3d70958d0f5a2af800dda6d0263bd56476268f24..139bcd887b86601b7ada5f6213b7bcf7d85bb3f3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_FIT_IMAGE_FDT_BOSTON)     += boston.dtb
 
 dtb-$(CONFIG_MACH_PISTACHIO)   += pistachio_marduk.dtb
index 53bfa29a7093fe8131c26f45fec3d99e502955ef..2cd49b60e030424b624a8fb26f5ace63997b1ed6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/clock/boston-clock.h>
index f2b864f07850b88236fc3b575060e86c64b1e587..7798262570da824dad2636d1159c0e6a05ab5990 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_JZ4740_QI_LB60)   += qi_lb60.dtb
 dtb-$(CONFIG_JZ4780_CI20)      += ci20.dtb
 
index 6c381844929cf41c5fedba979c1eff2b2b0450b4..a4cc52214dbdbc4060c086ea75d85e3bd116b46e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "jz4780.dtsi"
index 2ca7ce7481f15bd960a3ab61de14af5f47510b85..cd5185bb90ae47222eab9e54570b498503e9c81d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/jz4740-cgu.h>
 
 / {
index e906134ecaef3a194296645aac76a7dcab599d9c..ff3298f29ec489f2435fc49262ca9a4c1f2ad1ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/jz4780-cgu.h>
 
 / {
index b715ee2ac2ee9bb035793e05ab2d76d6dcbc313e..76aaf8982554c50d2ad8ec4dc6db05aae964082c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "jz4740.dtsi"
index 0906c62141b9fdd861b8ee48734186218bca1a0d..0c50e3246a63e11de52c5b5b9bffa8cc27e6a584 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DT_EASY50712)     += easy50712.dtb
 
 obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
index d4c59e003708e477f7b03ab9a8c845201c80c1e2..2dd950181f8a682534d0ccf45ec7f7c1558db0fe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index b59962585ddea9d41d46082f557bb7eab4c59918..c37a33962f282e0c839b09c56d27301acb7852b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "danube.dtsi"
index fcabd69b703012c5821481ebe6f58bbc024c8fc5..5ee06f73c348a78c5154e0baefad11e82c29bb8e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_MIPS_MALTA)       += malta.dtb
 dtb-$(CONFIG_LEGACY_BOARD_SEAD3)       += sead3.dtb
 
index ffe3a1508e72c1c389749be5861c815e918b5019..9944e716eac8fed8da7dc9fa921f7b69eec6a057 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/interrupt-controller/irq.h>
index 4f8bc83c296057a7bd4b0a9c6d7e59f44b5c7ff0..192c26ff1d3d7076627480f5b9e9cf296b76efe9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /memreserve/ 0x00000000 0x00001000;    // reserved
index 9868057140b536c0b93d203891e2b2a861aad249..1cb2fdbd89499471e0b55c6d03bcc5e38f4bdfc2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DT_XLP_EVP)       += xlp_evp.dtb
 dtb-$(CONFIG_DT_XLP_SVP)       += xlp_svp.dtb
 dtb-$(CONFIG_DT_XLP_FVP)       += xlp_fvp.dtb
index ec16ec2d8d02765a8d2f935c07e0b08f563dddf0..e63e55926e0497654ce7120910d9d14878b6ad7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XLP8XX Device Tree Source for EVP boards
  */
index 4bcebe641d8e9ff5ad5579251d3b5d60c175f3c7..d05abf13fb7dfccf158b2b9bead0e2a8a9811ad6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XLP2XX Device Tree Source for FVP boards
  */
index b3ccb82ad7e4c54cf2b2b12ae044f03939e6b741..d47de485178690a8fbb87c9ff7bf0f369b6e2d43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XLP9XX Device Tree Source for GVP boards
  */
index 3783639a318aad230d5aa2297b518cf69d023342..aa0faee194ec10123df0fffaa96c3eb8c23c519c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XLP5XX Device Tree Source for RVP boards
  */
index 44d6640c14412353d0ec31f02bca45276863f3db..3bb0b2e08e4acd0f589d5e3bda9a0d6f7db0abd6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XLP3XX Device Tree Source for SVP boards
  */
index 7ac790551ec995a1dcbc74b4f5741c95e47c289c..a86ddd289cfde60abac58d4b1812b50fa58ead60 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DTB_PIC32_MZDA_SK)                += pic32mzda_sk.dtb
 
 dtb-$(CONFIG_DTB_PIC32_NONE)           += \
index 63a9ddf048c94cbf527df0134bf38fe2d37da17d..eabd94eb59dbcd991ea519cd16854866a3e4f72a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # All DTBs
 dtb-$(CONFIG_ATH79)                    += ar9132_tl_wr1043nd_v1.dtb
 dtb-$(CONFIG_ATH79)                    += ar9331_dpt_module.dtb
index 302f0a8d29882627d1135331325c53ae05e8be12..1fe561c5f90e76f5558231a8af4d59576b2ae282 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/ath79-clk.h>
 
 / {
index 3c3b7ce5737be27e5eb14cbb34c40dd59200f20f..3931033e47c834d59f0eada7c57e461882190392 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index cf47ed4d85694fd60d4d4c0e976d39c2c4864d17..efd5f07222060c8a2c9abfe4c2cc49d2f3675d73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/clock/ath79-clk.h>
 
 / {
index 98e74500e79d014a5683ff62917f9a4bf0fd9c22..d4e4502daaa88c0b3353763aea07a3a16498a30e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index 56f832076a69b154010ccfd3bcb243d07933480b..4f95ccf17c4c8ae006be9c9e46af714c2d0e96b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index b2be3b04479d8c62eac643442d0a1f00a1daf613..f70f79c4d0d5091538dad6a48d2c0607ed1c4f87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index 919cf3b854a5e557b595a2dce508bbefc5bd7632..748131aea22e75ff9355f751ca8749f32d990327 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
index 55e2937b61f3810c5654713dc55ef5b01694421e..a80eeeecf6130d259621cfd838892734aa009c5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_DTB_RT2880_EVAL)  += rt2880_eval.dtb
 dtb-$(CONFIG_DTB_RT305X_EVAL)  += rt3052_eval.dtb
 dtb-$(CONFIG_DTB_RT3883_EVAL)  += rt3883_eval.dtb
index 793c0c7ca921a29651c6e1205d1011624319f852..1f6e5320f4860c0236d6451e2e5763884e9f4827 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 709f58132f5cba9d87adc37afbe84c38db40a5ac..8de8f89f31b85cc9c5dd85aca778958d220b786f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "mt7620a.dtsi"
index fb2faef0ab79a0cdb9a811de17151779be5d2193..8fc1987d9063cf4b57061e1dd94718848a9d8d4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 0a685db093d4dbd367228a1cb9e4d42bdf43e0e7..759bc1dd5b83e8a3db0cc44473a0198b30bd6982 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "rt2880.dtsi"
index d3cb57f985da8fd1aa0332b40c186bec85a15d13..23062333a76d7ffb41c0b0e970d648fa4c1396e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index ec9e9a03554140a4c11947b2ff0a7548cb4fb7fb..674efdd42e74becdbd475efd3a1b8b2139557719 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "rt3050.dtsi"
index 3d6fc9afdaf6f2c0ceb7a3ef70ff02aef75924f9..61132cf157e5a1a3bec99c6024e9cbe92a56f3e7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index e8df21a5d10d9eb35a2dfc88af0d137d9c66156e..c22bc84df21975a4e16067a7d2aca64021776800 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 /include/ "rt3883.dtsi"
index 913a752a9ff11760a9a2af35d0c39018788c726f..498ac081e2fed74da875a3947f1949ff33070fef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_XILFPGA_NEXYS4DDR)        += nexys4ddr.dtb
 
 obj-y                          += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
index 81d518e75785c15e9873e941a75dbcc0b4029ace..87b2b1f9a1b04e1fc7615cd7e4b9b681b07b1d4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        #address-cells = <1>;
        #size-cells = <1>;
index 09a62f2e2f8ffc8335e80943ba3c13444b626331..41fee03dc3128fd6caf110a9116edc037efd7cc4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 #include "microAptiv.dtsi"
index 7a75ce2c1bcdb99060a3392b04b3d5d5863a7729..b3e73c22c345cb630e69802b9313214d7cadda80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Some ECOFF definitions.
  */
index d232a68f6c8aff95988484d49f2f031d08c4911a..5f8e737348ebd5d0979019a6ede6f4360a0a85c6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 hostprogs-y    += relocs
 relocs-objs    += relocs_32.o
index b9cbf78527e8b03d2b3b8b6f4b9997db4c4f0d01..1bf53f3524b3248699df9f6a18ad28e0576d6b3b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* This is included from relocs_32/64.c */
 
 #define ElfW(type)             _ElfW(ELF_BITS, type)
index 3cf676f49e181f1044b5df0b5aeed1d6d60d8147..607ff0103064333362af2bd626a3ec36a5ee54d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RELOCS_H
 #define RELOCS_H
 
index 915bdc07f5eda7ef8989b7fcd37e807195ed7f6b..428bea489303cf84ff227128a7def630ce91ffcd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "relocs.h"
 
 #define ELF_BITS 32
index 06066e6ac2f970b17ed9f24e6c4eabe5d3cbc83b..154015d745d64f145d5f474d679ad96bdbba30a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "relocs.h"
 
 #define ELF_BITS 64
index d8fe2343b8d0efafb06c7aff0cea3fcc06560a5c..e2453a564b119e05c4b276c7a98a7dae0ab4b90a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <stdio.h>
 #include <stdint.h>
index 5c0b56203baef0a3f4d804850933a3031990c76c..204a1670fd9b1dae10a843dfef6fb19c30ba617e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if CPU_CAVIUM_OCTEON
 
 config CAVIUM_CN63XXP1
index f7aa9d5d3b87d0914d40efda9f5a22985c9b4170..db26c73fa0edaf794de7ab4c7df140ba8d63ad0b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # OCTEON-specific crypto modules.
 #
index cea2bb1621e68b211d5dc99fdad78f208b1ad8a3..a25ef822e7250d554757585051336f9bace86225 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1995, 1996, 1997 Paul M. Antoine and Harald Koerfgen
  * Copyright (C) 2000, 2001, 2002, 2003, 2005  Maciej W. Rozycki
index c3490bebbc5de509a01d2d66bac4688648189a4a..3ed63280ae29f111a45ea81c3cbde21443ab42f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cmdline.c: read the command line passed to us by the PROM.
  *
index 69ea5b9c8190af718ea810767f27eb089b4134ce..9fcbcc7cdbd3c703e2ecafafb21d3a54a5672eda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECTYPES
 #define DECTYPES
 
index 0c14a9d6a84ae10f3e56f85790aa336b33abd3c6..80cd14cd1a63f7f29014421296af19c7c4aedbb9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * identify.c: machine identification code.
  *
index d88eb7a6662b35f118e2e71cfb46e0cbe0953aa8..cc988bbd27fca58733a2fd9487560f472c5060fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * init.c: PROM library initialisation code.
  *
index f72b5741025fa8cc10a83dd430b0feb51b3a83d0..0eb8fab62ab04613521db591834fc146124e8702 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * locore.S
  */
index 8c62316f22f438b4b9cc18b23585f3e0ad8b7258..a2acc6454cf3df44415e1d5b1394af3b6d8c47b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * memory.c: memory initialisation code.
  *
index c15a879046e5ca906809a61c4612a2627f6b6663..3df01f1da347cd663437ce4b0aad5612853f68b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Reset a DECstation machine.
  *
index 1914e56f0d963c149e9ac66c8852986f7fca84bd..a2a150e4fbc2867773d7d5c4e57fe95985481ad4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  *  Copyright (C) 2000, 2003  Maciej W. Rozycki
index 4f349ec1ea2da4bb200a1c296d16f27b54650935..31dd7305d6436453331d9ddb8a53b73139c55103 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ARC prom monitor library routines under Linux.
 #
index bc32fe64f42add26fa0100b2c4592b58a8ce9231..769d4b9ac82e1b14e2dde98ad0ce3b0b49621865 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Wrap-around code for a console using the
  * ARC io-routines.
index 0d75b5a0bad42c906ba5fb1b4fdad3ce4b14c02e..dd9496f26e6a930ec748937466bb0a153cc2a399 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * memory.c: PROM library functions for acquiring/using memory descriptors
  *          given to us from the ARCS firmware.
index 9b568950d1fde977fed8df3eefab0df78c5483bf..2d99f44d5576bd5f71c845a81e4a5ce971a2fd8a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Routines to load into memory and execute stand-along program images using
  * ARCS PROM firmware.
index e0436aaf7f389e9a6f04d042975eaa29d45020c1..0b67c46666cc0d7b939e7d2d9f79d21d7deb3406 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MIPS_GENERIC
 
 config LEGACY_BOARDS
index 56b3ea565ed9ba6e3409c97e1ef05386b5853e45..874967363dbb20a0c61d6f21b3cbc4d211c7a77d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2016 Imagination Technologies
-# Author: Paul Burton <paul.burton@imgtec.com>
+# Author: Paul Burton <paul.burton@mips.com>
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
index f5312dfa81840e3506806c9f4912c9ebd325267d..b51432dd10b6fa3789ff01b1d0b902ac200fe89d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Copyright (C) 2016 Imagination Technologies
-# Author: Paul Burton <paul.burton@imgtec.com>
+# Author: Paul Burton <paul.burton@mips.com>
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
index d12e12fe90bec6f4d0290b63ba8a8b2154bff4bc..e4cb4f95a8cc1015f31d63570c962703b7fddca8 100644 (file)
@@ -1,4 +1,4 @@
-{
+{
        images {
                fdt@ni169445 {
                        description = "NI 169445 device tree";
index f109a6b9fdd0806774da38c6abecdf1d91e7de27..10cf93d9734609a291d76d2a4d365b5e400125dd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 15a7fb8e2a2e80b28e8bca9d73bef2a64a8bf29a..5ba6fcc26fa726aff50cc3a64315855eb935c1b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
 #include <asm/fw/fw.h>
 #include <asm/irq_cpu.h>
 #include <asm/machine.h>
-#include <asm/mips-cpc.h>
+#include <asm/mips-cps.h>
 #include <asm/prom.h>
 #include <asm/smp-ops.h>
 #include <asm/time.h>
index 5322d09dd51b5563d1bf58aa0b31b927c982d080..394f8161e4628680e82a79bf81c63160e0752bf8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index e9fb735299e3b78cc009da4335e67a976072b266..1ca409f58929670c58a8e23f47aa9843f53a03bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+ * Author: Marcin Nowakowski <marcin.nowakowski@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 42b33250a4a2e05985247bd2be2b84f1de0ff4ff..199fb2cc57eeaf8eb2265318e774d974bb0fd42a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index f67fbf1c85417cc2e2bb07abec86d84b466b8196..1a08438fd8930c43eb543cc64bbc2ba787a1b939 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /dts-v1/;
 
 / {
index 6077bca9b364bdf225893c4b59e123204ee8a607..b408dac722ac7fd7345fd0bf2e1e00f9b7dbd110 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 6e28971fe73ad7e8ec0ab07c5e6e87b68d76f857..d60b57f34e92275723890702743a74f384c6f037 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/checksum.h>
 #include <asm/page.h>
 #include <asm/fpu.h>
index 0ef39ad0f2d4487e58b90f3409183c01bf605509..1c08c1f7903c89880ff7f1f6c77a7a6261dee399 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * asmmacro.h: Assembler macros to make things easier to read.
  *
index 38ea609465b10c8e507536f365e72bc103257b92..68039dee5ba6692f30566a136a7288262dbf8d6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * asmmacro.h: Assembler macros to make things easier to read.
  *
index bc739a404ae37d29ba1ff83e4cada3c4053e31f1..8a2538e08a4e9259a56a4209a892d783d71d5f08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MIPS_ASM_BITREV_H__
 #define __MIPS_ASM_BITREV_H__
 
index eb96541ae67e3ef5d5e9ba520e6a910d3243195b..febc4c30a30811db0fd09adf30fb73c80589dd3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_BMIPS_SPACES_H
 #define __ASM_BMIPS_SPACES_H
 
index 540c98a810d1bce2639e65f09610651ee3fb8aff..745dc160a069ff3a9509fe4b00a6e2e22b6690dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_BUG_H
 #define __ASM_BUG_H
 
index b160a706795dcf17d3b0ea4c8d0278748cd1a458..d8ab8b7129b53ccd6e0f11bdcb08f2506d3c1887 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is included by init/main.c to check for architecture-dependent bugs.
  *
index 4809c29a4890f09973cee7d65318b44e3b0eb462..5a8f96ebe5facd317c14003feffabe81938e13bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MIPS_CLOCK_H
 #define __ASM_MIPS_CLOCK_H
 
index 033d97303c85675cf7516225bf8c5d1f8550eb0e..e9e87504bb0c10cbcfd169bd41185c5cd5d62e54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CMP_H
 #define _ASM_CMP_H
 
index 903f3bf48419cb917dfc15af9013674e45c23017..7e25c5cc353a8223c29ed546772ee453b994c529 100644 (file)
@@ -155,14 +155,16 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
                return __cmpxchg_small(ptr, old, new, size);
 
        case 4:
-               return __cmpxchg_asm("ll", "sc", (volatile u32 *)ptr, old, new);
+               return __cmpxchg_asm("ll", "sc", (volatile u32 *)ptr,
+                                    (u32)old, new);
 
        case 8:
                /* lld/scd are only available for MIPS64 */
                if (!IS_ENABLED(CONFIG_64BIT))
                        return __cmpxchg_called_with_bad_pointer();
 
-               return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr, old, new);
+               return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr,
+                                    (u64)old, new);
 
        default:
                return __cmpxchg_called_with_bad_pointer();
index 4c61764671468c0bf38ae6f92513eddca86d7c43..e87cd243b0f43a22338fe3ff3ad49a0a044bba32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_COMPAT_SIGNAL_H
 #define __ASM_COMPAT_SIGNAL_H
 
index a9580097cba8fe0d7db36793c8f8cf831323579e..8e2b5b55648868199deed2f8e9aae5bafdf60d98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_COMPAT_H
 #define _ASM_COMPAT_H
 /*
index ece9b84f3bcbd78511903c97269795dddd8f111d..d39324c4adf136f497bfd554608b0c6ea0a597e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * cpu.h: Values of the PRId register used to match up
  *       various MIPS cpu types.
index aba71385f9d15afcbdd82262df9b905c69ef9c22..42f8cbad6c23d7a6ed21f70191582eef1445e9c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_DMA_MAPPING_H
 #define _ASM_DMA_MAPPING_H
 
index 5b9ed1bffdbcc419f7fe4bcee1c0040cb46273d7..be726b9435309773b4558d6555ed6fe91137d0ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm/dma.h: Defines for using and allocating dma channels.
  * Written by Hennus Bergman, 1992.
index a6e067801f23afc25e234639cc07bf041a351c95..b47a975276736ad59e6d08e1fa2380f90e425925 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 980b165273741061323a5bf861ff9e2c07ed382c..fc467767329b580f77ed716f1036a0432432b649 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_EDAC_H
 #define ASM_EDAC_H
 
index dce7a627a9257694795e1e20c74e8800ffbbcdef..78d0ae15605832c0820c0331fb1744313617c3fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_EXTABLE_H
 #define _ASM_EXTABLE_H
 
index 9fac64a2635307846c8ddcc2aaf775390de56387..d67b6a90f9b383ce35c2590f909ae3979989911f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ARCS hardware/memory inventory/configuration and system ID definitions.
  */
index 71a986e9b694d672823a87c17260f8fd39882e24..c52948f9ca9598af5be9a3dc5457ba59652b65ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
 
index 279b6d14ffeb7c5af5b54152292b70dd5581d88c..9d84aafc33d052096d678658c41ffb5e1bb2efa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * highmem.h: virtual kernel memory mappings for high memory
  *
index 18a8f778bfaa293ee88ac5368637229c253453d2..d47268eceabc4eea01c72e882c9b08f8474239e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HPET_H
 #define _ASM_HPET_H
 
index a2d18ab57ac608bcf3959863a7232330de08f2d7..655a6dbc861ae9d02227808088e01df4c79b5bcb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IDLE_H
 #define __ASM_IDLE_H
 
index b4af6eb24ab9dfc90f992aec9c41162cf16c3581..d1683202399b112b07e1bc2edd13bfb369e0ebfa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Various ISA level dependent constants.
  * Most of the following constants reflect the different layout
index 2cefc3c47241a492a01bea0bdd7d2eebcfefee68..d913439c738c921c7e3c1e1b98237f7e467d433e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Helpfile for jazzdma.c -- Mips Jazz R4030 DMA controller support
  */
index 8e3d08e739c18d95a9bea3cbaf8ef315a2738457..a55a207cfaa389ed3535d186dbb407c9ef044010 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MIPS_KDEBUG_H
 #define _ASM_MIPS_KDEBUG_H
 
index 69dc0df94a96580b1a12462d86bd5a0344d4fa90..4f2302267deb41c0bc3322d17445c8b8565c6c3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_KGDB_H_
 #define __ASM_KGDB_H_
 
index c1909dcada39566a7f04b1e67bca2538932a33a8..16665dc2431b67a4a14c8cdc78340029b28dcdfb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
index 5a9aa918abe6a6837a167d1d70eb97d319b4207e..60b1aa0b7014ad05c56cf8607e5cb826c19ba896 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MIPS_KVM_PARA_H
 #define _ASM_MIPS_KVM_PARA_H
 
index edcd7544b3582616d0347ee46441036d1f02bfe4..ab833be9637d60409a03cf849f3e2c4eb48a398b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/addrspace.h>
 
 /* Lasat 100   */
index d918b822e3767bd521ab156573a119cbac25ebfa..24001a5cbb11276a66c43e2c78e77416a9976505 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/addrspace.h>
 
 /* lasat 100 */
index f5589f31a197b8ea535c81e0bc1c1e3607523fb9..20b0ecedd4b50df7555673a19190e5ae2c717852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Image header stuff
  */
index e0d2458b43d06f4be912d70088dfc76105ca9442..b2b346e0ca3848f66c234002fbb97f9a8f58ae61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LASAT_LASATINT_H
 #define __ASM_LASAT_LASATINT_H
 
index 42a492edc40e291b401396baf8f7bbfbbac4757d..99987c5a4b8386b31b4c2dc898a7be3aedcf237f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Lasat 100 */
 #define PVC_REG_100            KSEG1ADDR(0x1c820000)
 #define PVC_DATA_SHIFT_100     0
index a2f6c7a9cfe84843dc2f0ff645476ce75a00ddb2..7b43d74089d1702d01338b9abb83a5a8458a274f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/lasat/lasat.h>
 
 /* Lasat 100 boards serial configuration */
index 99651b0ea7c726a81393127f8a18d873515a0fe6..1829c2b6da6cdac4b5ec5d0cf08f72ac19ea0045 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 8feaed62a2abab216da39e8dd99786f2340d3f60..ac8264eca1e9052af508950685e5c2a539c908d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_MIPS_LOCAL_H
 #define _ARCH_MIPS_LOCAL_H
 
index e6eaf5339e4e65f2fa9b5d9bfd50957bba6c1ca9..3687a02e692b5e2e0657cecb06cdb3815da9b57c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Registers for the SGS-Thomson M48T37 Timekeeper RAM chip
  */
index e10f78befbd9b2b8185e39e0e5dca63ae3e5a78f..1e0da80bba139329ddc83ef7c81c6348be926535 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 4f4ee4f9e5ec41d9f971c6c154a04a41a09fb50a..0aacc55aa51dc1f52d49a7d0080bc88cabd8b655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_ATH25_PLATFORM_H
 #define __ASM_MACH_ATH25_PLATFORM_H
 
index b3c87cc64bb93a0b85d5759ff4baf89e4d618dd8..e0e98f06c642612a0191890b1f478f2ffc330f12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * platform data for au1200fb driver.
  */
index 08e1958e9410e40c7078fc0fd10d5cafae9ee06c..fe6ca4606d77e385176650a8e354468c52e39d1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * au1550_spi.h - Au1550 PSC SPI controller driver - platform data structure
  */
index ad4c0a03afefbf9d8b01a085748bbeb8bbfffacf..d26dc1dadf44257ca84dcd4bc983f13f6744155a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * platform data for the Au1550 NAND driver
  */
index 49dc8d9db186fec5b1ab279243785391839428fa..9d1c8d5ed4a8eeb596478388369febaa4624946e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AU1X00_ETH_DATA_H
 #define __AU1X00_ETH_DATA_H
 
index d607d643b9734a1c72df19a9c171664fd9170a84..d25846a1291f4331bb045ff7f0e6aec5e687b63e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * gpio-au1300.h -- GPIO control for Au1300 GPIC and compatibles.
  *
index 4c0e09cf1735c58215e40b4a276687e35604c9d5..c62ee0246d7632cfdddf9e3581705b0a3b2ceb86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AU1X00_PROM_H
 #define __AU1X00_PROM_H
 
index ee3d4fe515a09b24bb420ae05e8b00517cb1eb0f..cbf9da7f2f9432e93dba7f951f6ba97772b688bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM47XX_BOARD_H
 #define __BCM47XX_BOARD_H
 
index b7992cd4aaf9b13d3815d9d34625877d726449a1..b23ff47ea4753774e2498b0cb54c2c3d00d49c5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H
 #define __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H
 
index fa3e7e617b091dd38b4cf20e9a36f0b63d139202..1d19a726f86ce19b44410e3f1a6f6575af64e64d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_BOARD_H_
 #define BCM63XX_BOARD_H_
 
index 56bb19219d48870170436e207257e0d420240b56..1cad18e6681dc5969871c235767caf343ceee708 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_CPU_H_
 #define BCM63XX_CPU_H_
 
index b1821c866e53544abc2d0a94a509a2294626a27c..1c634d7c1597a06b4e946dd9bb9df656efaae502 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_CS_H
 #define BCM63XX_CS_H
 
index b587d45c30454fa72d6edf62c3e0cb1656c8dec8..4e4970787371a6f4d035d78d040f196d25c0d486 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM63XX_DSP_H
 #define __BCM63XX_DSP_H
 
index c4e856f27040637bbe1dc2d45525728829cdc95a..c0bd47444cffdee2bc244efaf6b41a9b990bb01a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_ENET_H_
 #define BCM63XX_DEV_ENET_H_
 
index 354b8481ec4a93680ac46b811126c1db3e24031b..4d5005f2b8b58bb157a5085d1ecebab2c6ee8bb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM63XX_FLASH_H
 #define __BCM63XX_FLASH_H
 
index 1b1acafb3d7945dc558dd1fe2675a9d1343460c1..f93f176c1beedf9003a87d7e5b70e720c45a14e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_HSSPI_H
 #define BCM63XX_DEV_HSSPI_H
 
index c549344b70ad4271316da9f798e642abb290d2cf..1951c125cf0e6ba822f7475256a0faadb508c756 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_PCI_H_
 #define BCM63XX_DEV_PCI_H_
 
index 2beb3969ce3b9ca14e9cfe290747c7cdb78309a9..01674ac58bb5b1a00e483bccab1b6248ee968920 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_PCMCIA_H_
 #define BCM63XX_DEV_PCMCIA_H_
 
index dd299548860d1619d70070799224c8b3758bd75b..0ab750522324ccd4a109a5dbffa4476c4929c5a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_SPI_H
 #define BCM63XX_DEV_SPI_H
 
index 23c705baf171fdb8560b0344544405ce3edb2cfc..88f8cf1c709485ed145643753d27770e31623591 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_UART_H_
 #define BCM63XX_DEV_UART_H_
 
index 5d6d6986f40b47688a3b7028257975a80cb50c3b..3f920baff966acccbbd00677c7e32a59597cea85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_DEV_USB_USBD_H_
 #define BCM63XX_DEV_USB_USBD_H_
 
index 565ff36a11195d993b4b3315e8f7536cc1830d7e..8fe88c2251e43feda489af622eab6b6122682d16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_GPIO_H
 #define BCM63XX_GPIO_H
 
index 7033144aab2db0446c1ae3b3023440cb3d235620..31c692433ada6b5c22de91bc0146af736bad5ada 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_IO_H_
 #define BCM63XX_IO_H_
 
index 0c3074b871b828efe027b57327d28d11acf47cf7..7887bc6905f57bc69e80710eef8db28bb6c1bcf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_IRQ_H_
 #define BCM63XX_IRQ_H_
 
index 1e89df7244bdfc006bbc688db6fbf17d1a3d6188..73df916e414dafcab10613a891468dcb0884cf14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_IUDMA_H_
 #define BCM63XX_IUDMA_H_
 
index 348df49dcc9f35ad7ce4129bde4ab66d1a103b00..f78d725f263f17cdab66ed8c3a2bc0717e0817fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_NVRAM_H
 #define BCM63XX_NVRAM_H
 
index 24080af570f9ae3d202062f8f6ffc45980446ad6..bc3444cd4ef2812a3cd55672746394bcf9ed3db0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_REGS_H_
 #define BCM63XX_REGS_H_
 
index 3a6eb9c1adc614c3995a173f5c76f51968d164bc..2c0645b7da84aa69aedcb7e3fb9cc1de5eb14949 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM63XX_RESET_H
 #define __BCM63XX_RESET_H
 
index c0fce833c9edfb70945a4f4b487925898c24f4c6..bcbece793fd8595c1ba1f640a0e6851f77d516db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_TIMER_H_
 #define BCM63XX_TIMER_H_
 
index b86a0efba66529e3df82ffa541d20c584be1c3fe..5e5b1bc4a32478534f106256309124fc3126c2ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOARD_BCM963XX_H_
 #define BOARD_BCM963XX_H_
 
index b56cf10b91d33f840be42aa1b9d71f3dc5095d12..0ebecbdb97491089c6392f1c56bc11af7bce8103 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H
 #define __ASM_MACH_BCM963XX_CPU_FEATURE_OVERRIDES_H
 
index aea6e64b828f88a8c0616516ae199235a4ea57dd..8cd261ec0a75389e4a652888bbf12aa8d7bf0ca6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_IOREMAP_H_
 #define BCM63XX_IOREMAP_H_
 
index 2bbfc8d1f30762c7d6b258e277343325560affa3..b016f0615d5ff9a4a5123911b2d7bcb8408cc2bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_BCM63XX_IRQ_H
 #define __ASM_MACH_BCM63XX_IRQ_H
 
index fa0583e1ce0dcc4767af75b8c50d098f071dee5c..68a219d804073c39b0f0e92a9edde2973d071083 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_BMIPS_CPU_FEATURE_OVERRIDES_H
 #define __ASM_MACH_BMIPS_CPU_FEATURE_OVERRIDES_H
 
index 29c7a7bb7080583447dd4f16cfabed94ba87056d..52632ebc705f6fa73179a964062e09269729d388 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_BMIPS_IOREMAP_H
 #define __ASM_MACH_BMIPS_IOREMAP_H
 
index 3c3ed4ae45e28ab66b166bf91fc6cb4d662020d0..4a27738e8b22db92934f2767f778d9fb59b12e54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bcsr.h -- Db1xxx/Pb1xxx Devboard CPLD registers ("BCSR") abstraction.
  *
index a5d669086ed94a51a2fc03101dbe3e1be7b39f23..74207c7bd00d9b51c98991e83d3d865cc51767bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_GENERIC_KMALLOC_H
 #define __ASM_MACH_GENERIC_KMALLOC_H
 
index ebc9377ff87661006d1140e00d8ec8ee8ce2db61..2ed3094dee078ddc8de19a41da8ead05ed8550ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MACH_MMZONE_H
 #define _ASM_MACH_MMZONE_H
 
index 3fb7a0e094943c36cb096a129e361f063778c6ba..42ea1313626c2bff56dc5ebe831cf739ccc0477f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MACH_TOPOLOGY_H
 #define _ASM_MACH_TOPOLOGY_H   1
 
index 042ca926c48fc5abf77418ff8492d95779c1916c..07a0146ea61f7163c4a579adf101aae82c916a6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_IP32_KMALLOC_H
 #define __ASM_MACH_IP32_KMALLOC_H
 
index f373186054527ae3f81b90fadf136a609ad6fe31..96b2d6674cdbeebf528430f2c75587938514b6f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_JZ4740_BASE_H__
 #define __ASM_MACH_JZ4740_BASE_H__
 
index 8543f432b4b369f2ae4b9d2898ae539d3a196fc7..e9cc62cfac99d8520ccf9f992c32608199ef17e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MMC_JZ4740_MMC
 #define __LINUX_MMC_JZ4740_MMC
 
index 3a282419d5f93a87dc2da42891aab61b3de60076..d79cbe075084c8912975fab87c0aa4ee50dddf5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MACH_LASAT_IRQ_H
 #define _ASM_MACH_LASAT_IRQ_H
 
index c253d3fa5167bdb3ec456ee3621cb028af230796..6666a8871a230fe42049e9e63332d623f8013c22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  This is a direct copy of the ev96100.h file, with a global
  * search and replace. The numbers are the same.
index 9f9bb9c5378528c27b7f2d82b5913999c16a0bac..4f69f08717f6efc08bd3db360e8d2e32834ef04e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_LOONGSON64_BOOT_PARAM_H_
 #define __ASM_MACH_LOONGSON64_BOOT_PARAM_H_
 
index a0ee0cb775ad1dc64b8608fdeb9dccf93a57cf5c..9795b3361532e27b3e82eb23519a1cdca6ceb02f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The header file of cs5536 south bridge.
  *
index 021d0172dad65d48f5d8e6eb09cde321b7e5880a..52e8bb0fc04d660f9767537e4989aaccd233e6c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * cs5536 mfgpt header file
  */
index bf9dd9eb4cebb3b13e2c065d0f32c1d88baf6ed6..a0d4b752899eeb9388f647fed712a047ad42d124 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * the definition file of cs5536 Virtual Support Module(VSM).
  * pci configuration space can be accessed through the VSM, so
index 1f17c1815ee5e0c1d4a9c36f8fd1b0181f698054..70d0153cccc33f764cf7d47fd39402a122c09165 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * the read/write interfaces for Virtual Support Module(VSM)
  *
index d18c45c7c394173b3ff552040149dfde7cb97150..3644b68c0cccdd2a8f8f34ee0490b90133ab2128 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_LOONGSON64_IRQ_H_
 #define __ASM_MACH_LOONGSON64_IRQ_H_
 
index 74230d0ca98bac70db17c8c2a7413fddbe596fd4..545f91f2ae16ac9840464b45bccb5bdbf684633e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LOONGSON_HWMON_H_
 #define __LOONGSON_HWMON_H_
 
index c6040b9fcf94c2ac5f3d410d3b9abe0990f17da2..e85bc1d9c4f20576ca0f3a34245a3027f024c085 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_LOONGSON64_SPACES_H_
 #define __ASM_MACH_LOONGSON64_SPACES_H_
 
index bcb885615fcad2e1c79690c85b78224e6589ccf0..7ff819ab308af32183a9c70dc383d83d278704ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MACH_TOPOLOGY_H
 #define _ASM_MACH_TOPOLOGY_H
 
index e659f041e1163de57b9592987df572230c3de0a8..17b71172a09719f0b3c8f7d3ab7626eee522df33 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_LOONGSON64_WORKAROUNDS_H_
 #define __ASM_MACH_LOONGSON64_WORKAROUNDS_H_
 
index 47cfe64efbb0d5fe9ee21eb26f05f7ae02c7c28c..af9eeea250ed7c414b4357948a1452885f283107 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_MIPS_IRQ_H
 #define __ASM_MACH_MIPS_IRQ_H
 
index 62a4b2889fa76b2941f52cf8460f48f2b1f425d5..b9dee7c3e469f9bea941781aa420d1c7d7460066 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  This is a direct copy of the ev96100.h file, with a global
  * search and replace. The numbers are the same.
index cfd777663c6401a84ec095bd1615718c6cb4fa2c..d696a7598ea7aa1e42833ac70c7f602a3722c61b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index c2c2e201013d5e5530d355293e8efb42df794a76..347b53dbc88f408c1ca5635ae5e35878a1ec1c1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 4321865e04b93816615eeb4585957ce58ea43def..86473e3999aa45b079bb5093fcc4f350c66b528d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_RALINK_IRQ_H
 #define __ASM_MACH_RALINK_IRQ_H
 
index 4322191e46bf6639c273b3ed12379c73430adea5..44dc87bb8087e6828680e2d0158fc9f71ace4681 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2002 Integrated Device Technology, Inc.
  *             All rights reserved.
index 28c54063a3451aef86bbec7bd0a166a3c94c07eb..37d73b9877c60827dafe3a88a78834e81a90b1fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2002 Integrated Device Technology, Inc.
  *             All rights reserved.
index db211212ce79ef9d5d24c956d45500354137b59e..a3192da9f2270d8cef7187d6f8fede805fd2c3fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2002 Integrated Device Technology, Inc.
  *     All rights reserved.
index b76dec95c04e0d6566cee62938c6b4861e898713..ebe32bd5a5fb48b94e085850d07a099cfa87c21d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_RC32434_IRQ_H
 #define __ASM_RC32434_IRQ_H
 
index 02fd32b4be164e41f9966a1674d7551c830e8fb7..1bec6cc8abf0acafd5e921f22fa516e3e0c63e2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for IDT RC323434 CPU.
  */
index ef0b502fd8b7b0557c15bdc318cd29d8db8cedab..ab7a70bd895e03955c66cc5f87bd53b68ff1bb7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_TX39XX_MANGLE_PORT_H
 #define __ASM_MACH_TX39XX_MANGLE_PORT_H
 
index b9d39dc45420b591af3342200782c05409a21731..04e4247255da331c4b3fde558abf84a828230f5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
 #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
 
index ff9a8b86cb9363c1fb458546c56550fc35a7a3ab..c2a0a6fa483fb24b9dd1cf54468e7686280e55ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_TX49XX_KMALLOC_H
 #define __ASM_MACH_TX49XX_KMALLOC_H
 
index 490867b03c8f6cb9d1834ed87e590928830aec26..e061ef38fb5fb8733b861c426d34e7c15e219c50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_TX49XX_MANGLE_PORT_H
 #define __ASM_MACH_TX49XX_MANGLE_PORT_H
 
index 862058d3f81b01dfe406d729022c0d13605270ab..3d63afae37a852a36383cf96467c7603e44ae58c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_VR41XX_IRQ_H
 #define __ASM_MACH_VR41XX_IRQ_H
 
index ecb6c73354841741a7e9f5977ece44178065eaf5..e0d9b373d415195f95d34c628e94c621a1306462 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 653477e4074d67a01d8899d26aecc9da3c997672..f93aa5ee2e2e36b864b7722f1be0bad022276382 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  */
index f6231b91b7247fdf39cd81d05036c7c33eb1f534..8bc5df49b0e1d935c1c2f67f9402858eff86137e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -142,8 +142,8 @@ GCR_ACCESSOR_RO(64, 0x000, config)
 GCR_ACCESSOR_RW(64, 0x008, base)
 #define CM_GCR_BASE_GCRBASE                    GENMASK_ULL(47, 15)
 #define CM_GCR_BASE_CMDEFTGT                   GENMASK(1, 0)
-#define  CM_GCR_BASE_CMDEFTGT_DISABLED         0
-#define  CM_GCR_BASE_CMDEFTGT_MEM              1
+#define  CM_GCR_BASE_CMDEFTGT_MEM              0
+#define  CM_GCR_BASE_CMDEFTGT_RESERVED         1
 #define  CM_GCR_BASE_CMDEFTGT_IOCU0            2
 #define  CM_GCR_BASE_CMDEFTGT_IOCU1            3
 
index f885051a837876ab19bdd110099a2c3a83ec4ba2..b55e335cfba40df6c68a298e808ade8027e2fc36 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index bf02b5070a989cc11ee39c85ce21ece9ee67990c..8ad4a85eed0c933d02cc2dbb12b1dc1abdc92f94 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2017 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index a2badf572632d147b1d470f728c029b36fbcf8b4..558059a8f2189fc720e15519b8e32ba7e8d6362e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2017 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index aa4cca060e0a6dacc0c1433f123d181f8962702c..b444523ecd500800cd2bf6ea5bc78c52fbaa6f88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions and declarations for MIPS MT support that are common between
  * the VSMP, and AP/SP kernel models.
index 5f8052ce43bfb589096202eee3f7841194741f59..212336b7c0f455b4396bc6b1caf75ae8d2ebec17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MT regs definitions, follows on from mipsregs.h
  * Copyright (C) 2004 - 2005 MIPS Technologies, Inc.  All rights reserved.
index e93943fabeac7ba4877b2f79a8c7ab262f674dc0..2eda19f8fd4c6403e72f984a74f52995ed8f92e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MIPSPROM_H
 #define __ASM_MIPSPROM_H
 
index e4ed1bc9a7345626d316bd1192dfdbf5bf1db8b0..a6810923b3f0214dfa36eab4a28320a65bba7790 100644 (file)
@@ -1377,29 +1377,32 @@ do {                                                                    \
 
 #define __write_64bit_c0_split(source, sel, val)                       \
 do {                                                                   \
+       unsigned long long __tmp;                                       \
        unsigned long __flags;                                          \
                                                                        \
        local_irq_save(__flags);                                        \
        if (sel == 0)                                                   \
                __asm__ __volatile__(                                   \
                        ".set\tmips64\n\t"                              \
-                       "dsll\t%L0, %L0, 32\n\t"                        \
+                       "dsll\t%L0, %L1, 32\n\t"                        \
                        "dsrl\t%L0, %L0, 32\n\t"                        \
-                       "dsll\t%M0, %M0, 32\n\t"                        \
+                       "dsll\t%M0, %M1, 32\n\t"                        \
                        "or\t%L0, %L0, %M0\n\t"                         \
                        "dmtc0\t%L0, " #source "\n\t"                   \
                        ".set\tmips0"                                   \
-                       : : "r" (val));                                 \
+                       : "=&r,r" (__tmp)                               \
+                       : "r,0" (val));                                 \
        else                                                            \
                __asm__ __volatile__(                                   \
                        ".set\tmips64\n\t"                              \
-                       "dsll\t%L0, %L0, 32\n\t"                        \
+                       "dsll\t%L0, %L1, 32\n\t"                        \
                        "dsrl\t%L0, %L0, 32\n\t"                        \
-                       "dsll\t%M0, %M0, 32\n\t"                        \
+                       "dsll\t%M0, %M1, 32\n\t"                        \
                        "or\t%L0, %L0, %M0\n\t"                         \
                        "dmtc0\t%L0, " #source ", " #sel "\n\t"         \
                        ".set\tmips0"                                   \
-                       : : "r" (val));                                 \
+                       : "=&r,r" (__tmp)                               \
+                       : "r,0" (val));                                 \
        local_irq_restore(__flags);                                     \
 } while (0)
 
index f6ba08d779318e78ca3cc09587f0389b7b87d211..0740be7d5d4ac02a67206bf165825c497565910f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MMU_H
 #define __ASM_MMU_H
 
index f53ec54c92ffa17ee35ebd5514d25676904601fd..f085fba41da501b729da0d419cca6d91a6fceb4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
  * Rewritten for Linux 2.6 by Christoph Hellwig (hch@lst.de) Jan 2004
index 06552a965cf4b1c9f848cf831e11d424145439e0..6dc0b21b8acdf8c859b4469e28ccf6b7079ea04e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_MODULE_H
 #define _ASM_MODULE_H
 
index 8967b475ab10bd28799af296c7ea98715d053eb0..b1845102f8f9d28f7ae424f9b10904a7eef9b13f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 99e97f8bfbca171e8f5e9a2a138e2eaf77ce9a23..9d36b7823603d90793d623724fae3f4f16e4c52e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions
  *
index f4f1996e0fac35d193374958683bbc9908685edf..a8c358c02b050a6f38535447e684f8b521a889c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CVMX_CONFIG_H__
 #define __CVMX_CONFIG_H__
 
index 89d58d80b77bb18da88124d03963381922de58d8..bb06169673424875d20137c6215b2149a205ade0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index d886d6f7687a5a73133b7ff1b9847b5b80afb124..e383d7e27b9359dc8a6867bc826c3958a6ea3acd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SECCOMP_H
 
 #include <linux/unistd.h>
index 4f5279a8308d7cd1138f873586b0e38eba488ee7..d49d247d48a114a3f2a301a7796d848b677f0c07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MIPS_SETUP_H
 #define _MIPS_SETUP_H
 
index 96b1a0771ec3e339d5b027ce84c5095214259e0e..88b814ef3f1845b8a113479ba853730041ea86d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * pi1.h: Definitions for SGI PI1 parallel port
  */
index 2ae1f61a4a95600e1986df03687fb478fc668966..16b4ee3feb980732359931fa0b0491381394984f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 1992d9254a08637f7ab192b92fba0b11c925d81e..338f7eed74f17eb91664b48e68b1cae6c195e350 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SN_HUB_H
 #define __ASM_SN_HUB_H
 
index feb385180f8742f0682149e13fcebfaa762e174b..25c8dccab51f1b8e69f929138b86806a36ef58a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999, 2000 Ralf Baechle
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
index 6af25ba41ade8be3821c0e7b0728e91d373d7282..ea6b217951636d31ddb338bd6129adead31c2c1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File ported from IRIX to Linux by Kanoj Sarcar, 06/08/00.
  * Copyright 2000 Silicon Graphics, Inc.
index 401f3b0eee17ec74b085bca4292821be2ab7b035..2f3efa91c16ecb7f0e4f5e08d4270432a8294260 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File created by Kanoj Sarcar 06/06/00.
  * Copyright 2000 Silicon Graphics, Inc.
index fdfae43d8b99e49b4f6b20565f6e97178f00a216..f09ba846c644fdd904223b6cdfa36d390e82d35f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SN_SN_PRIVATE_H
 #define __ASM_SN_SN_PRIVATE_H
 
index b1071c1e54f53cb22fe59cff721757a1bdcbc3ee..b0686ca3d8bfd7aa569597ef171b1ee36a2381ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MIPS_SPARSEMEM_H
 #define _MIPS_SPARSEMEM_H
 #ifdef CONFIG_SPARSEMEM
index 177e722eb96cc8469ec91a444496876523b1833e..28fd4b140beac4d2522e842d9c0a90a51027878a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPINLOCK_TYPES_H
 #define _ASM_SPINLOCK_TYPES_H
 
index 0f90d88e464d3cc005ab3ae0411d6996c5d41e1a..63cb90fd41487e08e30451684e414e7f402a8025 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MIPS_SPRAM_H
 #define _MIPS_SPRAM_H
 
index 5d3563c55e0c224bc62d20815568d61953f9902c..2161357cc68f094fb5b9c1287c38232dd19d390c 100644 (file)
                sll     k0, 3           /* extract cu0 bit */
                .set    noreorder
                bltz    k0, 8f
+                move   k0, sp
+               .if \docfi
+               .cfi_register sp, k0
+               .endif
 #ifdef CONFIG_EVA
                /*
                 * Flush interAptiv's Return Prediction Stack (RPS) by writing
                MTC0    k0, CP0_ENTRYHI
 #endif
                .set    reorder
-                move   k0, sp
-               .if \docfi
-               .cfi_register sp, k0
-               .endif
                /* Called from user mode, new stack. */
                get_saved_sp docfi=\docfi tosp=1
 8:
index eb9b1035e926b414db27c0f9209a799c20d93117..68d4be9e125471562869d85b9973533ed534300d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * GCC stack protector support.
  *
index 10c4e9c84448cc098e77f4ecf0aa44bfb5f9b365..8ad25c25b4f8c0076984cfd8fa4ef363c7c07ac6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_STACKTRACE_H
 #define _ASM_STACKTRACE_H
 
index b439e512792ba45c328c40167992e5fa5b365043..5e8927f99a766b76420a867f6982363a63adf255 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: MIPS low-level thread information
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
index 939734de435908cf5a37d04dc904900943e72a93..b6823b9e94dad0c2f3b13ad867e1153d4f95c789 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TLB_H
 #define __ASM_TLB_H
 
index 53050e9dd2c96e61896770f1f5ea23c13ba55108..4ed7ebed3bf1f060d2f6965618120751e519605a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TLBEX_H
 #define __ASM_TLBEX_H
 
index 86b21de12e91314a68c30ddf4cb6d449bca86674..40a361092491e0145324569f75f8ebeb252cad74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TLBFLUSH_H
 #define __ASM_TLBFLUSH_H
 
index 3a452282cba0a1d2d02e635c1c35123f6d751f83..c1a540669c23c63cddb1023d98fbd5a8a4a7654c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TLBMISC_H
 #define __ASM_TLBMISC_H
 
index cbe9476d963e3681306dc8dea73294a253c4bdd3..d45237befd3e60872fe9035d8b2c7fdfa67b9159 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_TOSHIBA_JMR3927
 BOARD_VEC(jmr3927_vec)
 #endif
index 975ff51f80c4d55868f9296c19ce2ef64ceab622..0136e03666989ab11a2d6d0bf3e24ea6b598501f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 485cfe3e45e1252fe66313082748bc9beaae2018..10a073e6877a612236ac88de868cf8357d9b458d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 45ba259a3618eef36dd424ce5697063f109a5acd..612c2c41f60b25abc0a76058d408a5b11ae3a5da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2015 Imagination Technologies
  * Author: Alex Smith <alex.smith@imgtec.com>
index ad9861359cea7f0b19a8745c93af3ef6f11ac3d2..b11713d8743efef3ef1082e88f9a2d3b9d28fbd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 3e4c10a8e78768f5e191a1dbd3ede01df50da515..7268380d8d28750a95eaf725e8ff6c8e1779652d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_MIPS_BITSPERLONG_H
 #define __ASM_MIPS_BITSPERLONG_H
 
index 9c4265cbf151812e6c67b94265c4d19216e5d542..10380b1bc601e883e9614d18cb15686b807ac91e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 9579051ff1c7b9b66924c99e35490dcd925104e8..b4edc85f9c30c09aafbc189ec820e6e2f7cbe0d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 2303909087734adbac1c35c2d778df3099a48eea..af7639ff423b8d6593031301df38f948e856feef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 02d645d7aa9a0ed9a49e40dadd70542ffef95ffa..2fb714e2d6d8fcd41806d84e41b3e6f0edc04b7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 6ca432f00860e3bf1c128e0e9d7e3f25ab1e3656..42e13dead54319e2e33d4729a05e939a4c8d5fd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index c7484a7ca686d30571e4fc760b0407b4c8780282..600ad8fd683565c5b756c4654cb1eba4ed346af8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_HWCAP_H
 #define _UAPI_ASM_HWCAP_H
 
index 6abea5183d7ca160688089cc92741f872de15c4f..c05dcf5ab414e98eddd1839bb9afcd8d079f3ca8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Format of an instruction in memory.
  *
index c515a1a4c47cab8c6b8333d010112a3570233d63..1050a6ea211ccca029792df79218ba65e8c4443c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 1609cb0907acecaa03d149e4b043ebe3dff952c9..890245a9f0c4d4064588596ea86c76219f5d2e1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 0318c6b442ab4df3f3af39c24ea4cb66c13902a3..edcf717c432717fce72096b1e5a2905c3f8c63ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index da3216007fe0ccac2e0695c10b4e1cac1ada8b9d..20c3df7a8fdd264a622b95daa80a5d6c025c27f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index df849e87d9aee9ffb9f6141e921e13e21f6059c8..eb4d0f9d736418db03053e840afdcb34e78056ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
index da3920fce9ad666c55af424312383dcdf81780df..3f337ed66f6a212a539dd7e590d996f086ea57c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 47b9520804315b718611797bf02174d97d8c8903..ad289d7b74340f174d22fd6703138b6354e9cdda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_POLL_H
 #define __ASM_POLL_H
 
index fa03ec3fbf897a4c3271d8a38025f383c82760cc..6aa49c10f88f7e2073bc2bd4202d02cab6b0f46a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 91a3d197ede365437ba468e5dff97e4358a6f314..f3c025445e45fa26a362f225d0338e6774870757 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 081e377f4f023106f6654635d82bd77c7dd5a4ba..56d15cb8109fe97665ec14f3731ce0d427088cd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Various register offset definitions for debuggers, core file
  * examiners and whatnot.
index b26439d4ab0ba5e2a77ef337345fae830483cbc0..372ff8f4bc06b943ec40a82d27f4044de682d19a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index e1085ac880f2ec14afce2950b96ffbf91fd7185e..2c0f507ab7d1f83635cd1387c48b7ac73729fafa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
index 93f237bb1353384b1e074098f95499b672f4815a..7d48c433b0c27d9a94027f575c847d57efc27119 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_MIPS_SETUP_H
 #define _UAPI_MIPS_SETUP_H
 
index 876442fcfb32c59ef8e6c7b886c75e68cd8fdeb4..26143e3b7c26d26291552fb81754b5df93281c5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index f994438277bf4e0d5093ee7606430add438fadce..379e6bca518b030d9cc8f175d825bcfc8ca17915 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
index 5cbd9ae6421faa23948af2704222ff312adfda0d..d0a540e88bb41c68c16cc2c6d113cfa765f59ef2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index cf6113bbcb98cfb4edeeb4e052a6452580d9f018..f17d8163dec6a7a49a0bd06b26ab7d563497c4b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index addb9f556b71836de758580005a0a603fc040f64..53104b10aae2e8fe753f4bcbfcdd72fa1f7ae435 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 6c755bc0797513179d3865bd780ea9bab8a199e5..49c3d47959637a8653067bc903fbcb8b0bb16e1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 419fbe661da32994a1c45b28cccdf9822068df57..5b40a88593fa8180e9af018d98535a6717bef614 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Socket-level I/O control calls.
  *
index b47bc541bbc07133e58390c1d52e9baa3bba2fbe..95416f366d7f8a18dc0e9a56cd33e3edbdc6bc9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 3305c834fc1644989d0b2e8e2d24ff191bb26d49..f4174dcaef5e6a48487f5267c3b144e27202210a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 23cd9b118c9e4f8f8fd43031dd67dcee8e610af8..d6795fe4ec59c8a21d7ae58e0d4b5e0fe451e9d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index ae637e9078562305f094dffbd56a4b78ad23a4ed..4c009e10dfd2da4005ce2a688815cde757620c6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for the MIPS sysmips(2) call
  *
index 2750203e1e7d1760c650e7d5802c4da1b595c61b..dfeffba729b77383e3b63ec02f2fe92e12d13b58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index baeb2fa874512e6c46067179478e8eac543cddc2..d6c5767941781f9375ecf4a1c67925b32e1e7470 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index f3dd9ff0cc0c07def2ff4f6d8d56d1c30aef05f0..6b21504842a44a55b9b3a1b083de62702989f756 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index 2320144ce858033430423e4f56a85f86ab52068c..2d3bf8eebf1f0bf5976ad6b8aaca1639e9d5c8be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __MIPS_UAPI_ASM_UCONTEXT_H
 #define __MIPS_UAPI_ASM_UCONTEXT_H
 
index 78faf4292e907c175e0ff70e961a1c768f6df7c0..bb05e9916a5fa7f969d915b742329ae67cd51b57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index fb1e072da30b997c9674ee5f98b3173daf743a6b..06838f80a5d7cacea731856ddda01244037636ec 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ACER_PICA_61
        bool "Support for Acer PICA 1 chipset"
        depends on MACH_JAZZ
index 11172fdaeffcd447b7593fb219bb79eff70c6149..d626a9a391cc9dc594a3924ddf249c0d70ce88e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Mips Jazz DMA controller support
  * Copyright (C) 1995, 1996 by Andreas Busse
index dd889fe86bd1da2a4d60d3537a82b4ea6867c42a..052b01f5d935ac44b310362e7b6f90e921529687 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Reset a Jazz machine.
  *
index 36f82017695dbd1b50f9d862487f991676375bd3..643af2012e143cf30e6f3d9bec4fc42c3f0780fb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "Machine type"
        depends on MACH_INGENIC
index 6b9c1f7c31c9f3787562eefedb1935b0330af266..88d6aa7d000bbd2590cf9865131b946fdf161346 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Ingenic JZ4740.
 #
index 5202ab4ad9db8c2b8d29bc301a370b2ce97de7cb..4e8746ee9b616c015f3d97270d6059e4ee5f744c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MIPS_JZ4740_RESET_H__
 #define __MIPS_JZ4740_RESET_H__
 
index 07f0f4a4b56236cead0ce920035d45922ccdeea8..f10e1e15e1c6ae4acda4667caa274f82e7451011 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/MIPS kernel.
 #
index a670c0c11875d28e6b18d163066934aa27259139..c1cd41456d42f5dd6b5e45b62eee8f6b2393c2aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * asm-offsets.c: Calculate pt_regs and task_struct offsets.
  *
index 4a2ff3953b99ce44b1b78958ed6a8ad5743ba129..89b2348445342fe8ffe337d588cc8d0ec1303761 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for n32 Linux/MIPS ELF binaries.
  * Author: Ralf Baechle (ralf@linux-mips.org)
index 3916404e7fd102eb19b42a1d142fdd2c0aaf3354..a88c59db3d48cfc3112fd96a0997db83cbf98a28 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for o32 Linux/MIPS ELF binaries.
  * Author: Ralf Baechle (ralf@linux-mips.org)
index 7730f1d3434f43fb9f68650d09e8f4995a69377a..0b9535bc2c53d0c450a0c02beb24691d356614e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2017 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 6d246ad05638bd5ef063c5ce5f1c79e1b8e904db..b37af23a535814fb656b79a9061f65db7d3a67ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index d173b49f212daf65701b9b66e9a110745d091150..c7ed26029cbbcf0ed7458a145d490957a59abb4e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index ca25cd393b1ccb011494f2750c526081fc7d9fe7..d455363d51c3d0e6e441ac65c2b4303fffe87117 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/reboot.h>
index 77ee99a2d0aaee816a86ec6da23b8d35ede7d7df..a8657d29c62e0e3f4f84853907544c61c5b38d4d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/highmem.h>
 #include <linux/bootmem.h>
 #include <linux/crash_dump.h>
index 0828d6d963b7294291203500caa95592d962981c..731325a61a7840a40a3fa0b217b7729d23f834fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 9d9b8fbae2022a426f0bcd9c7e134c4c33b67034..99285be0e0884c9f6d5d6b9506b7b2b221b4b918 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Code for replacing ftrace calls with jumps.
  *
index c5bc344fc745c4b45a0daa40ea09447f49834cd4..5f209f111e59e3ad9c6e31bee8352623cacc3e68 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * i8253.c  8253/PIT functions
  *
index b01bdef101a85f5178d59b3b1333a1e8d96dddf2..b332f6fc1e726f048d2db25c365e5148bae81158 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Conversion between 32-bit and 64-bit native system calls.
  *
index e91c8c4e2eb59e69c76c516bd3fbc99f23f21c8b..dd5567b1e30555fd6d4ed07d5101603682b1e8ad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index f66b05ebf637d4c6542df58c4d510e16b88a2b8c..19c88d770054617bfc23b15c81c20b12a7f7cc3f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 8cab633e0e5adec9da5ff8d99efd019858affced..a7c0f97e4b0d6eea56db2f9eedad24a9158d669b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * General MIPS MT support routines, usable in AP/SP and SMVP.
  * Copyright (C) 2005 Mips Technologies, Inc
index 88b1ef5f868aa9ffdeda653f2050734b61bffc85..efaa2527657dbda2723f87914eba66ec17d9de8b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * General MIPS MT support routines, usable in AP/SP and SMVP.
  * Copyright (C) 2005 Mips Technologies, Inc
index 9e6c74bf66c485cc3c1a23ee1d298c1b6f81dad5..6668f67a61c3a2bb09fc23d9e2172d7a738020e1 100644 (file)
@@ -618,8 +618,7 @@ static int mipspmu_event_init(struct perf_event *event)
                return -ENOENT;
        }
 
-       if ((unsigned int)event->cpu >= nr_cpumask_bits ||
-           (event->cpu >= 0 && !cpu_online(event->cpu)))
+       if (event->cpu >= 0 && !cpu_online(event->cpu))
                return -ENODEV;
 
        if (!atomic_inc_not_zero(&active_events)) {
index 4655017f2377d0246cc5c9604eba39bbc98366c2..9dd624c2fe567e9f4ad41f414704c98e265df1a1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index dd08e41134b667155aa542433b1316191781edf0..d2bf77b18822cd01ea4ade29b25e2b084c077347 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+ * Author: Marcin Nowakowski <marcin.nowakowski@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index bd9bf528f19bae31896568ce00c5b41c1694af14..b2de408a259e493b65a4b28abe0a746081f0aa78 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1995, 1996, 2001  Ralf Baechle
  *  Copyright (C) 2001, 2004  MIPS Technologies, Inc.
index e57703b1de50264814ce3a96483721b2556c77b2..665897139f30c08985ed38352192cabf0148c0f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * r2300_switch.S: R2300 specific task switching code.
  *
index 2d1a0c4387713c7862e06bbf79e8c904a07b2279..cbf4cc0b0b6cf194a7f1330e185b7aee13d835f3 100644 (file)
@@ -6,7 +6,7 @@
  * Support for Kernel relocation at boot time
  *
  * Copyright (C) 2015, Imagination Technologies Ltd.
- * Authors: Matt Redfearn (matt.redfearn@imgtec.com)
+ * Authors: Matt Redfearn (matt.redfearn@mips.com)
  */
 #include <asm/bootinfo.h>
 #include <asm/cacheflush.h>
index 05295a4909f14affe37487c634b2a12c32c18e16..a2322009cac302610ae4b6fb68f00422889ad3ac 100644 (file)
@@ -19,7 +19,7 @@
 #undef DEBUG
 
 #include <linux/kernel.h>
-#include <linux/sched.h>
+#include <linux/sched/task_stack.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
@@ -50,8 +50,8 @@ static void cmp_init_secondary(void)
 
 #ifdef CONFIG_MIPS_MT_SMP
        if (cpu_has_mipsmt)
-               c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) &
-                       TCBIND_CURVPE;
+               cpu_set_vpe_id(c, (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) &
+                                 TCBIND_CURVPE);
 #endif
 }
 
index 0063122c85da809853e9bf8ab598495f1f7bb43d..ecc1a853f48d4225b72ea0dd7299c64e450653c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -306,7 +306,7 @@ static int cps_boot_secondary(int cpu, struct task_struct *idle)
        int err;
 
        /* We don't yet support booting CPUs in other clusters */
-       if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&current_cpu_data))
+       if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&raw_current_cpu_data))
                return -ENOSYS;
 
        vpe_cfg->pc = (unsigned long)&smp_bootstrap;
index bbe19b64def5b6c863e9d2e11f0ad36609d0bfde..88be966d3e619785fdb96cc5705443f1cb607a32 100644 (file)
@@ -42,7 +42,7 @@
 #include <asm/processor.h>
 #include <asm/idle.h>
 #include <asm/r4k-timer.h>
-#include <asm/mips-cpc.h>
+#include <asm/mips-cps.h>
 #include <asm/mmu_context.h>
 #include <asm/time.h>
 #include <asm/setup.h>
@@ -66,6 +66,7 @@ EXPORT_SYMBOL(cpu_sibling_map);
 cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(cpu_core_map);
 
+static DECLARE_COMPLETION(cpu_starting);
 static DECLARE_COMPLETION(cpu_running);
 
 /*
@@ -374,6 +375,12 @@ asmlinkage void start_secondary(void)
        cpumask_set_cpu(cpu, &cpu_coherent_mask);
        notify_cpu_starting(cpu);
 
+       /* Notify boot CPU that we're starting & ready to sync counters */
+       complete(&cpu_starting);
+
+       synchronise_count_slave(cpu);
+
+       /* The CPU is running and counters synchronised, now mark it online */
        set_cpu_online(cpu, true);
 
        set_cpu_sibling_map(cpu);
@@ -381,8 +388,11 @@ asmlinkage void start_secondary(void)
 
        calculate_cpu_foreign_map();
 
+       /*
+        * Notify boot CPU that we're up & online and it can safely return
+        * from __cpu_up
+        */
        complete(&cpu_running);
-       synchronise_count_slave(cpu);
 
        /*
         * irq will be enabled in ->smp_finish(), enabling it too early
@@ -445,17 +455,17 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
        if (err)
                return err;
 
-       /*
-        * We must check for timeout here, as the CPU will not be marked
-        * online until the counters are synchronised.
-        */
-       if (!wait_for_completion_timeout(&cpu_running,
+       /* Wait for CPU to start and be ready to sync counters */
+       if (!wait_for_completion_timeout(&cpu_starting,
                                         msecs_to_jiffies(1000))) {
                pr_crit("CPU%u: failed to start\n", cpu);
                return -EIO;
        }
 
        synchronise_count_master(cpu);
+
+       /* Wait for CPU to finish startup & mark itself online before return */
+       wait_for_completion(&cpu_running);
        return 0;
 }
 
index f7d86955d1b80b43b4321e1314ea6ceede4224f4..eaed550e79a2efe7ee34c8587257704b3361c016 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kthread.h>
 #include <linux/hrtimer.h>
index 1df1160b6a47fc69f1af48d15d2e0df3dc7b6793..f2973ce87f53a90759d33b0ea9a725601f310b5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Count register synchronisation.
  *
index 5f055393092dec3ac7704a22e72e672c08a22029..e5a2a6ab71acc9fb349ff75e8d32ba0d322edda8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MIPS specific sysrq operations.
  *
index cf3eb61fad121340707b8ccfe1baf6fcb4993a42..cd3e1f82e1a5df356e41990652712466d6e147d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cpu.h>
 #include <linux/cpumask.h>
 #include <linux/init.h>
index e99e3fae5326eef924d18f97bcb2f97a745a98c4..f7a0645ccb82c446af586d6cbcf7b683c6b47a6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/highmem.h>
 #include <linux/kdebug.h>
 #include <linux/types.h>
index 8ca2371aa684bb7ddcc6b83b0de8b93c87e93db3..971a504001c27cfd2408b634ace6d2501d47f6f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 
index 50a722dfb236d7edbaf99ab51dd65986e250dc08..b17447ce887314f486772c0ebde81c46ec655bd5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index 45d90f5d5177a0783842e0b6137cc8d1c38db2d0..01affc1d21c53cca2201eae8a19de82249598c95 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for KVM support for MIPS
 #
 
index 35bc69b78268eff635182d3144f01cd40d41b117..692ae85a3e3d4452e145346aabc9012fce3ec963 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if LANTIQ
 
 config SOC_TYPE_XWAY
index 8776d0a34274f295c3c611ae33bceb00e25e1a8d..11b89e94b83571b0b5cece4b0e7eaf0da763ec70 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PICVUE
        tristate "PICVUE LCD display driver"
        depends on LASAT
index 869bd3b37c17e0be329a7d6673ff463e8e6691d6..1789b227ef204603e101e020947197e43f1dfa35 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the LASAT specific kernel interface routines under Linux.
 #
index 4e272a2622a4332ed783ed52ff25585bfad213aa..f895fe94b937e63dc4bf08bffbc9c6ae5b7f2ae8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Atmel AT93C46 serial eeprom driver
  *
index cfe2f99b1d440884ab84f4da1e2bad8f989c3e48..7a99a02d81d072757ec95ec26535e798e32940dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Atmel AT93C46 serial eeprom driver
  *
index c6fd96ff118df4477627befc5db24d602a2abd7c..8bd5cf820eed9978b06fc65f15f91dda9748a7fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dallas Semiconductors 1603 RTC driver
  *
index 3e718b1cca025407b6034c851f2ffc389e8c7f94..00987d3bdc2114ed86278bc57c46754bf894386e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Dallas Semiconductors 1603 RTC driver
  *
index fd32075679c66b3fc6cf2ebdff6e3f15fb3a83c6..9ab1326f57c976f5643394dacc21075c534eb4d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # MAKEFILE FOR THE MIPS LINUX BOOTLOADER AND ROM DEBUGGER
 #
index 41babbe43a8e2b988f5fc465b0f5937b13b10f0a..1a27312d4c2e87adae0ad02f3f9ca30e89c179f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/lasat/head.h>
 
        .text
index e1cbd26ae1b3fad08199f631c9fad3e2621d7982..474e57342484641348d2e693231a96c43c683857 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Model description tables
  */
index d0119fca3862208356a7a2d6d05f26c221972441..161d3bf508119b9ed04d587c8cc35c710b9434a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Picvue PVC160206 display driver
  *
index 20fde19a5fbf83480d428fb803acacdb8fe45b07..17e15b50a551fbaa75891ef626e0daf873dae7cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PROM interface routines.
  */
index 337acbc27442eb9992f819d90364bf14b781a723..3d1df853e9d347829e757ac03914c2658c3eabb9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PROM_H
 #define __PROM_H
 
index 6ab430d245758abeb74533b9aa9d85c123fad454..78c2affeabf8154ae9046eaf10c228c1932b6b99 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for MIPS-specific library files..
 #
index c3e22053d13eb2172374c90c2a8eb75cb0299784..24cd6903e7977ccd14491593a30bfd656e3b7f7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 17456024873d20918cc151c16e4d75173b6869ee..23f5295af51e1cff77b255986370c34122897778 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index a8114148f82a4f4c300c064013b0068f3273191f..fcef74084492c97a4e874d471ca954e68dd1f6ec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/compiler.h>
 
index 106fd978317d3b35740e62f4f0f00979011b050e..22d8e4f6d66ec5c178a48c189a4e75bbb98abd47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/compiler.h>
 
index 9d849d8743c953d5f1ad9976af7314bd85c31072..93cfc785927d13cf1a607df053bc5fa8b4e9d45f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 6eb50a7137db05c9dc18b38bf33b317192aa058a..781ad96b78c44f741e978076b05b5ce309f6ab98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dump R4x00 TLB for debugging purposes.
  *
index 8ed3f25a9047d06b80cfeffa495cb2f18984a306..4850509c5534225f0ab8bd9f1fedc04571e613f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement the default iomap interfaces
  *
index 9daa92428e23b39b33c6b2c3a63670c11755e5f2..9b31653f318c91e98de826fd43f685cdbdc6b51e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement the default iomap interfaces
  *
index 05909d58e2fe1c278e3f30a3d196e1c214724194..28002ed90c2cb5fe336ae385cae47a45a20ab680 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LIBGCC_H
 #define __ASM_LIBGCC_H
 
index 221167c1be551aa1b950f038a070e7f92b78a84e..914b971aca3b44368cddbd21ab42095ddb697f08 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 85b4086e553e8734cf4b286a2a65d5159ed4f5d9..b97d9c5d83230c597fa8e36df2f85a4c0d3930df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dump R3000 TLB for debugging purposes.
  *
index 08067fa538f2dd070450821def7cb976460aba56..c31c78ca417520011465d0ea69f1066421ff7242 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 
 #include "libgcc.h"
index 3c0c2f2096cd8d1862e5807460d5deb39e3ab3fb..462b126f45aa7495a7e58a9be7d3038b228c7731 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MACH_LOONGSON32
 
 choice
index 100f23dfa4384495dc4868ee0b921f6963188729..ac584c5823d08666c40c38144ad33289cc9302ae 100644 (file)
@@ -183,18 +183,20 @@ int ls1x_eth_mux_init(struct platform_device *pdev, void *priv)
 }
 
 static struct plat_stmmacenet_data ls1x_eth0_pdata = {
-       .bus_id         = 0,
-       .phy_addr       = -1,
+       .bus_id                 = 0,
+       .phy_addr               = -1,
 #if defined(CONFIG_LOONGSON1_LS1B)
-       .interface      = PHY_INTERFACE_MODE_MII,
+       .interface              = PHY_INTERFACE_MODE_MII,
 #elif defined(CONFIG_LOONGSON1_LS1C)
-       .interface      = PHY_INTERFACE_MODE_RMII,
+       .interface              = PHY_INTERFACE_MODE_RMII,
 #endif
-       .mdio_bus_data  = &ls1x_mdio_bus_data,
-       .dma_cfg        = &ls1x_eth_dma_cfg,
-       .has_gmac       = 1,
-       .tx_coe         = 1,
-       .init           = ls1x_eth_mux_init,
+       .mdio_bus_data          = &ls1x_mdio_bus_data,
+       .dma_cfg                = &ls1x_eth_dma_cfg,
+       .has_gmac               = 1,
+       .tx_coe                 = 1,
+       .rx_queues_to_use       = 1,
+       .tx_queues_to_use       = 1,
+       .init                   = ls1x_eth_mux_init,
 };
 
 static struct resource ls1x_eth0_resources[] = {
@@ -222,14 +224,16 @@ struct platform_device ls1x_eth0_pdev = {
 
 #ifdef CONFIG_LOONGSON1_LS1B
 static struct plat_stmmacenet_data ls1x_eth1_pdata = {
-       .bus_id         = 1,
-       .phy_addr       = -1,
-       .interface      = PHY_INTERFACE_MODE_MII,
-       .mdio_bus_data  = &ls1x_mdio_bus_data,
-       .dma_cfg        = &ls1x_eth_dma_cfg,
-       .has_gmac       = 1,
-       .tx_coe         = 1,
-       .init           = ls1x_eth_mux_init,
+       .bus_id                 = 1,
+       .phy_addr               = -1,
+       .interface              = PHY_INTERFACE_MODE_MII,
+       .mdio_bus_data          = &ls1x_mdio_bus_data,
+       .dma_cfg                = &ls1x_eth_dma_cfg,
+       .has_gmac               = 1,
+       .tx_coe                 = 1,
+       .rx_queues_to_use       = 1,
+       .tx_queues_to_use       = 1,
+       .init                   = ls1x_eth_mux_init,
 };
 
 static struct resource ls1x_eth1_resources[] = {
index 8e6e292675b24525f3b50e14e4214fe251914ae1..0d249fc3cfe9f12d9f001dac7a3d2d976ac01e7e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MACH_LOONGSON64
 
 choice
index 074d9cb15cd20dcb5551a65d99464bc0d0588992..8235ac7eac95f09309b6526e2ffada05c27e0db6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for loongson based machines.
 #
index 34486c1382067b531c92cfdb13b851d465e5ff51..ef07740cee61bed6df30c3751148ca636e218b03 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
index dbdad79ead8f23dd4a52fb46b0f09544111731e3..8d7c119ddf917cc42a94a2e5771f4b78b87db7ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
index 4df9d4b7356af47517c8c1dfc4f7975e387b27d7..ed15430ad64fa311dc2b64739c075dd0a70980b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/percpu.h>
index 7202e52cd0469251d198c50c97d081c4270ca341..cbeb20f9fc95ca25d7396b2e779dcbab4ccbcd3c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <loongson.h>
 #include <irq.h>
 #include <linux/interrupt.h>
index d98ff654b7d777c04cffb00ff3492adcefee551a..957bde81e0e4e52190691b02504c29993f90e9ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LOONGSON_SMP_H_
 #define __LOONGSON_SMP_H_
 
index e9f10b88b695baa01ec6f3cc52bd46d3742994ff..81d25ff328a7a1fc77ee1072118f029300dcafd4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/MIPS kernel FPU emulation.
 #
index 192542dbd9724788838a74cb5ed4b8404b0d83fc..16d9ef5a78c57086c5c5db3f518b5bb4c7b1f0b9 100644 (file)
@@ -2558,7 +2558,6 @@ dcopuop:
                                        break;
                                default:
                                        /* Reserved R6 ops */
-                                       pr_err("Reserved MIPS R6 CMP.condn.S operation\n");
                                        return SIGILL;
                                }
                        }
@@ -2719,7 +2718,6 @@ dcopuop:
                                        break;
                                default:
                                        /* Reserved R6 ops */
-                                       pr_err("Reserved MIPS R6 CMP.condn.D operation\n");
                                        return SIGILL;
                                }
                        }
index b6bfd36253694fd24677cad694f9b1e050bd8f89..5450f4d1c920e22d5119c6ec389fb8ddc22cc176 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/mm_types.h>
index 8c0ec154aecc1061a2887bb6d993ed1ced446a99..62566385ce0e25dbf6a4a0bb66593eb778af16e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cpumask.h>
 #include <linux/debugfs.h>
 #include <linux/fs.h>
index b4cc8811a6642b35901e4bcc9a277b657801d8fb..c463bdad45c799a422eb94cc62ecd2fa79c61268 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/MIPS-specific parts of the memory manager.
 #
index 21e4e662c1fa6c29597a37ab837643d68141a88b..3466fcdae0ca294b2d2f43c1d4105693576aca3d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * r2300.c: R2000 and R3000 specific mmu/cache code.
  *
index 5c282583edf16a5c95a638707199e80be3cd734b..5f6c099a9457953dd70b15e1cce3b98710e7fce9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * r2300.c: R2000 and R3000 specific mmu/cache code.
  *
index d8c3c159289a2953b8ae495a1da34d27d095b161..1e4658eee13fb5bdd0c4b7df0e32a486f8c0be75 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Lockless get_user_pages_fast for MIPS
  *
index f13f51003bd83c7db13c8e7f298b85c14e4a962f..d08e6d7d533b049a607fbce4513c903acdc73472 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/init.h>
 #include <linux/export.h>
index 7e945e310b446bb1ff95660eaf00e5e5f61ca283..2e2132d3f5c748d04a62a4ed34b528b941976556 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index f293a97cb885115bcc52685b1015ca1029073158..ea059cd8649627c695b14f178cd61b7ebf528775 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sc-ip22.c: Indy cache management functions.
  *
index acfb89273dad7d9eaa1529f07e94b3b439733309..548acb7f85571ed14ad4fc538b083fdbee185237 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2006 Chris Dearman (chris@mips.com),
  */
index 751b5cd18bf28b15fa52b79bbe985b318d29ab42..c7b94c951d9844fcb212d8988cad23663b3d21ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1997, 2001 Ralf Baechle (ralf@gnu.org),
  * derived from r4xx0.c by David S. Miller (davem@davemloft.net).
index 78f900c59276eab4f7056b2561a38fdf1cdf862a..e9e3777a7848df0654cdc40664afe6c1817370f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sc-rm7k.c: RM7000 cache management functions.
  *
index 1290b995695d45d06105cde3dce65eec4878322c..6f589e0112cea88dfa50b9fc1c99b592bf5c11d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * r2300.c: R2000 and R3000 specific mmu/cache code.
  *
index c28ff53c8da084feb3c100ca49a0f7e36ba9379f..cdb5a191b9d554c165991c9a507c9b8b83d81ac5 100644 (file)
@@ -80,7 +80,7 @@ static const struct insn const insn_table_MM[insn_invalid] = {
        [insn_jr]       = {M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS},
        [insn_lb]       = {M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
        [insn_ld]       = {0, 0},
-       [insn_lh]       = {M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM},
+       [insn_lh]       = {M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
        [insn_ll]       = {M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM},
        [insn_lld]      = {0, 0},
        [insn_lui]      = {M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM},
index 5827af77c18e9931c43af5e5df2881f94df44c25..63940bdce698848b272e27f3f6c8b389e2d11b94 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Carsten Langgaard, carstenl@mips.com
 # Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
index 4822943100f303c0fe08c7d7a3514ea7e0a8b927..b397117033aa87c4f5a99a0f3de64986ab7cd8db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index a6699c15277d9b802536abba8a2d27288f6e0861..7859b6e498634a8fd9f3f3d0d1ff708c189dd2b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index c1e456c01a44d4fcab94cafc584f8c0507e742b4..efbd659fb6024b48ce5245b3f6338ca5d5a4d08b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 7646891c4e9b18077d59ac28bfe2ffe5b82d0d37..962b0259b4b6eb86443f88134fa90d044af08cc1 100644 (file)
@@ -667,7 +667,7 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
 {
        int src, dst, r, td, ts, mem_off, b_off;
        bool need_swap, did_move, cmp_eq;
-       unsigned int target;
+       unsigned int target = 0;
        u64 t64;
        s64 t64s;
        int bpf_op = BPF_OP(insn->code);
@@ -1513,7 +1513,7 @@ ld_skb_common:
                }
                src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
                if (src < 0)
-                       return dst;
+                       return src;
                if (BPF_MODE(insn->code) == BPF_XADD) {
                        switch (BPF_SIZE(insn->code)) {
                        case BPF_W:
index fb00606e352d53993700112b117194c47e3bebe3..8296b13affd280eefa408b8341ced96a78a75f1c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if NLM_XLP_BOARD || NLM_XLR_BOARD
 
 if NLM_XLP_BOARD
index 362739d62b1d9ebe6d400d8b20fdc02f1aff6b76..60d00b5d748ee5842ae383fce64b7291d212d24a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          += irq.o time.o
 obj-y                          += nlm-dma.o
 obj-y                          += reset.o
index 6b43af0a34d9dd39c4afd08526342bbdd514b068..d624657173931085c71a501818b077e9de4f8076 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          += setup.o nlm_hal.o cop2-ex.o dt.o
 obj-$(CONFIG_SMP)              += wakeup.o
 ifdef CONFIG_USB
index 070afdb297df161077fc6289632545fb12e6e995..011cf9f891e774ec566109e4a2793397cd2d871e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index 16ace558cd9d4f2af65a2b946143b893e3bb9bc1..806fb798091f36f7a31d5efdab2e604c812e6ddb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/oprofile.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
index ecae5861b601fc24acbe9b351cd91d728976c53d..46b110fec96705cb24d19f3913a97ce22b2f1fab 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MIPS_PARAVIRT
 
 config MIPS_PCI_VIRTIO
index 4b821481dd4432b11103ac30fb24fa2fece707ec..8185a2bfaf093076a7f2113403daeb130df431ce 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PCI specific kernel interface routines under Linux.
 #
index 1c02f5737367aa7e75569afeb98aebcd3ebb5327..b4c263f16b15eeb62c4fc93d70ff828cdfa7ac7f 100644 (file)
 #define INTC   PC104PLUS_INTC_IRQ
 #define INTD   PC104PLUS_INTD_IRQ
 
-static char irq_tab_capcella[][5] __initdata = {
+static char irq_tab_capcella[][5] = {
  [11] = { -1, INT1, INT1, INT1, INT1 },
  [12] = { -1, INT2, INT2, INT2, INT2 },
  [14] = { -1, INTA, INTB, INTC, INTD }
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return irq_tab_capcella[slot][pin];
 }
index b3ab59318d91a7a2817e6615efba1ef3fc0a2c37..44be65c3e6bb3d211d8692211b732d5f41f2caa4 100644 (file)
@@ -147,7 +147,7 @@ static void qube_raq_via_board_id_fixup(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0,
         qube_raq_via_board_id_fixup);
 
-static char irq_tab_qube1[] __initdata = {
+static char irq_tab_qube1[] = {
   [COBALT_PCICONF_CPU]    = 0,
   [COBALT_PCICONF_ETH0]           = QUBE1_ETH0_IRQ,
   [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ,
@@ -156,7 +156,7 @@ static char irq_tab_qube1[] __initdata = {
   [COBALT_PCICONF_ETH1]           = 0
 };
 
-static char irq_tab_cobalt[] __initdata = {
+static char irq_tab_cobalt[] = {
   [COBALT_PCICONF_CPU]    = 0,
   [COBALT_PCICONF_ETH0]           = ETH0_IRQ,
   [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ,
@@ -165,7 +165,7 @@ static char irq_tab_cobalt[] __initdata = {
   [COBALT_PCICONF_ETH1]           = ETH1_IRQ
 };
 
-static char irq_tab_raq2[] __initdata = {
+static char irq_tab_raq2[] = {
   [COBALT_PCICONF_CPU]    = 0,
   [COBALT_PCICONF_ETH0]           = ETH0_IRQ,
   [COBALT_PCICONF_RAQSCSI] = RAQ2_SCSI_IRQ,
@@ -174,7 +174,7 @@ static char irq_tab_raq2[] __initdata = {
   [COBALT_PCICONF_ETH1]           = ETH1_IRQ
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
                return irq_tab_qube1[slot];
index 19caf775c20645ada7f1bbc86777c2bd45b23246..c31cb6af1cd07f8e9dd5ad715d30f93abd53a927 100644 (file)
@@ -43,7 +43,7 @@
  */
 
 #define MAX_SLOT_NUM 10
-static unsigned char irq_map[][5] __initdata = {
+static unsigned char irq_map[][5] = {
        [3] = {0, MARKEINS_PCI_IRQ_INTB, MARKEINS_PCI_IRQ_INTC,
               MARKEINS_PCI_IRQ_INTD, 0,},
        [4] = {0, MARKEINS_PCI_IRQ_INTA, 0, 0, 0,},
@@ -85,7 +85,7 @@ static void emma2rh_pci_host_fixup(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH,
                         emma2rh_pci_host_fixup);
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return irq_map[slot][pin];
 }
index 50da773faedee8fc5850480857ea5e36a78f24c0..b47c2771dc997663a7046dcb6166d1987957c89e 100644 (file)
@@ -19,7 +19,7 @@
 /* South bridge slot number is set by the pci probe process */
 static u8 sb_slot = 5;
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq = 0;
 
index 133685e215ee6a2f02a5a244e04e08464543273d..d091ffc53569186ec41e06cdd8bf52853f7224c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
@@ -21,7 +22,7 @@
 #define INTB   MACEPCI_SHARED0_IRQ
 #define INTC   MACEPCI_SHARED1_IRQ
 #define INTD   MACEPCI_SHARED2_IRQ
-static char irq_tab_mace[][5] __initdata = {
+static char irq_tab_mace[][5] = {
       /* Dummy INT#A  INT#B  INT#C  INT#D */
        {0,         0,     0,     0,     0}, /* This is placeholder row - never used */
        {0,     SCSI0, SCSI0, SCSI0, SCSI0},
@@ -39,7 +40,7 @@ static char irq_tab_mace[][5] __initdata = {
  * irqs.  I suppose a device without a pin A will thank us for doing it
  * right if there exists such a broken piece of crap.
  */
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return irq_tab_mace[slot][pin];
 }
index 0f1069527cbae435775c39d7acbaeb9369561d87..d3102eeea898983c655d7b8e6d7f923cdc56395a 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/txx9/pci.h>
 #include <asm/txx9/jmr3927.h>
 
-int __init jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        unsigned char irq = pin;
 
index 2b5427d3f35c255bc566978b02ff1ac8e057f551..81530a13b34990a38d159ae248aa0a2d453bf332 100644 (file)
@@ -23,7 +23,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
        return 0;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return of_irq_parse_and_map_pci(dev, slot, pin);
 }
index 95ab9a1bd0107384a3faa8e45c9f2872f7c561df..20cdfdc0893875a7556cfbef91db0ab18b8099d2 100644 (file)
@@ -30,7 +30,7 @@
 #define PCID           7
 
 /* all the pci device has the PCIA pin, check the datasheet. */
-static char irq_tab[][5] __initdata = {
+static char irq_tab[][5] = {
        /*      INTA    INTB    INTC    INTD */
        {0, 0, 0, 0, 0},        /*  11: Unused */
        {0, 0, 0, 0, 0},        /*  12: Unused */
@@ -51,7 +51,7 @@ static char irq_tab[][5] __initdata = {
        {0, 0, 0, 0, 0},        /*  27: Unused */
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int virq;
 
index 2b6d5e196f9990255eb5d35de3e6580a69f6003f..8a741c2c6685ded75b18975613f3e0a8b40867a1 100644 (file)
@@ -32,7 +32,7 @@ static void print_fixup_info(const struct pci_dev *pdev)
                        pdev->vendor, pdev->device, pdev->irq);
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        print_fixup_info(dev);
        return dev->irq;
index 40e920c653cc31762bcc10e4e6a235a4c53b78fa..8131e0ffe735f39becd8dafb3eac0d6624b037b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <asm/mips-boards/piix4.h>
@@ -12,7 +13,7 @@
 static char pci_irq[5] = {
 };
 
-static char irq_tab[][5] __initdata = {
+static char irq_tab[][5] = {
        /*      INTA    INTB    INTC    INTD */
        {0,     0,      0,      0,      0 },    /*  0: GT64120 PCI bridge */
        {0,     0,      0,      0,      0 },    /*  1: Unused */
@@ -38,7 +39,7 @@ static char irq_tab[][5] __initdata = {
        {0,     PCID,   PCIA,   PCIB,   PCIC }  /* 21: PCI Slot 4 */
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int virq;
        virq = irq_tab[slot][pin];
index 8e4f8288eca2e2fcfc17bd615a26a5e0a6a152de..66eaf456bc89c31031abc74762874d09131a9ed0 100644 (file)
 
 #include <asm/vr41xx/mpc30x.h>
 
-static const int internal_func_irqs[] __initconst = {
+static const int internal_func_irqs[] = {
        VRC4173_CASCADE_IRQ,
        VRC4173_AC97_IRQ,
        VRC4173_USB_IRQ,
 };
 
-static const int irq_tab_mpc30x[] __initconst = {
+static const int irq_tab_mpc30x[] = {
  [12] = VRC4173_PCMCIA1_IRQ,
  [13] = VRC4173_PCMCIA2_IRQ,
  [29] = MQ200_IRQ,
 };
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        if (slot == 30)
                return internal_func_irqs[PCI_FUNC(dev->devfn)];
index fab405c21c2f76f856af004fab4e88e68f81cef2..4ad2ef02087bc0cf8bec3b19835ce88aec73b1f7 100644 (file)
@@ -47,7 +47,7 @@
 
 #if defined(CONFIG_PMC_MSP7120_GW)
 /* Garibaldi Board IRQ wiring to PCI slots */
-static char irq_tab[][5] __initdata = {
+static char irq_tab[][5] = {
        /* INTA    INTB    INTC    INTD */
        {0,     0,      0,      0,      0 },    /*    (AD[0]): Unused */
        {0,     0,      0,      0,      0 },    /*    (AD[1]): Unused */
@@ -86,7 +86,7 @@ static char irq_tab[][5] __initdata = {
 #elif defined(CONFIG_PMC_MSP7120_EVAL)
 
 /* MSP7120 Eval Board IRQ wiring to PCI slots */
-static char irq_tab[][5] __initdata = {
+static char irq_tab[][5] = {
        /* INTA    INTB    INTC    INTD */
        {0,     0,      0,      0,      0 },    /*    (AD[0]): Unused */
        {0,     0,      0,      0,      0 },    /*    (AD[1]): Unused */
@@ -125,7 +125,7 @@ static char irq_tab[][5] __initdata = {
 #else
 
 /* Unknown board -- don't assign any IRQs */
-static char irq_tab[][5] __initdata = {
+static char irq_tab[][5] = {
        /* INTA    INTB    INTC    INTD */
        {0,     0,      0,      0,      0 },    /*    (AD[0]): Unused */
        {0,     0,      0,      0,      0 },    /*    (AD[1]): Unused */
@@ -202,7 +202,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
  *  RETURNS:    IRQ number
  *
  ****************************************************************************/
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 #if !defined(CONFIG_PMC_MSP7120_GW) && !defined(CONFIG_PMC_MSP7120_EVAL)
        printk(KERN_WARNING "PCI: unknown board, no PCI IRQs assigned.\n");
index 321db265829c0c0e88cd83790edc028d2bec77d0..d6aaed1d6be9ed3f10d9843b068661b3dcc2e18d 100644 (file)
@@ -36,7 +36,7 @@
 #include <asm/txx9/pci.h>
 #include <asm/txx9/rbtx4927.h>
 
-int __init rbtx4927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int rbtx4927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        unsigned char irq = pin;
 
index a80579af609bc7155f86836a3e4f0e8ed457e7d3..ff22a22db73ee618a30cb7af4e906ce060da7d92 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/txx9/pci.h>
 #include <asm/txx9/rbtx4938.h>
 
-int __init rbtx4938_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int rbtx4938_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq = tx4938_pcic1_map_irq(dev, slot);
 
index f67ebeeb42000bb5d4d73961d6bcc4d632375298..adb9a58641e8a1891e409b078e256d846ffa5d14 100644 (file)
@@ -40,7 +40,7 @@
  * seem to be a documentation error.  At least on my RM200C the Cirrus
  * Logic CL-GD5434 VGA is device 3.
  */
-static char irq_tab_rm200[8][5] __initdata = {
+static char irq_tab_rm200[8][5] = {
        /*       INTA  INTB  INTC  INTD */
        {     0,    0,    0,    0,    0 },      /* EISA bridge */
        {  SCSI, SCSI, SCSI, SCSI, SCSI },      /* SCSI */
@@ -57,7 +57,7 @@ static char irq_tab_rm200[8][5] __initdata = {
  *
  * The VGA card is optional for RM300 systems.
  */
-static char irq_tab_rm300d[8][5] __initdata = {
+static char irq_tab_rm300d[8][5] = {
        /*       INTA  INTB  INTC  INTD */
        {     0,    0,    0,    0,    0 },      /* EISA bridge */
        {  SCSI, SCSI, SCSI, SCSI, SCSI },      /* SCSI */
@@ -69,7 +69,7 @@ static char irq_tab_rm300d[8][5] __initdata = {
        {     0, INTD, INTA, INTB, INTC },      /* Slot 4 */
 };
 
-static char irq_tab_rm300e[5][5] __initdata = {
+static char irq_tab_rm300e[5][5] = {
        /*       INTA  INTB  INTC  INTD */
        {     0,    0,    0,    0,    0 },      /* HOST bridge */
        {  SCSI, SCSI, SCSI, SCSI, SCSI },      /* SCSI */
@@ -96,7 +96,7 @@ static char irq_tab_rm300e[5][5] __initdata = {
 #define INTC   PCIT_IRQ_INTC
 #define INTD   PCIT_IRQ_INTD
 
-static char irq_tab_pcit[13][5] __initdata = {
+static char irq_tab_pcit[13][5] = {
        /*       INTA  INTB  INTC  INTD */
        {     0,     0,     0,     0,     0 },  /* HOST bridge */
        { SCSI0, SCSI0, SCSI0, SCSI0, SCSI0 },  /* SCSI */
@@ -113,7 +113,7 @@ static char irq_tab_pcit[13][5] __initdata = {
        {     0,  INTA,  INTB,  INTC,  INTD },  /* Slot 5 */
 };
 
-static char irq_tab_pcit_cplus[13][5] __initdata = {
+static char irq_tab_pcit_cplus[13][5] = {
        /*       INTA  INTB  INTC  INTD */
        {     0,     0,     0,     0,     0 },  /* HOST bridge */
        {     0,  INTB,  INTC,  INTD,  INTA },  /* PCI Slot 9 */
@@ -130,7 +130,7 @@ static inline int is_rm300_revd(void)
        return (csmsr & 0xa0) == 0x20;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        switch (sni_brd_type) {
        case SNI_BRD_PCI_TOWER_CPLUS:
index d0b0083fbd278a529209d41c7259e645d2c37f6c..cc581535f25772daf542445e1e4e59318e94a56f 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <asm/vr41xx/tb0219.h>
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq = -1;
 
index 4196ccf3ea3da5e6783de7acd913f68d2fc218bc..b827b5cad5fd80eb8e4fde0a0e66bfbed524751c 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/vr41xx/giu.h>
 #include <asm/vr41xx/tb0226.h>
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq = -1;
 
index 8c5039ed75d74c40df1b739ad37edf177dfad5bf..98f26285f2e3a904c7bff305d5a1cc9d65389f26 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <asm/vr41xx/tb0287.h>
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        unsigned char bus;
        int irq = -1;
index 46ed541a3ec7e2bcc0c1f4a58e18f4596c96b39d..9e118431e22681170e9ea494a2f2b88e45e5b15d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
index b9d1fd0ff7e28a217380ede1e1c93adc8ef20b57..b00658d19116a09d96a337d929cc11abe84609df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <asm/bootinfo.h>
index e99ca7702d8ad81660ab011ae4c990c0fb954f96..4f2411f489afbc2bd7b481dae87bcc4e1a048d57 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Alchemy PCI host mode support.
  *
@@ -522,7 +523,7 @@ static int __init alchemy_pci_init(void)
 arch_initcall(alchemy_pci_init);
 
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        struct alchemy_pci_context *ctx = dev->sysdata;
        if (ctx && ctx->board_map_irq)
index 76f16eaed0ad3e9851d854d940e871c8c5f69aa9..230d7dd273e21af0668062c648ee2b6962383de1 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/bcma/bcma.h>
 #include <bcm47xx.h>
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return 0;
 }
index ffab4da7bd00eee6b899bbee8bf311b6d2a4276e..214def1e45a56b8ff99abbf0ae5e83e19acfda84 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PCI_BCM63XX_H_
 #define PCI_BCM63XX_H_
 
index dce304dc3d62d80311c593476058f0ad12f98e86..6763481640270e783f70e3c7dc307c0f25b5fbfa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * pcibios_align_resource taken from arch/arm/kernel/bios32.c.
  *
index 40d2797d2bc43b255edd050cf17d270cdbc4325d..47f4ee6bbb3bf9bb9874d6d26510d7e1f13cf94e 100644 (file)
@@ -61,7 +61,7 @@ arch_initcall(lasat_pci_setup);
 #define LASAT_IRQ_PCIC  (LASAT_IRQ_BASE + 7)
 #define LASAT_IRQ_PCID  (LASAT_IRQ_BASE + 8)
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        switch (slot) {
        case 1:
index 4e633c1e7ff3e7834b93195ee2f1a829fbed3971..90fba9bf98da7104ee5ef74bd0f259653d279aa3 100644 (file)
@@ -361,7 +361,7 @@ static int mt7620_pci_probe(struct platform_device *pdev)
        return 0;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        u16 cmd;
        u32 val;
index 9ee01936862ee1dfe11d8a21754bb16572230aac..3e92a06fa77288c2705e8435e9352b6bf8c5e368 100644 (file)
@@ -59,8 +59,7 @@ union octeon_pci_address {
        } s;
 };
 
-int __initconst (*octeon_pcibios_map_irq)(const struct pci_dev *dev,
-                                        u8 slot, u8 pin);
+int (*octeon_pcibios_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
 enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID;
 
 /**
@@ -74,7 +73,7 @@ enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID;
  *              as it goes through each bridge.
  * Returns Interrupt number for the device
  */
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        if (octeon_pcibios_map_irq)
                return octeon_pcibios_map_irq(dev, slot, pin);
index d6360fe73d058c5733274fb1b163c393a3f0e14c..711cdccdf65ba7df9647f72bd11952432086e33b 100644 (file)
@@ -181,7 +181,7 @@ static inline void rt2880_pci_write_u32(unsigned long reg, u32 val)
        spin_unlock_irqrestore(&rt2880_pci_lock, flags);
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        u16 cmd;
        int irq = -1;
index 04f8ea953297ff96dfef3fedebc031075c31251d..958899ffe99c14b3e149a88e303fb4cd3d497d81 100644 (file)
@@ -564,7 +564,7 @@ err_put_intc_node:
        return err;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return of_irq_parse_and_map_pci(dev, slot, pin);
 }
index 000c0e1f9ef869d884d8c9a0cbb286ba87bae97b..a6418460e3c4447e62028b63655e29233a166c42 100644 (file)
@@ -112,7 +112,7 @@ int __init tx4938_pciclk66_setup(void)
        return pciclk;
 }
 
-int __init tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot)
+int tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot)
 {
        if (get_tx4927_pcicptr(dev->bus->sysdata) == tx4938_pcic1ptr) {
                switch (slot) {
index 9d6acc00f3489ddbf4558aa1d67568899e7eea9f..09a65f7dbe7ca001d55780d0bf7c2008a9320cdf 100644 (file)
@@ -48,7 +48,7 @@ void __init tx4939_report_pci1clk(void)
                ((pciclk + 50000) / 100000) % 10);
 }
 
-int __init tx4939_pcic1_map_irq(const struct pci_dev *dev, u8 slot)
+int tx4939_pcic1_map_irq(const struct pci_dev *dev, u8 slot)
 {
        if (get_tx4927_pcicptr(dev->bus->sysdata) == tx4939_pcic1ptr) {
                switch (slot) {
@@ -68,7 +68,7 @@ int __init tx4939_pcic1_map_irq(const struct pci_dev *dev, u8 slot)
        return -1;
 }
 
-int __init tx4939_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int tx4939_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq = tx4939_pcic1_map_irq(dev, slot);
 
index 7babf01600cb0fd9cbb97d4bb40f079693b2e8ed..9eff9137f78e52dc60bd4c031e42f1db4001ab6e 100644 (file)
@@ -205,7 +205,7 @@ int xlp_socdev_to_node(const struct pci_dev *lnkdev)
                return PCI_SLOT(lnkdev->devfn) / 8;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        struct pci_dev *lnkdev;
        int lnkfunc, node;
index 26d2dabef28152541b709b11d2257cb563fe0349..2a1c81a129ba31ae9a6757ef819f2cab3fe2f93a 100644 (file)
@@ -315,7 +315,7 @@ static void xls_pcie_ack_b(struct irq_data *d)
        }
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        return get_irq_vector(dev);
 }
index ad3584dbc9d72bc1d0b845a1089ce41cec494737..fd2887415bc8935acf86c79a864b78dbd5878a03 100644 (file)
@@ -1464,8 +1464,7 @@ static int cvmx_pcie_rc_initialize(int pcie_port)
  *              as it goes through each bridge.
  * Returns Interrupt number for the device
  */
-int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev,
-                                      u8 slot, u8 pin)
+int octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        /*
         * The EBH5600 board with the PCI to PCIe bridge mistakenly
index 527d37da05ac8fd3952535ff6c12f434a0f68eaa..e284e89183cc56027cd144829f069e048750fbc7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if MACH_PIC32
 
 choice
index 97731ea94322a8487eb865ac099f908e0136ad21..9a0e06c951843461dd108d4fd68933f3649e7459 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PISTACHIO_GPTIMER_CLKSRC
        bool "Enable General Purpose Timer based clocksource"
        depends on MACH_PISTACHIO
index 4190093d30533d7d8046c9ad5342a28426c70a75..d319bc0c3df69128c3a1a317947d2b40d71007c6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "PMC-Sierra MSP SOC type"
        depends on PMC_MSP
index d4f7220f2485cbb83d2d1cfb52c57bd41ca7138c..c040bd6ed62de7378d2a3739cb1454e0b9583854 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PMC-Sierra MSP SOCs
 #
index ffa0f7101a9773ec8e24813f37e3c270d912b5e2..2b08242ade628989e96aa3f24450b406ecdc7e7a 100644 (file)
@@ -22,6 +22,8 @@
 #include <linux/smp.h>
 #include <linux/interrupt.h>
 
+#include <asm/setup.h>
+
 #ifdef CONFIG_MIPS_MT_SMP
 #define MIPS_CPU_IPI_RESCHED_IRQ 0     /* SW int 0 for resched */
 #define MIPS_CPU_IPI_CALL_IRQ 1                /* SW int 1 for call */
index 19a9af68bcdb10aef723068dc84413cc1677cac4..94ab17c3c49d2caf4923ab9267709b425070ac9e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/tlbflush.h>
 
 extern int restore_image(void);
index b4627080b828fa2891374b945aed6d7e04bfcb1b..f26736b7080b6822766be33b50484ddb2de51701 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if RALINK
 
 config CLKEVT_RT3352
index d0c64e71d53269287a2b7f2eac369aac0ec0f04f..1aa4df1385cbc674a966fcf560e9bf247b8e1360 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * setup.c - boot time setup code
  */
index 411cda9ee030737850846e8b0ed33f01822c9a1e..45f42fa08faac9bd70a0f49d0c60383b9d886d81 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the SGI specific kernel interface routines
 # under Linux.
index ff8e1935c873a76a0917538b74b71023338ee92a..34bb9801d5ff52867093e9bff2fdd23868f8721f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-berr.c: Bus error handling.
  *
index 396956e07307d4c41eedb5f234fc265d46691f38..49922e86cf1d7ea0f9b8e299200b65198a69fe6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-hpc.c: Routines for generic manipulation of the HPC controllers.
  *
index c66889fc4913cacf9be6062f0cb4abd0eb373ffc..3804895fa697163ece5212aeabd08a94cdbcd9bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-int.c: Routines for generic manipulation of the INT[23] ASIC
  *            found on INDY and Indigo2 workstations.
index db5a64026443447aab7cffb45dd72d7748a2bf8d..1944d41507ef5a724c1bdbc1518c71ef87c9ccfd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-mc.c: Routines for manipulating SGI Memory Controller.
  *
index cc6133bb57caa257946a4d12f5911e15f24fe365..e727ef519acfe8a8da1c6ce004d9321658f41cb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-nvram.c: NVRAM and serial EEPROM handling.
  *
index a14fd32b76bdae03383e19e35ae71e663da1c802..37ad267165790bde93b11d7b4ce2a7f548399fb9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/if_ether.h>
 #include <linux/kernel.h>
index 872159970935279315e208535b780bd9b2cd0824..b69daa02401b9d0d3f8e9f7c0574305ca91ecb00 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip22-setup.c: SGI specific setup, including init of the feature struct.
  *
index 75460e1e106b2c08799354139b869481d0b23abb..2ed8e4990b7a4f8b6e97ae9f21fd65b308d71282 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip28-berr.c: Bus error handling.
  *
index 4d8705a65e4a3b10cbc8c516755bdc7e5b0ab4b0..ef3847e7aee02dbd7b8db59d2b258c727a47d606 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "Node addressing mode"
        depends on SGI_IP27
index ab4affa626c703cf60892002264858e407aed6dc..73502fda13ee170193a28af0e9b9aaa89ac962d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the IP27 specific kernel interface routines under Linux.
 #
index 2a1c40784bd9e3441f970cafe5a534a85271e3d7..cd449e90b917fa303240f29cf576f2fd9453569c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip27-irq.c: Highlevel interrupt handling for IP27 architecture.
  *
index 16ec4e12daa3fb7bed3355a5cd56cdb3c87946fc..0dde6164a06fc571587cf616a53499e04ede3334 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ip27-irq.c: Highlevel interrupt handling for IP27 architecture.
  *
index c873d62ff083559e53ee038307ff6c8edbe23c96..41171ff0c75eedbee5b77b01db0714de6442d492 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1999, 2000 Ralf Baechle (ralf@gnu.org)
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
index 2beb03907d0991f970e0aba84f5ff121b36548ef..a4f01328de62ad1f74c83f26e4554d2ef046abcd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Ported from IRIX to Linux by Kanoj Sarcar, 06/08/00.
  * Copyright 2000 - 2001 Silicon Graphics, Inc.
index cfceaea92724953a620dc5b87546a887f86dfea8..8ac2bfa35fb608b566eb99606c997abc477cecf8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/mmzone.h>
 #include <linux/nodemask.h>
index a53f0c8c901e71552676899397ae55d954399627..9d55247533a5f0acc85e0d5d36b719c7c2ed7ad3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copytight (C) 1999, 2000, 05, 06 Ralf Baechle (ralf@linux-mips.org)
  * Copytight (C) 1999, 2000 Silicon Graphics, Inc.
index 707b8844156797a888ed5e152b5c3dd56c2972f5..f4dbce25bc6a5791da300045ca97038443dc49da 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config SIBYTE_SB1250
        bool
        select CEVT_SB1250
index 455c40d6d6251f84b856b116d4c0e036e4037bc1..d015c4d79c3e5733004c98a45534cd0891de0bec 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Sibyte SB1250 / BCM1480 family of SOCs
 #
index 1ad2da103fe9016f95207500d4c0b7def5c1fe61..8af7b41f7c19be946d1f5e1e1287c18c1b709d04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/console.h>
index 1cecdcf85cf1a2b7c7aba174dc918fdaae7cf807..484969db77136178acf9025e862ae9eaa8f07a04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 6afa34346b8148040a84e0a54ecd7af8d7ac608c..66f963d8da7ec09c7e4aedcd3254b0c2a8a63c6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/mips/sni/process.c
  *
index 7ee14f41fc25dc20e0b5556c13e11df281b9ea76..0eb7d1e8821be63a0c13394833eb70fcc3e81189 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/i8253.h>
 #include <linux/interrupt.h>
index 5c4f936870391195da1d8de70d789650fc11acb5..08849f83ef6c9f81d9cae2b8de991c6941177e84 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # Copyright (C) 2017 Imagination Technologies
-# Author: Paul Burton <paul.burton@imgtec.com>
+# Author: Paul Burton <paul.burton@mips.com>
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
@@ -30,8 +30,6 @@ cfg="$4"
 boards_origin="$5"
 shift 5
 
-cd "${srctree}"
-
 # Only print Skipping... lines if the user explicitly specified BOARDS=. In the
 # general case it only serves to obscure the useful output about what actually
 # was included.
@@ -48,7 +46,7 @@ environment*)
 esac
 
 for board in $@; do
-       board_cfg="arch/mips/configs/generic/board-${board}.config"
+       board_cfg="${srctree}/arch/mips/configs/generic/board-${board}.config"
        if [ ! -f "${board_cfg}" ]; then
                echo "WARNING: Board config '${board_cfg}' not found"
                continue
@@ -84,7 +82,7 @@ for board in $@; do
        done || continue
 
        # Merge this board config fragment into our final config file
-       ./scripts/kconfig/merge_config.sh \
+       ${srctree}/scripts/kconfig/merge_config.sh \
                -m -O ${objtree} ${cfg} ${board_cfg} \
                | grep -Ev '^(#|Using)'
 done
index 42923478d45ca363b2c8eca403138dfa4aedcc61..d2509c93f0ee711879007542211fae8b58145be4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MACH_TX39XX
        bool
        select MACH_TXX9
index 34787dabff06d2a4d3560e9bd54e1e4c9f243400..195295937282f6d12d3f31de199da4b5b3967e9a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Common TXx9
 #
index 1863c167e66e465489b945758f8466c75cce49ed..6d00580fc81d74a69b77a83e408c6d7d20e94dfc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for common code for TXx9 based systems
 #
index 0bd2a1e1ff9ab8e0f0d8c56e31872ac08404c7b6..fb998726bd5d58b31e520d8ac4f8290835db473a 100644 (file)
@@ -386,9 +386,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
        return 0;
 }
 
-int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+static int (*txx9_pci_map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
-       return txx9_board_vec->pci_map_irq(dev, slot, pin);
+       return txx9_pci_map_irq(dev, slot, pin);
 }
 
 char * (*txx9_board_pcibios_setup)(char *str) __initdata;
@@ -424,5 +425,8 @@ char *__init txx9_pcibios_setup(char *str)
                        txx9_pci_err_action = TXX9_PCI_ERR_IGNORE;
                return NULL;
        }
+
+       txx9_pci_map_irq = txx9_board_vec->pci_map_irq;
+
        return str;
 }
index b47d2a45dbf497547bd112ab6c9ce60f57e16d8a..ce196046ac3e43e017357d1ff9106fa00a5e703a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Objects to go into the VDSO.
 obj-vdso-y := elf.o gettimeofday.o sigreturn.o
 
index 74927b4d4f0bfda76f2e9cd69d98f41104242e3f..992c988b83b087ce5a6686d43b820da6a71d8eb5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "Machine type"
        depends on MACH_VR41XX
index 42a030a0edba33718c316b6d0bcc4e6f90275d3b..ca7b2368eab7c905d39dee5158920a2110b1e200 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 choice
        prompt "Machine type"
        depends on MACH_XILFPGA
index 38e3494bfb63ad0e620f6de3a93190f1e19944ca..e9d8d60bd28b4711ce2be03fd257e74ff4b71f18 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MN10300
        def_bool y
        select HAVE_EXIT_THREAD
index 94efb3ed223f2552a8989ad1fe2eb1efe38011cf..37ada651f75675466fc0b7f66366cbaa32dc470d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 5f56f9de10616d0954a58d4e27b60aa6d966e4a1..9b9a48fc8e532d9d1234dfda48a46eaf14f959cb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Create a compressed vmlinux image from the original vmlinux
 #
index 4f552ead0f8ecd26585b5f0b521f1128df6e0625..3ce158fe07b05a36ab4179e477e317813f5dd965 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 1997 Martin Mares
index 76d093b58d4fe8248852737b2df0422379680036..f444d7ffa766594a98bffd89b4204cebe3162f08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
index 2d2d097e7309d5421e30ac8a79452acf8ec24d34..b9d6d41adace1d93c4af6ec425eaf7a453d0847a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* MN10300 Memory management context
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index 8eb5b16ad86b68e2582dff27b3a01b12fe6965f0..1e869aa09418e9cd1275bead65626b36ebe4e5ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* MN10300 Kernel base address
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index ab666ed1a0704cd6a4bbdc95863f1fc3872cf72d..3a31faaa435399971ffc4ae928e65ca319f296bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SHMPARAM_H
 #define _ASM_SHMPARAM_H
 
index 653dc519b4052c617f84791d4549c84c6d1f4705..32abdc89bbc755e7f48bd6425125ba31dafb4786 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPINLOCK_TYPES_H
 #define _ASM_SPINLOCK_TYPES_H
 
index c2e29c75dfacef713c543f2ea4e2b51abc6cf6b0..4010edcaa08e788343bf25f13ffc7559439bb14c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_TERMIOS_H
 #define _ASM_TERMIOS_H
 
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index 5dd0bdd9feee115d55a832b62f00abb94e782438..3467df91216c971073d7ea12e9d990aa0d7c2b22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_BYTEORDER_H
 #define _ASM_BYTEORDER_H
 
index 4c82b503d92ffabcc6eb558a50ae5d6dba8a5f7c..9addba5926463b5644233f6b9ab4b0a8fe492abe 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/errno.h>
index 46ab12db57397dfc44a7aa84f9c10ac5e97509d9..a77648c505d1784915fc69283e7448b24b471c1e 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/fcntl.h>
index b279fe06dfe5bea925eccf4b39c8908b23379b6a..b809c4566e5f8b119f98aa55173938912203723d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ioctl.h>
index 0212f4b2255748a3bdba3060a8bb1edd7fe2e474..0955d4f854e991f86621bdca6f8f6c1c8f0ae569 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_IOCTLS_H
 #define _ASM_IOCTLS_H
 
index 84c7e51cb6d0befd2b3c013c8bbbbaad6ae02297..90d6445a14df81c369ea5e0b04f0d48086c10a7d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/ipcbuf.h>
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index db5c53da73ced573d66176a58d8e7b73580b5ae2..eb7f4798c0366726e1152b6e695d3c7b87974164 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/mman.h>
 
 #define MIN_MAP_ADDR   PAGE_SIZE       /* minimum fixed mmap address */
index 8b602450cc4a410bd979a3afc91024b912535c8b..5982def83355d1e47b35fdbefbc5182eb9decfd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_MSGBUF_H
 #define _ASM_MSGBUF_H
 
index 02a0ca6f13cee992cefa459462206d6971be6db3..e0020d7742bde107cecc1599f853bc827e3e6842 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Kernel parameters
  *
  * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
index c98509d3149e637951f5edf96116a70ed9d8bc51..b7132a305a476847d1b05aabc8087c89e6523c1d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/poll.h>
index d31eeea480cfdda8a4231351abbf61c76da08a5f..6b4cfc7136e9f306fdd9f3587bef3a32ebe45913 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 POSIX types
  *
  * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
index 71b2251b7bff5a22ca72c064e075997855c460ef..f485c481a2661036894aee7cc1de1a66d8e07d6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Exception frame layout and ptrace constants
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index 04bc4db8921b257e1bab8fbc1316222c7be9fdf5..49a81fbab43d9436df3876feb60cb87d86cbed4c 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/resource.h>
index 301f3f9d8aa964f20054fe682f6a3b0d7e48e0e7..ef44c42c7e0f337c7b620aeea79505ce588f4b4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SEMBUF_H
 #define _ASM_SEMBUF_H
 
index ae5704fa77ad6d15e8de4623ca6465f24f2341b9..043dd4b9202630d75be7b57b647e64d848975714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * There isn't anything here anymore, but the file must not be empty or patch
  * will delete it.
index 8f300cc35d6c0afd4155a1935224c7ae6eb8f389..6e81f74f51c64e00f2e2b484612babd01ce3582d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SHMBUF_H
 #define _ASM_SHMBUF_H
 
index 4de3afff4ad77a3a538f55f56dcdc3b742340e30..1c361fabb9778e9f8f0846e03e85b344662ba268 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Userspace signal context
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index f423a08d7eeb02d8e92c120731cd7d4cf5b14574..566cb199d5acaf5798e8733bf0876d1e9b6e0b8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Signal definitions
  *
  * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
index ac82a3f26dbf9f71117cc49429e11a083f62990b..b35eee132142f4a56d1cec877d136b69a065e2d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
index b03043a1c564dde7a4dcfb019636404b7ac5bff6..5706baa3cd0d37f8b2ad4e9adc0e4c93892c85b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SOCKIOS_H
 #define _ASM_SOCKIOS_H
 
index 63ff8371cf2cd9de3bad34e0dea92dd4e6a76179..769f5f8829d4e08920749354e6b59d99b696e900 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_STAT_H
 #define _ASM_STAT_H
 
index bd818a820ca8f2a3d8d4800f2828c9f2e76ff17b..d2284dd27ad4670a473169f9d69108c0f24587c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Byte-order primitive construction
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index 130d42495972d3f31cb8e7b473c18313f3329cca..fca82ea2ca2c52057b5c985ede7ad129b26750c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_TERMBITS_H
 #define _ASM_TERMBITS_H
 
index 11d3cc9d3162d74c9eac445a972fdc73d544fffa..25981aadb8cd116730284c92c5dcd0259de6eb0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_TERMIOS_H
 #define _UAPI_ASM_TERMIOS_H
 
index 8b3f0501b9bc2c3befe1942f7259137e22d902fa..7d2a697e29376ab6b6f218e1d7518bdddbd7b131 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 Basic type definitions
  *
  * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
index e28ac3f42479ea43b6ec5b222627da71e09d29cd..c0c96b650692c3adac2ddcaed7a8a797d1c0c364 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* MN10300 System call number list
  *
  * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
index 561029f7fa4489259297225313ffa7b6d028817a..de32af0e4b6ed42e860d26ea89474f0c22347477 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the MN10300-specific core kernel code
 #
index e5a61c659b5ac040e5f1e8c7e6c4d7a50238ad57..57e6cc96267be2bbca2d83847c96b502e2d08df6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed
index a128c57b586b5b68b6883a81ff03ec731a006b20..3399d5699804fd8742cbab7d958ad84b44ca488b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* MN10300 GDB stub
  *
  * Originally written by Glenn Engel, Lake Stevens Instrument Division
index 89e8027e07fb327d39de0170c0da61af177c7160..7c475fd99c468396122e77c8f1dbe738ae368bc0 100644 (file)
@@ -59,10 +59,6 @@ void arch_cpu_idle(void)
 }
 #endif
 
-void release_segments(struct mm_struct *mm)
-{
-}
-
 void machine_restart(char *cmd)
 {
 #ifdef CONFIG_KERNEL_DEBUGGER
@@ -112,14 +108,6 @@ void release_thread(struct task_struct *dead_task)
 {
 }
 
-/*
- * we do not have to muck with descriptors here, that is
- * done in switch_mm() as needed.
- */
-void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
-{
-}
-
 /*
  * this gets called so that we can store lazy state into memory and copy the
  * current task into the new thread.
index bfbe52691f2c8feb474be5af3d9eccaea1e4e287..8cc5d9ec3b6cd7737cb5a0798d127a4e9545a8e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # MN10300 CPU cache options
 #
index 11f38466ac28e17a7e3c2518a5a9679a1ad35d3b..048ba6f67f9af0879fd2eb1fefdada67c838fe5e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the MN10300-specific memory management code
 #
index 918dbe60ebb621736f4e36440a4eff6ec4dfd957..9fa95aaf496b3096774bd0d7c5387453b65ea4b0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the MN10300-specific profiling code
 #
index f537801a44ba5de32481de75d5a54e23134c122f..516afe8240559b23bdede791be484fc78949398b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PROC_INTCTL_REGS_H
 #define _ASM_PROC_INTCTL_REGS_H
 
index a1e977273d1995fd95dafa954f67451729118c50..4d4084ea66940a8f79696a99ff162977aae2650b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PROC_INTCTL_REGS_H
 #define _ASM_PROC_INTCTL_REGS_H
 
index 33f100f9b468ecb75a942673aab6169ed700a46b..2901ed344b3de9917e725b862e7a5d62daa9ebe0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ASB2364 FPGA registers
  */
 
index c587764b9c5a902ec8785f336336f7a797de6830..60fae03dac79aff43289bcb3c9f0e85ac83e0fcd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config NIOS2
        def_bool y
        select TIMER_OF
index 55105220370ce1c1688614ad29a1921c1226d24e..edfeef049a514ba0dfba66cedb9495524af98def 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index d5921c9a9726050be73fff222d0520502a849773..791e4309250ab644ab2a3a01e856bfd5909fb780 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # create a compressed vmlinux image from the original vmlinux
 #
index 3ab5dc20d757c3abe89775d0ba585f47d567d055..639007a5544e0ab643a997e747e24ecef70d648f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2009   Thomas Chou <thomas@wytron.com.tw>
  * Copyright (C) 2004   Microtronix Datacom Ltd
index 6f06d3b2949e7ffd3d95c4951517a99abdcdeea1..ab0df71f81b23890b30e151097d96761f76ef5ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
  *
index 1d35de90a977b513982d9e71a907c041033a786c..2b91dbe5bcfee515684fbdcc69870be3127e7ba6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2010 Tobias Klauser <tklauser@distanz.ch>
  * Copyright (C) 2004 Microtronix Datacom Ltd
index b67944a509273a020a8e13e9ebf0e039e492867c..204ae3475b4e5aa175c801bb3475ed8c948ee644 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2004, Microtronix Datacom Ltd.
  *
index f29ee63144817e9798965c0b8279c08844c44e6a..b0d983068fa5bee1025860c91a63cb6fa80828c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright Altera Corporation (C) 2013. All rights reserved
  *
index b4e22ebaeb1792c2a703ebb235c5448f054685aa..9750547a5f8289f8d038ab81a2e464854f19f749 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 Tobias Klauser <tklauser@distanz.ch>
  * Copyright (C) 2011 Pyramid Technical Consultants, Inc.
index 51a32c71ce2bd0a5950701f402a1b963d54169df..b6bdae04bc84c118f50d7f656f5f39cf62318c32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2013 Altera Corporation
  *
index 06d07432b38d1904cf186e29dae0d4b2345721a2..0b645e1e3158e8e5fa4004621859643ea1090f3d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the nios2 linux kernel.
 #
index 3cbd0840873c3201826b4c605ee96a472aa42b4c..9d37fafd1dd17a53cfc1331bd6378ed310dc8c97 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Nios2-specific parts of the memory manager.
 #
index a0f2e4a323c1d543b46f8de29c90ab3d90519b72..df2136ab1dcca223481ad65633368a8cf037359a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
index b092d30d6c23bd10c76606a82043ee040a687753..792ce7143c3a560f89b09277dc9d1f4666d2f154 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""'
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_OPENRISC_BUILTIN_DTB)).dtb.o
 else
index 5d4f9027afafb8021b41ba5221c5db1ab237cbc2..9f4b856da5805db4c01b42ba387f3c913536a426 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 / {
        compatible = "opencores,or1ksim";
index 8fed278a24b8afa4cf159363be081597c9ef9bbb..618da4a1bffb9a54aa48daf8942324ea59d7e96f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_OPENRISC_FUTEX_H
 #define __ASM_OPENRISC_FUTEX_H
 
index 64939ccd75317899ed7e2dbf1ce196ae5aa0e3f3..69b975454ff2298107bd315102fc14231214a929 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_OPENRISC_STRING_H
 #define __ASM_OPENRISC_STRING_H
 
index 88842760e66f9234dd654fd90f88f655b65313b8..e892d5061685267f3107fd2c6846d616bf544f53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OpenRISC Linux
  *
index c39a336610e2fd672b0ea518a1b2f53541f94ca8..103471e310caca383ada11362b8bd5a6b310f38c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OpenRISC Linux
  *
index 9760bd17fbccf94eace755d1980f782c2dd0137c..d4fab268f6aa0ff3ea489eaa5e1f69daace67533 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OpenRISC Linux
  *
index b79c2b19afbe6cfe9f4327535e257e12c9aaa29f..8ab775fc3450671d0c980724f2e00e6be682077f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OpenRISC Linux
  *
index 471905bd77452b06ad8bca2143038ef31da41f81..9a3ee389631e043644153b67fa3cd31f5a721d55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OpenRISC Linux
  *
index ec6d9d37cefddbb74ca000031786833a50f514bb..c4ea6cabad4623fc3e65f78121ecefaa49f61edb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index bbcdf21b0b35147ca130bb89a0c5d0f66c0e4d74..bdea46c617c7f6682ce2b27a1d1fa5b97231af64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OPENRISC_VMLINUX_H_
 #define __OPENRISC_VMLINUX_H_
 
index 669887a60e27a74d506cb6101660264b369496d4..fe2177628fd98be06e7d9fab3a3e454edeb4a0f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/openrisc/lib/memcpy.c
  *
index ba7b7ddc38442dab7e9b0679bba03478bf20096c..1fd3eb5b66c6c6586c028b9002dcb185f6d54e56 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PARISC
        def_bool y
        select ARCH_MIGHT_HAVE_PC_PARPORT
@@ -257,6 +258,18 @@ config PARISC_PAGE_SIZE_64KB
 
 endchoice
 
+config PARISC_SELF_EXTRACT
+       bool "Build kernel as self-extracting executable"
+       default y
+       help
+         Say Y if you want to build the parisc kernel as a kind of
+         self-extracting executable.
+
+         If you say N here, the kernel will be compressed with gzip
+         which can be loaded by the palo bootloader directly too.
+
+         If you don't know what to do here, say Y.
+
 config SMP
        bool "Symmetric multi-processing support"
        ---help---
index 0d856b94c9b1126c7e21c1bdb97cc8087dbbfb71..fb3507f9b14a6ab0eba94494189c0e4e92ab3e81 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 58fae5d2449daae762fbe09f54a52561e29832f9..01946ebaff72814435cf6128665bd778eb217fb1 100644 (file)
@@ -129,8 +129,13 @@ Image: vmlinux
 bzImage: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
+ifdef CONFIG_PARISC_SELF_EXTRACT
 vmlinuz: bzImage
        $(OBJCOPY) $(boot)/bzImage $@
+else
+vmlinuz: vmlinux
+       @gzip -cf -9 $< > $@
+endif
 
 install:
        $(CONFIG_SHELL) $(src)/arch/parisc/install.sh \
index 5450a11c9d108cf1bfeefef0af4f943e29551a41..7d7e594bda36f0403aef33577c9e75c1817011d4 100644 (file)
@@ -15,7 +15,7 @@ targets += misc.o piggy.o sizes.h head.o real2.o firmware.o
 KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
 KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks
-KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs
+KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
 ifndef CONFIG_64BIT
 KBUILD_CFLAGS += -mfast-indirect-calls
 endif
index 13a4bf9ac4dae5eb626c5c9d01c7e6448a232df0..9345b44b86f036572e33721eb80e9bbbe4493aa4 100644 (file)
@@ -24,7 +24,8 @@
 /* Symbols defined by linker scripts */
 extern char input_data[];
 extern int input_len;
-extern __le32 output_len;      /* at unaligned address, little-endian */
+/* output_len is inserted by the linker possibly at an unaligned address */
+extern __le32 output_len __aligned(1);
 extern char _text, _end;
 extern char _bss, _ebss;
 extern char _startcode_end;
index d226ffa8fc12f60ec9ad3f45a9369237cbec1a5b..cb04470e63d0c7c3c8e43c81fd09267a9f2c1c87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_AGP_H
 #define _ASM_PARISC_AGP_H
 
index 17b98a87e5e26774298f955a3da234dd2742e2a4..bc54addd589f69daf4fb7aae0c23d47ea5c631a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
  * Copyright (C) 2006 Kyle McMartin <kyle@parisc-linux.org>
  */
index da87943328a510d468d089fdf648edfa5933445b..53252d4f9a570c7a7ee889bbba7cb167d9bef2f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_BITOPS_H
 #define _PARISC_BITOPS_H
 
index 07ea467f22fcd50f5e6721db491e9165d417666f..4b6d60b941247e7f2269b67d8eda526f8eab617c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_BUG_H
 #define _PARISC_BUG_H
 
index 9e6284342a5f526d35d20056e1c0ba752dabf6bc..0a7f9db6bd1c7c0b93e5e12f0aa25a2dc7162b4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/asm-parisc/bugs.h
  *
index df0f52bd18b457f9efa1a0b9fc470b0803f50632..150b7f30ea9073f218a8f0967ab7229a5f5095aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-parisc/cache.h
  */
index c7e15cc5c6683b423d028b1557fc0dc9b7dd5a16..3742508cc5345882510d907dc5f58b48a08ad9e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_CACHEFLUSH_H
 #define _PARISC_CACHEFLUSH_H
 
index 60c2c42619c986f98250c3b8a55c6e9ce97d331e..3cbf1f1c1188e67a4cef56a6c8d9da3de20dbdad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_CHECKSUM_H
 #define _PARISC_CHECKSUM_H
 
index 7ada309008073ac62021942709107f526a76a11f..f627c37dad9c92a7beeb277ead459726afcf5dad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * forked from parisc asm/atomic.h which was:
  *     Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
index 3387307cc33e11f5e6a718a26d8781d3c9d140d2..07f48827afdae8500fc7bc54294a5befee9b7e86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_COMPAT_H
 #define _ASM_PARISC_COMPAT_H
 /*
index 2f7292afde3c93a16e208c85397f1203cd080776..c606f1bc891df7e074782ce109d73c9c02195fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_COMPAT_UCONTEXT_H
 #define _ASM_PARISC_COMPAT_UCONTEXT_H
 
index 08e58e679e3e4e7c0bc19237c3ed944574cdd24e..841b506b702ab76be3aec4e4d7ad23092fb0879f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_DELAY_H
 #define _ASM_PARISC_DELAY_H
 
index 2b16282add691d15f5a6578e16f9b8fc395f1257..7af4a00b5ce25a0934798134ad871da6ed3307f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_DMA_MAPPING_H
 #define _PARISC_DMA_MAPPING_H
 
index fd48ae2de9506f40d7356c50641550def2d9c1b0..eea80ed34e6d66786759ff66e4291d260899bba2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* asm/dma.h: Defines for using and allocating dma channels.
  * Written by Hennus Bergman, 1992.
  * High DMA channel support & info by Hannu Savolainen
index a6b2a421571edfb5f981e1558d75525a23a59404..382d75a2ee4f2fcdedca2e9f814af7ecf1ac9f65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMPARISC_ELF_H
 #define __ASMPARISC_ELF_H
 
index 4d503a023ab2b150566211ac931e3b3360d1a001..c4cd6360f99644544149aea6eba48db75bccbd44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index 6fec4d4a1a1831f72650cabbdc94c89d4eaec2bb..f7c3a0905de4fe94d7dfe655a80830db943ad1fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FIXMAP_H
 #define _ASM_FIXMAP_H
 
index d635c6b0269df84337cf0abc23f87603aad99296..42b2c75a16459c027e6a31b3ac3ae0ce9af21667 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_FTRACE_H
 #define _ASM_PARISC_FTRACE_H
 
index c601aab2fb36d992db913e38dd83faf975721505..cf7ba058f619a94d25d3d26ca7dfc3da27c91290 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_FUTEX_H
 #define _ASM_PARISC_FUTEX_H
 
index 9b3bd039a609d57663cbe3374d5863a95415cac3..0778151692585fb72abb4960bf4bf1caa85b6017 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* hardirq.h: PA-RISC hard IRQ support.
  *
  * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
index d1d864b81baec88f48a551514f3f94eec90b1a5e..d6e1ed145031228dad82b37e4b8d68f1579add3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_HARDWARE_H
 #define _PARISC_HARDWARE_H
 
index dbe93311aa269affdbaa566ad04122fb9870968d..525950ed862dcfcc423e34171c1492b49d9e2540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_HASH_H
 #define _ASM_HASH_H
 
index a65d888716c40527b31a2ea6d71921379e1c314e..58e0f4620426535e118e0ef9ee56a3799253a952 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC64_HUGETLB_H
 #define _ASM_PARISC64_HUGETLB_H
 
index 81700a2321cff3926bbf60320a2bed1cba248118..34cdac01ed354dfcbbec31791e2234385f94ae1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/asm-parisc/ide.h
  *
index af98254f7257083840a89236fc050e2077c41cac..27c62baa9c4e2b5ce1f8ef1deeaa2569c22f2360 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IO_H
 #define _ASM_IO_H
 
index 1073599a7be93e6fa2de4e40d88793e5fd62b531..959e79cd2c1488a08f5cd9a0aacb52c933f2eb0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-parisc/irq.h
  *
index 34f9cb9b4754841441cf6ee2c111df0b96c98fa8..38a19c0bac3ac5cd24f2b89bf08b59522b61d76e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_IRQFLAGS_H
 #define __PARISC_IRQFLAGS_H
 
index 2e2e75a83c2877926d27367214aa9fe97c986146..50fcce81065507ffecb07ff20a1b64ec5d022a17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_KBDLEDS_H
 #define _ASM_PARISC_KBDLEDS_H
 
index 58e91ed0388f7393150b6da2569428f9828b8488..3e70b5cd112317e741450b73c759c7ef81afe7ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
index 8be707e1b6c77f291a722a0f2b4b1cdb62a1f273..dd5a08aaa4da746ff09b19cf5f93e9d58489ff14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_LDCW_H
 #define __PARISC_LDCW_H
 
index c3405ab9d60ad14d76d4b1cc86acd46ff9611d83..6de13d08a3886b4dbef50cb5a9e5367715fc816a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LED_H
 #define LED_H
 
index 67e6b433d39903be58e90ead5f193e72ca0ada65..9a69bf6fc4b6938260162b8ba7435301e5ccf2db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PARISC_LINKAGE_H
 #define __ASM_PARISC_LINKAGE_H
 
index a231c97d703e510a09e8785745ac790ead5e2322..215d2c43989dec2c6cfa734b13f6e8b9db21b4cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_MACHDEP_H
 #define _PARISC_MACHDEP_H
 
index d1ea6f12915e3069f1b83028d1531f5006238138..eb84dbeb7fd9c5f5a42dfee9abe483c87885c6d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_PARISC_MCKINLEY_H
 #define ASM_PARISC_MCKINLEY_H
 #ifdef __KERNEL__
index 6a310cf8b734dcd5183f6f5dde2938f60bbe95a9..3fb70a601d5c96a9291df7d747c64bbdda93c180 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_MMU_H_
 #define _PARISC_MMU_H_
 
index e4a6570940585fa3a38a24cfaff5d253e4b46de0..697a906ab1b0163b5f0982e2d8ce39588191919a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_MMU_CONTEXT_H
 #define __PARISC_MMU_CONTEXT_H
 
index b6b34a0987e7d7aafb42cd47d0c3b8f888007bd8..fafa3893fd70cda02c05f5e3dc9198efff09e739 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_MMZONE_H
 #define _PARISC_MMZONE_H
 
index bab37e99168a64324043f009481884338e7ea263..c8c131a74919616e8e0ef1233f7ea395a59bb584 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_MODULE_H
 #define _ASM_PARISC_MODULE_H
 
index bfed09d80bae1caf0dd79d21daeda860e2ad9f8e..af00fe9bf8465644e970cd4d12e2aec21d1e3288 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_PAGE_H
 #define _PARISC_PAGE_H
 
index eaf4dc1c729440688a169bd11fe81b250b8c776f..d02d144c601224751ba3a6275bbe731e4dd9dbe2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_PARISC_DEVICE_H_
 #define _ASM_PARISC_PARISC_DEVICE_H_
 
index c391d7cbc22389cf9c74591fffd64bd6c94df1a4..2c8e2321c24d9d45b3cc26ccb0efcdd80955fa28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  *
  * parport.h: ia32-compatible parport initialisation
index 1de1a3f412ec142514d76bbb0edfda171fb0f510..6108e9df02969f2f839dbd0d57c6b7b7df485241 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PARISC_PCI_H
 #define __ASM_PARISC_PCI_H
 
index 26b4455baa8370560bb572d7cb550cdbd17f1101..efee44a5e0633d5760c12552acc6fa9adabe163d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_PDC_H
 #define _PARISC_PDC_H
 
@@ -280,6 +281,7 @@ void setup_pdc(void);               /* in inventory.c */
 /* wrapper-functions from pdc.c */
 
 int pdc_add_valid(unsigned long address);
+int pdc_instr(unsigned int *instr);
 int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
 int pdc_chassis_disp(unsigned long disp);
 int pdc_chassis_warn(unsigned long *warn);
index a18e11972c09078c364f369b935bb489342cf861..2a5a60affe702fe1dfd340058086112d87870d78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PERF_H_
 #define _ASM_PERF_H_
 
index f08dda3f0995e41841c0555655a51d16bdc91b97..cf13275f7c6d8c58ec2bb252570e00566f8dc905 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PGALLOC_H
 #define _ASM_PGALLOC_H
 
index 71ca86cb0f168904c1df0f949051d3e5fd750966..fa6b7c78f18a9c82620ef0b67d25b1a97adf4027 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_PGTABLE_H
 #define _PARISC_PGTABLE_H
 
index 1ee7c82672c1c8791f995e5a61c6f0f30bbcf4c7..6e63f720024dac4d173caafa31588ea1981fef49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-parisc/prefetch.h
  *
index b3b66c3d6f3c4716c9fdfe55492ffb4d20dc72a1..0e6ab6e4a4e9f87ba8ffc17f4d1c1e0041b5ab02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-parisc/processor.h
  *
index ad69a35e9c0f76c6496f145f54096e49bb769f18..76c301146c3187ffacc26139a15b931452626ea4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_PSW_H
 
 
index 3c3cb004b7e225344c9850805cce04192655e7d2..46da07670c2bea266084945fd9ff4f5a42b25c58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
 ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
 */
index 09f51d5ab57c254d78693b633d9077fd26454856..8e51c775c80a6f9a8cfd55b12575956082bc9470 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_ROPES_H_
 #define _ASM_PARISC_ROPES_H_
 
index f0dd3b30f6c4633eba7e667b1b54401bc4c5ccde..2b3010ade00e7baa65f77e14e01da1526a490028 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_RT_SIGFRAME_H
 #define _ASM_PARISC_RT_SIGFRAME_H
 
index 5bea02da7e226ad5cbd98dad9fc4e1b2d6fc1967..f3cfe69439f65506122aca16f89b19ed9dba9287 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_PARISC_RUNWAY_H
 #define ASM_PARISC_RUNWAY_H
 #ifdef __KERNEL__
index 9d13c3507ad612f95fcc77085cc26e3a2d31192f..accdf40aa5b7402396a40be069d6c84e04981a69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_SECTIONS_H
 #define _PARISC_SECTIONS_H
 
index afe1300ab667fa4626a480e467e9375e77fd72a7..74f74e4d35b72bc353f458b1711a983c4ca97735 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMPARISC_SHMPARAM_H
 #define _ASMPARISC_SHMPARAM_H
 
index 81a5457739712673d60a210b5b4080fbe91f7381..eeb5c88586631e8935b96e0edfe410bbbc2ecffc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_SIGNAL_H
 #define _ASM_PARISC_SIGNAL_H
 
index a5dc9066c6d8d50cb35f2e4cf88509fa4621b84b..b9a18db4b05afdae582eaf19fab8bc1df492c3cb 100644 (file)
@@ -1,6 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SMP_H
 #define __ASM_SMP_H
 
+extern int init_per_cpu(int cpuid);
 
 #if defined(CONFIG_SMP)
 
index 748016cb122dfefcc89a909f764e620e170daed6..79feff1b07213d3e795fd3d430d30ffb208dd79c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
index e1509308899f6084a785143ac7460c3186353220..3d4dd68e181b44b2a8c2d089067bdca3ad0ab674 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_SPECIAL_INSNS_H
 #define __PARISC_SPECIAL_INSNS_H
 
index 55bfe4affca30215db7bd23721795c89992b6d86..af03359e6ac5685d6fa93361b5a0f4f4817a8cae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_H
 #define __ASM_SPINLOCK_H
 
index 8c373aa28a862f0a5fd559bec87ab2504008d01e..42979c5704dc64a455b35fdd80a22b2c346abfa9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_TYPES_H
 #define __ASM_SPINLOCK_TYPES_H
 
index eda01be65e352c9f7db53312ea2bb81f5d6a383c..f6e1132f4e352d40ab5c5454f3be06aa016b6211 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PA_STRING_H_
 #define _PA_STRING_H_
 
index 6598acb4d46d7cbea3ca6ac9349053f23fdb125e..5e11c11d43953dba64df54662bd3abb88cbd701d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_SUPERIO_H
 #define _PARISC_SUPERIO_H
 
index 8ed8fea1e78412c90079a468f725c90698e22ddc..f2ac9cc0de60ae33b262edf0cf8e050706731262 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_SWITCH_TO_H
 #define __PARISC_SWITCH_TO_H
 
index 5e0b4e6bd99d14c94437ae409faca2ae413d9cde..8bff1a58c97f1b107dabf79e172f5ecb56c5db2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* syscall.h */
 
 #ifndef _ASM_PARISC_SYSCALL_H_
index 9bbc0c8974ea90fc6fc6b68c4614936007512952..cded9dc90c1b89a45ead004c93fb90eb950b84b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_TERMIOS_H
 #define _PARISC_TERMIOS_H
 
index bc208136bbb26a837a978cdf77304f1c9dec0b2d..c980a02a52bc0dda0a23b205f59d1d86438553f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_THREAD_INFO_H
 #define _ASM_PARISC_THREAD_INFO_H
 
index 2bd51f6d832bb3f329bf23d019613e0c84face09..45537cd4d1d39b337e23a180766660e0ff44d7fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-parisc/timex.h
  *
index 07924903989eed2a8ce2d93cb349332918e1db6e..0c881e74d8a62cd6a4e6082178299a118b58a5d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_TLB_H
 #define _PARISC_TLB_H
 
index e84b96478193ca959c27ec9493d298f845ac6030..14668bd52d6065e41d4b8b446ba984453af9a201 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PARISC_TLBFLUSH_H
 #define _PARISC_TLBFLUSH_H
 
index 63670231f48a0b43f72a9c8a12f3e05ee36b2672..e00013248907e771a12b8543be2326d0f3c7980c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_TRAPS_H
 #define __ASM_TRAPS_H
 
index cab33a0d0e8229d9bdcae3693989468c41a6b3ea..ea70e36ce6af52e5fe4b244ee61ce0769d7b6e93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PARISC_UACCESS_H
 #define __PARISC_UACCESS_H
 
index 6c8883e4b0bde3c4f863aac396dd801f1e986cc5..ac7f863864c57a1aea8c4f8e7c368867446c0d90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_UCONTEXT_H
 #define _ASM_PARISC_UCONTEXT_H
 
index dfc5d3321a54bb72bba3b234586f2332142293ea..e9029c7c2a6957b58a12ff00efd1b1b45a57c9b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_UNALIGNED_H
 #define _ASM_PARISC_UNALIGNED_H
 
index 7dc31c84dd37c9f2f17709447b3000107fe200ef..3d507d04eb4c6a505d3266cb032d0eceec68fbb9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_PARISC_UNISTD_H_
 #define _ASM_PARISC_UNISTD_H_
 
index 52482e4fc20d1f11407243915968523160839fbb..c73a3ee202267b281217014c549272212f387b78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UNWIND_H_
 #define _UNWIND_H_
 
index 07fa7e50bdc069dd989cd52dd283517250a3b1e4..307e2ef1c62d1e20a0e822816105780603e00c0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_PARISC_BITSPERLONG_H
 #define __ASM_PARISC_BITSPERLONG_H
 
index 58af2c5f5d61427d10380a3e49b1f60e9d5e3235..a59d9b7e35a8a592fa05abc62573338e56761741 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_BYTEORDER_H
 #define _PARISC_BYTEORDER_H
 
index 274d5bc6ecce4aba9e1d19b1cd0e1d6f42ba0eb3..fc0df353ff0da5f8bd6deb8d69f6aa55e631dc7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_ERRNO_H
 #define _PARISC_ERRNO_H
 
index 34a46cbc76ed5d1f6f0f47bda6f0873d2448d8e2..03ce20e5ad7dd744ffd2029bba916ddf70eef58e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_FCNTL_H
 #define _PARISC_FCNTL_H
 
index ec8efa02beda9e01d52b47f2239e09ac35efcf0f..b509bcc94a03ecc26bfecd7f4ab9604940d2e6de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *    Linux/PA-RISC Project (http://www.parisc-linux.org/)
  *    Copyright (C) 1999,2003 Matthew Wilcox < willy at debian . org >
index d0e3321403bedcd641610ba744e96ba45ef1d6cc..aafb1c0ca0af63e4aefcc35687a9dfff78370b1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_PARISC_IOCTLS_H__
 #define __ARCH_PARISC_IOCTLS_H__
 
index 790c4119f6474d27d5cf3b522880c9d4340347da..edf266204b499bab44f618923895fec302361db1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __PARISC_IPCBUF_H__
 #define __PARISC_IPCBUF_H__
 
index 775b5d5e41a1db26358b1457290a499d442bee71..d1af0d74a188411ff787baea73011a687da0bf1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __PARISC_MMAN_H__
 #define __PARISC_MMAN_H__
 
index 2e83ac758e190406dd9fa228274c3ca383b1c41e..b48b810e626b7be14b77457e5a6fa71070c5e0fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_MSGBUF_H
 #define _PARISC_MSGBUF_H
 
index 1f30b49772aa875004683611f668b13946e11d95..0ad117617f1a27d488ab60a26ad182add51a6ea0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_PARISC_PDC_H
 #define _UAPI_PARISC_PDC_H
 
index f3b5f70b9a5fcd37eb405660f687489f16aa61b1..2785632c85e78988404a40e09cb595ef625c8d80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_PARISC_POSIX_TYPES_H
 #define __ARCH_PARISC_POSIX_TYPES_H
 
index 02ce2eb99a7f91ef66d0cdb783b9e3d87e493102..e72e06247f51486caae1c2c34acc26f4fc0738a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
 ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
 */
index c20971bf520f01307221b74f0d85f32ec3225c6b..746c5d86a9b1588814a0ed64a50762a10c243396 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_SEMBUF_H
 #define _PARISC_SEMBUF_H
 
index 7da2e5b8747ef27f93a43a27ecfba4388c65fc3c..78b2f4ec7d6522f888f5d1ad33f393f847aa3a48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_SETUP_H
 #define _PARISC_SETUP_H
 
index 750e13e77991812d1efa838ad57a554a0bac43cc..cd4dbce55d0be0143366063a1d598c8166d47d5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_SHMBUF_H
 #define _PARISC_SHMBUF_H
 
index 27ef31bb3b6e14ff60d17aeabb0bf0a200291f06..be404bb0f8e32464e8989ffbd4ba6b3a49bc2ab0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMPARISC_SIGCONTEXT_H
 #define _ASMPARISC_SIGCONTEXT_H
 
index 8fd10f85c50e1d90071dcb846430f32e7ae9dba0..4a1062e05aaff7f35fe2927e85ab89fe3b6e1290 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_SIGINFO_H
 #define _PARISC_SIGINFO_H
 
index e26043b73f5d8e32280b4bd1cfe087f4c93aa3b9..d38563a394f2cef1a3d58586a3b789ea3a58a06f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_PARISC_SIGNAL_H
 #define _UAPI_ASM_PARISC_SIGNAL_H
 
index 3b2bf7ae703b55bbd7e877a47b13dbf1cdccab28..1d0fdc3b5d228279b3863bd581f56fc8ed2cbe9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SOCKET_H
 #define _UAPI_ASM_SOCKET_H
 
index dabfbc7483f679eb12063b92d5c10594eda91fb8..66a3ba64d53f6b0832dd5f80a9a6e158a92338b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_PARISC_SOCKIOS__
 #define __ARCH_PARISC_SOCKIOS__
 
index 3310d2a49759ad62d8a3cdf499e2058d1588cba1..b5bbf6704caef7a659763fe19a77ef3b4fff2705 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_STAT_H
 #define _PARISC_STAT_H
 
index 324bea905dc6a90c760f32306f78db51600c219e..e5de020c21abdc39017a70dc755f6aa18da56d4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_STATFS_H
 #define _PARISC_STATFS_H
 
index 928e1bbac98fef4fa098163d12a98670000065d2..35fb2d1bfbbd027dce6635d4d6ac48bc3d546b0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_SWAB_H
 #define _PARISC_SWAB_H
 
index d1ab92177a5c130212ff11b89027a229d766ccd8..40e920f8d68325becdf1c0eacabe55dddeda8e6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_PARISC_TERMBITS_H__
 #define __ARCH_PARISC_TERMBITS_H__
 
index f3377395070de107ed004d47e4337184c79310a0..aba174f23ef003901f39c407e03b5cf6c71600a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_PARISC_TERMIOS_H
 #define _UAPI_PARISC_TERMIOS_H
 
index 8866f9bbdeafd226b92067b1e16842d705ebe37c..28c7d7453b10f9b14f8c16ecf91e390842a37534 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _PARISC_TYPES_H
 #define _PARISC_TYPES_H
 
index 667c99421003e4dd07c6d204bef7db08fa905933..4872e77aa96b784d5a1e19bd7f9c4996b8cd0992 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_PARISC_UNISTD_H_
 #define _UAPI_ASM_PARISC_UNISTD_H_
 
index c4294df69fb63a9e4354e06a6f84e8e4f79b505d..649dc3eda4488205346c19912b9dc2baae4b2863 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for arch/parisc/kernel
 #
index eb64a6148c82dbf0c35bf653639cd36ea9884afe..9eb47b2225d2d8cf26377702ea3a9b327fb630ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index f2adcf33f8f2218761b19e9414cbbf8e0c4085b8..20dfa081ed0b83d369d662ecd8a6f6491ded6a95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for 32-bit Linux/Parisc ELF binaries on 64 bit kernels
  *
index c74478f6bc742b255745d52dc876aa3d72a89e37..20c39c9d86a9aedb3c15739f6c5108987c0d47d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/unistd.h>
 
 unsigned int parisc32_dir_class[] = {
index ab80e5c6f6517c4f165ab9ce8c3863b2d94e7c05..6d471c00c71af12f6a48c4deebb5d260071d5dd3 100644 (file)
@@ -232,6 +232,26 @@ int pdc_add_valid(unsigned long address)
 }
 EXPORT_SYMBOL(pdc_add_valid);
 
+/**
+ * pdc_instr - Get instruction that invokes PDCE_CHECK in HPMC handler.
+ * @instr: Pointer to variable which will get instruction opcode.
+ *
+ * The return value is PDC_OK (0) in case call succeeded.
+ */
+int __init pdc_instr(unsigned int *instr)
+{
+       int retval;
+       unsigned long flags;
+
+       spin_lock_irqsave(&pdc_lock, flags);
+       retval = mem_pdc_call(PDC_INSTR, 0UL, __pa(pdc_result));
+       convert_to_wide(pdc_result);
+       *instr = pdc_result[0];
+       spin_unlock_irqrestore(&pdc_lock, flags);
+
+       return retval;
+}
+
 /**
  * pdc_chassis_info - Return chassis information.
  * @result: The return buffer.
index 5a5506a35395c411f91a61a59ebd50ed3ced38b6..6fa8535d3cceb55de7ecf1051fcb2c812dcb1f51 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Code for tracing calls in Linux kernel.
  * Copyright (C) 2009-2016 Helge Deller <deller@gmx.de>
index 9b245fc6756095c76db199c60b42a096339afc89..0d770ac83f70b5ee5d54df5e56559c997cd19f10 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *   linux/arch/parisc/kernel/pa7300lc.c
  *     - PA7300LC-specific functions   
index c6d6272a934f03823b655cf07b38e7bbc01ca12e..7baa2265d43927fd7e5a24269e627486c60c6b35 100644 (file)
@@ -35,12 +35,12 @@ EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(__xchg8);
 EXPORT_SYMBOL(__xchg32);
 EXPORT_SYMBOL(__cmpxchg_u32);
+EXPORT_SYMBOL(__cmpxchg_u64);
 #ifdef CONFIG_SMP
 EXPORT_SYMBOL(__atomic_hash);
 #endif
 #ifdef CONFIG_64BIT
 EXPORT_SYMBOL(__xchg64);
-EXPORT_SYMBOL(__cmpxchg_u64);
 #endif
 
 #include <linux/uaccess.h>
index bd4c0a7471d30b1c3411d372ef027bce24476f08..412231d101f96f1136f6283b0ac5a69708325af5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
 ** PARISC 1.1 Dynamic DMA mapping support.
 ** This implementation is for PA-RISC platforms that do not support
index 05730a83895c7f5700760e880a460257e8c372ba..e07eb34c875052f9ab98e07d28e5f101a7c4edf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Page Deallocation Table (PDT) support
  *
@@ -15,6 +16,7 @@
 #include <linux/memblock.h>
 #include <linux/seq_file.h>
 #include <linux/kthread.h>
+#include <linux/initrd.h>
 
 #include <asm/pdc.h>
 #include <asm/pdcpat.h>
@@ -216,8 +218,16 @@ void __init pdc_pdt_init(void)
        }
 
        for (i = 0; i < pdt_status.pdt_entries; i++) {
+               unsigned long addr;
+
                report_mem_err(pdt_entry[i]);
 
+               addr = pdt_entry[i] & PDT_ADDR_PHYS_MASK;
+               if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) &&
+                       addr >= initrd_start && addr < initrd_end)
+                       pr_crit("CRITICAL: initrd possibly broken "
+                               "due to bad memory!\n");
+
                /* mark memory page bad */
                memblock_reserve(pdt_entry[i] & PAGE_MASK, PAGE_SIZE);
        }
index a45a67d526f8ca8001fd1d06625b3b233d5a3835..30f92391a93ef6d5a90970b81921a2133d5e2eb0 100644 (file)
@@ -146,7 +146,7 @@ void machine_power_off(void)
 
        /* prevent soft lockup/stalled CPU messages for endless loop. */
        rcu_sysrq_start();
-       lockup_detector_suspend();
+       lockup_detector_soft_poweroff();
        for (;;);
 }
 
index a778bd3c107c507e5a76d99e06813876aad64bd7..e120d63c1b285ad545c2281de0abbbcc2dde6e08 100644 (file)
@@ -317,7 +317,7 @@ void __init collect_boot_cpu_data(void)
  *
  * o Enable CPU profiling hooks.
  */
-int init_per_cpu(int cpunum)
+int __init init_per_cpu(int cpunum)
 {
        int ret;
        struct pdc_coproc_cfg coproc_cfg;
index f8b6959d2d972a9f558aaa7464eb066c358a8472..1a2be6e639b5a8cc3b2a28652bc089f69e59132d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Kernel support for the ptrace() and syscall tracing interfaces.
  *
index dee6f9d6a153ce461ec816e6caeb5a38dd3bb9f2..f7d0c3b33d70a53b5350729f1e3d59b2e803749b 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/export.h>
 #include <linux/sched.h>
 #include <linux/sched/clock.h>
+#include <linux/start_kernel.h>
 
 #include <asm/processor.h>
 #include <asm/sections.h>
@@ -48,6 +49,7 @@
 #include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/unwind.h>
+#include <asm/smp.h>
 
 static char __initdata command_line[COMMAND_LINE_SIZE];
 
@@ -115,7 +117,6 @@ void __init dma_ops_init(void)
 }
 #endif
 
-extern int init_per_cpu(int cpuid);
 extern void collect_boot_cpu_data(void);
 
 void __init setup_arch(char **cmdline_p)
@@ -398,9 +399,8 @@ static int __init parisc_init(void)
 }
 arch_initcall(parisc_init);
 
-void start_parisc(void)
+void __init start_parisc(void)
 {
-       extern void start_kernel(void);
        extern void early_trap_init(void);
 
        int ret, cpunum;
index 26f12f45b4bb1c233e689525d4c951757f6787b9..f2a4038e275b1a76f075f35bc22b116d2f6323e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/parisc/kernel/signal.c: Architecture-specific signal
  *  handling support.
index 63365106ea1907589bbdee1688a1a9be54b1a74d..30c28ab145409b5966f7237ec2b6ca07121adc10 100644 (file)
@@ -255,12 +255,11 @@ void arch_send_call_function_single_ipi(int cpu)
 static void __init
 smp_cpu_init(int cpunum)
 {
-       extern int init_per_cpu(int);  /* arch/parisc/kernel/processor.c */
        extern void init_IRQ(void);    /* arch/parisc/kernel/irq.c */
        extern void start_cpu_itimer(void); /* arch/parisc/kernel/time.c */
 
        /* Set modes and Enable floating point coprocessor */
-       (void) init_per_cpu(cpunum);
+       init_per_cpu(cpunum);
 
        disable_sr_hashing();
 
index 93c1963d76fe415df8c503057a2a095775a65566..2a12a547b447bdff42fc26724cdd8ec2a5b34a4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sys_parisc32.c: Conversion between 32bit and 64bit native syscalls.
  *
index 23de307c3052aa9ecac21fd6c294657fb53de447..41e60a9c7db23b8384b18bf8ddd45f188ef4a0c3 100644 (file)
@@ -742,7 +742,7 @@ lws_compare_and_swap_2:
 10:    ldd     0(%r25), %r25
 11:    ldd     0(%r24), %r24
 #else
-       /* Load new value into r22/r23 - high/low */
+       /* Load old value into r22/r23 - high/low */
 10:    ldw     0(%r25), %r22
 11:    ldw     4(%r25), %r23
        /* Load new value into fr4 for atomic store later */
@@ -834,11 +834,11 @@ cas2_action:
        copy    %r0, %r28
 #else
        /* Compare first word */
-19:    ldw,ma  0(%r26), %r29
+19:    ldw     0(%r26), %r29
        sub,=   %r29, %r22, %r0
        b,n     cas2_end
        /* Compare second word */
-20:    ldw,ma  4(%r26), %r29
+20:    ldw     4(%r26), %r29
        sub,=   %r29, %r23, %r0
        b,n     cas2_end
        /* Perform the store */
index 2d956aa0a38abbc3829757bab4749dd6a0037490..4b8fd6dc22dabebcf1da3b2e32381d2df3197eda 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/parisc/kernel/time.c
  *
@@ -253,7 +254,10 @@ static int __init init_cr16_clocksource(void)
                cpu0_loc = per_cpu(cpu_data, 0).cpu_loc;
 
                for_each_online_cpu(cpu) {
-                       if (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc)
+                       if (cpu == 0)
+                               continue;
+                       if ((cpu0_loc != 0) &&
+                           (cpu0_loc == per_cpu(cpu_data, cpu).cpu_loc))
                                continue;
 
                        clocksource_cr16.name = "cr16_unstable";
index 991654c88eec8635056bef3ae9f536a6e8ff8862..8453724b8009f424caf2dc94e7bf883732699b2a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/parisc/traps.c
  *
@@ -817,7 +818,7 @@ void __init initialize_ivt(const void *iva)
        u32 check = 0;
        u32 *ivap;
        u32 *hpmcp;
-       u32 length;
+       u32 length, instr;
 
        if (strcmp((const char *)iva, "cows can fly"))
                panic("IVT invalid");
@@ -827,6 +828,14 @@ void __init initialize_ivt(const void *iva)
        for (i = 0; i < 8; i++)
            *ivap++ = 0;
 
+       /*
+        * Use PDC_INSTR firmware function to get instruction that invokes
+        * PDCE_CHECK in HPMC handler.  See programming note at page 1-31 of
+        * the PA 1.1 Firmware Architecture document.
+        */
+       if (pdc_instr(&instr) == PDC_OK)
+               ivap[0] = instr;
+
        /* Compute Checksum for HPMC handler */
        length = os_hpmc_size;
        ivap[7] = length;
index 48dc7d4d20bba5e6fdb8669ae6d03b3ed3cb27c4..5a657986ebbf4bef7beff4e8c8d20f1343872347 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Kernel unwinding support
  *
@@ -14,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/kallsyms.h>
 #include <linux/sort.h>
+#include <linux/sched.h>
 
 #include <linux/uaccess.h>
 #include <asm/assembly.h>
@@ -279,6 +281,17 @@ static void unwind_frame_regs(struct unwind_frame_info *info)
 
                        info->prev_sp = sp - 64;
                        info->prev_ip = 0;
+
+                       /* The stack is at the end inside the thread_union
+                        * struct. If we reach data, we have reached the
+                        * beginning of the stack and should stop unwinding. */
+                       if (info->prev_sp >= (unsigned long) task_thread_info(info->t) &&
+                           info->prev_sp < ((unsigned long) task_thread_info(info->t)
+                                               + THREAD_SZ_ALGN)) {
+                               info->prev_sp = 0;
+                               break;
+                       }
+
                        if (get_user(tmp, (unsigned long *)(info->prev_sp - RP_OFFSET))) 
                                break;
                        info->prev_ip = tmp;
index ffe2cbf52d1a25617955c54f73890fdb02e7e394..159a2ec0b4e01f148c1ed6e4c5539abb504ac1b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*    Kernel link layout for various "sections"
  *
  *    Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
index 8e45b0a97abf67bfc7621c5a964502890038cf2e..70ffbcf889b8e34f6e4195e98d2c494f190693a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bitops.c: atomic operations which got too long to be inlined all over
  *      the place.
index ec9255f27a818499affbc803759b2bb6870f2807..7eab4bb8abe630b14c54c3b457285b4228607dc6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Precise Delay Loops for parisc
  *
index 7c1406ff825e388d96c02d0ee4b946b429d43e13..7c00496b47d44fe5f58c04702d42208eeca7d303 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/parisc/lib/io.c
  *
index eaffbb90aa14dd7e3edb2ec68cbe8e5974ac91b7..4b19e6e64fb7dfc48e3b5fd23d531115ff3b2918 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * iomap.c - Implement iomap interface for PA-RISC
  * Copyright (c) 2004 Matthew Wilcox
index 149c016f32c5cbb287f23761ecfaaa5f0fdf349b..8e6014a142ef407495a9d8e2c5c9c70bc6dfbaf1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 union ull_union {
index 0bd63b08a79ac72f304f26d0d7bd3eea3317799d..b6c4b254901abb3874d7d51f244a9d9c468e6604 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux/parisc floating point code
 #
index 5b101f6a5607dc1ef9e229b6f2421a78d35355ce..e247edbca68ecd2f56500e467776c9d2fa1f1c11 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/interrupt.h>
 #include <linux/extable.h>
 #include <linux/uaccess.h>
+#include <linux/hugetlb.h>
 
 #include <asm/traps.h>
 
@@ -261,7 +262,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
        struct task_struct *tsk;
        struct mm_struct *mm;
        unsigned long acc_type;
-       int fault;
+       int fault = 0;
        unsigned int flags;
 
        if (faulthandler_disabled())
@@ -315,7 +316,8 @@ good_area:
                        goto out_of_memory;
                else if (fault & VM_FAULT_SIGSEGV)
                        goto bad_area;
-               else if (fault & VM_FAULT_SIGBUS)
+               else if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
+                                 VM_FAULT_HWPOISON_LARGE))
                        goto bad_area;
                BUG();
        }
@@ -352,8 +354,7 @@ bad_area:
 
        if (user_mode(regs)) {
                struct siginfo si;
-
-               show_signal_msg(regs, code, address, tsk, vma);
+               unsigned int lsb = 0;
 
                switch (code) {
                case 15:        /* Data TLB miss fault/Data page fault */
@@ -386,6 +387,30 @@ bad_area:
                        si.si_code = (code == 26) ? SEGV_ACCERR : SEGV_MAPERR;
                        break;
                }
+
+#ifdef CONFIG_MEMORY_FAILURE
+               if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) {
+                       printk(KERN_ERR
+       "MCE: Killing %s:%d due to hardware memory corruption fault at %08lx\n",
+                       tsk->comm, tsk->pid, address);
+                       si.si_signo = SIGBUS;
+                       si.si_code = BUS_MCEERR_AR;
+               }
+#endif
+
+               /*
+                * Either small page or large page may be poisoned.
+                * In other words, VM_FAULT_HWPOISON_LARGE and
+                * VM_FAULT_HWPOISON are mutually exclusive.
+                */
+               if (fault & VM_FAULT_HWPOISON_LARGE)
+                       lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault));
+               else if (fault & VM_FAULT_HWPOISON)
+                       lsb = PAGE_SHIFT;
+               else
+                       show_signal_msg(regs, code, address, tsk, vma);
+               si.si_addr_lsb = lsb;
+
                si.si_errno = 0;
                si.si_addr = (void __user *) address;
                force_sig_info(si.si_signo, &si, current);
index 5eb8f633b282ea88d34e2eeb974d06ad59a02251..d77479ae3af290c46661a9717689da33e3f1a425 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PARISC64 Huge TLB page support.
  *
index 1ca9a2b4239fba17f8e524453b04ec7757243b3b..13f7854e0d49cc796d98a438cad64d76916d6bc9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/parisc/mm/init.c
  *
index 838d0259cd2715e034ce7787eba12ac4cc7ae9c4..92a9b5f12f98adfe4e87e6a18ff381e528108946 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/parisc/mm/ioremap.c
  *
index e9feca1ca28bf5c6c57eb3ca0beb24186165e80a..86a1ccc328eb13bc6bc8c9b87ed57fef7c902b66 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index 809c468edab13dc7f7b6a657c5b1c22546ae53ef..cb782ac1c35d5cac90cb34e5b104fec551702694 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 source "arch/powerpc/platforms/Kconfig.cputype"
 
 config PPC32
index c86df246339e9dd3750e8c731c3a5efb9eb47585..be1c8c5beb61c416ff8fbe36f021a124604b89f6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 5db43ebbe2dfdc9e0197e558bad4917816cc5232..83f8e5ba2722c2d1a96930dc55d0db0243d2d638 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ===========================================================================
 # Post-link powerpc pass
 # ===========================================================================
index c4e6fe35c075568787f21e7b850d8cd9ccb72a0b..651974192c4d76c82fcebf9a0abddc25537f5b12 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for making ELF bootable images for booting on CHRP
 # using Open Firmware.
 #
index 19dc15abe43de27a693f214ec44aa7de77260834..dfb56829cace6b8f51a9df5a18ee4453f01ba374 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CPM serial console support.
  *
index cd2aa7f348f306310256711d57e634b5e5299783..c2b2c58eaa0b8535fe30a176c0a884c319fe9ee3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_CUBOOT_H_
 #define _PPC_BOOT_CUBOOT_H_
 
index bf8f4ede192851249bbc6b1a2b0114072ead5d3f..334ab8b5a668075a8f4d757fef2e15ae57260386 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_DCR_H_
 #define _PPC_BOOT_DCR_H_
 
index 81a8dc2c6365abb471661f7152cff41cfa26a89b..81201d3907e2eec11e83dd0008aff2b5df00b7db 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xilinx ML510 Reference Design support
  *
index 1941bc50d4c57bf80c8845a31bc0fe5a9c153f4d..f6aa7c20fcafb426969cd99dd194dd036b006db6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_ELF_H_
 #define _PPC_BOOT_ELF_H_
 
index c10191006673aa611bc4451bcf9fc6891f5d4948..01262f50b76945407893acc6c2c237922e6157ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 extern void epapr_platform_init(unsigned long r3, unsigned long r4,
                                unsigned long r5, unsigned long r6,
                                unsigned long r7);
index 8e14cd9e1a5459bbf310c2ca28b29e2ee356cf7a..4346c750cac17b5bf88acde9e7339a3537a81319 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .text
        .global _zimage_start
 _zimage_start:
index 5da26fc6e3cfb8b5e7af372c033a148f0ae29881..00b2cb89ff2f556786f9a937fa769b6f428d96fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_FSL_SOC_H_
 #define _PPC_BOOT_FSL_SOC_H_
 
index 394da5500466ff7f9a4cfcd183398fccc7d9a28b..5c6f90c34923f1a1d2a16c425caf53cb0cbd60a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IO_H
 #define _IO_H
 
index 7e3789ea396b88103644cf14726337fb98b00392..f52c31b1f48fa6a43b1bab1ed27c7f06eafadec8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
 #define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
 
index e2ae24340fc8e0ba2b3db0856fffa2e213e75173..dc603f3c15bec97c6415aa9ca761a357f78b1ab8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Makes a tree bootable image for IBM Evaluation boards.
  * Basically, just take a zImage, skip the ELF header, and stuff
index 41cabb4b63fa7746a39cb3be434f4bf316410619..826dad0c19d97200e891221a7261cf0bf9072899 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "ppc_asm.h"
 
        .text
index d4cb4e4e0938b049a68f4c2ff5ed5aeb1c09316f..c2c08633ee356c33eee7dd5ebb0f4f52bdf023d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MPC5200 PSC serial console support.
  *
index 3f59901ab1c08fec9caa163a83f2b25b34cfe6b8..3852ed90047f03721d932207e9d33c79cae36ce3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_MPC8xx_H_
 #define _PPC_BOOT_MPC8xx_H_
 
index 8c9ead94be06f70b891a6bd90b39f98a0d4bbbd4..b0da4466d41983590326abb8b08f69a4a7d64ebd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * 16550 serial console support.
  *
index 53f8f27f94e4e57d37d0f8bb6ebc9a17e32b506e..31b2f5dfd589b723757a0d597f8e72f86ac91a3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_OF_H_
 #define _PPC_BOOT_OF_H_
 
index d53c733cc463b16888ed96f41514d057daf486e1..5311db06c62b7482b36928d290dfb1005fa429b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_PLANETCORE_H_
 #define _PPC_BOOT_PLANETCORE_H_
 
index 481698c7a51a96c9d51b8f07aeab78c4a6e6f1c0..f577b3bec60bd49bcc68457fe5dacb6f60a58e05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_PQ2_H_
 #define _PPC_BOOT_PQ2_H_
 
index 6ef6e02e80f92c6702c7ec41c44df9798fb4a778..1b1a638ce6e845d363f55f7ac36d51679719e6dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "ppc_asm.h"
 
        .text
index ace0b7fed8ebf72bf4c72e2027141395d820fa85..8f319b1add32f4815937760396d5fb75ebcd2fb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_REDBOOT_H
 #define _PPC_REDBOOT_H
 
index d70517ccc0f79a6196419e64c5d2b2754d678c62..a9d879155ef9610cfcbd9d73a56da157d04cf879 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* IBM RS/6000 "XCOFF" file definitions for BFD.
    Copyright (C) 1990, 1991 Free Software Foundation, Inc.
    FIXME: Can someone provide a transliteration of this name into ASCII?
index adffc58412d4afcd8cf2e25c579fc1abcfe6a689..884d5959a9ae06f1b2c57a9494ea9491505d4c1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_STDIO_H_
 #define _PPC_BOOT_STDIO_H_
 
index 1bf01ac73aba15119cf654e0a21092bea5f482b1..0a61fcd10fdb6bad6a8d8fa46d51e3c78ed91283 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_STDLIB_H_
 #define _PPC_BOOT_STDLIB_H_
 
index 50091cc0eed97a3ba8b384c6a88a11ba64265bef..3fb71171da49909e10a0d2b1817bcb6090f711de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_STRING_H_
 #define _PPC_BOOT_STRING_H_
 #include <stddef.h>
index d0e1431084cae0b4df4f05211687552019a873c3..11d2069fbb665c219a28e30ec8af062e834ad12b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_BOOT_SWAB_H_
 #define _PPC_BOOT_SWAB_H_
 
index af6b66b842c474ddbda77312e80bae96d412e11c..8a4c418b7260179c98dcd66444108a938a3b513d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TYPES_H_
 #define _TYPES_H_
 
index 3edb13f946690a21cb1168d982ea7ad359c84bc1..00bab7d7c48ce9800dd0b277d9b1e7c29a7c4eb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "ppc_asm.h"
 
        .text
index 5c6afdbca642bc1069ea3be33a215bf8881e20a0..e22e5b3770ddcc32b4ee37fecc63893b96522535 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __XZ_CONFIG_H__
 #define __XZ_CONFIG_H__
 
index de4c9e3c93441a0c3b4b95bd0e87aa429774f357..1179512951179a77ced283a46677d50fac9599c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 OUTPUT_ARCH(powerpc:common)
 ENTRY(_zimage_start_opd)
 EXTERN(_zimage_start_opd)
index f080abfc2f83fbd1e7d63846904a3a21ad820cee..4ac1e36edfe7f0187a487c65382481bd6d5a4c2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 
 #ifdef CONFIG_PPC64_BOOT_WRAPPER
index aaa469c1e60d9629bb8ed9e04ec6424413ff0de8..7b2ff2eaa73a61179ea795b14981cd7f11fa9e54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 OUTPUT_ARCH(powerpc:common)
 ENTRY(_zimage_start)
 EXTERN(_zimage_start)
index e084fa548d73d217b72ca96dbe0783dbf1b2105d..063817fee61cfeea164555a99139de3ffda3aedf 100644 (file)
@@ -138,10 +138,11 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
-CONFIG_SND_SEQUENCER=m
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQUENCER_OSS=m
 CONFIG_SND_POWERMAC=m
 CONFIG_SND_AOA=m
 CONFIG_SND_AOA_FABRIC_LAYOUT=m
index 79bbc8238b325aa5a637b7bc79913ebbc835b3be..805b0f87653c1939f2722929689db2ebb128930f 100644 (file)
@@ -64,11 +64,12 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 CONFIG_SOUND=y
 CONFIG_SND=y
-CONFIG_SND_SEQUENCER=y
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=y
 CONFIG_SND_PCM_OSS=y
-CONFIG_SND_SEQUENCER_OSS=y
 # CONFIG_SND_VERBOSE_PROCFS is not set
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQUENCER_OSS=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_GENERIC=y
index 8cf4a46bef86b00c0d2f5562d3f30262be4f5ecd..6daa56f8895cb22bcd37011328c68932abe50074 100644 (file)
@@ -115,9 +115,10 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y
 CONFIG_LOGO=y
 CONFIG_SOUND=y
 CONFIG_SND=y
-CONFIG_SND_SEQUENCER=y
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=y
 CONFIG_SND_PCM_OSS=y
+CONFIG_SND_SEQUENCER=y
 CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_USB_AUDIO=y
 CONFIG_SND_USB_USX2Y=y
index 8e798b1fbc9900eba3830878e77ea809a8b56b90..1aab9a62a681d4856aff8f7afaa0f9435832b4d9 100644 (file)
@@ -227,11 +227,12 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_SEQUENCER_OSS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_POWERMAC=m
 CONFIG_SND_AOA=m
index 791db775a09cac4e695fd199f9f9ed060337ea5c..6ddca80c52c3b4c1fef2e1442a5c1d2a31f24e2e 100644 (file)
@@ -222,11 +222,12 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_SEQUENCER_OSS=m
 CONFIG_SND_POWERMAC=m
 CONFIG_SND_AOA=m
 CONFIG_SND_AOA_FABRIC_LAYOUT=m
index d0fe0f8f77c236f03470abb7fc039861e6587a12..41d85cb3c9a2fb65fae203654e0759dde8099080 100644 (file)
@@ -141,11 +141,12 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 CONFIG_SOUND=m
 CONFIG_SND=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_SEQUENCER_OSS=m
 CONFIG_HID_DRAGONRISE=y
 CONFIG_HID_GYRATION=y
 CONFIG_HID_TWINHAN=y
index ae6eba482d75da632b90be24bb83a89cb7140e78..da0e8d535eb8889efbd937a1d2ba62aac6236400 100644 (file)
@@ -789,17 +789,18 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_SOUND=m
 CONFIG_SND=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_DYNAMIC_MINORS=y
 # CONFIG_SND_SUPPORT_OLD_API is not set
 CONFIG_SND_VERBOSE_PRINTK=y
 CONFIG_SND_DEBUG=y
 CONFIG_SND_DEBUG_VERBOSE=y
 CONFIG_SND_PCM_XRUN_DEBUG=y
+CONFIG_SND_SEQUENCER=m
+CONFIG_SND_SEQ_DUMMY=m
+CONFIG_SND_SEQUENCER_OSS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
index aef41b17a8bc02d0445bd8f145904f0b9c9454b0..9c7400a19e9df2aca8b005bb658d802c48eb88af 100644 (file)
@@ -79,11 +79,12 @@ CONFIG_FB=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_SOUND=y
 CONFIG_SND=y
-CONFIG_SND_SEQUENCER=y
+CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=y
 CONFIG_SND_PCM_OSS=y
-CONFIG_SND_SEQUENCER_OSS=y
 # CONFIG_SND_VERBOSE_PROCFS is not set
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_HID_APPLE=m
 CONFIG_HID_WACOM=m
 CONFIG_MMC=y
index 67eca3af9fc7785462ed6c2d43e6a4b9ce8ec200..4808d97fede5323a7a3a7a302334e6e4107d69d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # powerpc/crypto/Makefile
 #
index 82ddc9bdfeb11a18a83469c5c35f1ea02b36cb5c..c8951ce0dcc4ef30ea293d516ba2d4a5fc9d87fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SHA-1 implementation for PowerPC.
  *
index 416e12c2d5052234173675894d81f48c18e78179..b29b1186f8193873a5fe2b23019e46e147ba1cf2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_AGP_H
 #define _ASM_POWERPC_AGP_H
 #ifdef __KERNEL__
index 85e88f7a59c0a072c14f6f686b252ab3b4b8c5ef..9c63b596e6ce549885dd9bc9b3c4982ccef50f21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_ARCHRANDOM_H
 #define _ASM_POWERPC_ARCHRANDOM_H
 
index a2cc8010cd72a70f818d289a57f1bcbc1805bba4..682b3e6a1e212d7ab0c38246ec7168ca7fbdf805 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_ATOMIC_H_
 #define _ASM_POWERPC_ATOMIC_H_
 
index 8cf5c37c3817c55af33ec1f5b5a24ebdf2a77f06..1b5eab62ed0470d949cbdd42ed7698f4e2ea5e22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Routines for handling backlight control on PowerBooks
  *
index 9c601adfc50000dea26834f884cf4248952cee6e..10daa1d56e0a44f40ea082aea13af9104a686805 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index 880db13a2e9ffcb63f48038674fc313dccdc6e47..f2892c7ab73ecb8b5d65b0c9a8d18ddd9490b776 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_32_HASH_H
 #define _ASM_POWERPC_BOOK3S_32_HASH_H
 #ifdef __KERNEL__
index b82e063494dd8fdc3d78e151bc949e4ce8c3c1c6..e38c91388c40f9cfd160641a20be4581710b115c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_
 #define _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_
 /*
index a120e7f8d535a30c7f8d812710b310a60f578ecb..5073cc75f1c87ed48b936676a25dbf9140ec84a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_32_PGALLOC_H
 #define _ASM_POWERPC_BOOK3S_32_PGALLOC_H
 
index 4d453f9795535edeee1b73bd1fb9351bc58cf3f3..016579ef16d3d411a4e4caa36bccbd5f7ad8e5c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_32_PGTABLE_H
 #define _ASM_POWERPC_BOOK3S_32_PGTABLE_H
 
index 0c4e470571ca0faa74d3e9fa38fa57a384cab4bf..197ced1eaaa0932d59d214a469e25f53b79fa483 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_HASH_4K_H
 #define _ASM_POWERPC_BOOK3S_64_HASH_4K_H
 /*
index 9732837aaae85cdaf92d5c8551d47562ca58409d..8d40cf03cb67d10a691bc2d0b92071dbccc0c8e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_HASH_64K_H
 #define _ASM_POWERPC_BOOK3S_64_HASH_64K_H
 
index f88452019114c2d75d78b4b8b05611a7761bb0c1..ecb1239d74f4bb4ee7c04f51a362b2be76588dfe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_HASH_H
 #define _ASM_POWERPC_BOOK3S_64_HASH_H
 #ifdef __KERNEL__
index 2d1ca488ca44e47a91e52bcd4cb2fbcf9159742a..c459f937d484c5769b700a0fb2fbabf73438895e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_HUGETLB_H
 #define _ASM_POWERPC_BOOK3S_64_HUGETLB_H
 /*
index c3b00e8ff79103876b3368a5cf3b4d708c579bf8..37fdede5a24ce32f8aee75472e389b0dee816540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_MMU_H_
 #define _ASM_POWERPC_BOOK3S_64_MMU_H_
 
index 8708a0239a56b9729a3229c59de7aa51a38abe65..af5f2baac80f991951ac77dc3b3eaeb1e72aee46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_4K_H
 #define _ASM_POWERPC_BOOK3S_64_PGTABLE_4K_H
 /*
index 2ce4209399edc46edc5779d0cf99570638146aa4..fb4b3ba52339e9233207ce7345e2f9d920835f97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H
 #define _ASM_POWERPC_BOOK3S_64_PGTABLE_64K_H
 
index b9aff515b4de28c10b3b2a040b140592efd1010e..9a677cd5997f9a891c2ecc8f6e3bbd08c5c41dbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_PGTABLE_H_
 #define _ASM_POWERPC_BOOK3S_64_PGTABLE_H_
 
index 7c3b1fe1619e6294aee95ba57a2b9a8ee0aec2fb..a61aa9cd63ec9fefa8065ca662aae4d1db486de0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_RADIX_4K_H
 #define _ASM_POWERPC_PGTABLE_RADIX_4K_H
 
index 82dc355f0b45ad10dab2eced57a30e2627d6bb2a..c7e71ba295554949cbda2f9fb9b1c4d03551b689 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_RADIX_64K_H
 #define _ASM_POWERPC_PGTABLE_RADIX_64K_H
 
index 1e5ba94e62ef393ecf4be526d184aef4446dbc01..19c44e1495aefe8b1170385f87e0877dedb92341 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_RADIX_H
 #define _ASM_POWERPC_PGTABLE_RADIX_H
 
index 2f6373144e2c5eb43af53847d8bf6e87ca3c71c0..42178897a050a9540392cb561361d16b2f92f771 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_TLBFLUSH_HASH_H
 #define _ASM_POWERPC_BOOK3S_64_TLBFLUSH_HASH_H
 
index 9b433a624bf3620d46cd97e6b8e563abce691169..c2115dfcef0ce77ca0a777f651dd30177b5e0cd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_TLBFLUSH_RADIX_H
 #define _ASM_POWERPC_TLBFLUSH_RADIX_H
 
index 72b925f97bab7e9314823b221881a69b4279c7bd..fcffddbb3102abd65fe416d6794cbecfc91c5a43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_64_TLBFLUSH_H
 #define _ASM_POWERPC_BOOK3S_64_TLBFLUSH_H
 
index c0a69ae922567b5fc819069e7e7d150992417866..6b178ca143e7e3b86e7ac0ac8ddfc03ca7662cd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_PGALLOC_H
 #define _ASM_POWERPC_BOOK3S_PGALLOC_H
 
index 8b0f4a29259a9358733fc19e3bed24cfccaf86ab..6436b65ac7bc661733b7cd96b26062728330c33a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BOOK3S_PGTABLE_H
 #define _ASM_POWERPC_BOOK3S_PGTABLE_H
 
index dd9461003dfafacf97a4fd2da17b2e09fec7d67e..1c121f3c524fb51affe9ac3261f094e5a33e990f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file describes the structure passed from the BootX application
  * (for MacOS) when it is used to boot Linux.
index 89fc382648bc8c9f20b673df66377614150f7578..3ffad030393c13b2c00277953b34f07e648f2e52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for using the procedures in btext.c.
  *
index 7ee763d3bea95c03f66709347967e30503a0fb77..3c04249bcf39b76a50711c6bc3a5b789e496f1ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_BUG_H
 #define _ASM_POWERPC_BUG_H
 #ifdef __KERNEL__
index d122f7f957ce324a1ec046381d1c36afd15ca763..c1d257aa4c2d350d23774420eafed6deb57ec5f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_CACHE_H
 #define _ASM_POWERPC_CACHE_H
 
index fdf64fd259508c94e8e4ab39635d7a4ef27aaa56..e1c431ef30e033a186e1be621992941f092ddc9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * cbe_regs.h
  *
index fc46b664c49e8adfb58bd4c45fe9f439ee7eb96a..9b001f1f6b32fcb650dd069989ac52959d92c817 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_CMPXCHG_H_
 #define _ASM_POWERPC_CMPXCHG_H_
 
index 5482928eea1beb64b0f018bc5d7f74a94a998e50..abef812de7f8cb4f7ae5a178c67775f81d4a22f7 100644 (file)
@@ -83,16 +83,8 @@ static inline unsigned long ppc_function_entry(void *func)
         * On PPC64 ABIv1 the function pointer actually points to the
         * function's descriptor. The first entry in the descriptor is the
         * address of the function text.
-        *
-        * However, we may also receive pointer to an assembly symbol. To
-        * detect that, we first check if the function pointer we receive
-        * already points to kernel/module text and we only dereference it
-        * if it doesn't.
         */
-       if (kernel_text_address((unsigned long)func))
-               return (unsigned long)func;
-       else
-               return ((func_descr_t *)func)->entry;
+       return ((func_descr_t *)func)->entry;
 #else
        return (unsigned long)func;
 #endif
index f256e1d14a147f417eb537cd5467ecacf84655bf..a035b1e5dfa7c6b5ae8ba10a1e1ad58d962c4a4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_COMPAT_H
 #define _ASM_POWERPC_COMPAT_H
 #ifdef __KERNEL__
index 40014921ffff238fc84c4dbd25b2b02661b8b3d6..f2682b28b0502e95b1ba74994806df92ad1f46d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_CONTEXT_TRACKING_H
 #define _ASM_POWERPC_CONTEXT_TRACKING_H
 
index 2c5c5b47680402389629e97b1f56b5a205f68f6a..b925df1b87d0c357e8a769a50b070cce81275540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPM_H
 #define __CPM_H
 
index 14ad37865000f163c78ac727672bb0d85a45df40..3db821876d485a964040cb815843b0122282f7bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MPC8xx Communication Processor Module.
  * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
index 7c8608b096947000f7120f2a7ee729677962a094..2211b934ecb4eaee70fab1e16139f7abf0ebd48b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Communication Processor Module v2.
  *
index 0d1df02bf99d3e4257bac057d6921318a80d10b2..7897d16e09904c4ebbd63bbf85ae3cd7d1e24d7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_CPU_HAS_FEATURE_H
 #define __ASM_POWERPC_CPU_HAS_FEATURE_H
 
index eb43b5c3a7b57f471c4a112cf7bf66d820809d9e..e210a83eb19646e8483e4b33410cb17fbf531bbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_CPUIDLE_H
 #define _ASM_POWERPC_CPUIDLE_H
 
index a9bf921f4efcdef13afa48dd52378771855a4e8f..53b31c2bcdf40bbf5af1befbb7fe05fa324abe21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_CPUTABLE_H
 #define __ASM_POWERPC_CPUTABLE_H
 
index 9377bdf42eb8aafa983b038afc15a2e96bf33873..d71a90924f3bc35acb25fb16a4630b938c096334 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_CPUTHREADS_H
 #define _ASM_POWERPC_CPUTHREADS_H
 
index 6c69836b4ec2e97571b1f68d54b04a00d907335e..4785c1716b3e967fce61c549740af56ef0180408 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for using the Apple Descriptor-Based DMA controller
  * in Power Macintosh computers.
index 380274de429ff6e77c36c12a7a1931d2a604103c..5c1a4973f46a0faca0ec778377c98bbff44f5751 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common DCR / SDR / CPR register definitions used on various IBM/AMCC
  * 4xx processors
index 5d5af3fddfd881ee5b54df7eae5edaffc1b1305e..14e71ff6579e3354633c0f69c72d7cb3b5d412ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index eaece3d3e2254bd2f8a46043db92239eb7aa9025..ee1e38ff1b77ef0973a8b280d525d88d7e1f0d30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2004 IBM
  *
index a5c6d83b5f60248b5e6cbc0e4d0cbfb2aab180e1..1b4f0254868f937d80067aa22ddb86356c6bddf7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_DMA_H
 #define _ASM_POWERPC_DMA_H
 #ifdef __KERNEL__
index 7a34fc11bf63a45e8bad918f5c8c3b7ff425850e..71515d909ed121912d4542b83abe17b988f15df8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_DT_CPU_FTRS_H
 #define __ASM_POWERPC_DT_CPU_FTRS_H
 
index 8196e9c7d7e8b7ba2e3ebe8bb97cb06524ca88af..92cac48512758cd7d280f82d7e307e58c99bffc3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index 07cc45cd86d997d45554648ada16b1d5eef42445..eb91b2d2935ad76faea5d75d7cbd863208efa656 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_POWERPC_EXTABLE_H
 #define _ARCH_POWERPC_EXTABLE_H
 
index 411af8d17a69a7caa1dedff19777470b14c853b4..6541ab77c5b9f3971d0b767e64edce571ff6c414 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_FB_H_
 #define _ASM_FB_H_
 
index 686c5f70eb8408059ec8d7f5b0635ac9c71690d3..9abddde372abfbb11934f93da2e39924fe4116d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_FTRACE
 #define _ASM_POWERPC_FTRACE
 
index 719ed9b61ea7ec5b8cbf527fd4c06181c3f1756c..1a944c18c53902645d4621c6ced9b37a34e90c32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_FUTEX_H
 #define _ASM_POWERPC_FUTEX_H
 
index bd7812a519d4ad717045912175b7e6fb310aa706..7376e3fa15703ef2730bd68de2b8619aae1c9c35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_GRACKLE_H
 #define _ASM_POWERPC_GRACKLE_H
 #ifdef __KERNEL__
index c97603d617e366d1b55a9a780615f3ad3f68873c..456f9e7b8d83ad343bed2a222df35023e148e7f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_HARDIRQ_H
 #define _ASM_POWERPC_HARDIRQ_H
 
index d81eac5b509fe82afccf3227b6c26884f42de25c..fdcff76e9a25a6095d44317a9074c5f420961fcf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_HEAD_64_H
 #define _ASM_POWERPC_HEAD_64_H
 
index 93f54958a9d14813c7466fdb44b0f7ebb785044b..8bc5b168762e6f38faafae7f790e824279498c4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_HEATHROW_H
 #define _ASM_POWERPC_HEATHROW_H
 #ifdef __KERNEL__
index 01c2c23b307e76b7a3df003c5ac8c599f11baa5c..cec820f961da04e4d74c889b245aa6f5a3ee24c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * highmem.h: virtual kernel memory mappings for high memory
  *
index b8a0fb442c6487ef70afcbd7209206606293a1ad..93f98239159fb1c85ba845a7a24358b5fe3a45c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_HUGETLB_H
 #define _ASM_POWERPC_HUGETLB_H
 
index 3d34dc0869f687a731ed97ad42eb4c47c579f11b..a409177be8bdfd5f717af6111700d088fb91e61b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_HVCALL_H
 #define _ASM_POWERPC_HVCALL_H
 #ifdef __KERNEL__
index d4a5315718ca454a6a4d01ceab9d4a0e767ac267..3fdc54df63c91654c6d0d027195924578d9c9bb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _HVSI_H
 #define _HVSI_H
 
index c1dd1929342d6381b6e5df9649dc1bb5aadcde85..abd04c36c251240f10047ced7cd393b99f05a097 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index c3fdfbd5a673a6cfb0ccd9be3385a6632b812b2c..d7f08ae49e121b7f0b297c9cc4f1dc8c197b33d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_I8259_H
 #define _ASM_POWERPC_I8259_H
 #ifdef __KERNEL__
index da01b20aea5959a9c13447dfd30108f4e2c0513a..ce87a4441ca34887f80bb28ad60e3d172e76d232 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1994-1996 Linus Torvalds & authors
  *
index 2313bdface346070a31c49e2d27eb91e702670a8..ead488cf3981eafd6f59d26fe53e9ab26be1a70e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_IMA_H
 #define _ASM_POWERPC_IMA_H
 
index 7c64fda5357b641b203a78f65e035c2337f19992..845d5b3fb2127e2416085d2c1f770be0de71183a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CPM2 Internal Memory Map
  * Copyright (c) 1999 Dan Malek (dmalek@jlc.net)
index 44d7927aec692ebb36d15ff3de4395d4f4651108..faf8617cc574a61b2c02539fbd255821b24f4577 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* This file is meant to be include multiple times by other headers */
 /* last 2 argments are used by platforms/cell/io-workarounds.[ch] */
 
index 744fd54de374146704587038dea87510610829e8..c6d3078bd8c3b442114326c10345b7484f5a0228 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_IRQ_WORK_H
 #define _ASM_POWERPC_IRQ_WORK_H
 
index f2149066fe5db98fa0080b25ed1d38e85e15d7dc..1aeb5f13b8c439f4c788b0711f1f5d2009b79d7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IRQ flags handling
  */
index a3a7c1d63a7c553a289b6739469f8fbe6d8cd2db..47295894bf910205db04cb116d6379ae6b53b03a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ISA_BRIDGE_H
 #define __ISA_BRIDGE_H
 
index ae6d206728afc476d015b15ee2a9f5e2588f467e..0f7c1ef37d0d056d60b89b0467315130878e20c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_KDEBUG_H
 #define _ASM_POWERPC_KDEBUG_H
 #ifdef __KERNEL__
index c9776202d7ec5af080a6a5eea868229c97978f32..fd128d1e52b3bbe5e73f21f2a723b9189e0a9fd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC64_KDUMP_H
 #define _PPC64_KDUMP_H
 
index 25668bc8cb2a4c621db3c4a8b332b8c2ef9882a4..4419d435639a8bb0219eb2ad34ae4a1487488d55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_KEXEC_H
 #define _ASM_POWERPC_KEXEC_H
 #ifdef __KERNEL__
index 2156315d8a90444619e477451d0ec28dca8d3a4a..debdf548009d5e7fb9613000aa48130b1f235a1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_KEYLARGO_H
 #define _ASM_POWERPC_KEYLARGO_H
 #ifdef __KERNEL__
index 4396db57b8be19bbe12377c6c6babc6a99c6b6e8..7c602da6256056ff5f454ecc50884bad557cfafd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_LIBATA_PORTMAP_H
 #define __ASM_POWERPC_LIBATA_PORTMAP_H
 
index 0cf5e21179fc8e6fc9383d1e8e1c228feec2a2b1..1f00d2891d69171ac1e89673223ce1d6fadc7111 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_LINKAGE_H
 #define _ASM_POWERPC_LINKAGE_H
 
index b8da913638646e3b7f432ad52b2d59495415f7ca..600a68bd77f5a89c2da0a39d47d0a99b25fbcbd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_POWERPC_LOCAL_H
 #define _ARCH_POWERPC_LOCAL_H
 
index 27af7f8bbb8da6245f7c5d0f971c7c07ba9d1fea..ff5fd82d9ff004f5287077075a204698f703fed9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACIO_ASIC_H__
 #define __MACIO_ASIC_H__
 #ifdef __KERNEL__
index 11037a4133ee0fa9f8325cb5fb8bc1666c900373..230fda4707b81a4ba0dd244c1331c06b6015f116 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mediabay.h: definitions for using the media bay
  * on PowerBook 3400 and similar computers.
index 34916865eaef27d16c52121848a8e90f7228a3a7..74f4edb5916e47e7682ed8a0fa5335bf3369a0c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MMU_40X_H_
 #define _ASM_POWERPC_MMU_40X_H_
 
index bf52d704fc47c86753ea00b75077d4114aa5ff1b..cb57f29f531ded91f9b786e9be48015e882c082f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MMU_44X_H_
 #define _ASM_POWERPC_MMU_44X_H_
 /*
index 798b5bf91427e894b2013e620787a15e2781264d..5bb3dbede41ad3aaf3f07060609b621ed25f7caf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MMU_8XX_H_
 #define _ASM_POWERPC_MMU_8XX_H_
 /*
index 7ca8d8e80ffa22333771fd4dc4edf29a856956f6..cda94a0f5146bcd566c276d3912211186c5930c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MMU_BOOK3E_H_
 #define _ASM_POWERPC_MMU_BOOK3E_H_
 /*
index 78260409dc9c0250f14141b0df6f8219c220f0a0..6364f5c2cc3e6bbee1244a8a6dce09f968987b70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MMU_H_
 #define _ASM_POWERPC_MMU_H_
 #ifdef __KERNEL__
index 309592589e301c2258d3cb1b9cfdca213c9cc23e..492d8140a395fef83d7a8fb2cb394ced894e2f8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_MMU_CONTEXT_H
 #define __ASM_POWERPC_MMU_CONTEXT_H
 #ifdef __KERNEL__
index 4d52ccfc23665dbc10e45166906c1b70e1a0c317..91c69ff53a8a849e12b0b5638205b331e7143687 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
  *
index effc2291beb26ec198fa535a81754bc220aff1d1..6ed9f4ccc7b9f3b1cfcdd4374271702889047d69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_MPC6xx_H
 #define __ASM_POWERPC_MPC6xx_H
 
index 03317e1e618586ebd1bb841343d9fcb08fa68c7f..fd8c5707425b5e0ce50262b80d1d8f5ce0273cab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Since there are many different boards and no standard configuration,
  * we have a unique include file for each.  Rather than change every
index 98697611e7b31d96dab31ebc26312ad9364a14fd..fad8ddd697ac464403ab8db3c009a5ffbbb54787 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_MPIC_H
 #define _ASM_POWERPC_MPIC_H
 #ifdef __KERNEL__
index 3760150a0ff0fb6964c709be983385bf48bdaecd..e97f58689ca717d756217ac43d6458a4971eced4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_NMI_H
 #define _ASM_NMI_H
 
index cc369a70f2bb3f6c03eaf4d8ae92f6aac3eb6ba5..d072139ff2e53fddfaf5b41ad2f753770a965bf3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGALLOC_32_H
 #define _ASM_POWERPC_PGALLOC_32_H
 
index 185c6a47f9bad440861d38d4842614286df5318b..cc2bfec3aa3b9b540e92c1f5008229b7351e6195 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_32_PGTABLE_H
 #define _ASM_POWERPC_NOHASH_32_PGTABLE_H
 
index 9624ebdacc47783ff5bc9654d15972084a876772..124f9ac23a1e6906779ed0744d43969260852caf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_32_PTE_40x_H
 #define _ASM_POWERPC_NOHASH_32_PTE_40x_H
 #ifdef __KERNEL__
index 0656ff81e5b050f6e9b5fe8d4c263e3bd6a66839..f812c0272364eb891f52a76e81f13b4045223e87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_32_PTE_44x_H
 #define _ASM_POWERPC_NOHASH_32_PTE_44x_H
 #ifdef __KERNEL__
index b4df2734c078142878170899b954608eb9a2d352..6dc0180fd5c7d227b9165fa96216e12d48c66a2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_32_PTE_8xx_H
 #define _ASM_POWERPC_NOHASH_32_PTE_8xx_H
 #ifdef __KERNEL__
index 5422d00c614520567ea6ba413927325fe76ee9ff..d1ee24e9e137f85e069d473862ce9487a5ab8318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
 #define _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
 #ifdef __KERNEL__
index 9f4de0a1035efb3e6d615a86f6cab1e29362d339..c40ec32b8194609665d28310708a92550779137c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_64_PGTABLE_4K_H
 #define _ASM_POWERPC_NOHASH_64_PGTABLE_4K_H
 
index 1facb584dd2962faf8ff334b9ca90e2840ee6d1a..7210c2818e41e502747d009e9780e768f27a3696 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_64_PGTABLE_64K_H
 #define _ASM_POWERPC_NOHASH_64_PGTABLE_64K_H
 
index f0ff384d4ca5fd9dba7bfcdfc533778fa8e272a9..265bbd7cba7340ba3a02ab656ae8cd8e8d8754b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_64_PGTABLE_H
 #define _ASM_POWERPC_NOHASH_64_PGTABLE_H
 /*
index b39ec956d71e87e91a2f3da8026eaad3d1c65735..0634f294943897c9f788da20fd76b512b91ab4f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_PGALLOC_H
 #define _ASM_POWERPC_NOHASH_PGALLOC_H
 
index 17989c3d9a24fdfb5835206d9833d26eb8a95864..5c68f4a59f75802d3ff98b43b951480b525daee7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_PGTABLE_H
 #define _ASM_POWERPC_NOHASH_PGTABLE_H
 
index e16807b78edf7bd218980aee68c3b8dec795fe84..2da4532ca3775ce95e4bef313d9b28d17040dd09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_NOHASH_PTE_BOOK3E_H
 #define _ASM_POWERPC_NOHASH_PTE_BOOK3E_H
 #ifdef __KERNEL__
index 0d030f9dea24a551196c2f62b0e7f2a42c929c6d..da3371fc348c78e0c2b4639dae9a914f885e849f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_OHARE_H
 #define _ASM_POWERPC_OHARE_H
 #ifdef __KERNEL__
index 6a8e1797f22320c528bc28e369fb39816eda311f..5c378e9b78c8b2a2691bf75fb649ffaf787138ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PAGE_32_H
 #define _ASM_POWERPC_PAGE_32_H
 
index 6595ad1d18cc957f251e241550af35040223271c..8abfb8f7c33dbe0c81ecc48496735b264afbec23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * parport.h: platform-specific PC-style parport initialisation
  *
index 2cedefddba37f9b916848273ca59120c71a2aacb..dce863a7635cd8d0fe5bb7e9f305017eda0a2adb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PERCPU_H_
 #define _ASM_POWERPC_PERCPU_H_
 #ifdef __powerpc64__
index 45ae1212ab8a965cf057062677f6ea429188bd55..a14203c005f1a47608ec5f842795d3bb3fbd42bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGALLOC_H
 #define _ASM_POWERPC_PGALLOC_H
 
index 67e7e3d990f44ef495ee02b6fcb3ba16053bd5c5..beb6e3e7978882770951a6bba310cef6aaedeeae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_BE_TYPES_H
 #define _ASM_POWERPC_PGTABLE_BE_TYPES_H
 
index 369a164b545c09087e0740fd6c32ea282a7b5245..cfe89a6fc308e992dc86e1a5185bbc18983e87c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_TYPES_H
 #define _ASM_POWERPC_PGTABLE_TYPES_H
 
index 7d0d38f5824376fe0c6047443afe90e59a64acf9..ab7d2d996be4d25a352a07488fc1a4aa66a9935a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PGTABLE_H
 #define _ASM_POWERPC_PGTABLE_H
 
index c7b164836bc37739a05662a5881bf31ff243576e..7f01b22fa6cb0d0895c914423a98cb2361fb2a16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_PLPAR_WRAPPERS_H
 #define _ASM_POWERPC_PLPAR_WRAPPERS_H
 
index 1330d6a58c57c630f1f429825f8331d5c718de9a..73bd8f28f2a8ac3c869fd8bf838e7507315d5934 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PMAC_PFUNC_H__
 #define __PMAC_PFUNC_H__
 
index 4ba26dd259fd8bda29707781779039e51a869005..ce142ef99ba77d18392a78b2c6ebe49d867df741 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Included from asm/pgtable-*.h only ! */
 
 /*
index f92eaf7a4c0d5b7c6a6f3748cb9d8d79caa5d2ad..b779f3ccd4126d2de2ab8303654bef44a6a2af58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Contains the definition of registers common to all PowerPC variants.
  * If a register definition has been changed in a different PowerPC
index ae16fef7a4d63ad65a3a8b259b1340f1d45fc559..53a7e2955d3e9a82939a53c05211e52719f6112e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Contains register definitions common to PowerPC 8xx CPUs.  Notice
  */
index 0e3ddf5177f655016a6aa6e27fa278c3b820cd5c..d7ccf93e627964e1517fbee2385f61e05ef73c91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Contains register definitions for the Freescale Embedded Performance
  * Monitor.
index 54e9b963876e27ea5d2e095d122572cabc1e15a2..cfb390edf7d0112f6046e85c82fecaaa82c06b6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index c1818e35cf0263b14579523013b4980828db2416..51209f6071c55d8cbacc516f00e72458ca0eb613 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SECCOMP_H
 #define _ASM_POWERPC_SECCOMP_H
 
index 7902d63588548a0cca22e7875d21f75264df49e3..82bec63bbd4f214a43b8f6094d55bb9cbbe7e376 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SECTIONS_H
 #define _ASM_POWERPC_SECTIONS_H
 #ifdef __KERNEL__
index 3a3fb0ca68f5f64ed176e20536481c810f5ff36d..257d23dbf55dce902644334280e9d72b3ff91ba8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SETUP_H
 #define _ASM_POWERPC_SETUP_H
 
index 5cda42a6d39ed411a801d7fe231216cbd1c578aa..bc0968839565a53e1f0067ad8c1cff1fcafc7dff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SHMPARAM_H
 #define _ASM_POWERPC_SHMPARAM_H
 
index 5ff77722a52d78fee044e920fa5d1646d344f9bf..0803ca8b91497ef60a2187f5f8a3d6cbb9d209b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SIGNAL_H
 #define _ASM_POWERPC_SIGNAL_H
 
index 09f98e8618696e7260a109a5ace9e982ed182b73..8dff086c0cabe6cdd53612452ff46cefa5ac9b0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SMU_H
 #define _SMU_H
 
index c88930c9db7fb1e07a7d7ad06c11db3fe00ad753..a7916ee6dfb6945a6aba6d85077362161e78fcbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SPARSEMEM_H
 #define _ASM_POWERPC_SPARSEMEM_H 1
 #ifdef __KERNEL__
index 2351adc4fdc4a7acb009dc63f623544c98bb2189..87adaf13b7e8407d90b31d49e4c7ba798150ed43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SPINLOCK_TYPES_H
 #define _ASM_POWERPC_SPINLOCK_TYPES_H
 
index cc9addefb51c781400940b4a6f8c752c1dbc3bbf..d98ac188cedb5191cc4f4dc8aaba6ddeec8b97d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_STRING_H
 #define _ASM_POWERPC_STRING_H
 
index 17c8380673a60637c61fec5772162bf0ae5523cb..bf820f53e27edda9c27b9963d0ae12140c925371 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
index 78efe8d5d77574dbb75263bc31e826af08291f32..63e7f5a1f1055480af62d6e6fcf6b9a10c453d9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_SYNCH_H 
 #define _ASM_POWERPC_SYNCH_H 
 #ifdef __KERNEL__
index 16fab68982406f1e772d92be21ee1d3ad866744e..1b90a3516a351ed23980e911f267c9c3bac12ecd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_POWERPC_SYSCALLS_H
 #define __ASM_POWERPC_SYSCALLS_H
 #ifdef __KERNEL__
index 1c9470881c4abe249fd943294c99e94f1916893b..449912f057f6372bf77e228e7cda16cf22b034f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * List of powerpc syscalls. For the meaning of the _SPU suffix see
  * arch/powerpc/platforms/cell/spu_callbacks.c
index a941cc6fc3e96c03a6b44861fa7cd86cdee26c3c..a264c3ad366b785399279858071df3afe4625aeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: PowerPC low-level thread information
  * adapted from the i386 version by Paul Mackerras
  *
index cb61eae5b7ed3309ff4dd6f91135faa3f9180bcb..926b9f91a3ef26f6fbbab910586d8ba165a0d0d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_TIMEX_H
 #define _ASM_POWERPC_TIMEX_H
 
index 82e06ca3a49b86d1c2a69607bffa83d3459ba74a..a8bc72a7f4beedc76bd5ebf63e933c3080cabb15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Transactional memory support routines to reclaim and recheckpoint
  * transactional process state.
index 2d84bca8d053e9ae6f2ca5a0ac323cb4cc10caf8..023ff9f17501faad5f5977fc7181f398525fb099 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_TOPOLOGY_H
 #define _ASM_POWERPC_TOPOLOGY_H
 #ifdef __KERNEL__
index 18f168aebae39a1f1d6a66676088a630fee5fe18..33f3b479138bc185be2811485d7f8d6492e7a4ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM powerpc
 
index 9c0e60ca166650d90e8c3d4d7d41d855f03c252a..11f4bd07cce0ee0fde57d031634a3b6d2a3b1dda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_POWERPC_UACCESS_H
 #define _ARCH_POWERPC_UACCESS_H
 
index 8296381ae43294e679976f6a82d3bb936d64921f..ce69c5eff95ecfa6bfb0958aab025542765c4bd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_UNALIGNED_H
 #define _ASM_POWERPC_UNALIGNED_H
 
index a1d112979fd2880c2b6b8e80e0b738d1f2c36250..e278299b9b3752c2d6053a0fdb8d811156791a14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * uninorth.h: definitions for using the "UniNorth" host bridge chip
  *             from Apple. This chip is used on "Core99" machines
index 3fd4545dd74e5ed911ad93fde798aa4a00762b48..5c0e082eae7bda5244f010045bd3ad956d04a40e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_USER_H
 #define _ASM_POWERPC_USER_H
 
index c53f5f6d1761f711b280c9e29509da15e6f1f4b8..b5e1f8f8a05c247abb12eb2fc9d3c229e1e12126 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PPC64_VDSO_H__
 #define __PPC64_VDSO_H__
 
index 7a7b541b74930440372fcea8c87afeb3698eb0c2..fcf721682a7119f0fa8f90560939a78d7da559c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_POWERPC_VGA_H_
 #define _ASM_POWERPC_VGA_H_
 
index 7ce2c3ac29643b9c36b94c9e385f2c06263c0920..8e903b3f9c24902cf3548704cd5dda4af3687ba2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common definitions across all variants of ICP and ICS interrupt
  * controllers.
index be6e94ecec4231dabe73ae89cb3901e29e77c9a6..7af21dc0e32094a05a07481891835c4f43f74b2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_AUXVEC_H
 #define _ASM_POWERPC_AUXVEC_H
 
index 5f1659032c408030fbc371da4ccf8fe15b4cfc6b..46ece3ecff31c2e20b1c0381c93577561af5014c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_POWERPC_BITSPERLONG_H
 #define __ASM_POWERPC_BITSPERLONG_H
 
index 6e51cf0708a13297cb737b8ec2012ce61f47d156..6728c7e24e583bfcdafd974c8cf0beb8819c456b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file describes the structure passed from the BootX application
  * (for MacOS) when it is used to boot Linux.
index ca931d0740003e71f786fcb15db16cdf53aaadb4..8ef66f7d9db9195c09945c0af28be1f2db253529 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_BYTEORDER_H
 #define _ASM_POWERPC_BYTEORDER_H
 
index 4d877144f3773b3aa4dcefd9deeb12b13bcfe136..50bcb4295de4838abe1bf7092ad8f28fae8da747 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_POWERPC_CPUTABLE_H
 #define _UAPI__ASM_POWERPC_CPUTABLE_H
 
index 291b7d1814a61beb6644b59c55cdfdfba954232f..28186071fafc44e39237a26562cdc54e013b4419 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 2, as
index b2c6fdd5ac30b8674e2d5ff6ee96b9cba51a5163..5f201d40bcca64f2e1eb48b337d84714b53fe53e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * ELF register definitions..
  *
index b4504f3944278cc408b8e8cf0591ee67fc541716..90a0ee6d0bb39bdf349f6f5014068c958169df69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * ePAPR hcall interface
  *
index e8b6b5f7de7c4b2548c6b2c39fee00f624d20036..cc79856896a192a0ef6e4b22f9c433f4c2f11103 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_ERRNO_H
 #define _ASM_POWERPC_ERRNO_H
 
index ce5c4516d40449b2f97116fcd4e88e560bd2e435..65ce08322a89b3563b017f2b356e11c386dac94a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_FCNTL_H
 #define _ASM_FCNTL_H
 
index 57d68304218b68485da2c534ea110b571c1de631..d623af4b9cd6dfcd6e88a8be6883f04f2eecf2ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_IOCTL_H
 #define _ASM_POWERPC_IOCTL_H
 
index e3b10469f787786a2c7ea3ed1013aff35ce619b3..41b1a5c1573403b7c0ceea122a37f018eab74f9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_IOCTLS_H
 #define _ASM_POWERPC_IOCTLS_H
 
index 2c3e1d94db1d04e2051570ad54f4c3122e335377..21e1e0ec0ba2ca979ccf1787034d6dc28f49d9b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_IPCBUF_H
 #define _ASM_POWERPC_IPCBUF_H
 
index 8cf8f0c96906dcb3e213524d733bc6a5aa584885..61d6049f4c1eced70ad3fef32f99b3a438da3eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 2, as
index 91e42f09b323fac3199386eb58659f00e4fcdc7f..01555c6ae0f57e86b40aebd0acd4883754fdf682 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 2, as
index 03c06ba7464f4fc47d7f5b6f0fb0057fa69d8f1c..e63bc37e33af915e9cf970f71c2e8a865f26d0aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
index dd76743c7537428cdac3969cafe592a68d49b929..65beb09425005b0452ad2fb3ccf592a442f90eea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_MSGBUF_H
 #define _ASM_POWERPC_MSGBUF_H
 
index 608bdc8aedd1ccf5816300bbd981a885d44efe2f..c92c7f056a9174f09a6357e8325710eea8200af2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * NVRAM definitions and access functions.
  *
index 319ff4a2615860ebb3d927b5d15430f0717452ce..1869cf83a870ed8d703cb2481dbc42c97626b53b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * OPAL Runtime Diagnostics interface driver
  * Supported on POWERNV platform
index 80a4d40cf5bc6a50e1a55444692f2621021122a1..ce488e48db443b99e2fec6a97670167b70afd50e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2013 Michael Ellerman, IBM Corp.
  *
index 6a93209748a15ded5f28f3106a5def0bd34236b7..9e52c86ccbd3457af7124cf559204f5973d179a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_POWERPC_PERF_REGS_H
 #define _UAPI_ASM_POWERPC_PERF_REGS_H
 
index 2958c5b97b2dd4100ac5907129b4736d94458cf7..f698400e4bb017d4eaa53a56d5958075914612b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_POSIX_TYPES_H
 #define _ASM_POWERPC_POSIX_TYPES_H
 
index e7233a849680ce4595f8b9afc345593b9431d6ce..fd7e3a0d35d5785dc2b463fe41ca7c0d59d81b5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2006 Sony Computer Entertainment Inc.
  * Copyright 2006, 2007 Sony Corporation
index 8036b385417d61d531bccbe7694468ced31371f8..5e3edc2a7634e859693191197ae600537dd145a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2001 PPC64 Team, IBM Corp
  *
index 99a41938ae3db94fe42c31e48d6c42b5c2b00d70..8f393d60f02de1505ace2df38c42e7e918c582fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_SEMBUF_H
 #define _ASM_POWERPC_SEMBUF_H
 
index ae3fb68cb28e8df5cb53f078ccc5bcc923c8231c..c54940b09d065c084d01430fdab8e652ba4ced92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_POWERPC_SETUP_H
 #define _UAPI_ASM_POWERPC_SETUP_H
 
index 8efa39698b6c8aa88a509c75d2110749164e7989..deb1c3e503d34775a097c20dda2150cf89999a60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_SHMBUF_H
 #define _ASM_POWERPC_SHMBUF_H
 
index 3ad0c7f001a952c970e8a23ce33e33ad122791f8..2fbe485acdb4952843bfcfe06bd8ab931e820433 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_SIGCONTEXT_H
 #define _ASM_POWERPC_SIGCONTEXT_H
 
index ccce3ef5cd8655a4bfbfba6e2e0153dae2651461..1a691141e49fb4e239119ac1d28f6bed4487b5c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_SIGINFO_H
 #define _ASM_POWERPC_SIGINFO_H
 
index 6c69ee94fd8d1d0bc4e7ab716ee46e45733de421..85b0a7aa43e7ef02067644c260ae2c3075547847 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_POWERPC_SIGNAL_H
 #define _UAPI_ASM_POWERPC_SIGNAL_H
 
index 3c590c7c42c074cdee7e75ddd15cc5324f369ffa..94de465e092067b168d84cf44681b0a387cf8ca9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_SOCKET_H
 #define _ASM_POWERPC_SOCKET_H
 
index ed071bf977076a494ab33fbe91af43f58c52542b..cabfcbba9eac7e2ad50abfa73937632679817d3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * SPU info structures
  *
index 84880b80cc1ce7811924ec18e68bbd75431371f6..afd25f2ff4e8d5cb8e84e742f19de6808c65c9f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_STAT_H
 #define _ASM_POWERPC_STAT_H
 /*
index b6c368aa5c05dca32011a8ebf53469285163c4ea..17b16c44d20ca0883234675f0e9c04ade382926a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
index 549d700e18f24c3e1bba536902958ab609e922bc..ed18bc61f63d4357ef3a602edc1ef7b5cbb2e7d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_TERMBITS_H
 #define _ASM_POWERPC_TERMBITS_H
 
index 6cca5cdfec042e179fd3543ea9165862f0ae5ce4..5d07fc89bcb6c77d34201c13a487efeda372e44d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Liberally adapted from alpha/termios.h.  In particular, the c_cc[]
  * fields have been reordered so that termio & termios share the
index 5047659815a54ffd69037b245eebd9f6c64a679d..e1bf0e2fac43985dd81e7cb7740f6ca8888dacb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_TM_H
 #define _ASM_POWERPC_TM_H
 
index 4b8ab990a3c1b8d1e997201d700ccbd573b7846c..327616fb70e449b589094604405c5cb7a8710747 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * This file is never included by application software unless
  * explicitly requested (e.g., via linux/types.h) in which case the
index d9a4ddf0cc8626cb3f8e7c6d6290e792ac0c42a3..6f14a96d4985573ddc07211ed2ddad3920e915f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_POWERPC_UCONTEXT_H
 #define _ASM_POWERPC_UCONTEXT_H
 
index b85f1422885746d918131216fb45fd76bb99338a..df8684f31919a7a7bda0629f93a9fdb3bca926df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * This file contains the system call numbers.
  *
index 91960f83039c816b674d0b3f07f09808a2af39cb..6c6cce937dd81bf75cf850001dd61f673412f1db 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 43ef2515648098f985ff5f7d10a66b2f6d724391..3e6c0744c174a0dc7479219b07c3b4cc26cdd68d 100644 (file)
@@ -332,7 +332,7 @@ int fix_alignment(struct pt_regs *regs)
         * when pasting to a co-processor. Furthermore, paste_last is the
         * synchronisation point for preceding copy/paste sequences.
         */
-       if ((instr & 0xfc0006fe) == PPC_INST_COPY)
+       if ((instr & 0xfc0006fe) == (PPC_INST_COPY & 0xfc0006fe))
                return -EIO;
 
        r = analyse_instr(&op, regs, instr);
index a4dab7cab3489f7685d1829bff92f7480a476a4d..a2dddd7f3d09a514fa0978f7f4721e944bca1307 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index 3f46ca1c59f90b1a918567b868bda34cc4d00b1e..6537cba1a7580621a0c629e46d2b8beeeeb7a36b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Procedures for drawing on the screen early on in the boot process.
  *
index a7b74d36acd7155f7ab03a6fe2f6d833dda0bffa..955f5e999f1b81e8faad5a653f2777b0f65912c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_CACHEINFO_H
 #define _PPC_CACHEINFO_H
 
index 108ff14e21223a0dcd91e7359356e2a602acba0a..55c6ccda0a85daa9ce41f2b2aeb063a6c998ee73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef __powerpc64__
 #include <asm/unistd.h>
 
index 8f7abf9baa63a9c6163fb25d9932fb3f036fc222..66f33e7f8d4048cf07e41371b0fdf237f9fe5ba5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corporation
  *
index 1df770e8cbe03194f31576cff264fdedbb1aa517..7275fed271afa601711b2f43b0da2c2377c68eff 100644 (file)
@@ -102,10 +102,10 @@ static void cpufeatures_flush_tlb(void)
        case PVR_POWER8:
        case PVR_POWER8E:
        case PVR_POWER8NVL:
-               __flush_tlb_power8(POWER8_TLB_SETS);
+               __flush_tlb_power8(TLB_INVAL_SCOPE_GLOBAL);
                break;
        case PVR_POWER9:
-               __flush_tlb_power9(POWER9_TLB_SETS_HASH);
+               __flush_tlb_power9(TLB_INVAL_SCOPE_GLOBAL);
                break;
        default:
                pr_err("unknown CPU version for boot TLB flush\n");
index 9e816787c0d49fd31bc153debe1235e01281a5fa..116000b4553195f44adabf2894b002fcd5e6d6e1 100644 (file)
@@ -1019,6 +1019,10 @@ int eeh_init(void)
        } else if ((ret = eeh_ops->init()))
                return ret;
 
+       /* Initialize PHB PEs */
+       list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
+               eeh_dev_phb_init_dynamic(hose);
+
        /* Initialize EEH event */
        ret = eeh_event_init();
        if (ret)
index ad04ecd63c207def1a1dbb33172c4acc933a2a39..a34e6912c15e2a027c55b3ef1802d22792cac5f9 100644 (file)
@@ -78,21 +78,3 @@ void eeh_dev_phb_init_dynamic(struct pci_controller *phb)
        /* EEH PE for PHB */
        eeh_phb_pe_create(phb);
 }
-
-/**
- * eeh_dev_phb_init - Create EEH devices for devices included in existing PHBs
- *
- * Scan all the existing PHBs and create EEH devices for their OF
- * nodes and their children OF nodes
- */
-static int __init eeh_dev_phb_init(void)
-{
-       struct pci_controller *phb, *tmp;
-
-       list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
-               eeh_dev_phb_init_dynamic(phb);
-
-       return 0;
-}
-
-core_initcall(eeh_dev_phb_init);
index 48da0f5d2f7fe0a4745bce864795df16d612a89e..1c80bd292e481d18a44dacdf6fc509497bb99a3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains the 64-bit "server" PowerPC variant
  * of the low level exception handling including exception
@@ -734,7 +735,29 @@ EXC_REAL(program_check, 0x700, 0x100)
 EXC_VIRT(program_check, 0x4700, 0x100, 0x700)
 TRAMP_KVM(PACA_EXGEN, 0x700)
 EXC_COMMON_BEGIN(program_check_common)
-       EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
+       /*
+        * It's possible to receive a TM Bad Thing type program check with
+        * userspace register values (in particular r1), but with SRR1 reporting
+        * that we came from the kernel. Normally that would confuse the bad
+        * stack logic, and we would report a bad kernel stack pointer. Instead
+        * we switch to the emergency stack if we're taking a TM Bad Thing from
+        * the kernel.
+        */
+       li      r10,MSR_PR              /* Build a mask of MSR_PR ..    */
+       oris    r10,r10,0x200000@h      /* .. and SRR1_PROGTM           */
+       and     r10,r10,r12             /* Mask SRR1 with that.         */
+       srdi    r10,r10,8               /* Shift it so we can compare   */
+       cmpldi  r10,(0x200000 >> 8)     /* .. with an immediate.        */
+       bne 1f                          /* If != go to normal path.     */
+
+       /* SRR1 had PR=0 and SRR1_PROGTM=1, so use the emergency stack  */
+       andi.   r10,r12,MSR_PR;         /* Set CR0 correctly for label  */
+                                       /* 3 in EXCEPTION_PROLOG_COMMON */
+       mr      r10,r1                  /* Save r1                      */
+       ld      r1,PACAEMERGSP(r13)     /* Use emergency stack          */
+       subi    r1,r1,INT_FRAME_SIZE    /* alloc stack frame            */
+       b 3f                            /* Jump into the macro !!       */
+1:     EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
        bl      save_nvgprs
        RECONCILE_IRQ_STATE(r10, r11)
        addi    r3,r1,STACK_FRAME_OVERHEAD
index 83dd0f6776b3e61bba5f7786db49a4e3df1b2f1b..ea065282b3035aee92f0586081d0654ee95639b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* 1. Find the index of the entry we're executing in */
        bl      invstr                          /* Find our address */
index a620203f7de33fd52b56f4ca12dc227dd24ec139..d0862a100d29b147e0242dd9d02195d2007fb501 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HEAD_BOOKE_H__
 #define __HEAD_BOOKE_H__
 
index a1854d1ded8b3d72041a1ddfff2dc97c05bb5cec..aab456ed2a0061ceada12f33dd791cf56afc43fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ppc64 "iomap" interface implementation.
  *
index 367494dc67d9e89a34ae7273b737479349987aef..bebc3007a793af02394909f47d29f30ab79c5b86 100644 (file)
@@ -600,7 +600,12 @@ NOKPROBE_SYMBOL(kprobe_fault_handler);
 
 unsigned long arch_deref_entry_point(void *entry)
 {
-       return ppc_global_function_entry(entry);
+#ifdef PPC64_ELF_ABI_v1
+       if (!kernel_text_address((unsigned long)entry))
+               return ppc_global_function_entry(entry);
+       else
+#endif
+               return (unsigned long)entry;
 }
 NOKPROBE_SYMBOL(arch_deref_entry_point);
 
index 5e5a64a8b4e4eb7c272f81bcbbc434a50de44b10..33b34a58fc62f50b9d7cb8ad1e82c6eab46bb39f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/serial.h>
 #include <linux/serial_8250.h>
index b76ca198e09c186e2d90e9b3eb83c7765c6c1cdf..72f153c6f3facea2bda06b64e90b24a6fed253d5 100644 (file)
@@ -624,5 +624,18 @@ long __machine_check_early_realmode_p8(struct pt_regs *regs)
 
 long __machine_check_early_realmode_p9(struct pt_regs *regs)
 {
+       /*
+        * On POWER9 DD2.1 and below, it's possible to get a machine check
+        * caused by a paste instruction where only DSISR bit 25 is set. This
+        * will result in the MCE handler seeing an unknown event and the kernel
+        * crashing. An MCE that occurs like this is spurious, so we don't need
+        * to do anything in terms of servicing it. If there is something that
+        * needs to be serviced, the CPU will raise the MCE again with the
+        * correct DSISR so that it can be serviced properly. So detect this
+        * case and mark it as handled.
+        */
+       if (SRR1_MC_LOADSTORE(regs->msr) && regs->dsisr == 0x02000000)
+               return 1;
+
        return mce_handle_error(regs, mce_p9_derror_table, mce_p9_ierror_table);
 }
index 6f8273f5e988b2cca6f320299ca6c67445ebca66..91e037ab20a197de398161c057d86bffabc3a68a 100644 (file)
@@ -104,8 +104,10 @@ static unsigned long can_optimize(struct kprobe *p)
         * and that can be emulated.
         */
        if (!is_conditional_branch(*p->ainsn.insn) &&
-                       analyse_instr(&op, &regs, *p->ainsn.insn))
+                       analyse_instr(&op, &regs, *p->ainsn.insn) == 1) {
+               emulate_update_regs(&regs, &op);
                nip = regs.nip;
+       }
 
        return nip;
 }
index 6295e646f78cca6a204d4becdb2ec7d8ccdfde40..9cb7f88df563b52aa6dd8f7594dd8cddeb14b92b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef DEBUG
 
 #include <linux/kernel.h>
index 07cd22e354053597d990bf57457164bbb6f02b9c..f52ad5bb710960906b8ae61400688845e2811dd5 100644 (file)
@@ -131,7 +131,7 @@ static void flush_tmregs_to_thread(struct task_struct *tsk)
         * in the appropriate thread structures from live.
         */
 
-       if (tsk != current)
+       if ((!cpu_has_feature(CPU_FTR_TM)) || (tsk != current))
                return;
 
        if (MSR_TM_SUSPENDED(mfmsr())) {
index df56dfc4b6815bc4c1a44ed156ef0543793cd46b..c8c5f3a550c26c8f0cf44b3c1a2b32b5d6f9baf2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *   Copyright (C) 2000 Tilmann Bitterberg
  *   (tilmann@bitterberg.de)
index c57c19358a263941e1053465c25539e48fec8cdb..49600985c7ef04cb115eeecb9450798b103dc740 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/time.h>
 #include <linux/timer.h>
index 0ac741fae90ea5c1cffc227323fe40cbb5319188..2e3bc16d02b289b5d03906010518bc7005233452 100644 (file)
@@ -904,9 +904,6 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
-#ifdef CONFIG_PPC_64K_PAGES
-       init_mm.context.pte_frag = NULL;
-#endif
 #ifdef CONFIG_SPAPR_TCE_IOMMU
        mm_iommu_init(&init_mm);
 #endif
index c83c115858c1909218c5897a23f15f0bbd7b10ed..b2c002993d78d340db6ef882d5eeec6692577475 100644 (file)
@@ -452,9 +452,20 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
        if (MSR_TM_RESV(msr))
                return -EINVAL;
 
-       /* pull in MSR TM from user context */
+       /* pull in MSR TS bits from user context */
        regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
 
+       /*
+        * Ensure that TM is enabled in regs->msr before we leave the signal
+        * handler. It could be the case that (a) user disabled the TM bit
+        * through the manipulation of the MSR bits in uc_mcontext or (b) the
+        * TM bit was disabled because a sufficient number of context switches
+        * happened whilst in the signal handler and load_tm overflowed,
+        * disabling the TM bit. In either case we can end up with an illegal
+        * TM state leading to a TM Bad Thing when we return to userspace.
+        */
+       regs->msr |= MSR_TM;
+
        /* pull in MSR LE from user context */
        regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
 
index 7a37ecd3afa3b211202ddcfbdfe382f6ce5d4995..21c39355b25e1b382e557a42f3926baf0cf0e8fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Smp timebase synchronization for ppc.
  *
index ba4dee3d233fe8ad8aee6fc226c43978f4c6731a..34b73a262709c1f9d478d2b24f832ddf14169f0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/threads.h>
 #include <asm/processor.h>
 #include <asm/page.h>
index 553c1405ee05774b49f355a7c3bfcedc1e7a69f9..88cfdbd530f163bb64b81747eaf41972291912e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Based on swsusp_32.S, modified for FSL BookE by
  * Anton Vorontsov <avorontsov@ru.mvista.com>
index a753b72efbc0ce319f6d0a0d3e2d191030d7a84f..a3374e8a258c683ce053adf306d9343e877ad8ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * temp.c      Thermal management for cpu's with Thermal Assist Units
  *
index c4ba37822ba0ea01228d546fe7365b5ca79e987c..1da12f521cb7474780a3c78c7f0bc2a4f55edaeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Transactional memory support routines to reclaim and recheckpoint
  * transactional process state.
index 729dffc5f7bcc683c65689dacf1594e3f8b3b024..d22d8bafb6434cab546d17cf2c6aa5f04a79eea3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the powerpc trace subsystem
 #
index 32509de6ce4cef280b4b270c270a027d5dda6500..4741fe112f05f8c67f8d6447918a91926144d1aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Code for replacing ftrace calls with jumps.
  *
index c98e90b4ea7b1f15a2dd7157300376e370774cf2..b4e2b7165f79b0d45da686ea8fe77da4dca109ca 100644 (file)
@@ -181,34 +181,25 @@ _GLOBAL(ftrace_stub)
         *  - we have no stack frame and can not allocate one
         *  - LR points back to the original caller (in A)
         *  - CTR holds the new NIP in C
-        *  - r0 & r12 are free
-        *
-        * r0 can't be used as the base register for a DS-form load or store, so
-        * we temporarily shuffle r1 (stack pointer) into r0 and then put it back.
+        *  - r0, r11 & r12 are free
         */
 livepatch_handler:
        CURRENT_THREAD_INFO(r12, r1)
 
-       /* Save stack pointer into r0 */
-       mr      r0, r1
-
        /* Allocate 3 x 8 bytes */
-       ld      r1, TI_livepatch_sp(r12)
-       addi    r1, r1, 24
-       std     r1, TI_livepatch_sp(r12)
+       ld      r11, TI_livepatch_sp(r12)
+       addi    r11, r11, 24
+       std     r11, TI_livepatch_sp(r12)
 
        /* Save toc & real LR on livepatch stack */
-       std     r2,  -24(r1)
+       std     r2,  -24(r11)
        mflr    r12
-       std     r12, -16(r1)
+       std     r12, -16(r11)
 
        /* Store stack end marker */
        lis     r12, STACK_END_MAGIC@h
        ori     r12, r12, STACK_END_MAGIC@l
-       std     r12, -8(r1)
-
-       /* Restore real stack pointer */
-       mr      r1, r0
+       std     r12, -8(r11)
 
        /* Put ctr in r12 for global entry and branch there */
        mfctr   r12
@@ -216,36 +207,30 @@ livepatch_handler:
 
        /*
         * Now we are returning from the patched function to the original
-        * caller A. We are free to use r0 and r12, and we can use r2 until we
+        * caller A. We are free to use r11, r12 and we can use r2 until we
         * restore it.
         */
 
        CURRENT_THREAD_INFO(r12, r1)
 
-       /* Save stack pointer into r0 */
-       mr      r0, r1
-
-       ld      r1, TI_livepatch_sp(r12)
+       ld      r11, TI_livepatch_sp(r12)
 
        /* Check stack marker hasn't been trashed */
        lis     r2,  STACK_END_MAGIC@h
        ori     r2,  r2, STACK_END_MAGIC@l
-       ld      r12, -8(r1)
+       ld      r12, -8(r11)
 1:     tdne    r12, r2
        EMIT_BUG_ENTRY 1b, __FILE__, __LINE__ - 1, 0
 
        /* Restore LR & toc from livepatch stack */
-       ld      r12, -16(r1)
+       ld      r12, -16(r11)
        mtlr    r12
-       ld      r2,  -24(r1)
+       ld      r2,  -24(r11)
 
        /* Pop livepatch stack frame */
-       CURRENT_THREAD_INFO(r12, r0)
-       subi    r1, r1, 24
-       std     r1, TI_livepatch_sp(r12)
-
-       /* Restore real stack pointer */
-       mr      r1, r0
+       CURRENT_THREAD_INFO(r12, r1)
+       subi    r11, r11, 24
+       std     r11, TI_livepatch_sp(r12)
 
        /* Return to original caller of live patched function */
        blr
index ec74e203ee04e5b8e7e307df28c133b6226cd487..13c9dcdcba6922e32d4c00267201f47e9498f805 100644 (file)
@@ -437,6 +437,7 @@ static inline int check_io_access(struct pt_regs *regs)
 int machine_check_e500mc(struct pt_regs *regs)
 {
        unsigned long mcsr = mfspr(SPRN_MCSR);
+       unsigned long pvr = mfspr(SPRN_PVR);
        unsigned long reason = mcsr;
        int recoverable = 1;
 
@@ -478,8 +479,15 @@ int machine_check_e500mc(struct pt_regs *regs)
                 * may still get logged and cause a machine check.  We should
                 * only treat the non-write shadow case as non-recoverable.
                 */
-               if (!(mfspr(SPRN_L1CSR2) & L1CSR2_DCWS))
-                       recoverable = 0;
+               /* On e6500 core, L1 DCWS (Data cache write shadow mode) bit
+                * is not implemented but L1 data cache always runs in write
+                * shadow mode. Hence on data cache parity errors HW will
+                * automatically invalidate the L1 Data Cache.
+                */
+               if (PVR_VER(pvr) != PVR_VER_E6500) {
+                       if (!(mfspr(SPRN_L1CSR2) & L1CSR2_DCWS))
+                               recoverable = 0;
+               }
        }
 
        if (reason & MCSR_L2MMU_MHIT) {
index 78a7449bf489d49a400ae45703ce77bdc7206f4b..b8c434d1d45917aa3900d9fc89156d2f44781a36 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 # List of files in the vdso, has to be asm only for now
 
index e58ee10fa5c0a41efbacaa9f10bc03665d18b8fb..099a6db14e671f81ba3d9c5c07c550d8a544454d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is the infamous ld script for the 32 bits vdso
  * library
index 6ac107ac402a93ffcabb5f0cd365132f922fe88d..3f5ef035b0a981459385a36abbcd254ae1f80edd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/page.h>
 
index 31107bf5a61f85ea118ae36900bc2c627f432161..69cecb3462697a88107d8e966e2775fafe81628a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # List of files in the vdso, has to be asm only for now
 
 obj-vdso64 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o getcpu.o
index 64fb183a47c2fff07bc385489db33bdc5c7799e3..256fb972029871cc6c16e46a58b3652c4fbf9f8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is the infamous ld script for the 64 bits vdso
  * library
index df60fca6a13d1eb745612e78c0be86a32fb78c45..1d56d81fe3b39a85fd84f622068c0a3c241a47c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/page.h>
 
index 2d8f6d8ccafca2d0bf4905ae4370d669ead9eaa1..8812085883fdb55a6b055801b8307206c65678aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Routines to emulate some Altivec/VMX instructions, specifically
  * those that can trap when given denormalized operands in Java mode.
index 0c123f3406cd0b19fc9bd8f08f6b6aeecd7235da..f314fd475491c35437da4ae392aed93ca7274d7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/processor.h>
 #include <asm/ppc_asm.h>
 #include <asm/reg.h>
index 882628fa6987cfdf161aa3afee565a67f03765f8..0494e1566ee2ab9b976cb0d9edb8c195a4490a23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_PPC64
 #define PROVIDE32(x)   PROVIDE(__unused__##x)
 #else
index 2f6eadd9408d9490b171ca20f937c1af79096acd..57190f384f633e75170cff96dffc26fa540ef976 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Watchdog support on powerpc systems.
  *
@@ -310,9 +311,6 @@ static int start_wd_on_cpu(unsigned int cpu)
        if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
                return 0;
 
-       if (watchdog_suspended)
-               return 0;
-
        if (!cpumask_test_cpu(cpu, &watchdog_cpumask))
                return 0;
 
@@ -358,36 +356,39 @@ static void watchdog_calc_timeouts(void)
        wd_timer_period_ms = watchdog_thresh * 1000 * 2 / 5;
 }
 
-void watchdog_nmi_reconfigure(void)
+void watchdog_nmi_stop(void)
 {
        int cpu;
 
-       watchdog_calc_timeouts();
-
        for_each_cpu(cpu, &wd_cpus_enabled)
                stop_wd_on_cpu(cpu);
+}
 
+void watchdog_nmi_start(void)
+{
+       int cpu;
+
+       watchdog_calc_timeouts();
        for_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask)
                start_wd_on_cpu(cpu);
 }
 
 /*
- * This runs after lockup_detector_init() which sets up watchdog_cpumask.
+ * Invoked from core watchdog init.
  */
-static int __init powerpc_watchdog_init(void)
+int __init watchdog_nmi_probe(void)
 {
        int err;
 
-       watchdog_calc_timeouts();
-
-       err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "powerpc/watchdog:online",
-                               start_wd_on_cpu, stop_wd_on_cpu);
-       if (err < 0)
+       err = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
+                                       "powerpc/watchdog:online",
+                                       start_wd_on_cpu, stop_wd_on_cpu);
+       if (err < 0) {
                pr_warn("Watchdog could not be initialized");
-
+               return err;
+       }
        return 0;
 }
-arch_initcall(powerpc_watchdog_init);
 
 static void handle_backtrace_ipi(struct pt_regs *regs)
 {
index 0c52cb5d43f52bdba5008ccade5edfd2b4fee5f4..b12b8eb39c29785a755d608cc2649ea7f3f1017f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index 381a6ec0ff3b72ab085834fc14a35e853b237fc6..85ba80de713330e78fa48617ef26fc24658689f6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Kernel-based Virtual Machine module
 #
index 8f2da8bba737b066488a5c0b3909a02ede239ba6..4dffa611376d67850ac4ef8730a547fcccf63491 100644 (file)
@@ -478,28 +478,30 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
                return ret;
 
        dir = iommu_tce_direction(tce);
+
+       idx = srcu_read_lock(&vcpu->kvm->srcu);
+
        if ((dir != DMA_NONE) && kvmppc_gpa_to_ua(vcpu->kvm,
-                       tce & ~(TCE_PCI_READ | TCE_PCI_WRITE), &ua, NULL))
-               return H_PARAMETER;
+                       tce & ~(TCE_PCI_READ | TCE_PCI_WRITE), &ua, NULL)) {
+               ret = H_PARAMETER;
+               goto unlock_exit;
+       }
 
        entry = ioba >> stt->page_shift;
 
        list_for_each_entry_lockless(stit, &stt->iommu_tables, next) {
-               if (dir == DMA_NONE) {
+               if (dir == DMA_NONE)
                        ret = kvmppc_tce_iommu_unmap(vcpu->kvm,
                                        stit->tbl, entry);
-               } else {
-                       idx = srcu_read_lock(&vcpu->kvm->srcu);
+               else
                        ret = kvmppc_tce_iommu_map(vcpu->kvm, stit->tbl,
                                        entry, ua, dir);
-                       srcu_read_unlock(&vcpu->kvm->srcu, idx);
-               }
 
                if (ret == H_SUCCESS)
                        continue;
 
                if (ret == H_TOO_HARD)
-                       return ret;
+                       goto unlock_exit;
 
                WARN_ON_ONCE(1);
                kvmppc_clear_tce(stit->tbl, entry);
@@ -507,7 +509,10 @@ long kvmppc_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
 
        kvmppc_tce_put(stt, entry, tce);
 
-       return H_SUCCESS;
+unlock_exit:
+       srcu_read_unlock(&vcpu->kvm->srcu, idx);
+
+       return ret;
 }
 EXPORT_SYMBOL_GPL(kvmppc_h_put_tce);
 
index 5b81a807d742c8b11018ead176b60590064f5d7f..174d75e476fa388019714d2cb572d84106cc3c21 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/kvm_host.h>
 #include <linux/err.h>
index 17936f82d3c787c38327f41186f634d043d843a9..42639fba89e881c12e0d9ba5af3bfa1139565688 100644 (file)
@@ -989,13 +989,14 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_ARCH_300)
        beq     no_xive
        ld      r11, VCPU_XIVE_SAVED_STATE(r4)
        li      r9, TM_QW1_OS
-       stdcix  r11,r9,r10
        eieio
+       stdcix  r11,r9,r10
        lwz     r11, VCPU_XIVE_CAM_WORD(r4)
        li      r9, TM_QW1_OS + TM_WORD2
        stwcix  r11,r9,r10
        li      r9, 1
        stw     r9, VCPU_XIVE_PUSHED(r4)
+       eieio
 no_xive:
 #endif /* CONFIG_KVM_XICS */
 
@@ -1121,6 +1122,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 BEGIN_FTR_SECTION
        mtspr   SPRN_PPR, r0
 END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
+
+/* Move canary into DSISR to check for later */
+BEGIN_FTR_SECTION
+       li      r0, 0x7fff
+       mtspr   SPRN_HDSISR, r0
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
+
        ld      r0, VCPU_GPR(R0)(r4)
        ld      r4, VCPU_GPR(R4)(r4)
 
@@ -1303,6 +1311,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
        bne     3f
 BEGIN_FTR_SECTION
        PPC_MSGSYNC
+       lwsync
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
        lbz     r0, HSTATE_HOST_IPI(r13)
        cmpwi   r0, 0
@@ -1393,8 +1402,8 @@ guest_exit_cont:          /* r9 = vcpu, r12 = trap, r13 = paca */
        cmpldi  cr0, r10, 0
        beq     1f
        /* First load to pull the context, we ignore the value */
-       lwzx    r11, r7, r10
        eieio
+       lwzx    r11, r7, r10
        /* Second load to recover the context state (Words 0 and 1) */
        ldx     r11, r6, r10
        b       3f
@@ -1402,8 +1411,8 @@ guest_exit_cont:          /* r9 = vcpu, r12 = trap, r13 = paca */
        cmpldi  cr0, r10, 0
        beq     1f
        /* First load to pull the context, we ignore the value */
-       lwzcix  r11, r7, r10
        eieio
+       lwzcix  r11, r7, r10
        /* Second load to recover the context state (Words 0 and 1) */
        ldcix   r11, r6, r10
 3:     std     r11, VCPU_XIVE_SAVED_STATE(r9)
@@ -1413,6 +1422,7 @@ guest_exit_cont:          /* r9 = vcpu, r12 = trap, r13 = paca */
        stw     r10, VCPU_XIVE_PUSHED(r9)
        stb     r10, (VCPU_XIVE_SAVED_STATE+3)(r9)
        stb     r0, (VCPU_XIVE_SAVED_STATE+4)(r9)
+       eieio
 1:
 #endif /* CONFIG_KVM_XICS */
        /* Save more register state  */
@@ -1956,9 +1966,14 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX)
 kvmppc_hdsi:
        ld      r3, VCPU_KVM(r9)
        lbz     r0, KVM_RADIX(r3)
-       cmpwi   r0, 0
        mfspr   r4, SPRN_HDAR
        mfspr   r6, SPRN_HDSISR
+BEGIN_FTR_SECTION
+       /* Look for DSISR canary. If we find it, retry instruction */
+       cmpdi   r6, 0x7fff
+       beq     6f
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
+       cmpwi   r0, 0
        bne     .Lradix_hdsi            /* on radix, just save DAR/DSISR/ASDR */
        /* HPTE not found fault or protection fault? */
        andis.  r0, r6, (DSISR_NOHPTE | DSISR_PROTFAULT)@h
@@ -2776,6 +2791,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
        PPC_MSGCLR(6)
        /* see if it's a host IPI */
        li      r3, 1
+BEGIN_FTR_SECTION
+       PPC_MSGSYNC
+       lwsync
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
        lbz     r0, HSTATE_HOST_IPI(r13)
        cmpwi   r0, 0
        bnelr
index 13304622ab1c78682fa18f06120f5eb0970f57fb..bf457843e03217b9aa02815d7791f0fce72aea2b 100644 (file)
@@ -622,7 +622,7 @@ int kvmppc_xive_get_xive(struct kvm *kvm, u32 irq, u32 *server,
                return -EINVAL;
        state = &sb->irq_state[idx];
        arch_spin_lock(&sb->lock);
-       *server = state->guest_server;
+       *server = state->act_server;
        *priority = state->guest_priority;
        arch_spin_unlock(&sb->lock);
 
@@ -1331,7 +1331,7 @@ static int xive_get_source(struct kvmppc_xive *xive, long irq, u64 addr)
        xive->saved_src_count++;
 
        /* Convert saved state into something compatible with xics */
-       val = state->guest_server;
+       val = state->act_server;
        prio = state->saved_scan_prio;
 
        if (prio == MASKED) {
@@ -1507,7 +1507,6 @@ static int xive_set_source(struct kvmppc_xive *xive, long irq, u64 addr)
        /* First convert prio and mark interrupt as untargetted */
        act_prio = xive_prio_from_guest(guest_prio);
        state->act_priority = MASKED;
-       state->guest_server = server;
 
        /*
         * We need to drop the lock due to the mutex below. Hopefully
index 5938f7644dc17587dc811132459cf8b71425856a..6ba63f8e8a614ed4aad2a5890236834f3e08c0a7 100644 (file)
@@ -35,7 +35,6 @@ struct kvmppc_xive_irq_state {
        struct xive_irq_data *pt_data;  /* XIVE Pass-through associated data */
 
        /* Targetting as set by guest */
-       u32 guest_server;               /* Current guest selected target */
        u8 guest_priority;              /* Guest set priority */
        u8 saved_priority;              /* Saved priority when masking */
 
index 3f1be85a83bcf94424d7957c651f217c4ef47433..e6463f866abc24bdc1a1f1e04e3c0b6333fbdedc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IRQ_H
 #define __IRQ_H
 
index 3480faaf1ef886118ba1ee26389ea25c4c3d8a69..ee279c7f48021e0b43c658d7529b9160061b5415 100644 (file)
@@ -644,8 +644,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                break;
 #endif
        case KVM_CAP_PPC_HTM:
-               r = cpu_has_feature(CPU_FTR_TM_COMP) &&
-                   is_kvmppc_hv_enabled(kvm);
+               r = cpu_has_feature(CPU_FTR_TM_COMP) && hv_enabled;
                break;
        default:
                r = 0;
index 2e0e67ef3544fd662dc7cb71b325311a0099b3d0..491b0f715d6bc2c345850645f2dbcd4700f6f182 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_H
 
index f647ce0f428b24d4e24cfe488557d865895818a9..f3b23759e0172f7643ce849b186ec2b19ca03d3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_BOOK3S_H)
 #define _TRACE_KVM_BOOK3S_H
 
index 7ec534d1db9f4ecf1f71a0a3cc4639657ae5a7c0..ac640e81fdc5f43709858ad8b3dd5ec2eee58a8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_BOOKE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_BOOKE_H
 
index ebc6dd449556f56aacb1cbfe6f0af785eff283b0..bcfe8a987f6a977e65f2e9c7a02962a7099c2a66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_HV_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_HV_H
 
index d44f324184fb77974121258c61f3b658d699af09..85785a370c0ea54e1d27c90ca8325d173cb2dde9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #if !defined(_TRACE_KVM_PR_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_PR_H
index 50d5bf954cff3ef158854ef53dc67d2934e80dcb..c66c3626a2161367dcd7056ae832f7547c1675d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ppc-specific library files..
 #
index a58abe4afbd17e3f1cf52046967a695075f1215e..06796dec01ea563346aaf551d8684f07d07d069e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/slab.h>
index fb9f58b868e76ef0692e45fe874b6546cf74de37..f208f560aecd086b579ace960a78f25123974abd 100644 (file)
@@ -944,9 +944,9 @@ NOKPROBE_SYMBOL(emulate_dcbz);
                : "r" (addr), "i" (-EFAULT), "0" (err))
 
 static nokprobe_inline void set_cr0(const struct pt_regs *regs,
-                                   struct instruction_op *op, int rd)
+                                   struct instruction_op *op)
 {
-       long val = regs->gpr[rd];
+       long val = op->val;
 
        op->type |= SETCC;
        op->ccval = (regs->ccr & 0x0fffffff) | ((regs->xer >> 3) & 0x10000000);
@@ -1326,7 +1326,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
        case 13:        /* addic. */
                imm = (short) instr;
                add_with_carry(regs, op, rd, regs->gpr[ra], imm, 0);
-               set_cr0(regs, op, rd);
+               set_cr0(regs, op);
                return 1;
 
        case 14:        /* addi */
@@ -1397,13 +1397,13 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
 
        case 28:        /* andi. */
                op->val = regs->gpr[rd] & (unsigned short) instr;
-               set_cr0(regs, op, ra);
+               set_cr0(regs, op);
                goto logical_done_nocc;
 
        case 29:        /* andis. */
                imm = (unsigned short) instr;
                op->val = regs->gpr[rd] & (imm << 16);
-               set_cr0(regs, op, ra);
+               set_cr0(regs, op);
                goto logical_done_nocc;
 
 #ifdef __powerpc64__
@@ -1513,10 +1513,10 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
                        op->type = COMPUTE + SETCC;
                        imm = 0xf0000000UL;
                        val = regs->gpr[rd];
-                       op->val = regs->ccr;
+                       op->ccval = regs->ccr;
                        for (sh = 0; sh < 8; ++sh) {
                                if (instr & (0x80000 >> sh))
-                                       op->val = (op->val & ~imm) |
+                                       op->ccval = (op->ccval & ~imm) |
                                                (val & imm);
                                imm >>= 4;
                        }
@@ -1651,8 +1651,9 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
                        goto arith_done;
 
                case 235:       /* mullw */
-                       op->val = (unsigned int) regs->gpr[ra] *
-                               (unsigned int) regs->gpr[rb];
+                       op->val = (long)(int) regs->gpr[ra] *
+                               (int) regs->gpr[rb];
+
                        goto arith_done;
 
                case 266:       /* add */
@@ -1683,11 +1684,13 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
  * Logical instructions
  */
                case 26:        /* cntlzw */
-                       op->val = __builtin_clz((unsigned int) regs->gpr[rd]);
+                       val = (unsigned int) regs->gpr[rd];
+                       op->val = ( val ? __builtin_clz(val) : 32 );
                        goto logical_done;
 #ifdef __powerpc64__
                case 58:        /* cntlzd */
-                       op->val = __builtin_clzl(regs->gpr[rd]);
+                       val = regs->gpr[rd];
+                       op->val = ( val ? __builtin_clzl(val) : 64 );
                        goto logical_done;
 #endif
                case 28:        /* and */
@@ -2526,7 +2529,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
 
  logical_done:
        if (instr & 1)
-               set_cr0(regs, op, ra);
+               set_cr0(regs, op);
  logical_done_nocc:
        op->reg = ra;
        op->type |= SETREG;
@@ -2534,7 +2537,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
 
  arith_done:
        if (instr & 1)
-               set_cr0(regs, op, rd);
+               set_cr0(regs, op);
  compute_done:
        op->reg = rd;
        op->type |= SETREG;
index 4746708451ae5162361635f33805efb332d512a8..5c2b0839b1794018bd05b66c4ab31f79c84addd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Simple interface to link xor_vmx.c and xor_vmx_glue.c
  *
index 1b46ab4f64178786a6c68024b18c04eb385858e0..494df26c59885b97fd648ccc2e26a921570d6b69 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 math-emu-common-objs = math.o fre.o fsqrt.o fsqrts.o frsqrtes.o mtfsf.o mtfsfi.o
 obj-$(CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED) += $(math-emu-common-objs)
 obj-$(CONFIG_MATH_EMULATION_FULL) += $(math-emu-common-objs) fabs.o fadd.o \
index a5e7ad1384ee99f21419267680d851eccbf435d1..3b62fd70b77e7fd416c14694942287f3b7d7cfd4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 29de37e0e0da4390216c2274b528067a3391b4d0..727e49ad55d132da0affdf4713ffeb949f3d855e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 7093c5b580022692b68bff295f9538be7aa85a4a..45254be056623887f9810d74db3326f1a319f5b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 5d644467221cc9109e9937796dd3eb8a00d21dbd..f437d0896c59e658fd5f460edbe0876eb9daab80 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 0f9bf4864832d4269c7d3431c24f2c973e2cc990..65631fa5dc3945b38ebae7e2447746dc7c8f1029 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 716d6da7f2044494d19de0de547997242b1f19c9..ebb0f11e735ea743984df15be7ec9d6d728db750 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 7212fa7cfd3685d0622dd85280bd46271cf4072a..426271c4f004920421e9edf3670000c67ec4ad91 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index e1e452069e49836f118b197283e3fc478ee37431..6e64ece2d39566b481365ac83e6ba75077298d62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 5511e2d1c3ad9712103a6d50511a0c239d8ddb44..f9f7adf46262384ac789389072bd27708a69d6b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 2b6fae0bc8c2cdb1fc4cdddefdab171ff414bd08..e8458aed5edb2944b232c107c36dcdf283450890 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index aff35f24a23665f546ac793773110ab0ff1e9e9a..a6d3f9842f1957c224db25dd04a22214567e4b62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index f6347911f6a35951ff6834068f082487e70db762..48c64374286effd0f38506517f0691ecd3d0059b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 1fb26cebe04e612901897cefd15a8e595b126364..605cda49e7b26cbebf25f7acec138bd1014e0b59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index f73965453e0593c06600883993db0e8476e4ef11..f26ec0acf0a5c48b30f1f4a67563bfb400bf5514 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index ffd31b549290bb44c17d6e40fb40818b6bb055d6..d114f7acdbb14632e84cdd716aa7c9d007abadbc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 21aee431ca9de1ad2e80d9625b7c4f9e205fbd2b..aaeba0acb47f7ca62f1ffc84b2608966a44cb055 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index af877a53d264ef8e12c074a8b1f3b9d7621410aa..6c439e6c2c5872d125fd38973b2d839eb0548679 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 8417d174758cf101e97463aa36f7bb58d6359fa3..791e724f712fe7955f15e35f82a438abd6460f42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 6316ef0e087423b8bceaa39143583f2793980a28..02a7099b26af4fa7123325376706ce7870a8eb61 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 9ffe037df2b955614a66689333edf71f5b174ccb..ce42a7a44d2e54c71ecbbd7bf3353228a83db38f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index f97a9cfb54ea1c56a3c7a50a1a01b213fa77d6c6..eade699c51d5a3d7867673753f6f224dd7ccccab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 7fa1217bd930fce3788a6b0bff8e745b502561b6..4e1f6c2b7c402a4f748ea20758f71d80319d3655 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index b621a790aa67dbb10eb7c293b3803aa3e70b1c2c..584b16f53304c3605fd027ba403f7c88268f0900 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 211c30d0145f6674f75e8841e31e2130f7852fb8..f7d5654ce7d69c2e644897745bd3bab27bad84e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 3e3bc73e27aeddbd8ec521e71dd101020aeb46b7..cb33e3d9bbb2d8b8e806e986172e58385ec4218d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 7c2ce43750dc14e5efb803385a08e98d45ae3455..72955b27c3caedd50a1b352508601ca434fc2795 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 269951a8c65078c1fc00ab553247df6b0b173126..a036f7b7140c59a5bc3b477c37ff7341b709b2bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 32b62c6c7f489f5b9a53644116402499155ecc2c..b0d15e15a5d3920d858a9c199b3863849692b81c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 0e2a34b616dccfa38a66e6e18a4d95c8da70de69..05438590388e874d6c1871d8c6f951bcf63e65e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 420cf19b5fd47b16c2102fe4e9fb3b3361a031e0..1624f97c69cc8c5c9b526b45abcef7a5e5745c13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index feedd705cf629c49f5a25f78493a657260098038..47a8f847b4223fa635633ecbbed3bd8f9369e650 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 74190514063ea4e8225ffa7e0f3ed40c85fa93f5..fa1b3b18c379d1825b9e2517effd5101b8d6356e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index d998a50740a0a5418fe8c11c0d4c51e1a41a76e6..3a6b03d999ab6eb77375af7bbbdbeb5642381bc6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 1ee10b83d7e344926177c9dd839e4801ace7035e..7fd3d0854cd828181a97a772b7cae5f54fc23ff8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 76ee2e5dba65a24c658a2938a6189536edf37056..30b4b69c694198dc557d5262d5dba7cd0308ec30 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1999  Eddie C. Dost  (ecd@atecom.com)
  */
index 8e8e72397ebc1be41deef8504138bdc44a817dff..9c4fdaace475b9daa66d738ab850bcb789bb4337 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index e00fdc22a0bc294605ba5fc5f63bbad623cdd552..d42f1278e9587995a1a02239c105f8c7fd65b298 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 5ed3e7d5063e0bfe32ad4f10b6a6ada84f9b93cc..5753170b5dfd8ead92f7795802bc34d9d9c82beb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 602aa16eda81990b8cf1718dcb6ddcabbffc38ac..8162c3bfd149a526f475d793616b63cf960ad1db 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index b0d5593ad357d61401c28809f243c474cac78038..7ae990f6b58b5bfae3baa819f7eb699d1ea95c2e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 5df30541a7848cd7c6015aad5e92022def99c7d9..45f1edbda3570c61bc33c220a9af71392800ce62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 6baeaec134a2719a51457151ec94a952cf861be3..463d2f0832d9e89541a5f7cb027c480dbfa663b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 9da7c5d1a872f3c4f4559204dded0c1334d591d2..24ae9622fed6d4d06bd2339bdfadc5c24d68e80a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 62bd25264fb5548bd27b697b6f4ebc64b1900125..ddf9bbdb5b5530af887dd89d51cbdbb3d74ba0d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/uaccess.h>
index 6172044ab00339768dc41c69613ffbccb829ae40..1e52633dcbb7d83042556f2d297147a73d8af95f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* This has so very few changes over libgcc2's __udivmoddi4 it isn't funny.  */
 
 #include <math-emu/soft-fp.h>
index fb844d2f266e1666aa91199b16fc5bad7972eaed..a0c327d544d15a509a71ca6b2d56570577e7ede2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
index e292c8a609523bd30e860f5e1a469872389e7421..668e87d03f9e0823d25205eade2a3213fe3f29df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * highmem.c: virtual kernel memory mappings for high memory
  *
index bfe4e8526b2d560d2ce92e79cd708e68529bbfe5..f84ec46cdb26f8851d7790e4f998ba553e03d922 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PPC Huge TLB Page Support for Book3E MMU
  *
index a84bb44497f90571510e387a9402deea7517a73b..0c2a91df3210e23b24c1657b3cf722242b6e206c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PPC64 Huge TLB Page Support for hash based MMUs (POWER4 and later)
  *
index a12e86395025f9c7fcdb8a12c76ae642a1ef7cb8..558e9d3891bfc80b2ae520026c55b09916f0aaa8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/hugetlb.h>
 #include <asm/pgtable.h>
index b95c584ce19d33b658a9a546ecb3de64ff93d23a..a51df9ef529d9356cb54c75721510e50cfa69b8d 100644 (file)
@@ -1438,7 +1438,6 @@ out:
 
 int arch_update_cpu_topology(void)
 {
-       lockdep_assert_cpus_held();
        return numa_update_cpu_topology(true);
 }
 
index 65eda1997c3f8750c899294bc1d9bb15215d9426..f6c7f54c05157e226c5426798b6fa0f379f8becb 100644 (file)
@@ -361,9 +361,9 @@ static int change_page_attr(struct page *page, int numpages, pgprot_t prot)
                        break;
        }
        wmb();
+       local_irq_restore(flags);
        flush_tlb_kernel_range((unsigned long)page_address(start),
                               (unsigned long)page_address(page));
-       local_irq_restore(flags);
        return err;
 }
 
index b3e849c4886e66c883451a59fe603e04132c00c0..d304028641a23377d57b20d102407eff6f566523 100644 (file)
@@ -360,12 +360,14 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
 
 
        pid = mm ? mm->context.id : 0;
+       preempt_disable();
        if (unlikely(pid == MMU_NO_CONTEXT))
                goto no_context;
 
        /* 4k page size, just blow the world */
        if (PAGE_SIZE == 0x1000) {
                radix__flush_all_mm(mm);
+               preempt_enable();
                return;
        }
 
index 5f8ef50e5c66ae6fa93a6d852cf16611d892210e..f83044faac23d816bc3647da25a7e6f949e633c7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/byteorder.h>
 #include "vphn.h"
 
index fe8b7805b78fe7de44f5c1f9e658c36e58658586..f9ffdb3942fc965f81797745b0913c759479df43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_POWERPC_MM_VPHN_H_
 #define _ARCH_POWERPC_MM_VPHN_H_
 
index c1ff16a6eb517842b6451ebf41ab8a19151d7da0..02d369ca6a53b2ffa1dae4de42c8e9cb902efa39 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific network modules
 #
index cedbbeced632be4a98d8a8e3cc3f8b1437fa4f13..7a7834c39f64580443bdd24a8f79da75044ce747 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 ccflags-$(CONFIG_PPC64)        := $(NO_MINIMAL_TOC)
index 3f3a5ce664952f16c7a6361348dfecb84d1e04f8..225c9c86d7c07becaf5bf4ecd3e987cb64263253 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-$(CONFIG_PERF_EVENTS)      += callchain.o perf_regs.o
index 2e3eb7431571603fc9cd2452df25a32c6cd4c6da..9e3da168d54cdcd36e3911ff040ff2ad187c92b7 100644 (file)
@@ -793,6 +793,11 @@ void perf_event_print_debug(void)
        u32 pmcs[MAX_HWEVENTS];
        int i;
 
+       if (!ppmu) {
+               pr_info("Performance monitor hardware not registered.\n");
+               return;
+       }
+
        if (!ppmu->n_counter)
                return;
 
index 69e2e1faf902c7daee87ba8bef85727cac182ae7..5fab5a397da9c343fd50d9968de2682ec1ef1d79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_
 #define LINUX_POWERPC_PERF_HV_24X7_CATALOG_H_
 
index 49c1efd500459b885bd72c0cc467a7e1cc3f06d4..6f91f62e0aa65a3c8756efde48c72309cabe1ac5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  * DOMAIN(name, num, index_kind, is_physical)
index 5092c4a222a6fc424c9fa268ab0151c76d7bc19d..ae4ae4813e16bb23af726579d6e6051a3b246cd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_POWERPC_PERF_HV_24X7_H_
 #define LINUX_POWERPC_PERF_HV_24X7_H_
 
index 7dce8f1099675dc1bb7fe63d672b12d4f0c05cbe..0370518edd203b145ed62ddec3bd1a18c0bf391f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/io.h>
 #include <asm/hvcall.h>
 
index 349aaba4d2d1102b02bf7dd6798a3f33b4bbdd9d..2cce17bc321c53e119a77596e546c65a08368c3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_POWERPC_PERF_HV_COMMON_H_
 #define LINUX_POWERPC_PERF_HV_COMMON_H_
 
index acd17648cd188fea667dead69ee468c9d005b298..e608f9db12ddc6bec9db45083debdfe16f192e27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include "req-gen/_begin.h"
 
index 86ede827596118a566e8dbed7f24acd262bb725e..a3053eda5dcc3b11f1a62004cd4fda672a347ba4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_POWERPC_PERF_HV_GPCI_H_
 #define LINUX_POWERPC_PERF_HV_GPCI_H_
 
index 9ccac86f346385eaa624930f3050cdae62b6b09d..36344117c680b9e0500b345c18f98d11cb246134 100644 (file)
@@ -399,6 +399,20 @@ static void nest_imc_counters_release(struct perf_event *event)
 
        /* Take the mutex lock for this node and then decrement the reference count */
        mutex_lock(&ref->lock);
+       if (ref->refc == 0) {
+               /*
+                * The scenario where this is true is, when perf session is
+                * started, followed by offlining of all cpus in a given node.
+                *
+                * In the cpuhotplug offline path, ppc_nest_imc_cpu_offline()
+                * function set the ref->count to zero, if the cpu which is
+                * about to offline is the last cpu in a given node and make
+                * an OPAL call to disable the engine in that node.
+                *
+                */
+               mutex_unlock(&ref->lock);
+               return;
+       }
        ref->refc--;
        if (ref->refc == 0) {
                rc = opal_imc_counters_stop(OPAL_IMC_COUNTERS_NEST,
@@ -523,8 +537,8 @@ static int core_imc_mem_init(int cpu, int size)
 
        /* We need only vbase for core counters */
        mem_info->vbase = page_address(alloc_pages_node(phys_id,
-                                         GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
-                                         get_order(size)));
+                                         GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE |
+                                         __GFP_NOWARN, get_order(size)));
        if (!mem_info->vbase)
                return -ENOMEM;
 
@@ -593,6 +607,20 @@ static int ppc_core_imc_cpu_offline(unsigned int cpu)
        if (!cpumask_test_and_clear_cpu(cpu, &core_imc_cpumask))
                return 0;
 
+       /*
+        * Check whether core_imc is registered. We could end up here
+        * if the cpuhotplug callback registration fails. i.e, callback
+        * invokes the offline path for all sucessfully registered cpus.
+        * At this stage, core_imc pmu will not be registered and we
+        * should return here.
+        *
+        * We return with a zero since this is not an offline failure.
+        * And cpuhp_setup_state() returns the actual failure reason
+        * to the caller, which inturn will call the cleanup routine.
+        */
+       if (!core_imc_pmu->pmu.event_init)
+               return 0;
+
        /* Find any online cpu in that core except the current "cpu" */
        ncpu = cpumask_any_but(cpu_sibling_mask(cpu), cpu);
 
@@ -646,6 +674,20 @@ static void core_imc_counters_release(struct perf_event *event)
                return;
 
        mutex_lock(&ref->lock);
+       if (ref->refc == 0) {
+               /*
+                * The scenario where this is true is, when perf session is
+                * started, followed by offlining of all cpus in a given core.
+                *
+                * In the cpuhotplug offline path, ppc_core_imc_cpu_offline()
+                * function set the ref->count to zero, if the cpu which is
+                * about to offline is the last cpu in a given core and make
+                * an OPAL call to disable the engine in that core.
+                *
+                */
+               mutex_unlock(&ref->lock);
+               return;
+       }
        ref->refc--;
        if (ref->refc == 0) {
                rc = opal_imc_counters_stop(OPAL_IMC_COUNTERS_CORE,
@@ -763,8 +805,8 @@ static int thread_imc_mem_alloc(int cpu_id, int size)
                 * free the memory in cpu offline path.
                 */
                local_mem = page_address(alloc_pages_node(phys_id,
-                                 GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE,
-                                 get_order(size)));
+                                 GFP_KERNEL | __GFP_ZERO | __GFP_THISNODE |
+                                 __GFP_NOWARN, get_order(size)));
                if (!local_mem)
                        return -ENOMEM;
 
@@ -1076,7 +1118,7 @@ static int init_nest_pmu_ref(void)
 
 static void cleanup_all_core_imc_memory(void)
 {
-       int i, nr_cores = num_present_cpus() / threads_per_core;
+       int i, nr_cores = DIV_ROUND_UP(num_present_cpus(), threads_per_core);
        struct imc_mem_info *ptr = core_imc_pmu->mem_info;
        int size = core_imc_pmu->counter_mem_size;
 
@@ -1148,7 +1190,8 @@ static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
        }
 
        /* Only free the attr_groups which are dynamically allocated  */
-       kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs);
+       if (pmu_ptr->attr_groups[IMC_EVENT_ATTR])
+               kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs);
        kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]);
        kfree(pmu_ptr);
        return;
@@ -1183,7 +1226,7 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,
                if (!pmu_ptr->pmu.name)
                        return -ENOMEM;
 
-               nr_cores = num_present_cpus() / threads_per_core;
+               nr_cores = DIV_ROUND_UP(num_present_cpus(), threads_per_core);
                pmu_ptr->mem_info = kcalloc(nr_cores, sizeof(struct imc_mem_info),
                                                                GFP_KERNEL);
 
index acfb17a55c1617e2b12b1cad06c199d561ba2b57..549f8782c52d027812743b512ba2e82e2c4797ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Include paths to be used in interface defining headers */
 #ifndef POWERPC_PERF_REQ_GEN_H_
 #define POWERPC_PERF_REQ_GEN_H_
index 422974f895737bf65d8e2244accc645353ded71c..67c3859157f388dc25e39e14385dfa87f2a16f29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef __field_
 #undef __count_
index f6d98642cf1dea1aa6ca8b342a12174c6a359521..7c74c2ab4c0cd9c4dfab6d0d67e6001ff1067017 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #define REQUEST(r_contents) \
        REQUEST_(REQUEST_NAME, REQUEST_NUM, REQUEST_IDX_KIND, I(r_contents))
index 5573be6c35881c78207e4672dd04a955539cce09..7d9f4046c2caee7b23e639fb7cf35fb690282e09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef REQUEST
 #undef __field
 #undef __array
index 1b122469323de81afcb841cdf46f7f3f8bf72d40..871a9a1766c282aa16a4903db110bdc8be451bd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_POWERPC_PERF_REQ_GEN_PERF_H_
 #define LINUX_POWERPC_PERF_REQ_GEN_PERF_H_
 
index abc24501c4c06622528b6bf08d2a33a6aa7d5368..60254a321a911676719bbaa56d7ef7f5b0122749 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ACADIA
        bool "Acadia"
        depends on 40x
index 63f703ecd23c3ee39a70da79b12753c8ee5777c9..0e912a6a0b9a850664acd733954f417ba45cbdbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __POWERPC_PLATFORMS_44X_44X_H
 #define __POWERPC_PLATFORMS_44X_44X_H
 
index 01cb109ebf17522ae9019cccb263a0525685d90b..a6011422b86184fb5d2a25216bc6a914e3e67ecc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_47x
        bool "Support for 47x variant"
        depends on 44x
index 2c5651992369839424006ef077acd25a4bfaeb6a..1b78c6af821ae124fe146aef925320464c70f434 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y  += misc_44x.o machine_check.o
 ifneq ($(CONFIG_PPC4xx_CPM),y)
 obj-y  += idle.o
index 1fdb8748638d6322a4eed241f4157f5bb36bcf01..349f218b335c4957a7bd93c0c287b4e00fb51791 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/i8259.h>
 #include <linux/pci.h>
 #include "44x.h"
index bf7ae5cbd07a26b6a89a2ec6f7a3e91ddca98888..b59eab6cbb1b1e046ce9197ec203dfb91bcc1bde 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_MPC512x
        bool "512x-based boards"
        depends on 6xx
index f47d422953df583645bafba94e6274e9a97625e6..2daf22ee26a04b3e5ee9db9c5d1cf6c2df37c1bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Freescale PowerPC 512x linux kernel.
 #
index e4c745981912f51a43add427c1b66b182e343114..55a587070342b0568fd02d30e22df2c4828b3b13 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_MPC52xx
        bool "52xx-based boards"
        depends on 6xx
index 4e62486791e9ef7eaadcc24faf40dddabd7e28ff..ff2f86fe54299153e8a534feb71d907ff4dfebae 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for 52xx based boards
 #
index 870b70f5d1bdd2520a8bd37404eff6263278364f..e7da22d1df8798debded249e4d4af851d071ed0e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/suspend.h>
 #include <asm/io.h>
index 08ab6fefcf7a64e42f391950416fe7885f3718eb..3a9969c429b391fc3512565fcbd198730a9bfa83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/reg.h>
 #include <asm/ppc_asm.h>
 #include <asm/processor.h>
index 8310e8b5b57fe00d8c98cd528a75622a23a8287f..31d3515672f3f53268fb6458b850f616eb8bb5c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/suspend.h>
 #include <linux/io.h>
index 4dc170b0ae1803cccfdc4cb07125aa0823f9512f..a66eb311b6390c641fe0faf57779ce6a670536c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/reg.h>
 #include <asm/ppc_asm.h>
 #include <asm/processor.h>
index 994d1a959e20f4b1cd57112d359b31a1cf31c79b..6e04099361b9b896a2012e5ec8787417397c0162 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig PPC_82xx
        bool "82xx-based boards (PQ II)"
        depends on 6xx
index 455fe21e37c431ae64e8779de86a817ec8cfb0d8..8d713c601bf277662287d3f5d50a0fd45322193e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 82xx linux kernel.
 #
index 3080ce3441c1a78d1210fb9d2167d5e664d1f245..902ef0bd4949f7d50cd088d05b56a7828b443412 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PQ2_H
 #define _PQ2_H
 
index 4ef7f1cd05b7a976d94a0e7483d9f754d2b7b606..7e38b7b71a5a888cc4baddb9085a3272eccb2fe0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig PPC_83xx
        bool "83xx-based boards"
        depends on 6xx
index ed95bfcbcbff2a49d8364f70951ec9bd2eab8d34..bb4720897f6a0b7b6e54abce863766f893646c2a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 83xx linux kernel.
 #
index 636eb9d0401ae354a4e7da56b5d99c01a3890b2c..459145623334256946a244e38f2d2c9d89adaf8d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MPC83XX_H__
 #define __MPC83XX_H__
 
index 47b389dc49387e8381d330c5e0835fc398eaf5e4..68920d42b4bc4fd6afd61e92a3be7314b3d86b28 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig FSL_SOC_BOOKE
        bool "Freescale Book-E Machine Type"
        depends on PPC_85xx || PPC_BOOK3E
index fe19dad568e2d2c4e01a798326db6169838ec200..d1dd0dca5ebf028187b40cec4dbc29d46b4cdb3e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 85xx linux kernel.
 #
index 39056f6befeba8ef5cbeb025ed1cf13adce7ee4d..fa23f9b0592ca4c757523c73bc7ed585b4c39991 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MPC85xx_H
 #define MPC85xx_H
 extern int mpc85xx_common_publish_devices(void);
index 0b20ae315c539116a05fee644a487d593911a163..3936ff6dfbdbee24c5195355fba65597e5197764 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef POWERPC_85XX_SMP_H_
 #define POWERPC_85XX_SMP_H_ 1
 
index ce619bd1f82da53dbf42f379043ab19ee6479f6b..bcd179d3ed92957b0d0c1a52027be3fe4e8676c1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_86xx
 menuconfig PPC_86xx
        bool "86xx-based boards"
index 01958fedc3f2bb6f13b8b9fab4983b853f215231..2c04449be107200413b644f0d8c010927d384a61 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 86xx linux kernel.
 #
index 536b0c5d5ce390bf827c758a3418b99fa03a1d46..e2089d3de00c8dc82c7e4f1cf6e0b33e8af29adb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config CPM1
        bool
        select CPM
index f9af3218bd9c0cd8cc835075b394df0f9f226084..708ab099e88652c137f13bcb7ce81cc9d4621888 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 8xx linux kernel.
 #
index 1917d69f84dfe38899451e383b8b20b8b4099822..e1274db53d48a54f4d2614ac9a8bcc4e213ed949 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
index 4fd64d3f5c4429206b8c838ca99387e6668aee11..d5e34ce5fd5d9b65644ec9f9b60dedf598c8c8fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Platform support"
 
 source "arch/powerpc/platforms/powernv/Kconfig"
index 13663efc1d316db30c217adab02b7f8e89b7d3d1..a78f255111f21469492bf663ab8b935fa9a53cb2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC64
        bool "64-bit kernel"
        default n
index d7a55ecfaee5e7fc7432154a4e34be721cfa7eb7..e46bb7ea710f83b03e994e11e0c82d20966269de 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
index 128de25cc28435a334384c1e7b0da38b0119d716..03dc1e37c25bf375a76fdcd1667de0aeccfa9f06 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config AMIGAONE
        bool "Eyetech AmigaOne/MAI Teron"
        depends on 6xx && BROKEN_ON_SMP
index a4522f09d65ecee59b225204e16e40b7589c8893..9f5958f1692349c5d1db79a1abb4c26c8606822d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_CELL
        bool
        default n
index 00464305763d70c6f2c9783aa55c24b100132e65..d5f808e8a5f3804edbd821043758d0fec4f36ad9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PPC_CELL_COMMON)          += cbe_regs.o interrupt.o pervasive.o
 
 obj-$(CONFIG_PPC_CELL_NATIVE)          += iommu.o setup.o spider-pic.o \
index 4f60ae6ca358aa769fdd1976960d126a51a4ba9c..a479022485412c1c85809238cd80fa88740c7f76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_CELL_PIC_H
 #define ASM_CELL_PIC_H
 #ifdef __KERNEL__
index eb7ee54c82a0de105eb44780aa8e9f18783ee9c4..6c2e6bc0062e10571dc7b00f8df518d3c655bcac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RAS_H
 #define RAS_H
 
index 52a7d2596d30fe285e309c8694490d0b695add33..52e4c80ec8d031e9773f1e8e9681f9bfcf356cb7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_SPU_FS) += spufs.o
 spufs-y += inode.o file.o context.o syscalls.o
index cfacbee24d7b6068fe1aa9e4d27e9fb1c159a553..07f82d7395ffd49b27115281604290de8bdd84e0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define DEBUG
 
 #include <linux/wait.h>
index db2656aa4103e2402acaf9ba4862ad3b4d163b40..d557e999b662a9c5e7ad3fdf7b5ab6dccbbbc897 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_SPUFS_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_SPUFS_H
 
index 0d290ea83dc106272f678eb045fd021abe0cc642..157e046e6e93cf903d37e928f9da5958a2f6a6b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/export.h>
index d3cdab582c5d74d23b4b0c3fa77600cfd5e729c8..ead99eff875a8ad9dfd517e317ad92c4e93d3852 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_CHRP
        bool "Common Hardware Reference Platform (CHRP) based machines"
        depends on 6xx
index 63f0aee4c158e97df652e49b43d00551aaa21e03..a5a7c338caf948a5350b350d5d0d9d3634822520 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Declarations of CHRP platform-specific things.
  */
index 27264794f5c022f4faa2c5d00e61a766221fae03..0f512d35f7c52dd7c065ebb356e3d0999ab4c5e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CHRP pci routines.
  */
index 19760712b39da3e1f3063c3046814a47e4ba3073..485cf5ef73d42070f0806ac06d7ff99b5c87835b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
  *  Thanks to :
index 0ce1b45f02a849186bfc0861f1326c2949057614..481ed133e04b9c464efcea4cb1f9b1fa0dda9d4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1995  Linus Torvalds
  *  Adapted from 'alpha' version by Gary Thomas
index 14515040f7cda00fa072a8203a0eefd0770806d6..f7bb6cb8d1e352debfc7ef19021a75ce26dba473 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Smp support for CHRP machines.
  *
index f803f4b8ab6f21cebd6c5de9781ccc72c2a42106..03d115aaa1916638d01e782326a8f3fc6412f730 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  *
index a25f496c2ef9065b98547423031b953c95597eff..9fb2d5912c5aae0a8289345855eb82936ba5829a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config EMBEDDED6xx
        bool "Embedded 6xx/7xx/7xxx-based boards"
        depends on 6xx && BROKEN_ON_SMP
index f126a2a0998170c118c7d17d9e6bfc36989233d7..12154e3257ad2343d68e4e4ecfb52c9770af0aa4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 6xx/7xx/7xxxx linux kernel.
 #
index e359d0db092cf1c401bb9c4f4454d36c4ef97f9f..376d0be36b66e352a7db7cbdb9752b64db4540fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_MAPLE
        depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
        bool "Maple 970FX Evaluation Board"
index eecfa182b06ea267ebdf625edd525f45439a4a1e..d10f4af3a42e49e395b01458baf05c0b08cd2589 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Declarations for maple-specific code.
  *
index c7f1dbe94de71005c032e046ee9a75463cb771ac..d458a791d35bf454bae63c56aef84f39534e634f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_PASEMI
        depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
        bool "PA Semi SoC-based platforms"
index 74cbcb3576122f6f6840b08a268f133b7975ddfd..329d2a619254906ce6ca8aed91c117be719e83e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PASEMI_PASEMI_H
 #define _PASEMI_PASEMI_H
 
index 43c606268baf5afe650e972002d6f625b5d6a5c1..fc90cb35cea30c54d2e2dcbd8a206461b79bdd5b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_PMAC
        bool "Apple PowerMac based machines"
        depends on PPC_BOOK3S && CPU_BIG_ENDIAN
index 1eb7b45e017d14e8df7440f7b5d34af0f05f65b3..f2839eed0f89715bd4bb3ff2a55f7602587fa761 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS_bootx_init.o            += -fPIC
 
 ifdef CONFIG_FUNCTION_TRACER
index 860159d46ab826844a1ac8e158e8e66df34fc5f2..fd2e210559c8b6ee6366b10f43fad3f08b89da35 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/delay.h>
index e7f8163d6769c193f4d681fd4a4c60bab5b9e82c..6f15b8804e9b58f6af2b2d24d4b403a243726f8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PMAC_H__
 #define __PMAC_H__
 
index 8680bb69795d3e6f0c0a43edb47ad72ac2d96b62..274af6fa388efd122ab93046a2f45bbb6630b24a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for periodic interrupts (100 per second) and for getting
  * the current time from the RTC on Power Macintoshes.
index 366bd221edecb089c9b887ba62b271c90694719f..64f38f0d15ed9842b57bc815e853b1d3624404f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
index 340cbe263b333490ba59e67a0a28cb609bd327dd..f8dc98d3dc01a053ddf3f1b69ae0816e3c6114e3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_POWERNV
        depends on PPC64 && PPC_BOOK3S
        bool "IBM PowerNV (Non-Virtualized) platform support"
index 37d60f7dd86d939b2ae991cfed9e0bce7c335fd6..7a31c26500e6ae9fe12a3633b1aa46573b9c1410 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                  += setup.o opal-wrappers.o opal.o opal-async.o idle.o
 obj-y                  += opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
 obj-y                  += rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
index 9f59041a172bbfdea270ccb4139e66948bc3354f..443d5ca719958e5170374edbcaaf7d2cc52b8104 100644 (file)
@@ -393,7 +393,13 @@ static void pnv_program_cpu_hotplug_lpcr(unsigned int cpu, u64 lpcr_val)
        u64 pir = get_hard_smp_processor_id(cpu);
 
        mtspr(SPRN_LPCR, lpcr_val);
-       opal_slw_set_reg(pir, SPRN_LPCR, lpcr_val);
+
+       /*
+        * Program the LPCR via stop-api only if the deepest stop state
+        * can lose hypervisor context.
+        */
+       if (supported_cpuidle_states & OPAL_PM_LOSE_FULL_CONTEXT)
+               opal_slw_set_reg(pir, SPRN_LPCR, lpcr_val);
 }
 
 /*
index 3c447002edffdc13ac3548d3c71b155db87d83d2..1ab7d26c0a2cd972674d299339928b0475b2ff91 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/percpu.h>
 #include <linux/jump_label.h>
 #include <asm/trace.h>
index a95273c524f65381595434b4f35860be75bc44f0..b47f9406d97e2c1e8ac4a7b435b450c664d8e626 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __POWERNV_PCI_H
 #define __POWERNV_PCI_H
 
index a159d48573d703dcb2ee040ff1ea28404217f735..94f17ab1374bd0bb34f10fc76f3638cb7506df8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _POWERNV_H
 #define _POWERNV_H
 
index 897aa1400eb833e944fabbc65840904006267a1f..bbb73aa0eb8f041630110c795828215471cc5f2d 100644 (file)
@@ -272,7 +272,15 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static unsigned long pnv_memory_block_size(void)
 {
-       return 256UL * 1024 * 1024;
+       /*
+        * We map the kernel linear region with 1GB large pages on radix. For
+        * memory hot unplug to work our memory block size must be at least
+        * this size.
+        */
+       if (radix_enabled())
+               return 1UL * 1024 * 1024 * 1024;
+       else
+               return 256UL * 1024 * 1024;
 }
 #endif
 
index b27f40f26efc26c4cd8d22da5962536959c04d42..6f7525555b1921de8413aacc501c91cc16350c14 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_PS3
        bool "Sony PS3"
        depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
index 02b9e636dab758f54dcb7c0bd0c1f51fdecebc34..86bf2967a8d4a9d5f0e34b4c2fd5055a0a7017db 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
 obj-y += interrupt.o exports.o os-area.o
 obj-y += system-bus.o
index 71dd69d9ec64578e32292f772d43b6056347c896..0c698fd6d491c9d7be4581407f3e272d1166c79d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_PSERIES
        depends on PPC64 && PPC_BOOK3S
        bool "IBM pSeries & new (POWER5-based) iSeries"
index 8f4ba089e80273f7d9cf6ce88032f329eaef64b8..13eede60c24dd35da31d544f8abe1c2a77a85749 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_PPC64)                        := $(NO_MINIMAL_TOC)
 ccflags-$(CONFIG_PPC_PSERIES_DEBUG)    += -DDEBUG
 
index 783f3636469093034ae26a23856fef6aaf1922a6..e45b5f10645ae54b6610298a0a03c07f7e5d0966 100644 (file)
@@ -266,7 +266,6 @@ int dlpar_attach_node(struct device_node *dn, struct device_node *parent)
                return rc;
        }
 
-       of_node_put(dn->parent);
        return 0;
 }
 
index fc0d8f97c03a2f243a51c9ba27c7043626bd95cc..fadb95efbb9e1856ed8a7182cf870dcf3a5f5331 100644 (file)
@@ -462,15 +462,19 @@ static ssize_t dlpar_cpu_add(u32 drc_index)
        }
 
        dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent);
-       of_node_put(parent);
        if (!dn) {
                pr_warn("Failed call to configure-connector, drc index: %x\n",
                        drc_index);
                dlpar_release_drc(drc_index);
+               of_node_put(parent);
                return -EINVAL;
        }
 
        rc = dlpar_attach_node(dn, parent);
+
+       /* Regardless we are done with parent now */
+       of_node_put(parent);
+
        if (rc) {
                saved_rc = rc;
                pr_warn("Failed to attach node %s, rc: %d, drc index: %x\n",
index 210ce632d63e1e47c2796acd767e3bf610da7439..f7042ad492bafba5ac21e3db9ce24977fd527169 100644 (file)
@@ -226,8 +226,10 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
                return -ENOENT;
 
        dn = dlpar_configure_connector(drc_index, parent_dn);
-       if (!dn)
+       if (!dn) {
+               of_node_put(parent_dn);
                return -ENOENT;
+       }
 
        rc = dlpar_attach_node(dn, parent_dn);
        if (rc)
index 2798933c0e38c492ade3876a5aba78cdf09b193e..7e75101fa52229bbb327ebeee2b0caa410a1f60e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/err.h>
 #include <linux/slab.h>
index bb83d39aef65e31b3c66bf115460b6091a1c165c..decad6553d8f6b83c564027a9db3d778c977606a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PSERIES_OF_HELPERS_H
 #define _PSERIES_OF_HELPERS_H
 
index 08672d9136ab4525f05e8929e2e5ee52ccf6f4b1..51414aee2862547fef4c0fbe6c2aeef05c8df26b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OFFLINE_STATES_H_
 #define _OFFLINE_STATES_H_
 
index ac8793c13348f46cadaa50fae14a3772961d5ef9..30e05decbb4cd8b381ab125ba52e8038ba566b3e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 targets += trampoline.o purgatory.ro kexec-purgatory.c
 
 LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
index caf882e749dceec4224ceb010dd2853bd1934076..bcef2ac5647982d3458bead30f92ce0ab8b7b8aa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
 #
index 79416fa2e3bae0f9f1d05dcc7bd1a0dbff563397..0baba21404dcc0ec3f0342fca8f16d418be8fec2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 ccflags-$(CONFIG_PPC64)                := $(NO_MINIMAL_TOC)
index c651e668996bc4d7c2592f8f9602c81147d1f3b6..c6f154b602fb8b005480c3a369c45a5068d524da 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * General Purpose functions for the global management of the
  * Communication Processor Module.
index 2c5f70c24485edb582b3a40bed5b59b375dd017c..a8a26951f311f27bde8ce7602b919993615a70df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_KERNEL_CPM2_H
 #define _PPC_KERNEL_CPM2_H
 
index 9234be1e66f556b129148efec300c1f5a4f24239..5011ffea4e4b3a8d3c69160bb1bb896cdeb8cb1f 100644 (file)
@@ -71,6 +71,8 @@
 #define RIWAR_WRTYP_ALLOC      0x00006000
 #define RIWAR_SIZE_MASK                0x0000003F
 
+static DEFINE_SPINLOCK(fsl_rio_config_lock);
+
 #define __fsl_read_rio_config(x, addr, err, op)                \
        __asm__ __volatile__(                           \
                "1:     "op" %1,0(%2)\n"                \
@@ -184,6 +186,7 @@ fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
                        u8 hopcount, u32 offset, int len, u32 *val)
 {
        struct rio_priv *priv = mport->priv;
+       unsigned long flags;
        u8 *data;
        u32 rval, err = 0;
 
@@ -197,6 +200,8 @@ fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
        if (offset > (0x1000000 - len) || !IS_ALIGNED(offset, len))
                return -EINVAL;
 
+       spin_lock_irqsave(&fsl_rio_config_lock, flags);
+
        out_be32(&priv->maint_atmu_regs->rowtar,
                 (destid << 22) | (hopcount << 12) | (offset >> 12));
        out_be32(&priv->maint_atmu_regs->rowtear, (destid >> 10));
@@ -213,6 +218,7 @@ fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
                __fsl_read_rio_config(rval, data, err, "lwz");
                break;
        default:
+               spin_unlock_irqrestore(&fsl_rio_config_lock, flags);
                return -EINVAL;
        }
 
@@ -221,6 +227,7 @@ fsl_rio_config_read(struct rio_mport *mport, int index, u16 destid,
                         err, destid, hopcount, offset);
        }
 
+       spin_unlock_irqrestore(&fsl_rio_config_lock, flags);
        *val = rval;
 
        return err;
@@ -244,7 +251,10 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid,
                        u8 hopcount, u32 offset, int len, u32 val)
 {
        struct rio_priv *priv = mport->priv;
+       unsigned long flags;
        u8 *data;
+       int ret = 0;
+
        pr_debug
                ("fsl_rio_config_write:"
                " index %d destid %d hopcount %d offset %8.8x len %d val %8.8x\n",
@@ -255,6 +265,8 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid,
        if (offset > (0x1000000 - len) || !IS_ALIGNED(offset, len))
                return -EINVAL;
 
+       spin_lock_irqsave(&fsl_rio_config_lock, flags);
+
        out_be32(&priv->maint_atmu_regs->rowtar,
                 (destid << 22) | (hopcount << 12) | (offset >> 12));
        out_be32(&priv->maint_atmu_regs->rowtear, (destid >> 10));
@@ -271,10 +283,11 @@ fsl_rio_config_write(struct rio_mport *mport, int index, u16 destid,
                out_be32((u32 *) data, val);
                break;
        default:
-               return -EINVAL;
+               ret = -EINVAL;
        }
+       spin_unlock_irqrestore(&fsl_rio_config_lock, flags);
 
-       return 0;
+       return ret;
 }
 
 static void fsl_rio_inbound_mem_init(struct rio_priv *priv)
index ab7a74c75be8f6a8da71c77ad027cf16bb5eac3b..88b35a3dcdc599b01c37da944ba3f8481215d6cc 100644 (file)
 
 #define DOORBELL_MESSAGE_SIZE  0x08
 
+static DEFINE_SPINLOCK(fsl_rio_doorbell_lock);
+
 struct rio_msg_regs {
        u32 omr;
        u32 osr;
@@ -626,9 +628,13 @@ err_out:
 int fsl_rio_doorbell_send(struct rio_mport *mport,
                                int index, u16 destid, u16 data)
 {
+       unsigned long flags;
+
        pr_debug("fsl_doorbell_send: index %d destid %4.4x data %4.4x\n",
                 index, destid, data);
 
+       spin_lock_irqsave(&fsl_rio_doorbell_lock, flags);
+
        /* In the serial version silicons, such as MPC8548, MPC8641,
         * below operations is must be.
         */
@@ -638,6 +644,8 @@ int fsl_rio_doorbell_send(struct rio_mport *mport,
        out_be32(&dbell->dbell_regs->oddatr, (index << 20) | data);
        out_be32(&dbell->dbell_regs->odmr, 0x00000001);
 
+       spin_unlock_irqrestore(&fsl_rio_doorbell_lock, flags);
+
        return 0;
 }
 
index 2640446f8bc40483ab4c1f16d50bbf0aea1f76b7..db11b06eb38fdcaaf9f0eb77ff41177e1b3709bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PPC_FSL_SOC_H
 #define __PPC_FSL_SOC_H
 #ifdef __KERNEL__
index 5bf7e4b81e36c9edf60f0c9f8edae47a47f80179..923dedba3c9c0849025c1c745946d5ffe6730ce9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GEF_PIC_H__
 #define __GEF_PIC_H__
 
index 6727dc54d54937281bb6d592b6e87d70b680e4be..33a9042fca80d6add8e1d71ae8738c554ddd43e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /* Microcode patches for the CPM as supplied by Motorola.
  * This is the one for IIC/SPI.  There is a newer one that
index 573292663cf2ca9e688214d77ddac044bf83c402..834a6d7fbd886410ab687a690cae368404a7faee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**
  *     mpc5xxx_get_bus_frequency - Find the bus frequency for a device
  *     @node:  device node
index 4f618fa465c085305d55fd6b47a75a973b4e4e05..60cfcb90d1fa1faa6d38139370f3ab8a3d52baf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MV64X60_H__
 #define __MV64X60_H__
 
index 3a7b0c513c7670ee0f1a155e759fdc3bcf307856..f3f3a20d39e27af4cd7934e9a123d369ff9db292 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SYSDEV_SIMPLE_GPIO_H
 #define __SYSDEV_SIMPLE_GPIO_H
 
index 385e7aa9e2731cabf13cfccef35a2934719cdbc3..86fee428f5f1ccfd3943f415f2c49ba75e236ab3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_XICS
        def_bool n
        select PPC_SMP_MUXED_IPI
index 5d7f5a6564de02a6335906d6f568722b1b1e930b..5d438d92472bc29e3def90733866ff46e93d2d98 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
 
 obj-y                          += xics-common.o
index 78ee5c778ef8c7650ccea536aff7fb5cefc0bca3..42e0c56ff81c3fcde6e4ad27c523b049cce38995 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/irq.h>
index 3e3e25b5e30d66ace3e9a77c39311c82faf9f3fe..70ee976e1de075e720706c85555e5237216651ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config PPC_XIVE
        bool
        default n
index f387318678b97abdfa8e57fe46eade5a707e566d..a3b8d7d1316eb1863f19ffa19ff34f0c761ada33 100644 (file)
@@ -1402,6 +1402,14 @@ void xive_teardown_cpu(void)
 
        if (xive_ops->teardown_cpu)
                xive_ops->teardown_cpu(cpu, xc);
+
+#ifdef CONFIG_SMP
+       /* Get rid of IPI */
+       xive_cleanup_cpu_ipi(cpu, xc);
+#endif
+
+       /* Disable and free the queues */
+       xive_cleanup_cpu_queues(cpu, xc);
 }
 
 void xive_kexec_teardown_cpu(int secondary)
index f24a70bc6855d54cf86a50d17fefebc9777e2ed0..d9c4c93660491849029044d37ab8e60160b0d7de 100644 (file)
@@ -431,7 +431,11 @@ static int xive_spapr_get_ipi(unsigned int cpu, struct xive_cpu *xc)
 
 static void xive_spapr_put_ipi(unsigned int cpu, struct xive_cpu *xc)
 {
+       if (!xc->hw_ipi)
+               return;
+
        xive_irq_bitmap_free(xc->hw_ipi);
+       xc->hw_ipi = 0;
 }
 #endif /* CONFIG_SMP */
 
index c658d8cf760bffd82bc7af1206aef2a092434eec..061f8035bdbea3f6fa233c81cd7fd34f849c82d4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 set -e
 set -o pipefail
index 1dd88315cff4bd8bb12da4bcfe10b7db209d0f55..1bc3abb237cda0a4125cc7738af4ddfcd26a9d39 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for xmon
 
 subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
index f8653365667e9db6cefbc9c3f080535902e90b8c..2202ec61972c48865696b128921f2cffaa2239b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define EOF    (-1)
 
 #define printf xmon_printf
index 7d8b0e8ed6d9e07df3a8394907881cbaf9858fd0..4099cbcddaaa2a2937f0fa65d2fe002e1f686c76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/ppc_asm.h>
 
 /* unsigned long xmon_mfspr(sprn, default_value) */
index 48af970320cbdf7a7cdbfff88a6e91a5f1c91b46..ae55e715cc748e0148601c9cd05de1f969f60560 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MMU
        def_bool y
 
index ba5f878a295c3295016e636b09d69ed4a14ec16c..2cfdfbf8d3209bb15a5b0232e2147d8f55e99eb9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 4a67f2b5f6aa154e04898e07aea0cc3f6959f90a..10346d2f3d4fb7203e87c28f109dbb2fc6bf7cc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions and interface for Linux - z/VM Monitor Stream.
  *
index 9a42ecec564767411ff5eb506b4f2bb2e18e1107..da9dad35c28e54e0f211bd3cfc2b0c66b51d983b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux s390-specific parts of the memory manager.
 #
index f7e4c834ea24cf579930072e816f7e09ff78173c..3df10c989893cf8577eee9c92ba1cbf2ea47cfda 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/s390/boot/compressed/Makefile
 #
index 11f6254c561e8862f0cd1bfc39dab487ba585229..231d1491d431919bcb49fa6034a683862c74b0fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Startup glue code to uncompress the kernel
  *
index 33ca29333e1808ae4dc0f9e8875902ae2bb307f5..77633200f42cbf5d581b28bb3401135949f13d1b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Definitions and wrapper functions for kernel decompressor
  *
index 747735f834265dbd0d9c505e5d41907d638cde1c..88e46d4a7784a682e734de66b2f1794f75191208 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 
 OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
index afa46a7406eaeddbbf70bbaf384f49ffa0535874..04e042edbab760f13a2da86a0cab071346bf2ab5 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_NET=y
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
 # CONFIG_FIRMWARE_IN_KERNEL is not set
+CONFIG_BLK_DEV_RAM=y
 # CONFIG_BLK_DEV_XPRAM is not set
 # CONFIG_DCSSBLK is not set
 # CONFIG_DASD is not set
@@ -59,6 +60,7 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_PANIC_ON_OOPS=y
 # CONFIG_SCHED_DEBUG is not set
index ad4bd777768d167a631424cbf45efe268b56d48d..a51010ea62fa4785530cd69abca7f1cb1737ad0d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Cryptographic API
 #
index 8013989cd2e51d63a895a4d124d99a84952c09fa..e8077f0971f89f1695d5b5637d9c89126cf1e9cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Hardware-accelerated CRC-32 variants for Linux on z Systems
  *
index 17f2504c26334472be0d562c1ef38344f197075f..d8c67a58c0c53b620c4a8f1837ce9bf3c0db5207 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Hardware-accelerated CRC-32 variants for Linux on z Systems
  *
index eecde500ed49e2726cc2ed8d0b20e37459075217..52348e0a812e8db6ccc98a23450f2c46ad823f8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Hypervisor filesystem for Linux on s390.
  *
index 752f6df3e6974a823e9bcbdb044d3e5381d9bb4e..b9bdf5c1918e17bf350ca2f054aa45d91b486df1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Hypervisor filesystem for Linux on s390 - debugfs interface
  *
index 794bebb43d23d285370138d70bef7aab8a1e905a..be8cc53204b5088425af0f79d23bff276bc0b1c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Hypervisor filesystem for Linux on s390. Diag 204 and 224
  *    implementation.
index 0f1927cbba31bf84cc0afa80878861d37822bb92..dce87f1bec94672b31b633c9f02098f565fa9b25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Hypervisor filesystem for Linux on s390
  *
index c9e5c72f78bd2c9be6621d19a5e0e8eb1ef6dc73..ae0ed8dd5f1b362eb3c93ee58ed10d947a587c83 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Hypervisor filesystem for Linux on s390.
  *    Set Partition-Resource Parameter interface.
index 012919d9833bbee66e4c993a54d562cdfef6a333..c4b7b681e0554eecf0e459be2f350046ce2356fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Hypervisor filesystem for Linux on s390. z/VM implementation.
  *
index bd93ff6661b809643e4dcd3e94747c4464a763a2..fcf539efb32fb802d7c46030bda0a74c8df77639 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2002, 2007
  *    Author(s): Ingo Adlung <adlung@de.ibm.com>
index a6263d4e8e569245ece9421efc0affb3889f276b..4afbb5938726e568e3c23a88dd2bcaeaa0fe2c68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2006
  *
index 6033901a40b2366da9b7b05bea41f118506dd4e5..e9f7d7a57f999789a8494de34e8f9454efb8137f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Kernel interface for the s390 arch_random_* functions
  *
index 2c3413b0ca52dba8f56e2dedf83c705dbcef5bcd..c37eb921bfbf39288d04aa7e9b3db30c1877fc44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_PROTOTYPES_H
 
 #include <linux/kvm_host.h>
index f7f69dfd2db2861107fc1752d190c0c4037b3076..4b55532f15c4252e6ea698154f605a0412edd698 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>,
index ba6d29412344ec2040f2a9b79b22e1d3a234739c..f479e4c0b87e7e4a120eb92eba3dab89c366b710 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Low level function for atomic operations
  *
index 5c8db3ce61c8e34009a5f236a378e81783c57e98..10432607a573625be45d23e6263c05e378a0bdfe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2009
  *
index 99902b7b9f0c9e8caaf22f638a64310381e2f5fb..31e400c1a1f35426a9cbcf8d94349d247e866557 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 1999,2013
  *
index ce9cc123988b975b3bf6766926b2f4f7b158e1a8..429f43a8a8e81fbac2837179ec5cf54ab04a49ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_BUG_H
 #define _ASM_S390_BUG_H
 
index 05219a5e0b2fbdfc49c7c762e0ae84aacaf541a1..d5e22e837416e889f1cb747427bb0731a610f648 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index b80e456d6428f5800e8bd32baf56499baa91a409..633f8da861374df0801a958dcdf87cc127bb0a86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2002, 2009
  *
index 057ce0ca6377dc3b28b775c3c1ca1797a8cbbf2c..b00777ce93b46f4d1433f35300cff31ea84545f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_CCWGROUP_H
 #define S390_CCWGROUP_H
 
index 12bf4fef2a68435d26b9c13a66f7a1d42a64a27e..91e376b0d28c25edfbbd5aa8d7f4305f43387e7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    S390 fast network checksum routines
  *
index 7298eec9854194406d98367b21a3c6a220a4bd49..4773f747915cab928790475e346a14fca7341b35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007, 2012
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
index 7a38ca85190b84ba7842ffa6067c562bb1c4debd..dc84a0171bb3d1a24c7fc8cd14345891feff9504 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common interface for I/O on S/390
  */
index 5687d62fb0cb313e7562553da0ea320c0f8a0b22..3925b0f085b7df0fce1ec69e198b862b5599ca39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_CLP_H
 #define _ASM_S390_CLP_H
 
index ed2630c23f9015ab00dab7040c4b8a8bc421e718..599594c3720fabe7a470f9e228cf28c4ff4edde3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_CMB_H
 #define S390_CMB_H
 
index 24ea6948e32b9edab2aa092a7ef9fcbb0c2be75b..af99c1f66f1205a8722e919ca1e97e31496b3bbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2011
  *
index 07a82bc933a775df11a9d2084bcd0b4eeb768311..1b60eb3676d55640c515633e799bbb7fde610b7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390X_COMPAT_H
 #define _ASM_S390X_COMPAT_H
 /*
index e06f2556b31641909e6f6915b770a8644aa3cbad..056670ebba67b27e1e1679a69dc57682c4673f7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CP Assist for Cryptographic Functions (CPACF)
  *
index ca2b0624ad461d0bf03068f99a422bb58851caec..c3c993abe9649ec5e011c78de593377c0e3db975 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 91541000378e4dca6e7dfa6d3b604e9c63082dc0..62228a884e0632b6f0bd7d83e266862bb34e78e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2000, 2009
  *    Author(s): Hartmut Penner <hp@de.ibm.com>,
index fa7e69b7c299767e6fdf68d2e8767a56ab8cd293..1d007c6ede954b609a350a28db5a52e11099aca5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Module interface for CPU features
  *
index 9072bf63a846148c008da47a5ed3a73313b382a3..cb729d111e206065b06ed56c855841c2fd2febe9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2004
  *
index bcb9cd2a730aaedf23b59d417e83926d2a05201d..c6ebfd31f1dbaa3ae95687137b52766ac16c02c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *   Data definitions for channel report processing
  *    Copyright IBM Corp. 2000, 2009
index 09d1dd46bd5777e7af01f6e194b0e2c2eb066532..a478eb61aaf7f34e272c50101e7ff3596b643dc3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CSS_CHARS_H
 #define _ASM_CSS_CHARS_H
 
index e508dff92535ff8e2e5b87cd996d393c271b8bd0..93e0d72f6c9484b900a328f0f2aef65aa1dc5749 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2009
  *
index b80941f30df5518159e4fe5681ae56472bc90592..68f84315277c63f838f0e72a4db5893acdbace54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index df7b54ea956daeb6c9a1091518e73417e688e504..a4ed25dd32785268bc6693028fb691f34fb2596a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *   S/390 debug facility
  *
index 3f6e4095f4715f5c92aaf01b69b416efad9ac69f..898323fd93d2b9b0885bda17cd097ab6dfef20dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 88162bb5c19009cf3474d3110de3b988d25ecd9a..6db78567294c3c27871f91cce468d9f31c9c636a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * s390 diagnose functions
  *
index 37f617dfbeded0de8edb9f9f4e1a263c46bd0635..78d1b2d725b9997f5e9327f9aea5b22511ee6463 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Disassemble s390 instructions.
  *
index 512ad0eaa11a7f1d4e5f9ed3837f4b6962f2d0be..8fc8764fe5ee8037ff053ccc1a3cbffaf807bbe6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_DMA_MAPPING_H
 #define _ASM_S390_DMA_MAPPING_H
 
index bb9bdcd20864ea41546e670df5369c7bebfdda2d..6f26f35d4a7171a1dd4c32ba65f4e81fbec74e1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_DMA_H
 #define _ASM_S390_DMA_H
 
index 144809a3f4f69e1a669441cd592307f1e83ea1cb..eb5323161f11e63a3fc6f98ef3a8062ee1bb4e24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_EADM_H
 #define _ASM_S390_EADM_H
 
index b71735eab23f640171d1c5cb8d381111bfc99e73..29441beb92e604ce24d03a035c1063ecc0d0b0f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    EBCDIC -> ASCII, ASCII -> EBCDIC conversion routines.
  *
index 65998a1f5d430f23feca39251fadd4bdf6854f9a..9a3cb3983c0140110f791c14ea0dbdb8cd84159d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index c4a93d6327fa7248bf2eb8404ba60b44758c1190..641bfbec9d5228e77f005934d7eb4a7b72f86fac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2009
  *
index 16cfe2d62eebc17fbbaedcc7bd263c16a60ee710..80a4e5a9cb46022352f956ebe04c8007564c8879 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __S390_EXTABLE_H
 #define __S390_EXTABLE_H
 /*
index 6276002d76ba64f6dc2c4690e49a2368ab27f10e..568fd81bb77b516de65c83933f6518f43c26d41f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  definitions for external memory segment support
  *  Copyright IBM Corp. 2003
index cb60d5c5755db49d2d765fe0c705eab32c2accb1..f040644575b7104c27d770e4f5b42ca85134be1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2009
  *
index 04cb4b4bcc5fc607342e9014635ae0394fae1f9a..cff0749e9657215c1bc2d9455f9f0e9cad2d0646 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Functions for assembling fcx enabled I/O control blocks.
  *
index 02124d66bfb5d699b09ee3f2602b8ba89d206bb5..34a7ae68485c6a9338cd1422c6284a7668b6ea77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * In-kernel FPU support functions
  *
index 629c90865a073174f61fcc47268d3311db4f3a9e..4a71dbbf76fbb5d42de432f18a853e97d94114e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * FPU state and register content conversion primitives
  *
index bce255ead72b400a63103362feff567d934ebc6e..d889e9436865e3571900bc040be043a885dd74c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * FPU data structures
  *
index 836c56290499b84c0dad7785e9aa5979d68ed0bf..cfccc0edd00d7ba6b3c5150d36f2a27e183dd21e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_FTRACE_H
 #define _ASM_S390_FTRACE_H
 
index 8f8eec9e1198cc97fef9fd036a953dbd7c9d6009..9b5a3469fed94fda814e64714cf196f9fbae76bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_FUTEX_H
 #define _ASM_S390_FUTEX_H
 
index 741ddba0bf11b547a791fc41a092e426c4f9ffef..e07cce88dfb0d9baf83cbc257c1b89a818888b0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  KVM guest address space mapping code
  *
index b7eabaaeffbd09a1310c3a8de2fe73786f00169a..a296c6acfd076f7d7eb9d3ae3559bdb3256da87f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index d95869ce3ca2583a916d99afa848fc19df585eb4..9c5fc50204dd636cf9483d18f795c616a3b10b53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  IBM System z Huge TLB Page Support for Kernel.
  *
index ee96a8b697f9479ce45e46f02b166efa6cfe54f8..adae176757aee0f86fc0c4dc569998fabb339ea4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _HW_IRQ_H
 #define _HW_IRQ_H
 
index 280b60a0bcd456fb9c725bbc750afaa34ea811a5..15578fd762f647123257b5e9b3f45eca7bb3d2cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Martin Schwidefsky <schwidefsky@de.ibm.com>
index 51ff96d9f2877ca6f78d08e12b6ffe2b9a6282b8..6d4226dcf42a23a6951bf8ddac50c280735b4184 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2014
  *
index 904e4b3af95dcc6a45aa44f85924b45647455fc6..f34d729347e4c7be32099e16ec79dedfa77438c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 6810bd75731288b74acf11ea3c8c0a709141af4c..5a8d92758a5844de149a68fdff9a90a69cce71d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * s390 (re)ipl support
  *
index 70c9bce766f56ef621ddcbdf9999c1c9a3b0594e..2f7f27e5493f6b28c2f0cb79f840ed546c0660ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IRQ_H
 #define _ASM_IRQ_H
 
index 595a275c36f87d5ea4fa58d0a580eb36c601ef34..586df4c9e2f2d44ac42e363c8099ff4173f13f88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2006, 2010
  *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 8a0b721a9b8d44085c71efb96a81c297b836dbf6..6cb9e2ed05b6c1b211f9d36fcb7e512399c61339 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_ISC_H
 #define _ASM_S390_ISC_H
 
index fb1bedd3dc0d7d3c42b41ae7af7d63ea13d26a0f..59b73961320de0fa0dadf6c37024024056d5b745 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Functions for incremental construction of fcx enabled I/O control blocks.
  *
index 9be198f5ee79213bd1cf48f53991121bdf12785a..40f651292aa78997232c74ae5f91afc0bbea035e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_JUMP_LABEL_H
 #define _ASM_S390_JUMP_LABEL_H
 
index 5c1abd47612a433fa6a33fbdc7a90b1cde66890d..d5327f0647995c7d676a01bb02a1aa7c7e32d138 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_KDEBUG_H
 #define _S390_KDEBUG_H
 
index dccf24ee26d3d3a7ae9449dd247ccca2c3beb110..1d708a419326eaf8e400e8be3e430301c3e0035e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2005
  *
index 27da78cf416da602a9fb60eac8c7e30b62e900ea..1b95da3fdd64e0d40d4960f89dfb3768298b5cec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index a6870ea6ea8b48083430d38ed628ed5964f42b84..917f7344cab6fbf627ee29f788f1de467b0690e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 1999, 2012
  *    Author(s): Hartmut Penner <hp@de.ibm.com>,
index 3f46a6577b8d70d891ee032777bbaaabb6ec8229..db35c41a59d50161ec2c34ae70e2aef264672c2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 3c9abedc323cbb488f46a7ae1d1bc40e4c7de9e1..43607bb12cc2b303e7e9f87d391f053ad0aae2d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index a9e834e60b840b20fdb5b2e10319a5491d250da0..73e3e7c6976c5ed4f6ff412ab87e737e05752b30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NUMA support for s390
  *
index df1f861a848a1ef85a2b902d7bf45a1ad6e81cef..e0a6d29846e260edd7842cbc59cb3f3dba2b7536 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_MODULE_H
 #define _ASM_S390_MODULE_H
 
index c8e211b9a0020b1245e05236630dee472debe16a..c8a7beadd3d4ce4f6112056fcd47950d3ea670e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *   Machine check handler definitions
  *
index dc19ee0c92aaa693d2ad3b8c4c614b3e0e427de7..35f8cbe7e5bb052ffbac5cba3420c162fc631838 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NUMA support for s390
  *
index 943475382d5155127c34c1bd49545b7fac100529..3c89279d2a4b11216ecaf77af1002109e6c9883d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * OS info memory interface
  *
index 22b0f49e87c1a74ec726be3440e100e80efc645f..c33c4deb545ffda9078bd6d1f5bb22804488060f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2017
  *    Author(s): Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
index 5d5c2b3500a4dd180d45857042354c19a396809f..41e3908b397f8f2faa5bab59266fec25c635a6a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index 386df9adef0a409ada718390eb3705fba78fc5c3..12fe3591034fe8fa73c7a3601ab8959d42250cb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_S390_PCI_H
 #define __ASM_S390_PCI_H
 
index 938b8cc19fc637598c089c2a87c74d4442e87b80..b3b31b31f0d33a0f1abdb84f796306fad4dc9ab8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_PCI_CLP_H
 #define _ASM_S390_PCI_CLP_H
 
index ac24b26fc065be9bad9443fc7a86cd1e24ab3abe..6c2c38060f8beb41d4820766c80c6d8d15379e7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_ASM_PCI_DEBUG_H
 #define _S390_ASM_PCI_DEBUG_H
 
index 92df3eb8d14ef45309a30f264e760e55f0fe3a11..e8d9161fa17aaa7bb886a5ce5d9d9341c69851dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_PCI_DMA_H
 #define _ASM_S390_PCI_DMA_H
 
index 34abcf2757995cdcc69a397d60f61cd1e5804ad3..419e83fa47217f2435cabc6478b57b04a3d1c39a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_PCI_INSN_H
 #define _ASM_S390_PCI_INSN_H
 
index 69aa18be61afcfc1e764c5c51ec5cbe5d0fe2043..cbb9cb9c65476d3268240d3cfe50fd348e9f4e1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_PCI_IO_H
 #define _ASM_S390_PCI_IO_H
 
index 90240dfef76a1f95ab2b2a611f716af7b784eab8..0095ddb58ff6979f4883e022368a4e0e21f36085 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_S390_PERCPU__
 #define __ARCH_S390_PERCPU__
 
index dd32beb9d30c02cd627729d8e307cabd6a4fa65d..79aa6421fedbaa725a69bc7dfa20ec92bf622944 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Performance event support - s390 specific definitions.
  *
index a0d9167519b19b51b401880d8f5b504c588044c0..bbe99cb8219d967ded4e04e995a010c159a05ff5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index dce708e061eac79a56b655eb71bb6bb63f3ce978..d7fe9838084d3b2df31b26d16d6d3f4074d9a35d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
@@ -1507,7 +1508,9 @@ static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
 static inline void pmdp_invalidate(struct vm_area_struct *vma,
                                   unsigned long addr, pmd_t *pmdp)
 {
-       pmdp_xchg_direct(vma->vm_mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_EMPTY));
+       pmd_t pmd = __pmd(pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID);
+
+       pmdp_xchg_direct(vma->vm_mm, addr, pmdp, pmd);
 }
 
 #define __HAVE_ARCH_PMDP_SET_WRPROTECT
index 4c484590d85894d3e9c55965c64a57b20cb58242..053117ba7328ca72322a0122f2b99930e8ea868f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Kernelspace interface to the pkey device driver
  *
index b0776b2c8dcffabc3ec8209a16c17cebf0124926..23a14d187fb1ba72b294ac3cd21aae49f69200dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PREEMPT_H
 #define __ASM_PREEMPT_H
 
index c25d57e0aad35f6c8ca6aab54b7ce9c4e8d6bbea..9cf92abe23c32ab495b5e4640f7904ab37cd0d54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 853b01245c209bb821e9907c8fa5617f8143dc16..2f84e77f1f1b9844133663842b220f842c529e80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index eaee69e7c42a05c5c835a736e85532cc74965c73..de11ecc99c7c46cf967a96c573f1a6c6d2cafc46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2000, 2008
  * Author(s): Utz Bacher <utz.bacher@de.ibm.com>
index fe11fa88a0e026500b0c3a7480e10095c764d4d3..6450b31ade0394b1965ba55c682113b4838ded76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2006
  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
index 402ad6df4897123e0e0b1a0eb0ba81157cb9380b..ea8896ba5afc77678017b72ec1bc571d4d39aac5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RUNTIME_INSTR_H
 #define _RUNTIME_INSTR_H
 
index 597e7e96b59e8b9bb2948d9ae43799641abcc375..f731b7b518bd1b979ef4da5141119b1bb4dae2a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_RWSEM_H
 #define _S390_RWSEM_H
 
index 40b47dfa9d66d4859ada7a44806484bef5561d89..3ac405a67ff0b2b722d79a1835097d127f315d4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_SCHID_H
 #define ASM_SCHID_H
 
index 6f5167bc19286d21f1489703b505073c8621953f..d3c1a8a2e3ad4be4d7c4fb7d2d5f30dbbe52bc27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
index 17a7904f001a3ec4acafdc6b56bd4cf80d9e70e3..79b7ffa91832746110ef1fa3541b1494513d71fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Helper functions for scsw access.
  *
index e10f8337367b31c3de87b045937070e5dd975f94..795bbe0d7ca639ad2d6e94633cadc3601e1dc7ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_SECCOMP_H
 #define _ASM_S390_SECCOMP_H
 
index fbd9116eb17bf2c73d80952af2108eecdf4db1ed..0ac3e8166e855caa26d9d0b206a6e81917d28f6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_SECTIONS_H
 #define _S390_SECTIONS_H
 
index 5b3e48ef534b757e4ff34aa2633b283fdfc41895..aaf85a69061ca61a7be2b9bd82ee591c4804bca5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_SERIAL_H
 #define _ASM_S390_SERIAL_H
 
index 46a4db44c47a74afac870091407fa09567f6eb04..c59a83536c70e8886a429bff46edd8bfbf0f99aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMS390_SET_MEMORY_H
 #define _ASMS390_SET_MEMORY_H
 
index 490e035b371690f5817200504990f57520f65d6b..f2c2b7cd90992dff3cb08eb6b99dba7fa5d6f2d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2010
index e985182738f82f0e76c1ebca4c5bd3fb29f8d8d8..e75d45649c54280b2a4cd52f0ce7ac9250c45b0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index abf9e57359431da40b5412f2099d932e3a1b3e4b..7daf4d8b5ee53d445bfbeb121c8cde42d4e5989f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index 020a8814d511e5c0f05d07888bda614e44721ff4..53ee795cd3d3995f25fc61a94c2ea47eb89cf4b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __S390_ASM_SIGP_H
 #define __S390_ASM_SIGP_H
 
index 3deb134587b744f41164c58255d9f2bba3c92dc0..babe83ed416c82bb7521ccfa130f695c9fec2343 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 1999, 2012
  *    Author(s): Denis Joseph Barrow,
index 334e279f1bcebde5ce82f39cede162574d3e3708..c549893602eabed1052400b168247204f5247366 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_SPARSEMEM_H
 #define _ASM_S390_SPARSEMEM_H
 
index 8182b521c42f010e94e6c06e9a49e6f32bf307da..f3f5e0155b10721d175f4c4fb0ac80427e665e37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index fe755eec275f1b2292248b1115f799b14c601ac4..1861a0c5dd475730013eb762e8a8398d0acdbe2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_TYPES_H
 #define __ASM_SPINLOCK_TYPES_H
 
index 7689727585b227de0a4eb343de6dc7f5fdf99d22..f0ddefb06ec88c22c35d02221c54c62c09b78c3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2006
  *  Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
index e5f5c7074f2c96f7c54ff1fe2b3b4cbe422c8a8d..27ce494198f5a67db5220755ba9b7207131e4b44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index f6c2b5814ab0d14cf0f70977d8d29607a6ca7c00..c21fe1d57c0096f3e5e17185bbddbd156d6622c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2009
  *
index db028d17f0611f7000884bb8cb319bbc6053cec4..46fa3020b41e75e626d23e268c55b7dca2ef3c86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index 1aecf432c48d413f9a8be0f279526ab5991f9d4b..0880a37b6d3befe6baf5afbf345c3a4b19397897 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 2002, 2006
index 93f2eb3f277c6550d54982403a8a04419ea8543f..64539c221672b8606001733c4f46feb9cce39491 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 3a14b864b2e30af5b1f1867ae59b069926a07d9d..457b7ba0fbb66de24fd82219e18a51ad2663221f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_TLB_H
 #define _S390_TLB_H
 
index b08d5bc2666e65f42e2444158133b712ec8dc1ff..8c840f0904f307b4faef8cbe46772bb037890e4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_TLBFLUSH_H
 #define _S390_TLBFLUSH_H
 
index 5222da162b69502942bdad09a56890e4e83d4bc4..55de4eb73604d924dc70bc8554dc578750620c4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390_TOPOLOGY_H
 #define _ASM_S390_TOPOLOGY_H
 
index cc6cfe7889da5351057c1f036b5ca293a0f8bffa..22fcac4ff9f060cc500cfbe160b5672d33100e1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Tracepoint header for s390 diagnose calls
  *
index adcb77fafa9deb42622022d6fedf1e5df30b9dc3..457ddaa99e19c80886f6182b7b41d9a304c8b75e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Tracepoint definitions for the s390 zcrypt device driver
  *
index 304cfe44df50cc4df75b90e40c3ab52c1d011ac4..cdd0f0d999e2617f0ec372828da9482d5fa6b021 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index 3066031a73feeeecde2a3ae6f9c5913bf9f8c7d6..7807093b73be0f3d587bc29f9c397cf631a1f746 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index 658393c65d7e385a6b8ae60bc4b82503da7a1484..b60b3c7ef699455d5f0cb6d7e733227cfaae708d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    User-space Probes (UProbes) for s390
  *
index 6ed1d1886333cb8c457c0bb1e12ceabcb0d2ca37..0ca572ced21b0e658a4b97b5095b8ed0fa239aed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
  *
index 88bdc477a843dde8a7ab08a9f6e8aa9d2219a067..bb2ce72300b0f05a8ef3a8dd54a21f24281abe9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __S390_VDSO_H__
 #define __S390_VDSO_H__
 
index af9896c53eb33a964effa4f00ceb66c7ddb1e3a0..3622d4ebc73aa8cebb8618bb149278ae33d8cbd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S390_VTIME_H
 #define _S390_VTIME_H
 
index 10a179af62d8c3f512a253752494b61c1801310f..42f707d1c1e8e1259c1c688fd77ae3a385aeb3d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2003, 2012
  *  Virtual CPU timer
index 49c24a2afce08770f84d112dcb7ae2b894be480b..266a72320e05ed92aaa75b3eef7dcaba679beab3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Support for Vector Instructions
  *
index c988df744a70886d63b0ae3a50e7aa3d91c237c7..857d6759b67f0df42cd7f713db22e2297875b517 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Optimited xor routines
  *
index c53e08442255c1bafd1319c3f877fd38c8e46c18..a056c4637ffcff08f64ae7d8cdd70f1bbf9480fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASMS390_AUXVEC_H
 #define __ASMS390_AUXVEC_H
 
index 6b235aea9c6635c1364af73524d575f626854062..cceaf47b021ad59687e7e71a37f5a79747581707 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_S390_BITSPERLONG_H
 #define __ASM_S390_BITSPERLONG_H
 
index a332e59e26fc0b302fdaa272aa442821bccd064a..1442b57dd91b39a0fff884869009060ca83c8caf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _S390_BYTEORDER_H
 #define _S390_BYTEORDER_H
 
index 6b4fb29cc197e5d9544fd124e61a742a41114464..2ae2ed8c09630440eac8d52f16461871a4a1883d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *    Copyright IBM Corp. 2007, 2012
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
index 65dc694725a85d29ba5d15781afff89fd717c59e..dc329aa03f7600e7bb763da5f96a4e56fd7a7ea6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ioctl interface for /dev/chsc
  *
index ab72d9d24373592c4357170a1fc6dc9e61778da4..b36d9e9cdde6377e2f846a258538a6cfc292a6b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ioctl interface for /dev/clp
  *
index 0c086d00d89e2fe02102a4f2ee0ec9c44438e1c5..ecbe9494140396345f33aeddaee56b1bf3a7a13d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPIS390_CMB_H
 #define _UAPIS390_CMB_H
 
index ab5797cdc1b79ca3c9c3903296446d81482caa52..451c601406b6901e6fd71fddaecbf431eb6715fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* 
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  * Bugreports.to..: <Linux390@de.ibm.com>
index c59fc79125f21a416b73776794edff50aef92ff8..c7c564d9aea48c9ee5675c400671087debb1a62b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *   S/390 debug facility
  *
index 852850e8e17eb0f3098db6e5cc66eedd13352114..666af1c33b59370379a64dc5130c65d1284daeed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _GUARDED_STORAGE_H
 #define _GUARDED_STORAGE_H
 
index b3fe12d8dd87f7e642cfd7a3a4836f583996bed7..fe6174e142cf0327548c3e26fbcaf3b38bfab52e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Structures for hypfs interface
  *
index 960a4c1ebdf188bcfd9837b5cd33abaf0962d74e..342a3284e69a1ec841bca24489893988a6343d02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ARCH_S390_IOCTLS_H__
 #define __ARCH_S390_IOCTLS_H__
 
index 37f293d12c8f11a771abb31c49c44a5f70f001dd..5b1c4f47c656c09af1bffd218420d2ff7a19145b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __S390_IPCBUF_H__
 #define __S390_IPCBUF_H__
 
index cd7359e23d869465d1cb70b637c64c85283e37ac..9ad172dcd912d5763b0bf954617c9e398ad31aa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_KVM_S390_H
 #define __LINUX_KVM_S390_H
 /*
index ff1f4e7b30157849b8673cfc369e92b2c0d695f4..0dc86b3a7cb0d6340d9de5bee6032f6bfcc0c85c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * User API definitions for paravirtual devices on s390
  *
index 397282727e21890cf5bd0d4459f3ae30eb78fa0d..c36c97ffdc6fa24f246c41bfe993790410e4e032 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for perf-kvm on s390
  *
index 44a438ca9e72d320a2e0e31ae2753ceebee6deb0..73283677a132ad46af5601d510dc5281466a8c31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * definition for virtio for kvm on s390
  *
index f845c8e2f86158f5d899ff7ac0a41fd3ebbb5dca..03d172f314a3aad76625ad250e863ae67b33c134 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright IBM Corp. 2006
  * Character device driver for writing z/VM APPLDATA monitor records
index 1bbdee927924e394307113ec9aa8fbb8aa4dd2f4..604f847cd68cd4ca4a4adb6cdbff9ea37d2bda61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _S390_MSGBUF_H
 #define _S390_MSGBUF_H
 
index e6c04faf8a6cce232dea5c0ed9a0c2a58dfa0840..6f84a53c3270eebb1bf4bbb88b1b79595b6a6e2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Userspace interface to the pkey device driver
  *
index bf2a2ad2f8004ab36e98d49fccb084a67fba0049..2a3fc638414b3b60b215ae1ca243291b5544e0ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index 77630c74f13b13ea7510d0203aa35251c0f148a4..0d23c8ff290085b43745fdc23cd18a2911624aca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index 3a896cf52589c7ee19ba383c83284ca2063763f2..fac9995dfe330e5944d740ba8d94affed45b8efe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ioctl definitions for qeth driver
  *
index 32f3ab2a82002233f3cd70cdd2631abb4e337075..58fca6f4841016dc3b3e16041988ecf6353efde7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPIASM_SCHID_H
 #define _UAPIASM_SCHID_H
 
index f2818613ee4191de4946ccc2fa8e55eee3d15e78..e4e8c4dcd1267a163b5dc33cc6aac472b7f8941c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * IOCTL interface for SCLP
  *
index 32626b0cac4bb625682a721ff61147d94301f670..3e917697b668a4ea1900d529ee4a35a8de636b04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _S390_SEMBUF_H
 #define _S390_SEMBUF_H
 
index 5a637e3e385e9a8a3a74b772779e87fbe7aaf4e9..1f8803a31079527f55b622c7794ff1c56328f3fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2010
index eed2e280ce37aa486a9fa6b40bc58da2139ff25f..9cdce8d7ce600be56e3409052b500c2325eceb62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _S390_SHMBUF_H
 #define _S390_SHMBUF_H
 
index 3ac6343689394d0b128907a3f338958ec0f32471..6ca1e68d7103139f1ef6029980aea2f3198072be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_S390_SIE_H
 #define _UAPI_ASM_S390_SIE_H
 
index 5f0b8d7ddb0bce1ad36dd45f70ab757e5a33e99f..8b35033334c4658f8e8b373d650f8973812240bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index 91fd3e4b70ce0decf20f6c22bbb8bf0338180b27..6984820f2f1c303ae3d7f8c8f55ae07398fc77d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index 2f43cfbf5f1a0036e5b911d94148a745f6d415a0..c57f9d28d8940e8691328bb8eaf5af877541651b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index a56916c835654b4eae4781758d13865994fcbaa4..3510c0fd06f4004aeccc4d1e21dded8f5ca8a00a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index b4ca97d91466a5f36cd4957eb7f090755e045f7d..ac253d23606b0231a41b4f25aaeb02aee438acb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index 471eb09184d4558ae59963adac953443bc055fbe..72604f7792c33642aed1907bb0a69effd8b06991 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index b2bc4bab79294210328534624946525c2c6f1b03..90266c6964868533ea88f3895566cd7e0f9b83ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*************************************************************************
  *
  *        enables user programs to display messages and control encryption
index 554f973db1e6badb2b233b82c2163e2cec4f5f88..54223169c806e6c7cdf859b111b272eda6a0d9aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index 3c3951e3415be0efd38b348bda8bea922b17d10a..da034c606314dfffaddd5612e0b583f8639e327d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index 64a69aa5dde041cc733265b90aca197044d1fedb..c95f42e85337be23121fb139666a9d3d52736477 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index ea42290e7d51f7673b194c32ebda31c2158b21e2..b52bce8ee941a66746f5fee24655ded7ad01650c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  S390 version
  *
index a9a4ebf79fa74f4c81df45d63218a8d57ccc6fed..967aad39010515cd9614e51529517712630bbf4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for virtio-ccw devices.
  *
index 221419de275ec6736650fb6e22bbc4942835eb4f..50c1d7b9e844c90c1652f3d887ae9e71885e126e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file contains volume label definitions for DASD devices.
  *
index a777f87ef889591a0313078560b4b5d0b5dc0afe..137ef473584ee5e2c6e42f70857cadd4e90df3b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  include/asm-s390/zcrypt.h
  *
index adb3fe2e3d42df72bba0586bc5254f087bb13845..4ce2d05929a7a21853e15d10d317fa0a31591d7d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 14769eb52a33aa8d29e5a6475fd51c6ef462a48e..d1892bf36cabfa8166aec5c332918ad885f71b35 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2016
  */
index 3d42f91c95fd7ded7daa1654ab200486e902ce13..0e6d2b032484a8bfc02ac1c8683c3dd1c8c34b91 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed to extract
index f4932c22ebe4f86d6bf13c02c099e81f58a4569d..d395c6c9944cf17433aa71f0b3c5fd0747d2e741 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index 12b56f4b5a73cce6113b21e98071608d43d542b0..4d4b596412ec257f3cc8760b9cbba7e0afc28e82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_S390_KERNEL_AUDIT_H
 #define __ARCH_S390_KERNEL_AUDIT_H
 
index 326f717df587c749116a6e9853a5b246188108a8..f6c56009e822473d701cecbc896d3693b080d6c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  arch/s390/kernel/base.S
  *
index c8a83276a4dcb2413765356dd63f61bde30e6817..d66825e53fce3a7fa1d795732907b0a03430216e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Extract CPU cache information and expose them via sysfs.
  *
index d6487bf879e5bc098d67339764ee1d03fa43d1ef..444fb1f6694472570b515a330c9f3147ace8d2b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef __s390x__
 #include <asm/unistd.h>
 #include "audit.h"
index a3d14161abcb3be7741b616115492b580c608a73..f04db3779b34507f9dd38791fc89131505d5f0c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 2000
index a0a886c0497759e0338acd45157f267d57a724fb..64509e7dbd3bf2ede50f60ebcd11aeab60b31ca0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_S390X_S390_H
 #define _ASM_S390X_S390_H
 
index 12b823833510c4211ecd38f7a9e1aff290a3ec4e..3c400fc7e987b47d06a46e7021b789bbddb28b5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PTRACE32_H
 #define _PTRACE32_H
 
index f549c4657376a4cec8009ada0a5d6b366d1d02f2..a4a1208e3df332988bb466b52542d9dba9bec05a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2000, 2006
  *    Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
index 986642a3543bb0a1e670613ccc50a3804d452480..d049185839715fb8aeb783d495632ec6581215f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Compat system call wrappers.
  *
index 63bc6603e0ed835f8b2d3adf628aaa599557dbba..af013b4244d346598a29db32b49af71f20e785fe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2007
index d628afc267087cc2a01044a0113a1024846951c7..9f5ea9d870690aea40742e4d5b3181bb637623cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * S390 kdump implementation
  *
index 1d9e83c401fcf32f7ba16e5298641bfb334226ac..05a9cf4ae9c2409c86fcbde39c37b26e0ef0693e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *   S/390 debug facility
  *
index 349914571772e1313fa1dccaffaf193123dc06c3..53a5316cc4b7e557b8eb4b71aa78738d2d2ecf11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of s390 diagnose codes
  *
index ca8cd80e8feb7c6f01be173a76471420020e2bb6..b945448b9eae8cea488ac32ba7ede48fc6e133e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2007, 2009
  *    Author(s): Hongjie Yang <hongjie@us.ibm.com>,
@@ -404,18 +405,6 @@ static inline void save_vector_registers(void)
 #endif
 }
 
-static int __init topology_setup(char *str)
-{
-       bool enabled;
-       int rc;
-
-       rc = kstrtobool(str, &enabled);
-       if (!rc && !enabled)
-               S390_lowcore.machine_flags &= ~MACHINE_FLAG_TOPOLOGY;
-       return rc;
-}
-early_param("topology", topology_setup);
-
 static int __init disable_vector_extension(char *str)
 {
        S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX;
index 819cb15c67e8b71f01100a098c9b0c22e0373da7..9431784d7796b57cd16604795ea35c8b8f8c235e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2017
  */
index 1d5392b36ad81a69ba6583dc8d2cbee4fa340267..c15caeab1dbfb1257e18d138680a786f4a1c1a11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    ECBDIC -> ASCII, ASCII -> ECBDIC,
  *    upper to lower case (EBCDIC) conversion tables.
index 21900e1cee9c2e4f35c5bfc5bcb125b303a0d067..7c6904d616d877330ae5768a9ad348e298a1562e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    S390 low-level entry points.
  *
@@ -521,12 +522,15 @@ ENTRY(pgm_check_handler)
        tmhh    %r8,0x0001              # test problem state bit
        jnz     2f                      # -> fault in user space
 #if IS_ENABLED(CONFIG_KVM)
-       # cleanup critical section for sie64a
+       # cleanup critical section for program checks in sie64a
        lgr     %r14,%r9
        slg     %r14,BASED(.Lsie_critical_start)
        clg     %r14,BASED(.Lsie_critical_length)
        jhe     0f
-       brasl   %r14,.Lcleanup_sie
+       lg      %r14,__SF_EMPTY(%r15)           # get control block pointer
+       ni      __SIE_PROG0C+3(%r14),0xfe       # no longer in SIE
+       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
+       larl    %r9,sie_exit                    # skip forward to sie_exit
 #endif
 0:     tmhh    %r8,0x4000              # PER bit set in old PSW ?
        jnz     1f                      # -> enabled, can't be a double fault
index dbf5f7e182469da8754b6c407396798938bd839c..905bde78249099780e33d2c149d4e123122a8148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ENTRY_H
 #define _ENTRY_H
 
index 1235b9438df4f79521f5541f002f1982719c6045..594464f2129d4706fc4786d2de55d7c73974c97c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * In-kernel vector facility support functions
  *
index d03a6d12c4bdc4118c3c10e0c80e90822cac6a03..dc76d813e4207e34b9c30cc181b3cec6ed1f5e99 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dynamic function tracer architecture backend.
  *
index 6f064745c3b1ba0960b81bc80351e5c13451915e..bff39b66c9ffdebe0faeab48d13e7c61312faf87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 8ed753c72d9bec259b0f6117b2674fc10dcc730f..b86fa3ee4927fee614c863ed6c13f9be54e471cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2010
  *
index 0d8f2a858ced7d87d8e8130a07728a6245cded55..172002da70754eb31d3d512f75db46e304fc1eb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999, 2010
  *
index d05950f02c341bcf654bbe8f5dca644760f6e7f9..174d6959bf5bd7d0ba498e532da5322f633f6225 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * S390 kdump lowlevel functions (new kernel)
  *
index 9340b2a07935dee71400f577a95ec1555f1482f0..b9d8fe45737aa2e529cb9eec244349e121803858 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Idle functions for s390.
  *
index a2fdff0e730bdbc25994bdad77aa5b12e052dd17..94f2099bceb04cbfdc73d8f498a42e777a4b4e07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2004, 2011
  *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>,
index 262506cee4c32e61eaeb08e24089a2f60eef7e93..43f8430fb67d50aa44d3a4636d43b83bda17951e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Jump label s390 support
  *
index ee85e17dd79dd8c7003263c6c45cf88bf9cb3c6d..2c46bd6c6fd2835b3f764b3e45f25690f7946373 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/debugfs.h>
 #include <linux/export.h>
 #include <linux/init.h>
index 3d0b14afa23258efa6047baa0954e1731fb166bb..b0ba2c26b45e4ebe2b20b709c4618cf96eba5df2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2005, 2011
  *
index 9a17e4475d2779d088fc3fb1deabf250dd09a94f..82df7d80fab22090cb943e1d54562ee00acfaec2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2008, 2009
  *
index 753ba63182b966eced22c3723e7c263077ed72ed..0a5e4bafb6ad1eca70409f285ba110270999be6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * OS info memory interface
  *
index d3133285b7d1777cdf19b73094bcb0d3645a4ced..08bfa17ba0a0699937b1bfb725fadd4c94957479 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Perf PMU sysfs events attributes for available CPU-measurement counters
  *
index c1bf75ffb8756549b1c6a5c97908ff49dd2e79aa..7e1e40323b78e1bb7a3910e1191dfbe40027b748 100644 (file)
@@ -823,9 +823,12 @@ static int cpumsf_pmu_event_init(struct perf_event *event)
        }
 
        /* Check online status of the CPU to which the event is pinned */
-       if ((unsigned int)event->cpu >= nr_cpumask_bits ||
-           (event->cpu >= 0 && !cpu_online(event->cpu)))
-               return -ENODEV;
+       if (event->cpu >= 0) {
+               if ((unsigned int)event->cpu >= nr_cpumask_bits)
+                       return -ENODEV;
+               if (!cpu_online(event->cpu))
+                       return -ENODEV;
+       }
 
        /* Force reset of idle/hv excludes regardless of what the
         * user requested.
index 036aa01d06a941f4856d8f73b4e5ebb2de3be553..3e62aae34ea3f4070ba61b455688f16ca98b7de3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Program check table.
  *
index bb32b8618bf61836888d383c5b3fe1c9a352c0d2..a4a84fb080468374afa966475d4f2fb710da536e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file handles the architecture dependent parts of process handling.
  *
index 778cd653617553bcd1428b44468748ea13643bf4..5362fd868d0d42e73eaf73c8abb63e7dc94d4580 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright IBM Corp. 2008
  *  Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
index 252ed61a128b8689a3cbacf592031adeeab5c6cc..1427d60ce628ce91ce2ff4f6b28994a0442bfd7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Ptrace user space interface.
  *
index 89ea8c213d8235f3b4dece6746d3b98bd6d2b4c5..a40ebd1d29d0ebc5a3d415f33edd8a4db32e5799 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp 2000, 2011
  *    Author(s): Holger Smolinski <Holger.Smolinski@de.ibm.com>,
index 4bdc656366031ea5bd8411829aecdefb87359683..ca37e5d5b40cc3ff37ec4873fdd2ed81c69f4f80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2005
  *
index 429d3a782f1cb8c4062d8f713e7b05da9db6137c..32aefb215e59ffead32c88a02224da70200a5643 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2012
  * Author(s): Jan Glauber <jang@linux.vnet.ibm.com>
index 289dd50f974452fed0d42245bfd6f39940cc5743..2d2960ab3e108ca5b0d6ef06476987ed8d5f4839 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 1999, 2006
  *    Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
index 1cee6753d47a5cba115730cb73cef4324e8d3ed1..092c4154abd74c0ceda7592946f91a64674fdb58 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  SMP related functions
  *
@@ -293,7 +294,10 @@ static void pcpu_attach_task(struct pcpu *pcpu, struct task_struct *tsk)
        lc->lpp = LPP_MAGIC;
        lc->current_pid = tsk->pid;
        lc->user_timer = tsk->thread.user_timer;
+       lc->guest_timer = tsk->thread.guest_timer;
        lc->system_timer = tsk->thread.system_timer;
+       lc->hardirq_timer = tsk->thread.hardirq_timer;
+       lc->softirq_timer = tsk->thread.softirq_timer;
        lc->steal_timer = 0;
 }
 
index c8ea715bfe101d43cf6d7ccac6ac17eb8bc6be1b..a8af9c825628e7043d3084126324cbcd26e76d76 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Suspend support specific for s390.
  *
index 6bebc935e9c2da9c50ffc0078bb816bd01f43ec1..e99187149f1717f1ec81c94ea12cc77fa964c2fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * S390 64-bit swsusp implementation
  *
index b7af452978ca8d478ee070c84c9191d52a1ef511..0090037ab1482bd9d38391387e551015ecb9e080 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index 54fce7b065de2610c762763764cf1b97f7805b02..d39f121e67a987ce7037ae3ae11b5f2cca91e5bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * definitions for sys_call_table, each line represents an
  * entry in the table in the form
index fb869b10382567d3be66c1c73e7beaa06876f942..a441cba8d165c5c034cfa5bb72628eaf885f1498 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright IBM Corp. 2001, 2009
  *  Author(s): Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
index bb47c92476f0d852ded0b9b50f9756e46480e9b9..ed0bdd220e1a643788655fbefaef328dd38c7951 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <linux/workqueue.h>
 #include <linux/bootmem.h>
+#include <linux/uaccess.h>
+#include <linux/sysctl.h>
 #include <linux/cpuset.h>
 #include <linux/device.h>
 #include <linux/export.h>
 #define PTF_VERTICAL   (1UL)
 #define PTF_CHECK      (2UL)
 
+enum {
+       TOPOLOGY_MODE_HW,
+       TOPOLOGY_MODE_SINGLE,
+       TOPOLOGY_MODE_PACKAGE,
+       TOPOLOGY_MODE_UNINITIALIZED
+};
+
 struct mask_info {
        struct mask_info *next;
        unsigned char id;
        cpumask_t mask;
 };
 
+static int topology_mode = TOPOLOGY_MODE_UNINITIALIZED;
 static void set_topology_timer(void);
 static void topology_work_fn(struct work_struct *work);
 static struct sysinfo_15_1_x *tl_info;
@@ -59,11 +69,26 @@ static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu)
        cpumask_t mask;
 
        cpumask_copy(&mask, cpumask_of(cpu));
-       if (!MACHINE_HAS_TOPOLOGY)
-               return mask;
-       for (; info; info = info->next) {
-               if (cpumask_test_cpu(cpu, &info->mask))
-                       return info->mask;
+       switch (topology_mode) {
+       case TOPOLOGY_MODE_HW:
+               while (info) {
+                       if (cpumask_test_cpu(cpu, &info->mask)) {
+                               mask = info->mask;
+                               break;
+                       }
+                       info = info->next;
+               }
+               if (cpumask_empty(&mask))
+                       cpumask_copy(&mask, cpumask_of(cpu));
+               break;
+       case TOPOLOGY_MODE_PACKAGE:
+               cpumask_copy(&mask, cpu_present_mask);
+               break;
+       default:
+               /* fallthrough */
+       case TOPOLOGY_MODE_SINGLE:
+               cpumask_copy(&mask, cpumask_of(cpu));
+               break;
        }
        return mask;
 }
@@ -74,7 +99,7 @@ static cpumask_t cpu_thread_map(unsigned int cpu)
        int i;
 
        cpumask_copy(&mask, cpumask_of(cpu));
-       if (!MACHINE_HAS_TOPOLOGY)
+       if (topology_mode != TOPOLOGY_MODE_HW)
                return mask;
        cpu -= cpu % (smp_cpu_mtid + 1);
        for (i = 0; i <= smp_cpu_mtid; i++)
@@ -184,10 +209,8 @@ static void topology_update_polarization_simple(void)
 {
        int cpu;
 
-       mutex_lock(&smp_cpu_state_mutex);
        for_each_possible_cpu(cpu)
                smp_cpu_set_polarization(cpu, POLARIZATION_HRZ);
-       mutex_unlock(&smp_cpu_state_mutex);
 }
 
 static int ptf(unsigned long fc)
@@ -223,7 +246,7 @@ int topology_set_cpu_management(int fc)
 static void update_cpu_masks(void)
 {
        struct cpu_topology_s390 *topo;
-       int cpu;
+       int cpu, id;
 
        for_each_possible_cpu(cpu) {
                topo = &cpu_topology[cpu];
@@ -231,12 +254,13 @@ static void update_cpu_masks(void)
                topo->core_mask = cpu_group_map(&socket_info, cpu);
                topo->book_mask = cpu_group_map(&book_info, cpu);
                topo->drawer_mask = cpu_group_map(&drawer_info, cpu);
-               if (!MACHINE_HAS_TOPOLOGY) {
+               if (topology_mode != TOPOLOGY_MODE_HW) {
+                       id = topology_mode == TOPOLOGY_MODE_PACKAGE ? 0 : cpu;
                        topo->thread_id = cpu;
                        topo->core_id = cpu;
-                       topo->socket_id = cpu;
-                       topo->book_id = cpu;
-                       topo->drawer_id = cpu;
+                       topo->socket_id = id;
+                       topo->book_id = id;
+                       topo->drawer_id = id;
                        if (cpu_present(cpu))
                                cpumask_set_cpu(cpu, &cpus_with_topology);
                }
@@ -254,6 +278,7 @@ static int __arch_update_cpu_topology(void)
        struct sysinfo_15_1_x *info = tl_info;
        int rc = 0;
 
+       mutex_lock(&smp_cpu_state_mutex);
        cpumask_clear(&cpus_with_topology);
        if (MACHINE_HAS_TOPOLOGY) {
                rc = 1;
@@ -263,6 +288,7 @@ static int __arch_update_cpu_topology(void)
        update_cpu_masks();
        if (!MACHINE_HAS_TOPOLOGY)
                topology_update_polarization_simple();
+       mutex_unlock(&smp_cpu_state_mutex);
        return rc;
 }
 
@@ -289,6 +315,11 @@ void topology_schedule_update(void)
        schedule_work(&topology_work);
 }
 
+static void topology_flush_work(void)
+{
+       flush_work(&topology_work);
+}
+
 static void topology_timer_fn(unsigned long ignored)
 {
        if (ptf(PTF_CHECK))
@@ -459,6 +490,12 @@ void __init topology_init_early(void)
        struct sysinfo_15_1_x *info;
 
        set_sched_topology(s390_topology);
+       if (topology_mode == TOPOLOGY_MODE_UNINITIALIZED) {
+               if (MACHINE_HAS_TOPOLOGY)
+                       topology_mode = TOPOLOGY_MODE_HW;
+               else
+                       topology_mode = TOPOLOGY_MODE_SINGLE;
+       }
        if (!MACHINE_HAS_TOPOLOGY)
                goto out;
        tl_info = memblock_virt_alloc(PAGE_SIZE, PAGE_SIZE);
@@ -474,12 +511,97 @@ out:
        __arch_update_cpu_topology();
 }
 
+static inline int topology_get_mode(int enabled)
+{
+       if (!enabled)
+               return TOPOLOGY_MODE_SINGLE;
+       return MACHINE_HAS_TOPOLOGY ? TOPOLOGY_MODE_HW : TOPOLOGY_MODE_PACKAGE;
+}
+
+static inline int topology_is_enabled(void)
+{
+       return topology_mode != TOPOLOGY_MODE_SINGLE;
+}
+
+static int __init topology_setup(char *str)
+{
+       bool enabled;
+       int rc;
+
+       rc = kstrtobool(str, &enabled);
+       if (rc)
+               return rc;
+       topology_mode = topology_get_mode(enabled);
+       return 0;
+}
+early_param("topology", topology_setup);
+
+static int topology_ctl_handler(struct ctl_table *ctl, int write,
+                               void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+       unsigned int len;
+       int new_mode;
+       char buf[2];
+
+       if (!*lenp || *ppos) {
+               *lenp = 0;
+               return 0;
+       }
+       if (!write) {
+               strncpy(buf, topology_is_enabled() ? "1\n" : "0\n",
+                       ARRAY_SIZE(buf));
+               len = strnlen(buf, ARRAY_SIZE(buf));
+               if (len > *lenp)
+                       len = *lenp;
+               if (copy_to_user(buffer, buf, len))
+                       return -EFAULT;
+               goto out;
+       }
+       len = *lenp;
+       if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len))
+               return -EFAULT;
+       if (buf[0] != '0' && buf[0] != '1')
+               return -EINVAL;
+       mutex_lock(&smp_cpu_state_mutex);
+       new_mode = topology_get_mode(buf[0] == '1');
+       if (topology_mode != new_mode) {
+               topology_mode = new_mode;
+               topology_schedule_update();
+       }
+       mutex_unlock(&smp_cpu_state_mutex);
+       topology_flush_work();
+out:
+       *lenp = len;
+       *ppos += len;
+       return 0;
+}
+
+static struct ctl_table topology_ctl_table[] = {
+       {
+               .procname       = "topology",
+               .mode           = 0644,
+               .proc_handler   = topology_ctl_handler,
+       },
+       { },
+};
+
+static struct ctl_table topology_dir_table[] = {
+       {
+               .procname       = "s390",
+               .maxlen         = 0,
+               .mode           = 0555,
+               .child          = topology_ctl_table,
+       },
+       { },
+};
+
 static int __init topology_init(void)
 {
        if (MACHINE_HAS_TOPOLOGY)
                set_topology_timer();
        else
                topology_update_polarization_simple();
+       register_sysctl_table(topology_dir_table);
        return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching);
 }
 device_initcall(topology_init);
index dde7654f5c68e5d117d3493d9c0f130f2e24e830..490b52e85014538937d0c67e73a8bf6bf11c7cf9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tracepoint definitions for s390
  *
index 442e5423ce3dbc729b06c2eb7f9ce8ed878daff5..a5297a22bc1eafc1b7f8b6d2b1b8f8595b601203 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999, 2000
index d94baa8db507cc1cad8fdca9a04d74e8f3d1c8da..d9d1f512f019415ed36912e7afd81156fbd284ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  User-space Probes (UProbes) for s390
  *
index 6cc947896c77e48dbcf4a76ce21563ceff381383..308564b9bf6864eb9af3ba9d17d1d900a0b1bfd1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # List of files in the vdso, has to be asm only for now
 
 KCOV_INSTRUMENT := n
index c1ed0b72030f5a2f67b350d97d55ac963d57ba17..6e30769dd017654550617efa39f02a07814dd5ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Userland implementation of getcpu() for 32 bits processes in a
  * s390 kernel for use in the vDSO
index 79a071e4357e4bc51f8813427d0f0ffa4c5ba56c..db19d0680a0afdf34b85eddf418a7e822dcad0a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
  * Here we can supply some information useful to userland.
index 263a7f9eee1eec82295891ad30fcd00bc0ac1407..721c4954cb6e731d37a778f5bc9116e21417f9a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is the infamous ld script for the 32 bits vdso
  * library
index ae42f8ce350bcb5047e6b553749fa6dc453295c7..de2fb930471af7293f408be4d3475d88772d2ce6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/page.h>
index 2d54c18089eb6531778c9421ddbfa7e014d94c09..f81ae799888394cab67c4ba76743e4a901a04b44 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # List of files in the vdso, has to be asm only for now
 
 KCOV_INSTRUMENT := n
index 4cbe98291931402766f3fe3ff49e3d0bbee82eb9..43983764b959827951ddb121ff8158dabbfa1a12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Userland implementation of getcpu() for 64 bits processes in a
  * s390 kernel for use in the vDSO
index 9e3dbbcc1cfc3363af7f7d4a9cfbcd7e58034aaa..7ddb116b5e2e8aeae3746f08b3ee95ec14e70eb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is the infamous ld script for the 64 bits vdso
  * library
index c245842b516fdfa490e2c877252730cfc8fb5589..672184998623bbc50f7b858c7dc8d954e86d9dae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/page.h>
index 6e2c42bd1c3badbc4837176aeb1e266d86890bcf..96a713a470e77a67a56c0b18f3db29b02ccf2471 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script to make s390 Linux kernel
  * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  */
index b1900239b0ab2cbe27e7b5be3f78d8fdacbfe5dd..9a4594e0a1ffe2a79b8f8233351f2c2b96b1b438 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index 3cc77391a10229cfd1eb1f3d375327005bdd0c33..c24bfa72baf79c95f7c37124d9ed2cdd4c9de33b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * guest access functions
  *
index 78b7e847984a6a143f7abddd9f482779f8eb0537..6f0209d45164f0a6793288a883742f6b52f037d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVMS390_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVMS390_H
 
index 4fc9d4e5be89c69aaf9465d45e2409b41b4a1ab6..aa419eb6a0c808ac87b03d9a2dfdcb531b983870 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_H
 
index 1d1af31e83546cb5609d52470f363302fd18ab35..9bfe0802684ba5ee9efcbdb5b31bc65f83cef774 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for s390-specific library files..
 #
index 7f17555ad4d58208eeedf2230e9cdf9d0a7b4eec..d4aa1079560530fbf0173305ccdc48409f4543c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Precise Delay Loops for S390
  *
index d90b9245ea417a418d78db53f9867d47483d8d2f..96a8a2e2d067970772132785d2af3f823c1d342b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MSB0 numbered special bitops handling.
  *
index 7ff79a4ff00cd9fae70d83f4674f6f8a01033967..d66751397e721e7eee8a2ea117ab8d4c8549f248 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * String handling functions.
  *
index 1963ddbf4ab385898160ce1d75881201b9c848c8..1e184a03442d46b90ffd95a440235939afef22ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Common helper functions for kprobes and uprobes
  *
index b12663d653d82879fb38db734b82b4dc3ec7cf2e..1dc85f552f4817fb7187b800155db64bfe958789 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Out of line spinlock code.
  *
index 4ee27339c7921fbc11cd5c02c042deaf39a3fd94..dbf2fdad2724a991327a424bf273e9a4c8f11386 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Optimized string functions
  *
index 4ea9106417ee0f177df50a6187c6e2436972f4ca..802903c50de125f54f8b4f3713e243c0b85a5b6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Standard user space access functions based on mvcp/mvcs and doing
  *  interesting things in the secondary space mode.
index b4fd05c36151ea020c28a812cadfb9bc6c01a2ad..96580590ccaf04c4f110c6a3e05c0078945bc3de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Optimized xor_block operation for RAID4/5
  *
index 0aa0ad165d8b95fcd3eca000f7eedeee3714f319..33fe418506bc7743606a7bf2299e8a715741c09c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux s390-specific parts of the memory manager.
 #
index 049c3c455b32e7732420f748a8aa6a57704c8826..507f23ba2034b7cc48bdfef14b304e358e5e8615 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/seq_file.h>
 #include <linux/debugfs.h>
 #include <linux/sched.h>
index 9f118629b55fb64069fc90c6b1e816aa19d25e62..920d408945359351e20e2ae397598390a0ad2f27 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Carsten Otte <cotte@de.ibm.com>
  *                 Rob M van der Heij <rvdheij@nl.ibm.com>
index bdabb013537b2e0c6f2cbded853963b3b581df3f..242b78c0a9ec84ba7a956d197cdd887bf86c9ebd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 8ecc25e760fa6dfba0f082cfd8dff38b8c33d9e9..05c8abd864f1df27d9c3b6a8aba58964fd17222e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Lockless get_user_pages_fast for s390
  *
@@ -56,13 +57,12 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 static inline int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
                unsigned long end, int write, struct page **pages, int *nr)
 {
-       unsigned long mask, result;
        struct page *head, *page;
+       unsigned long mask;
        int refs;
 
-       result = write ? 0 : _SEGMENT_ENTRY_PROTECT;
-       mask = result | _SEGMENT_ENTRY_INVALID;
-       if ((pmd_val(pmd) & mask) != result)
+       mask = (write ? _SEGMENT_ENTRY_PROTECT : 0) | _SEGMENT_ENTRY_INVALID;
+       if ((pmd_val(pmd) & mask) != 0)
                return 0;
        VM_BUG_ON(!pfn_valid(pmd_val(pmd) >> PAGE_SHIFT));
 
index 44a8e6f0391ec28af96b4ffb3bc50593174d8a69..e804090f4470fce93446cdde89cd5170d6c25644 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  IBM System z Huge TLB Page Support for Kernel.
  *
index 3b567838b905f99ff8a755a90647520ba9348d00..41ba9bd53e48aa42dc967cce60902f3a5c554b9b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  S390 version
  *    Copyright IBM Corp. 1999
index 792f9c63fbca5b97e03d1251bfff1facc987f9c4..7be06475809b875fd513173c617fe6683fb1f37d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Access kernel memory without faulting -- s390 specific implementation.
  *
index e58dca05b9627cab38b16d5e9c6cfedb3c5a3043..21f6c82c8296cf24e8dd4f516e23dfef37f75499 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2008, 2009
  *
index 07fa7b8ae233a6eb700726fc649871ec0fb174c3..382153ff17e30e5203b217654d6b25fa0ddd78e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2008
  *
index 552f898dfa74c1452388ff202ac5502a19e31748..c44171588d081444d724719208f366b24492cda0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2011
  * Author(s): Jan Glauber <jang@linux.vnet.ibm.com>
index 05f1f27e6708f31642b9297013109702127c73b2..cc2faffa7d6ef49def16e2ba1204f23b98a52f8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Page table allocation functions
  *
index c0af0d7b6e5feeb348f8c7bfd2e107a3ff4ab295..f2ada0bc08e6def45700a6cb0c8a5185aa8a536c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2006
  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
index a1c917d881ec41056f8e80cac7c9736f66ffa9a2..25bb4643c4f46cc3bcbf904e9fc257a3145f4221 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * BPF Jit compiler for s390, help functions.
  *
index fda605dbc1b44b08e62f30b15b1d4d6b6283cbb3..7fa55ccffe480e55d35cd81b643409c5e6015fce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * BPF Jit compiler defines
  *
index 8ec88497a28dace3e25e371e4347693c053678eb..b15cd2f0320f81925a76bec3a2afe0fea094d2f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * BPF Jit compiler for s390.
  *
index cfd08384f0abfe287c5a5fcf9762e638a7decb19..83b222c576097b5a588cf65a77d210f128ad4a66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NUMA support for s390
  *
index f576f1073378f2ac6d5c0f0913e3974d3c768621..06a80434cfe63f69c7c7ff2e86caba734161484e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NUMA support for s390
  *
index 08953b0b1c7fb5026b68d01a532ba292617821dd..dfd3e27840817ca583da975bf734e35d53c0faca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NUMA support for s390
  *
index 26f622b1cd111c7d1fb7d0f4ab665f6d67d91e9b..21d1e8a1546d061f829a83cd513a17b6a9d4ccc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NUMA support for s390
  *
index bdf502027af49f360e4f9c329f3c4fae8563bc95..5246371ec713f79ba03562dbac1c3a817ce837e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NUMA support for s390
  *
index e9dd41b0b8d332f3ef9a2ca58ed7f0f869fef818..36261f9d360b71479cfd4f03010dd6712a5f17f1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index 9a4de4599c7b99a82f4a38989a309c896f4e73f3..43d9525c36fc3e491525acd7d50caf3ae79802a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * S390 Version
  *   Copyright IBM Corp. 2002, 2011
index 0ae3936e266fe707e29a8d6169e6a002de1b49a5..93cd0f1ca12bb4788cb79354940defd397de1f1a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2012
  *
index 0bbc04af4418be330765281a26b73dbeee2526d4..8d6ee4af4230372affc301df52b65477ab9793bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright IBM Corp. 2012
  *
index b1bb2b72302ca43836720f5232af0a43b0db8d12..7d42a8794f10d6bdc5133150411c4f42c1a52e39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Access to PCI I/O memory from user space programs.
  *
index ed484dc84d14045abc2ac7daec10ab5f1046a11a..430c14b006d17b71854ac24345a5e90140e8fdf1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2012
  *
index 4b5e1e4995272907bbcd5040663bbbb0e1b32307..d54c149fbb6b821406c8dda170d814fd62f2d31c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for s390 specific build tools
 #
index 70dd8f17d0547ebc2c2ee059b0e54834b67c0f79..0373801d986019f980162ed6aa30895bd2707088 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simple program to generate defines out of facility lists that use the bit
  * numbering scheme from the Princples of Operations: most significant bit
index 507d6318138941aa5dec6cc767e992ca598e009f..d881f99c9dddec40b2d9179ff9ad258005381b38 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Machine selection"
 
 config SCORE
index d8a9b2d146ee471971dbbfda8cf42fbfd97efcb6..041e51dcdafbda35cbe426bda6d90f51c6d8eec3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index a04a54cea25d8c1e4f0cf7a8afde3e86dba0d491..7370a35d17d19a59acf876f7cb7e29c0c5ebb159 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_ASMMACRO_H
 #define _ASM_SCORE_ASMMACRO_H
 
index edf33dbded1ebe16e81c375d80d983498b25fc22..56700980b9be8bbad1f463dcbafb54e0540a2585 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_ATOMIC_H
 #define _ASM_SCORE_ATOMIC_H
 
index c1bf8d6d0fb08ee8f1e2da9189017c1e57ec067e..6342b01237259518704db69dd1a76043e4239717 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_BITOPS_H
 #define _ASM_SCORE_BITOPS_H
 
index fd7164af1f047344075621e91946d81551aea154..966b2e9e8d744dde8a8706d9bd4345437004acd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_BUG_H
 #define _ASM_SCORE_BUG_H
 
index a062e1056bb33c1e9bd7fe855f0915ae04cfc59c..81185dced763fa8173bd1c36f35ff3ac2197e530 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_BUGS_H
 #define _ASM_SCORE_BUGS_H
 
index ae3d59f2d2c43b672811f85411d41fc51cd89dca..d55de3cbbb9f546dd74c07584e05955949d14755 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_CACHE_H
 #define _ASM_SCORE_CACHE_H
 
index 1d545d0ce206feefbc58e1693584dc9a5275ae3c..cf1e609634fd583b6ee5a59c929ef7f79f5fe4f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_CACHEFLUSH_H
 #define _ASM_SCORE_CACHEFLUSH_H
 
index 0338927f4826f3624a7f5b608bde72765e09cfea..9f00ca5fd49dfffe7b18e02afbcc229daf58e678 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_CHECKSUM_H
 #define _ASM_SCORE_CHECKSUM_H
 
index cc3f6420b71c1d6438067761c3a905f6033dc36a..e503073c89789986e7c991f88b289a65720c61d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_CMPXCHG_H
 #define _ASM_SCORE_CMPXCHG_H
 
index 529e494712a5a46aee7b3431771df8416c62107d..a4bd2c748ab4e0061596ab216b788f76544412ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_DELAY_H
 #define _ASM_SCORE_DELAY_H
 
index 2dc7cc5d5ef9ce664752b99d5706ccdad7ee0413..818ad4d011974b061e744e7baccf4ac5363fc0b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_DEVICE_H
 #define _ASM_SCORE_DEVICE_H
 
index 75fae19824ebdaea8de6182d55d2e0ce54676701..cf73dc218bec92ee4fa586ef78ca24a6a9aae863 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_DIV64_H
 #define _ASM_SCORE_DIV64_H
 
index 9f44185298bffd22b26b1ade3afc5bf2876dc77c..fd44a9cbee4fb007df98cf86f355cfed566bab51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_DMA_H
 #define _ASM_SCORE_DMA_H
 
index 6a9421c693ca82c476616c7b8e8c9c71198f2263..c970ac160f3cae3ba82d24fd3d49b7dd3f51ff60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_ELF_H
 #define _ASM_SCORE_ELF_H
 
index ca31e9803a8afaff14e470d49f825a61db23664f..b0612c677764ee9a65f9a35e14b2ea4d54e94957 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_EMERGENCY_RESTART_H
 #define _ASM_SCORE_EMERGENCY_RESTART_H
 
index f9f3cd59c86055a8a8c5611d78d5a046a1e8dd6c..a1f95e1d8a3106e2c51eab09fea26a00de0c75fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_EXEC_H
 #define _ASM_SCORE_EXEC_H
 
index ee1676694024625a66b2d2a1969d813af0d8de34..68ca314830c97cf603814845a739ac9605bacdca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_FIXMAP_H
 #define _ASM_SCORE_FIXMAP_H
 
index 1dca2420f8dbab73df88dd724c6ae1cf53f542bd..ec247fb364c9aa9cc77ce2af007f72c564909367 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_FUTEX_H
 #define _ASM_SCORE_FUTEX_H
 
index dc932c50d3eea84817147424be6610b1f8842928..d8dd8909cb189aca563f137afd6644ec1c1f9f20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_HARDIRQ_H
 #define _ASM_SCORE_HARDIRQ_H
 
index 574c8827abe2381f2db65dfaf3a8f889cf52987b..37ce8723b06bfa70784e689940144ee3ee37453d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_IO_H
 #define _ASM_SCORE_IO_H
 
index c883f3df33fa2349917e91ce46ad47dc69394503..c1434c889de2c72ffd5354267e790546faecdf08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_IRQ_H
 #define _ASM_SCORE_IRQ_H
 
index b8e881c9a69fac45ad94e99675d7594bb0a94877..740b2315d848387230d0853d0edbf67f9f85b59d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_IRQ_REGS_H
 #define _ASM_SCORE_IRQ_REGS_H
 
index 37c6ac9dd6e846cd7cf2adf988296884ecadaf4a..354c1979ea8dd463448d5bf57a90867de088d2f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_IRQFLAGS_H
 #define _ASM_SCORE_IRQFLAGS_H
 
index a666e513f747b723643510d2d2f9b8bb27a8e6a0..481ba1fb53729de9371079a05ec7d600b168c1ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_KDEBUG_H
 #define _ASM_SCORE_KDEBUG_H
 
index 6c46eb5077d33b6538bd634b89460d7fcbf65512..14261872c9c70f2579d8030425b7b4ddf0a3f5f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_KMAP_TYPES_H
 #define _ASM_SCORE_KMAP_TYPES_H
 
index 2323a8ecf44561a74dc5c0e7160f4ff31ac86ffb..0c11c009969acc6a967061ff2ca8f9a1f679b951 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_LINKAGE_H
 #define _ASM_SCORE_LINKAGE_H
 
index 7e02f13dbba80933d209bba42d100e7c045df13a..00bdebdf75f2c61d82a38bb6fb8ef6327b893a90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_LOCAL_H
 #define _ASM_SCORE_LOCAL_H
 
index 676828e4c10a431fd4e68d080c62f2bb1a44f9a8..d913369adda3a0e243df524d5bbb2409d38ea47d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_MMU_H
 #define _ASM_SCORE_MMU_H
 
index 073f95d350ded051f48d11d25f4bd79a99de7fbc..d0aa2a5aebca8ebb253236e55d306f2c03a72131 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_MMU_CONTEXT_H
 #define _ASM_SCORE_MMU_CONTEXT_H
 
index 6dc1f2935eef864419d1e5386e06d021ab5e552d..33777ed32e9e765cbebb9711e88721420250a841 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_MODULE_H
 #define _ASM_SCORE_MODULE_H
 
index 1e9ade8e77e69e1dfd3c1f0d0595db5af853c90c..17d9c68b6bd5df0615cf393e7c92b3cbd23b7c87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PAGE_H
 #define _ASM_SCORE_PAGE_H
 
index e7bd4e05b475d58300a5bded57e4c7f69d373ce2..5a6a2f7e5d62edf10d74d9a89b98b3293d8c37ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PERCPU_H
 #define _ASM_SCORE_PERCPU_H
 
index 49b012d78c1ac9a6868a1a08f88c54e415c76028..7dfc5c16309317f2af7e70f54d6ce70e2eff6e82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PGALLOC_H
 #define _ASM_SCORE_PGALLOC_H
 
index 0e5c6f466520ab7e64ce3e4af6f7eae34e297ccc..fb8f306f4d11a9f5c78d214aa41b993c036d749a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PGTABLE_BITS_H
 #define _ASM_SCORE_PGTABLE_BITS_H
 
index 46ff8fd678a75cd1cf28111961ffec22375be6ac..c14226be055901795c264df5e8e84f43d2cd330f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PGTABLE_H
 #define _ASM_SCORE_PGTABLE_H
 
index 299274581968d1c850f56341615d81bddae19003..1412c774c6b1826e1eac7891bbd06c8a626a4d61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PROCESSOR_H
 #define _ASM_SCORE_PROCESSOR_H
 
index abc279d96b7306858f82736ed98d1a614aef5783..026b9c51bee8c2662ee01a25e95e136fdec9a023 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_PTRACE_H
 #define _ASM_SCORE_PTRACE_H
 
index d0ad29204518575aeb8a6f3788104a7f39ef758b..ff8d20a49aa7aca435c93fc65a81252b40ae90cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SCOREREGS_H
 #define _ASM_SCORE_SCOREREGS_H
 
index e16cf6afb49597bc26aaa63be7d0d20de97f0adf..b00c277e17ffe12f3711132b927086485fd07ecb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SEGMENT_H
 #define _ASM_SCORE_SEGMENT_H
 
index 1f3aa7262fa3ba9a447b21dfdbdaad0b37e186ae..a596d0bd0632c37fa1ca45bd3c47319b8832f123 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SETUP_H
 #define _ASM_SCORE_SETUP_H
 
index 1d60813141b69b1c5989a2bbb649457badbee565..01a3d0eaed80f03c4332bbc472ecdf87f8d54547 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SHMPARAM_H
 #define _ASM_SCORE_SHMPARAM_H
 
index 8a6bf5063aa5ac9a48eca44715bb8af04e12e7d5..3debf3b234b7617bc877b38ccdac9ba71e8d46a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_STRING_H
 #define _ASM_SCORE_STRING_H
 
index fda3f83308d20422c8c7d2f7c023b344693e51df..ce730e60cd431f6a623a8137e22c7e8433bc2fa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SWITCH_TO_H
 #define _ASM_SCORE_SWITCH_TO_H
 
index 98d1df92fbd13df31cfa1e2ebbfcbd5322008d16..caa099fd9a8eab3338194f73d1b6d56d738417c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_SYSCALLS_H
 #define _ASM_SCORE_SYSCALLS_H
 
index 7d9ffb15c47779bfd270de262252a1d98a0fee99..ad51b56e51bd6c4b3874e4db3e640b60f5b0c3c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_THREAD_INFO_H
 #define _ASM_SCORE_THREAD_INFO_H
 
index a524ae0c5e7b7ccb8f10e1fbf62d19bfa78fee46..ea8e7ff49e575bd9455a8eba9d42782516cd9fe5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_TIMEX_H
 #define _ASM_SCORE_TIMEX_H
 
index 46882ed524e696eda4f8c66ce4c574960974cba6..6e7206428877e65d261eaaf9c617d3a278aec6d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_TLB_H
 #define _ASM_SCORE_TLB_H
 
index 9cce978367d5ff2ca375a32e02d52d0ef7beee68..f48722f4b00ef04fc87fa2a7b7f332e97b14d532 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_TLBFLUSH_H
 #define _ASM_SCORE_TLBFLUSH_H
 
index 425fba381f881f28cb3440e061fb893617ca824b..06577d2a1808e2a8e635c567efc0c449c519fe9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_TOPOLOGY_H
 #define _ASM_SCORE_TOPOLOGY_H
 
index 0ef220474d9b2d4eeec79e04228a3bf107460154..a233f32368462270ee608b6edace88101c610450 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SCORE_UACCESS_H
 #define __SCORE_UACCESS_H
 
index 2fc06de51c62d035e874fe4a9de488e81083bea3..5db6c805ce7ea8299cd0d5d8d0cef27d05860c07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_UNALIGNED_H
 #define _ASM_SCORE_UNALIGNED_H
 
index 7bfb8e2c805467d0e55c741fae555843cde5134f..f7b0f3434e72978a53e8f84fafce99d448409b09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SCORE_USER_H
 #define _ASM_SCORE_USER_H
 
index 86ff337aa45972dbe5521415a9a45dd281123e4a..df48f2717da29daadbbf011e396e48419a209ed5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_BITSPERLONG_H
 #define _ASM_SCORE_BITSPERLONG_H
 
index 88cbebc792126d6344683a864fdaa5eacf21419b..a5247ea66c0344bc4c01d24b70917b8203374a7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_BYTEORDER_H
 #define _ASM_SCORE_BYTEORDER_H
 
index 29ff39d5ab47c0390eb032d480e1fee8cc9152c3..1b914865714f7d2648d98bc129bb64f19a677849 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_ERRNO_H
 #define _ASM_SCORE_ERRNO_H
 
index 03968a3103a4ce4373548e19287f9ebe2b8a4b97..9c5053b87c66d6ed3a8b04995974ce81d1f6506f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_FCNTL_H
 #define _ASM_SCORE_FCNTL_H
 
index a351d2194bfde3708c08b2d81c0659ba2cf5df5a..d6cb6dc33d5f09919d925f919506d76ac97776af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_IOCTL_H
 #define _ASM_SCORE_IOCTL_H
 
index ed01d2b9aeabf9162b957b4f52ad3c7b5e6d8bc5..b93b011f02aabe5b332082217a79d1d3c9d136e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_IOCTLS_H
 #define _ASM_SCORE_IOCTLS_H
 
index e082ceff181849f63f96a61da1c028dc9955a443..195ee525308d24a5aab20a1419b5a8e319ef3661 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_IPCBUF_H
 #define _ASM_SCORE_IPCBUF_H
 
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 84d85ddfed8dcd0cd5ecbcc33c3adca2d3f6ee28..b22b8380943284db23bf523fd2735f9f7f21b9c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_MMAN_H
 #define _ASM_SCORE_MMAN_H
 
index 7506721e29fa61fa396118d7318a0afd43fb1400..b05a238756ab4c5d91369bc1e0a9bd473c87b03f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_MSGBUF_H
 #define _ASM_SCORE_MSGBUF_H
 
index 916b8690b6aa1457fe2406074638c69efd77c3b8..ce09e26326817b7d6d132bd02de1d6c8ee37fffb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_PARAM_H
 #define _ASM_SCORE_PARAM_H
 
index 18532db02861c119998e5ac58b01ae7ede2f6b38..c636b85843cd51975e20a3d5093f47c3aad00109 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_POLL_H
 #define _ASM_SCORE_POLL_H
 
index b88acf80048a2545917a8c4473107de4580be56d..63200d56a4a9c5f033cb275b3af6f40a8e1cb661 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_POSIX_TYPES_H
 #define _ASM_SCORE_POSIX_TYPES_H
 
index 5c5e794058be1b234c601a11ef099df400e3df6a..e8bd4923f96e1a93ca305558f480d734fd0ddbac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SCORE_PTRACE_H
 #define _UAPI_ASM_SCORE_PTRACE_H
 
index 9ce22bc7b475d9d0ad0f9cada133b96fb219c2d4..df3fb9c942c4933ac26055ada3610cae2134b83c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_RESOURCE_H
 #define _ASM_SCORE_RESOURCE_H
 
index dae5e835ce9e9221513009141353f73057ee4d2a..c16e7a94725d79c5ed09e33d9d050f2c218598ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SEMBUF_H
 #define _ASM_SCORE_SEMBUF_H
 
index ab9dbdb59bba736e4c4f845f0a28d4297fdf4fcc..dee58323847e307798d9251a70075ef979b889bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SCORE_SETUP_H
 #define _UAPI_ASM_SCORE_SETUP_H
 
index c85b2429ba211c71b032507385460d665cdce859..f38acfe733cdcc494f58231e1ee2c330f157a187 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SHMBUF_H
 #define _ASM_SCORE_SHMBUF_H
 
index 5ffda39ddb9043a8f23129759f7ee663aaf8d4c5..2b0cd93a71f66ae1ca3962337a9990907cf29a9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SIGCONTEXT_H
 #define _ASM_SCORE_SIGCONTEXT_H
 
index 2605bc06b64f3b38314fb3c2c2541a66fa75a917..7fb69497230286c3d4aea36ba9073094aa5f70a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SIGNAL_H
 #define _ASM_SCORE_SIGNAL_H
 
index 612a70e385ba5e7ae61315490e9d158f411e0d30..f76ba1f723543a5147b82b48eb2e56f185f44683 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SOCKET_H
 #define _ASM_SCORE_SOCKET_H
 
index ba82564801891933c2252a1224ae296f743e8139..d0af8ce4373b9e184947a21736781fcd5ef72015 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SOCKIOS_H
 #define _ASM_SCORE_SOCKIOS_H
 
index 5037055500a25ec70d574c21b1848c9b5cca11d2..669b69f764dfaccacbcd367a39f53243cfb26946 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_STAT_H
 #define _ASM_SCORE_STAT_H
 
index 36e41004e9968e2629de89b005de524a78594808..bb92b3e5525d83449851137e480b669d6fe15237 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_STATFS_H
 #define _ASM_SCORE_STATFS_H
 
index fadc3cc6d8a29b5d13d83affcb80fb3288437651..52b0927282b155a965b50761e48c325bd7b34f87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_SWAB_H
 #define _ASM_SCORE_SWAB_H
 
index 9a95c141243717ab36a991bdcb1d49422bd5ddfa..4a6f5511cd56a60fa67d41bce3e601b477a8b4df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_TERMBITS_H
 #define _ASM_SCORE_TERMBITS_H
 
index 40984e811ad62c6264925078c5e502c12f1d1c6e..fabb598ecfa33443698861f1821f1a679cd88ffd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_TERMIOS_H
 #define _ASM_SCORE_TERMIOS_H
 
index 2140032778eed042da75b95a44b53d5f22ce83a5..8515287f412af9737c2e739b6555e847be370eaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_TYPES_H
 #define _ASM_SCORE_TYPES_H
 
index d4008c339e8936da10255a677aa6bb1986760786..04da47bd3d46c038f080beef6d215880acc87024 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #define __ARCH_HAVE_MMU
 
 #define __ARCH_WANT_RENAMEAT
index fb1802b3f54235225b196bc42dbdd580b45ec59c..42def8cff8733c07017b0cd3084f9fa8cd69a3b6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SCORE kernel.
 #
index 287369b88c43869a662cacd76a5d45afcc09f062..9e6ae793e6906be4e47fd07e37742620ba6fb66e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/syscalls.h>
 #include <linux/signal.h>
 #include <linux/unistd.h>
index 640a85925060ef7eec595cfb52cf196a1ea610a1..97fe2931647648329c1b4b0bb88e8c3ac81e885f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config SUPERH
        def_bool y
        select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
index 05b518e90cf7fb7a0f23d0df118d98d9ebc1408b..4a4edc7e03d4145fd8523d3ceab42e55c87923b3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Processor features"
 
 choice
index 5f2bb4242c0f78465cbaea70cbb43d5c7f66d91c..d0767672640d87490f898fb77c23322ce7244f7a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 3554fcaa023bcd69d6a8a5dbc3c4839eea5b3c2d..6394b4f0a69be95d4a44b1c347ceb4f09dfdb166 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Board support"
 
 config SOLUTION_ENGINE
index cea300362035b38794932962e030c02f061b455d..4002a22a7c409be069d66507694243de9277f631 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Specific board support, not covered by a mach group.
 #
index 5e24c17bbdada596e810726b6b8066864b7773f9..67a8803eb3f9d73a0b34c0206344efd2d87d7c07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/boards/renesas/edosk7705/setup.c
  *
index 37a08d0947278ea65c4741dbf072420aca9cb883..3de7bac019039213f4d8ff623b125b8abd573e06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * June 2006 Steve Glendinning <steve.glendinning@shawell.net>
  *
index 97ec67ffec2b8b9925f17eb9a9b70cb8f3b2d1df..603a82325c65f0c100b9c275a4ff02d547b8a039 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2002  David McCullough <davidm@snapgear.com>
  * Copyright (C) 2003  Paul Mundt <lethal@linux-sh.org>
index 1980bb7e578003f3129c9c8d44c6c6df18699300..ef9c87deeb08828c9305b6fb946c0b8a9283e926 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SH-2007 board support.
  *
index 325bed53b87e71fdab20550f8b6e5f394d2b38e2..83296c0b75c45d83c833315462c3842061f8a8ce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/boards/shmin/setup.c
  *
index 42f5589b4bf312f3ad80e002ac9cad4979e10840..b0abd03cac4e57d5e5673fa7e3ec832771e8dcca 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if SH_HIGHLANDER
 
 choice
index d93aaf88013447338c36d4c4e2143a800f720db3..880ed68138b00ff3a7aea6efe20fd16f858ec95b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Highlander specific parts of the kernel
 #
index a7b3b728ec3c01afdc8a7a68338d9f7a420fb023..fb64a10e21706541620b0da96928c4cd0d01e72c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if SH_MIGOR
 
 choice
index 8122a9667fc9a080183dce100f5a7e5656c88177..21770e668de283ba338011ccbb508a179fe36393 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if SH_RTS7751R2D
 
 menu "RTS7751R2D Board Revision"
index 574f009c3c31099437d581250449f60d7264119d..e34f81e9ae813b8dbb650a742e328869dc6d91de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/renesas/rts7751r2d/irq.c
  *
index 0b9b2c4952c1245c31aebe5689273aaa99cc4045..f0299bc4416f8081e93b4eda0f37e22809eeeb82 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if SH_RSK
 
 choice
index 065f1df09bf117e8252c55f6a50461e056007feb..d4392efd2f74dbb1e202c162241c723a1f993085 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if SH_SDK7780
 
 choice
index 0db058e709e9e92082b09c7306aeb19e0ed27c4f..2b15370829aef3cff604e4a8dce9e119948b5f9b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/se/7206/irq.c
  *
index 68883ec9568263cf813cb2dba49616dd55b78b61..dc55d3a69665ee4e0c421d9cb566aba55b785a6c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  * linux/arch/sh/boards/se/7206/setup.c
index 8ce4f2a202a8c1885ee26014826041be35d149f7..fe0e550601a2e2cf6a9b3dac550b44331df2c0b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
index 1028c17b81bc0e6cca575a8989db1826ac8c48ac..66e2c8aa0b69f3a3a029a26b0f9dfafdcde4cd32 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/se/770x/irq.c
  *
index 658326f44df819eaba9d7d20dbe888d28b796d1f..77c35350ee774d4fa26ed5bc57b70d9d03c7bcab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/se/770x/setup.c
  *
index 5c9847ea1e7c1e50cd95f56218126dca712873f5..dcefe58d87534b67f05500eca44a47fcc7ff6513 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/se/7751/irq.c
  *
index 820f4e7ba0d2680b1ef1332acf90deb86ad95595..4c480605557f4609fcee7edd0016b64c71e2fe3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/se/7751/setup.c
  *
index b537e238c6bcddcf211eafbd74e17e787c5eb81f..8f69fc147c733d1dfb658efdb82bf10dcdf19dc3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SH_7619_SOLUTION_ENGINE)  += board-se7619.o
 
 obj-$(CONFIG_SH_SOLUTION_ENGINE)       += 770x/
index 958bcd7aacc5bc2c56d9852d19eac4128fa00472..4431da64a56f6ae4bfcebcb735ee5e0db384833b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/boards/se/7619/setup.c
  *
index f83ac7995d0ff88e1bfecc017c538e93427e2deb..dc3d50e3b7a2acc517e06cc291de9af36a243db4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/sh03/rtc.c -- CTP/PCI-SH03 on-chip RTC support
  *
index f582dab59343dd2611e7bea07fa8f8ae03478420..85e7059a77e9fbf844d96a7b44e9247ab35c1148 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/boards/sh03/setup.c
  *
index c4c47ea9fa941542e0efae62ca3bed2d4877dd68..f5e1bd77978924d88fd098b3e223dd67da17f2fb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/sh/boot/compressed/Makefile
 #
index d0b77b68a4d0d95d74db19a0172b6f126a214c61..31e04ff4841ed084f438a86d38139e2639353a35 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 int cache_control(unsigned int command)
 {
        volatile unsigned int *p = (volatile unsigned int *) 0x80000000;
index 3e150326f1fd8a16a6161d6ce796c5ba63094c15..7bb168133dbbf8e4578ffd3bee958f235b7eb4da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/sh/boot/compressed/head.S
  *
index ae1dfdb0013b01337d9216d66e7337c10038b95d..f2d9d3079d4e623fdcaf69730651d43da37b3fad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/boot/compressed/misc.c
  *
index 880de75360b34117b7a5e35412dd465faecf409c..9f4742fab329d39d006314c252330e0c8bb47fb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 / {
index 43c41191de5d9e37ba600bf250868c6387ad5f30..c7c8be58400cd9b2dfba20c85060434089e418a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/sh/boot/romimage/Makefile
 #
index 4671d1b82150f6aa077854ddd69b13b52738a8d7..81a0652a3dff4b112acef582e11297f2b7c41438 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/sh/boot/romimage/head.S
  *
index a5ab2eccdaa65117656d852fd461e39f1aff05cc..6be5ddec14d3c224fd1a6bd169539b88a3ee901e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Companion Chips"
 
 config HD6446X_SERIES
index 8180092502f7040c4a0d94a1040d4629aab7dfa2..f3fba967445acab88047b5db80ebb5d4bc4a25cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Copyright (C) 2000 YAEGASHI Takeshi
  *     Hitachi HD64461 companion chip support
index 420c6b2f33a59ff760c0603db272542ff9b6e3f4..80a45ad2852fdf1e331f0a90935adbe9a88154c9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 source "arch/sh/drivers/dma/Kconfig"
 source "arch/sh/cchips/Kconfig"
 
index e13f06bebd9221c9247d27754b0fcd396eb11e57..3e93b434e6048edea4e27c3c2577ffeb30c22667 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux SuperH-specific device drivers.
 #
index 78bc97b1d0270d8e5aabe0e22d49d58041e68abd..d0de378beefe5add201e32bfcbf9bdc793dada34 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "DMA support"
 
 
index 82f0a335fd19f2e144603c740a616e2b467295d5..947bfe8bb0a722e35334f23d850eb08ca9efbb46 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PCI specific kernel interface routines under Linux.
 #
index dbf1381998717d27625e5773479f5df9a9f2b30f..cae707f3472dc59fbc79d9fe8ecfeeb75806e666 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/interrupt.h>
 #include <linux/timer.h>
index 32467884d6f796fe8f59f331c3c9e91e2819c5f2..c797bfbe2e983c60519f36e8ed9ef059164483f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/pci.h>
index 1cb8d0ac4fdb5aebf4e1b616422fb3a8db83e463..608f6521ceffcdefc75f95d953683175fd5aa1e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/init.h>
index 55ac1ba2c74fefbf597346a40d3ac2c4b718a217..7ec4a74ab12c450c1c9435e1bc990e109b1c6d8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 0288efc17ff3787c53bbfdf41e7f0f8492a4bd16..1543c50b65031c0af830d5b8c6992620e57dd884 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PCI_SH4_H
 #define __PCI_SH4_H
 
index 48824c1fab80afb4662295a061d72ab31804ea02..99ec668495594c0d51d33315e360484ecdec55cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ADC_H
 #define __ASM_ADC_H
 #ifdef __KERNEL__
index b12efecf52942713f33e1a84924f64f8e92273d7..4f3e715b8c2668b7ef980919e45e3ec24e6488fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ALIGNMENT_H
 #define __ASM_SH_ALIGNMENT_H
 
index d755e96c3064c132317eb2357b36fc106f1b68b8..aace62d42288ab45f9cb50aeb9fd34bd6fc454b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ATOMIC_GRB_H
 #define __ASM_SH_ATOMIC_GRB_H
 
index 8e2da5fa017830364296d4ac16773ee20dc1c4fe..ee523bd2120f7253bc1feae0ad6e50bc74eee821 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ATOMIC_IRQ_H
 #define __ASM_SH_ATOMIC_IRQ_H
 
index 1d159ce50f5ad37a5ae5e7bdd5ca2116dfd26158..1d06e4d288dc2d685de4fe5682d95136270238a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ATOMIC_LLSC_H
 #define __ASM_SH_ATOMIC_LLSC_H
 
index 8a7bd80c8b331c8d6b4f93bab2d92f8c4c54fbab..0fd0099f43cca4fe830ef0664554280fe7d24055 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ATOMIC_H
 #define __ASM_SH_ATOMIC_H
 
index 3c30b6e166b60a9dc2f1686ff3e6c213b6280a8b..66faae19d2545b071820623337dccd9f186ef08f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999, 2000  Niibe Yutaka  &  Kaz Kojima
  * Copyright (C) 2002 Paul Mundt
index 88f793c04d3cf0388702ad461ccd15554ebeee8b..ba517b3f24da62cef771b1cd6be4e99a1994e123 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BITOPS_CAS_H
 #define __ASM_SH_BITOPS_CAS_H
 
index e73af33acbf416df0aa0f124a240df423a8242c8..75b5980399d44dae1035b725da753352b92052e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BITOPS_GRB_H
 #define __ASM_SH_BITOPS_GRB_H
 
index d8328be0619113d254de7a9f2deec3648feee404..47036845fc683799efbb40ab66296166ec5fc823 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BITOPS_LLSC_H
 #define __ASM_SH_BITOPS_LLSC_H
 
index f0ae7e9218e0cb6291f38425eb2e66981633d664..466880362ad1deef9240a194e0ae3fd3932c0daf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BITOPS_OP32_H
 #define __ASM_SH_BITOPS_OP32_H
 
index a8699d60a8c45d378014c674d266cade8dd0b45e..8c3578288db5e9b907dee8b978dcc8c732137540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BITOPS_H
 #define __ASM_SH_BITOPS_H
 
index 06e4163c6746d03e8e106dd0abaa3ad3afc23bdf..7e3d81691ad5e5d2a0bca106b26e8743c16023d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BL_BIT_H
 #define __ASM_SH_BL_BIT_H
 
index fd21eee621493202f4c6c5f6c82c4a882fdb028e..1f7d225fc604f87543b08fd9d87c422619b964b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BL_BIT_32_H
 #define __ASM_SH_BL_BIT_32_H
 
index 5b5086367639f0f103edd9d5f3adae0c46ba73f7..05a485c4fabcfce04b14f2077afd8cf0f4be278a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BUG_H
 #define __ASM_SH_BUG_H
 
index 02a19a1c033ac71a9f2d4ad16faadf28f9f0bdc3..030df56bfdb20f2b8a648c3a82e44a3684cb3e5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BUGS_H
 #define __ASM_SH_BUGS_H
 
index ef9e555aafba5bad5247d0baeae0d256064b1620..2408ac4873aa00d90ae5f61cf7552d07bdb6b43f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: cache.h,v 1.6 2004/03/11 18:08:05 lethal Exp $
  *
  * include/asm-sh/cache.h
index 355cb06b7a301d37b5684a20e4ded679fdb6a8f9..c5a4acdc53f9b37a1d2e656ed753c4d5847f544a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CACHE_INSNS_H
 #define __ASM_SH_CACHE_INSNS_H
 
index b92fe5416092fa8d10015aee50c3237821ca1edd..470880b972cb1ea63e9813210c35a4c62c866cf5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CACHE_INSNS_32_H
 #define __ASM_SH_CACHE_INSNS_32_H
 
index 82e1eabeac989fff1b4c2fc43aa74bcd2b23d715..d103ab5a4e4b562dc4e0c14f3171517fed260006 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CACHEFLUSH_H
 #define __ASM_SH_CACHEFLUSH_H
 
index 34ae26204524ba3ddc62516f8b83ac28c8c065cd..a460a108969df6b49828546efbda9588a219a2bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_SUPERH32
 # include <asm/checksum_32.h>
 #else
index 0390a07e7e3bd0e6374df1fd2efa79bb79d1d24d..b65bc2908e8aafb8ca0ec9d9b43db518193c992d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CLOCK_H
 #define __ASM_SH_CLOCK_H
 
index d0d86649e8c1b448c6ee712bfc11ab72349c06d8..f508db6eaf3192cb95a03c14c166da258d36b14d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CMPXCHG_CAS_H
 #define __ASM_SH_CMPXCHG_CAS_H
 
index 2ed557b31bd994fa12077c5ba4238613a782ddcc..e12279ea35cf74a018716e09f24cfa2138d53e10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CMPXCHG_GRB_H
 #define __ASM_SH_CMPXCHG_GRB_H
 
index f88877257171a9add838e97a2c1bd8a0339b227b..07d3e7f083891990da4c1b2fc6833c96f7d87880 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CMPXCHG_IRQ_H
 #define __ASM_SH_CMPXCHG_IRQ_H
 
index fcfd32271bff7f6d890922eb7a7b2dea7da34186..d5270cd297c14294c4723b8d6ea49858724aceb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CMPXCHG_LLSC_H
 #define __ASM_SH_CMPXCHG_LLSC_H
 
index 3dfe0467a773b0bdac96ae3d9b0fecd5c75060a8..e9501d85c2787642fb990e1770f74b51f0d0f302 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CMPXCHG_H
 #define __ASM_SH_CMPXCHG_H
 
index 9b06be07db4db1d110c8e4e71bcc836965572d28..68c1536b3aab695065e225c00c7cdfee6819c3fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_DMA_MAPPING_H
 #define __ASM_SH_DMA_MAPPING_H
 
index c5edba216cf19c2393decc822c5bf744c5a86039..69e119cfd711e293d53d118ab7cc418e1cf2e01e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SH7760 DMABRG (USB/Audio) support
  */
index bf9f44f17c2983a1f1994f451ab03d3e89c05355..5ec8db1ddc204933f51300797ee1622a30ff4252 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ELF_H
 #define __ASM_SH_ELF_H
 
index cc43a55e1fcf4e21b102659193df16e786194e03..5ce142d8c5a89e644b6ae28825a9de6fffc2e9a5 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 ! entry.S macro define
        
        .macro  cli
index df2ee2fcb8d3aea6b286c49cb4fbff570d6b23a2..ed46f8bebb9f64f62d7ed9dbe296c5aba769f06f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_EXTABLE_H
 #define __ASM_SH_EXTABLE_H
 
index 50921c7cc3f024a10bbc1b77d4af9e6bc834c493..43cfaf929aa79a194d16e45e1efca83585bb73cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FPU_H
 #define __ASM_SH_FPU_H
 
index 1f157b86eaa7a188cd2203a9eebe5888c259acdb..b1c1dc0cc261d1db042faedce34f78e8b150a08a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FTRACE_H
 #define __ASM_SH_FTRACE_H
 
index 267cb7a5f1017798d27785af6181a934863cb434..ed738e32b5ec45d23a5713af7a2e4c9933b0b01b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FUTEX_CAS_H
 #define __ASM_SH_FUTEX_CAS_H
 
index ab01dbee0a821d04e9b79bd9863c6a2e83de1d3f..9bc053242ea037958af5124b9ffb2ac861203c4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FUTEX_IRQ_H
 #define __ASM_SH_FUTEX_IRQ_H
 
index 23591703bec041504ffa8049ac0dc338fabde88c..6e1570752bc1e95d50590a60f588f2e94b8774f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FUTEX_LLSC_H
 #define __ASM_SH_FUTEX_LLSC_H
 
index 8f8cf941a8cd29c716a923002490dc5506ee57a5..15bf07bfa96bcaea117faa00d64a18cf1f2a378f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_FUTEX_H
 #define __ASM_SH_FUTEX_H
 
index 48b191313a99256a17730f0813f051b46c062b61..edaea3559a2327418d0589edb98883e0f12fa09c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HARDIRQ_H
 #define __ASM_SH_HARDIRQ_H
 
index 977355f0a48365c34aa73cadb426321033bc4bf9..afb24cb034b114c91bb633f280b52880b988d3dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HD64461
 #define __ASM_SH_HD64461
 /*
index caaafe5a3ef144da2a790e51bb352a41f617c0ca..4028ca4058d1719b34c327b573cb994f79e40d8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HEARTBEAT_H
 #define __ASM_SH_HEARTBEAT_H
 
index ef489a56fcce3e220a42443ebe09142ffc04ea58..735939c0f513a17ee35cbf0bf718cbb0cbb4426a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SH_HUGETLB_H
 #define _ASM_SH_HUGETLB_H
 
index ec9ad593c3da743bacbd5875a577709a94e3333b..7431c172c0cb63358fe2955249203cb91642e73a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HW_BREAKPOINT_H
 #define __ASM_SH_HW_BREAKPOINT_H
 
index 693d441840587e8b0ebe7b11eda694d8f1d7945e..ce23e3332f9c97947abcd863729c6948beb5bfcf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HW_IRQ_H
 #define __ASM_SH_HW_IRQ_H
 
index 69fee1239b03308a998ac965f4793f4decc5b5d6..a777f1410a6e98eb0e7a7f47b4bc42fa4dade4f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MMIO/IRQ and platform data for SH7760 I2C channels
  */
index 3280a6bfa5036c7db9f51b9f6d65266eedb74603..98cb8c802b1a8cccafb1cd52d4717a149490792c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IO_H
 #define __ASM_SH_IO_H
 
index b5f6956f19c8add59e974919df59028941e35e0c..87ec38f4e53291f3dd700fc0fe230f0b2b1a6cc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Trivial I/O routine definitions, intentionally meant to be included
  * multiple times. Ugly I/O routine concatenation helpers taken from
index c727e6ddf69e180f4c01147e371fb722733af7b2..90d6109f1622ce2b5ac70c6167ba69b479d943de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IO_NOIOPORT_H
 #define __ASM_SH_IO_NOIOPORT_H
 
index 4ab94ef51071d03eb96f0028a69c9c3b9f1e72e9..ac01b201d9aa9b7d5c307c4126b09e2a8d69d0c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IO_TRAPPED_H
 #define __ASM_SH_IO_TRAPPED_H
 
index 0e4f532e47379d1af1ded1eae3fc9f086a7966c2..8065a3222e19b39d727f4a27e4ee69e9a14530f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IRQ_H
 #define __ASM_SH_IRQ_H
 
index 43b7608606c32434f6508a07153a2c4847c4bcf6..25f6cfef3f043ab4735d4bf69ffd7b8d4c00a444 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IRQFLAGS_H
 #define __ASM_SH_IRQFLAGS_H
 
index 8d6a831e7ba1501a54ce9292e110720b7ce38ee6..5212f5fcd7520125b899f3b1d2e0cad83ce48ddd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_KDEBUG_H
 #define __ASM_SH_KDEBUG_H
 
index ad6ef8a275ee98c7a413cf4bed3aa3f0c7505657..fd5f331a39126d2aca7d9c16852c80cd24931bf3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_KEXEC_H
 #define __ASM_SH_KEXEC_H
 
index 9e7d2d1b03e0adc7dc7e6225bd072f5d8164e35a..0d5b840cb28963ce854b5bba1110d846dec40da5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_KGDB_H
 #define __ASM_SH_KGDB_H
 
index 5962b08b6dd8a6258cdeb646fd723a86c0b81cde..b78107f923dd382a797193cf7ed90d86b5e2cdc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SH_KMAP_TYPES_H
 #define __SH_KMAP_TYPES_H
 
index f0986f9b38445cb665ec9c1a15fdea5b8cafb7ac..85d8bcaa8493a97c652250320b0a193f31b4cd80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_KPROBES_H
 #define __ASM_SH_KPROBES_H
 
index 3565a4f4009f7f6ba84bff2f6ce25aa46d284588..7c2fa27a43f8496e2ba5ebcb31de8f154026c43b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LINKAGE_H
 #define __ASM_LINKAGE_H
 
index 56e4418c19b984832589a53ccce34b554e56c2ed..172e329fd92d024258f113ea15f6ada8fa9fbee6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index eb6ac3c10c44878889efe3dca4d6d45a505f5d22..2d09650093c7b98115e2919a2c024ccf0169eaa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999 Niibe Yutaka
  * Copyright (C) 2003 - 2007 Paul Mundt
index 10e2e17210d28592d1c9a1c7fdc92b4cc2679235..71bf12ef1f650c28e70452e40a44699bc12ecfe4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_MMU_CONTEXT_32_H
 #define __ASM_SH_MMU_CONTEXT_32_H
 
index 15a8496960e6a9987105939832b13c94f33aebaa..cbaee1d1b673205ffc111df768ebcd0a8049469a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_MMZONE_H
 #define __ASM_SH_MMZONE_H
 
index 81300d8b5448c35e85ed1f895e054a1b73492550..9f38fb35fe96cae9672fb2bf0e579431403722c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SH_MODULE_H
 #define _ASM_SH_MODULE_H
 
index ceb5201a30ed36899010715143b8679cd4a819fb..5eef8be3e59f9e733b0233c80c6b340d01ff6b38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PAGE_H
 #define __ASM_SH_PAGE_H
 
index 17fa69bc814d7967e33ba119202428142ab50343..53f7ae6abaa7e1003beca1911a4fbc70b6d69838 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PCI_H
 #define __ASM_SH_PCI_H
 
index 14308bed7ea510cb6b43429887ca727cf1f0510d..468c7ca8bd2e50b89b8104ccbee0759d10f4981b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PERF_EVENT_H
 #define __ASM_SH_PERF_EVENT_H
 
index f3f42c84c40fd3a2b81ea523ee841c99d1e82f4b..ed053a359ab74684a17d51323f772b24b736234f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PGALLOC_H
 #define __ASM_SH_PGALLOC_H
 
index f75cf438725766d2b7340f38ce74f1ea63f0690e..bf1eb51c3ee5ab9cc8052cf38901d40a47338535 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PGTABLE_2LEVEL_H
 #define __ASM_SH_PGTABLE_2LEVEL_H
 
index 9b1e776eca31bec7ea936633528011e48b6374ba..7d8587eb65ffdd813f42f58662397ebf2462fc2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PGTABLE_3LEVEL_H
 #define __ASM_SH_PGTABLE_3LEVEL_H
 
index c646e563abceca7ada830de1b75d7702fe863b4c..29274f0e428ea77a513233ed914513fd4980fcdd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PGTABLE_32_H
 #define __ASM_SH_PGTABLE_32_H
 
index 1aa781079b1edb4aaeeebd5b325475a35a7dfd6a..0d670fd94fe726b131e5799ecaa0f35a2b7aeccd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 # ifdef CONFIG_SUPERH32
 #  include <asm/posix_types_32.h>
 # else
index 5addd69f70efeaa5257cae64df2bfb8bf8aa3b43..6fbf8c80e4981d1fa3cd78fd28e3224552247a3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PROCESSOR_H
 #define __ASM_SH_PROCESSOR_H
 
index 18e0377f72bbb9ad8f559b00fc2452532d0ad312..95100d8a0b7b485427cf615990543b71f6d19083 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-sh/processor.h
  *
@@ -136,10 +137,6 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned lo
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 
-/* Copy and release all segment info associated with a VM */
-#define copy_segments(p, mm)   do { } while(0)
-#define release_segments(mm)   do { } while(0)
-
 /*
  * FPU lazy state save handling.
  */
index eedd4f625d07650e1f392a37b45e22d765e51602..777a16318aff1fd41df535ccc91453d7d91d318f 100644 (file)
@@ -170,10 +170,6 @@ struct mm_struct;
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 
-/* Copy and release all segment info associated with a VM */
-#define copy_segments(p, mm)   do { } while (0)
-#define release_segments(mm)   do { } while (0)
-#define forget_segments()      do { } while (0)
 /*
  * FPU lazy state save handling.
  */
index 2506c7db76b70ef83db681e14f49cee27ccb5933..9143c7babcbef7d5158e1f225f7f10da80e0d79f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1999, 2000  Niibe Yutaka
  */
index 1dd4480c5363f5e413dc35e0b65c9278ffbc1bae..5f37ad7c60652b9fb05aa114428d7289679891f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PTRACE_32_H
 #define __ASM_SH_PTRACE_32_H
 
index 97f4b5660f2cdc62d112183e2e600c4456b6476e..6ee08229b43332cb628af2466e5bf8c1df8006f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PTRACE_64_H
 #define __ASM_SH_PTRACE_64_H
 
index 4903f9e52dd858aee3a5805da7d22a156798d98f..c5f072572fd18a0b999b701e1cb2c891acd0cce1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_PUSH_SWITCH_H
 #define __ASM_SH_PUSH_SWITCH_H
 
index b3da0c63fc3dd02d2bcdf6e80699852c26c36c2a..5c445c90df14d998f28ee04605801951be5a9048 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_REBOOT_H
 #define __ASM_SH_REBOOT_H
 
index ae17a150bb589377a6ec7e0c6e25b7cddede5e86..f9352ee7c21b4b5f83d3913e59badc79fc4e072f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ROMIMAGE_MACRO_H
 #define __ROMIMAGE_MACRO_H
 
index f7b010d48af7b17d8c6dbf475d105f7839f816a5..c63555ee12555817193f3a74f2711b1d56a5b639 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_RTC_H
 #define _ASM_RTC_H
 
index 3280ed3802efd9c005d83561528daf522025bd56..54111e4d32b83a213d2dd34346da8c2c325edfe7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SECCOMP_H
 
 #include <linux/unistd.h>
index 7a99e6af637284d3061a96a274f375f2189f2eb2..8edb824049b9eeb4f7e8e6af14e8eeb4b45718a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SECTIONS_H
 #define __ASM_SH_SECTIONS_H
 
index ff795d3a6909f8f5a441237d71efd88be048e101..101c13c0c6adc0688380097e4c41837c41937903 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SEGMENT_H
 #define __ASM_SH_SEGMENT_H
 
index 99238108e7a51b6af6815e42a6e34f1799a0bc99..fc807011187fa1c0bc547c075c4efc1e037c31ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SH_SETUP_H
 #define _SH_SETUP_H
 
index 8767f61aceca50b169578a7ed08450147383f8e4..2d9433d7540299e85c00d8e3129b3007b95ae127 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sh7760fb.h -- platform data for SH7760/SH7763 LCDC framebuffer driver.
  *
index 95714c28422b14eca127557896c2179fa36dbe23..ab693b9824421d606b125ec5cfcb458fdf561af1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_BIOS_H
 #define __ASM_SH_BIOS_H
 
index 585da2a8fc454ae6aed22718d0806f0b2c7e8521..f054c30a171a58c0adedbb9cb6dd7a4086f2f562 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SMC37C93X_H
 #define __ASM_SH_SMC37C93X_H
 
index c590f76856f1ecd53af5a27ddef1e8e36dc5c525..e27702130eb6f3b0e1dfcc98c0088868c2046272 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SMP_OPS_H
 #define __ASM_SH_SMP_OPS_H
 
index c9f8bbdb1bf8e901505aca6378705a25db9cb46f..1a0d7cf71c102db7a28af88f769a8d83a88ee11a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SMP_H
 #define __ASM_SH_SMP_H
 
index 547a540b6667125cdd3625450d8e7cc02d1bf06e..4eb899751e4590acdf691dddf146941fcf56a024 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SPARSEMEM_H
 #define __ASM_SH_SPARSEMEM_H
 
index e96f5b0953c84724544abc7b355df565b0e01a55..6780753bd249147971dc7bc1280c6bad0b4cd3b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPI_H__
 #define __ASM_SPI_H__
 
index 9b7560db06ca9264cf1547624d3fee95fcfd97ac..e82369f286a20fee9f94f59db4a0f2a24326c537 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SPINLOCK_TYPES_H
 #define __ASM_SH_SPINLOCK_TYPES_H
 
index a2808ce4c0aa657205eb5b1ba693a521482d2535..c125cf2198683e4aedd94de781551f4b338ff600 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SRAM_H
 #define __ASM_SRAM_H
 
index 141515a43b78121045d503ab110f385116013f57..35616841d0a1c8cb6a4082590cfe5aa5f6d78494 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_STACKPROTECTOR_H
 #define __ASM_SH_STACKPROTECTOR_H
 
index a7e2d4dfd087700ea6d1d963b9b267114b488da9..50c173c0b9f56f693cf48bb17346835422955f1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2009  Matt Fleming
  *
index 114011fa08af2dafb760008166f571795fdf7b0d..84fc5ed9c5b363bd94948d9652d8ad48f46501f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_SUPERH32
 # include <asm/string_32.h>
 #else
index 742007172624199800510a72c37cb064c72a5c2e..d51d6150a4e23370706f3e2558e8283702578348 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_STRING_64_H
 #define __ASM_SH_STRING_64_H
 
index 70ae0b2888ab9979410d882a08b50c0c2a926a79..47db17520261e888887f7394ecf0f6b216284f2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SH_SUSPEND_H
 #define _ASM_SH_SUSPEND_H
 
index 7661b4ba82597705056e817d6798f3a1637b5d41..9c93fb91adb4aa668c4ce0a36327f3ed0a7d4aeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SWITCH_TO_32_H
 #define __ASM_SH_SWITCH_TO_32_H
 
index 847128da6eac9ab00f63370acabcb0d06f7c94a9..90ba00002626a7fb28067e39dd145c7290cfdff0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALL_H
 #define __ASM_SH_SYSCALL_H
 
index 95be3b0ce0acd575e3d006a5ec31329b16dbcbf1..6e118799831c32dc37b8cf21960d284c5bec3646 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALL_32_H
 #define __ASM_SH_SYSCALL_32_H
 
index c6a797b90b8052f1dfc879a41f722c2fabac8c63..43882580c7f99bec93e519f1b4182c1daad2fbf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALL_64_H
 #define __ASM_SH_SYSCALL_64_H
 
index 3dbfef06f6b29cdb06c1fd24e9e1a919d3d60248..995ef046232c3e4e5f205b6a6be09d94aa4b634b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALLS_H
 #define __ASM_SH_SYSCALLS_H
 
index 4f643aa718e3102eb0cbd8a077e9a617143435e6..9f9faf63b48c2e37d3cf0987737ca67e86512478 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALLS_32_H
 #define __ASM_SH_SYSCALLS_32_H
 
index d62e8eb22f749ad0767c27fc0b710243c316fc83..df42656cebea2093bbcfe00242e1aaece1f23a8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SYSCALLS_64_H
 #define __ASM_SH_SYSCALLS_64_H
 
index 6c65dcd470abe2a350f89679dc2524c87c6d6165..becb798f1b04dea236f2def06c442a6c355f9e0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_THREAD_INFO_H
 #define __ASM_SH_THREAD_INFO_H
 
index 18bf06d9c764a2ad713b68b8dad67f13e39b8411..f53f95bf42887f74e627bf182d9af0febc064f70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-sh/timex.h
  *
index 51a8bc967e75f1e3c96a70783e9da439310edbcb..77abe192fb43d90cd6d56bfe878b54126188ac34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_TLB_H
 #define __ASM_SH_TLB_H
 
index 0df66f0c72847c37a9598f33126237a442ec4366..8f180cd3bcd638411c6cafbe9498a9f553264c73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_TLBFLUSH_H
 #define __ASM_SH_TLBFLUSH_H
 
index 358e3f516ef6ca78b3c7844d174140cc99f759c8..9a32eb4098dfcfeacc0eee666cb2562c32e687ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SH_TOPOLOGY_H
 #define _ASM_SH_TOPOLOGY_H
 
index 9cc149a0dbd1f35723c9e13b98c15fb939674435..8844ed0c0fde03b0e8945538de453130d5c8ea6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_TRAPS_H
 #define __ASM_SH_TRAPS_H
 
index 17e129fe459c61bd30b417df5864fe88bb5972c8..8c5bbb7b6053cf7b63133a9b4820bee9ef8d9d79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_TRAPS_32_H
 #define __ASM_SH_TRAPS_32_H
 
index 6a31053fa5e32f4cd53a260ed9cf61f8e3ed1eb8..df96c511bb6e50f53fc842d3266f5ec12d93b8e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_TYPES_H
 #define __ASM_SH_TYPES_H
 
index 211b44920dbe705e8af5487ff88a8d0ed5b68310..32eb56e00c11f9558b346a809d66643463203d4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_UACCESS_H
 #define __ASM_SH_UACCESS_H
 
index c0de7ee35ab7aa5ba80c393f4a2588102d01e2a1..624cf55acc270c2ecd9a2bae78cbb00eee85f88e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * User space memory access functions
  *
index 95adc500cabc3acbc3cbd5d1918eaa540c7f7cc7..d311f00ed5305777fadead2ddc9bdb6e71a37f15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_UNALIGNED_SH4A_H
 #define __ASM_SH_UNALIGNED_SH4A_H
 
index 7d14e0669961b216b16b8803e5e4c423f1fa7b96..0c92e2c73af418c18c5ab7bf0d4b125ac7be0d11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SH_UNALIGNED_H
 #define _ASM_SH_UNALIGNED_H
 
index 6f8816b79cf152091b1fc08e6cd4dc5d4390bfe2..e7f68ec61014c35344c3a92fbe68aeb04560dbdf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_UNCACHED_H
 #define __ASM_SH_UNCACHED_H
 
index 126fe8340b22da8547c4374a2a9c077d658f9f30..b36200af9ce7edc02a5d712cf3a430d782f60592 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 # ifdef CONFIG_SUPERH32
 #  include <asm/unistd_32.h>
 # else
index 1e65c07b3e18dacade5dcaea861874272cbd8d9e..ce82c96c789904daae6623c897d4cccdc64cf285 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNWINDER_H
 #define _LINUX_UNWINDER_H
 
index 8fd3cf6c58d4b31925ce72d2966906ba0456fab6..e97f2efed52740e5423b8683f1228bcaee729f87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_USER_H
 #define __ASM_SH_USER_H
 
index d58ad493b3a6767000f8fd9c430c31f9a6131420..f312813f39d8a256f322a428b5740f1476e35b2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_VMLINUX_LDS_H
 #define __ASM_SH_VMLINUX_LDS_H
 
index 6e38953ff7fd4ca8fabb0c7fa68b3dfcac4e7d8a..4aa398455b94abf4d72bb3fd0d14fee68f55e6f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_WORD_AT_A_TIME_H
 #define __ASM_SH_WORD_AT_A_TIME_H
 
index 39e2d6e947826aac18c66e4ebb74f652c97c332a..5fe726acd9f8f5a788c5fd038d8b74ba02837e2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH2_RTC_H
 #define __ASM_SH_CPU_SH2_RTC_H
 
index fe5c15dd6e87647f2b5139004b7e8b8447b3e943..e005dd176ff2114aa84c04de390768476325c857 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH2_SIGCONTEXT_H
 #define __ASM_CPU_SH2_SIGCONTEXT_H
 
index 31eb4b58aa6d54a098f0a87cc7d241a75c479cd7..3afa46c09fb5315993e40d81a639520f55be926b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH2A_ADDRSPACE_H
 #define __ASM_SH_CPU_SH2A_ADDRSPACE_H
 
index afb511e2bed7ccc5fa374e9ea955fd6d20b2531b..6b6c7ee752debf60dbdb36ab7b8f5eed779aecd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH2A_RTC_H
 #define __ASM_SH_CPU_SH2A_RTC_H
 
index 79f93159018d84d6b0d307347e97a16f04497084..f250adfa46c626957bff2d93f4a240e3bb87dd4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7203_H__
 #define __ASM_SH7203_H__
 
index 4d1ef6d74bd6050cb34d0f2fdd91d114fb0baa96..d12c1918684518b36016332adf442d370a5efe53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7264_H__
 #define __ASM_SH7264_H__
 
@@ -43,9 +44,7 @@ enum {
        GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4,
        GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
 
-       /* Port H */
-       GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
-       GPIO_PH3, GPIO_PH2, GPIO_PH1, GPIO_PH0,
+       /* Port H - Port H does not have a Data Register */
 
        /* Port I - not on device */
 
index 2a0ca8780f0d8c343fb87e434cf6acec73acaddb..d516e5d488180db7b83bd7bc9cf8c0e80f75f4cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7269_H__
 #define __ASM_SH7269_H__
 
@@ -45,9 +46,7 @@ enum {
        GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4,
        GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
 
-       /* Port H */
-       GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
-       GPIO_PH3, GPIO_PH2, GPIO_PH1, GPIO_PH0,
+       /* Port H - Port H does not have a Data Register */
 
        /* Port I - not on device */
 
index b289e3ca19a663a0d2d22fdf8a80c516e8215393..2ee206c9bf1aa88ad75656a0075306296e3c83a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH3_ADC_H
 #define __ASM_CPU_SH3_ADC_H
 
index 98f1d15f0ab5e3a0a0b988bd634d3ab121ab4694..fd02331608a8d6b9e6e535ea44cfd7085953d4f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH3_DAC_H
 #define __ASM_CPU_SH3_DAC_H
 
index bccb4144a5e375f1a6413f7c28cf113a28d2ca2e..cd139681af4b6f9ab13ee3c0c977f3ea9017135a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH3_DMA_H
 #define __ASM_CPU_SH3_DMA_H
 
index 7766329bc1030dba8a7ca980e41ace2c04bc3b09..7b2ce6e3003e1e37363eacd9019b60a5d3433223 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPU_SH3_SERIAL_H
 #define __CPU_SH3_SERIAL_H
 
index 41c1406d6da2b3f282261b564c005f12ea261add..449790c9eb77cd5c4201c7852b8c753cc1e1d7dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7720_H__
 #define __ASM_SH7720_H__
 
index a520eb219621a71cd27f0bc9f97d8c574cf5ff31..38187d06b2343363ffaafd5b5d0fd0cbb24265e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH4_DMA_H
 #define __ASM_CPU_SH4_DMA_H
 
index 95e6fb76c24d2b0df8940ca1cca251e29777aafe..45647566940f30c7c9d9ee27616276a0ee90e9ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH4_RTC_H
 #define __ASM_SH_CPU_SH4_RTC_H
 
index 3bb74e534d0f8ca44208827d762e9dec03b2525a..2306c79f4b5e26bd1a78984056eb74e8075877b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7722_H__
 #define __ASM_SH7722_H__
 
@@ -67,7 +68,7 @@ enum {
        GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0,
 
        /* PTQ */
-       GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
+       GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4,
        GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0,
 
        /* PTR */
index 668da89bdac4871db1045f0ea02557a2806339e6..41f675307503d4ea70d00812420d5a581744b5de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7723_H__
 #define __ASM_SH7723_H__
 
index 38859f96d4e5e99782ae73980fb679a4fc1b9e02..b3a7caf54c9d687006bc908f6e8e98092bc1fd4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7724_H__
 #define __ASM_SH7724_H__
 
index 2fb9a7b71b412714a17b389688d7f6ca2c1461ed..96f0246ad2f2b756cf8db42b3533bc9a62d7537e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7734_H__
 #define __ASM_SH7734_H__
 
index 5340f3bc1863c3890dde9a8286e05d111a8393ed..6781d41b7467d2c0e266236cdecdfd6c26ff8472 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7757_H__
 #define __ASM_SH7757_H__
 
@@ -40,7 +41,7 @@ enum {
 
        /* PTJ */
        GPIO_PTJ0, GPIO_PTJ1, GPIO_PTJ2, GPIO_PTJ3,
-       GPIO_PTJ4, GPIO_PTJ5, GPIO_PTJ6, GPIO_PTJ7_RESV,
+       GPIO_PTJ4, GPIO_PTJ5, GPIO_PTJ6,
 
        /* PTK */
        GPIO_PTK0, GPIO_PTK1, GPIO_PTK2, GPIO_PTK3,
@@ -48,7 +49,7 @@ enum {
 
        /* PTL */
        GPIO_PTL0, GPIO_PTL1, GPIO_PTL2, GPIO_PTL3,
-       GPIO_PTL4, GPIO_PTL5, GPIO_PTL6, GPIO_PTL7_RESV,
+       GPIO_PTL4, GPIO_PTL5, GPIO_PTL6,
 
        /* PTM */
        GPIO_PTM0, GPIO_PTM1, GPIO_PTM2, GPIO_PTM3,
@@ -56,7 +57,7 @@ enum {
 
        /* PTN */
        GPIO_PTN0, GPIO_PTN1, GPIO_PTN2, GPIO_PTN3,
-       GPIO_PTN4, GPIO_PTN5, GPIO_PTN6, GPIO_PTN7_RESV,
+       GPIO_PTN4, GPIO_PTN5, GPIO_PTN6,
 
        /* PTO */
        GPIO_PTO0, GPIO_PTO1, GPIO_PTO2, GPIO_PTO3,
@@ -68,7 +69,7 @@ enum {
 
        /* PTQ */
        GPIO_PTQ0, GPIO_PTQ1, GPIO_PTQ2, GPIO_PTQ3,
-       GPIO_PTQ4, GPIO_PTQ5, GPIO_PTQ6, GPIO_PTQ7_RESV,
+       GPIO_PTQ4, GPIO_PTQ5, GPIO_PTQ6,
 
        /* PTR */
        GPIO_PTR0, GPIO_PTR1, GPIO_PTR2, GPIO_PTR3,
index 9dc9d91e0a8e1b9823334cb2af2163653f26e48d..37f42071e7d3b747063e0d7143f87ca821a497fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH7785_H__
 #define __ASM_SH7785_H__
 
index 68d9080a8da941acaf1a53df556835eaf151a187..f356810b0bea58fb375b1948a778ec718e26fab8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPU_SHX3_H
 #define __CPU_SHX3_H
 
index ab392f120e06266305914a5d69c6e61c0faf2793..2cc5f55dcaddf40e4f7227418d7d168c0c7164b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_SH4_SIGCONTEXT_H
 #define __ASM_CPU_SH4_SIGCONTEXT_H
 
index 8ceccceae84419d3a3733128d13e7321a4908266..bdbbba8a784a7b3dbe2fa686c56a7cf90813116d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH4_DMA_SH7780_H
 #define __ASM_SH_CPU_SH4_DMA_SH7780_H
 
index ff1bc275d2108ee4301f0cd7659d6083d3840a74..fc206c0bf6fb06ef9d1933adf9ba11d2db1ccb18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPU_SH4A_SERIAL_H
 #define __CPU_SH4A_SERIAL_H
 
index dc36b9a03af63989e5c32948c5ce8ffdb28ab202..6dd1e72f31b2b99f579135bac844f812375daf31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH5_ADDRSPACE_H
 #define __ASM_SH_CPU_SH5_ADDRSPACE_H
 
index 68a1d2cff457d19fbde58dc2d7008e2516a1b451..23c53be945b7fd9e55550146aed9ab6d548874ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH5_MMU_CONTEXT_H
 #define __ASM_SH_CPU_SH5_MMU_CONTEXT_H
 
index 12ea0ed144e1aaffcb5553688ecd32c546f86bec..d7e25d435f4a9b4964ba6859005d576c3e0405c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_CPU_SH5_RTC_H
 #define __ASM_SH_CPU_SH5_RTC_H
 
index 6ce944e33e59db4c7df85ee91b240a74c6bef615..66d3e40fd0464b9cf5f15cc8238c6bfc32844b2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_RENESAS_R7780RP_H
 #define __ASM_SH_RENESAS_R7780RP_H
 
index e04f75eaa153b80be02b5a2c26a7677d6f58e022..0d7e483c7d3f5348b9cbf979ae91e248ddf427a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_RENESAS_RTS7751R2D_H
 #define __ASM_SH_RENESAS_RTS7751R2D_H
 
index 3670455faaac907687c8d5598c958a29c419c27e..1915714263aab001b0a0c77e64e3c5c2b85843ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __ASSEMBLY__
 
 /* do nothing here by default */
index 48180b9aa03d9ece212106f2d965b15af587ca95..eeb12901a44a1b844238b24f9f3ce1451b95f667 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SH2007_H
 #define __MACH_SH2007_H
 
index 1292ae5c21b33ef1c0ce51498a19ec4d6ab69e2d..0f3dc3a1329e367e904dc9c08397fecbbf739991 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_RENESAS_SH7785LCR_H
 #define __ASM_SH_RENESAS_SH7785LCR_H
 
index 36ba138a81fbe5d5fa65f7aa21f72402d5955933..c2c3e26d1453125f254c61c9b2bae9e4ddd66217 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SHMIN_H
 #define __ASM_SH_SHMIN_H
 
index fa3cd801cf2ea37c866313f3620565ccd9c26320..54df351de5e40dabe29e802213b76049978ca738 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Platform definitions for Titan
  */
index 14b3e1d01777cb9be27e0331aa66c7ba95797010..6c9bff3f93f143e4ddac54fd380e2d4e67484281 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_URQUELL_H
 #define __MACH_URQUELL_H
 
index 51f6a87f1f1157a37b7a3e1305c90944de1bf316..169bdf415d89aa3c2162b950fbfe94667f25f64d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MAPLE_H
 #define __ASM_MAPLE_H
 
index 60f3e8af05fa244f3a7abc8e69401d786d53ebdb..2da6ff326cbd0aad5ec9cae8fbf7ff31bf5d71c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __ASSEMBLY__
 
 /* EcoVec board specific boot code:
index 79f154e5cb9c93f88d6ddb839b95dc0b2c04011e..0e97473afe0bb934dd9e648debe6d833f6545a11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_KFR2R09_H
 #define __ASM_SH_KFR2R09_H
 
index 1afae21ced5f79e320d1ca16da27ca15fa6a4556..209275872ff06e43b053aea98ff496273170fb5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __ASSEMBLY__
 
 /* kfr2r09 board specific boot code:
index 35d7368b718ad110a8702557add4b86081a23395..b954de617b497085e552d797d78640ea60225580 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_LANDISK_GIO_H
 #define __ASM_SH_LANDISK_GIO_H
 
index ceeea48cc7af8846a47b8d880d6dcb14f39c3d47..b41308c94d1e943b56806d93d18312dae9ecc7c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_IODATA_LANDISK_H
 #define __ASM_SH_IODATA_LANDISK_H
 
index 7de7bb74c290c390e760dc5fc7ae4da1bfdd0925..2a422b778e008f1dc5857c57c11f953f177a0e53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_MIGOR_H
 #define __ASM_SH_MIGOR_H
 
index a9cdac469927ad6ee738a2ebf6bc66763c12babc..76c2e84893cc61bf0e780f57e23f476bedd03162 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SDK7786_FPGA_H
 #define __MACH_SDK7786_FPGA_H
 
index 0f584635e6e51513fe3a70c1516a5afca44c07ec..3343380907b2db7ed164563d5d83d7f35a710acf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SDK7786_IRQ_H
 #define __MACH_SDK7786_IRQ_H
 
index 56287ee8563a33d687bdd1930dbf85f3aff99bcc..4e260f399b79c32a5e49f80d6d884750ec358257 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SE_MRSHPC_H
 #define __MACH_SE_MRSHPC_H
 
index 8a6d44b4987b393867b4213b13df548203dfce6c..4246ef9b07a346ed590be0cd3651f5a370ee700a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HITACHI_SE_H
 #define __ASM_SH_HITACHI_SE_H
 
index 698eb80389abde40bd78ba57b670cde1f798d48a..cf190279bb1d7ef7c57be7246e774807656b34fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SE7206_H
 #define __ASM_SH_SE7206_H
 
index 542521c970c6ef4a0deee858c57c664c2155bd6d..107fb5f3ef80561b09a3a179482c3400390b5f49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HITACHI_SE7343_H
 #define __ASM_SH_HITACHI_SE7343_H
 
index 271871793d59c3b4c4d110f5c1cb259de0c20367..ee5b5e6e5979705c00d470122c436a3fd0715d3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_HITACHI_7751SE_H
 #define __ASM_SH_HITACHI_7751SE_H
 
index c39c785bba9491ce1cdfd97a406a4028b979f710..5eacdabd71b6cb96aa081797bf9d1e2ebc56a227 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm-sh/sh03/io.h
  *
index 19c40b80428dfb4475529df990c98b15ad6d86b4..4ced684b16a4d4ded6650878a0f0eb20f6bacb63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_SH03_H
 #define __ASM_SH_SH03_H
 
index 52bca57bfeb65718de8ffb9c7349b4465ea4926e..57ea4a5cca359d2d1ee72a20321361748fba3ef5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_X3PROTO_HARDWARE_H
 #define __MACH_X3PROTO_HARDWARE_H
 
index e3d304b280f6eba2daf50b76701fe634e7fe163e..47aeb4b55ea17bb7f6e5a8cb69c6992fe8647ed9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ILSEL_H
 #define __ASM_SH_ILSEL_H
 
index 8bcc51af9367e98a1a01db70d78aee2534027326..8eb47ede7193c151c8acfc42d607d6b828c775a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_AUXVEC_H
 #define __ASM_SH_AUXVEC_H
 
index db2f5d7cb17db21a031553ac04c2338feb0dc7e9..e27d6da3212ca150bbac920c250bb280b4bb72d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_BYTEORDER_H
 #define __ASM_SH_BYTEORDER_H
 
index 6ffb4b7a212e5b39101fac128a2d9c6bc1c70311..79c5663251a52833a468fec6e2e407c00d243114 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SH_CACHECTL_H
 #define _SH_CACHECTL_H
 
index 2f1bc851042a705008ad107243fd5e30bdac6827..6de5f65194e63437e3f2e0f0fd6e974ba5b82f39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_CPU_FEATURES_H
 #define __ASM_SH_CPU_FEATURES_H
 
index ae5704fa77ad6d15e8de4623ca6465f24f2341b9..043dd4b9202630d75be7b57b647e64d848975714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * There isn't anything here anymore, but the file must not be empty or patch
  * will delete it.
index 787bac9f67da3fd069f3f5f2d05e535b819c86cf..cc62f6f981036b539387abf9205cc8c43e5f18ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_IOCTLS_H
 #define __ASM_SH_IOCTLS_H
 
index dc55e5adfe1ef9280bafbc0d2167939cb2680a92..2644fdd444e660e5f3987cdf4f178981fbdb4982 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __KERNEL__
 # ifdef __SH5__
 #  include <asm/posix_types_64.h>
index ba0bdc423b072fa62f74fbc64e1bc5b683f2af7d..ea0f51d1ac554bdbe57eaae265185d712fca2a45 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_POSIX_TYPES_32_H
 #define __ASM_SH_POSIX_TYPES_32_H
 
index 244f7e950e176b0cbdc907f70b4fdf88572b08f0..3a9128d4aee3aeeefbfed3530156ef72a94bad2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_POSIX_TYPES_64_H
 #define __ASM_SH_POSIX_TYPES_64_H
 
index 8b8c5aca9c283fd81c5349752f1b5a136d72d9d8..4ec9c2b65fdbd865df25eb25426be01642ce5d75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 1999, 2000  Niibe Yutaka
  */
index 926e0cefc2bbc64bf30b4087e26af76e8b35d50c..dc8a26015018afbad8fa672de3ce41fbb64bbd19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_SH_PTRACE_32_H
 #define _UAPI__ASM_SH_PTRACE_32_H
 
index 0e52ee83e94648fe4e55fbc1c044e4baed91d4d0..a6f84eba527744d3cb8344f3b17fc36f804d1a56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_SH_PTRACE_64_H
 #define _UAPI__ASM_SH_PTRACE_64_H
 
index faa5d083341269d33e919f84b8822559d4cd5d96..d2b7e4f033c0aaabfa728503146befefcb746237 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_SIGCONTEXT_H
 #define __ASM_SH_SIGCONTEXT_H
 
index cb96d02f55a43f4cd2b854f60579a10ccc10447b..97299daddef5dcc2c8706d3bcc68cf29b6facc15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_SIGNAL_H
 #define __ASM_SH_SIGNAL_H
 
index cf8b96b1f9abbf7be1e56ab6275364c2d708fff8..17313d2c35272ea740dd2b65b2dab0e91925213d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_SOCKIOS_H
 #define __ASM_SH_SOCKIOS_H
 
index e1810cc6e3da38276aaa3617f28cc80bfb682c50..659b87c7c25a6d3c0c94cbd8b06e0488cb9a9a2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_STAT_H
 #define __ASM_SH_STAT_H
 
index 1cd09767a7a3eed746b860d928316017dfd191f5..f0b02152745c0c567726887df4fde486c8420422 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_SWAB_H
 #define __ASM_SH_SWAB_H
 
index eeef88dd53ce8035dc2e93576f9db50ace9c030f..9e0b4e5e6da25fbf77d68888d4fd9b628bdb7f45 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __KERNEL__
 # ifdef __SH5__
 #  include <asm/unistd_64.h>
index c801bde9e6f5076e6e55f86d74b39c60417efdfb..58f04cf3d1d9766733693a56328f032aed976b74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_UNISTD_32_H
 #define __ASM_SH_UNISTD_32_H
 
index ce0cb3598b6296788e9f71ac1070414ddb4e6e58..6f809a53aa24eb2e9b2e18145379a349504344c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_SH_UNISTD_64_H
 #define __ASM_SH_UNISTD_64_H
 
index 09040fd07d2ef61c36e1178d069b538b7efaa254..dc80041f73635219cbc0c30338cd30ae1d51a803 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH kernel.
 #
index 4bd44da910f374616a4dee3eabcaef4c52639b4a..a0322e8328456ef5b7d19d1b9e6df3431319b101 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This program is used to generate definitions needed by
  * assembly language modules.
index 252e9fee687f26c96074619e66ab5dd9966889b0..f7c22ea98b0f06ffa353a186a6e6a0c29cbc1423 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH CPU-specific backends.
 #
index d307571d54b6a7c08a40a765b21d45cd451f7188..509136715ed53c9373e6b53263f73a28df4f2aea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/kernel/adc.c -- SH3 on-chip ADC support
  *
index 786c0769b4c393b586822649830e5a00f796e1ab..5b75a384cbf34970e4dbbb9c7a4d14d7c7abfac2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/clk.h>
 #include <linux/compiler.h>
 #include <linux/slab.h>
index 547c7347845983482f2e48ac569712bc53dea77c..ae354a2931e7e17eec6e375c1d5add9ed0dcc54b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched/signal.h>
 #include <linux/sched/task.h>
 #include <linux/sched/task_stack.h>
index e7f1745bd12120055977da02c095840d50487802..572585c3f2fd8cc2c488aa97e067b475e3cc5d51 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/kernel/cpu/irq/imask.c
  *
index 4df4b284f5915bcbb21a6e2fd809bf7baa44c75d..85961b4f9c6956cc1e9e6d1ca08f5e6443c1441c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/seq_file.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 990195d9845607bfcca4a8b3cfcd05c41df582bc..2a7515b658fd38d9b8176af74dd107b1f5a4b61a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH SH-2A backends.
 #
index d3634ae7b71a96efa9dc414a43bfe4bb2013a3ca..1dcb43d93c86327ec4b4b9f5268f48b9d5290e40 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH SH-3 backends.
 #
index 4f7242c676b37fdea21467775f5bfe79518b9efe..dec027f233f22e142c64b33780a3a1cf9cc52b2e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/serial_sci.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
index 42190ef6aebfc8c76904d80c99e7b1ab009a40f2..ee04052e5bdde2b289a38412e43c2401295696f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/serial_sci.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
index c4a0336660dd102d6542b3f3a5721214439dce08..75aaea49de431742d77d17353bdb78efa6eff2b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/serial_sci.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
index 3a1dbc709831f389d6c33e77929d51e2b4f46709..00c16331e07e5b15483f2251e85477c40bc9684f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH SH-4 backends.
 #
index 0705df775208907b51894732a87eeba44b928e70..baf73a8fc2a0f11d0f9acc0d0dffb69923b495e2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH SH-4 backends.
 #
index 271bbc864929c587f6da4a5b23434f85601a38d2..0dd5312f930b1e48091f1feffae65c7a21ce8269 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index 59bc3a72702e3a96bf98cad4d5ed0e551f94a0c9..6ecc8b6e133c69ab17c8c90a9aa662ceacd4fdcd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/serial_sci.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
index a184a31e686e03729bf0fa9e317105d0463419c2..97d23ec3005f7bbda8cb2807844343e1233479e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/SuperH SH-5 backends.
 #
index b33be505361edb8bb157ee1cef0c6eeb5ec94a45..a9086127b16db175976fcc15cfbae0f878fec021 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     crash_dump.c - Memory preserving reboot related code.
  *
index d18724d186f3cf59022e4c5246b882bfed6f9d3f..96dd9f7da2506d061fa499c5992a8e7eb4a426bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2008 Matt Fleming <matt@console-pimps.org>
  * Copyright (C) 2008 Paul Mundt <lethal@linux-sh.org>
index 04487e8fc9b12ef08383c88051a307329e241173..245dbeb20afea5e5931a17a049964b6022b4f54f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/kernel/irq.c
  *
index e11c30bb100cf16a059c3ccabc283fe67318e800..95428e05d21244ef7f88b00c0568b5b3dda0809e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/debugfs.h>
index f8a695a223dd362f7e5afb3787beb1c59db5ea65..b2d9963d5978ba3fb75ba3c8884a11f38d0b65f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
index 0a05983633cad7fae68defeea5c232f4f313f2bf..bfc59f2c2602f406ecc8ac0a0d97a148c06c2348 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ptrace.h>
 
 /**
index 04afe5b206633ff32c887adf8d259e5a90a97c98..11001a8a5fe0e325e854743aa1d4b678a0e43310 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pm.h>
 #include <linux/kexec.h>
 #include <linux/kernel.h>
index 3a44c753b642c466d4479c1c960821c023daa0bd..b95c411d03337e4b44edaa895437e253eeeed948 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/kernel/setup.c
  *
index 0b30b9dfc87f22ae20a9d5355a2f5cc15e4ed03e..282774472603e24d3c4ed660b13bc7b8000e61ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
index 08bce11badc6a83f643302fa512c9ab11f67b7c1..c46c0020ff55edf0fdfda120ed90cd3fa7b65d17 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/sh/kernel/signal.c
  *
index 6576e5ee1fc3632c1880af2c298b4311996261c4..724911c59e7dafa8d028f51505c26e2fa0219b8a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/kernel/sys_sh.c
  *
index a2e1231a90a306d545996dda2cb6590a24053c24..f8dc8bfd4606be80b9a506b1f81474b1652456b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/sched/task_stack.h>
index b32d1c3a4655d3f48246ed6936ccac107775442f..8b49cced663dc54a387144866811fa8f16929893 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/io.h>
 #include <linux/types.h>
index 5b9a3cc90c58a770cfd28e0c816048d975f3845e..77a59d8c6b4d41a8f2597805cfac6d750ca5eebd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ld script to make SuperH Linux kernel
  * Written by Niibe Yutaka and Paul Mundt
index 6ab108f1a0c6e2277b916b6009986a4b0b04241b..5db6579bc44cac0cef14a5619c03026ab724fcf6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o
 
 $(obj)/vsyscall-syscall.o: \
index d4b5be4f3d5fc67a157d38b24388c5c069dfe106..bb350918bebd19811685bcfb65be9f2a2da5a722 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
  * Here we can supply some information useful to userland.
index 23af17584054e4601ae6277046eafd1145841a99..bece5fa7361830f046fe353658f1dce6bdd3fa90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/unistd.h>
 
        .text
index c2ac7f0282b38a025fa553e856a9324cfa1a709b..2aeaa2ddee50ebd529b7ebbf043a3388f7919129 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 
 __INITDATA
index 0eb74d00690a18d4c725fb95c9bd697c7a04e7f6..854ea3235704153dfe0ee7216ee154d871340148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .text
        .globl __kernel_vsyscall
        .type __kernel_vsyscall,@function
index 6d59ee7c23dd52ed27e199d8e2597f1e1fc3f26b..e3582e03c0eb0bd33ce109035b3c495cfd3f00f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for vsyscall DSO.  The vsyscall page is an ELF shared
  * object prelinked to its virtual address, and with only one read-only
index 3baff31e58cf22c30b2d770162ee3c4b10c087ea..d0abbe5e38b0f362a02c6e43225bf894cfa9dc21 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for SuperH-specific library files..
 #
index db1dca7aad14e04fe19d3d0b079df0e05e4fa24f..0978606907ed3c01cf209fa847021c869f2a6d69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * __clear_user_page, __clear_user, clear_page implementation of SuperH
  *
index beb80f3160957b3acd833c65158be177c8a6f7ea..e5afe0935847427fba8cf406e1882ae83c798ee5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 #include "libgcc.h"
index c884a912b660ea28c88abe9d923d2a7214ccadcd..ae263fbf25383b70ca5ff4a92999351da6646be7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 #include "libgcc.h"
index 9d7b8bc51866695a594fdba4615d2dd185c4ddd1..d4e9d18cee0bcc41a006bb9de5c10081d84f25bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * copy_page, __copy_user_page, __copy_user implementation of SuperH
  *
index 0901b2f14e15e9b2b396e923641de5c2a28eb90d..dad8e6a54906bece957c8ec7fbd6a35cfcfb9bec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Precise Delay Loops for SuperH
  *
index 60e76aa8b53eceb6aaac7edf548c4c3a857d5827..0b67fbc44f6fefb59790b1f43cccc706ec6cf77e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generic __div64_32 wrapper for __xdiv64_32.
  */
index 5ee7334ea64ff7ff4e68a32f24a5161c8f195a71..4a9a966e71b0e7871536a68c36e0cc3c44000e4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*     
  * unsigned long __xdiv64_32(unsigned long long n, unsigned long d); 
  */
index dcf8d6810b7c1c940fd5bbb2f4eb9c7cb826d639..33eaa1edbc3c0656954a9c71fb8211565d9e2749 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 #include "libgcc.h"
index bc6036ad5706022bb19ff8149d6233ee6ada56e0..8ded104077aa320b1f117712179b1e6d6405c9e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: memchr.S,v 1.1 2000/04/14 16:49:01 mjd Exp $
  *
  * "memchr" implementation of SuperH
index 459fa92a7c5311b02c1e1f21c74536eb27432ed2..a2435c0f6302ff3e9a698fecccea77deea255b31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * "memcpy" implementation of SuperH
  *
index 232fab34c261cfb83343231828736921ceef3ee7..08ab3062c4b27c284b3d1119515b467d524f5ba8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: memcpy.S,v 1.3 2001/07/27 11:50:52 gniibe Exp $
  *
  * "memcpy" implementation of SuperH
index 5a2211f092029f2a2974cbb0fd216dee36fd103f..bdca321814a95aacbe19a4054e2574d1a77d6819 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: memmove.S,v 1.2 2001/07/27 11:51:09 gniibe Exp $
  *
  * "memmove" implementation of SuperH
index 1a6e32cc4e4d910be7ed4e4e88c58e524c6658b1..10649c4cdab8a47e6e20c4381111bad9c2a707d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * "memset" implementation for SH4
  *
index af91fe2b72a66e571ed3c7f08fca44b68f4a4565..a6d5ec0bd9cf931c19ed6a960821e78efc8029d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: memset.S,v 1.1 2000/04/14 16:49:01 mjd Exp $
  *
  * "memset" implementation of SuperH
index 1bcc13f05962e3f66ecefebf0c3adedb670bb456..80ea53dd34f6dd2298b95d0610b83ffc202a2958 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: strlen.S,v 1.2 2001/06/29 14:07:15 gniibe Exp $
  *
  * "strlen" implementation of SuperH
index 49aeabeba2c2c3b48d14c89004b3dc0ec04b987d..515f81b002021cb1f7a69fc6b544dbc7015e0e50 100644 (file)
@@ -1,3 +1,4 @@
+! SPDX-License-Identifier: GPL-2.0
 !
 ! Fast SH memcpy
 !
index 5d682e0ee24ff5ae334fa0f8d61b6f2c1a76a745..231ea595b39a464e65f92b302e4cb69370a99ee4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Cloned and hacked for uClibc by Paul Mundt, December 2003 */
 /* Modified by SuperH, Inc. September 2003 */
 !
index 2d37b0488552596e5c12cce1a8568fe7893cb51d..453aa5f1d263eb84a8e97582ca87928b24d96524 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Cloned and hacked for uClibc by Paul Mundt, December 2003 */
 /* Modified by SuperH, Inc. September 2003 */
 !
index 1963bbd42288d38d4f751f7a750cec1ee27f83bb..b422e2374430665b869123a87bf827dd98357094 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .global __sdivsi3
        .global __sdivsi3_1
        .global __sdivsi3_2
index ea7c9c533eeab4d94aebfc8795449e8af1e99900..b61631e523d4d6c377bc3fa60ef087421fb33c99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Cloned and hacked for uClibc by Paul Mundt, December 2003 */
 /* Modified by SuperH, Inc. September 2003 */
 ! Entry: arg0: destination
index cbc0d912e5f35c733a7d565802e2b446c987be24..c00b972f999988fea3a80b45911a14d816ee3aff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Simplistic strlen() implementation for SHmedia.
  *
index 6895c0225b851d6a74f5c3aef55b89972f068a23..c032cb15758988cabf6fd7a683c7266870ecc162 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .section        .text..SHmedia32,"ax"
        .align  2
        .global __udivdi3
index e68120e4b84752a737fbdc535f48f77fb8e365fa..e4788fb4fe82492e6358aa794f4d446a70ff3c7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .global __udivsi3
        .section        .text..SHmedia32,"ax"
        .align  2
index 8ae1bd310ad0d2d9f8b9e5694e6bd755e1f33eac..784f541344f36d0bba7749dd413160e8317f7c11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * These are copied from glibc/stdlib/longlong.h
  */
index dba285e86808c7da56070728c3617c61ba7acdc9..50cdd13490150bf1554190396628b29c120e6406 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Memory management options"
 
 config QUICKLIST
index 92c3bd96aee56fea8df2c393d1810b827849da57..fbe5e79751b30392305b2df67cd051828606b11f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux SuperH-specific parts of the memory manager.
 #
index 940e871bc8169cba5e119d86579078f4e3ec6294..14312027bb0806cceb84ef5adc532f4666a8f504 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sh/mm/extable.c
  *  Taken from:
index 0b85dd9dd3a7df0ae97e37da5228328bf0c4a5ac..8b8ef89721041bb3ecae009bee4b8395399eb758 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <asm/mmu_context.h>
 #include <asm/cache_insns.h>
index 063c298ba56cc900479eb9b50a8c9587678f6893..8045b5bb7075e90951dfc8f250301bc6e644dcbd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Lockless get_user_pages_fast for SuperH
  *
index d2412d2d64627e5a2db4ade3cc23af0dd95726c0..960deb1f24a17ba2a3688271643eded6f6988587 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sh/mm/hugetlbpage.c
  *
index efbe84af9983e61d127856f6b49a6cfb21c3077f..927a1294c465f88dbd245c7ad45f9ce16c2d28dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Re-map IO memory to kernel address space so that we can access it.
  *
index a62bd869677976bf4759d83b8e5646420d0f6826..5c8f9247c3c2d2c37b0785b3cf850da4b91b4a4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/slab.h>
 
index a7767da815e91453c5b5526a05f4c72405e4afba..010010bf205a77486573fd6d71ad553d6a4792c9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/module.h>
 #include <asm/sizes.h>
index ce3b119021e78cc527c47425f427475c3a4c238e..d478dd8dac0b240bfecfef56039e3428b8a7ee07 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 CFLAGS_common.o        += -DUTS_MACHINE='"$(UTS_MACHINE)"'
index f5ff7c5d8913cd23b1dd6f178827008d11efba96..6d7c2d8eaf5504b30075231de4780f54c8b451f2 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk
+# SPDX-License-Identifier: GPL-2.0
 #
 # Awk script to generate include/generated/machtypes.h
 # Heavily based on arch/arm/tools/gen-mach-types
index 0be3828752e5bc9ddf33ba74c9e5b9efd03691e4..4e83f950713e9f9837da01406586613a9c07cb3f 100644 (file)
@@ -44,7 +44,6 @@ config SPARC
        select ARCH_HAS_SG_CHAIN
        select CPU_NO_EFFICIENT_FFS
        select LOCKDEP_SMALL if LOCKDEP
-       select ARCH_WANT_RELAX_ORDER
 
 config SPARC32
        def_bool !64BIT
index 6db35fba79fd2fe77977cbf47b053d2608b0e98a..4aef29a119251d9b3ca509af72abaf92b826a0f9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 8496a074bd0eb74548ce1e38709b8a8dfe7dfb31..dbc448923f48f84b69757171be434c6f71a64355 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # sparc/Makefile
 #
index 6a4ceae5ec676f7464d4799fe9d8bf98e3b2e348..ec8cd703b708c33870bb2c110a929e4af1c3eb64 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Sparc boot stuff.
 #
 # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
index 5d469d81761fcb039b44245b813d9f3a21310cad..818d3aa5172e680f7e138a21b54aeac4f3b0e48f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index 1cda8aa7cb852639cbb98fac2314abbdf9859afb..155cefb98520e9a7e3b2c9f86ac20b180ba8ff5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index cc39553a4e436dd754e3f17c637211ea4149fd48..dcdc9193fcd721cc298b33d89e524d0c86399b65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index 2b1976e765b53212e5aa16ab37078e3f709e12e1..b8659a479242dadb26bfaa1665abf9b927c86a81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 #include <asm/asi.h>
index 5f5724a0ae228e8852ec8014686d19a8820db6e3..83fc4536dcd5764c966eb17020558a4dd678b026 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/of_device.h>
 
index b5c8fc269b5f3446964a6ee57a51d37eeb43e521..7157468a679dfd81158c132d637a37498e685a91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index 3150404e602e46fedffa3b97dc8260265114136e..7a6637455f37adb9a476affab560feb91bcd5356 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index 19cbaea6976fd4cca85f745a50eb61cf25babced..417b6a10a337a51e413163c6c917177f731e2857 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OPCODES_H
 #define _OPCODES_H
 
index 219d10c5ae0e7a850b33b5cc30ce99e90bd56fd4..7d8bf354f0e795413d18e7228b7932048d2afb76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index b5f3d5826eb411c9c6bde3aa334c195b65429354..0b39ec7d7ca2983f47f3a0092913407a9b7878ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index 54bfba713c0eb564620a4542101e752c98b4cc97..b2f6e6728802366af17596f6c35dc827f98f1e8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/visasm.h>
 
index 70f52c1661bc11b4f7c9de697fb6a67fecfa8a97..efe0d6a12e5a8bff8cf139f12fffff1e07a9921d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AGP_H
 #define AGP_H 1
 
index 8f3b57db810f31d2d0d518d1c8611b6a15a8d7ef..b1dfb1a99f07a1e4b682320a23b4f098e5d5f372 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * apb.h: Advanced PCI Bridge Configuration Registers and Bits
  *
index d381e11c5dbbf7cfcf62840da9e308fd5bab8782..96e0972e8dbfae560f3386bbc46a01f08f7e771f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
  */
index e8e1d94b4cc9ee9760b2a97ce5da16ab54474a31..eaed0117a838a179ccbcd75e4afec97a75fcbb15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_ASM_H
 #define _SPARC_ASM_H
 
index a0e28ef025587a8384f3825f04a5ec66cd99ca75..49aaf6f3bc558440cf0e645cacfd516f6a6235b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* asmmacro.h: Assembler macros.
  *
  * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
index 8ff83d8cc33fd7f4abd2f7ae2b018baa1006cdd7..425151cc4808762fc2fd607a0656f2b2f754d4b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_ATOMIC_H
 #define ___ASM_SPARC_ATOMIC_H
 #if defined(__sparc__) && defined(__arch64__)
index 7643e979e3338c8f23affa81269379f3d77fba52..0c3b3b4a99633e7d3500c19c07393cc1b4633cdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atomic.h: These still suck, but the I-cache hit rate is higher.
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
index 24827a3f733a9b23e74509a16089a1790c8a16e8..abad97edf736bfc1f1d456e32dfe3922c60f2624 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atomic.h: Thankfully the V9 is at least reasonable for this
  *           stuff.
  *
index 3e09a07b77e9132adb3dbcdc906270453df0f3dd..a2681052e90009944d0c86dd5d689ec7e466c85b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_AUXIO_H
 #define ___ASM_SPARC_AUXIO_H
 
index 5d685df427b45a28a75332ac18f7096dc4740f2b..852457c7a265ae561b45f1544fa7945d5bda8056 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * auxio.h:  Definitions and code for the Auxiliary I/O register.
  *
index 6079e59a7ad1f38b6c719c4ce5b53b060b9c392e..ae1ed41987db7416618af516053736f3ecbd086b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * auxio.h:  Definitions and code for the Auxiliary I/O registers.
  *
index 4e02086b839cf2146431265ce77dbb984840d33e..8625946d8d00651d01c7275c99560dfc19e13195 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_BACKOFF_H
 #define _SPARC64_BACKOFF_H
 
index b25f02a029e060c6908d59c091c6193d64a1b3a9..c10b4164be5925953f952ef1d4618203bdbf1b6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_BARRIER_H
 #define ___ASM_SPARC_BARRIER_H
 #if defined(__sparc__) && defined(__arch64__)
index 8059130a6ceebdbc544685f72ab53fbf2a44dd3b..304f9c3f7c4a4b36509896ef6c03c10fec21f9b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_BARRIER_H
 #define __SPARC_BARRIER_H
 
index c9f6ee64f41d89bb093ace84603c9f0ed14f1db1..9fb148bd3c97e59953df8de87eeeb02b3a71a2b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_BARRIER_H
 #define __SPARC64_BARRIER_H
 
index 423a85800aaef06515eee56bb623ab83eda1d4ca..00a4f116144d29d29c50ca29a3a5f3552d9fa082 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bbc.h: Defines for BootBus Controller found on UltraSPARC-III
  *        systems.
index 9c988bf3adb6292ac1972e064a2a68597cacc669..2c2a2d85e8ec155c53eecbb8befd74d12c89d6d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bitext.h: Bit string operations on the sparc, specific to architecture.
  *
index b1edd94bd64f398d6363132519ab995cc549c452..4c431d274926a4cd59be3e86b74fce9d9ef37ca1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_BITOPS_H
 #define ___ASM_SPARC_BITOPS_H
 #if defined(__sparc__) && defined(__arch64__)
index 600ed1d9c8c81d44ff126f4d68cf5ef21c79933b..0ceff3b915a8946b0c91f0fe9ef9886cf1df6f1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bitops.h: Bit string operations on the Sparc.
  *
index 2d522402a9375ca22aac8f06276c2bc530b61107..a90eea24b2862fcc9fa297f37c494da3eda6ecc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bitops.h: Bit string operations on the V9.
  *
index 75a32b109e15103c03a7b546a97b1ea7191eff79..01cdc4265733cb405266e3bb6e512752fb95e573 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_BTEXT_H
 #define _SPARC_BTEXT_H
 
index eaa8f8d38125ca976e4aa911ca050db10f4fba9f..6f17528356b2f71c8a71764a0ac2715a3398a33f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_BUG_H
 #define _SPARC_BUG_H
 
index 61d86bbbe2b2f5270043d9a3ee72330119f65eb0..02fa369b9c21f440c9a792055cd76ddc1eaa53df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* include/asm/bugs.h:  Sparc probes for various bugs.
  *
  * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net)
index 5bb6991b48575026134498f743390ba598b20564..dcfd58118c11fda23e0921b5b2e1f75bf8dc59e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* cache.h:  Cache specific code for the Sparc.  These include flushing
  *           and direct tag/data line access.
  *
index f6c4839b83888220e4b621248824e334ed2d9afe..881ac76eab936242f9c0f2b30e359ffbcd56ded8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_CACHEFLUSH_H
 #define ___ASM_SPARC_CACHEFLUSH_H
 
index 12164006181c4e3270da0e5222fcba5de1fc8af9..fb66094a2c30c74e3ad6f50286f3bdab60071908 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_CACHEFLUSH_H
 #define _SPARC_CACHEFLUSH_H
 
index 68513c41e10def4a09cb1d842fcc64cb2c34a122..e7517434d1fa61d337911a9886116bae1f52f762 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_CACHEFLUSH_H
 #define _SPARC64_CACHEFLUSH_H
 
index efb19889a083ebdde30407464a80d01dc446bfa1..534da70c635779e0e11e569bbd2f71d7d9f9392b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_CACHETLB_H
 #define _SPARC_CACHETLB_H
 
index 85c69b38220b946dc9618f24fa4d4172c9c7bbeb..01540eca1671254258da367304c89e641b88e1f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_CHAFSR_H
 #define _SPARC64_CHAFSR_H
 
index 7ac0d7497bc593bbc6c87f69964073cbcd8d1d14..c3be56e2e768a775456b3defab331380f1324a8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_CHECKSUM_H
 #define ___ASM_SPARC_CHECKSUM_H
 #if defined(__sparc__) && defined(__arch64__)
index e25af5fc99fd41e3619dc1c0e3742eec5318de10..d1e53d7aed39f1fe30b2c041e2aeba6d9cad8eff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_CHECKSUM_H
 #define __SPARC_CHECKSUM_H
 
index 96a5ed58cea605e6b7c17bb0ea3f4251743f3218..e52450930e4eacebb9c20cb3c4145320c7ddcc1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_CHECKSUM_H
 #define __SPARC64_CHECKSUM_H
 
index 859b4a4b0d3033f25d32f2b1230b5b22d6561537..96f043cb2c3ea8ac458a6364b195deda75502b13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_CHMCTRL_H
 #define _SPARC64_CHMCTRL_H
 
index 9355893efa5281d200434419bb72b774e7989d91..b7955c6b91fc4e85ba345de40dbc3224b54e024d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_CMPXCHG_H
 #define ___ASM_SPARC_CMPXCHG_H
 #if defined(__sparc__) && defined(__arch64__)
index 83ffb83c5397f3e4bede59570856a11c41d9fc0e..3e3823db303e7d4016a9d5116d0a11e31844dfff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 32-bit atomic xchg() and cmpxchg() definitions.
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
index 4028f4f1e5612b4717b87b0943920d6e95d69e86..f71ef3729888f2b14d764d2b39e3ad9741fe230e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 64-bit atomic xchg() and cmpxchg() definitions.
  *
  * Copyright (C) 1996, 1997, 2000 David S. Miller (davem@redhat.com)
index 6f251c4d613efdb9857d85e1c58b7cdbb15e46b5..977c3f280ba1900bf6d1a21990a0b17decc9821e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC64_COMPAT_H
 #define _ASM_SPARC64_COMPAT_H
 /*
index 4b027b1044fad6dcd44ec051173de59003f1a590..e5f7a7f281d2a59ba5fc81902e5c8dc2461738a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _COMPAT_SIGNAL_H
 #define _COMPAT_SIGNAL_H
 
index b8abdfcf55552d791c925f2e7a7a8aade63f3b2e..4df56a6ba7d92bd6c022a548f745b6408ba2d3f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_CONTREGS_H
 #define _SPARC_CONTREGS_H
 
index 84d7d83b80840d6dce6efcb5579da8dd27535ce0..2b59799859d19b6002f2b5f4a93d1c3040e21081 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CPU_TYPE_H
 #define __ASM_CPU_TYPE_H
 
index 128b56b08676058700c4b9ee07752b1fa811d197..d213165ee713b7b5e1684ced108c49e2e8617075 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_CPUDATA_H
 #define ___ASM_SPARC_CPUDATA_H
 
index 05f366379f5336ce239205cb956c49ada99ec18e..895d0964b8025699e21bf04cd7d7d4044939693e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* cpudata.h: Per-cpu parameters.
  *
  * Copyright (C) 2004 Keith M Wesolowski (wesolows@foobazco.org)
index 5b0ed48e5b0c2e8e201a4bc5abe1cedd02833a7d..666d6b5c0440416537783ceabc7c9bce0520ac39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* cpudata.h: Per-cpu parameters.
  *
  * Copyright (C) 2003, 2005, 2006 David S. Miller (davem@davemloft.net)
index 10a0df55a574aeb8758e57c99073ccf8cf4e2d54..c68312a89d14a243f999d205d58d19d0a359dbd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* include/asm/current.h
  *
  * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
index 620c9ba642e94bc2e432f9ef9098e551268d0e92..c810e1b4285c4b65e575fda6f486a6da583395d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_DCR_H
 #define _SPARC64_DCR_H
 
index 0f704e106a1b97e07a8d4ea3d5ee8d27a9f9b945..93f32507125ef287a7ae90a4000c27061a34a0d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_DCU_H
 #define _SPARC64_DCU_H
 
index 467caa2a97a04199ec379aa1540a29c7fd62a49d..c96af9b91661856c08df2ba108f6713aa4f5cd17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_DELAY_H
 #define ___ASM_SPARC_DELAY_H
 #if defined(__sparc__) && defined(__arch64__)
index 3fb8ca144b4f41de7a2cd8753fad93523975f2fe..0e6dfe857d67636d379a47bafc5f3c006362f49e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * delay.h: Linux delay routines on the Sparc.
  *
index 0ba5424856d8946d3f2127650d0f7baae45a3cc7..22213b1c119d2a1c449276f7abd37871c155d8a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* delay.h: Linux delay routines on sparc64.
  *
  * Copyright (C) 1996, 2004, 2007 David S. Miller (davem@davemloft.net).
index 60bf1633d5541757af6165c4c6413226a369ba98..2f3490dd37dea4feb2a1b030bfa49cf6e6618ced 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_DMA_MAPPING_H
 #define ___ASM_SPARC_DMA_MAPPING_H
 
index 3d434ef5eae3050edf30ee66647a24b6f839cd0a..a1d7c86917c6ea88510b277b61704a5bdfd3b8d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_DMA_H
 #define _ASM_SPARC_DMA_H
 
index fcfb4948147fb68a58b56d9b6a0a371bfa2c6ae9..75563ed090f5d92b25d431362908f29cc5a464fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPARC_EBUS_DMA_H
 #define __ASM_SPARC_EBUS_DMA_H
 
index ccb84b66fef12def057855da8aa82ea67ef386d9..3d5edee36b4cdb685a5edc797c7c3a85e0885be2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ecc.h: Definitions and defines for the external cache/memory
  *        controller on the sun4m.
index 0a2816c50b07faa54c98a1b75798d4d192ddc2da..bbfb4b002ff318daf4d379dff8bf9faf09eb27a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_ELF_H
 #define ___ASM_SPARC_ELF_H
 #if defined(__sparc__) && defined(__arch64__)
index a24e41fcdde160b594a10243e014d02b3c1cab91..37a6016c9ccdf0d5822539ed8368d5358ba419f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASMSPARC_ELF_H
 #define __ASMSPARC_ELF_H
 
index 3f2d403873bd6b9215955ac4103a178b2c7161e0..5894389f5ed56ea9f88994d87f5d6a9c442195ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPARC64_ELF_H
 #define __ASM_SPARC64_ELF_H
 
index 520c08560d1b1bfcbaf6c35b4c07e87a143c4799..e5e0f84accea86d314371990626bedecfc4524ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_ESTATE_H
 #define _SPARC64_ESTATE_H
 
index 1121cb056ffb6b0477e8bfaf768b190eb2088918..5a0171907b7e5dac71055aba5d48d7ef591f901b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_EXTABLE64_H
 #define __ASM_EXTABLE64_H
 /*
index 2173432ad7f72ec8326f55048b440cbba7c68048..f699962e9ddf06e947796302183b7cc67b74c235 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_FB_H_
 #define _SPARC_FB_H_
 #include <linux/console.h>
index 1d9afe277e9c76d6a3481385758ae402da2e45e6..02654cb95dec575ed179b5b107ec13ad95d8fb61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_FBIO_H
 #define __LINUX_FBIO_H
 
index 57f1b303ad54e94215c531452be0bab94043662d..0627fa1265405161b8bad97fbd783f641ecb9816 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* fhc.h: FHC and Clock board register definitions.
  *
  * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com)
index faebd335b600647493ff6306f817220b23167af6..4b315802e63512d3fbff110afad7c40d8948e82a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_FLOPPY_H
 #define ___ASM_SPARC_FLOPPY_H
 #if defined(__sparc__) && defined(__arch64__)
index 071b83e52f15db4305961b46903deb463c443b39..dd63aa3016581df4e31d3724874c8f8ade445c04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* asm/floppy.h: Sparc specific parts of the Floppy driver.
  *
  * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
index 625756406a7ed6119fae262147560a142bd75407..22fbeab92a4cf15aebbbe515be8d15a5d072e99a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* floppy.h: Sparc specific parts of the Floppy driver.
  *
  * Copyright (C) 1996, 2007, 2008 David S. Miller (davem@davemloft.net)
index cc463fec806fc4c7e6cbdb5197b92233d52c4c84..bc378df97fa8b6d55a3f52c924aed72aaaca2084 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* fpumacro.h: FPU related macros.
  *
  * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index 62755a339a5932b96ddc42fd2a0eb8c3affb149b..d3aa1a524431bc8a7a320a51916752506424e655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC64_FTRACE
 #define _ASM_SPARC64_FTRACE
 
index 736335f3671370532ce9c8ced8e0adb14e42776a..75a13a20cc64ab6e70d6771235f370560dd601ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_FUTEX_H
 #define ___ASM_SPARC_FUTEX_H
 #if defined(__sparc__) && defined(__arch64__)
index 1cfd89d922080103d8e4b55c8cc36d94290a75df..0865ce77ec0085e4b3d751a34db89ffc5bc8ee29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_FUTEX_H
 #define _SPARC64_FUTEX_H
 
index 44d4e23451486a9c3d5f0041c42c58bbd3bb145c..a185f664734836560ee6b1cec42967d65c4601d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_HARDIRQ_H
 #define ___ASM_SPARC_HARDIRQ_H
 #if defined(__sparc__) && defined(__arch64__)
index ee93923b7f8252d8727515c5b1e0e57132bf6484..9830d8731a09b8d35f40829dc2e832c922e4aad5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* hardirq.h: 32-bit Sparc hard IRQ support.
  *
  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
index f478ff1ddd028733fe735bcf619e77b8f02803ee..f565402719937e393bf6994cf5b07711e014631a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* hardirq.h: 64-bit Sparc hard IRQ support.
  *
  * Copyright (C) 1997, 1998, 2005 David S. Miller (davem@davemloft.net)
index be8f03f3e731d568e2260bb09bb1006708a9e2cb..25299b701df59b2a78187274f468d6419356ca60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_HEAD_H
 #define ___ASM_SPARC_HEAD_H
 #if defined(__sparc__) && defined(__arch64__)
index 6fc60fd182c41cf2f98496fc9d4fd123478d47a9..d2809c859d0c7f6e53b8cbcb15cb56804d726fef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_HEAD_H
 #define __SPARC_HEAD_H
 
index f0700cfeedd7b270fa874aae03c8df6bf862152d..69a2062d992cf31688ab4c84c4f755e99c9ce3a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_HEAD_H
 #define _SPARC64_HEAD_H
 
index 2ec34f842249fb2fa93da585452e9f9ecd7b94db..3bb0a96ec4ef099595b8f2627c803c2a315955cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hibernate.h:  Hibernaton support specific for sparc64.
  *
index 92ded294a4ecc7ce596b877fb0cdc866c2337f75..18d776925c45a4a8a2ddbc099d6517704b83e8e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * highmem.h: virtual kernel memory mappings for high memory
  *
index 0ca7caab1b06ef646d96aa6abf9c644e68ba6a95..300557c66698f5dedabd8fc34e0ec0c8951b2808 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC64_HUGETLB_H
 #define _ASM_SPARC64_HUGETLB_H
 
index 04b56f862bbe1221fd86d808644b13c402ff0319..688ea43af0f5d90e98722b4be2efbefb75f2cdc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_HVTRAP_H
 #define _SPARC64_HVTRAP_H
 
index 3dc9215d0357e0732ac31a906e4fa4d3a63b1470..89a0c57aed59bcc40d093838e8d4e32a530e5abe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_HYPERVISOR_H
 #define _SPARC64_HYPERVISOR_H
 
index b7af3d6582394b6fb2b370479bd2523f21e6281e..09f026585550f9ef87a2434ab2b5e7758c9b7ff9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ide.h: SPARC PCI specific IDE glue.
  *
  * Copyright (C) 1997  David S. Miller (davem@davemloft.net)
index 3793f7f91c420529daab92fcc7d12c897beb23f9..4c372199cd7053870923eaea8122d38afa362213 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * idprom.h: Macros and defines for idprom routines
  *
index 206077dedc2ad98a2dc8d52088d64c3f6c5ff2de..d61be2a3aac10273f56b8ea4e6f376be104903a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_INTR_QUEUE_H
 #define _SPARC64_INTR_QUEUE_H
 
index 04a9701e7202577e5f3a46c2810bb3b71826ae3a..3ce96e8c088f1941735c1a5ce1743872642778a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* io-unit.h: Definitions for the sun4d IO-UNIT.
  *
  * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index f6902cf3cbe997f5c66ec750e1ebafcfdc2e9f5b..2eefa526b38f034df9ef71437231f93c6d458d69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_IO_H
 #define ___ASM_SPARC_IO_H
 #if defined(__sparc__) && defined(__arch64__)
index 4dd268a3a8b083942210e6c3892c9e43de1c2c70..cd51a89b393c765cc309790e889a61e215b4abd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_IO_H
 #define __SPARC_IO_H
 
index c32fa3f752c8ea4954d2d2faeb7bc3f1c2015453..9a1e9cbc7e6df3a84a0f63fe00656bb6a49adf67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_IO_H
 #define __SPARC64_IO_H
 
index 77413b7e3a186e4c146b943a6dddc840a30155d4..c92ac780c39f87aa4df7d96eb37d56884582c8c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_IOCTLS_H
 #define _ASM_SPARC_IOCTLS_H
 
index e650965b4a8d18224c0e68b9abd52d9bdf996fcf..37935cb34865b43b6529c499c2d50ccbb8ad6053 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_IOMMU_H
 #define ___ASM_SPARC_IOMMU_H
 #if defined(__sparc__) && defined(__arch64__)
index f6c066b52fd62baa30eaa83df1d0c57b8962e163..af51cd5ea3c18347923601a71db233f395c1a90b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* iommu.h: Definitions for the sun4m IOMMU.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
index f24f356f250376e0931a4d4bc5d6bc631f469a74..9ed6b54caa4b3d2d052d37a733fd6ea4c441358d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* iommu.h: Definitions for the sun5 IOMMU.
  *
  * Copyright (C) 1996, 1999, 2007 David S. Miller (davem@davemloft.net)
index 3b44a6a140747d91837a415496d4b3a065b02abe..a2efc274dbb0ca03e86ae36505ee24bfdb8a8e52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_IRQ_H
 #define ___ASM_SPARC_IRQ_H
 #if defined(__sparc__) && defined(__arch64__)
index eecd3d8442c967f3312a66e00ba78691af91dd67..43ec2609b8115418d33db0858272585513f7fc6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* irq.h: IRQ registers on the Sparc.
  *
  * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
index 1d51a11fb261cc17a1b05796b6bed1934f1ff589..4d748e93b97426e7f4148d2548b5cebcad876d77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* irq.h: IRQ registers on the 64-bit Sparc.
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
index 1e138632bd3f03689da1583cb6e70cd377e74698..d1bdf6c398d16f8f1c652591391ab0a861814a7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_IRQFLAGS_H
 #define ___ASM_SPARC_IRQFLAGS_H
 #if defined(__sparc__) && defined(__arch64__)
index 71cc284f55c5f47d8f0a1ae83b8b54da1fc5616f..7ca3eaf3dace99783b7b8f52c7c02adabe2f6475 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm/irqflags.h
  *
index 23cd27f6beb47e689842fbfdafc3bbf5826c7977..c29ed571ae49e92c6424da7f4d89f1ab10254f94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm/irqflags.h
  *
index 62d0354d17274670e62dee66cbb070f1b1517c25..94eb529dcb77623caf637387e694d8e5ddc049a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_JUMP_LABEL_H
 #define _ASM_SPARC_JUMP_LABEL_H
 
index 8d12581ca38616458ee1a04a9e7454b6208caa4c..830053f91da1f6742dfdf31eaa3fa1dbd0e08072 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_KDEBUG_H
 #define ___ASM_SPARC_KDEBUG_H
 #if defined(__sparc__) && defined(__arch64__)
index 1d0b240222ef45b8fe985f09ce475b53e9e2a81d..763d423823bdde7f15225ba06cb85d891a29f3e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * kdebug.h:  Defines and definitions for debugging the Linux kernel
  *            under various kernel debuggers.
index 867286bf7b1a420807c18430bf43f86a83e9e7e5..89428bd4f94b739e69b7b860e0a085b55cac4403 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_KDEBUG_H
 #define _SPARC64_KDEBUG_H
 
index a6ad7bf84bac4f415aec304b50143c8d9f5b8a67..deabe0279cd90e8e53e8c1e602c72a9e72b78f23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_KGDB_H
 #define _SPARC_KGDB_H
 
index aad21745fbb92a6d67d2ea0d1efcfeb7467a1250..55a99b6bd91e004f0e4f49f863b569271e1f51d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
index 49f8402035d7d5bd8c223d140017db2fb52f9a37..3704490b44888f170b742dd7fffdf22496b1b540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_KPROBES_H
 #define _SPARC64_KPROBES_H
 
index 698738a10414a8be5755c7215d7454470f01ed40..ca973955ca8611d7c581e355d934d756bc66c8d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_LDC_H
 #define _SPARC64_LDC_H
 
index 204771cd74a5f2f04f68984856b7e34cd3915786..c68bb5b76e3d8718ab11436bc5b0c655da58e75e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2004 Konrad Eisele (eiselekd@web.de,konrad@gaisler.com) Gaisler Research
  * Copyright (C) 2004 Stefan Holst (mail@s-holst.de) Uni-Stuttgart
index 24ec48c3ff90ae57125c5e768471195307c60efc..6433a93f51264f8854ae5c30be27c0045862d70a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
 *Copyright (C) 2004 Konrad Eisele (eiselekd@web.de,konrad@gaisler.com), Gaisler Research
 *Copyright (C) 2004 Stefan Holst (mail@s-holst.de), Uni-Stuttgart
index 049d067ed8bedf4d5cf50aefc86f9740f98884ec..484a56e81dcc61f438b4c4c84b3fb6636756d4c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * asm/leon_pci.h
  *
index 7190f8de90a0ba485791d1a5620640b6c4eb4c9b..154ae76c02447dad554480d7115be2c176f2b4c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_LSU_H
 #define _SPARC64_LSU_H
 
index fd6ddb05d1b702cbe2d444da487825a81be96c28..9f78f70c6f11df29bf650d66d6e8d3329627c61d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * machines.h:  Defines for taking apart the machine type value in the
  *              idprom and determining the kind of machine we are on.
index 14128bcc58214fd13f0a9ca75313272f3be6e8a5..8b6dbe701b9bd89106573c17ae9e1e98e7bce821 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mbus.h:  Various defines for MBUS modules.
  *
index d8e72f37dc4b98558a34ce1df00d20bbdfdc44a1..07faf754eb71f4676cfa26ea8e9399904b28bf8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_MC146818RTC_H
 #define ___ASM_SPARC_MC146818RTC_H
 
index fa7eac9265825e7cd7ccb1f38ec1a64015df967a..d8fd75da8d49d6c8c43545fa174e7a702e47d672 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index 7238d174e0e30509eb0b6ee235b125ad393096ab..b1708a7e5735e2c6b6f314d740b0207e9b8b2d2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index e8a4c413a1c76d48aece57e8c79043c3a7e85f92..ec31a06d04cc17c56f4d437e082bdc1bb238d639 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_MDESC_H
 #define _SPARC64_MDESC_H
 
index 4065c56af7b65f4359e0616f1031bae603459bcc..6790ed608cbc0751e2112f90065ddda07ceaf272 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_MEMCTRL_H
 #define _SPARC_MEMCTRL_H
 
index 59bb5938d85273fd04a2a5345b22185e108eceb5..7e9472143f9b10245dde408f951cb91852650526 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_MMAN_H__
 #define __SPARC_MMAN_H__
 
index 88fa313887dbafff2db6f62fbb5a8c1eef805a07..286457e589a697533e340425139640c6176f774e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_MMU_H
 #define ___ASM_SPARC_MMU_H
 #if defined(__sparc__) && defined(__arch64__)
index 6f056e535cf8c34ec1cdb7086a5d1c9c53825994..d5b220ca7f409b2e4b3c20e5d55fe57d2d23209d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 83b36a5371ffc62e80fa694e077867f4f8b1f49f..5fe64a57b4ba9c9e8964e4ff97b3c2b41f721d14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MMU_H
 #define __MMU_H
 
index 5531346c64f9b55d90d58b07437cc5a1b842ab49..5e1ea38511f4f86c9f4aff7fa9d26ca188c7415d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_MMU_CONTEXT_H
 #define ___ASM_SPARC_MMU_CONTEXT_H
 #if defined(__sparc__) && defined(__arch64__)
index 2df2a9be8f6de95ad1fc61dbedc2366e14ec5406..7ddcb8badf702944247976e7571d7232287c3809 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_MMU_CONTEXT_H
 #define __SPARC_MMU_CONTEXT_H
 
index 87841d687f8d5306663c54d050aa0ca4b2b08cd7..e25d25b0a34b52c28a1bf122d7dee3a350b8c35c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_MMU_CONTEXT_H
 #define __SPARC64_MMU_CONTEXT_H
 
index 99d9b9f577bfb15826faa7e5b488f3e76d7f81d7..6543fb97a8499a3f23339ed19f17d6629d18118d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_MMZONE_H
 #define _SPARC64_MMZONE_H
 
index 724ca566705240aace5e819e4700ad6b6b525fad..3c17c10744313a864b0c41d8a7561c2caaa82307 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * msi.h:  Defines specific to the MBus - Sbus - Interface.
  *
index c0517bd05bdede161efdc52b7fe2c4c0074f013f..3a2561bea4dd470ae2f87f5fcd9809978d4bbe98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mxcc.h:  Definitions of the Viking MXCC registers
  *
index 284eac3ffaf2cdbb4b281ad070ba6328eff7c9d0..90ee7863d9fe69082e47b3b292fac0660e854cd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NMI_H
 #define __NMI_H
 
index 6b947ee0f6aab592beb5cd172e12b7b0ea9deb8d..5401894a6065d3dee2690302c571b1180e7952a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ns87303.h: Configuration Register Description for the
  *            National Semiconductor PC87303 (SuperIO).
  *
index 426ad75103fb5e3e3d0a0bd5f72d75d6936e3f6e..1b151f738b00e55842cba9aac830183f857ed6ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * obio.h:  Some useful locations in 0xFXXXXXXXX PA obio space on sun4d.
  *
index 63374c4413a859fcb55adb2404f95f094a82a172..69545b3e54547a81ca004cfd35b8746a5618adcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_OPENPROM_H
 #define __SPARC_OPENPROM_H
 
index 72e04e13a6b4059b1c0f5a0946c2510db51f6ce9..df49a7700d737fe57c5329120750ec2258aa3b0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_OPLIB_H
 #define ___ASM_SPARC_OPLIB_H
 #if defined(__sparc__) && defined(__arch64__)
index 56a09b9d7b1b51d3c7457abe1e33d97865981b86..d1cf3a27a40d9e6e87f4c6adfe57551a7a586010 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * oplib.h:  Describes the interface and available routines in the
  *           Linux Prom library.
index 2e3a4add8591b61455af1730e3667d1f26c0f6fa..a67abebd43592f12a3f702b82713a094055107df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* oplib.h:  Describes the interface and available routines in the
  *           Linux Prom library.
  *
index 1be2fdec626896715402512ca00e8ae1f84085c3..5e44cdf2a8f2bd898281a12b10a758ccfafcde04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PAGE_H
 #define ___ASM_SPARC_PAGE_H
 
index 6249214148c24bb44f2203117200768a410cee2d..b76d59edec8c35a32877d67e299e27de5c8395bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * page.h:  Various defines and such for MMU operations on the Sparc for
  *          the Linux kernel.
index 8ee1f97589a1aca43cd41c2b9fecb51bfcb68fee..c28379b1b0fcdaf4efe5641d2771c5f40e257210 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_PAGE_H
 #define _SPARC64_PAGE_H
 
index f005ccac91cc95cc4828f1fce8137c60212aefb0..05df5f0430535f307495662610f2c06dda92d0b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* parport.h: sparc64 specific parport initialization and dma.
  *
  * Copyright (C) 1999  Eddie C. Dost  (ecd@skynet.be)
index 458a4916d14d57bbde6c6e018c3fee8f258e78bc..0c86261721e7873e05ad229657b70a9743dbdacf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * pbm.h: PCI bus module pseudo driver software state
index 6e14fd179335d0a24d05cc71293589b63331607f..cad79a6ce0e49f8a2ec6fa0f9e06d77b4a601fde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PCI_H
 #define ___ASM_SPARC_PCI_H
 #if defined(__sparc__) && defined(__arch64__)
index b7c092df31340cf146c4301e4f8de1aa39d2a764..fe361d3d180daceec34cda76d6a507337ee7b067 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_PCI_H
 #define __SPARC_PCI_H
 
index b957ca5527a3d23c603a53eab461991536cc66ff..671274e36cfad050c3b10cfabaa02ddbcf962235 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_PCI_H
 #define __SPARC64_PCI_H
 
index f41706792592d3d778eea0919cd8a304126b553a..238376b1ffcc46ffc38fa904c3124c55edb315f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * pcic.h: JavaEngine 1 specific PCI definitions.
  *
index cdf800c3326c46641405ff12e5ee458142f7e168..da834ffbe75d6a64bc2312cd28b990bce87c4feb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PCR_H
 #define __PCR_H
 
index bfb1d19ff1bf1ed11303f2a50895d3c692601d90..0cd704ef5ff963331688cf0089a36b82b4109eb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PERCPU_H
 #define ___ASM_SPARC_PERCPU_H
 #if defined(__sparc__) && defined(__arch64__)
index 06066a7aaec31b19ba83bd2231b1b26f67ed2a5c..ee6c7c1934f6907f3342f4ddd0b6428febf515ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_SPARC_PERCPU__
 #define __ARCH_SPARC_PERCPU__
 
index 007aafb4ae97e4914dbfeba584795680d41b6adf..32ef6f05cc565a370a1819d6856f8ae6aa78f148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCH_SPARC64_PERCPU__
 #define __ARCH_SPARC64_PERCPU__
 
index 4d3dbe3703e9001f53f65f64d38629bda6dedb63..c2aec0c7f4f5e0e14af99c670c7643425459639a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPARC_PERF_EVENT_H
 #define __ASM_SPARC_PERF_EVENT_H
 
index b6db1f7cdcab325d216c4549a4e3426cf73ca9b5..9ea0b37586c9d0017601f0191cdedd1b4af332fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PGALLOC_H
 #define ___ASM_SPARC_PGALLOC_H
 #if defined(__sparc__) && defined(__arch64__)
index 0346c7e6245230689360f52921032f8869cbb793..90459481c6c7a8c4d2f98e0b59e841c364d3cbbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_PGALLOC_H
 #define _SPARC_PGALLOC_H
 
index 3529f1378cd8d6230a0ad3c76cec74b874a94b2d..874632f34f624b8ff00e1fdde776ae72815c362e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_PGALLOC_H
 #define _SPARC64_PGALLOC_H
 
index 59ba6f6207322ef7533a73998f54d1b1b888fc94..e48891170f847f9caf5384254c6671d29d694a86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PGTABLE_H
 #define ___ASM_SPARC_PGTABLE_H
 #if defined(__sparc__) && defined(__arch64__)
index cf190728360bbfb43621d23a7fb3a22c443a7399..4eebed6c6781aae875edc8aa3142978234f0ef2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_PGTABLE_H
 #define _SPARC_PGTABLE_H
 
index 4fefe3762083d42746d51c779c7f830cd439973d..fd9d9bac7cfa7b3ac96b1fa54dfba71f96e60916 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * pgtable.h: SpitFire page table operations.
  *
index ae51a111a8c7ad0027dafbc0cca6225832c3ca49..32a508897501268fb794efa6b483ad782fe9590b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * pgtsrmmu.h:  SRMMU page table defines and code.
  *
index 522b43db2ed336a5d34dee17b4e8c3b593e6ee5d..4003c35304bd103a2012a3ac80dd3f0bc5351dd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_PIL_H
 #define _SPARC64_PIL_H
 
index 9da9646bf6c6b326ee6d6f47b1d60bd4dd970453..18295ea625dd7271617c15caa003a173099dd4d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_PROCESSOR_H
 #define ___ASM_SPARC_PROCESSOR_H
 #if defined(__sparc__) && defined(__arch64__)
index b395e5620c0b986ec808675ccf3062e9a534ae43..192493c257fa2905b00f79aa893785778f2df2a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* include/asm/processor.h
  *
  * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
index f04dc5a4306245ffc0b53b3c88707332b8a25a0f..c7c79fe8d2655bd3e54177e84ff62395afd2cac6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm/processor.h
  *
index e71eb57945e064eb4602464af190278578a1b53e..65127ce565abc3d5c6d3fcd37ecb21d2d3dd9563 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * psr.h: This file holds the macros for masking off various parts of
  *        the processor status register on the Sparc. This is valid
index d73428e4333c980486561799aba8fc31ccc123b9..6a339a78f4f42b442bfd40b8353356223ee831cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_PTRACE_H
 #define __SPARC_PTRACE_H
 
index d68a4b1021004c6284ea2c88d15324b24d041f52..c277729152c68a5ea1ff306895aa9a1f78015468 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_QRWLOCK_H
 #define _ASM_SPARC_QRWLOCK_H
 
index 5ae9a280284640fb482f162e1042446f7b506d5d..48808f3d9dd7dbfa61d5ad1ee9178b8649db3135 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_QSPINLOCK_H
 #define _ASM_SPARC_QSPINLOCK_H
 
index ecb6e81786a69d083e28e0f765deddd0aae9dbe3..79a54d66a2c0b7bd000ae2a299d2fbde143c58c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ross.h: Ross module specific definitions and defines.
  *
index 5eb7f1965d3364f894ac2be8af833fb4dba48097..4d6026c1e446fee352d92b2aa5b7db2ee95d1450 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sbi.h:  SBI (Sbus Interface on sun4d) definitions
  *
index 5e8b01fb334353422534b410707bc631effc0fdf..958351190788cb4ac08075bb2c1d0db510d7b867 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_SCRATCHPAD_H
 #define _SPARC64_SCRATCHPAD_H
 
index 5ef8826d44f85d205b1368e18dd3458f7c9ad1e2..62d4579efb1ab8c2f0f2cbe0defe07d5b1f8c8dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SECCOMP_H
 #define _ASM_SECCOMP_H
 
index f300d1a9b2b6f8f3650ef3b6d712f493e4a6b8b1..08f833453ab3dfe3b3101a556fafdede4421f708 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_SECTIONS_H
 #define __SPARC_SECTIONS_H
 
index 8b32538084f745c92796e9c2053307e852d2d33a..72205684e51eae3b202b26806acc93252b6d189e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Just a place holder.
  */
index e96137b04a4f6ef75c29ef567acabd1d02101a57..9c98f4fc8839e6b81fec65a9d406bcd704ddcb36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_SFAFSR_H
 #define _SPARC64_SFAFSR_H
 
index 4ebc3823ed4fec0a5fb66ad3324bedab98fe19a2..4a247b40573c4de516a4b08a8e32806923d869f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_SFP_MACHINE_H
 #define ___ASM_SPARC_SFP_MACHINE_H
 #if defined(__sparc__) && defined(__arch64__)
index 8bf0cfe0694f8951717b8a885c415c254b77949b..951a4525fa4bd5852b566455e292db728bfb35e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_SHMPARAM_H
 #define ___ASM_SPARC_SHMPARAM_H
 #if defined(__sparc__) && defined(__arch64__)
index 142825c8d3ac73f1fc04a366b859208f69a4521c..9767a8b30242f6cbbcafa6752c04af65c1386168 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMSPARC_SHMPARAM_H
 #define _ASMSPARC_SHMPARAM_H
 
index 1ed0d6701a9b651221aa847c4b4ad5aed3feef47..c0731b57124cb353f16e9593bb8f577458317647 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASMSPARC64_SHMPARAM_H
 #define _ASMSPARC64_SHMPARAM_H
 
index f4eb630a58ed49fe1032137dd11d773edd0de25a..ee05f9d2bcf2c8f1bdb11964bac96968491eadc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_SIGCONTEXT_H
 #define __SPARC_SIGCONTEXT_H
 
index c33ce3f2ba84e36c7795aa2b39e008b9acc230aa..827b73a97f8a7e48418408ff4011571da2c49573 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_SIGNAL_H
 #define __SPARC_SIGNAL_H
 
index b59672d0e19b6dd988fda29ad2871040e833168d..dea59f6ce79fb0e202ca9256ef0f8eb9b3ca9511 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_SMP_H
 #define ___ASM_SPARC_SMP_H
 #if defined(__sparc__) && defined(__arch64__)
index 7c24e08a88d274f8b0b8f4f5dfe9a53c2517809a..856081761b0fc3c11fe640cdd30d4009f727f309 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* smp.h: Sparc specific SMP stuff.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
index a75089285db851e8cf3083d069bf3dada4d47c11..e75783b6abc42664fd034f27f09f74c6a81bdfc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* smp.h: Sparc64 specific SMP stuff.
  *
  * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net)
index e5e1752d5d78e9a5ac594c698a78de432b78c9b1..1dd1b61432dbdbb467c56bcd22cfb1b50ae67be7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_SPARSEMEM_H
 #define _SPARC64_SPARSEMEM_H
 
index f276b0036b2c4d3d547d25a2a7ff5e9722eac7af..3f4ce55bc4d63eccfe08f248b6a9e0bedb6f8889 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_SPINLOCK_H
 #define ___ASM_SPARC_SPINLOCK_H
 #if defined(__sparc__) && defined(__arch64__)
index 67345b2dc408b94970f80a40d4aba18d2c08c7bc..26f00ac2b4700a41ba525cc2568367fb84813b23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* spinlock.h: 32-bit Sparc spinlock support.
  *
  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
index f7028f5e1a5a3bff399a7a02aa4655f7cad8e012..4822a7e94a30b839a09cf8a9bf4b2263611ff6fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* spinlock.h: 64-bit Sparc spinlock support.
  *
  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
index bce8ef44dfa99bce688e936c8c9d74c0c215b3e6..ed1d569b638e88655ca3176bc9084f399774927b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_SPINLOCK_TYPES_H
 #define __SPARC_SPINLOCK_TYPES_H
 
index 1b1286d0506910c0f9a92ab6af14e272dd008d61..e9b7d25b29faed59bcfce532bd30d2ccbbede0c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* spitfire.h: SpitFire/BlackBird/Cheetah inline MMU operations.
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
index c30d066f30487d000064eb7dea609cf9c32368d3..556ec5d59c8816d32a72624684438d22c84c7eda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_STACKTRACE_H
 #define _SPARC64_STACKTRACE_H
 
index 176fa0ad19f15d2d41a7234378cc36db144abd57..fb1a8c499cb031d29201cdde7b221e1aeb8051fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * starfire.h: Group all starfire specific code together.
  *
index 86f34be14ce0065671587ea5ca9558c5d3b8096d..3d9cd082716bfd15db13f28cd74f035c76248392 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_STRING_H
 #define ___ASM_SPARC_STRING_H
 #if defined(__sparc__) && defined(__arch64__)
index 649412476a6949b69d57e753fcb766ceb35f9960..f488946bd7d65ef4a6b4afde248153cb2848371f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * string.h: External definitions for optimized assembly string
  *           routines for the Linux Kernel.
index 6b9ccb3086057a09feb565ade3c3f48859e3246f..ee9ba67321bd8735d78008cdd6449c4c2405258b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * string.h: External definitions for optimized assembly string
  *           routines for the Linux Kernel.
index d81a02eaf78bfc392fb0431adf40fe3b82f39fd7..55de4da70dff2579ebcc868863937bbcdedb2c54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/asm/sunbpp.h
  */
index e535061bf7555738420277a4f6e2490cce9bfa8d..96f6526b964e46361bec67d121bc7de765c4d7b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* swift.h: Specific definitions for the _broken_ Swift SRMMU
  *          MMU module.
  *
index 2dc4fa5c6f8c6b99381bdb256e75c7cf71e24e26..7cf1c5dc734c9523738768a6d97e427aa4353c76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_SWITCH_TO_H
 #define ___ASM_SPARC_SWITCH_TO_H
 #if defined(__sparc__) && defined(__arch64__)
index 475dd4158ae4f6c2c295d1b42c172905196eef5b..42eeafcb8a418fb57d605b6467138e4cbcc85e2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_SWITCH_TO_H
 #define __SPARC_SWITCH_TO_H
 
index 10e76332dc997663a63a60a9d9460a6e7b55dc30..4ff29b1406a9b7c44d438d20c73118fc77630416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC64_SWITCH_TO_64_H
 #define __SPARC64_SWITCH_TO_64_H
 
index 1757cd6c521bcba1c9ded32f98bd60fd92c07909..053989e3f6a6f1435323873ea010723ac09736bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPARC_SYSCALL_H
 #define __ASM_SPARC_SYSCALL_H
 
index b0a0db8ea61a84463f5160bd2671ab3439ed3984..1d819f5e21da9654442c0c68c1969eadad4a0ee6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_SYSCALLS_H
 #define _SPARC64_SYSCALLS_H
 
index 948067065ac5f96c19b1e9977ece8b3bac8851eb..fa9de4a46d36365bbe29e75b3cd851bc00de06ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_TERMBITS_H
 #define _SPARC_TERMBITS_H
 
index 0c2414ddd52c336e244789283b72067cc06ed365..4a558efdfa9375921b724c90ceb2bdecd3a90d88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_TERMIOS_H
 #define _SPARC_TERMIOS_H
 
index 122d7acc07e6b91519b756e9676e4dbe10c69ab9..740b1743ed8c3e7453cab87a8ed79899d472bde2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_THREAD_INFO_H
 #define ___ASM_SPARC_THREAD_INFO_H
 #if defined(__sparc__) && defined(__arch64__)
index 229475f0d7ce0a700619848c9525d2c24e77d591..febaaeb1a0feed5052aeb10d672de96e03929133 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * thread_info.h: sparc low-level thread information
  * adapted from the ppc version by Pete Zaitcev, which was
index 38a24f257b859757aa9ff379d31ffb052b1fc3a7..caf915321ba9f492ff007853ac921be8317d97d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: sparc64 low-level thread information
  *
  * Copyright (C) 2002  David S. Miller (davem@redhat.com)
index 612fd2779d9eaffe78dbf590194290e14fb05a98..eaf6195d17e2f463e3deae0a1a26121a9c0b9536 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_TIMER_H
 #define ___ASM_SPARC_TIMER_H
 #if defined(__sparc__) && defined(__arch64__)
index f8e708a0aa58b9a9e060d68edcbe0d7f1f2365f6..eecd2696922dd3fffd65e3dd4f54bffeaeecd696 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * timer.h:  Definitions for the timer chips on the Sparc.
  *
index 51bc3bc54bfe60014f5a59f7ed439b8a7da26f0b..c7e4fb601a5748e7104be1bdccffe754784780c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* timer.h: System timer definitions for sun5.
  *
  * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net)
index 70cc37b73827bc2fe1a3a5045326a893da6c3844..9aac26b1f45fc06f3cd6d35a953db7d0b4eae940 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_TIMEX_H
 #define ___ASM_SPARC_TIMEX_H
 #if defined(__sparc__) && defined(__arch64__)
index b6ccdb0d6f7de3fb23b8691c036be8acaa62e91f..542915b46209772cea964453b828dc7bfa9efa64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm/timex.h
  *
index 18b30bc9823b4e132d381c5d3de985f7b20c38fc..076c44f6845df0f73e729f1662f42a206139a21d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm/timex.h
  *
index 92d0393bbcdc5d16b5a0ee9308171e79bc7469a2..7146a577257fdb710204ca9de0c0405190f82068 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_TLB_H
 #define ___ASM_SPARC_TLB_H
 #if defined(__sparc__) && defined(__arch64__)
index 6d02d1ce53f31b691eb86814dc6af81131ec99b2..343cea19e5735b200eecb8c87c1a51ef54ae9e39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_TLB_H
 #define _SPARC_TLB_H
 
index 4cb392f75d2bfd4a4cab530c6a0bfb8821e93079..a2f3fa61ee36afcb7bef83216a013fabb84b6ec4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_TLB_H
 #define _SPARC64_TLB_H
 
index 2c9629fad1e2c33c6d33106ac53318e8ca98d94d..30ae3ea21054d48ff526c3fc39d55e3dcc6b625a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_TLBFLUSH_H
 #define ___ASM_SPARC_TLBFLUSH_H
 #if defined(__sparc__) && defined(__arch64__)
index a5c4142130f5779a0c363f552d5551a4e7dc3901..470531991a0826fae1528e3b803dc313e321b7e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_TLBFLUSH_H
 #define _SPARC_TLBFLUSH_H
 
index 54be88a6774c5cc64fd10aa381999a21bb071ec4..8b8cdaa6927209eae6e523315ca29ab725d87092 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_TLBFLUSH_H
 #define _SPARC64_TLBFLUSH_H
 
index ee4f191d394aa2789e48cdd98d8f51c2d3c8d45e..ba7b9d9d91cf6b742806d00b05e7b0324eae9ca5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_TOPOLOGY_H
 #define ___ASM_SPARC_TOPOLOGY_H
 #if defined(__sparc__) && defined(__arch64__)
index ee5ac9c9da284defa0bf1a2ebdfe46198a855871..66c4f9ff700dda82b9fd1bfce2e18907a0d57d14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_TOPOLOGY_H
 #define _ASM_SPARC_TOPOLOGY_H
 
index ad5293f89680f4c3dd4405e413e2a2b4966bcd1b..3831b1911a19a3afa7899428eb5c80da4c03cccb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC64_TOPOLOGY_H
 #define _ASM_SPARC64_TOPOLOGY_H
 
index dfc538609eb2d570ce7eb20cbce5a7bd9e99366d..6a4c8652ad6799d6588680948f95d2c680ac8343 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_TRAP_BLOCK_H
 #define _SPARC_TRAP_BLOCK_H
 
index 51abcb1f9b3bb7fd6948d2ee8fd6cbc82a7c0cbb..2fba2602ba69c690efcb8ee981875f93d1985999 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * traps.h:  Format of entries for the Sparc trap table.
  *
index acf55063aa3dd9ae66bc1f7760782a84404d03f8..25b6abdb39083c6286d1c59984c8ff3179ba4852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_TSB_H
 #define _SPARC64_TSB_H
 
index 5bbd1d523baa35750f04e3983db347ebf33db79c..acaf014eff46488553bef69de09a0e6bdc7c3b0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * tsunami.h:  Module specific definitions for Tsunami V8 Sparcs
  *
index 82e7df296abc6e26e895c9889410e41bf64aa59d..ede2b66cf4a0d6c20f5f109ff3ff71c9b8eb2956 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_TTABLE_H
 #define _SPARC64_TTABLE_H
 
index 17c73282db0a97803df23f8030db5f886b8d229f..23df777f9cea53a12d3948d8ba968c9556e3d306 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * turbosparc.h:  Defines specific to the TurboSparc module.
  *            This is SRMMU stuff.
index 9e068bf9060a77a9dd73fc6defa56b6b65e38e41..dd85bc2c2cad5211c19695362bba874e0ce17b3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_UACCESS_H
 #define ___ASM_SPARC_UACCESS_H
 #if defined(__sparc__) && defined(__arch64__)
index bdb1447aa1bb7cd061125f064cdb6526d8ddc5ef..de71c65b99f022b586c306df754ea36f3a9d7471 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * uaccess.h: User space memore access functions.
  *
index 6d4c997d1a9ee7f0f57c151fc481bc43485d149e..cbb308cee394f51b0d5e161d34dfe1cfb2cc316b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UACCESS_H
 #define _ASM_UACCESS_H
 
index 11d2d5fb59029beede89e4870f6c74776924a9db..7971d89d2f54d29a911f09e5154410e41cdc1856 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_SPARC_UNALIGNED_H
 #define _ASM_SPARC_UNALIGNED_H
 
index 0aac1e8f29683a7384058405c3ea241f4d33179e..b2a6a955113e0a487357e24fc695f46832f6eab1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * System calls under the Sparc.
  *
index 5b1633223f924444829db76c34eb93f817fe616b..782691b30f5458d75bca28b16366c66c45c77dd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_UPA_H
 #define _SPARC64_UPA_H
 
index c3dbcf902034dc2fa3e566beeec1f6e62022a130..84d054b07a6fff1c458bfedaa5b17636bdeff279 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC_VADDRS_H
 #define _SPARC_VADDRS_H
 
index f54e8b6fb1972e8282f38c792cb77e9793950fd0..2952d667d936340edf851c85d93ccae051bf05a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 989930aeb093d418a6c386b0b1860808ea397d59..0bbefd184221b6635a1e03b0012c21693f7faf2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * viking.h:  Defines specific to the GNU/Viking MBUS module.
  *            This is SRMMU stuff.
index f3d4ac232690ce96cddc8db4fe1abb68e92790f6..059f0eb678e0565c4a869daaf59c5578ad29ec68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_VIO_H
 #define _SPARC64_VIO_H
 
index 6424249d5f785e698c4283677c1b975668393478..7903e84e09e05328c4bc6926736f395900a1e4b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_VISASM_H
 #define _SPARC64_VISASM_H
 
index 9b7b21764cdeeadc266b3f6c45c694c6df3a249a..b6e911f5d93c15a47e3317b7208d326681ca374f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * winmacro.h: Window loading-unloading macros.
  *
index 8ed591c7db2dc1ee7220e543759165895bcfa52c..f4c651e203c4388ab9f406e843f87e53f461920d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___ASM_SPARC_XOR_H
 #define ___ASM_SPARC_XOR_H
 #if defined(__sparc__) && defined(__arch64__)
index 24e9a7d4d97e0f05f1a64179f7f8e5879dc316c1..aeb369b87fcd76a5e8b79da1942e851182052905 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* apc - Driver definitions for power management functions
  * of Aurora Personality Chip (APC) on SPARCstation-4/5 and 
  * derivatives
index 7ad7203deaec0388629eccbeb965e11b046ae6af..d371b269571a8796b2f18968a4e1d94e82d8f4b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_ASI_H
 #define _SPARC_ASI_H
 
index 40dcaa3aaa569e8ada37e9b3b809b2d64f6d8191..cd9a432278d218a93c80763e53450ea05e524df1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ALPHA_BITSPERLONG_H
 #define __ASM_ALPHA_BITSPERLONG_H
 
index ccc1b6b7de6c11d18b8495b9b466a3acfc6e2b4c..216b8e59372ffd3b70c2a9381840089b066f4638 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_BYTEORDER_H
 #define _SPARC_BYTEORDER_H
 
index 86d4a901df2414d005efb608f150d5a2d03123ad..7e9fef0c6efed4e2a022fb3b5f44b5d2373e5608 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
  * display7seg - Driver interface for the 7-segment display
index 624fa7e2da8e11a73c31b8bee45f60847c07a1c6..cf8aa0a14f407d2041a59389d16c77436fe3c524 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
  * envctrl.h: Definitions for access to the i2c environment
index 20423e17285342d40c21796c9baafac5eb1f68b4..81a732b902ee3838ba91c2bf136e65022f3a0036 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_ERRNO_H
 #define _SPARC_ERRNO_H
 
index d6cea07afb618ea03be7c0b1f72406e4757571af..0dafe2c1eab740a6a22e7f5e39321d4bdb54bacf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_FBIO_H
 #define _UAPI__LINUX_FBIO_H
 
index 7e8ace5bf760a6d2639928ce5199ec41f938b717..67dae75e5274d469b162a4ec51bffc9205b1c932 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_FCNTL_H
 #define _SPARC_FCNTL_H
 
index 7d6bd51321b9f9e8fa652130b958993df7733aae..96c598fe746ee4be4de4e73e4f76ac3114c21113 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_IOCTL_H
 #define _SPARC_IOCTL_H
 
index f5df72b93bb27fe7601b4994889d4103562fffc0..2df52711e17033f5f725b682d9719306c7f35ec7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_SPARC_IOCTLS_H
 #define _UAPI_ASM_SPARC_IOCTLS_H
 
index 66013b4fe10d5a7e5b25736e3ed1c1068bad5e5d..9d0d125500e240bcd586eeb97a675e4f29ce5414 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __SPARC_IPCBUF_H
 #define __SPARC_IPCBUF_H
 
index 0717d9e39d2d175a8c7f8a7d043ee0a997a1ff96..68c98a54281aed6183e88022a902bc4277a95236 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * jsflash.h: OS Flash SIMM support for JavaStations.
  *
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 9765896ecb2c89204465de20bc41afb53561a77e..715a2c927e793efd8fb9b13c205999d68e4a2c9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SPARC_MMAN_H__
 #define _UAPI__SPARC_MMAN_H__
 
index efc7cbe9788fa3fc30be20880efc0a315d0d76c4..b601c4f4d956ee1a8dd8abc86b9cc1f5d7f7abc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_MSGBUF_H
 #define _SPARC_MSGBUF_H
 
index 917fb8e9c633826908d1751377034a3e1aa6a79e..8817f7d1a70c53e8e05874e82389609f58b52a64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef        _SPARC_OPENPROMIO_H
 #define        _SPARC_OPENPROMIO_H
 
index 0bc356bf8c505d1087d1668de130b30ef1234d40..057d7135e4d0fe07b2e914caa99cf8fdafb3b416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASMSPARC_PARAM_H
 #define _ASMSPARC_PARAM_H
 
index 214feefa577c815970605cea9e0b11e84e4d4815..316b837bcb8f565bf66b4a35f010cde263f9fe12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*----------------------------------------
   PERFORMANCE INSTRUMENTATION  
   Guillaume Thouvenin           08/10/98
index 091d3ad2e83017f4606d2a0371949fc929b19bda..72356c99912579666d30fcbb09f33479f327980d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __SPARC_POLL_H
 #define __SPARC_POLL_H
 
index 156220ed99eb7dfbfe8696ea9f04da84fc00ff5f..fec499d6efb789d377e56711bef32de0a86dcf69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is generally used by user-level software, so you need to
  * be a little careful about namespace pollution etc.  Also, we cannot
index 2f0ed856530be28e82daf227ec8cb336bf1c5115..e41f65f0aebdafb5b9f98ccc5e4e0a92199210cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * psr.h: This file holds the macros for masking off various parts of
  *        the processor status register on the Sparc. This is valid
index 44b6327dbbf5ac7c7daa54f6ab1d4e8c05fdbc3a..1eaffbe0d1e265fa31ac1602f2a8129948f6b303 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC64_PSRCOMPAT_H
 #define _SPARC64_PSRCOMPAT_H
 
index cf832e14aa05ba637f207b967b818cbdaf6c6f43..b6999c9e7e86dc055f23647039950f51d67d6f13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC64_PSTATE_H
 #define _SPARC64_PSTATE_H
 
index 56fe4ea73febc6c27d01f2cbf191f49766bb8c9d..abe640037a55d1484194cbe8b6415fb5a95cec7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SPARC_PTRACE_H
 #define _UAPI__SPARC_PTRACE_H
 
index fe163cafb4c7553ba6c8ec61b727e6c8673854df..cbe2de778838fefaee5d715cf04b825c184f3327 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * resource.h: Resource definitions.
  *
index faee1be08d67b223deef379a411df0ec40f51fbe..f49b0ffa0ab8ff6dc6dcca02b7c5e02c212873ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_SEMBUF_H
 #define _SPARC_SEMBUF_H
 
index 533768450872ea44e889eac1006cbccb769a722e..3c208a4dd464053954ece47816d28936ba9c7641 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     Just a place holder. 
  */
index 83a16055363fc4b7498625d4f62e24e62cc31c73..286631db705c0f0f7f05d63031bd3e0f6663f19c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_SHMBUF_H
 #define _SPARC_SHMBUF_H
 
index ae5704fa77ad6d15e8de4623ca6465f24f2341b9..043dd4b9202630d75be7b57b647e64d848975714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * There isn't anything here anymore, but the file must not be empty or patch
  * will delete it.
index 157f46fe374f5cb1fc54d0ea3ca75958440e995e..896ce447d16af39e554583cf02048ee7ac3b2cde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SPARC_SIGINFO_H
 #define _UAPI__SPARC_SIGINFO_H
 
index f387400fcfdf1562b5a586552d3b4ce46de28f2f..ff9505923b9abd6ca3c54b5ca0d127e9a8cf1369 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SPARC_SIGNAL_H
 #define _UAPI__SPARC_SIGNAL_H
 
index b2f5c50d09474b8c5c20a5c153d0834f7196bc4a..d58520c2e6ff2c77788d3546d17c960fd067714f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
index 990ea746486b181c12a784cdc837a90e258a5c01..18a3ec14a847bb11eab202e3f100b8a267541ec7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SPARC_SOCKIOS_H
 #define _ASM_SPARC_SOCKIOS_H
 
index 2f0583a2c689b3218af86171fc40c6f677149fdb..b6ec4eb217f788b6d08a73b7d315d8626cf1db7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __SPARC_STAT_H
 #define __SPARC_STAT_H
 
index 55e607ad461d1ddfded240eb124030a8d4810c98..20c8f5bd340e60d1025bc02d4a395ce1c8c2fb49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef ___ASM_SPARC_STATFS_H
 #define ___ASM_SPARC_STATFS_H
 
index 4c7c12d69bea6b78f51efcec0a0b8c0b19372a4d..6b1b3f1ad7257d4c0639a2e0814394633189d6e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _SPARC_SWAB_H
 #define _SPARC_SWAB_H
 
index dd91642fcca7c75261f439aa2367389f52e81a07..ce5ad5d0f1057d0ecbd41ccaf933143f2a8e1a2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_SPARC_TERMBITS_H
 #define _UAPI_SPARC_TERMBITS_H
 
index ea6f09e51e5346439583911874eb3fc57b2b676a..ee86f4093d83e93e71e5d5eb7166a3e1b07dbc2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_SPARC_TERMIOS_H
 #define _UAPI_SPARC_TERMIOS_H
 
index a4eceace6ccfd032f0cb12e3e1c1c545cb7b7915..930db746f8bd77fe0c7a249428c803497ba3d368 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * traps.h:  Format of entries for the Sparc trap table.
  *
index dc937c75ffdda5955f91fbf841732a05aa5d56a1..13a13198e04f7de9440385a2085074ef54556099 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * uctx.h: Sparc64 {set,get}context() register state layouts.
  *
index ae77df75bffadd1e376a1baec7cb26286497ffb6..09acf0ddec10c17903e5a05a7aba251091c38fe7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * System calls under the Sparc.
  *
index b10e527c22d967b72d1e172c3d55acef4a7ba34f..d890b7fc6e83561548b92d79c539baeecbde1732 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm/utrap.h
  *
index 5baf2d3919cf4a5552bb5e52e7146d461561349b..497ac19a9e4e203d63f046d0a6f6c430fff85218 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
  * watchdog - Driver interface for the hardware watchdog timers
index aac609889ee4229038438f8f968e8f1f25c8cd03..8de9617589a52e197a6e4ead214910c3e8c733a9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # Makefile for the linux kernel.
index c988e7fa069b884ca99c9b65aa53b7c9b9bc1ea8..ecd05bc0a10454a440e0b362d0c413903363fbab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* apc - Driver implementation for power management functions
  * of Aurora Personality Chip (APC) on SPARCstation-4/5 and
  * derivatives.
index 3f09e1c83f5849917e9748d0e04f33ed86f444b8..5784f2df489a4d7e1f204c61d8f2ccb313486801 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This program is used to generate definitions needed by
  * assembly language modules.
index 2585c1e14bccf672ec1082c79cc27f87c5cc31b3..a6e91bf34d48ff4107bd3c567192122ef480a5b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index ae88c223e4d3e6475d18224b06f9f34a554555ef..a32d588174f2f9eaaddc97442ef8f22e3c696c01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* auxio.c: Probing for the Sparc AUXIO register at boot time.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
index 086435c17981ff0586749cb35544812772608a86..4e8f56c3793c42c3dbace3dd187258fed10dd760 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* auxio.c: Probing for the Sparc AUXIO register at boot time.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
index 987f7ec497ccf6c3ab5cc5e8e64fc71d65c843db..5869773f3dc4867762599215450959b60c0a1165 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Procedures for drawing on the screen early on in the boot process.
  *
index 4696958299e9548b5cef448335de26a9b6c46a61..38ae4fdc9eb483b1bb2423c47689bfe27d286b9c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* central.c: Central FHC driver for Sunfire/Starfire/Wildfire.
  *
  * Copyright (C) 1997, 1999, 2008 David S. Miller (davem@davemloft.net)
index 655628def68e6be60b7cd31bda369b2fbbfd6c6b..7f3d3d264390ca36e7fd9466a86dc52afe9759e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* These get patched into the trap table at boot time
         * once we know we have a cheetah processor.
         */
index e5611cd428f111c4858eee3a2a9877293f2627c5..10eeb4f15b206639d735738e5791df809c345e7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define __32bit_syscall_numbers__
 #include <asm/unistd.h>
 #include "kernel.h"
index ef4f18f7a67402ed8baceb2ea05ee7f6368cc404..4401dee30018519972784faf10e3ccad42a9060f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* cpu.c: Dinky routines to look for the kind of Sparc cpu
  *        we are on.
  *
index 90d550bbfeefe484f1560940f111235f26332d7a..d1d52822603d0f036ad6b6b3b88c7f4b5d9d688c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* cpumap.c: used for optimizing CPU assignment
  *
  * Copyright (C) 2009 Hong H. Pham <hong.pham@windriver.com>
index 9dac398c434a4bab1b30333d2d39e1a23ffd88db..7d5b774862e7561c43c7a2d3cb4ce2215d5d57ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CPUMAP_H
 #define _CPUMAP_H
 
index 8d5d09f09cafd811a226b37326039f57feeb1668..23b6e50d4ada1c3e95c09d1bc2e1aadf1f072661 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* devices.c: Initial scan of the prom device tree for important
  *           Sparc device nodes which we need to find.
  *
index b667aa6f28f648610aa0efe0c17d08c75c57daa8..f73e7597c97160310364d0b3af52177492f5797c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/dma-mapping.h>
 #include <linux/dma-debug.h>
index 09a6a15a7105bde2bde8b89e5a3873e78f26a32e..fb9c788437b0ccb9c0f6dfe0efabe2618906fd35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* DTLB ** ICACHE line 1: Context 0 check and TSB load */
        ldxa    [%g0] ASI_DMMU_TSB_8KB_PTR, %g1 ! Get TSB 8K pointer
        ldxa    [%g0] ASI_DMMU, %g6             ! Get TAG TARGET
index 4087a62f96b099f3b2d9e46b1b73ff49220da718..9f945771bbd19139f9b4e6d99552815ba8a1562a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dtlb_prot.S: DTLB protection trap strategy.
  *              This is included directly into the trap table.
index acf8314cec489d1beec128ce5d3d422f53554231..264b186478f3b2d97068942f024d26026d72966d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ebus.c: EBUS DMA library code.
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
index d85bdb9998193ce53d40e4108809de0241e90919..358fe4ef08a24ade8b237b61dfb91c5918476d3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
  *
  * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
index 0f679421b468343c747ac48abd2046b7e6ce051e..7378567b601f6350f0e408fd7612a867951f55a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ENTRY_H
 #define _ENTRY_H
 
index e3e80d65e39af1d9167a7ca3156ee2f797112a6c..9f243f918619e59217541fb216ad8b5f44264cbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * etrap.S: Sparc trap window preparation for entry into the
  *          Linux kernel.
index 5c237467d156f550740ce4ec3723bebf28976940..5c77a2e0e991565e77a7e4a42fbf0ba905407b32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * etrap.S: Preparing for entry into the kernel on Sparc V9.
  *
index 336d2750fe78c3d4d79175e3427e94859e0cca95..051659e29c7a62ef57d37718ee299f24662e703e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* This is trivial with the new code... */
        .globl          do_fpdis
        .type           do_fpdis,#function
index cec54dc4ab817e7c9c54c2d9b0532f0fd49bc7d8..915dda4ae41205ca51d5aa0d8ac4ee4c777ba3e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/spinlock.h>
 #include <linux/hardirq.h>
 #include <linux/ftrace.h>
index a14d272d2061123fc331b199e85e3a65f23c7bb5..181e09fd1c55c6a74c672e2d8670ed51033c0522 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .globl          getcc
        .type           getcc,#function
 getcc:
index 7274e43ff9beabc49df77977f9c097ce6abc2d99..e55f2c0751656d946384dabf372fe4eefadbed58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * head.S: The initial boot code for the Sparc port of Linux.
  *
index 4de9fbd1a177ebcc02826469badc2eb32ca45643..9e293de120520b55822e63590c2b63ac0d99136f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* head.S: Initial boot code for the Sparc64 port of Linux.
  *
  * Copyright (C) 1996, 1997, 2007 David S. Miller (davem@davemloft.net)
index d41ce33d87d68447427d5eced888f5f01a10df06..a2bc1b2955b45bee9e8a32a30e5b4b111f6f2289 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* hvapi.c: Hypervisor API management.
  *
  * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
index e57007ff7f8f946432add5cc97f1ad028b534a1d..bdfd3d8c6707eb7a004230424a29fa8e628cb0cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* %o0: devhandle
         * %o1: devino
         *
index cdbfec299f2f80a976441e854b74856a79733e78..f39220471b6516b27c2bab8a6b5c39900678a9bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* hvtramp.S: Hypervisor start-cpu trampoline code.
  *
  * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net>
index f95dd11b75eabd037b51b39bc5568a67226de29d..d6c46d51222080e323fb13c9f0f359db938c560c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * idprom.c: Routines to load the idprom into kernel addresses and
  *           interpret the data contained within.
index fcbcc031f615df41cd15717257360d53b2f1b545..b08dc3416f06f7e457d64db056ea4ceeb9ec5d07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* iommu.c: Generic sparc64 IOMMU support.
  *
  * Copyright (C) 1999, 2007, 2008 David S. Miller (davem@davemloft.net)
index 5ea5c192b1d989f2bb5c7eec059f0bfee091f2d4..e3c02ba325004c9e27cfb66cf82fddb858807350 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* iommu_common.h: UltraSparc SBUS/PCI common iommu declarations.
  *
  * Copyright (C) 1999, 2008 David S. Miller (davem@davemloft.net)
index 12894f259bea2aaa909d46658d7b5e527689efc5..7eeef80c02f7273dff1b2c9795428e15d5fd8dc3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ioport.c:  Simple io mapping allocator.
  *
index 70a0b8ddd0ba54de7d6ec5e45f8c87a180f8463f..b02026ad6e342d82da4347b0bd1e3e56ff3099eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/platform_device.h>
 
 #include <asm/cpu_type.h>
index cac4a5554c0ea0533247b79d64d93612171e93ac..e8452be5123be3c9c2c10d516161dcf5fb623c4e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Interrupt request handling routines. On the
  * Sparc the IRQs are basically 'cast in stone'
index 99dd133a029f06528f78b2b811d81c97fc7cf9f4..d66dde833f5ef3210046922e668e0788401a090c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* irq.c: UltraSparc IRQ handling/init/registry.
  *
  * Copyright (C) 1997, 2007, 2008 David S. Miller (davem@davemloft.net)
index 5a8377b54955b3ff57ff82414575a237b1c0d787..5a5d92482e8d014c38d0be6c49880347bef225ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ITLB ** ICACHE line 1: Context 0 check and TSB load */
        ldxa    [%g0] ASI_IMMU_TSB_8KB_PTR, %g1 ! Get TSB 8K pointer
        ldxa    [%g0] ASI_IMMU, %g6             ! Get TAG TARGET
index d29f92ebca5e435ccba9d7f8b890964fbd78c099..94ba2c3a29c18fa0817c256722b3d5842c5d3a5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* The registers for cross calls will be:
         *
         * DATA 0: [low 32-bits]  Address of function to call, jmp to this
index 93adde1ac1669d15889e0f016699dd2a5823ec74..7f8eac51df337ecb494e625d240ac3b0b7e90011 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/mutex.h>
index b625db4cfb78af3264d893ecb0bde9bfe6f52d07..ddffd368e057bb59a1f12110e0842ef9dbaba508 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPARC_KERNEL_H
 #define __SPARC_KERNEL_H
 
index 6e8e318c57bea82a8a091f4e288c389184a4beec..5868fc333ea8df33d5cb292d399dce6c8865a141 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* kgdb.c: KGDB support for 32-bit sparc.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index cbf21d0870e0ac031182a6e875702c79ca1a4207..d5f7dc6323d500768bdbd622671f67a66a7bb809 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* kgdb.c: KGDB support for 64-bit sparc.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index 2d13a4fc038489c7cee8068bc19c6c4419219e0b..ab4ba43479410fed04c5bb870b50f26a41de01b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* arch/sparc64/kernel/kprobes.c
  *
  * Copyright (C) 2004 David S. Miller <davem@davemloft.net>
index 53dfb92e09fb5b1a0b37e8f393fa6e3c6b0f3329..b3c5e8f2443a65d9aa89852b09a2cc3e366d8b96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KSTACK_H
 #define _KSTACK_H
 
index f22bec0db64549ace3b68d645b8d23db87ec1b5b..1cf91c05e275af918f559756c58dc03b5a59fbde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* arch/sparc64/kernel/ktlb.S: Kernel mapping TLB miss handling.
  *
  * Copyright (C) 1995, 1997, 2005, 2008 David S. Miller <davem@davemloft.net>
index acffbc894ab0315362cca01a82bf6c90949a2a68..86b625f9d8dced765abd20a5ffe5e454f0fb569a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ldc.c: Logical Domain Channel link-layer protocol driver.
  *
  * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net>
index afcdd5e4f43fc5ca4477baa602b26992f472c8a8..84b233752f283c1af32c2ec5e85281d8ff63008a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2009 Daniel Hellstrom (daniel@gaisler.com) Aeroflex Gaisler AB
  * Copyright (C) 2009 Konrad Eisele (konrad@gaisler.com) Aeroflex Gaisler AB
index 98c223edac84f47361cce51fa429026f15ed984f..15b59169c535aa55318a983c371dbd216397788c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * leon_pci.c: LEON Host PCI support
  *
index 83ba5005d44c1d59f4a5b773c602a50d7096d5bf..e6935d0ac1ec9ffb463be7bff9e58b975774fd6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * leon_pci_grpci1.c: GRPCI1 Host PCI driver
  *
index ff0e5c90310fb1b287d3950e1148b1d8d9bd3ec3..ca22f93d904548071d631671a6fafe7dce2a06e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * leon_pci_grpci2.c: GRPCI2 Host PCI driver
  *
index ddcf950282ed67a7ce7590b7d16ed2a796f93607..065e2d4b729084c0d4c50cf0bfdb2b0d51c87df4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* leon_pmc.c: LEON Power-down cpu_idle() handler
  *
  * Copyright (C) 2011 Daniel Hellstrom (daniel@gaisler.com) Aeroflex Gaisler AB
index db7acf27bea2e0cbbc285174ce7c0887ef80d564..da6f1486318e1db38d793d8aa77eae40c291d690 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* leon_smp.c: Sparc-Leon SMP support.
  *
  * based on sun4m_smp.c
index fa466ce45bc9bf115a488aaa95279922efc96bc4..1ef6156b15305d40dc8382b4fabb6af974d8a01b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* mdesc.c: Sun4V machine description handling.
  *
  * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net>
index 9276d2f0dd8684edffa5a2a4f2f72ac4488a8c99..b5c84177521e3e3ad1b8a93ce6e2ca3010dab22f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_KGDB
        .globl          arch_kgdb_breakpoint
        .type           arch_kgdb_breakpoint,#function
index 192a617a32f3cfd192cd76b484e3cc853e58cba2..df39580f398d3a6171fba5868b611d84bba7b8c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Kernel module help for sparc64.
  *
  * Copyright (C) 2001 Rusty Russell.
index 185aa96fa5be442922d6f1259af4f5493def8f57..3641a294ed5478ef3065d0cca08b6c54618fc0e2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/of.h>
index 7bbdc26d95126e6ca56c946c8b4f1b59eb7ea256..44e4d4435bed78032b1b7a0d9935e577ec196538 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/of.h>
index cdfd23992841a78bfd3692a10d3ba0ea77158565..3d66230c61b6b58d60a65b8fb48746e37c2a9480 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OF_DEVICE_COMMON_H
 #define _OF_DEVICE_COMMON_H
 
index 3f8670c9295115d4186762f89726a9ab7f55442f..220d0f36560a3ac56e56a693f913bc2169f1b876 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci.c: UltraSparc PCI controller support.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
index 33524c1d5328b051172e52faf8751bf0d33d5333..1e10fb26fa8801858275928cdc77d35457cc990b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_common.c: PCI controller common support.
  *
  * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
index 11a1f0d289d217ec2890e27b8b04f3623b30ed59..be71ae086622662b1b3f851f4301771968ff83c2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_fire.c: Sun4u platform PCI-E controller support.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 37222ca849df48df46ed45927686ef487f6f49bb..ac172961d276e8e22b96c700ffaedd1fc2868fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* pci_impl.h: Helper definitions for PCI controller support.
  *
  * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
index 84e16d81a6d834470628c81386b54dd42a38c964..1994d7638406e665e581911010adaa989eaf60ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_msi.c: Sparc64 MSI support common layer.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 7dce27b3c761b4e343b3d55158b2f7bd7025537c..f413371da387193c7dc01a7ca90af62605fb886c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_psycho.c: PSYCHO/U2P specific PCI controller support.
  *
  * Copyright (C) 1997, 1998, 1999, 2007 David S. Miller (davem@davemloft.net)
index 00a616ffa35b52ff3d2d22c4a6ec40fdaf471d9b..8107286be9ab1dd2ab6c88e3cdf7cf56bf3fd362 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_sabre.c: Sabre specific PCI controller support.
  *
  * Copyright (C) 1997, 1998, 1999, 2007 David S. Miller (davem@davemloft.net)
index c664d3e3aa8da138ee3fa5234762a217401a5f13..934b97c72f7ccd3c3d4fc9fd5242dda7d3499c5b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_schizo.c: SCHIZO/TOMATILLO specific PCI controller support.
  *
  * Copyright (C) 2001, 2002, 2003, 2007, 2008 David S. Miller (davem@davemloft.net)
index 9ebebf1fd93d2f5db8c09804c336b006041b28af..249367228c339ef1e6fc067dc634000673215452 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pci_sun4v.c: SUN4V specific PCI controller support.
  *
  * Copyright (C) 2006, 2007, 2008 David S. Miller (davem@davemloft.net)
index 22603a4e48bf1883d3bb72292ec23e10ee6673b3..d47263a9901acaeea309a3679883fc6a65a821f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* pci_sun4v.h: SUN4V specific PCI controller support.
  *
  * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
index 578f09657916305b2aab785e2c0eca683863987a..2b8051871a155b88ac21ca3d18bb41a79b06257e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* pci_sun4v_asm: Hypervisor calls for PCI support.
  *
  * Copyright (C) 2006, 2008 David S. Miller <davem@davemloft.net>
index 4a133c052af89cc7cbb2118bf16e60a40d428ec4..22f8774977d5445cf8fe0e7acce0ff674b6ab3e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * pcic.c: MicroSPARC-IIep PCI controller support
  *
index 710f3278d448d910df1c4224f0146ad3bf555b89..5c1f54758312808bc9e2e70d1953bfa324f1e40b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Performance event support for sparc64.
  *
  * Copyright (C) 2009, 2010 David S. Miller <davem@davemloft.net>
index 3b26cf62df6d6a7be0596ffc71dcf68e0fef6aab..b5c1eb33b9518aab087fcb81c08a3da3e0e63873 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* pmc - Driver implementation for power management functions
  * of Power Management Controller (PMC) on SPARCstation-Voyager.
  *
index 4b60f385c98fdfa59c4b56a8bd422e2efd3cc773..92627abce311285a4784620a6745e933a07f1d4c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* power.c: Power management driver.
  *
  * Copyright (C) 1999, 2007, 2008 David S. Miller (davem@davemloft.net)
index 9245f93398c76a59a073963253609c1fc54bfeec..d9662cf7e6489f0381f858cf42a1cb5eb93429a4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*  linux/arch/sparc/kernel/process.c
  *
  *  Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net)
index 44e5da405f9673210f63bee85ade543724a8e9be..318efd784a0b3cfd707cb400a633793d64981eb2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*  arch/sparc64/kernel/process.c
  *
  *  Copyright (C) 1995, 1996, 2008 David S. Miller (davem@davemloft.net)
index 890281b12b2892cbc7452e634ec54c1ca976add8..26a1cca7c761f148979454d913c2f171947ac0f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PROM_H
 #define __PROM_H
 
index 40e4936bd47995486039d256463cc514f23d8350..f3fecac7facb695845027559836ec23309029c67 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/init.h>
index 8db48e808ed42a969e45dec6c92d1c92b05930df..81aa91e5c0e6c38e1305948279de6602e98fe961 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* psycho_common.c: Code common to PSYCHO and derivative PCI controllers.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index 05a6e30a928ecbfb0000a94e7c25fe1cdf1ab5f6..6925231c50e460dc71fd1904ee351a6cc250b9f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PSYCHO_COMMON_H
 #define _PSYCHO_COMMON_H
 
index eca3dc76793c05eafc88281ce1dc1b17fcfc5b89..16b50afe7b52fcf8054415660a7fc0705decae8b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ptrace.c: Sparc process tracing support.
  *
  * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net)
index eba7d918162a55c2b331d016900ed08426ba1c71..7933ee365207ab3f3cd54f886ff9713cf3d7b9bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* reboot.c: reboot/shutdown/halt/poweroff handling
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index 6c34de0c2abd40eefc679e35d548ff4c2a132586..dca8ed81004660458e6961c5270c738340013936 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * rtrap.S: Return from Sparc trap low-level code.
  *
index dff86fad0a1fde57548da37f62a2294714013230..0b21042ab181bcfa00688131ae29adfead8bd2ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * rtrap.S: Preparing for return from trap on Sparc V9.
  *
index be5bdf93c7676cfedffd91d645bffa3fe9cff419..c133dfc37c5c9810930623e7180494afeccd2dd1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sbus.c: UltraSparc SBUS controller support.
  *
index 6722308d1a98ac0d1005f0fa4abc5287f4f3caf4..2e3a3e20306166dd7b74bc3c24fef291d7781f34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/sparc/kernel/setup.c
  *
index db4c4d7e28a07a040fd48b39a3698198d41ddd42..34f7a533a74fb36d2c6aabf99e0d0891c8392eac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/sparc64/kernel/setup.c
  *
index 0e4c08c45a37b0d704fce734a3109c089cc6ae2f..5c572de64c7486c9f950b32fbbe52d1cfe0bb6fa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*  arch/sparc64/kernel/signal32.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
index 62c3e255ae7cdbfbab1262110d6d592c5918fd52..5665261cee37f2330ab7dbd08ecce91593301a64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*  linux/arch/sparc/kernel/signal.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
index 965d50e833e76dadc50b79ba24189a5884c7d9bc..20426a1c28f2987f6761c9a30aafce16951476cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/sparc64/kernel/signal.c
  *
index d223aa432bb66e5005d83d45fcb5b246a81a13b1..21d332d8bdddb92ccd69e5932a25eaa1cb527964 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SIGUTIL_H
 #define _SIGUTIL_H
 
index e5fe8cef9a699a0ee645b879abd3a5bbc6fc712b..1e9fae56a8530417a1a72667464dd35fa09c19f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/thread_info.h>
index 36aadcbeac694667b78199d2dc37607e09b63233..512e4639e4a13fdb568d8122ac4135836f4ba796 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/thread_info.h>
index e80e6ba3d5002159bd5836554de791da494ade1d..e078680a1768b86e3d605cb761ed761a88c0dbf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* smp.c: Sparc SMP support.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
index 4898329970c50d816196d6eaf632b8e02445d24a..c50182cd2f64684de47d7408c122677430137be7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* smp.c: Sparc64 SMP support.
  *
  * Copyright (C) 1997, 2007, 2008 David S. Miller (davem@davemloft.net)
index d7e5408428098d1138b0c132baa2d43dff3196a4..5427af44099ad12657678969fd273ad5b7319b0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* We need to carefully read the error status, ACK the errors,
         * prevent recursive traps, and pass the information on to C
         * code for logging.
index 3caed40235898698751ff0cf3d6ca7d98dc83da6..ac8677c3841edb32c1697c80ee25fdc1349ccd6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* sstate.c: System soft state support.
  *
  * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net>
index 167fdfd9c83702bd2ccdc737625fcc8f57c9619c..b8cd57d9182b7814e5ddc0b932474906af74bebd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * starfire.c: Starfire/E10000 support.
  *
index a87d0e47c1681dc2714cc52ebdcb98420880c172..d869d409fce645953769adf8606cb25a8982a550 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SS1000/SC2000 interrupt handling.
  *
index af93b50e3ce430c82dbba7421e58b85d6fcc7b66..ff30f03beb7c785f951421f4b6feb944171c45a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Sparc SS1000/SC2000 SMP support.
  *
  * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index aa84da0b2d30d30289a08df127dfc6affdff2601..c01767a0480e754a3c9fe77487b7855bc55971d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sun4m irq support
  *
index 5547fcb1d72df5c90ceaf9e39bdc50e68da9966c..228a6527082dc2184a754b17b472d3b8ee4ba8ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  sun4m SMP support.
  *
index 34631995859afb2c273f3087796ff550371bc634..6478ef4f6a15a67b1ae681b2a11097dd56b1243d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sun4v_ivec.S: Sun4v interrupt vector handling.
  *
  * Copyright (C) 2006 <davem@davemloft.net>
index c19f352f46c7e2d6c08f203e4e926982fd00423c..7ac9f3367674812c0ad93b473015329be749cb2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sun4v_tlb_miss.S: Sun4v TLB miss handlers.
  *
  * Copyright (C) 2006 <davem@davemloft.net>
index f834224208ed8ca73d0b12f9d5ad320efd293ca8..7e7011a1e7121d8ee47f82977e318237c00f8fe4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sys32.S: I-cache tricks for 32-bit compatibility layer simple
  *          conversions.
index bca44f3e6b86ca5e3c5def34c3db9ad2670e0898..b4e1478413a1395182e260e5f2893d0011d92d21 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
  *
  * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index 7aecb239626dde05bb13a8d5c29879c7267d6dea..990703b7cf4d7d47d26152e510706bc32528d488 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* linux/arch/sparc/kernel/sys_sparc.c
  *
  * This file contains various random system calls that
index 043544d0cda3f000ffca1a1c1f2f00680218d8d9..55416db482add475baf4c2fc312605577442470f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* linux/arch/sparc64/kernel/sys_sparc.c
  *
  * This file contains various random system calls that
index c4a1b5c40e4efc7ed17bcc0d67d1f058ea4f09f8..c5f9ec8c52ebf8ffe33b39ba6c34089499db44e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        /* SunOS's execv() call only specifies the argv argument, the
         * environment settings are the same as the calling processes.
         */
index 5fd352b759af8b6f873edae6f418f1ab386d64ea..6d60d416f0dd70f8f0c96d95fa6311599d6e2c30 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* sysfs.c: Topology sysfs support code for sparc64.
  *
  * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
index 2dab8236d490b772d9be6425da131b3c30788ce3..5a01cfe19a0e3f673830c807cf00c72ef5932bad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SYSTBLS_H
 #define _SYSTBLS_H
 
index 5253e895b81b7214626e1afaf0c6157ed00519aa..731b25d572a148e5fdd18b3a19ef5f3268141ca3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* systbls.S: System call entry point tables for OS compatibility.
  *            The native Linux system call table lives here also.
  *
index 82339f6be0b2d56427a2b9e0f0e75ef5c8ab211a..293c1cb31262a83839930f23db3d306af42990fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* systbls.S: System call entry point tables for OS compatibility.
  *            The native Linux system call table lives here also.
  *
index 2ce2e7b2abbb5425a91d71ab18ce1104ea82e4b0..8a08830e4a653fc7e6c46f8a431c67d730574940 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* linux/arch/sparc/kernel/time.c
  *
  * Copyright (C) 1995 David S. Miller (davem@davemloft.net)
index 564f0e46ffd4d8ae5b0ef2be6a4395b903aca762..3b397081047af69a23b6672917e1706786d3134f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* time.c: UltraSparc timer and TOD clock support.
  *
  * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net)
index 3eed99fc69892f40c34e2865895928c35b78067f..82fafeeb3a62f49b31fd46a637e2f2838fed29cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * trampoline.S: SMP cpu boot-up trampoline code.
  *
index 88ede1d53b4c66221b9c35905abe727d1cf9b5c2..fe59122d257ded1d97d12f30dfab48b8facf0de1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * trampoline.S: Jump start slave processors on sparc64.
  *
index 581cf35ee7e3a7c18c9c0578ca495b8c877f3adf..b1ed763e4787784a79353650c6b25af329ebfba1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sparc/kernel/traps.c
  *
index f74115364b1eff6053f40ad224c070070e517249..eaed39ce8938c052bbdd22429f8725078385d3a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* tsb.S: Sparc64 TSB table handling.
  *
  * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
index 8a7a96ca676f045a1ea5a87e18a316b1fd48bf20..e79fd786fbbb2595299fd09e33fd8188a081cf7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* The Sparc trap table, bootloader gives us control at _start. */
         __HEAD
 
index efe93ab4a9c0654143d52569c7157f9117e7ae37..18685fe69b91afd0e7fea9d52a8f9f604cb744e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ttable.S: Sparc V9 Trap Table(s) with SpitFire/Cheetah/SUN4V extensions.
  *
  * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net)
index 8f096e84a93726e350e3dfe1ed64131f1f8260f7..f8bf839289fb1907f30f211bd42bf71ef9a64bb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* una_asm.S: Kernel unaligned trap assembler helpers.
  *
  * Copyright (C) 1996,2005,2008 David S. Miller (davem@davemloft.net)
index 1c8d33228b2a633630b2b7e1c602962712dbe083..e256f395e9f6aa9b080f34fff839aa1571ec75dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* una_asm.S: Kernel unaligned trap assembler helpers.
  *
  * Copyright (C) 1996,2005 David S. Miller (davem@davemloft.net)
index 8367dce5f41b5fdb6e7ddc9ecbbffcb43a562937..7642d7e4f0d9e0b8440cc23ed3af54ece843c0e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * unaligned.c: Unaligned load/store trap handling with special
  *              cases for the kernel to do them more quickly.
index cda7fd367c4f6952eb7de1f6a368018d4eeb0f76..23db2efda570fb0bd29cec12f344608cede1e017 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * unaligned.c: Unaligned load/store trap handling with special
  *              cases for the kernel to do them more quickly.
index 364af3250646817e58ce37c96f6c12faf8b37dde..44183aa5916883c4c2752af8783ceff83d93597c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/thread_info.h>
 #include <asm/trap_block.h>
 #include <asm/spitfire.h>
index c731e8023d3e7c6333ae091f39ca76aedf332603..7a2d9a9bea59e0036f297516e0ef676f6f64e781 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .globl          utrap_trap
        .type           utrap_trap,#function
 utrap_trap:            /* %g3=handler,%g4=level */
index da1ac3f22b245d8a69f8b0cfa16f71eec4b47465..1a0fa10cb6b721747b479651119b095d05893de0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* vio.c: Virtual I/O channel devices probing infrastructure.
  *
  *    Copyright (c) 2003-2005 IBM Corp.
index dcd278f295736384ed91e7f21a7c4726499d620e..c858f5f3ce2c13351ac468563b4b0595ddbd9f44 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* viohs.c: LDOM Virtual I/O handshake helper layer.
  *
  * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
index 8f35eea2103aee1449410d9c97685af79b9104b7..64ed80ed6cc2e39c74824aa889ff005d56f69ee8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* visemul.c: Emulation of VIS instructions.
  *
  * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
index d78847d56a4b492f1ceee02be2fb1acac94c7134..5a2344574f39bc6ade2e2a8b3f8381f47362643c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ld script for sparc32/sparc64 kernel */
 
 #include <asm-generic/vmlinux.lds.h>
index 435a467b0595f10f305a2fc150f1c8134be4e3aa..69a6ba6e9293713ebc6f915fb5f18fb0ab6f257d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* windows.c: Routines to deal with register window management
  *            at the C-code level.
  *
index 1ee173cc3c3943e4883670fd56537c63d199257b..448accee090f00d07ad7ce15fea58c23003f29b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* winfixup.S: Handle cases where user stack pointer is found to be bogus.
  *
  * Copyright (C) 1997, 2006 David S. Miller (davem@davemloft.net)
index 28a7bc69f82b1dcf2113547cd19697244843d7dd..96a3a112423acefc61448db436f0ec1a320b3e71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * wof.S: Sparc window overflow handler.
  *
index 2c21cc59683e2ca28d9c316e47c8b0cda6055795..1a4ca490e9c22b8b20f130f7b2a4102012ca13e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * wuf.S: Window underflow trap handler for the Sparc.
  *
index 2fbf6297d57cfca68cebbf3da2ac9c62eba837b0..63d618857d49d7f2590a260f699910f476b4399d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENbzero.S: Generic sparc64 memset/clear_user.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 8aa16ef113f2b5dd68a3cba18908213a26f2df80..6891a5678ea343538c8c7ab4d16b41e8792fd95b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENcopy_from_user.S: Generic sparc64 copy from userspace.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 311c8fa5e98eedfb1a006f6c5e00a3e605761a0c..df75b532a9347d8ae20819590969f1954d78439e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENcopy_to_user.S: Generic sparc64 copy to userspace.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 059ea24ad73dcd91b81ef920f3bb18a1475dceb1..114340a0d36e200c6931e4f0a267455b70ea02f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENmemcpy.S: Generic sparc64 memcpy.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 2ef9d05f21bc3e725c5def95b3b51ecf4be99637..c143c4d1de3fab4ceb5c048fdd634aaec1c9e6ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENpage.S: Generic clear and copy page.
  *
  * Copyright (C) 2007 (davem@davemloft.net)
index 95e2f1f9e477d6915fbfc43ad14d945ec1429b9d..1ec1f02c8b7bfcdcae04e95bc86120ecd763a168 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* GENpatch.S: Patch Ultra-I routines with generic variant.
  *
  * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
index a1a2d39ec96e714d69420bf1d7a35192e95c35d4..44829a8dc45818e819a5f08aa67846599f5b41b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for Sparc library files..
 #
 
index 0d8a018118c239b72ae8b5ece5656561bad7ae4a..e57bc514f538a941323eee1ee63c0cd2bd24fabe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG2copy_from_user.S: Niagara-2 optimized copy from userspace.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index a7a0ea0d8a0bea97fec7e80c488a42f484e7ba6d..367c0bf01518214b758c1cf705124f5484b41479 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG2copy_to_user.S: Niagara-2 optimized copy to userspace.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 64dcd6cdb606c819e48efe0e5d755edcc816dbea..bcb21b3a82f1f414f9aeb2d6c3539f1b2221b6cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG2memcpy.S: Niagara-2 optimized memcpy.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index 56ccc19adde801e76d5b8e8a86783131a50c8361..72431b24491ae3af3d5e055ac40e4fda65c00444 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG2patch.S: Patch Ultra-I routines with Niagara-2 variant.
  *
  * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
index e16c88204a42bce03447fb9526c223feba1c368a..97e2678d042a33901c932981b5ba5b24fc133bb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4copy_page.S: Niagara-4 optimized clear page.
  *
  * Copyright (C) 2012 (davem@davemloft.net)
index 5bb506bd61fada7575c11e0c240c6ef4f6b13f9c..0cac15a6db3c0a289fdb2d112d1b41dd9395c306 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4copy_from_user.S: Niagara-4 optimized copy from userspace.
  *
  * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
index 28504e88c535d38a9630a456eb039bad351af783..581062f8ba5fe871ee1f66c18f0a6e04009da2fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4copy_page.S: Niagara-4 optimized copy page.
  *
  * Copyright (C) 2012 (davem@davemloft.net)
index a82d4d45fc1c38c1a0001c30f05eaab3ea3c046a..c5c9abb3cb773aacb912e09d8f8bffb5a6fd40e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4copy_to_user.S: Niagara-4 optimized copy to userspace.
  *
  * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
index b5dacd1d207870655156857b5c9fa40de626a1e9..7ad58ebe0d0096ffce4a9a333eb9cc7113c065fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4memcpy.S: Niagara-4 optimized memcpy.
  *
  * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
index 7c0c81f18837e11902f8b473b7b480bfc13ab5a7..f81ee5419e2c3f9cf0fdb9e1dcbd9cbd93bc30e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4memset.S: Niagara-4 optimized memset/bzero.
  *
  * Copyright (C) 2012 David S. Miller (davem@davemloft.net)
index 3cc0f8cc95df175a542f0c6962006a9163a93517..aa58ab39f9a6293ab496f61d21ba40daed5e7df6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NG4patch.S: Patch Ultra-I routines with Niagara-4 variant.
  *
  * Copyright (C) 2012 David S. Miller <davem@davemloft.net>
index 33053bdf3766b35ee4396c04403931f37965c5d8..19327614d57db6249f3c5e7c92d64bb70204a429 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGbzero.S: Niagara optimized memset/clear_user.
  *
  * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
index 2333b6f3e82409ce4c3cf480670e154dfe9db2e4..9abc49fcdbbefb230c071be0098b9a8f2f29ecd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGcopy_from_user.S: Niagara optimized copy from userspace.
  *
  * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
index 07ba20bc4ea4a620f50afbf7c364f49a66d9b270..9cbe2f18e5ccb055a7d5d029feb4dd828935b99f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGcopy_to_user.S: Niagara optimized copy to userspace.
  *
  * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
index cd654a719b278b6c925a730a63195462d6e076df..8e4d22a6ba0b2131aa161c8626f1490998767883 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGmemcpy.S: Niagara optimized memcpy.
  *
  * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net)
index 423d46e2258be1d97d08b6ed0fd5709ea156eaba..88fec781806587980c2fb855cf447c28bcc52942 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGpage.S: Niagara optimize clear and copy page.
  *
  * Copyright (C) 2006 (davem@davemloft.net)
index 62ccda7e7b389c193a0552d8718f6e1ae88f6d5f..e9f843f1063ede7fca60fcb901afe5c13768b689 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* NGpatch.S: Patch Ultra-I routines with Niagara variant.
  *
  * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
index e6d18367599079047a442b510503674c4a9270e5..cde4c9a51b2e19e55ed2cd7ba3496260bd0a563a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PeeCeeI.c: The emerging standard...
  *
index 9a6e68a9bf4ade1746772bd3ad71b7e2f4f3ec4f..bf08d1c78836eaf13bf8edd971ce00274a8d21c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U1copy_from_user.S: UltraSparc-I/II/IIi/IIe optimized copy from userspace.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index d7b28491eddf9091522515374fba7f0755fe7619..15169851e7ab2e7b10d56865a4210de12bbd464e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U1copy_to_user.S: UltraSparc-I/II/IIi/IIe optimized copy to userspace.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index 4f0d50b33a72482e98411a2bd1b891de7229089d..a6f4ee3918977c35ff9744effb7701702b318b5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U1memcpy.S: UltraSPARC-I/II/IIi/IIe optimized memcpy.
  *
  * Copyright (C) 1997, 2004 David S. Miller (davem@redhat.com)
index db73010a1af8f18d5baa7515203001045995ce31..9c891e9edc7b1cffe633ba76de8fe98c5fa1f5ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U3copy_from_user.S: UltraSparc-III optimized copy from userspace.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index f48fb87fe9f218daa6ca9c21665255126d62296b..da424608272c6bcce1893dba1636d4a8a10cb33f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U3copy_to_user.S: UltraSparc-III optimized copy to userspace.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index f9b42b3c63b07c030daa69e88127563131fbdf3a..9248d59c734ce200f1f55e6d9913277f18715a87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U3memcpy.S: UltraSparc-III optimized memcpy.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index 91cd6539b6e1742e1fc75838fdcf432088a66fa1..9a888088f3c9d658c089c3f8efdc250644c82b8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* U3patch.S: Patch Ultra-I routines with Ultra-III variant.
  *
  * Copyright (C) 2004 David S. Miller <davem@redhat.com>
index 1c7b6a39b9424acdc887c6640f3e4e7139cf5ed1..9c8eb2017d5b4be09e5465c3fb25e7d77fe671d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * VISsave.S: Code for saving FPU register state for
  *            VIS routines. One should not call this directly,
index c8b1cf71bc73227e490c5662fe18759d58c012c9..2d72de88af905737dc8fb7fac35cd0917a3611e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ashldi3.S:  GCC emits these for certain drivers playing
  *             with long longs.
index 4310256e796475b5e9ad3e1fb81b0839a521b027..05dfda9f500519636502efe5471a168fe78d07bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ashrdi3.S:  The filesystem code creates all kinds of references to
  *              this little routine on the sparc with gcc.
index 2c373329d5cb8dc8dc87c934feb8dbf64ecf9ce6..5010df4973879fb1b17e689e01ae11ca754ffc56 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * atomic32.c: 32-bit atomic_t implementation
  *
index ce17c3094ba6d90afa7dca890f9891b067efdd8d..456b65a30ecf6b1c6b301e16756785b762c44fb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atomic.S: These things are too big to do inline.
  *
  * Copyright (C) 1999, 2007 2012 David S. Miller (davem@davemloft.net)
index 8ec4e9c0251a3e414acf58327b0fd167890caa95..32a5c1d9459cdec5cabe36d5d1d774b854dd3841 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bitext.c: kernel little helper (of bit shuffling variety).
  *
index 7031bf1587cb6136569f9f56af3c502a77f1350f..9d647f977618c5541662403010642a89b1d77c6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* bitops.S: Sparc64 atomic bit operations.
  *
  * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net)
index 1f2692d59d18ebe4a206d6ae27d875b1292da852..76ddd1ff6833ecce6ac7f14f187fe16ae3dc9708 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * blockops.S: Common block zero optimized routines.
  *
index 3bb1914c4fa487aecd598e11b4bd74687287c441..87fec4cbe10c50eb5b570dfebc7d941940bbe760 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* bzero.S: Simple prefetching memset, bzero, and clear_user
  *          implementations.
  *
index c9d8b62321116aa7f472904afae12793c57c0527..6a5469c97246fe75305f2b1ecce3808cd78fea29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* checksum.S: Sparc optimized checksum code.
  *
  *  Copyright(C) 1995 Linus Torvalds
index 6cfa521f444d1138b7bb2067e2e65dd4dd9d37f5..9700ef1730df63fb91bc5b8c14d9a91587143b5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* checksum.S: Sparc V9 optimized checksum code.
  *
  *  Copyright(C) 1995 Linus Torvalds
index f30d6b78afbd658fbcb9009fe34f6ce0bc2e99e0..8a6c783a63014d6e241192575a14655878add9ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* clear_page.S: UltraSparc optimized clear page.
  *
  * Copyright (C) 1996, 1998, 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index 8c1306437ed1bc8e29d6845f83900872c2c12aa4..333367fe73533ddfa3907a5cc927bfa15bec1504 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 #include "libgcc.h"
index 1b73bb80aeb0db5a4201b1eaec0d4e12bacba329..66e90bf528e2bf3a4f9ba710418eee539d38c816 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* copy_in_user.S: Copy from userspace to userspace.
  *
  * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index 7197b72508951b68b7a1cc91087e29675bea183f..c088e871e8e39332058d447a412c410aade19375 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* clear_page.S: UltraSparc optimized copy page.
  *
  * Copyright (C) 1996, 1998, 1999, 2000, 2004 David S. Miller (davem@redhat.com)
index bc243ee807cc0e39981c7256e006439923c14f3e..dc72f2b970b7b3328b0ccc1566c2d64951669abf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* copy_user.S: Sparc optimized copy_from_user and copy_to_user code.
  *
  *  Copyright(C) 1995 Linus Torvalds
index b1051e77c49acd06074689249d7058c5205151c1..26c644ba3ecb0acc4c42bdc47cf7f7f5a12a6525 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* csum_copy.S: Checksum+copy code for sparc64
  *
  * Copyright (C) 2005 David S. Miller <davem@davemloft.net>
index e0304e6a2242b3cecb80317f4e602715021ee980..d20b9594f0c72202e4684a7fe866a8aaf0e01b78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* csum_copy_from_user.S: Checksum+copy from userspace.
  *
  * Copyright (C) 2005 David S. Miller (davem@davemloft.net)
index afd01acc587c3f9462d93d54db459b5d3395f24c..d71c0c81e8ab2cb6c204678cbc5fc56557530002 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* csum_copy_to_user.S: Checksum+copy to userspace.
  *
  * Copyright (C) 2005 David S. Miller (davem@davemloft.net)
index 23aab144d28e5b67b4db11710c9afb43746af6d4..5a11d864fa052036ea3f04e16dcfb219844256d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index d21cf20e5c1eb234fa083d883ded321c4297d6ef..e5547b22cd1832c3aea507b3dfc694da90568222 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index c4d42a50ebc06d3f92fdae70aa7d1f1d64a5b6f7..c9da9f139694dafe211b5bb30e4d36892cabaf77 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement the sparc iomap interfaces
  */
index 5d61648b53dd29d62225fb6053a6d1a9e1d5d7e5..531d89c9d5d9a38129e2dab3d43e1127e572f6a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index b84fd797f3ea3236b9f99302d56e4c70eb63616e..79845c941b87ca55000433d2a3c4a651e1ae49ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_LIBGCC_H
 #define __ASM_LIBGCC_H
 
index f38c4e59d078fefec684bc68bad68865e1945662..9a1289a3fb28a7c81e055ed0171a19151398eb1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * locks.S: SMP low-level lock primitives on Sparc.
  *
index c9b9373f8d8104587dc5b001f207ddc880775689..509ca6682da8d113935c6f6fdc9402aa51e5ca3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index 194f383611c02f815431f90dfd662c3718f3b4a8..deba6fa0bc78bfd48ffdb7b96219d1072109ca06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com)
  *
index cee7f30dbb61352cb33552ed1240821269c76dfa..a18076ef5af1479c5eba57643c7220f72ef7e94b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Sparc optimized memcmp code.
  *
  * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index 8913feaa7ac7e1bb0ec677a531c58f6cc946b948..ee823d8c92157d0842e586839f1a61a9802a008b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* memcpy.S: Sparc optimized memcpy and memmove code
  * Hand optimized from GNU libc's memcpy and memmove
  * Copyright (C) 1991,1996 Free Software Foundation
index 012cdb6ca4677b09da150b3f8b61ae98879b5952..3132b6316144f3e40b281bbe7a9748363ef64d4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* memmove.S: Simple memmove implementation.
  *
  * Copyright (C) 1997, 2004 David S. Miller (davem@redhat.com)
index 51ce690c42a8ec3a06e43edb92b098de36db0b4d..c4c2d5b3a2e95a93418811d3bcb148a8df5b2ac2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * memscan.S: Optimized memscan for the Sparc.
  *
index 5efee1f4be366f3b9f24c6b434523653664ae26f..36dd638905c34566ca421c38a2fc40f918deaefd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * memscan.S: Optimized memscan for Sparc64.
  *
index e23338dbfc43ac1a3b8ed7de2b99697774ccc3de..b89d42b29e344a4ad9bfff0335c84a20c0e25bd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/arch/sparc/lib/memset.S: Sparc optimized memset, bzero and clear_user code
  * Copyright (C) 1991,1996 Free Software Foundation
  * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index 703127aaf4a5015ee4a1099e6129735f7162222b..2f187b299345ff7527d1ce643937bfc523a6f280 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index ca0e7077e87136fae3875839b216b9fd80694fbb..dd111bbad5df9063337ba7f2c9b72903399416f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* strlen.S: Sparc optimized strlen code
  * Hand optimized from GNU libc's strlen
  * Copyright (C) 1991,1996 Free Software Foundation
index e3fe014813af85bf1040fbef9165dadbb66f25f2..794733f036b6c66653b582b120e5e2f615aa89e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc
  *            generic strncmp routine.
index efb5f884330d73538f6ce74b09ace90076782023..3d37d65f674c36b21d707e9223ed3193eaf5a92c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Sparc64 optimized strncmp code.
  *
index 1e06ed500682b420f462c6e0d8a43e697b1df5fe..82c1cccb126447ffd6ea1a5dcba6ac10935d57d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include "libgcc.h"
 
index 45a49cb618b52bea832ee2bd128406ea8c20d500..f6af7c7ee6fc16a6ad7640e1be0986c086b62363 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/sparc64/lib/xor.S
  *
index 4d7e0fff054f65d47726d0b22b8f3d0464e2f214..72e560ef4a0912f4b3d29939db0733e2e1a88742 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sparc/math-emu/math.c
  *
index 9647051853d33fd6cfe47531c3156a31584eca85..1379dee26a65f17fff180859c5afd712e214a756 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sparc64/math-emu/math.c
  *
index bb587d5f3d9d4e7972af5680708b258ed2680dbc..b57375ff28eeefeb8a69e405f29453e0f64f1653 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/types.h>
index 51320a861cc2841faf22c7a7bf0bffec79031d38..8fdb55aae9c82e46cecf9daae262717d1cf410c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/sparc64/math-emu/sfp-util.h
  *
index 30c3eccfdf5a209f8b09458824aa9d706f3079dd..d39075b1e3b71275df203063747812d9bd49c305 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the linux Sparc-specific parts of the memory manager.
 #
 
index 2422511dc8c5f16a7db7d205cb824b3a463e02c5..241b4064187333f04998fa3aaa1d3352608cdabd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/sparc/mm/extable.c
  */
index 4714061d6cd335d2258aebc22bb03c99a6c84317..be3136f142a9993e0c6c8cfa1d651b1685654a73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * fault.c:  Page fault handlers for the Sparc.
  *
index b84c4dd14954f13d8b6779eb0ff52241b1e97f3c..815c03d7a765524424b92866b1567ea2a43695d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc.
  *
index d809099ffd47394795b108d3ec7bed5efbcdc992..5335ba3c850ed3acdc074ffe639d3ddac101f2ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Lockless get_user_pages_fast for sparc, cribbed from powerpc
  *
index a454ec5ff07af7f33d8ec548051101c3895e9b82..86bc2a58d26c479e23d82b1ad198b51722812013 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  highmem.c: virtual kernel memory mappings for high memory
  *
index bcd8cdbc377f63bb57d4d5345b9a0c666570bafc..5078b7f6889039952c3ed3aba206f18f03156cf5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SPARC64 Huge TLB page support.
  *
index 969f96450f690a8bc06c159bfc0045479f55a006..66885a8dc50afe8d5a4675011de49a0c109f287b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hypersparc.S: High speed Hypersparc mmu/cache operations.
  *
index 3bd0d513bddbde7f95275be6e3ae94bd26729c6f..95fe4f081ba3b152c59fa001f279b976c8152e41 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/sparc/mm/init.c
  *
index b2ba410b26f4a013493a51772ce2eb76c9ddc9f3..61bdc1270d195e551d190977b03e1e9fb604ec75 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/sparc64/mm/init.c
  *
index a4c09603b05c09d8f1478d68004398e4ef4dbc1d..d920a75b5f14143da8fb3b494ede77210b2291b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPARC64_MM_INIT_H
 #define _SPARC64_MM_INIT_H
 
index 338fb71535de247164f648fce41defabe5394a79..c8cb27d3ea759f79fb76cc547f69a3f55f252c71 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * io-unit.c:  IO-UNIT specific routines for memory management.
  *
index 491511d37e37c82e8676e0462702058179321cf9..2c5f8a648f8c311290b268af7d0d491455af7073 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * iommu.c:  IOMMU specific routines for memory management.
  *
index 3b17b6f7895ac405853844fd6133c7d06caf2189..ec61ff1f96b71a364116330c532d543eb6f3c2d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/sparc/mm/leon_m.c
  *
index a6c27ca9a72197f5b8f9be588c86c7d5f5542300..0d0b06e952a52bc147657ce79cce6bacc172f9a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* fault_32.c - visible as they are called from assembler */
 asmlinkage int lookup_fault(unsigned long pc, unsigned long ret_pc,
                             unsigned long address);
index 8e76ebba29863ecd18dd2b9ba29147072f3c4518..1d70c3f6d9868d3aee729263dc30493c354720b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * srmmu.c:  SRMMU specific routines for memory management.
  *
index d0a67b2c2383c725ab4ca11dc72b03436d399da1..d8d2e644a5ca349908015314753f6c4d3bcdac1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Assembler variants of srmmu access functions.
  * Implemented in assembler to allow run-time patching.
  * LEON uses a different ASI for MMUREGS than SUN.
index 5d2b88d394243157f895c35c330ac51305868e79..f414bfd8d899603e5fb0554d09422b291eb14402 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * swift.S: MicroSparc-II mmu/cache operations.
  *
index ee8066c3d96c95cea2d174dedf856c429aa6dbb9..4ae86bc0d35c720ea01e9ea0df3f3af4845e5bff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* arch/sparc64/mm/tlb.c
  *
  * Copyright (C) 2004 David S. Miller <davem@redhat.com>
index 0d4b998c7d7b74a9e930f12d735591f14769befd..75a04c1a238333b39b5d21af02b86037acbfa10c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* arch/sparc64/mm/tsb.c
  *
  * Copyright (C) 2006, 2008 David S. Miller <davem@davemloft.net>
index bf10a345fa8b7857a9e080ef4baa44998ea36d55..62b742df65dce7eeffcee0956b2f88b1e4f4460f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * tsunami.S: High speed MicroSparc-I mmu/cache operations.
  *
index fcf4d27a38fb47af30d026079022d07bb803e323..d245f89d139528f049f2c8d596729974fb7e2020 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ultra.S: Don't expand these all over the place...
  *
index 852257fcc82b83c508bb738b31490d8694cef2dc..adaef6e7b8cf5df7acf318ddaf077ef9a0aaf84e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * viking.S: High speed Viking cache/mmu operations
  *
index d5c069bff5f983d2a985029732f460f1fd8ea501..cfd6a8be0eb4c5642ae907607abe0bb4d212261f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BPF_JIT_H
 #define _BPF_JIT_H
 
index 74abd45796ea6e3440afe3842287c42ae9e27ee4..428f7fd1917551c2f1235f13fd8c33255fc95d7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BPF_JIT_H
 #define _BPF_JIT_H
 
index dcc402f5738a1ad6a7cdf61b6dfac155a86df7d8..a2e28e0464a33fa7102ab47ffdae1894fdec8467 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/ptrace.h>
 
 #include "bpf_jit_32.h"
index 3b3f14655f819b149980e6647ca23883ac145e64..7177867052a164e6de720522cdb5055da955c263 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/ptrace.h>
 
 #include "bpf_jit_64.h"
index d193748548e23d3e0d6c115ea0a6cc4a662808a1..09e318eb34eeae592f2eeafd6fdd7160c456494f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/moduleloader.h>
 #include <linux/workqueue.h>
 #include <linux/netdevice.h>
index c340af7b13717e7fa63039ec27d863a106b3fd45..5765e7e711f78248d2bff70f9c57ca48a4514355 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/moduleloader.h>
 #include <linux/workqueue.h>
 #include <linux/netdevice.h>
index df707a8ad3117074805e138a3992a7e080d43e5a..47b06f4af1f918803cb4ecbafd9e7e876353c660 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * hibernate.c:  Hibernaton support specific for sparc64.
  *
index d7d9017dcb15b23b8c98b4de8e14f1cc62749e34..8cfaf5b6a32e4f30d36c9efbe0495a1597a5804e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hibernate_asm.S:  Hibernaton support specific for sparc64.
  *
index 020300b18c0be89cfa339d41a98c3dc5b1e0c09e..397b79af77f7b0852b68fa129f87630b65938f79 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Sun Boot PROM interface library under
 # Linux.
 #
index d2b49d2365e76d962db243aca29735d85d564dfb..e3b731ff00f07b3cc937cf5baf5bc40fe0d213f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bootstr.c:  Boot string/argument acquisition from the PROM.
  *
index 7149e77714a4a45b3ffb96e1388adca25577cca6..f1cc34d99eec8cef16612c9ac535ddedfdf5da07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bootstr.c:  Boot string/argument acquisition from the PROM.
  *
index 8050f381f51812113143c462536dca3343562baf..dd06bb1fb90c4088648225da3d0989e17e719890 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* cif.S: PROM entry/exit assembler trampolines.
  *
  * Copyright (C) 1996, 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index 1cfb50f4cb9c9613b041ca047660b00743a6f2a8..6404e5bbb7e61e8dfaf7f82212abc7fab36e9764 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * console.c: Routines that deal with sending and receiving IO
  *            to/from the current console device using the PROM.
index f95edcc54fd5cb33591798657daf7e716ba77211..86dace787ae651ae5c19da7a4a60b5ef1f86bde8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* console.c: Routines that deal with sending and receiving IO
  *            to/from the current console device using the PROM.
  *
index 9ac30c2b7dba54c7af46a8c3d00cdcce596f4d96..d20470166cb1897d11e3e05c9d4c932b7fb50dcf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * init.c:  Initialize internal variables used by the PROM
  *          library functions.
index 110b0d78b864113c2825271724b9363b5fb8e1ba..103aa910431856a0ccda49e5aa0901ea41b32418 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * init.c:  Initialize internal variables used by the PROM
  *          library functions.
index 3f263a64857d5962c7738ec72b6c9bca16b7d353..269d6ab5ef5e972ef3a984b977008b580ec0f805 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* memory.c: Prom routine for acquiring various bits of information
  *           about RAM on the machine, both virtual and physical.
  *
index 8dc0b6b271e89b18fbbca71ec2b004dd6d570699..625750924860aadbb9996d55c1aaa99e430a851e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c:  Miscellaneous prom functions that don't belong
  *          anywhere else.
index 53a696d3eb3bbccb026379234ba02f95a9b5443b..aed94cd4a1e738c7020856a2a3b0f80c0fae8fb8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c:  Miscellaneous prom functions that don't belong
  *          anywhere else.
index 0da8256cf76f286a6e2aa2d4c60e219e18a1e911..67cf0e957e38b2f56d114a0978b5d6d4f5891f96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mp.c:  OpenBoot Prom Multiprocessor support routines.  Don't call
  *        these on a UP or else you will halt and catch fire. ;)
index 545d8bb79b65245984ed36c7963bd3c97768a2f5..889aa602f8d8600aaf2a6aa1c6b6294378ea92e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * p1275.c: Sun IEEE 1275 PROM low level interface routines
  *
index d9682f06b3b056c7862ec7cda4214a95ab213a03..dcee3dfa6de9f04c3388d3f4b5b29089905eb15f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * printf.c:  Internal prom library printf facility.
  *
index 6d8dc2aa94cedfb28f1642c4a9b6872050f66acf..20cb828bc5f42012eb1ae1fcbc0ba443fb5b8e2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ranges.c: Handle ranges in newer proms for obio/sbus.
  *
index f30e8d038f01f7c4cb803a65e09b5a8c9ff3bda3..0fed89375b74ad9acf3271c9cfdb9b9a79e1c97e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * tree.c: Basic device tree traversal/scanning for the Linux
  *         prom library.
index bd1b2a3ac34e3a9cd82df45c4fedb86b34614ef0..989e7992d6297261b95be58c843343b9450db911 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * tree.c: Basic device tree traversal/scanning for the Linux
  *         prom library.
index 4583c03200592229f7de56836428c9aab2e03fdf..02f269cfa5382df9ef66228f3e9b169d2560d7e5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
 
index 19734d3ab1e877e14df5b353399e6191d88016ec..9f665d1a805ff940af7a3252bd881f74dd3835d0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 4dc380a519d48ad2180279c38d64892cf662139b..8fa0befba32b42d8ab438af8f942bb0bb3f4e9d5 100644 (file)
@@ -51,6 +51,8 @@ else
 BITS := 32
 endif
 
+CHECKFLAGS     += -m$(BITS)
+
 head-y         := arch/tile/kernel/head_$(BITS).o
 
 libs-y         += arch/tile/lib/
index 0d925fa0f0c1f270c7bb6ffcacd8f548ede225ec..9f94435cc44f455597fad4afda30fca3e5238675 100644 (file)
@@ -409,5 +409,4 @@ CONFIG_CRYPTO_SEED=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_ZLIB=m
 CONFIG_CRYPTO_LZO=m
index 149d8e8eacb83c223d186f86d342de9db21f6063..1c5bd4f8ffca34110fe68fd3ffd96e98743aef2f 100644 (file)
@@ -189,7 +189,6 @@ CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_TTL=m
 CONFIG_IP_NF_FILTER=y
 CONFIG_IP_NF_TARGET_REJECT=y
-CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_MANGLE=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_TTL=m
@@ -521,7 +520,6 @@ CONFIG_CRYPTO_SEED=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_ZLIB=m
 CONFIG_CRYPTO_LZO=m
 CONFIG_CRC_CCITT=m
 CONFIG_CRC7=m
index d4e10d58071b8fbf021cf2d45e93f3ff95b05496..903c8646bdd7283c54b12195d721b82c0a744129 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Support direct access to TILE-Gx hardware from user space, via the
 # gxio library, or from kernel space, via kernel IORPC support.
 config TILE_GXIO
index 26ae2c72746737746d3d0ea524236e940ffe044c..fcc903c4cf873ef8d415e1edc74f4c0660d144fd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Tile-Gx device access support.
 #
index 9f765cdf09a52c8d82300b65409ea1b834429836..a0a798344d5f97b148156e13ccfc5cf9b1a57768 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_TILE_DIV64_H
 #define _ASM_TILE_DIV64_H
 
index 48af33a61a2ca75f5c6183c83d338d1f97dd622b..78d3b6a7b27a8d6f50bdc6b36aa7b75038fff7f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
index b66a693c2c3453e4f4642fea133890ab268a32d8..2f2515867760f2ddf35761c25ac8d895a974c7f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_WORD_AT_A_TIME_H
 #define _ASM_WORD_AT_A_TIME_H
 
index 328e62260272e095ed1e63ab7007cfa4e388cedc..df161a484730d6578172db3f4ceebef1e4158953 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 4c91f90b93698d6b776ea341c92e3bdd0ecaa118..7f55c6856c8986bcf12e506fe662fcf6ff49b34e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index ea8e4f2c948322f4664b9712154e767b5486d985..c2a71a43b21c940de6d7015f9425d79eb417f4d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index 70017699a74ce0e37e30d0c7c8e62865e9577e3b..a8a3ed144dfe76acd24d7cf71272107e48ea9684 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 762eafa8a11ec95af2928e9c045549ff59c4604e..ff85a5d77f16d0e433da16b049089d02cfce6a20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 20f8f07d2de9aa047701b1d8ac19bf4112d2ec3a..c288b5d82b4d2ccfc9ee8a9187fe9876d97ecf05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 2efe3f68b2d6a80059acd078d53acea552cf4631..a748752cec16d6d5ebb31f657a7d61a78ad265b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 13c9f91823484bf94b28703c3a3cede1e891c344..142eaff3c244877e6ebbcb98b81648508c82f7a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index 1cf2fbf7430659a2708fd10343624ac8fc7708f9..5387fb645bb8013b1ac67f92399b48f028f208a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2017 Tilera Corporation. All Rights Reserved.
  *
index 92d15229ecec1a0eb88774f8844d333bf7cf6112..a9ce5961a0289c6f1a1d31437b02241f827015ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index 9e46eaa847d4eb3936d016045bdf7b17a2662aa7..948ea544567f156b66242d818e0727fec6e17a5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* TILE-Gx opcode information.
  *
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
index 4451cff1a861ffacdabb192dfe91aa53cfe6abca..0d633688de63cd962c470c82be850a8660ae92f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* TILEPro opcode information.
  *
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
index e54b7b0527f368523b64e957eddaa28e4549b29e..c4183dcd2ea73f13e15509fad3063cda0121d221 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 1c069537ae41544917ab4bee7567cbeb7296682a..f74f9943770df54c5ec322a3e407c734d1d23627 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index c250c5adb1a668bf3b74b9e236fb186fd564157f..743428615cdacb04b4c324b712f47829ec5dc8f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 78daa3146d25e9697fbbf45056880fb0b83cebf9..64122d6160e172260159ae85bb4fe3374f2e66df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 67a6c1751e3b68f8b0c5cff6352cdd99dfb13291..d183cbb31aa7e421092a0325d407e7b4dd05ebc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index f497123ed980c436c4480b9f3f5b03d13ce35ea3..922383ce8f4f936efe857ce22c9f8c3d76942e5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 58c771f2af2f59bf9f7820335b2ab1e3a31bf612..57cca78c0fbb47bb0fc7fd39e75cc72c672b6d56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 6b8fa2e1cf6e11d5bf6331e290a234bb7ef55b85..d508e61c1e567bc443e2e52169fdc3bb7dbd62c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index 572ddcad2090643fc68c2eeb13f0e8b1b1504a31..ed8bac28a1b95dafcff5a302db54b5a2d0ea79a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2011 Tilera Corporation. All Rights Reserved.
  *
index c2169d4f40106248db2415ce30b80863f465b491..f02e9132ae71bd8698090605decfa016b5eb2bbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 14fab8f0b957675dd06bdc00785ca2ec33cd56b9..baacc4996d18e77e1b1e37b7a0ebcaf5f9a535e5 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/kvm_para.h>
index 63ee13faf17d2461ad79255bde0669a862e8d344..9b7add95926b6d4f7feec26b3f72fbfc54c8322e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index d03b829857e894703200e5da9b55ea5cecca2ea1..667ed742f4ddddcf0509dba8336cff1efe291530 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index e6f7da265ac3eafd4bde169d3acf8b48d63a1b53..6d1dfdddad6cffd9a71e778ada2918d5f132f54b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 39ff5d1a232d94b2333b8db43f4233f7970e47da..4003d5cc920252ab49961b31432767f70b8541bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index e83f931aa1f0a1d21f6db9a422bea2ff0c88c524..f234d24fff55cc667b7e3fe2a062099290f66a67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index ef0d32d84a4c60e1440f517936f38ef022a9e98c..7b3c814e00f0065b25b39687dc1649f9ff63dcf3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index c0db34d56be367f24a29b9e4249a98d9ad356961..ea03de7d67aa3748c70e69b8d13c2236ca1d4c98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #if defined(__KERNEL__) && defined(CONFIG_COMPAT)
 #define __ARCH_WANT_STAT64     /* Used for compat_sys_stat64() etc. */
 #endif
index 7c37b38f6c8d78f36c2215e6387e71c25c0e29ab..36952353a31de266231f0df32420846f12aea121 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 24e9187e85a86cd17911e64f76922e1034013919..1a169ec92ef8b9da84c2d78b05ae0febf9dd61ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 09936d0bcb42a811a1da6b2d72b970e8a40277a7..3e43d78731a87036b857665fdbdf82003562f3a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/TILE kernel.
 #
index d78ee2ad610c640c5ac048e09078c3adb936f4e5..70c661448638a1c40dfb197c8341053d87bfd959 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Hypervisor call vector addresses; see <hv/hypervisor.h> */
 .macro gensym sym, val, size
 .org \val
index 6becb96c60a03c5515cb443b5cdc7c683e259433..ad83c1e66dbd23c5ba46e20c8e5deefdf6f3655e 100644 (file)
@@ -140,7 +140,7 @@ static int __init setup_maxnodemem(char *str)
 {
        char *endp;
        unsigned long long maxnodemem;
-       long node;
+       unsigned long node;
 
        node = str ? simple_strtoul(str, &endp, 0) : INT_MAX;
        if (node >= MAX_NUMNODES || *endp != ':')
index 6643ffbc06155cfa0336c4648e82e584dabf4a22..f95d65f3162bc3a567df4ec346ca69fe605babbc 100644 (file)
@@ -162,6 +162,7 @@ static DEFINE_PER_CPU(struct clock_event_device, tile_timer) = {
        .set_next_event = tile_timer_set_next_event,
        .set_state_shutdown = tile_timer_shutdown,
        .set_state_oneshot = tile_timer_shutdown,
+       .set_state_oneshot_stopped = tile_timer_shutdown,
        .tick_resume = tile_timer_shutdown,
 };
 
index 71d5f5d71f7995daec07dfe0ead1557927d669d7..b596a7396382d771943eb364f81726281ea34e6d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Symbols present in the vdso
 vdso-syms = rt_sigreturn gettimeofday
 
index e1baf094fba45f53f34aabf4730e315e7cc13d98..3558d981e3365e2961c33a2b7933c902a88931ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/page.h>
 #include <asm/cache.h>
index 1e968f7550dc0363c0ddff9d68626cd59afb119c..efce89a8473bb97938490d4c8c71f99f24f79a89 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
index c4211cbb2021553627534f6071a47cea39f27605..815a1fdeb2e4a7a9f8c94f00e94ffd821953b449 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for TILE-specific library files..
 #
index f10738d68b2d67eef3448258abb1d2b5024ee532..f184bde7030e69fe76bc52bdc2ef13df1cb6f321 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "UML Character Devices"
 
 config STDERR_CONSOLE
index 85f6dd204ab616a7fdd6bc080310bfc4967c1ef5..d9280482a2f89c7c559b76448c6da8358ccda82c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config UML
        bool
        default y
index 68205fd3b08c844e0db9d182c54f9e718032780f..967d3109689ffd3a4cc3100cc160912b1979aa0c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 820a56f00332f3f4634fb1bbda9ba83e52676686..e871af24d9cd276617ea75f5895a4b7d4043af55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 menu "UML Network Devices"
        depends on NET
index 567eb5fc21dfeb9ac56893c4bc1fa2d02350a266..08327b9c0cbead664058752b557e26edf9e5239a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
index e26376ab5452e2068ce9b3a71ec903ffe444a935..3e7f228b22e17bf5e011402b9518cfdef41b697d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config STATIC_LINK
        bool "Force a static link"
        default n
index 6673508f342603554c4fbe874511ab6df14af45f..760c507dd5b6630c1899c17033ce4c1bf850c028 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __COW_H__
 #define __COW_H__
 
index 67cbee63e702ef5948346716e058548092ec5be1..916811ef5317eb8c6bbd943d3c632b2b07622b25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __COW_SYS_H__
 #define __COW_SYS_H__
 
index c64f8c61d2743bc7a75cfea4712a40a3063eb128..0f3b7ca99465c40cc56663370b6c34699aa85251 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SLIP_H
 #define __UM_SLIP_H
 
index f597fa7c91d35a3bc33bab043faaf2476d6285a0..20fe4f42743d831ddbfdd668c6a875c345056f88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "slip_common.h"
 #include <net_user.h>
index d574e0a9dc13c307f7a78894a8f08713ff227817..d3798b5caf7f864f2b5418b082b65058c7ed0dbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SLIP_COMMON_H
 #define __UM_SLIP_COMMON_H
 
index 89ccf83b757718b7c4617df8d1e223138a5a2f39..4aef2b88249a9e2ef60cb0f22eef2ae2ef9db115 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SLIRP_H
 #define __UM_SLIRP_H
 
index d07a97f8b9945343791d4fb32c9ad0bf5c7d9df2..ecc3a58149324db4ec7dd02fa5a8eab0e3952a98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/console.h>
index 6a72e240d5fcfe32645bffa3705ee0c5a0417579..4473942a083973d85d590174900fd69250799e27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_BUGS_H
 #define __UM_BUGS_H
 
index 19e1bdd674165739b66dab05cb04e7527f174b79..5c156273484b606bdacc50beb9a52701042f66bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_CACHE_H
 #define __UM_CACHE_H
 
index 9e6d5997cfc4556983e8782fe52fa681c3fdaedc..b30d73ca29d08b8ff413c37275d8e65a05ac78e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 
   .fini      : { *(.fini)    } =0x9090
index f88c5860520b03d099523327ab32e20d92877f30..fdc53642c7183775f6f90097da46f18a0e6d3ed4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_DMA_H
 #define __UM_DMA_H
 
index 1761fd75bf133607c9961f74bbc7f667b6dd3853..2c697a145ac1b3a9419b155f210ee4d6f1550479 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_FIXMAP_H
 #define __UM_FIXMAP_H
 
index 756f0778e32798daa18bc9a63b40d6a7a24a3b5e..b426796d26fd7ecfe0d1286eaf526db59fabcb03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_UM_HARDIRQ_H
 #define __ASM_UM_HARDIRQ_H
 
index 8f35d574f35bcfce1f79db0f7e915875204b0d52..96f77b5232aafe01e1f73cf3641683160b8b1ba5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UM_IO_H
 #define _ASM_UM_IO_H
 
index 4a2037f8204baff05ed0b86e097fcc07e465f456..b5cdd3f91157dacb8b543fa6ff56f085aba7d2d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_IRQ_H
 #define __UM_IRQ_H
 
index 3bb221e1d5a4dd3b684ebde22ca56bfecda55bbe..cbc6c0013a644521cd1b8c099626f1a1c9284f94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_IRQFLAGS_H
 #define __UM_IRQFLAGS_H
 
index f6d1a3f747a9b58b3f33ce0ee25c3bf889985c0b..86942a492454c296bcc5cfc7f5fdd23544a46dc9 100644 (file)
@@ -58,11 +58,6 @@ static inline void release_thread(struct task_struct *task)
 {
 }
 
-static inline void mm_copy_segments(struct mm_struct *from_mm,
-                                   struct mm_struct *new_mm)
-{
-}
-
 #define init_stack     (init_thread_union.stack)
 
 /*
index cafcf684d94772903998e0c22c39677da7842657..a3c1fb6ed6adcabb766678b74bfedc78f5ec3c6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SECTIONS_H
 #define __UM_SECTIONS_H
 
index 99f086301f4cba151466532eb41b56f4a2f07fc1..80ada899f25426829e0b33b3b03a902c0131ce09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SETUP_H_INCLUDED
 #define SETUP_H_INCLUDED
 
index 9c3be355ed01c878dc79fbf761f8f10cb52ed4ed..a8cc1d46ddcbda53947d667072db54167f018102 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SMP_H
 #define __UM_SMP_H
 
index 9a864328c67f54ff658ed878d5f6a78d641af9f2..436b55952c3a518dce95a9a69782cbfc8d5b4f02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UML_STACKTRACE_H
 #define _ASM_UML_STACKTRACE_H
 
index c8d332b56b98b636adb113eef91ec1372cef2a92..8fc8c65cd357b767476bb88da57c2c4982db2c55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SYSRQ_H
 #define __UM_SYSRQ_H
 
index 0f4ada08f7488d6f37448fdc15c71d818db93a91..e392a9a5bc9bdacb5e247d81030b538e424243c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_TIMEX_H
 #define __UM_TIMEX_H
 
index 344d95619d0334659e6f4a9f3a5bff70ae95f67c..dce6db147f24563eb14310aaabf76cada9a878bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_TLB_H
 #define __UM_TLB_H
 
index c9230680902990e7436be151510f4e6fcf368388..4e99fe05576ad1fc8c79467a4574e3eeeadaae7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* for use by sys-$SUBARCH/kernel-offsets.c */
 
 DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
index 233e2593eee0f943bf25d2f834992812dc9c683d..390572daa40de1605f3f3ff65f8881fa0bfe235b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UML_INIT_H
 #define _LINUX_UML_INIT_H
 
index 9bdddf4c405b4012aaf52226378cd1d03cad7c67..b3315c1f198bede97a50bd8d9c9743d261710cd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UML_LONGJMP_H
 #define __UML_LONGJMP_H
 
index 4fdbcf958cd5ad76b9756cb5f201fa384f119b68..d417e3899700e056be233132f2c6e9d8b2caced4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/page.h>
 
index 407d49251d6f98642ad815c8b5cafa7ef3d4c7aa..98bdf69e4c2e59445d3ac0dcc1b4f9f99a09bcf4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kmsg_dump.h>
 #include <linux/console.h>
 #include <shared/init.h>
index 0b034ebbda2a1c2dd0125a6d4c2135dd886eb440..7f69d17de3540ca8491270408946a00654493cd2 100644 (file)
@@ -98,7 +98,7 @@ static struct clocksource timer_clocksource = {
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-static void __init timer_setup(void)
+static void __init um_timer_setup(void)
 {
        int err;
 
@@ -132,5 +132,5 @@ void read_persistent_clock(struct timespec *ts)
 void __init time_init(void)
 {
        timer_set_signal_handler();
-       late_time_init = timer_setup;
+       late_time_init = um_timer_setup;
 }
index 1840f55ed0420b9ac2cc5db93d31a0b5a93fd48e..3d6ed6ba5b78dbedc03e0ee8849158165f59fb3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/page.h>
 
index 1a365ddc4d023698dfa5f4d3e6eff08816661952..77a9321379b7853a587c2c611da516e8be8ac9a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  arch/um/kernel/elf_aux.c
  *
index db4a034aeee1ddc41cde5d5213627e68beed0369..715594fe57190688c64906ee20ee5d2328604d2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/module.h>
 
index 15889df9b4663771ccddc00f7e0275645ceceb0f..a4dfa7d7636e9a6ba637d22b16dc64e5fb3acaca 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ===========================================================================
 # arch/um: Generic definitions
 # ===========================================================================
index 0769066929c636ecbaa78a9b9a0455aaa7f3abef..d39f0bc6a046bcf771fd7f8228b30f911033a357 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config UNICORE32
        def_bool y
        select ARCH_HAS_DEVMEM_IS_ALLOWED
index f075bbe1d46f4ec1084f40ddd68396c39515e5ff..de8dae3abc0ad798cf5da0c40da80f9e25173fb9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index b7563e9d65035be409221f37bc289a2f7199f297..85c601898d0226f7817289464884246ae7bb5668 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity AC97 Registers
  */
index 66de9e7d1c8f856c1f6c4de7302bea0b1db01793..bbdc52d06a98bb5d7a93cd2bcb361d8e0655bf41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Direct Memory Access Controller (DMAC)
  */
index 0273b861ef96fc8b460cd23bf96ba02a9f0c8e0e..806350e1ccb6f7be93e44edc0a49a2b4c9c53944 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity General-Purpose Input/Output (GPIO) Registers
  */
index 463d108f8bfb0f4e653bcba32cf9f42adf4eac1e..b41aa7c9243053956a2d5d29550898d13638ec9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Inter-integrated Circuit (I2C) Registers
  */
index 25648f89cbd3521f902c8b8f189a741778f6cb3f..4eb1b5b571bb408bfd0b28329478103f6d50913e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUNITY Interrupt Controller (INTC) Registers
  */
index a7c5563bb550ce97e214c0659595f21aa5254fa3..7f29939251effe777f15134704a5004de9f1a5a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity NAND Controller Registers
  */
index 4a85fb4638480732720c426425de25667cb5cc32..6c63e7b7569ed9b962bdb90af6048fa5796f026f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Operating System Timer (OST) Registers
  */
index 6a9341686bf82eb6ed91910c6cfd8d3ff68154de..25bb307b87c355c2100b3c721379ff2737180714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity AHB-PCI Bridge Registers
  */
index 854844aa8f4bfec23e11fe73f9b9f8d46686cfbd..777b1ace39b915a09372370c88c64b2ee67c459f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUNITY Power Manager (PM) Registers
  */
index 17d4e6dc00692c03e9791751561db6f3d6bc80ab..d539d74824621390297454fde362af9f13013570 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity PS2 Controller Registers
  */
index 39900cf4c936d40136063d0eaf07db704e4d7d9a..5f2b9d77a9ecbda84718a18a9c6f22afc0dda2b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Reset Controller (RC) Registers
  */
index e94ca193271d640f1a1af4ad739427348dc8c6a8..f2f7f47eb65e18df093a738584ee9e9486191744 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Real-Time Clock (RTC) control registers
  */
index 1303ecf660ba9b8483cb4c8d201229681965b836..658bfaf4cb3cfaa555de18bbc6d4612bc2666d44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Multi-Media Card and Security Digital Card (MMC/SD) Registers
  */
index de16895e2dc0da3b66f3ef474fa9ed678c0b8e9c..3460647a9c2adbb69746591291e5e4a2cf37f6ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Serial Peripheral Interface (SPI) Registers
  */
index aa22df74e11d1bbd95f504b2733a269f5b661b42..7023089c61c6f32c3bf0d16b45c35f6cb65662c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity Ultra Media Access Layer (UMAL) Ethernet MAC Registers
  */
index faf8b287fccf300338c40d82152e9f4d6f722cf1..553d1157c6b298f8e148ba2e88bd311113031307 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PKUnity UNIGFX Registers
  */
index ebe1b3fef3e36342bd8e96ce2e0751456e21b444..864fe4814cf4c9f2f7aafa9a3e002dc508907897 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/arch/unicore32/include/asm/byteorder.h
  *
index 187aa2e98a539b1ace6d9a5f55bde58610a4e434..2820de83e37d415b36289fb77fa4cf7a5b9ad3c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/arch/unicore32/include/asm/ptrace.h
  *
index 6a2d7671c0527fc15ec335f75b2877d8c4042c29..79e56f28e4b51b9fc537ba7a3e2da6943b9ffa1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/arch/unicore32/include/asm/sigcontext.h
  *
index 1f63c476528e6ce58b590b16346a3d9961968f87..65856eaab163e79ef04603b087af8217306d8c18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/arch/unicore32/include/asm/unistd.h
  *
index 607a72f2ae351758bfa7013d0a8228f60e9e1359..2f79aa56735bffd4fa11546a921e0b997f0e6380 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 31472ad9467a0b376f33a1656aa2bd5b26230014..5d2d5ba324acb1015f0ea276b361b7f5c296e92b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * libgcc functions - functions that are used internally by the
  * compiler...  (prototypes are not correct though, but that
index 87229a558b362e5b56261e7fa74c7fded93b19bc..098981a01841bc214643e8f8cb79d62dd3584b45 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/unicore32/lib/Makefile
 #
index 5f77fb3c63bec11decf9faa0c17fbc1ff2444cbd..c256460cd363330ba248ed094b2e2295ac0c6f93 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 comment "Processor Type"
 
 # Select CPU types depending on the architecture selected.  This selects
index 46c166699319d8c544f464908d506246f316f265..681c0ef5ec9ef633329852efbb8eef3c84088190 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux unicore-specific parts of the memory manager.
 #
index 971feac135060d371e130680b54034f9dd39556a..2fdb23313dd55fa2d08fee3e15c47bde6ef632ac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Select 32 or 64 bit
 config 64BIT
        bool "64-bit kernel" if ARCH = "x86"
index 3ba5ff2f2d082b3653477141ebbb4409c119f54f..65a9a4716e34f55394d057335629d0b32ec55ada 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Put here option for CPU selection and depending optimization
 choice
        prompt "Processor family"
index 71a48a30fc849059a418866a8ad4d10d7a922bf3..90b123056f4b389a40f51b1c0594493ad31af180 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 config TRACE_IRQFLAGS_SUPPORT
index 6276572259c888fa392543cee4ebd001684ca7c7..a20eacd9c7e9a73867dcaa06503b690b188fffc5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Unified Makefile for i386 and x86_64
 
 # select defconfig based on actual architecture
index 5b7e898ffd9ab8d6db4c13282a4beb328012cb46..45af19921ebd23090c2e2ffe775ea3c5f37d6961 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 core-y += arch/x86/crypto/
 
 ifeq ($(CONFIG_X86_32),y)
index f3717d36718a5974f9be055dc38ba4a2777f67c4..1f5faf8606b40a9cf10cf42607396e5cb032c5b2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # CPU tuning section - shared with UML.
 # Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
 
index 5ff426535397c18afec4049ce4681b802dd3b7ee..e19fd75363073236b71f7bce2de2d716e9247d8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #
 # code16gcc.h
 #
index 8a958274b54cc4bb9d17888f80aa7737fad4f618..4b7575b0056311097d3b2d1a1a1a0f37f6e58f7c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/arch/x86/boot/compressed/Makefile
 #
index 9dc1ce6ba3c0c70a00259e728db02e3c71022bca..0cb325734cfbb729ce0a3d027a73f5d4022d582e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "misc.h"
 
 #if CONFIG_EARLY_PRINTK || CONFIG_RANDOMIZE_BASE
index aa313466118b2df8731475dfd93eec0d672bca9c..6448a8196d3298b0fb06f7a31d14dee6086f8978 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef CONFIG_RANDOMIZE_BASE
 
 #include "../cpuflags.c"
index c0223f1a89d71229021ed2d15f99c50ac8c82166..e799dc5c644872e65625b9442d194470a49d663c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_COMPRESSED_EBOOT_H
 #define BOOT_COMPRESSED_EBOOT_H
 
index a53440e81d5267a03830b2c86331e6d5686ff890..257e341fd2c808021a0e97462cb77ce4476f89ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * EFI call stub for IA32.
  *
index 630384a4c14a96ead4e97079349cbb33a29b1e26..bff9ab7c6317af218c99bbf262f8a089865c8daa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2014, 2015 Intel Corporation; author Matt Fleming
  *
index 31922023de49281d44f7fe893099935a594f5456..c881878e56d313f004787c81269e230b05d9bc3a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Callers outside of misc.c need access to the error reporting routines,
  * but the *_putstr() functions need to stay in misc.c because of how
index d732e608e3af63e8f9f73210377509c24a56b38b..1de5821184f180fd25dc023ae97db311925f6d52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_COMPRESSED_ERROR_H
 #define BOOT_COMPRESSED_ERROR_H
 
index 11c68cf53d4e8223dcea00a327cac11b6c2dfa9e..37380c0d59996b8ed688d0e350111343e5dca0ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/boot/head.S
  *
index b4a5d284391c278edf539c43ac665521ff3ed70c..beb255b66447a8392f38f3ae3d0ff16e893f582e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/boot/head.S
  *
index 17818ba6906f84f6d4a90d59893875fe7f314731..a63fbc25ce84bd4ddd43cd1867ade39a98df83df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kaslr.c
  *
index c14217cd0155f09ab7f00e018ec25fe3b4c4cf5e..b50c42455e25257bff89dd2d9d5f23534340076e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * misc.c
  *
index 766a5211f82768303087818c8da4ef280e688dd0..32d4ec2e0243c30cc60e0d837e995eab550a4b52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_COMPRESSED_MISC_H
 #define BOOT_COMPRESSED_MISC_H
 
index f1aa43854bed423e7bfccaa84ff66ea91996b731..972319ff5b0193b9692ae69370426e3240ecbc5c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This code is used on x86_64 to create page table identity mappings on
  * demand by building up a new set of page tables (or appending to the
index cea140ce6b42302deac808ba0c643cf619753781..19dbbcdd1a53d9d90c388722e1920455b5adbe43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This provides an optimized implementation of memcpy, and a simplified
  * implementation of memset and memmove. These are used here because the
index e24e0a0c90c9b18702f051de7e64825f5170534c..f491bbde8493142187aa7d9db3d42944d6378d0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/vmlinux.lds.h>
 
 OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
index 9e77c23c242268482e413da37af5f1835780dc1f..a0b75f73dc630d31d766394fc402a07f9336c059 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include "bitops.h"
 
index 15ad56a3f9052174a65b60076f408985a0eec0d8..2e20814d3ce3e8d15e887bad15224e39646c100d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_CPUFLAGS_H
 #define BOOT_CPUFLAGS_H
 
index 020f137df7a24dfbcc810283136655fb64708af6..8f5ef2994b5e2e8a8cb6f0d705a0175dd045eb3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_CTYPE_H
 #define BOOT_CTYPE_H
 
index f0b8d6d93164d8de8a7879ac6ef89343ad199a47..b25c53527a9409490ff4077ae3f12d96b53a669d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Serial port routines for use during early boot reporting. This code is
  * included from both the compressed kernel and the regular kernel.
index 1bb08ecffd24a61e1d9bccf2094e70996f280bce..9c7ea597eee682115481b2ceaaf55da1261ce1fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     header.S
  *
index f274a50db5faf8517a273665a29474784689fe7e..3d78e27077f414ef671643d44580ec015c936951 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BOOT_STRING_H
 #define BOOT_STRING_H
 
index 0702d2531bc7f441364adca7ebc2d0e1a227f0bd..d4e6cd4577e5dd526e76b1ed7b2b1d951b06a46d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 1997 Martin Mares
index 9e32d40d71bdb41fe3ac0c7461ae09c54ca1a3a3..5f07333bb224c12c8c8d23407faa1265db9afa7b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index 246c67006ed06ad84516b3a56ceac06e05734a1c..8c1fcb6bad21f91604f0b61357db834f560b7fdb 100644 (file)
@@ -33,7 +33,7 @@
 #define s3     ((16 + 2 + (3 * 256)) * 4)
 
 /* register macros */
-#define CTX %rdi
+#define CTX %r12
 #define RIO %rsi
 
 #define RX0 %rax
 #define RX2bh %ch
 #define RX3bh %dh
 
-#define RT0 %rbp
+#define RT0 %rdi
 #define RT1 %rsi
 #define RT2 %r8
 #define RT3 %r9
 
-#define RT0d %ebp
+#define RT0d %edi
 #define RT1d %esi
 #define RT2d %r8d
 #define RT3d %r9d
 
 ENTRY(__blowfish_enc_blk)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         *      %rcx: bool, if true: xor output
         */
-       movq %rbp, %r11;
+       movq %r12, %r11;
 
+       movq %rdi, CTX;
        movq %rsi, %r10;
        movq %rdx, RIO;
 
@@ -142,7 +143,7 @@ ENTRY(__blowfish_enc_blk)
        round_enc(14);
        add_roundkey_enc(16);
 
-       movq %r11, %rbp;
+       movq %r11, %r12;
 
        movq %r10, RIO;
        test %cl, %cl;
@@ -157,12 +158,13 @@ ENDPROC(__blowfish_enc_blk)
 
 ENTRY(blowfish_dec_blk)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
-       movq %rbp, %r11;
+       movq %r12, %r11;
 
+       movq %rdi, CTX;
        movq %rsi, %r10;
        movq %rdx, RIO;
 
@@ -181,7 +183,7 @@ ENTRY(blowfish_dec_blk)
        movq %r10, RIO;
        write_block();
 
-       movq %r11, %rbp;
+       movq %r11, %r12;
 
        ret;
 ENDPROC(blowfish_dec_blk)
@@ -298,20 +300,21 @@ ENDPROC(blowfish_dec_blk)
 
 ENTRY(__blowfish_enc_blk_4way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         *      %rcx: bool, if true: xor output
         */
-       pushq %rbp;
+       pushq %r12;
        pushq %rbx;
        pushq %rcx;
 
-       preload_roundkey_enc(0);
-
+       movq %rdi, CTX
        movq %rsi, %r11;
        movq %rdx, RIO;
 
+       preload_roundkey_enc(0);
+
        read_block4();
 
        round_enc4(0);
@@ -324,39 +327,40 @@ ENTRY(__blowfish_enc_blk_4way)
        round_enc4(14);
        add_preloaded_roundkey4();
 
-       popq %rbp;
+       popq %r12;
        movq %r11, RIO;
 
-       test %bpl, %bpl;
+       test %r12b, %r12b;
        jnz .L__enc_xor4;
 
        write_block4();
 
        popq %rbx;
-       popq %rbp;
+       popq %r12;
        ret;
 
 .L__enc_xor4:
        xor_block4();
 
        popq %rbx;
-       popq %rbp;
+       popq %r12;
        ret;
 ENDPROC(__blowfish_enc_blk_4way)
 
 ENTRY(blowfish_dec_blk_4way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
-       pushq %rbp;
+       pushq %r12;
        pushq %rbx;
-       preload_roundkey_dec(17);
 
-       movq %rsi, %r11;
+       movq %rdi, CTX;
+       movq %rsi, %r11
        movq %rdx, RIO;
 
+       preload_roundkey_dec(17);
        read_block4();
 
        round_dec4(17);
@@ -373,7 +377,7 @@ ENTRY(blowfish_dec_blk_4way)
        write_block4();
 
        popq %rbx;
-       popq %rbp;
+       popq %r12;
 
        ret;
 ENDPROC(blowfish_dec_blk_4way)
index 310319c601ede2884b2d031ca4603593f304e4b3..95ba6956a7f6a1fc0b01e2938f94cee0ff6a2ac3 100644 (file)
 #define RCD1bh %dh
 
 #define RT0 %rsi
-#define RT1 %rbp
+#define RT1 %r12
 #define RT2 %r8
 
 #define RT0d %esi
-#define RT1d %ebp
+#define RT1d %r12d
 #define RT2d %r8d
 
 #define RT2bl %r8b
 
 #define RXOR %r9
-#define RRBP %r10
+#define RR12 %r10
 #define RDST %r11
 
 #define RXORd %r9d
@@ -197,7 +197,7 @@ ENTRY(__camellia_enc_blk)
         *      %rdx: src
         *      %rcx: bool xor
         */
-       movq %rbp, RRBP;
+       movq %r12, RR12;
 
        movq %rcx, RXOR;
        movq %rsi, RDST;
@@ -227,13 +227,13 @@ ENTRY(__camellia_enc_blk)
 
        enc_outunpack(mov, RT1);
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        ret;
 
 .L__enc_xor:
        enc_outunpack(xor, RT1);
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        ret;
 ENDPROC(__camellia_enc_blk)
 
@@ -248,7 +248,7 @@ ENTRY(camellia_dec_blk)
        movl $24, RXORd;
        cmovel RXORd, RT2d; /* max */
 
-       movq %rbp, RRBP;
+       movq %r12, RR12;
        movq %rsi, RDST;
        movq %rdx, RIO;
 
@@ -271,7 +271,7 @@ ENTRY(camellia_dec_blk)
 
        dec_outunpack();
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        ret;
 ENDPROC(camellia_dec_blk)
 
@@ -433,7 +433,7 @@ ENTRY(__camellia_enc_blk_2way)
         */
        pushq %rbx;
 
-       movq %rbp, RRBP;
+       movq %r12, RR12;
        movq %rcx, RXOR;
        movq %rsi, RDST;
        movq %rdx, RIO;
@@ -461,14 +461,14 @@ ENTRY(__camellia_enc_blk_2way)
 
        enc_outunpack2(mov, RT2);
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        popq %rbx;
        ret;
 
 .L__enc2_xor:
        enc_outunpack2(xor, RT2);
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        popq %rbx;
        ret;
 ENDPROC(__camellia_enc_blk_2way)
@@ -485,7 +485,7 @@ ENTRY(camellia_dec_blk_2way)
        cmovel RXORd, RT2d; /* max */
 
        movq %rbx, RXOR;
-       movq %rbp, RRBP;
+       movq %r12, RR12;
        movq %rsi, RDST;
        movq %rdx, RIO;
 
@@ -508,7 +508,7 @@ ENTRY(camellia_dec_blk_2way)
 
        dec_outunpack2();
 
-       movq RRBP, %rbp;
+       movq RR12, %r12;
        movq RXOR, %rbx;
        ret;
 ENDPROC(camellia_dec_blk_2way)
index b4a8806234ea1c5f61f46898900a84035af72763..86107c961bb4627f08f6c7eac252589218c6c7e3 100644 (file)
@@ -47,7 +47,7 @@
 /**********************************************************************
   16-way AVX cast5
  **********************************************************************/
-#define CTX %rdi
+#define CTX %r15
 
 #define RL1 %xmm0
 #define RR1 %xmm1
@@ -70,8 +70,8 @@
 
 #define RTMP %xmm15
 
-#define RID1  %rbp
-#define RID1d %ebp
+#define RID1  %rdi
+#define RID1d %edi
 #define RID2  %rsi
 #define RID2d %esi
 
 .align 16
 __cast5_enc_blk16:
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      RL1: blocks 1 and 2
         *      RR1: blocks 3 and 4
         *      RL2: blocks 5 and 6
@@ -246,9 +246,11 @@ __cast5_enc_blk16:
         *      RR4: encrypted blocks 15 and 16
         */
 
-       pushq %rbp;
+       pushq %r15;
        pushq %rbx;
 
+       movq %rdi, CTX;
+
        vmovdqa .Lbswap_mask, RKM;
        vmovd .Lfirst_mask, R1ST;
        vmovd .L32_mask, R32;
@@ -283,7 +285,7 @@ __cast5_enc_blk16:
 
 .L__skip_enc:
        popq %rbx;
-       popq %rbp;
+       popq %r15;
 
        vmovdqa .Lbswap_mask, RKM;
 
@@ -298,7 +300,7 @@ ENDPROC(__cast5_enc_blk16)
 .align 16
 __cast5_dec_blk16:
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      RL1: encrypted blocks 1 and 2
         *      RR1: encrypted blocks 3 and 4
         *      RL2: encrypted blocks 5 and 6
@@ -318,9 +320,11 @@ __cast5_dec_blk16:
         *      RR4: decrypted blocks 15 and 16
         */
 
-       pushq %rbp;
+       pushq %r15;
        pushq %rbx;
 
+       movq %rdi, CTX;
+
        vmovdqa .Lbswap_mask, RKM;
        vmovd .Lfirst_mask, R1ST;
        vmovd .L32_mask, R32;
@@ -356,7 +360,7 @@ __cast5_dec_blk16:
 
        vmovdqa .Lbswap_mask, RKM;
        popq %rbx;
-       popq %rbp;
+       popq %r15;
 
        outunpack_blocks(RR1, RL1, RTMP, RX, RKM);
        outunpack_blocks(RR2, RL2, RTMP, RX, RKM);
@@ -372,12 +376,14 @@ ENDPROC(__cast5_dec_blk16)
 
 ENTRY(cast5_ecb_enc_16way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
        FRAME_BEGIN
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
 
        vmovdqu (0*4*4)(%rdx), RL1;
@@ -400,18 +406,22 @@ ENTRY(cast5_ecb_enc_16way)
        vmovdqu RR4, (6*4*4)(%r11);
        vmovdqu RL4, (7*4*4)(%r11);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast5_ecb_enc_16way)
 
 ENTRY(cast5_ecb_dec_16way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
 
        FRAME_BEGIN
+       pushq %r15;
+
+       movq %rdi, CTX;
        movq %rsi, %r11;
 
        vmovdqu (0*4*4)(%rdx), RL1;
@@ -434,20 +444,22 @@ ENTRY(cast5_ecb_dec_16way)
        vmovdqu RR4, (6*4*4)(%r11);
        vmovdqu RL4, (7*4*4)(%r11);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast5_ecb_dec_16way)
 
 ENTRY(cast5_cbc_dec_16way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
        FRAME_BEGIN
-
        pushq %r12;
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
        movq %rdx, %r12;
 
@@ -483,23 +495,24 @@ ENTRY(cast5_cbc_dec_16way)
        vmovdqu RR4, (6*16)(%r11);
        vmovdqu RL4, (7*16)(%r11);
 
+       popq %r15;
        popq %r12;
-
        FRAME_END
        ret;
 ENDPROC(cast5_cbc_dec_16way)
 
 ENTRY(cast5_ctr_16way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         *      %rcx: iv (big endian, 64bit)
         */
        FRAME_BEGIN
-
        pushq %r12;
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
        movq %rdx, %r12;
 
@@ -558,8 +571,8 @@ ENTRY(cast5_ctr_16way)
        vmovdqu RR4, (6*16)(%r11);
        vmovdqu RL4, (7*16)(%r11);
 
+       popq %r15;
        popq %r12;
-
        FRAME_END
        ret;
 ENDPROC(cast5_ctr_16way)
index 952d3156a93312ff8c5a5c2c193132a89f7413da..7f30b6f0d72c15f402a69d621ecde1c283780266 100644 (file)
@@ -47,7 +47,7 @@
 /**********************************************************************
   8-way AVX cast6
  **********************************************************************/
-#define CTX %rdi
+#define CTX %r15
 
 #define RA1 %xmm0
 #define RB1 %xmm1
@@ -70,8 +70,8 @@
 
 #define RTMP %xmm15
 
-#define RID1  %rbp
-#define RID1d %ebp
+#define RID1  %rdi
+#define RID1d %edi
 #define RID2  %rsi
 #define RID2d %esi
 
 .align 8
 __cast6_enc_blk8:
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: blocks
         * output:
         *      RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: encrypted blocks
         */
 
-       pushq %rbp;
+       pushq %r15;
        pushq %rbx;
 
+       movq %rdi, CTX;
+
        vmovdqa .Lbswap_mask, RKM;
        vmovd .Lfirst_mask, R1ST;
        vmovd .L32_mask, R32;
@@ -297,7 +299,7 @@ __cast6_enc_blk8:
        QBAR(11);
 
        popq %rbx;
-       popq %rbp;
+       popq %r15;
 
        vmovdqa .Lbswap_mask, RKM;
 
@@ -310,15 +312,17 @@ ENDPROC(__cast6_enc_blk8)
 .align 8
 __cast6_dec_blk8:
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: encrypted blocks
         * output:
         *      RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2: decrypted blocks
         */
 
-       pushq %rbp;
+       pushq %r15;
        pushq %rbx;
 
+       movq %rdi, CTX;
+
        vmovdqa .Lbswap_mask, RKM;
        vmovd .Lfirst_mask, R1ST;
        vmovd .L32_mask, R32;
@@ -343,7 +347,7 @@ __cast6_dec_blk8:
        QBAR(0);
 
        popq %rbx;
-       popq %rbp;
+       popq %r15;
 
        vmovdqa .Lbswap_mask, RKM;
        outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM);
@@ -354,12 +358,14 @@ ENDPROC(__cast6_dec_blk8)
 
 ENTRY(cast6_ecb_enc_8way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
        FRAME_BEGIN
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
 
        load_8way(%rdx, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -368,18 +374,21 @@ ENTRY(cast6_ecb_enc_8way)
 
        store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast6_ecb_enc_8way)
 
 ENTRY(cast6_ecb_dec_8way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
        FRAME_BEGIN
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
 
        load_8way(%rdx, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -388,20 +397,22 @@ ENTRY(cast6_ecb_dec_8way)
 
        store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast6_ecb_dec_8way)
 
 ENTRY(cast6_cbc_dec_8way)
        /* input:
-        *      %rdi: ctx, CTX
+        *      %rdi: ctx
         *      %rsi: dst
         *      %rdx: src
         */
        FRAME_BEGIN
-
        pushq %r12;
+       pushq %r15;
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
        movq %rdx, %r12;
 
@@ -411,8 +422,8 @@ ENTRY(cast6_cbc_dec_8way)
 
        store_cbc_8way(%r12, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        popq %r12;
-
        FRAME_END
        ret;
 ENDPROC(cast6_cbc_dec_8way)
@@ -425,9 +436,10 @@ ENTRY(cast6_ctr_8way)
         *      %rcx: iv (little endian, 128bit)
         */
        FRAME_BEGIN
-
        pushq %r12;
+       pushq %r15
 
+       movq %rdi, CTX;
        movq %rsi, %r11;
        movq %rdx, %r12;
 
@@ -438,8 +450,8 @@ ENTRY(cast6_ctr_8way)
 
        store_ctr_8way(%r12, %r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        popq %r12;
-
        FRAME_END
        ret;
 ENDPROC(cast6_ctr_8way)
@@ -452,7 +464,9 @@ ENTRY(cast6_xts_enc_8way)
         *      %rcx: iv (t ⊕ αⁿ ∈ GF(2¹²⁸))
         */
        FRAME_BEGIN
+       pushq %r15;
 
+       movq %rdi, CTX
        movq %rsi, %r11;
 
        /* regs <= src, dst <= IVs, regs <= regs xor IVs */
@@ -464,6 +478,7 @@ ENTRY(cast6_xts_enc_8way)
        /* dst <= regs xor IVs(in dst) */
        store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast6_xts_enc_8way)
@@ -476,7 +491,9 @@ ENTRY(cast6_xts_dec_8way)
         *      %rcx: iv (t ⊕ αⁿ ∈ GF(2¹²⁸))
         */
        FRAME_BEGIN
+       pushq %r15;
 
+       movq %rdi, CTX
        movq %rsi, %r11;
 
        /* regs <= src, dst <= IVs, regs <= regs xor IVs */
@@ -488,6 +505,7 @@ ENTRY(cast6_xts_dec_8way)
        /* dst <= regs xor IVs(in dst) */
        store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
 
+       popq %r15;
        FRAME_END
        ret;
 ENDPROC(cast6_xts_dec_8way)
index 3a2dc3dc6cac162bc51946bb08cf8da745c73f57..f3cd26f4833254cb0966f31a1afae8c5c9fc95a4 100644 (file)
@@ -45,7 +45,7 @@ ENTRY(chacha20_8block_xor_avx2)
 
        vzeroupper
        # 4 * 32 byte stack, 32-byte aligned
-       mov             %rsp, %r8
+       lea             8(%rsp),%r10
        and             $~31, %rsp
        sub             $0x80, %rsp
 
@@ -443,6 +443,6 @@ ENTRY(chacha20_8block_xor_avx2)
        vmovdqu         %ymm15,0x01e0(%rsi)
 
        vzeroupper
-       mov             %r8,%rsp
+       lea             -8(%r10),%rsp
        ret
 ENDPROC(chacha20_8block_xor_avx2)
index 3f511a7d73b897e2ea4560b6a5b2809c5e450255..512a2b500fd1813d1ffc4d74053ec137ecf865c5 100644 (file)
@@ -160,7 +160,7 @@ ENTRY(chacha20_4block_xor_ssse3)
        # done with the slightly better performing SSSE3 byte shuffling,
        # 7/12-bit word rotation uses traditional shift+OR.
 
-       mov             %rsp,%r11
+       lea             8(%rsp),%r10
        sub             $0x80,%rsp
        and             $~63,%rsp
 
@@ -625,6 +625,6 @@ ENTRY(chacha20_4block_xor_ssse3)
        pxor            %xmm1,%xmm15
        movdqu          %xmm15,0xf0(%rsi)
 
-       mov             %r11,%rsp
+       lea             -8(%r10),%rsp
        ret
 ENDPROC(chacha20_4block_xor_ssse3)
index f3e91647ca274a4b20d4b18f0d7232a3c8ca4567..8e49ce1174947ea612fca65a6d143cdc2386534e 100644 (file)
 #define RW2bh %ch
 
 #define RT0 %r15
-#define RT1 %rbp
+#define RT1 %rsi
 #define RT2 %r14
 #define RT3 %rdx
 
 #define RT0d %r15d
-#define RT1d %ebp
+#define RT1d %esi
 #define RT2d %r14d
 #define RT3d %edx
 
@@ -177,13 +177,14 @@ ENTRY(des3_ede_x86_64_crypt_blk)
         *      %rsi: dst
         *      %rdx: src
         */
-       pushq %rbp;
        pushq %rbx;
        pushq %r12;
        pushq %r13;
        pushq %r14;
        pushq %r15;
 
+       pushq %rsi; /* dst */
+
        read_block(%rdx, RL0, RR0);
        initial_permutation(RL0, RR0);
 
@@ -241,6 +242,8 @@ ENTRY(des3_ede_x86_64_crypt_blk)
        round1(32+15, RL0, RR0, dummy2);
 
        final_permutation(RR0, RL0);
+
+       popq %rsi /* dst */
        write_block(%rsi, RR0, RL0);
 
        popq %r15;
@@ -248,7 +251,6 @@ ENTRY(des3_ede_x86_64_crypt_blk)
        popq %r13;
        popq %r12;
        popq %rbx;
-       popq %rbp;
 
        ret;
 ENDPROC(des3_ede_x86_64_crypt_blk)
@@ -432,13 +434,14 @@ ENTRY(des3_ede_x86_64_crypt_blk_3way)
         *      %rdx: src (3 blocks)
         */
 
-       pushq %rbp;
        pushq %rbx;
        pushq %r12;
        pushq %r13;
        pushq %r14;
        pushq %r15;
 
+       pushq %rsi /* dst */
+
        /* load input */
        movl 0 * 4(%rdx), RL0d;
        movl 1 * 4(%rdx), RR0d;
@@ -520,6 +523,7 @@ ENTRY(des3_ede_x86_64_crypt_blk_3way)
        bswapl RR2d;
        bswapl RL2d;
 
+       popq %rsi /* dst */
        movl RR0d, 0 * 4(%rsi);
        movl RL0d, 1 * 4(%rsi);
        movl RR1d, 2 * 4(%rsi);
@@ -532,7 +536,6 @@ ENTRY(des3_ede_x86_64_crypt_blk_3way)
        popq %r13;
        popq %r12;
        popq %rbx;
-       popq %rbp;
 
        ret;
 ENDPROC(des3_ede_x86_64_crypt_blk_3way)
index 9279e0b2d60ec85fc89f1c23cb7287f64531b4a0..10db30d58006c32576339074cfc0fd2a834cdf80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 # enter salsa20_encrypt_bytes
index 2e14acc3da25b5cc65873fa93551f8a234cbe2ef..815ded3ba90e57685dd7176c9f23c73a6bc0cabe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index 1eab79c9ac484172a63d9cc0c4a409b7fffe7e8b..9f712a7dfd797cc499e1ef52ba7999078530494a 100644 (file)
@@ -89,7 +89,7 @@
 #define        REG_RE  %rdx
 #define        REG_RTA %r12
 #define        REG_RTB %rbx
-#define        REG_T1  %ebp
+#define        REG_T1  %r11d
 #define        xmm_mov vmovups
 #define        avx2_zeroupper  vzeroupper
 #define        RND_F1  1
@@ -637,7 +637,6 @@ _loop3:
        ENTRY(\name)
 
        push    %rbx
-       push    %rbp
        push    %r12
        push    %r13
        push    %r14
@@ -673,7 +672,6 @@ _loop3:
        pop     %r14
        pop     %r13
        pop     %r12
-       pop     %rbp
        pop     %rbx
 
        ret
index a4109506a5e8884ba54562aed09bc36e5e800d12..6204bd53528c65c0d4a70f05e76a60bcc476499e 100644 (file)
@@ -37,7 +37,7 @@
 #define REG_A  %ecx
 #define REG_B  %esi
 #define REG_C  %edi
-#define REG_D  %ebp
+#define REG_D  %r12d
 #define REG_E  %edx
 
 #define REG_T1 %eax
        ENTRY(\name)
 
        push    %rbx
-       push    %rbp
        push    %r12
+       push    %rbp
+       mov     %rsp, %rbp
 
-       mov     %rsp, %r12
        sub     $64, %rsp               # allocate workspace
        and     $~15, %rsp              # align stack
 
        xor     %rax, %rax
        rep stosq
 
-       mov     %r12, %rsp              # deallocate workspace
-
-       pop     %r12
+       mov     %rbp, %rsp              # deallocate workspace
        pop     %rbp
+       pop     %r12
        pop     %rbx
        ret
 
index e08888a1a5f2cf5f8a6809d86d497664cece52a1..001bbcf93c79ba08628abcf30dd49ad77158420d 100644 (file)
@@ -103,7 +103,7 @@ SRND = %rsi       # clobbers INP
 c = %ecx
 d = %r8d
 e = %edx
-TBL = %rbp
+TBL = %r12
 a = %eax
 b = %ebx
 
@@ -350,13 +350,13 @@ a = TMP_
 ENTRY(sha256_transform_avx)
 .align 32
        pushq   %rbx
-       pushq   %rbp
+       pushq   %r12
        pushq   %r13
        pushq   %r14
        pushq   %r15
-       pushq   %r12
+       pushq   %rbp
+       movq    %rsp, %rbp
 
-       mov     %rsp, %r12
        subq    $STACK_SIZE, %rsp       # allocate stack space
        and     $~15, %rsp              # align stack pointer
 
@@ -452,13 +452,12 @@ loop2:
 
 done_hash:
 
-       mov     %r12, %rsp
-
-       popq    %r12
+       mov     %rbp, %rsp
+       popq    %rbp
        popq    %r15
        popq    %r14
        popq    %r13
-       popq    %rbp
+       popq    %r12
        popq    %rbx
        ret
 ENDPROC(sha256_transform_avx)
index 89c8f09787d20552c12230ded345282bb2f2bf42..1420db15dcddc8505b57faad5e6e6701f972b517 100644 (file)
@@ -98,8 +98,6 @@ d     = %r8d
 e       = %edx # clobbers NUM_BLKS
 y3     = %esi  # clobbers INP
 
-
-TBL    = %rbp
 SRND   = CTX   # SRND is same register as CTX
 
 a = %eax
@@ -531,7 +529,6 @@ STACK_SIZE  = _RSP      + _RSP_SIZE
 ENTRY(sha256_transform_rorx)
 .align 32
        pushq   %rbx
-       pushq   %rbp
        pushq   %r12
        pushq   %r13
        pushq   %r14
@@ -568,8 +565,6 @@ ENTRY(sha256_transform_rorx)
        mov     CTX, _CTX(%rsp)
 
 loop0:
-       lea     K256(%rip), TBL
-
        ## Load first 16 dwords from two blocks
        VMOVDQ  0*32(INP),XTMP0
        VMOVDQ  1*32(INP),XTMP1
@@ -597,19 +592,19 @@ last_block_enter:
 
 .align 16
 loop1:
-       vpaddd  0*32(TBL, SRND), X0, XFER
+       vpaddd  K256+0*32(SRND), X0, XFER
        vmovdqa XFER, 0*32+_XFER(%rsp, SRND)
        FOUR_ROUNDS_AND_SCHED   _XFER + 0*32
 
-       vpaddd  1*32(TBL, SRND), X0, XFER
+       vpaddd  K256+1*32(SRND), X0, XFER
        vmovdqa XFER, 1*32+_XFER(%rsp, SRND)
        FOUR_ROUNDS_AND_SCHED   _XFER + 1*32
 
-       vpaddd  2*32(TBL, SRND), X0, XFER
+       vpaddd  K256+2*32(SRND), X0, XFER
        vmovdqa XFER, 2*32+_XFER(%rsp, SRND)
        FOUR_ROUNDS_AND_SCHED   _XFER + 2*32
 
-       vpaddd  3*32(TBL, SRND), X0, XFER
+       vpaddd  K256+3*32(SRND), X0, XFER
        vmovdqa XFER, 3*32+_XFER(%rsp, SRND)
        FOUR_ROUNDS_AND_SCHED   _XFER + 3*32
 
@@ -619,10 +614,11 @@ loop1:
 
 loop2:
        ## Do last 16 rounds with no scheduling
-       vpaddd  0*32(TBL, SRND), X0, XFER
+       vpaddd  K256+0*32(SRND), X0, XFER
        vmovdqa XFER, 0*32+_XFER(%rsp, SRND)
        DO_4ROUNDS      _XFER + 0*32
-       vpaddd  1*32(TBL, SRND), X1, XFER
+
+       vpaddd  K256+1*32(SRND), X1, XFER
        vmovdqa XFER, 1*32+_XFER(%rsp, SRND)
        DO_4ROUNDS      _XFER + 1*32
        add     $2*32, SRND
@@ -676,9 +672,6 @@ loop3:
        ja      done_hash
 
 do_last_block:
-       #### do last block
-       lea     K256(%rip), TBL
-
        VMOVDQ  0*16(INP),XWORD0
        VMOVDQ  1*16(INP),XWORD1
        VMOVDQ  2*16(INP),XWORD2
@@ -718,7 +711,6 @@ done_hash:
        popq    %r14
        popq    %r13
        popq    %r12
-       popq    %rbp
        popq    %rbx
        ret
 ENDPROC(sha256_transform_rorx)
index 45b4fca6c4a8fef15e45c2673fe04c5ffa54479b..53ad6e7db747948077986ab721a234c8877f09f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index 39b83c93e7fd6cdbc658a35ef4698756cccef612..c6c05ed2c16a593390ddf7617070f45e58a40ad4 100644 (file)
@@ -95,7 +95,7 @@ SRND = %rsi       # clobbers INP
 c = %ecx
 d = %r8d
 e = %edx
-TBL = %rbp
+TBL = %r12
 a = %eax
 b = %ebx
 
@@ -356,13 +356,13 @@ a = TMP_
 ENTRY(sha256_transform_ssse3)
 .align 32
        pushq   %rbx
-       pushq   %rbp
+       pushq   %r12
        pushq   %r13
        pushq   %r14
        pushq   %r15
-       pushq   %r12
+       pushq   %rbp
+       mov     %rsp, %rbp
 
-       mov     %rsp, %r12
        subq    $STACK_SIZE, %rsp
        and     $~15, %rsp
 
@@ -462,13 +462,12 @@ loop2:
 
 done_hash:
 
-       mov     %r12, %rsp
-
-       popq    %r12
+       mov     %rbp, %rsp
+       popq    %rbp
        popq    %r15
        popq    %r14
        popq    %r13
-       popq    %rbp
+       popq    %r12
        popq    %rbx
 
        ret
index 7f5f6c6ec72e9cb0a47c2b5babbbedff487fbbf3..b16d560051629a1c6d518321b93be2672b861c9e 100644 (file)
@@ -69,8 +69,9 @@ XFER  = YTMP0
 
 BYTE_FLIP_MASK  = %ymm9
 
-# 1st arg
-CTX         = %rdi
+# 1st arg is %rdi, which is saved to the stack and accessed later via %r12
+CTX1        = %rdi
+CTX2        = %r12
 # 2nd arg
 INP         = %rsi
 # 3rd arg
@@ -81,7 +82,7 @@ d           = %r8
 e           = %rdx
 y3          = %rsi
 
-TBL   = %rbp
+TBL   = %rdi # clobbers CTX1
 
 a     = %rax
 b     = %rbx
@@ -91,26 +92,26 @@ g     = %r10
 h     = %r11
 old_h = %r11
 
-T1    = %r12
+T1    = %r12 # clobbers CTX2
 y0    = %r13
 y1    = %r14
 y2    = %r15
 
-y4    = %r12
-
 # Local variables (stack frame)
 XFER_SIZE = 4*8
 SRND_SIZE = 1*8
 INP_SIZE = 1*8
 INPEND_SIZE = 1*8
+CTX_SIZE = 1*8
 RSPSAVE_SIZE = 1*8
-GPRSAVE_SIZE = 6*8
+GPRSAVE_SIZE = 5*8
 
 frame_XFER = 0
 frame_SRND = frame_XFER + XFER_SIZE
 frame_INP = frame_SRND + SRND_SIZE
 frame_INPEND = frame_INP + INP_SIZE
-frame_RSPSAVE = frame_INPEND + INPEND_SIZE
+frame_CTX = frame_INPEND + INPEND_SIZE
+frame_RSPSAVE = frame_CTX + CTX_SIZE
 frame_GPRSAVE = frame_RSPSAVE + RSPSAVE_SIZE
 frame_size = frame_GPRSAVE + GPRSAVE_SIZE
 
@@ -576,12 +577,11 @@ ENTRY(sha512_transform_rorx)
        mov     %rax, frame_RSPSAVE(%rsp)
 
        # Save GPRs
-       mov     %rbp, frame_GPRSAVE(%rsp)
-       mov     %rbx, 8*1+frame_GPRSAVE(%rsp)
-       mov     %r12, 8*2+frame_GPRSAVE(%rsp)
-       mov     %r13, 8*3+frame_GPRSAVE(%rsp)
-       mov     %r14, 8*4+frame_GPRSAVE(%rsp)
-       mov     %r15, 8*5+frame_GPRSAVE(%rsp)
+       mov     %rbx, 8*0+frame_GPRSAVE(%rsp)
+       mov     %r12, 8*1+frame_GPRSAVE(%rsp)
+       mov     %r13, 8*2+frame_GPRSAVE(%rsp)
+       mov     %r14, 8*3+frame_GPRSAVE(%rsp)
+       mov     %r15, 8*4+frame_GPRSAVE(%rsp)
 
        shl     $7, NUM_BLKS    # convert to bytes
        jz      done_hash
@@ -589,14 +589,17 @@ ENTRY(sha512_transform_rorx)
        mov     NUM_BLKS, frame_INPEND(%rsp)
 
        ## load initial digest
-       mov     8*0(CTX),a
-       mov     8*1(CTX),b
-       mov     8*2(CTX),c
-       mov     8*3(CTX),d
-       mov     8*4(CTX),e
-       mov     8*5(CTX),f
-       mov     8*6(CTX),g
-       mov     8*7(CTX),h
+       mov     8*0(CTX1), a
+       mov     8*1(CTX1), b
+       mov     8*2(CTX1), c
+       mov     8*3(CTX1), d
+       mov     8*4(CTX1), e
+       mov     8*5(CTX1), f
+       mov     8*6(CTX1), g
+       mov     8*7(CTX1), h
+
+       # save %rdi (CTX) before it gets clobbered
+       mov     %rdi, frame_CTX(%rsp)
 
        vmovdqa PSHUFFLE_BYTE_FLIP_MASK(%rip), BYTE_FLIP_MASK
 
@@ -652,14 +655,15 @@ loop2:
        subq    $1, frame_SRND(%rsp)
        jne     loop2
 
-       addm    8*0(CTX),a
-       addm    8*1(CTX),b
-       addm    8*2(CTX),c
-       addm    8*3(CTX),d
-       addm    8*4(CTX),e
-       addm    8*5(CTX),f
-       addm    8*6(CTX),g
-       addm    8*7(CTX),h
+       mov     frame_CTX(%rsp), CTX2
+       addm    8*0(CTX2), a
+       addm    8*1(CTX2), b
+       addm    8*2(CTX2), c
+       addm    8*3(CTX2), d
+       addm    8*4(CTX2), e
+       addm    8*5(CTX2), f
+       addm    8*6(CTX2), g
+       addm    8*7(CTX2), h
 
        mov     frame_INP(%rsp), INP
        add     $128, INP
@@ -669,12 +673,11 @@ loop2:
 done_hash:
 
 # Restore GPRs
-       mov     frame_GPRSAVE(%rsp)     ,%rbp
-       mov     8*1+frame_GPRSAVE(%rsp) ,%rbx
-       mov     8*2+frame_GPRSAVE(%rsp) ,%r12
-       mov     8*3+frame_GPRSAVE(%rsp) ,%r13
-       mov     8*4+frame_GPRSAVE(%rsp) ,%r14
-       mov     8*5+frame_GPRSAVE(%rsp) ,%r15
+       mov     8*0+frame_GPRSAVE(%rsp), %rbx
+       mov     8*1+frame_GPRSAVE(%rsp), %r12
+       mov     8*2+frame_GPRSAVE(%rsp), %r13
+       mov     8*3+frame_GPRSAVE(%rsp), %r14
+       mov     8*4+frame_GPRSAVE(%rsp), %r15
 
        # Restore Stack Pointer
        mov     frame_RSPSAVE(%rsp), %rsp
index 0a57e21039809bd08e5370e7ba7db9da79191ad0..90f1ef69152ebe36064aa92d926a4f2b147d56b9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Arch-specific CryptoAPI modules.
 #
index b3f49d2863480334e8b2d12828e4ca20045b8be9..73b471da36226386112a23c0036b7f5da14b3266 100644 (file)
@@ -76,8 +76,8 @@
 #define RT %xmm14
 #define RR %xmm15
 
-#define RID1  %rbp
-#define RID1d %ebp
+#define RID1  %r13
+#define RID1d %r13d
 #define RID2  %rsi
 #define RID2d %esi
 
@@ -259,7 +259,7 @@ __twofish_enc_blk8:
 
        vmovdqu w(CTX), RK1;
 
-       pushq %rbp;
+       pushq %r13;
        pushq %rbx;
        pushq %rcx;
 
@@ -282,7 +282,7 @@ __twofish_enc_blk8:
 
        popq %rcx;
        popq %rbx;
-       popq %rbp;
+       popq %r13;
 
        outunpack_blocks(RC1, RD1, RA1, RB1, RK1, RX0, RY0, RK2);
        outunpack_blocks(RC2, RD2, RA2, RB2, RK1, RX0, RY0, RK2);
@@ -301,7 +301,7 @@ __twofish_dec_blk8:
 
        vmovdqu (w+4*4)(CTX), RK1;
 
-       pushq %rbp;
+       pushq %r13;
        pushq %rbx;
 
        inpack_blocks(RC1, RD1, RA1, RB1, RK1, RX0, RY0, RK2);
@@ -322,7 +322,7 @@ __twofish_dec_blk8:
        vmovdqu (w)(CTX), RK1;
 
        popq %rbx;
-       popq %rbp;
+       popq %r13;
 
        outunpack_blocks(RA1, RB1, RC1, RD1, RK1, RX0, RY0, RK2);
        outunpack_blocks(RA2, RB2, RC2, RD2, RK1, RX0, RY0, RK2);
index af28a8a24366b9ba9365726f17cf4745dcf5823b..06fc70cf5433df90a924471fb023a6366bdd826a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the x86 low level entry code
 #
index 640aafebdc00e460687a796f5011c1ab917a4ab9..6e160031cfea1d3afd65880f0b6477cc5ff8115e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/jump_label.h>
 #include <asm/unwind_hints.h>
 
index 8a13d468635a8f56f772a6879d3e907a1945dd6a..4838037f97f6edffda62b5b045c837fcc29402f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1991,1992  Linus Torvalds
  *
 /*
  * This is a sneaky trick to help the unwinder find pt_regs on the stack.  The
  * frame pointer is replaced with an encoded pointer to pt_regs.  The encoding
- * is just setting the LSB, which makes it an invalid stack address and is also
+ * is just clearing the MSB, which makes it an invalid stack address and is also
  * a signal to the unwinder that it's a pt_regs pointer in disguise.
  *
  * NOTE: This macro must be used *after* SAVE_ALL because it corrupts the
 .macro ENCODE_FRAME_POINTER
 #ifdef CONFIG_FRAME_POINTER
        mov %esp, %ebp
-       orl $0x1, %ebp
+       andl $0x7fffffff, %ebp
 #endif
 .endm
 
index 49167258d587570673c5e515cb00b4d8f26263b7..bcfc5668dcb22f303b21c7a636273c46274835c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/x86_64/entry.S
  *
@@ -808,7 +809,7 @@ apicinterrupt IRQ_WORK_VECTOR                       irq_work_interrupt              smp_irq_work_interrupt
 
 .macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
 ENTRY(\sym)
-       UNWIND_HINT_IRET_REGS offset=8
+       UNWIND_HINT_IRET_REGS offset=\has_error_code*8
 
        /* Sanity check */
        .if \shift_ist != -1 && \paranoid == 0
index e26c25ca77565938fb9ca4d16b08c3bcf4f48264..b5c7a56ed256d4cb12d55a18bdaa045229b8093d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Compatibility mode system call entry point for x86-64.
  *
index 8f895ee13a1cbfa1f1666a251471d29d2db01ea2..95c2949636129e057976714a738d058baa3a242c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* System call table for i386. */
 
 #include <linux/linkage.h>
index 9dbc5abb6162fa20581069499667a8c49b254868..9c09775e589d67ab574b6412b02a1899f26a4a0d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* System call table for x86-64. */
 
 #include <linux/linkage.h>
index 57aa59fd140c0079d8b6a50add515c3df9ab7ace..331f1dca5085443987254d96fda3ec5477f5ecc7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 out := $(obj)/../../include/generated/asm
 uapi := $(obj)/../../include/generated/uapi/asm
 
index 31fd5f1f38f7618d733a162a4828d8ade9de069f..12fbbcfe7ef353109f42b6e8b827be19f1e3b910 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 in="$1"
 out="$2"
index 751d1f992630bcff0665526d4137de607628fcf7..d71ef4bd361545cb0d5f134f6a3655216ec3c88e 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 in="$1"
 out="$2"
index d5409660f5de6f7dcef0066e8cf6be93c2ad59d7..c366c0adeb40da1ae311a2906087c4a73f730af4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Building vDSO images for x86.
 #
index 8ebb4b6454fed6131511a3ee6a62f55ebf3de049..acfd5ba7d943fed7016f344b6a30becae7e8549e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/vdso.h>
 
 /*
index 6807932643c20e25d4e366e7fc5cc967a71e5e51..d3a2dce4cfa96d0d64b36563f5af0bd57d13573e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for 64-bit vDSO.
  * We #include the file to define the layout details.
index 3dab75f2a6732f6ab7e5050152b364b289fd2ced..fa847a620f40f2993005ba10f127a50aafca2c59 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is included twice from vdso2c.c.  It generates code for 32-bit
  * and 64-bit vDSOs.  We need both for 64-bit builds, since 32-bit vDSOs
index 3f9d1a83891adf9f47cba058078b447fb1de7ecf..42d4c89f990ed1d752b24c641329671587313ba0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) Copyright 2002 Linus Torvalds
  * Portions based on the vdso-randomization code from exec-shield:
index c83f257346966dc170f953bba1399f94ffc20742..9fd51f206314cbf09deb7a09efe5950e9542547f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
  * Here we can supply some information useful to userland.
index 20633e026e82cc4b9a28d6698394cab37ec096a8..c3233ee98a6b9399ef2cfcbdb6e5ff030fb9c617 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/unistd_32.h>
 #include <asm/asm-offsets.h>
index ed4bc9731cbbc72c64aa6431100f6c80816f62a5..263d7433dea8587b237aefc184a0247a4fac1fbf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * AT_SYSINFO entry point
 */
index 87a86e017f0e880c7e4d1adc431b6fe9a2ee9a17..7780bbfb06ef2da78c6a82d4978ac467899873d2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define BUILD_VDSO32
 
 #ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
index 31056cf294bf99cb66cbb608fa4522d00dcfbf87..422764a81d324223e25757f90c081fd2b5d272ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for 32-bit vDSO.
  * We #include the file to define the layout details.
index 697c11ece90c0ac6ba5e2c8b0b2b9be8c7ada752..05cd1c5c4a1575c5eb64d0757aebc7229dc5c1ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for x32 vDSO.
  * We #include the file to define the layout details.
index ce1d7534fa530a71b1ce81c5f1548514beb95e70..f279ba2643dc8933b9659242082e7ef2ea2d9dd6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2012-2014 Andy Lutomirski <luto@amacapital.net>
  *
index 0fb3a104ac626b07e0a4e604a8ebf36764bea2cf..e1216dd95c04aa5cbaa6888a1d9f01d6246b21ce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
  *  Copyright 2003 Andi Kleen, SuSE Labs.
index 9dd7359a38a847352c1c60292c29710ec1ea99d0..3c3f9765a85c65d84eb4cbeb396a2c676fd40de8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM vsyscall
 
index 98397db5ceaece5e6531da82db5328ecff28033a..9a7a1446cb3a0ebc4993f19b0c690ad4e5bd55e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Performance monitoring"
 
 config PERF_EVENTS_INTEL_UNCORE
index b1da46f396e0c0837caab5da1a9d97783241236d..fe8795a67385a5deda3a5ee145b2778607fe1046 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CPU_SUP_AMD)              += core.o uncore.o
 obj-$(CONFIG_PERF_EVENTS_AMD_POWER)    += power.o
 obj-$(CONFIG_X86_LOCAL_APIC)           += ibs.o
index e9d8520a801aa548764410e4ea914839953ee802..3468b0c1dc7c9553a50eb65836ce777bf0e8ea64 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CPU_SUP_INTEL)            += core.o bts.o
 obj-$(CONFIG_CPU_SUP_INTEL)            += ds.o knc.o
 obj-$(CONFIG_CPU_SUP_INTEL)            += lbr.o p4.o p6.o pt.o
index 16076eb34699691ce8d150ae82fc93b34d46b895..141e07b0621689e745582599c009f4af1d053c6c 100644 (file)
@@ -546,9 +546,6 @@ static int bts_event_init(struct perf_event *event)
        if (event->attr.type != bts_pmu.type)
                return -ENOENT;
 
-       if (x86_add_exclusive(x86_lbr_exclusive_bts))
-               return -EBUSY;
-
        /*
         * BTS leaks kernel addresses even when CPL0 tracing is
         * disabled, so disallow intel_bts driver for unprivileged
@@ -562,6 +559,9 @@ static int bts_event_init(struct perf_event *event)
            !capable(CAP_SYS_ADMIN))
                return -EACCES;
 
+       if (x86_add_exclusive(x86_lbr_exclusive_bts))
+               return -EBUSY;
+
        ret = x86_reserve_hardware();
        if (ret) {
                x86_del_exclusive(x86_lbr_exclusive_bts);
index 829e89cfcee2deff8b937806b16dd573d736a895..9fb9a1f1e47bd0d0db3f9be9d4722f956d48dcfe 100644 (file)
@@ -4409,10 +4409,9 @@ static __init int fixup_ht_bug(void)
                return 0;
        }
 
-       if (lockup_detector_suspend() != 0) {
-               pr_debug("failed to disable PMU erratum BJ122, BV98, HSD29 workaround\n");
-               return 0;
-       }
+       cpus_read_lock();
+
+       hardlockup_detector_perf_stop();
 
        x86_pmu.flags &= ~(PMU_FL_EXCL_CNTRS | PMU_FL_EXCL_ENABLED);
 
@@ -4420,9 +4419,7 @@ static __init int fixup_ht_bug(void)
        x86_pmu.commit_scheduling = NULL;
        x86_pmu.stop_scheduling = NULL;
 
-       lockup_detector_resume();
-
-       cpus_read_lock();
+       hardlockup_detector_perf_restart();
 
        for_each_online_cpu(c)
                free_excl_cntrs(c);
index 4cf100ff2a3746f440049dd5c27c254e4dcc1776..72db0664a53dfd6fe64512ebda83caaa97db1abd 100644 (file)
@@ -552,6 +552,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
 
        X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_MOBILE,  snb_cstates),
        X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_DESKTOP, snb_cstates),
+       X86_CSTATES_MODEL(INTEL_FAM6_SKYLAKE_X, snb_cstates),
 
        X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_MOBILE,  snb_cstates),
        X86_CSTATES_MODEL(INTEL_FAM6_KABYLAKE_DESKTOP, snb_cstates),
@@ -560,6 +561,9 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
        X86_CSTATES_MODEL(INTEL_FAM6_XEON_PHI_KNM, knl_cstates),
 
        X86_CSTATES_MODEL(INTEL_FAM6_ATOM_GOLDMONT, glm_cstates),
+       X86_CSTATES_MODEL(INTEL_FAM6_ATOM_DENVERTON, glm_cstates),
+
+       X86_CSTATES_MODEL(INTEL_FAM6_ATOM_GEMINI_LAKE, glm_cstates),
        { },
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);
index e1965e5ff570835be004e753a718858473bc8325..3674a4b6f8bd0c5f12223b8f5c16067a933450df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/slab.h>
index 548d5f774b07e22bec6a2833cce46384c70a9586..618001c208e81c185b530053070b69bcbd5b2205 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Driver for Intel Xeon Phi "Knights Corner" PMU */
 
 #include <linux/perf_event.h>
index 8a6bbacd17dcfb077e2a910b5b532c1d24a4a623..ae64d0b69729dbb23c436d6c3bbf360a3cafb53b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/perf_event.h>
 #include <linux/types.h>
 
index 1f5c47ab4c65505bd0be4752cff667b5adaba7d4..a5604c3529308b7cfc1dc336a8d53496d531659b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/perf_event.h>
 #include <linux/types.h>
 
index 8e2457cb6b4a416e1c84d9baa990ea512ec74ba0..005908ee9333f0e87cdd4db7ca14a278d52fa773 100644 (file)
@@ -775,6 +775,9 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_KABYLAKE_DESKTOP, skl_rapl_init),
 
        X86_RAPL_MODEL_MATCH(INTEL_FAM6_ATOM_GOLDMONT, hsw_rapl_init),
+       X86_RAPL_MODEL_MATCH(INTEL_FAM6_ATOM_DENVERTON, hsw_rapl_init),
+
+       X86_RAPL_MODEL_MATCH(INTEL_FAM6_ATOM_GEMINI_LAKE, hsw_rapl_init),
        {},
 };
 
index 1c5390f1cf0992787afa8d34bb361f622b00dcb2..d45e06346f14d8636f1b4348a84a6e503012c686 100644 (file)
@@ -822,7 +822,7 @@ static int __init uncore_type_init(struct intel_uncore_type *type, bool setid)
                pmus[i].type    = type;
                pmus[i].boxes   = kzalloc(size, GFP_KERNEL);
                if (!pmus[i].boxes)
-                       return -ENOMEM;
+                       goto err;
        }
 
        type->pmus = pmus;
@@ -836,7 +836,7 @@ static int __init uncore_type_init(struct intel_uncore_type *type, bool setid)
                attr_group = kzalloc(sizeof(struct attribute *) * (i + 1) +
                                        sizeof(*attr_group), GFP_KERNEL);
                if (!attr_group)
-                       return -ENOMEM;
+                       goto err;
 
                attrs = (struct attribute **)(attr_group + 1);
                attr_group->name = "events";
@@ -849,7 +849,15 @@ static int __init uncore_type_init(struct intel_uncore_type *type, bool setid)
        }
 
        type->pmu_group = &uncore_pmu_attr_group;
+
        return 0;
+
+err:
+       for (i = 0; i < type->num_boxes; i++)
+               kfree(pmus[i].boxes);
+       kfree(pmus);
+
+       return -ENOMEM;
 }
 
 static int __init
index df5989f27b1b6508404af774c55953f5c9b082c4..4364191e7c6b2904a443bf2a522ca4445b7f0a12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/slab.h>
 #include <linux/pci.h>
 #include <asm/apicdef.h>
index 6a5cbe90f8593eb23a7a403132240fc9afc87c9d..93e7a8397cde249625a624ffa2c3f248f3b21009 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Nehalem-EX/Westmere-EX uncore support */
 #include "uncore.h"
 
index db1127ce685eb8ea687bb4e0279f13ad5706a59f..aee5e8496be4b7e409e3db3e51898f3bfc1671d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Nehalem/SandBridge/Haswell/Broadwell/Skylake uncore support */
 #include "uncore.h"
 
index db1fe377e6dd9ddfcfbc006a7346879f263d408a..95cb19f4e06f03376b03a5a27c59f7e6612167e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* SandyBridge-EP/IvyTown uncore support */
 #include "uncore.h"
 
@@ -3462,7 +3463,7 @@ static struct intel_uncore_ops skx_uncore_iio_ops = {
 static struct intel_uncore_type skx_uncore_iio = {
        .name                   = "iio",
        .num_counters           = 4,
-       .num_boxes              = 5,
+       .num_boxes              = 6,
        .perf_ctr_bits          = 48,
        .event_ctl              = SKX_IIO0_MSR_PMON_CTL0,
        .perf_ctr               = SKX_IIO0_MSR_PMON_CTR0,
@@ -3492,7 +3493,7 @@ static const struct attribute_group skx_uncore_format_group = {
 static struct intel_uncore_type skx_uncore_irp = {
        .name                   = "irp",
        .num_counters           = 2,
-       .num_boxes              = 5,
+       .num_boxes              = 6,
        .perf_ctr_bits          = 48,
        .event_ctl              = SKX_IRP0_MSR_PMON_CTL0,
        .perf_ctr               = SKX_IRP0_MSR_PMON_CTR0,
index 4bb3ec69e8ea10537c25ef2d792be94f1d7a4127..14efaa0e8684144989adb75e1b4dda0ee06ba203 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/perf_event.h>
 #include <asm/intel-family.h>
 
@@ -63,6 +64,14 @@ static bool test_intel(int idx)
        case INTEL_FAM6_ATOM_SILVERMONT1:
        case INTEL_FAM6_ATOM_SILVERMONT2:
        case INTEL_FAM6_ATOM_AIRMONT:
+
+       case INTEL_FAM6_ATOM_GOLDMONT:
+       case INTEL_FAM6_ATOM_DENVERTON:
+
+       case INTEL_FAM6_ATOM_GEMINI_LAKE:
+
+       case INTEL_FAM6_XEON_PHI_KNL:
+       case INTEL_FAM6_XEON_PHI_KNM:
                if (idx == PERF_MSR_SMI)
                        return true;
                break;
index 1a8eb550c40f13d8f4f4f5d049e09d323a2bb185..a5db63f728a2f985bde0f1b98f87be4537913cdc 100644 (file)
@@ -85,6 +85,8 @@ EXPORT_SYMBOL_GPL(hyperv_cs);
 u32 *hv_vp_index;
 EXPORT_SYMBOL_GPL(hv_vp_index);
 
+u32 hv_max_vp_index;
+
 static int hv_cpu_init(unsigned int cpu)
 {
        u64 msr_vp_index;
@@ -93,6 +95,9 @@ static int hv_cpu_init(unsigned int cpu)
 
        hv_vp_index[smp_processor_id()] = msr_vp_index;
 
+       if (msr_vp_index > hv_max_vp_index)
+               hv_max_vp_index = msr_vp_index;
+
        return 0;
 }
 
index 39e7f6e50919117087fe663e013cd77d12b16b7b..9cc9e1c1e2dbcf6047c9ebd37f280c66b9e7e29a 100644 (file)
@@ -36,9 +36,9 @@ struct hv_flush_pcpu_ex {
 /* Each gva in gva_list encodes up to 4096 pages to flush */
 #define HV_TLB_FLUSH_UNIT (4096 * PAGE_SIZE)
 
-static struct hv_flush_pcpu __percpu *pcpu_flush;
+static struct hv_flush_pcpu __percpu **pcpu_flush;
 
-static struct hv_flush_pcpu_ex __percpu *pcpu_flush_ex;
+static struct hv_flush_pcpu_ex __percpu **pcpu_flush_ex;
 
 /*
  * Fills in gva_list starting from offset. Returns the number of items added.
@@ -76,6 +76,18 @@ static inline int cpumask_to_vp_set(struct hv_flush_pcpu_ex *flush,
 {
        int cpu, vcpu, vcpu_bank, vcpu_offset, nr_bank = 1;
 
+       /* valid_bank_mask can represent up to 64 banks */
+       if (hv_max_vp_index / 64 >= 64)
+               return 0;
+
+       /*
+        * Clear all banks up to the maximum possible bank as hv_flush_pcpu_ex
+        * structs are not cleared between calls, we risk flushing unneeded
+        * vCPUs otherwise.
+        */
+       for (vcpu_bank = 0; vcpu_bank <= hv_max_vp_index / 64; vcpu_bank++)
+               flush->hv_vp_set.bank_contents[vcpu_bank] = 0;
+
        /*
         * Some banks may end up being empty but this is acceptable.
         */
@@ -83,11 +95,6 @@ static inline int cpumask_to_vp_set(struct hv_flush_pcpu_ex *flush,
                vcpu = hv_cpu_number_to_vp_number(cpu);
                vcpu_bank = vcpu / 64;
                vcpu_offset = vcpu % 64;
-
-               /* valid_bank_mask can represent up to 64 banks */
-               if (vcpu_bank >= 64)
-                       return 0;
-
                __set_bit(vcpu_offset, (unsigned long *)
                          &flush->hv_vp_set.bank_contents[vcpu_bank]);
                if (vcpu_bank >= nr_bank)
@@ -102,6 +109,7 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus,
                                    const struct flush_tlb_info *info)
 {
        int cpu, vcpu, gva_n, max_gvas;
+       struct hv_flush_pcpu **flush_pcpu;
        struct hv_flush_pcpu *flush;
        u64 status = U64_MAX;
        unsigned long flags;
@@ -116,7 +124,17 @@ static void hyperv_flush_tlb_others(const struct cpumask *cpus,
 
        local_irq_save(flags);
 
-       flush = this_cpu_ptr(pcpu_flush);
+       flush_pcpu = this_cpu_ptr(pcpu_flush);
+
+       if (unlikely(!*flush_pcpu))
+               *flush_pcpu = page_address(alloc_page(GFP_ATOMIC));
+
+       flush = *flush_pcpu;
+
+       if (unlikely(!flush)) {
+               local_irq_restore(flags);
+               goto do_native;
+       }
 
        if (info->mm) {
                flush->address_space = virt_to_phys(info->mm->pgd);
@@ -173,6 +191,7 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
                                       const struct flush_tlb_info *info)
 {
        int nr_bank = 0, max_gvas, gva_n;
+       struct hv_flush_pcpu_ex **flush_pcpu;
        struct hv_flush_pcpu_ex *flush;
        u64 status = U64_MAX;
        unsigned long flags;
@@ -187,7 +206,17 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
 
        local_irq_save(flags);
 
-       flush = this_cpu_ptr(pcpu_flush_ex);
+       flush_pcpu = this_cpu_ptr(pcpu_flush_ex);
+
+       if (unlikely(!*flush_pcpu))
+               *flush_pcpu = page_address(alloc_page(GFP_ATOMIC));
+
+       flush = *flush_pcpu;
+
+       if (unlikely(!flush)) {
+               local_irq_restore(flags);
+               goto do_native;
+       }
 
        if (info->mm) {
                flush->address_space = virt_to_phys(info->mm->pgd);
@@ -222,18 +251,18 @@ static void hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
                flush->flags |= HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY;
                status = hv_do_rep_hypercall(
                        HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
-                       0, nr_bank + 2, flush, NULL);
+                       0, nr_bank, flush, NULL);
        } else if (info->end &&
                   ((info->end - info->start)/HV_TLB_FLUSH_UNIT) > max_gvas) {
                status = hv_do_rep_hypercall(
                        HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
-                       0, nr_bank + 2, flush, NULL);
+                       0, nr_bank, flush, NULL);
        } else {
                gva_n = fill_gva_list(flush->gva_list, nr_bank,
                                      info->start, info->end);
                status = hv_do_rep_hypercall(
                        HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX,
-                       gva_n, nr_bank + 2, flush, NULL);
+                       gva_n, nr_bank, flush, NULL);
        }
 
        local_irq_restore(flags);
@@ -266,7 +295,7 @@ void hyper_alloc_mmu(void)
                return;
 
        if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED))
-               pcpu_flush = __alloc_percpu(PAGE_SIZE, PAGE_SIZE);
+               pcpu_flush = alloc_percpu(struct hv_flush_pcpu *);
        else
-               pcpu_flush_ex = __alloc_percpu(PAGE_SIZE, PAGE_SIZE);
+               pcpu_flush_ex = alloc_percpu(struct hv_flush_pcpu_ex *);
 }
index 2eccc8932ae6f9229296d74c09503ebc2714432f..3d21eab7aaedf305683754d37faa46e6a263674c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/unistd_32.h>
 
 unsigned ia32_dir_class[] = {
index e0bb46c0285752e73c8eb55420e29f97d88a818e..41c671854642ff7eb4a966193e16c6da139a7714 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/x86_64/ia32/ia32_signal.c
  *
@@ -231,7 +232,7 @@ static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
                 ksig->ka.sa.sa_restorer)
                sp = (unsigned long) ksig->ka.sa.sa_restorer;
 
-       if (fpu->fpstate_active) {
+       if (fpu->initialized) {
                unsigned long fx_aligned, math_size;
 
                sp = fpu__alloc_mathframe(sp, 1, &fx_aligned, &math_size);
index 47956c6a4fd8b397edac10436d0deb1b83778804..96cd33bbfc85494f52e4131f50b37129393d3b8a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sys_ia32.c: Conversion between 32bit and 64bit native syscalls. Based on
  *             sys_sparc32
index 72d867f6b518e4db5a79a10c924f858a3edb0af8..8d0ec9df1cbeb53894f47454cd1391b297e6086c 100644 (file)
@@ -150,6 +150,8 @@ static inline void disable_acpi(void) { }
 extern int x86_acpi_numa_init(void);
 #endif /* CONFIG_ACPI_NUMA */
 
+#define acpi_unlazy_tlb(x)     leave_mm(x)
+
 #ifdef CONFIG_ACPI_APEI
 static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
 {
index eec2a70d4376ec98832937471bf701ae67db3e28..8e25bf4f323a74c2d60ee0bfddb86cf796d49f53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_AGP_H
 #define _ASM_X86_AGP_H
 
index e7636bac7372d41d4b8077f4d7df7d81de32ee32..31b627b43a8e01933d6209e746f4c08912d0cdef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ALTERNATIVE_ASM_H
 #define _ASM_X86_ALTERNATIVE_ASM_H
 
 #define new_len2               145f-144f
 
 /*
- * max without conditionals. Idea adapted from:
+ * gas compatible max based on the idea from:
  * http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax
+ *
+ * The additional "-" is needed because gas uses a "true" value of -1.
  */
 #define alt_max_short(a, b)    ((a) ^ (((a) ^ (b)) & -(-((a) < (b)))))
 
index 1b020381ab38965ae2a80d2d86df32c66c92e2e8..dbfd0854651fe4fa13154e3ce04e9baa1f643637 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ALTERNATIVE_H
 #define _ASM_X86_ALTERNATIVE_H
 
@@ -103,12 +104,12 @@ static inline int alternatives_text_reserved(void *start, void *end)
        alt_end_marker ":\n"
 
 /*
- * max without conditionals. Idea adapted from:
+ * gas compatible max based on the idea from:
  * http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax
  *
- * The additional "-" is needed because gas works with s32s.
+ * The additional "-" is needed because gas uses a "true" value of -1.
  */
-#define alt_max_short(a, b)    "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") - (" b ")))))"
+#define alt_max_short(a, b)    "((" a ") ^ (((" a ") ^ (" b ")) & -(-((" a ") < (" b ")))))"
 
 /*
  * Pad the second replacement alternative with additional NOPs if it is
@@ -218,10 +219,9 @@ static inline int alternatives_text_reserved(void *start, void *end)
 #define alternative_call_2(oldfunc, newfunc1, feature1, newfunc2, feature2,   \
                           output, input...)                                  \
 {                                                                            \
-       register void *__sp asm(_ASM_SP);                                     \
        asm volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\
                "call %P[new2]", feature2)                                    \
-               : output, "+r" (__sp)                                         \
+               : output, ASM_CALL_CONSTRAINT                                 \
                : [old] "i" (oldfunc), [new1] "i" (newfunc1),                 \
                  [new2] "i" (newfunc2), ## input);                           \
 }
index da181ad1d5f8c36cd226b7ca080ea859a2b52f83..fddb6d26239f59f5c679617f310f290a1161a9cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_AMD_NB_H
 #define _ASM_X86_AMD_NB_H
 
index a2d31279644080907dbe2703ce8090907c1d6313..d3a2b3876ce69b94308daa4c703ff2b966baf97b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_APIC_FLAT_64_H
 #define _ASM_X86_APIC_FLAT_64_H
 
index c46bb99d5fb29f7958d651bd3d465038e9e6a1c8..05e694ed838642e6e7e40b665ebe766a1d69385b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_APICDEF_H
 #define _ASM_X86_APICDEF_H
 
index 93eebc636c7616395ffa5b55f81c33e9b35dbb71..4d4015ddcf2633e9e8388216f9e9c8639e2eced8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Machine specific APM BIOS functions for generic.
  *  Split out from apm.c by Osamu Tomita <tomita@cinet.co.jp>
index e7cd63175de443f68aa536237a82a92120ca08f3..34a10b2d5b73a420daec0343fd8665be59facbba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HWEIGHT_H
 #define _ASM_X86_HWEIGHT_H
 
index 830b19dbfa3101b73db8dc24c5510ee7d8dbd5a5..ff700d81e91efcf89a2f2ac725b3e80d868c8621 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/ftrace.h>
 #include <linux/uaccess.h>
 #include <asm/string.h>
index 676ee5807d864d94538bf16d2ed7535655045128..219faaec51dfa192f69d8893c8844219c0c89029 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ASM_H
 #define _ASM_X86_ASM_H
 
 # define __ASM_FORM_COMMA(x) " " #x ","
 #endif
 
-#ifdef CONFIG_X86_32
+#ifndef __x86_64__
+/* 32 bit */
 # define __ASM_SEL(a,b) __ASM_FORM(a)
 # define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a)
 #else
+/* 64 bit */
 # define __ASM_SEL(a,b) __ASM_FORM(b)
 # define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b)
 #endif
 /* For C file, we already have NOKPROBE_SYMBOL macro */
 #endif
 
+#ifndef __ASSEMBLY__
+/*
+ * This output constraint should be used for any inline asm which has a "call"
+ * instruction.  Otherwise the asm may be inserted before the frame pointer
+ * gets set up by the containing function.  If you forget to do this, objtool
+ * may print a "call without frame pointer save/setup" warning.
+ */
+register unsigned long current_stack_pointer asm(_ASM_SP);
+#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer)
+#endif
+
 #endif /* _ASM_X86_ASM_H */
index 0874ebda3069d9eb3a8811f8d05951e929ab7d18..72759f131cc58e90106b2df9676ab125b2f9c3af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ATOMIC_H
 #define _ASM_X86_ATOMIC_H
 
index 9e206f31ce2a6d0bbb2a036e25cb221cad6376c9..97c46b8169b73fd417da646162dc31c5c1855fbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ATOMIC64_32_H
 #define _ASM_X86_ATOMIC64_32_H
 
index 5d9de36a2f04cf17d879d7dcf3d712cf6a9c2ff2..738495caf05f50b99629938a1fa285cd0ed4f603 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ATOMIC64_64_H
 #define _ASM_X86_ATOMIC64_64_H
 
index bfb28caf97b1be1f2d6aa8893bd905a39030e310..01727dbc294a3234c8c1be0035c01200c9504034 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BARRIER_H
 #define _ASM_X86_BARRIER_H
 
index 4b7b8e71607eaf8f800770f4dfc3b0ce9d5f675b..4d5a17e2febe87e583f4eed66570659ca84b4dc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BIOS_EBDA_H
 #define _ASM_X86_BIOS_EBDA_H
 
index 854022772c5be4d49d2697bd2b66b454f49c9e6f..2bcf4731495959e9da2db072d4397c925830483e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BITOPS_H
 #define _ASM_X86_BITOPS_H
 
index abd06b19ddd26871872c5f786c17d1f97e4618e1..680c320363dbab47b45b8752c66c64cab95295a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BOOT_H
 #define _ASM_X86_BOOT_H
 
index 4a8cb8d7cbd5d2b0febd4333931b459e75f1ea1d..a07ffd23e4dd67d3e182bd803eb868eaef1bcdf5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BOOTPARAM_UTILS_H
 #define _ASM_X86_BOOTPARAM_UTILS_H
 
index aa6b2023d8f8bc104e0b30a086a4c981ed47abb1..34d99af43994453e1cec89aa202cc17b052ee690 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BUG_H
 #define _ASM_X86_BUG_H
 
index 5490bbaf71d5f67dfda35b345bf50b81e3008d7f..542509b53e0f5f1f0d6b8d65fc5b82dd5305fb32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BUGS_H
 #define _ASM_X86_BUGS_H
 
index 48f99f15452e7d111e8bad21a4830d21231071cc..abe08690a887d302324abcc8cf23bb5da60284f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CACHE_H
 #define _ASM_X86_CACHE_H
 
index cb9a1af109b4796152d8017ca8a9d11f959183f7..63feaf2a5f93d1f67643789bafd2fab74b2c5584 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CACHEFLUSH_H
 #define _ASM_X86_CACHEFLUSH_H
 
index e656ad8c0a2ec359e0364ff411da912f41ba2bee..2930f560d7f35180040231016d9ba454af2048bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_CE4100_H_
 #define _ASM_CE4100_H_
 
index 5f5bb0f973616d80d9e3085b48f4dd04fcf57d2e..d79d1e622dcf1db2717185a12c19e97a6358fa5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_X86_32
 # include <asm/checksum_32.h>
 #else
index 7b53743ed267feefc0be1303ae9f9b97233034b2..7a659c74cd037039896c8c3313a5967a86393020 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CHECKSUM_32_H
 #define _ASM_X86_CHECKSUM_32_H
 
index 08e7efb2c1402fe9e10578d33de881c535a71d95..3ec6d3267cf9a4a1adcc0384b93be4ef2b1d3d8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CHECKSUM_64_H
 #define _ASM_X86_CHECKSUM_64_H
 
index 47bea8cadbd0b6b7f39f9ef97f92037b63ce8c09..dc4cfc888d6df3e95eec3de3a26f8ad60b40b18b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* x86-specific clocksource additions */
 
 #ifndef _ASM_X86_CLOCKSOURCE_H
index 84ae170bc3d0cd73cfa7d08fa6f730bd3106e4ea..6faaf27e8899895854ef126a186d8b39120a9a34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CMDLINE_H
 #define _ASM_X86_CMDLINE_H
 
index b5069e802d5ce4acbe9f8ac61f47401db8f1f54d..56bd436ed01be26e53b8167346f7231175afc88a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_CMPXCHG_H
 #define ASM_X86_CMPXCHG_H
 
index e4959d023af84857c7b184b1c64d9d715f318a29..1732704f0445de02cac50761f715dc9c305f30c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CMPXCHG_32_H
 #define _ASM_X86_CMPXCHG_32_H
 
index caa23a34c963ae34e1492c19633c53019d308caf..03cad196a30100a72d16a6bacc9c49e42d1e33ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CMPXCHG_64_H
 #define _ASM_X86_CMPXCHG_64_H
 
index 5343c19814b381065492a58ddf49ca8b7ec814bc..9eef9cc64c6846d11dc5febae97109f2addc3648 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_COMPAT_H
 #define _ASM_X86_COMPAT_H
 
index 9b7fa6313f1a6d28608943b9a40f0838f8b80389..adc6cc86b06201761a2a19e2fcdb306d631241be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CPU_H
 #define _ASM_X86_CPU_H
 
index ff501e511d91f5648ac003d3a0537ddebe4bb982..baeba05671268cc7d835ecf6decbfc9fc5fc93ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CPU_DEVICE_ID
 #define _CPU_DEVICE_ID 1
 
index d59c15c3defd29883aec144d88891628989a7bcb..0dfa68438e80e70595deb0a20d237f8cb1b8d3f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CPUFEATURE_H
 #define _ASM_X86_CPUFEATURE_H
 
index 2519c6c801c917d7a30b3826c86679edf18616d5..793690fbda3625defd130262db1e94b57152c0bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CPUFEATURES_H
 #define _ASM_X86_CPUFEATURES_H
 
index 61c852fa346b7316839b2e77d697b2f936df3912..6722ffcef2e6ccfc181041f261ff412f25c8662a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CPUMASK_H
 #define _ASM_X86_CPUMASK_H
 #ifndef __ASSEMBLY__
index f498411f2500bfc57103d84f4123be5193122c86..a7adb2bfbf0b819b6c4c6c8d8ff97e2d28519a17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CRASH_H
 #define _ASM_X86_CRASH_H
 
index 80545a1cbe3976ce1521337cc53dc5935a4484ed..c508521dd190fff3c4685fe23865ac358b21e182 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_AES_H
 #define ASM_X86_AES_H
 
index bb93333d920027ebafca6832d44063a673764691..10f8d590bcfef6092c3713cd2c2ceb64041b3bc2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_CAMELLIA_H
 #define ASM_X86_CAMELLIA_H
 
index ed8b66de541f32dd41f75b7a92a116d12bbc8595..553a03de55c3f98fa4399eafbfeb77feb45c1348 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared glue code for 128bit block ciphers
  */
index 33c2b8a435dafc427fb66a5d2c1c97191c6f98d3..c958b7bd0fcbf17d74a62383db52aa854ab207b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_SERPENT_AVX_H
 #define ASM_X86_SERPENT_AVX_H
 
index e6e77dffbdabf10e830c6c7be5a70cdc016c862a..1a345e8a7496c655c7066ca4c0efac30e60c1c69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_SERPENT_SSE2_H
 #define ASM_X86_SERPENT_SSE2_H
 
index 878c51ceebb57f408d78eb94abb13d16d0c2801d..65bb80adba3ef096849595f1df2612fd7aa81431 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_TWOFISH_H
 #define ASM_X86_TWOFISH_H
 
index 9476c04ee6357e79ba0a9c59c8b4001d32c653eb..3e204e6140b51fb9567276c9886d21a56aafceed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CURRENT_H
 #define _ASM_X86_CURRENT_H
 
index 12cb66f6d3a5204c32808c7a22ff379b5919a34d..4505ac2735adf204efed798ecaca93eef2865d29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DEBUGREG_H
 #define _ASM_X86_DEBUGREG_H
 
index 36a760bda462ef859402cbfc51302bb134665d0a..de9e7841f953c8910c94a4d08be74f018b646b06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DELAY_H
 #define _ASM_X86_DELAY_H
 
index 9d0e13738ed3d3ea9cc9200c62153c101624a7b7..0a3e808b91230dbe498769fd18503a2d2960d3bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DESC_H
 #define _ASM_X86_DESC_H
 
index 346d252029b7080a902770c0e92c2e9a69cec734..a91f3b6e4f2a956bf1a23bb65ae13952e1633bb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Written 2000 by Andi Kleen */
 #ifndef _ASM_X86_DESC_DEFS_H
 #define _ASM_X86_DESC_DEFS_H
index 1b3ef26e77df2b264542f23a2ac38ceb561cc39f..5e12c63b47aa99cad0a674a411db6441af712ef0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DEVICE_H
 #define _ASM_X86_DEVICE_H
 
index af95c47d5c9ef6ccb2617226535f63761e8039ef..20a46150e0a86856dcce1f8727627cf982a4208b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DIV64_H
 #define _ASM_X86_DIV64_H
 
index 1387dafdba2d2c24061adb014354b82174f620d4..836ca1178a6afe552258357fecf9b6dbc8102356 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DMA_MAPPING_H
 #define _ASM_X86_DMA_MAPPING_H
 
index fe884e18fa6e5e39a94903ceb7cbfd817d04747c..00f7cf45e6999b8edb776784effcb6bcda778ddb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm/dma.h: Defines for using and allocating dma channels.
  * Written by Hennus Bergman, 1992.
index a8e15b04565b842def6a1bd1fa4b3b03db756c3c..0ab2ab27ad1fb59993fb651f69f49df50e857ff9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DMI_H
 #define _ASM_X86_DMI_H
 
index b7a1ab865d685d2f00d3a75a846bf46605c6e37f..ae391f6098403e498cb1aa80fb967ea7bde860d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_DWARF2_H
 #define _ASM_X86_DWARF2_H
 
index cd266d830e4960fd023aa0411c991a2701db09f9..62be73b23d5cd89b778c791da28eb311e739abb9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_E820_API_H
 #define _ASM_E820_API_H
 
index 4adeed03a9a12f2b209f571d162ccbd783311750..c3aa4b5e49e2544f319b4afe5d2da700f9553f57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_E820_TYPES_H
 #define _ASM_E820_TYPES_H
 
index cf8fdf83b23186f476f21a5d7938bd6b351a5d6d..426fc53ff80305a5f01c7405894075ce2c587ac7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_EDAC_H
 #define _ASM_X86_EDAC_H
 
index 796ff6c1aa539ec6cb3843e501b0cbfa065182ae..85f6ccb80b91771029f347f1875f7a6d923ef184 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_EFI_H
 #define _ASM_X86_EFI_H
 
index 04330c8d9af99d61c774ee166a9c0073fd99e536..c1a125e47ff3d08c9078ceda13c188404f965f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ELF_H
 #define _ASM_X86_ELF_H
 
index 77a99ac06d0070b93e90199fa59615af160e4c73..2abde717db31628f72096134cbf0c9cb960fb3b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_EMERGENCY_RESTART_H
 #define _ASM_X86_EMERGENCY_RESTART_H
 
index aa15d1f7e5307d92df578e024b2c6f508613b9d1..416422762845b3f036c3a11a03102cf282388e15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is designed to contain the BUILD_INTERRUPT specifications for
  * all of the extra named interrupt vectors used by the architecture.
index ca3ce9ab9385336cec07258c87d05c6eb5580740..0211029076ea8b9ed6648b9bf298c99c8b2124ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_ESPFIX_H
 #define _ASM_X86_ESPFIX_H
 
index 138de56b13eb7352d101ae276141d5d367a9381e..2a51d66689c511c069602c016323d1a75a0e9f65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_64BIT
 #define KSYM_ALIGN 16
 #endif
index c66d19e3c23e8c6e31630c5c06f8a90539025695..f9c3a5d502f495d13ae30954837225cc47b0e961 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_EXTABLE_H
 #define _ASM_X86_EXTABLE_H
 /*
index c3dd5e71f4399814f2584d378b8ed9ad562379c8..ab4c960146e3d60ab0e59d8396cc95bfba04f7b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_FB_H
 #define _ASM_X86_FB_H
 
index 0877ae018fc9b167890164324fc41f5127b18c67..a9caac9d4a729d8503828cf68813936c9a74bab5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1994 Linus Torvalds
  *
index 554cdb205d17586887e6b599c991b2fc090ba38a..a38bf5a1e37adbdb64007d95060e3575cfe3269c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1994 Linus Torvalds
  *
 /*
  * High level FPU state handling functions:
  */
-extern void fpu__activate_curr(struct fpu *fpu);
-extern void fpu__activate_fpstate_read(struct fpu *fpu);
-extern void fpu__activate_fpstate_write(struct fpu *fpu);
-extern void fpu__current_fpstate_write_begin(void);
-extern void fpu__current_fpstate_write_end(void);
+extern void fpu__initialize(struct fpu *fpu);
+extern void fpu__prepare_read(struct fpu *fpu);
+extern void fpu__prepare_write(struct fpu *fpu);
 extern void fpu__save(struct fpu *fpu);
 extern void fpu__restore(struct fpu *fpu);
 extern int  fpu__restore_sig(void __user *buf, int ia32_frame);
@@ -120,20 +119,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
        err;                                                            \
 })
 
-#define check_insn(insn, output, input...)                             \
-({                                                                     \
-       int err;                                                        \
+#define kernel_insn(insn, output, input...)                            \
        asm volatile("1:" #insn "\n\t"                                  \
                     "2:\n"                                             \
-                    ".section .fixup,\"ax\"\n"                         \
-                    "3:  movl $-1,%[err]\n"                            \
-                    "    jmp  2b\n"                                    \
-                    ".previous\n"                                      \
-                    _ASM_EXTABLE(1b, 3b)                               \
-                    : [err] "=r" (err), output                         \
-                    : "0"(0), input);                                  \
-       err;                                                            \
-})
+                    _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_fprestore)  \
+                    : output : input)
 
 static inline int copy_fregs_to_user(struct fregs_state __user *fx)
 {
@@ -153,20 +143,16 @@ static inline int copy_fxregs_to_user(struct fxregs_state __user *fx)
 
 static inline void copy_kernel_to_fxregs(struct fxregs_state *fx)
 {
-       int err;
-
        if (IS_ENABLED(CONFIG_X86_32)) {
-               err = check_insn(fxrstor %[fx], "=m" (*fx), [fx] "m" (*fx));
+               kernel_insn(fxrstor %[fx], "=m" (*fx), [fx] "m" (*fx));
        } else {
                if (IS_ENABLED(CONFIG_AS_FXSAVEQ)) {
-                       err = check_insn(fxrstorq %[fx], "=m" (*fx), [fx] "m" (*fx));
+                       kernel_insn(fxrstorq %[fx], "=m" (*fx), [fx] "m" (*fx));
                } else {
                        /* See comment in copy_fxregs_to_kernel() below. */
-                       err = check_insn(rex64/fxrstor (%[fx]), "=m" (*fx), [fx] "R" (fx), "m" (*fx));
+                       kernel_insn(rex64/fxrstor (%[fx]), "=m" (*fx), [fx] "R" (fx), "m" (*fx));
                }
        }
-       /* Copying from a kernel buffer to FPU registers should never fail: */
-       WARN_ON_FPU(err);
 }
 
 static inline int copy_user_to_fxregs(struct fxregs_state __user *fx)
@@ -183,9 +169,7 @@ static inline int copy_user_to_fxregs(struct fxregs_state __user *fx)
 
 static inline void copy_kernel_to_fregs(struct fregs_state *fx)
 {
-       int err = check_insn(frstor %[fx], "=m" (*fx), [fx] "m" (*fx));
-
-       WARN_ON_FPU(err);
+       kernel_insn(frstor %[fx], "=m" (*fx), [fx] "m" (*fx));
 }
 
 static inline int copy_user_to_fregs(struct fregs_state __user *fx)
@@ -281,18 +265,13 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
  * Use XRSTORS to restore context if it is enabled. XRSTORS supports compact
  * XSAVE area format.
  */
-#define XSTATE_XRESTORE(st, lmask, hmask, err)                         \
+#define XSTATE_XRESTORE(st, lmask, hmask)                              \
        asm volatile(ALTERNATIVE(XRSTOR,                                \
                                 XRSTORS, X86_FEATURE_XSAVES)           \
                     "\n"                                               \
-                    "xor %[err], %[err]\n"                             \
                     "3:\n"                                             \
-                    ".pushsection .fixup,\"ax\"\n"                     \
-                    "4: movl $-2, %[err]\n"                            \
-                    "jmp 3b\n"                                         \
-                    ".popsection\n"                                    \
-                    _ASM_EXTABLE(661b, 4b)                             \
-                    : [err] "=r" (err)                                 \
+                    _ASM_EXTABLE_HANDLE(661b, 3b, ex_handler_fprestore)\
+                    :                                                  \
                     : "D" (st), "m" (*st), "a" (lmask), "d" (hmask)    \
                     : "memory")
 
@@ -336,7 +315,10 @@ static inline void copy_kernel_to_xregs_booting(struct xregs_state *xstate)
        else
                XSTATE_OP(XRSTOR, xstate, lmask, hmask, err);
 
-       /* We should never fault when copying from a kernel buffer: */
+       /*
+        * We should never fault when copying from a kernel buffer, and the FPU
+        * state we set at boot time should be valid.
+        */
        WARN_ON_FPU(err);
 }
 
@@ -350,7 +332,7 @@ static inline void copy_xregs_to_kernel(struct xregs_state *xstate)
        u32 hmask = mask >> 32;
        int err;
 
-       WARN_ON(!alternatives_patched);
+       WARN_ON_FPU(!alternatives_patched);
 
        XSTATE_XSAVE(xstate, lmask, hmask, err);
 
@@ -365,12 +347,8 @@ static inline void copy_kernel_to_xregs(struct xregs_state *xstate, u64 mask)
 {
        u32 lmask = mask;
        u32 hmask = mask >> 32;
-       int err;
-
-       XSTATE_XRESTORE(xstate, lmask, hmask, err);
 
-       /* We should never fault when copying from a kernel buffer: */
-       WARN_ON_FPU(err);
+       XSTATE_XRESTORE(xstate, lmask, hmask);
 }
 
 /*
@@ -526,37 +504,16 @@ static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu)
  */
 static inline void fpregs_deactivate(struct fpu *fpu)
 {
-       WARN_ON_FPU(!fpu->fpregs_active);
-
-       fpu->fpregs_active = 0;
        this_cpu_write(fpu_fpregs_owner_ctx, NULL);
        trace_x86_fpu_regs_deactivated(fpu);
 }
 
 static inline void fpregs_activate(struct fpu *fpu)
 {
-       WARN_ON_FPU(fpu->fpregs_active);
-
-       fpu->fpregs_active = 1;
        this_cpu_write(fpu_fpregs_owner_ctx, fpu);
        trace_x86_fpu_regs_activated(fpu);
 }
 
-/*
- * The question "does this thread have fpu access?"
- * is slightly racy, since preemption could come in
- * and revoke it immediately after the test.
- *
- * However, even in that very unlikely scenario,
- * we can just assume we have FPU access - typically
- * to save the FP state - we'll just take a #NM
- * fault and get the FPU access back.
- */
-static inline int fpregs_active(void)
-{
-       return current->thread.fpu.fpregs_active;
-}
-
 /*
  * FPU state switching for scheduling.
  *
@@ -571,14 +528,13 @@ static inline int fpregs_active(void)
 static inline void
 switch_fpu_prepare(struct fpu *old_fpu, int cpu)
 {
-       if (old_fpu->fpregs_active) {
+       if (old_fpu->initialized) {
                if (!copy_fpregs_to_fpstate(old_fpu))
                        old_fpu->last_cpu = -1;
                else
                        old_fpu->last_cpu = cpu;
 
                /* But leave fpu_fpregs_owner_ctx! */
-               old_fpu->fpregs_active = 0;
                trace_x86_fpu_regs_deactivated(old_fpu);
        } else
                old_fpu->last_cpu = -1;
@@ -595,7 +551,7 @@ switch_fpu_prepare(struct fpu *old_fpu, int cpu)
 static inline void switch_fpu_finish(struct fpu *new_fpu, int cpu)
 {
        bool preload = static_cpu_has(X86_FEATURE_FPU) &&
-                      new_fpu->fpstate_active;
+                      new_fpu->initialized;
 
        if (preload) {
                if (!fpregs_state_valid(new_fpu, cpu))
@@ -617,8 +573,7 @@ static inline void user_fpu_begin(void)
        struct fpu *fpu = &current->thread.fpu;
 
        preempt_disable();
-       if (!fpregs_active())
-               fpregs_activate(fpu);
+       fpregs_activate(fpu);
        preempt_enable();
 }
 
index 39d3107ac6c7a4faa9a0376de12e06b832bdf0c3..d5bdffb9d27fedefbec05a8c0adafa592ff359d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * FPU regset handling methods:
  */
index 20a1fbf7fe4e0892a5456c4cf8a68c504b5d93bd..4df2754ef380ae5b10d12ffa23629ebd0a42503d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * x86 FPU signal frame handling methods:
  */
index 3c80f5b9c09d8cf5407378a39ba27cfa380bafbf..202c53918ecfa6d82c616eac1776ee88c5f81426 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * FPU data structures:
  */
@@ -68,6 +69,9 @@ struct fxregs_state {
 /* Default value for fxregs_state.mxcsr: */
 #define MXCSR_DEFAULT          0x1f80
 
+/* Copy both mxcsr & mxcsr_flags with a single u64 memcpy: */
+#define MXCSR_AND_FLAGS_SIZE sizeof(u64)
+
 /*
  * Software based FPU emulation state. This is arbitrary really,
  * it matches the x87 format to make it easier to understand:
@@ -290,36 +294,13 @@ struct fpu {
        unsigned int                    last_cpu;
 
        /*
-        * @fpstate_active:
+        * @initialized:
         *
-        * This flag indicates whether this context is active: if the task
+        * This flag indicates whether this context is initialized: if the task
         * is not running then we can restore from this context, if the task
         * is running then we should save into this context.
         */
-       unsigned char                   fpstate_active;
-
-       /*
-        * @fpregs_active:
-        *
-        * This flag determines whether a given context is actively
-        * loaded into the FPU's registers and that those registers
-        * represent the task's current FPU state.
-        *
-        * Note the interaction with fpstate_active:
-        *
-        *   # task does not use the FPU:
-        *   fpstate_active == 0
-        *
-        *   # task uses the FPU and regs are active:
-        *   fpstate_active == 1 && fpregs_active == 1
-        *
-        *   # the regs are inactive but still match fpstate:
-        *   fpstate_active == 1 && fpregs_active == 0 && fpregs_owner == fpu
-        *
-        * The third state is what we use for the lazy restore optimization
-        * on lazy-switching CPUs.
-        */
-       unsigned char                   fpregs_active;
+       unsigned char                   initialized;
 
        /*
         * @state:
index 1b2799e0699a4d47a3ef191f6177f0a4abc13ceb..48581988d78c750e9216f21874e0eb1ac5f70a4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_X86_XSAVE_H
 #define __ASM_X86_XSAVE_H
 
@@ -48,8 +49,12 @@ void fpu__xstate_clear_all_cpu_caps(void);
 void *get_xsave_addr(struct xregs_state *xsave, int xstate);
 const void *get_xsave_field_ptr(int xstate_field);
 int using_compacted_format(void);
-int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
-                       void __user *ubuf, struct xregs_state *xsave);
-int copyin_to_xsaves(const void *kbuf, const void __user *ubuf,
-                    struct xregs_state *xsave);
+int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
+int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset, unsigned int size);
+int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
+int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
+
+/* Validate an xstate header supplied by userspace (ptrace or sigreturn) */
+extern int validate_xstate_header(const struct xstate_header *hdr);
+
 #endif
index 6e4d170726b758a75a46777f416d07bc7ada01e7..5cbce6fbb534bc0c4c6a8ca710de678ee9850d28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_FRAME_H
 #define _ASM_X86_FRAME_H
 
index eccd0ac6bc38857904565619857c68a7f8a494e6..09ad8857274692b88942404a8f4e1d5a01624cd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_FTRACE_H
 #define _ASM_X86_FTRACE_H
 
index f4dc9b63bdda9df2b4d79ae12c601ba6b9e0ec0d..de4d68852d3afcfcddd036c5018801ec5aaacacf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_FUTEX_H
 #define _ASM_X86_FUTEX_H
 
index 1d268098ac2ec54fd6a1da226ae057282a8eb3cf..318556574345918ca3ef05b2e5981b94a88fb66e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_GART_H
 #define _ASM_X86_GART_H
 
index ad1ed531febcbc3a15992be0e367f1cb4d43978e..51cc979dd3642ff4ad743ba4efcd38c97a6877b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HARDIRQ_H
 #define _ASM_X86_HARDIRQ_H
 
index 1c0b43724ce33adb755ad2655d1c9be555e7afea..a8059930056d22cddb7dc8794e63738f2481560b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * highmem.h: virtual kernel memory mappings for high memory
  *
index cc285ec4b2c1e94906901b3462d9655b4df28cf1..67385d56d4f48e04841f5c743f75a834e3f94216 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HPET_H
 #define _ASM_X86_HPET_H
 
index 535af0f2d8ac3059a3f700b42157f464931ad3bf..5ed826da5e071d9936764976cb5258a613b1edf7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HUGETLB_H
 #define _ASM_X86_HUGETLB_H
 
index 6c98be864a75afcbce9530a8ea538a54816bdae8..f59c39835a5a93c8d12e48f335459268b229e4af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        _I386_HW_BREAKPOINT_H
 #define        _I386_HW_BREAKPOINT_H
 
index 6dfe366a8804576719196970e8e6c92f84fb1408..8ec99a55e6b9d17df05bc02fcff637204c07ffa3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HW_IRQ_H
 #define _ASM_X86_HW_IRQ_H
 
index 334b1a885d9c41cefe7549733f6fff96d81924db..5d55df3528792c46b28cd8f6960c035444fd56c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HYPERTRANSPORT_H
 #define _ASM_X86_HYPERTRANSPORT_H
 
index 39bcefc20de73d2d8a5693586204609f1cf70279..c8376b40e8829d3c8dafc1ea05501558774d7033 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_I8259_H
 #define _ASM_X86_I8259_H
 
index a9bdf5569ab38a5e3a15d5f8bb0dc09b1d1e40ff..2c5f7861d373c4233cd6eb75b81c17c3b2cc6d3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IA32_H
 #define _ASM_X86_IA32_H
 
index b0d5716ca1e4b6fd76b232554e7778c60d5c89c3..aa065c94ccf540bf562bcc585f0ae1a4e9803708 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IA32_UNISTD_H
 #define _ASM_X86_IA32_UNISTD_H
 
index 05c4aa00cc862e3b1dad1b344b0eddb9d6f44db4..5f1d3c421f686019847efd0533c049a608e401bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INIT_H
 #define _ASM_X86_INIT_H
 
index 3e115273ed885110de583ce5b228ad6caf993eec..f5a796da07f880f7c9e0217ae3ad3fb4f9d8da7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generate .byte code for some instructions not supported by old
  * binutils.
index 75b748a1deb894ab617352c9c03a58ed187cf343..35a6bc4da8adfc760d75b407875ba22d045c16c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_FAMILY_H
 #define _ASM_X86_INTEL_FAMILY_H
 
index 86ff4685c4095cd9071832139c4534dfd1186c91..35555016b1befcd80df19aef95cdff699b38e17e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INTEL_MID_VRTC_H
 #define _INTEL_MID_VRTC_H
 
index fac89eb78a6bd150c70bbcd71e684929f53ae0fc..528ed4be43939b6afce28e7ea3429315ca033a73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_PMC_IPC_H_
 #define  _ASM_X86_INTEL_PMC_IPC_H_
 
index e1a411786bf576e6d3663286f82b608e8e9058a4..b523f51c5400d879ab1893ec496cba247e197bdf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_PT_H
 #define _ASM_X86_INTEL_PT_H
 
index 201eb9dce595ac8ff1c1c9daa6c5e90d9dd3ee44..ce16da719596faeec26731a1b185d2f932af6816 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_PUNIT_IPC_H_
 #define  _ASM_X86_INTEL_PUNIT_IPC_H_
 
index b4bbf8b21512f9423bbe557ad3255c39650565af..9acb06b6f81ee2a64026d8ed7e4b08c3a080d976 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_RDT_SCHED_H
 #define _ASM_X86_INTEL_RDT_SCHED_H
 
index 81d3d8776fd948824066f841959f48583a4442fa..4a8c6e8173989d561e96f8c2f76fe8a5699d3b0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_SCU_IPC_H_
 #define  _ASM_X86_INTEL_SCU_IPC_H_
 
index c40a95c33bb8434c8b41641e57c38a79eeddb7ad..11398d55aefaea3b03fe68bf65758e97c69513d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IO_H
 #define _ASM_X86_IO_H
 
index 6cbf2cfb3f8a02481d1c5c63b99eafb0c29eba35..5c27e146a16696365754c8381722379f399f490e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IO_APIC_H
 #define _ASM_X86_IO_APIC_H
 
index fca144a104e409bfd0ff29d9d7bc14ca1dbd7042..1e5d5d92eb406adbf13105ad6dfa5a3cc38332cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IOMMU_H
 #define _ASM_X86_IOMMU_H
 
index e37d6b3ad9831bb05412114bac11f1cd0bf0bac3..1fb3fd1a83c25ca0b8895df59e79b28c2928963c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IOMMU_TABLE_H
 #define _ASM_X86_IOMMU_TABLE_H
 
index c313cac36f564ab0d9b57d618ff8cc7de33debef..7d87437bd0306b7c632f3394ca9989826212a62c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Intel OnChip System Fabric MailBox access support
  */
index 9958ceea2fa3c7bd3b48571eaf9d35fb82b6afd4..d8632f8fa17d5a1fe52217ded64892c7c6bf72ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IRQ_H
 #define _ASM_X86_IRQ_H
 /*
index d82250b1debb8ff06f00799dceb91e30596a35e5..8f3bee821e6c9e7761dc8fdbe1011cf05683b2d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Per-cpu current frame pointer - the location of the last exception frame on
  * the stack, stored in the per-cpu area.
index aaf8d28b5d008969786ee60522d0d2f2a2fae126..c20ffca8fef1782ec8fdca8cad5e38b57b014120 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_IRQ_VECTORS_H
 #define _ASM_X86_IRQ_VECTORS_H
 
index ddbb8ea0f5a9fbde772a43e4bd7b1108c363e19b..800ffce0db29e3d768f215aaf2e2f1dd31bf021f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IRQ_WORK_H
 #define _ASM_IRQ_WORK_H
 
index d26075b52885a8cee21841c2c2278a3e6c46b5ad..423e112c1e8fe3f884e3c0e0f0001234104a305a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_IRQDOMAIN_H
 #define _ASM_IRQDOMAIN_H
 
index ac7692dcfa2e86196f47de38035731e39696d920..c8ef23f2c28f17c59308b9c41179c47f85e075ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _X86_IRQFLAGS_H_
 #define _X86_IRQFLAGS_H_
 
index adc54c12cbd15650fee002cff6d773de7f15429e..8c0de4282659b52079dff43b68affcbed665109f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_JUMP_LABEL_H
 #define _ASM_X86_JUMP_LABEL_H
 
index f527b02a0ee3c802d68161a8054a08b7e6ec3b4f..b577dd0916aa7b7277df6ad3bc4281f2d58572b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KASAN_H
 #define _ASM_X86_KASAN_H
 
index 1052a797d71d0b488eb6973b1ec512005afbe757..460991e3b529b6d21bfc3bfa300c61a06a46a8f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KASLR_H_
 #define _ASM_KASLR_H_
 
index f27ac5ff597de23b20d8f50667787c0dd14f2739..197ea4fedd537998d33cf4cb11d2073bfe3fcf78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KBDLEDS_H
 #define _ASM_X86_KBDLEDS_H
 
index 29a594a3b82aeedccc60f080a5186769cfb1df74..f86a8caa561e8873c3f34e6e8b8cd509ebadd819 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KDEBUG_H
 #define _ASM_X86_KDEBUG_H
 
index d1b5d194e31d897b9de9bd3d22e5c4d5ec3d3399..9f07cff437055d65cabfb69dda718578510ef104 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_KEXEC_BZIMAGE64_H
 #define _ASM_KEXEC_BZIMAGE64_H
 
index 942c1f444da88ddeb182e57f582a068c15cb2717..f327236f0fa7108454296a2af00ccc8e99fe571c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KEXEC_H
 #define _ASM_X86_KEXEC_H
 
index 22a8537eb780b231f24cdec6b2b1797cd7cd5868..aacaf2502bd2f6b00231f453e7d4f1a6793b0d4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KGDB_H
 #define _ASM_X86_KGDB_H
 
index 9e00a731a7fbaad71b252d3779a54b04311407fd..04ab8266e347cabab4b8715517c32686a6a1bf23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KMAP_TYPES_H
 #define _ASM_X86_KMAP_TYPES_H
 
index ed01518f297e10598a59fe3b3c0768021ac80e71..945a0337fbcf54c8da8eb5ee49916886704e3947 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_X86_KMEMCHECK_H
 #define ASM_X86_KMEMCHECK_H
 
index fa2558e120249e6c36e368e396d2c9e188c57056..ee23a43386a2908c140e96b8b85e8b82bc4fbd27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * x86_emulate.h
  *
index a92b1763c41932fcc5f14e63f8ae95cfe778f617..46185263d9c2dc23102fd1abc87ae3a0a69c3a69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KVM_GUEST_H
 #define _ASM_X86_KVM_GUEST_H
 
index c4eda791f877b6c67808546ce072da07b9bb8002..172f9749dbb24c405b6cb05a224663b634f4456a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KVM_PAGE_TRACK_H
 #define _ASM_X86_KVM_PAGE_TRACK_H
 
index bc62e7cbf1b1f883fc9acb0a145305384a3bf062..c373e44049b10c0701d4ab83a003afcae6e692d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KVM_PARA_H
 #define _ASM_X86_KVM_PARA_H
 
@@ -88,7 +89,7 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
 bool kvm_para_available(void);
 unsigned int kvm_arch_para_features(void);
 void __init kvm_guest_init(void);
-void kvm_async_pf_task_wait(u32 token);
+void kvm_async_pf_task_wait(u32 token, int interrupt_kernel);
 void kvm_async_pf_task_wake(u32 token);
 u32 kvm_read_and_reset_pf_reason(void);
 extern void kvm_disable_steal_time(void);
@@ -103,7 +104,7 @@ static inline void kvm_spinlock_init(void)
 
 #else /* CONFIG_KVM_GUEST */
 #define kvm_guest_init() do {} while (0)
-#define kvm_async_pf_task_wait(T) do {} while(0)
+#define kvm_async_pf_task_wait(T, I) do {} while(0)
 #define kvm_async_pf_task_wake(T) do {} while(0)
 
 static inline bool kvm_para_available(void)
index f260bef635919192a6abb8e87a35553bea72e14f..eceea929909740613471b74567d8e24413b57339 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_KVM_CLOCK_H
 #define _ASM_X86_KVM_CLOCK_H
 
index 0ccb26dda126da6d5876c84264c290d1fa203d58..14caa9d9fb7ffcba8bc368a9c178296d27d901fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_LINKAGE_H
 #define _ASM_X86_LINKAGE_H
 
index 7511978093ebb57d2ddb11d137a623ba4237d483..c91083c598457140925d1f0928a6c8fa4811004a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_LOCAL_H
 #define _ASM_X86_LOCAL_H
 
index 88d0c3c74c1326706707b0fa78dcd5ef8f654eee..044daf6fb8f6f5664a0ee455d8fa5adfc9dffdc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Machine specific calibrate_tsc() for generic.
  *  Split out from timer_tsc.c by Osamu Tomita <tomita@cinet.co.jp>
index a01e7ec7d2377aaede271b6ad4ddd546ef5238a5..e39a517467cdb69281f162576139fe80e2c90626 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Machine specific NMI handling for generic.
  *  Split out from traps.c by Osamu Tomita <tomita@cinet.co.jp>
index 0d9b14f60d2c1f3c65a84cc05126dd5cfed166cf..3c42743083ed9f38f4ff085d874f40c598abfcc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MATH_EMU_H
 #define _ASM_X86_MATH_EMU_H
 
index 24acd9ba7837c71a9d42bc567648c506689d2998..1775a32f7ea6dcc3b2acc2afc19cba4b84ec8338 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Machine dependent access functions for RTC registers.
  */
index 181264989db572a8533c00bbe6392c880c0875e5..b1e8d8db921fc3e6178151fca2dbae87a4ac60cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MCE_H
 #define _ASM_X86_MCE_H
 
@@ -187,7 +188,6 @@ struct mca_msr_regs {
 
 extern struct mce_vendor_flags mce_flags;
 
-extern struct mca_config mca_cfg;
 extern struct mca_msr_regs msr_ops;
 
 enum mce_notifier_prios {
index daadeeea00b1ec97dd04f2eea2c9e2fab50c7086..55520cec8b27d69727092e6fd81d3a0c0f4db252 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MICROCODE_H
 #define _ASM_X86_MICROCODE_H
 
index 3d57009e168bb7241d3c1fc7e24cac6daedea031..209492849566cefc56305cd8e976fbf4a25d7527 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MICROCODE_AMD_H
 #define _ASM_X86_MICROCODE_AMD_H
 
index e793fc9a9b20c36d2e0d0e8e2a359fd1c70f2d8e..d85a07d7154f38f2dd7506898bc155783af645ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MICROCODE_INTEL_H
 #define _ASM_X86_MICROCODE_INTEL_H
 
index 475f5bbc7f53dcebb2b434b1cd74f92c1e9ceb5e..bb049cca3729579231f64afce6cd4953d2625f35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MISC_H
 #define _ASM_X86_MISC_H
 
index 04a3fed22cfe05c9d2615a98c22da67ff1e2a5ce..976486447e10caff84631bbe2b81005eb026aa56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MMCONFIG_H
 #define _ASM_X86_MMCONFIG_H
 
index bb8c597c2248a9c8341d04813b04e1d42e9c7019..9ea26f16749706fddd5b15e8bf557a9e6156e165 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MMU_H
 #define _ASM_X86_MMU_H
 
index 7ae318c340d9b5d0fca2697dbb7e977b0bda3892..6699fc441644197608290d18659bc8d389b501c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MMU_CONTEXT_H
 #define _ASM_X86_MMU_CONTEXT_H
 
@@ -126,13 +127,7 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next)
        DEBUG_LOCKS_WARN_ON(preemptible());
 }
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
-{
-       int cpu = smp_processor_id();
-
-       if (cpumask_test_cpu(cpu, mm_cpumask(mm)))
-               cpumask_clear_cpu(cpu, mm_cpumask(mm));
-}
+void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk);
 
 static inline int init_new_context(struct task_struct *tsk,
                                   struct mm_struct *mm)
@@ -286,6 +281,32 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
        return __pkru_allows_pkey(vma_pkey(vma), write);
 }
 
+/*
+ * If PCID is on, ASID-aware code paths put the ASID+1 into the PCID
+ * bits.  This serves two purposes.  It prevents a nasty situation in
+ * which PCID-unaware code saves CR3, loads some other value (with PCID
+ * == 0), and then restores CR3, thus corrupting the TLB for ASID 0 if
+ * the saved ASID was nonzero.  It also means that any bugs involving
+ * loading a PCID-enabled CR3 with CR4.PCIDE off will trigger
+ * deterministically.
+ */
+
+static inline unsigned long build_cr3(struct mm_struct *mm, u16 asid)
+{
+       if (static_cpu_has(X86_FEATURE_PCID)) {
+               VM_WARN_ON_ONCE(asid > 4094);
+               return __sme_pa(mm->pgd) | (asid + 1);
+       } else {
+               VM_WARN_ON_ONCE(asid != 0);
+               return __sme_pa(mm->pgd);
+       }
+}
+
+static inline unsigned long build_cr3_noflush(struct mm_struct *mm, u16 asid)
+{
+       VM_WARN_ON_ONCE(asid > 4094);
+       return __sme_pa(mm->pgd) | (asid + 1) | CR3_NOFLUSH;
+}
 
 /*
  * This can be used from process context to figure out what the value of
@@ -296,10 +317,8 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
  */
 static inline unsigned long __get_current_cr3_fast(void)
 {
-       unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd);
-
-       if (static_cpu_has(X86_FEATURE_PCID))
-               cr3 |= this_cpu_read(cpu_tlbstate.loaded_mm_asid);
+       unsigned long cr3 = build_cr3(this_cpu_read(cpu_tlbstate.loaded_mm),
+               this_cpu_read(cpu_tlbstate.loaded_mm_asid));
 
        /* For now, be very restrictive about when this can be called. */
        VM_WARN_ON(in_nmi() || preemptible());
index 5cbf3135b9714cf444e51923d80ce03c6ca6910f..f572d0f944bb1d89cfbc1ac353b5410c249895f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MMX_H
 #define _ASM_X86_MMX_H
 
index d497bc425caeb75d5c6a02830d5d98fbb64a2f6a..c41b41edd691ef7c11bd105f111a35c9ca36e934 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_X86_32
 # include <asm/mmzone_32.h>
 #else
index 1ec990bd7dc0cf54bf9b5499d59175eb7f2dd620..73d8dd14dda268ee2ae9a4ab6f56f493e7cf4c04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Pat Gaughen (gone@us.ibm.com) Mar 2002
  *
index 129d9aa3ceb3646665370b37bdae1e7665b906a4..0c585046f7447aeecc562653ddb9eefdc4c9b996 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* K8 NUMA support */
 /* Copyright 2002,2003 by Andi Kleen, SuSE Labs */
 /* 2.5 Version loosely based on the NUMAQ Code by Pat Gaughen. */
index 9eb7c718aaf8bdcd3ba6c3fc18e38d04a8228440..8546fafa21a913054908e92cfa1f268df17135a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MODULE_H
 #define _ASM_X86_MODULE_H
 
index c471ca1f9412bdb021b0c27c00fb9fbfd8bebc90..606cbaebd33661516745893f582b56b12f21e88a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MPSPEC_H
 #define _ASM_X86_MPSPEC_H
 
index b31f8c098271ffc59c59002c18701e1f4ab54d33..9492893aec529085ff9f03dccfb107ed169ec0ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MPSPEC_DEF_H
 #define _ASM_X86_MPSPEC_DEF_H
 
index 7d7404756bb4a734bcb04c5f57931daff8af73b3..61eb4b63c5ec0730a848068e0b129521b04ecb13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MPX_H
 #define _ASM_X86_MPX_H
 
index 63cc96f064dc4987813352eb8ceba869d3738856..581bb54dd464e3bc0f597d2185954568170b40ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MSHYPER_H
 #define _ASM_X86_MSHYPER_H
 
@@ -179,7 +180,6 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
        u64 input_address = input ? virt_to_phys(input) : 0;
        u64 output_address = output ? virt_to_phys(output) : 0;
        u64 hv_status;
-       register void *__sp asm(_ASM_SP);
 
 #ifdef CONFIG_X86_64
        if (!hv_hypercall_pg)
@@ -187,7 +187,7 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
 
        __asm__ __volatile__("mov %4, %%r8\n"
                             "call *%5"
-                            : "=a" (hv_status), "+r" (__sp),
+                            : "=a" (hv_status), ASM_CALL_CONSTRAINT,
                               "+c" (control), "+d" (input_address)
                             :  "r" (output_address), "m" (hv_hypercall_pg)
                             : "cc", "memory", "r8", "r9", "r10", "r11");
@@ -202,7 +202,7 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
 
        __asm__ __volatile__("call *%7"
                             : "=A" (hv_status),
-                              "+c" (input_address_lo), "+r" (__sp)
+                              "+c" (input_address_lo), ASM_CALL_CONSTRAINT
                             : "A" (control),
                               "b" (input_address_hi),
                               "D"(output_address_hi), "S"(output_address_lo),
@@ -224,12 +224,11 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
 static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
 {
        u64 hv_status, control = (u64)code | HV_HYPERCALL_FAST_BIT;
-       register void *__sp asm(_ASM_SP);
 
 #ifdef CONFIG_X86_64
        {
                __asm__ __volatile__("call *%4"
-                                    : "=a" (hv_status), "+r" (__sp),
+                                    : "=a" (hv_status), ASM_CALL_CONSTRAINT,
                                       "+c" (control), "+d" (input1)
                                     : "m" (hv_hypercall_pg)
                                     : "cc", "r8", "r9", "r10", "r11");
@@ -242,7 +241,7 @@ static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
                __asm__ __volatile__ ("call *%5"
                                      : "=A"(hv_status),
                                        "+c"(input1_lo),
-                                       "+r"(__sp)
+                                       ASM_CALL_CONSTRAINT
                                      : "A" (control),
                                        "b" (input1_hi),
                                        "m" (hv_hypercall_pg)
@@ -291,6 +290,7 @@ static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, u16 varhead_size,
  * to this information.
  */
 extern u32 *hv_vp_index;
+extern u32 hv_max_vp_index;
 
 /**
  * hv_cpu_number_to_vp_number() - Map CPU to VP.
index eb4b09b41df50c0a1bf3213f6cc07844b674bfc0..25ddd0916bb2f4d3fd17bcea2bdbc68d7b3e0f2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MSI_H
 #define _ASM_X86_MSI_H
 #include <asm/hw_irq.h>
index 4cc48af23fefa3e9bec1da781d13ea5beaebd379..ee2f8ccc32d09f5714a8bbbdfd61985c0e0b5e4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MSIDEF_H
 #define _ASM_X86_MSIDEF_H
 
index 17f5c12e1afd0c6ddb3fa2e6fc94b1fec52f7d5c..ab022618a50af902ee2a5cecfe546e990a29b318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MSR_INDEX_H
 #define _ASM_X86_MSR_INDEX_H
 
index 7567225747d86d82e7746550083b86750b97712b..f6adbe96856a758104cc10914f2e6448c9b7fd75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM msr
 
index 898dba2e2e2cd4df06bb4e05298f01a97ff85e7a..07962f5f6fba8df3ca3a8449fa273c8a66727524 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MSR_H
 #define _ASM_X86_MSR_H
 
index bda3c27f0da06c494bac1faf99abb273f9c06ae3..39a2fb29378a6fa1e10d5ad1a0305bfa471bc4c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_MWAIT_H
 #define _ASM_X86_MWAIT_H
 
index 5f2fc4441b11016608f476848e3a60bd1e08d7a5..75ded1d13d98d6cde6f01ab8602587145e010707 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_NMI_H
 #define _ASM_X86_NMI_H
 
index aff2b3356101487dbdfefddd73853e6f4dbf7b6e..12f12b5cf2caf3131842fcbc03e9d9567d493c1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_NOPS_H
 #define _ASM_X86_NOPS_H
 
index 01b493e5a99b3bf296ccb44aeca865e77982254f..bbfde3d2662f4f2254a4604e9eac5efdd11e95f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_NUMA_H
 #define _ASM_X86_NUMA_H
 
index e7d6b82547429d470aa7679a602cc2788100aec8..9c8e9e85be77293ee09c0ecd03ce8c41b1d93927 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_NUMA_32_H
 #define _ASM_X86_NUMA_32_H
 
index 72f9adf6eca48da8b2312a10d162fb7ac8feb86b..c2bf1de5d901bdf96d72bab6e042ebcddfd5db1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* OLPC machine specific definitions */
 
 #ifndef _ASM_X86_OLPC_H
index 24487712e0b1915368f96a3a74ba362ff42fdbbd..8c2a1daf7f72aa544f1e772dd9666e2f6602d5b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_OLPC_OFW_H
 #define _ASM_X86_OLPC_OFW_H
 
index cf8f619b305fd87a085423b075118d3fcd92d222..7555b48803a8c115d45f51f501234910a5a72abb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_H
 #define _ASM_X86_PAGE_H
 
index 904f528cc8e82ae638e25a2bdeec23fed332eb7a..94dbd51df58f826ca45291a07b8465d024efaa78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_32_H
 #define _ASM_X86_PAGE_32_H
 
index 3bae4969ac65d771c2e86a134278d3c56e1835b7..aa30c3241ea7da812da88c4f4151c9139db2845f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_32_DEFS_H
 #define _ASM_X86_PAGE_32_DEFS_H
 
index b50df06ad251f143e105843ab84ac1a14f40abdf..4baa6bceb2325e6dd056ca682e1eeeb435693a26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_64_H
 #define _ASM_X86_PAGE_64_H
 
index 3f5f08b010d0378e463b0190749d1fb1d35347bb..e1407312c4122ff2132c0b3f4b08034a40f0a905 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_64_DEFS_H
 #define _ASM_X86_PAGE_64_DEFS_H
 
index b98ed9d1463098936bcebbae46b59dc00495508c..1e53560a84bb8ce12a5332a5a7f5983b0b07b4b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAGE_DEFS_H
 #define _ASM_X86_PAGE_DEFS_H
 
index 12deec722cf0a14374d794b037eb26bf2e02ad51..fd81228e8037fe29fd27d805ed3fb7e617a45606 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PARAVIRT_H
 #define _ASM_X86_PARAVIRT_H
 /* Various instructions on x86 need to be replaced for
index 42873edd9f9d20cda2d1cfcb92b3798c4a75b3aa..10cc3b9709fe0b5afa9d6c1d5e316bef5315d8db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PARAVIRT_TYPES_H
 #define _ASM_X86_PARAVIRT_TYPES_H
 
@@ -459,8 +460,8 @@ int paravirt_disable_iospace(void);
  */
 #ifdef CONFIG_X86_32
 #define PVOP_VCALL_ARGS                                                        \
-       unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx;      \
-       register void *__sp asm("esp")
+       unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx;
+
 #define PVOP_CALL_ARGS                 PVOP_VCALL_ARGS
 
 #define PVOP_CALL_ARG1(x)              "a" ((unsigned long)(x))
@@ -480,8 +481,8 @@ int paravirt_disable_iospace(void);
 /* [re]ax isn't an arg, but the return val */
 #define PVOP_VCALL_ARGS                                                \
        unsigned long __edi = __edi, __esi = __esi,             \
-               __edx = __edx, __ecx = __ecx, __eax = __eax;    \
-       register void *__sp asm("rsp")
+               __edx = __edx, __ecx = __ecx, __eax = __eax;
+
 #define PVOP_CALL_ARGS         PVOP_VCALL_ARGS
 
 #define PVOP_CALL_ARG1(x)              "D" ((unsigned long)(x))
@@ -532,7 +533,7 @@ int paravirt_disable_iospace(void);
                        asm volatile(pre                                \
                                     paravirt_alt(PARAVIRT_CALL)        \
                                     post                               \
-                                    : call_clbr, "+r" (__sp)           \
+                                    : call_clbr, ASM_CALL_CONSTRAINT   \
                                     : paravirt_type(op),               \
                                       paravirt_clobber(clbr),          \
                                       ##__VA_ARGS__                    \
@@ -542,7 +543,7 @@ int paravirt_disable_iospace(void);
                        asm volatile(pre                                \
                                     paravirt_alt(PARAVIRT_CALL)        \
                                     post                               \
-                                    : call_clbr, "+r" (__sp)           \
+                                    : call_clbr, ASM_CALL_CONSTRAINT   \
                                     : paravirt_type(op),               \
                                       paravirt_clobber(clbr),          \
                                       ##__VA_ARGS__                    \
@@ -569,7 +570,7 @@ int paravirt_disable_iospace(void);
                asm volatile(pre                                        \
                             paravirt_alt(PARAVIRT_CALL)                \
                             post                                       \
-                            : call_clbr, "+r" (__sp)                   \
+                            : call_clbr, ASM_CALL_CONSTRAINT           \
                             : paravirt_type(op),                       \
                               paravirt_clobber(clbr),                  \
                               ##__VA_ARGS__                            \
index 0d2d3b29118fe8c5eddeb5c1583927e83b40d6c5..163f78259a7e78afb1b8120eb2e559c9504e5f98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PARPORT_H
 #define _ASM_X86_PARPORT_H
 
index fffb2794dd895521d4f6ca39a5de4c2544c1a676..8a3ee355b4222e59415cbea01b51beea161733db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PAT_H
 #define _ASM_X86_PAT_H
 
index b1e7a45d868a52bfd0c729897879ab49b5ea9bac..e1084f71a295d401692db27ac027e3ed2fe47d08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PCI_DIRECT_H
 #define _ASM_X86_PCI_DIRECT_H
 
index ed0bab427354fb065254f526708215c217b3a191..1bbc10812ae128bc695acd19451c97dcdf5ae443 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     PCI BIOS function numbering for conventional PCI BIOS 
  *     systems
index 473a7295ab1028cc82a105476c3fee2597fdaa3e..09c06b0fb964f60486ef87d6d43ebd7ad9c7dca0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PCI_H
 #define _ASM_X86_PCI_H
 
index fe15cfb21b9be318afde89fb7cb76a81b4536668..f5411de0ae1157311be98c3db5026a2bfc85f918 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PCI_64_H
 #define _ASM_X86_PCI_64_H
 
index 9f1b21f372fedbb24328a887f44550a49f242ef3..7a5d6695abd37e737bfb0e532ec4d86c53256433 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Low-Level PCI Access for i386 machines.
  *
index 9fa03604b2b37bcdd9b40df0bf841e36dcc569cd..377f1ffd18be672d3ea21d8097fbdcaa9913c6c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PERCPU_H
 #define _ASM_X86_PERCPU_H
 
index f353061bba1d0ff9f61f9f09ef6c150dae501266..12f54082f4c8ec35fbad10a0270d0846a6b0e8c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PERF_EVENT_H
 #define _ASM_X86_PERF_EVENT_H
 
index d725382c2ae0f4c8d7fbe6db7818e9878b652f41..94de1a05aebaac302a6e75aa68fe0bf39de7a629 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Netburst Performance Events (P4, old Xeon)
  */
index b2d0cd8288aa204f008169c65338025269b252e2..4b5e1eafada731cdedd48d771d79d55e766a84eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGALLOC_H
 #define _ASM_X86_PGALLOC_H
 
index a8b96e708c2b13053f17096c8a2b0628c7bf8050..685ffe8a0eaf84d5a3b0374cf7ef31cb3e51bb7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_2LEVEL_H
 #define _ASM_X86_PGTABLE_2LEVEL_H
 
index 373ab1de909f4fba5267cbd16102ad52b5c21aef..f982ef808e7e4b58dc010b054a016e0083452992 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H
 #define _ASM_X86_PGTABLE_2LEVEL_DEFS_H
 
index c8821bab938fc0e9ce7ae46a683054687c2a4b03..bc4af5453802559af4c1f14a2e3a3dbaf96e57dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_3LEVEL_H
 #define _ASM_X86_PGTABLE_3LEVEL_H
 
index b8a4341faafae9a33ab5b6ba5a9af92522c01493..876b4c77d983eba9c795e1dd0ebb5408912115e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H
 #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H
 
index b714934512b391905ed37400b6acb37ce6529ca2..f735c30163252f5566e17c63deb50ef0ab63cc16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_H
 #define _ASM_X86_PGTABLE_H
 
index bfab55675c1607155ff983671c16fece71aafbdd..e67c0620aec2a268537b46d1da80ce6d0ef174a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_32_H
 #define _ASM_X86_PGTABLE_32_H
 
index 9fb2f2bc8245b5f24ececb2c97e4227e5abe8f5f..f2ca9b28fd68303f4494775564aa9da77ddcd53a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_32_DEFS_H
 #define _ASM_X86_PGTABLE_32_DEFS_H
 
index 972a4698c530dc52c98d62247ed3377cf8ad1cf5..e9f05331e732a057b341e78977d666b8cfe35289 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_64_H
 #define _ASM_X86_PGTABLE_64_H
 
index 06470da156ba1046fb2f9ec47895a01e9eb5d713..6d5f45dcd4a13caafbf184f323d0725c2d5f53e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_64_DEFS_H
 #define _ASM_X86_PGTABLE_64_DEFS_H
 
index f1492473f10e050d5e877c02bf4e9c06b71f2fd9..59df7b47a4349e22ba977e6350c2504634fa34e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PGTABLE_DEFS_H
 #define _ASM_X86_PGTABLE_DEFS_H
 
index b3b09b98896d528d2ef7d425a10784e4ebe86106..a0ba1ffda0dfd3dc9ee335f04cee58aafdea6fb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PKEYS_H
 #define _ASM_X86_PKEYS_H
 
index 7b7ac42c366135d8512ef90758ffcb85edd0abb4..bfa32aa428e59190455b3026deeb67f721367610 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PM_TRACE_H
 #define _ASM_X86_PM_TRACE_H
 
index f565f6dd59d4ed7ea8771d0dc6196ca28eff91c5..374336e217ff7b1467aef8db843f0c68d5668504 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 # ifdef CONFIG_X86_32
 #  include <asm/posix_types_32.h>
 # else
index ec1f3c6511506ee1f0ff5240a9ff95d0e6fa68c1..7f2dbd91fc743a516a0ad8e094680b13832f61ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PREEMPT_H
 #define __ASM_PREEMPT_H
 
@@ -100,19 +101,14 @@ static __always_inline bool should_resched(int preempt_offset)
 
 #ifdef CONFIG_PREEMPT
   extern asmlinkage void ___preempt_schedule(void);
-# define __preempt_schedule()                                  \
-({                                                             \
-       register void *__sp asm(_ASM_SP);                       \
-       asm volatile ("call ___preempt_schedule" : "+r"(__sp)); \
-})
+# define __preempt_schedule() \
+       asm volatile ("call ___preempt_schedule" : ASM_CALL_CONSTRAINT)
 
   extern asmlinkage void preempt_schedule(void);
   extern asmlinkage void ___preempt_schedule_notrace(void);
-# define __preempt_schedule_notrace()                                  \
-({                                                                     \
-       register void *__sp asm(_ASM_SP);                               \
-       asm volatile ("call ___preempt_schedule_notrace" : "+r"(__sp)); \
-})
+# define __preempt_schedule_notrace() \
+       asm volatile ("call ___preempt_schedule_notrace" : ASM_CALL_CONSTRAINT)
+
   extern asmlinkage void preempt_schedule_notrace(void);
 #endif
 
index 4950a0b1d09c14355baec6516fa0803b91f8e39d..1c7f3815bbd6e8285414757a0910b27fb7856058 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PROBE_ROMS_H_
 #define _PROBE_ROMS_H_
 struct pci_dev;
index 1198f2a0e42c77e5635d00934e1b4e453e836e0e..aaedd73ea2c66a21c2456e8519841ebd6c56b18e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NSC/Cyrix CPU indexed register access. Must be inlined instead of
  * macros to ensure correct access ordering
index dc723b64acf0675689c1feb187bfd957480c5d94..43212a43ee69feea1de27275d9075c566cdfcd2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PROCESSOR_FLAGS_H
 #define _ASM_X86_PROCESSOR_FLAGS_H
 
index 3fa26a61eabcef0dc95b19221ca5e76a6ba2a01a..bdac19ab24888fe53045b334ae568a49cc7721d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PROCESSOR_H
 #define _ASM_X86_PROCESSOR_H
 
@@ -677,8 +678,6 @@ static inline void sync_core(void)
         * Like all of Linux's memory ordering operations, this is a
         * compiler barrier as well.
         */
-       register void *__sp asm(_ASM_SP);
-
 #ifdef CONFIG_X86_32
        asm volatile (
                "pushfl\n\t"
@@ -686,7 +685,7 @@ static inline void sync_core(void)
                "pushl $1f\n\t"
                "iret\n\t"
                "1:"
-               : "+r" (__sp) : : "memory");
+               : ASM_CALL_CONSTRAINT : : "memory");
 #else
        unsigned int tmp;
 
@@ -703,7 +702,7 @@ static inline void sync_core(void)
                "iretq\n\t"
                UNWIND_HINT_RESTORE
                "1:"
-               : "=&r" (tmp), "+r" (__sp) : : "cc", "memory");
+               : "=&r" (tmp), ASM_CALL_CONSTRAINT : : "cc", "memory");
 #endif
 }
 
index b408b18861957c28fb6903100430528ebe90456c..6e81788a30c12394f28f7258db157880890adf24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PROTO_H
 #define _ASM_X86_PROTO_H
 
index 91c04c8e67fabcd2d61c5d47da0f4da9ce7efb4c..c0e3c45cf6aba2a0f06c0e07a4642b9519364f03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PTRACE_H
 #define _ASM_X86_PTRACE_H
 
index d7da2729903d72402b0e402b15a513419c148948..92c34e517da18ef06348ee6a673181a4697ec66e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PURGATORY_H
 #define _ASM_X86_PURGATORY_H
 
index 67f08230103aa5ab5f9f74ce90622577b76caef4..1436226efe3ef86ead2839af9ea966b38a25c69e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PVCLOCK_ABI_H
 #define _ASM_X86_PVCLOCK_ABI_H
 #ifndef __ASSEMBLY__
index 448cfe1b48cf02b46c76b76cf2aa0be93b3df0bc..3e4ed8fb5f91e958bca19aebc295e3302e317bba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PVCLOCK_H
 #define _ASM_X86_PVCLOCK_H
 
index c537cbb038a7687486af1b0172dabf036a5793bd..8656b5a6e8e71d4ceb745049892a6c1d8ccdde54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_QRWLOCK_H
 #define _ASM_X86_QRWLOCK_H
 
index 48a706f641f2bc9cf37d70749fe2f0cf4d8aa81e..9982dd96f093c3e924447c9750274d922381f2af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_QSPINLOCK_H
 #define _ASM_X86_QSPINLOCK_H
 
index 9d55f9b6e167c16db344acd7e42992e1625f0459..923307ea11c7128ef585d7056e1af6a755e90961 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_QSPINLOCK_PARAVIRT_H
 #define __ASM_QSPINLOCK_PARAVIRT_H
 
index 90d91520c13ab09b566ca0a599a6170353153e47..63b3393bd98ea2caaa67aefeeab359cbac72dc51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_X86_REALMODE_H
 #define _ARCH_X86_REALMODE_H
 
index fc62ba8dce933d3bb1ec0262b7d4851bcc5fee26..a671a1145906db8b0d18e24d608c53afc395a1ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_REBOOT_H
 #define _ASM_X86_REBOOT_H
 
index 765debe4c54cccf1bf6283f92c163eab2a478a71..96515658ce1283c3e1dbeb006f0f134fc5076fa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_REBOOT_FIXUPS_H
 #define _ASM_X86_REBOOT_FIXUPS_H
 
index 97bab6388a92ec3ea7ae7c006544d649fb6b56d6..0a21986d2238f6069f366566dbcadcf09a6df3c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Derived from include/asm-x86/mach-summit/mach_mpparse.h
  *          and include/asm-x86/mach-default/bios_ebda.h
index 045f99211a9921cfd4eddb7250ff4ed56a602c2a..d8f3a6ae9f6c98e4461a3d34a13e36531c82ac10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_RMWcc
 #define _ASM_X86_RMWcc
 
index a34e0d4b957d639afb5978863e57fefb74a173f2..4d38d85a16ada01ef65671cb47c220d268fa69a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+
  *
  * Written by David Howells (dhowells@redhat.com).
@@ -103,7 +104,6 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)
 ({                                                     \
        long tmp;                                       \
        struct rw_semaphore* ret;                       \
-       register void *__sp asm(_ASM_SP);               \
                                                        \
        asm volatile("# beginning down_write\n\t"       \
                     LOCK_PREFIX "  xadd      %1,(%4)\n\t"      \
@@ -114,7 +114,8 @@ static inline bool __down_read_trylock(struct rw_semaphore *sem)
                     "  call " slow_path "\n"           \
                     "1:\n"                             \
                     "# ending down_write"              \
-                    : "+m" (sem->count), "=d" (tmp), "=a" (ret), "+r" (__sp) \
+                    : "+m" (sem->count), "=d" (tmp),   \
+                      "=a" (ret), ASM_CALL_CONSTRAINT  \
                     : "a" (sem), "1" (RWSEM_ACTIVE_WRITE_BIAS) \
                     : "memory", "cc");                 \
        ret;                                            \
index 0c8c7c8861b4cbcf19c568dc78a312735f31f90a..2bd1338de23647c1ec189ed24ba21e8604de1cb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SECCOMP_H
 #define _ASM_X86_SECCOMP_H
 
index 2f75f30cb2f6db7c9b517b9829bd904bc5adbd2e..d6baf23782bcc23811c12bac8a6a181c2a6cdb5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SECTIONS_H
 #define _ASM_X86_SECTIONS_H
 
index 066aaf8131413e73f5b60969c2255888ab1f722b..b20f9d623f9c639fd212c5e313bd5e450747b1eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SEGMENT_H
 #define _ASM_X86_SEGMENT_H
 
index bb658211edadbc2ff169ff4445ad2d0dbdbea7d5..ece8299d26952870f3fec876aceaea7461095f8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SERIAL_H
 #define _ASM_X86_SERIAL_H
 
index cd71273ec49d91aacffe3eff8883617ef94d8627..bd090367236cee9ff92103139082f42b3a45c993 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SET_MEMORY_H
 #define _ASM_X86_SET_MEMORY_H
 
index a65cf544686aca2051ddeff71de9942c691f418a..ae13bc974416fd8483f822684165de310933f407 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SETUP_H
 #define _ASM_X86_SETUP_H
 
index 0880cf0917b9ac3c1332d00700b96ebd3e7d012c..c4041819c3e53c8ff3165b57d72a39710a7dab0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SHMPARAM_H
 #define _ASM_X86_SHMPARAM_H
 
index e6cd2c489dbb9fe87d1c6c331815bd5cac963e13..140d890c2c984558c4fb27197ddebed69b4511b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SIGCONTEXT_H
 #define _ASM_X86_SIGCONTEXT_H
 
index 34edd1650baed6832decb9dc97a9cbe32be5a3d0..f176114c04d496002d0f6cf5d6e8f6a9a7ddee74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SIGFRAME_H
 #define _ASM_X86_SIGFRAME_H
 
index 452c88b8ad0691cc4d22ae4289d9f0cfa6b5c332..bd26834724e52918b754053ef9ad231a1f19fd68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SIGHANDLING_H
 #define _ASM_X86_SIGHANDLING_H
 
index 8af22be0fe61fa001ef1f174333036ead355e8cb..5f9012ff52ed3c879887df556613979fb0e7d184 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SIGNAL_H
 #define _ASM_X86_SIGNAL_H
 
index 6c8a7ed13365ae5dd675fd4b158c8034ba213a29..a341c878e977f859a7536043235ec1b780c1743c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <asm/fpu/api.h>
 
index 47103eca37756425641c732e42d567ea0466b94d..461f53d27708ae8b80622753122c1a4927537ee2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SMP_H
 #define _ASM_X86_SMP_H
 #ifndef __ASSEMBLY__
index 1f5bee2c202fa559177ae964b5cb5ba5d22fad01..4fc1e9d3c43e78477d3144364eeedb4e6cb93d33 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SPARSEMEM_H
 #define _ASM_X86_SPARSEMEM_H
 
index a24dfcf79f4acadd7b49f47c5138bc05cc50aa56..317fc59b512c56f7b30fe4686b4d138fef791ac9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SPECIAL_INSNS_H
 #define _ASM_X86_SPECIAL_INSNS_H
 
index 6d391909e8647d0abb33a7a04cb80b7d6c076be9..b34625796eb2cf1f6d067a13e2a1f128e2fbb376 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SPINLOCK_H
 #define _ASM_X86_SPINLOCK_H
 
index 25311ebb446cd885137a4d076f2d6f75e8980809..bf3e34b25afc82cedc116c2c25bdf2bd218bbc36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SPINLOCK_TYPES_H
 #define _ASM_X86_SPINLOCK_TYPES_H
 
index e9d32df89cccb0f01e17843dd3aee371ea6aa209..e0975e9c4f477e8ae0a2335a74f01d5763ba9464 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Header file for STMicroelectronics ConneXt (STA2X11) IOHub
  */
index 8abedf1d650e9648f2a9864adf9ee815b000c0af..371b3a4af000764bcae483e8f1125765a35e76e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * GCC stack protector support.
  *
index 2e41c50ddf47f414c8f2e4b0a99965ceafffb4bf..8da111b3c342bbb61a9e630e101c8a83422a15ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
index 09224d7a58620e88537eb4a6040c0dd8adeac42e..c3c2c1914d6578791afb4c7c8d202f9f0fed2277 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_X86_32
 # include <asm/string_32.h>
 #else
index e371e7229042a567cf487b4426641b7c2cf9e947..076502241eae19f82b23e08731856cfd31a29620 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_STRING_32_H
 #define _ASM_X86_STRING_32_H
 
index f372a70a523f10f07509d95b30b10f620a29d46e..0b1b4445f4c5af048eacb41363c06925e2652f5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_STRING_64_H
 #define _ASM_X86_STRING_64_H
 
index 2fab6c2c3575aa3c5233ec88015e2845c0008cf0..ecffe81ff65cd90fe39bac518c110e3fb1d176fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_X86_32
 # include <asm/suspend_32.h>
 #else
index 8e9dbe7b73a1fa2d3c2a5b26a3d226352157c637..982c325dad3377a4f0d80a5808f4d731a87926a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
  * Based on code
index 2bd96b4df1409cf75d168027dbf416da37d3fb9b..7306e911faee20694908bdf482166546776a7e92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2001-2003 Pavel Machek <pavel@suse.cz>
  * Based on code
index 14835dd205a5c0bc23fe45704e9df7824a21211c..78dd9df881577dc1bc1b2bddf84729ff2fe5fd40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SVM_H
 #define __SVM_H
 
index d2f69b9ff73273588f20bb86d09ed3ee63f2e033..bdf9aed404030aab956bec27b29e2f4b9dd7c307 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SWIOTLB_H
 #define _ASM_X86_SWIOTLB_H
 
index fcc5cd387fd17a59e5f28ba5fc8fb65fc57ae5af..899084b70412ebe1e11fbc0ebc0a80624caf520d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SWITCH_TO_H
 #define _ASM_X86_SWITCH_TO_H
 
index cbf8847d02a0793268819053ea2293ee198c6a00..2fe745356fb119d1dc9497c00caeccb3a04ab5c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SYNC_BITOPS_H
 #define _ASM_X86_SYNC_BITOPS_H
 
index 90395063383ccedc28ccd903558a9910f1b804bd..2ecd34e2d46c9a34bacbc329f2744cd23c32bcf3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TEXT_PATCHING_H
 #define _ASM_X86_TEXT_PATCHING_H
 
index 5161da1a0fa0a522c80b93f758a84914a88fad46..70f425947dc50f3e99ca639c0ead0d7e1cce636d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: low-level thread information
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
@@ -158,17 +159,6 @@ struct thread_info {
  */
 #ifndef __ASSEMBLY__
 
-static inline unsigned long current_stack_pointer(void)
-{
-       unsigned long sp;
-#ifdef CONFIG_X86_64
-       asm("mov %%rsp,%0" : "=g" (sp));
-#else
-       asm("mov %%esp,%0" : "=g" (sp));
-#endif
-       return sp;
-}
-
 /*
  * Walks up the stack frames to make sure that the specified object is
  * entirely contained by a single stack frame.
index 92b8aec06970fc6f8f584c8695ff27b292173186..cef818b16045f6b1d8e511133081b72173d52d8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TIME_H
 #define _ASM_X86_TIME_H
 
index 2016962103df5be9b858a82cca1cf355219e3b33..47457ab975fdb36bed1e5146eaddd2e4c83f6f49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TIMER_H
 #define _ASM_X86_TIMER_H
 #include <linux/pm.h>
index 1375cfc93960e1054dcaa3d8a7f41cacaaee028a..a4a8b1b16c0c100d830124984b313f923531bd84 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TIMEX_H
 #define _ASM_X86_TIMEX_H
 
index 79a4ca6a96063529aafd883bfc69b40febf1d2f1..cb0a1f470980a0a65e3ebd1c78142a67ae473a98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TLB_H
 #define _ASM_X86_TLB_H
 
index f4a6ff352a0e5dbe7c231d38c834ab98a7803e62..1ad56eb3e8a8f8914ad34894dcd6ae7fcbca9665 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_X86_TLBBATCH_H
 #define _ARCH_X86_TLBBATCH_H
 
index 4893abf7f74f9e264f5aaaec5a58211b6d324b3c..509046cfa5ce893357366348468a5c5ff8e86a09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TLBFLUSH_H
 #define _ASM_X86_TLBFLUSH_H
 
@@ -82,6 +83,22 @@ static inline u64 inc_mm_tlb_gen(struct mm_struct *mm)
 #define __flush_tlb_single(addr) __native_flush_tlb_single(addr)
 #endif
 
+static inline bool tlb_defer_switch_to_init_mm(void)
+{
+       /*
+        * If we have PCID, then switching to init_mm is reasonably
+        * fast.  If we don't have PCID, then switching to init_mm is
+        * quite slow, so we try to defer it in the hopes that we can
+        * avoid it entirely.  The latter approach runs the risk of
+        * receiving otherwise unnecessary IPIs.
+        *
+        * This choice is just a heuristic.  The tlb code can handle this
+        * function returning true or false regardless of whether we have
+        * PCID.
+        */
+       return !static_cpu_has(X86_FEATURE_PCID);
+}
+
 /*
  * 6 because 6 should be plenty and struct tlb_state will fit in
  * two cache lines.
@@ -104,6 +121,23 @@ struct tlb_state {
        u16 loaded_mm_asid;
        u16 next_asid;
 
+       /*
+        * We can be in one of several states:
+        *
+        *  - Actively using an mm.  Our CPU's bit will be set in
+        *    mm_cpumask(loaded_mm) and is_lazy == false;
+        *
+        *  - Not using a real mm.  loaded_mm == &init_mm.  Our CPU's bit
+        *    will not be set in mm_cpumask(&init_mm) and is_lazy == false.
+        *
+        *  - Lazily using a real mm.  loaded_mm != &init_mm, our bit
+        *    is set in mm_cpumask(loaded_mm), but is_lazy == true.
+        *    We're heuristically guessing that the CR3 load we
+        *    skipped more than makes up for the overhead added by
+        *    lazy mode.
+        */
+       bool is_lazy;
+
        /*
         * Access to this CR4 shadow and to H/W CR4 is protected by
         * disabling interrupts when modifying either one.
index 5665bf205b8d500c0e5d08fa11d213aefdae053f..69615e387973ea3c6cc2c60b3d7ded6533751000 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM exceptions
 
index 342e59789fcdc2e62ce1fd94df32f99f12359bd0..fa60398bbc3acec91ed804d5d50d9fbcb1fa01be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM x86_fpu
 
@@ -12,25 +13,22 @@ DECLARE_EVENT_CLASS(x86_fpu,
 
        TP_STRUCT__entry(
                __field(struct fpu *, fpu)
-               __field(bool, fpregs_active)
-               __field(bool, fpstate_active)
+               __field(bool, initialized)
                __field(u64, xfeatures)
                __field(u64, xcomp_bv)
                ),
 
        TP_fast_assign(
                __entry->fpu            = fpu;
-               __entry->fpregs_active  = fpu->fpregs_active;
-               __entry->fpstate_active = fpu->fpstate_active;
+               __entry->initialized    = fpu->initialized;
                if (boot_cpu_has(X86_FEATURE_OSXSAVE)) {
                        __entry->xfeatures = fpu->state.xsave.header.xfeatures;
                        __entry->xcomp_bv  = fpu->state.xsave.header.xcomp_bv;
                }
        ),
-       TP_printk("x86/fpu: %p fpregs_active: %d fpstate_active: %d xfeatures: %llx xcomp_bv: %llx",
+       TP_printk("x86/fpu: %p initialized: %d xfeatures: %llx xcomp_bv: %llx",
                        __entry->fpu,
-                       __entry->fpregs_active,
-                       __entry->fpstate_active,
+                       __entry->initialized,
                        __entry->xfeatures,
                        __entry->xcomp_bv
        )
index 1599d394c8c1a154cd40f1dd8965140de5f44992..8eb139ed1a03bec70322b72502e518a2cc3ccf1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM irq_vectors
 
index 0f492fc50bcec34368a1869995496b64a476cd39..7bd92db09e8dac5f4162e2838e35fa28f8e18015 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mpx
 
index beab86cc282de52aeef3f57b37a11c9005dcfae7..7061a5650969ec1b6165293685180dc567a10318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TRACE_CLOCK_H
 #define _ASM_X86_TRACE_CLOCK_H
 
index 5545f6459bf59719b3b9822f597225e8da999f88..b0cced97a6ce9b335cc17b41f7c60d0bfa9687ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TRAPS_H
 #define _ASM_X86_TRAPS_H
 
index f5e6f1c417df8724ad1f851f20259b75ecfc875f..8da0efb13544dc0ed2149a8eba7720de6089a88a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * x86 TSC related functions
  */
index 184eb9894dae3f2cca10bfe1813a348614830305..574dff4d2913d16005a49b5395a8b870348a0cc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UACCESS_H
 #define _ASM_X86_UACCESS_H
 /*
@@ -166,11 +167,11 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
 ({                                                                     \
        int __ret_gu;                                                   \
        register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX);            \
-       register void *__sp asm(_ASM_SP);                               \
        __chk_user_ptr(ptr);                                            \
        might_fault();                                                  \
        asm volatile("call __get_user_%P4"                              \
-                    : "=a" (__ret_gu), "=r" (__val_gu), "+r" (__sp)    \
+                    : "=a" (__ret_gu), "=r" (__val_gu),                \
+                       ASM_CALL_CONSTRAINT                             \
                     : "0" (ptr), "i" (sizeof(*(ptr))));                \
        (x) = (__force __typeof__(*(ptr))) __val_gu;                    \
        __builtin_expect(__ret_gu, 0);                                  \
@@ -337,7 +338,7 @@ do {                                                                        \
                     _ASM_EXTABLE(1b, 4b)                               \
                     _ASM_EXTABLE(2b, 4b)                               \
                     : "=r" (retval), "=&A"(x)                          \
-                    : "m" (__m(__ptr)), "m" __m(((u32 *)(__ptr)) + 1), \
+                    : "m" (__m(__ptr)), "m" __m(((u32 __user *)(__ptr)) + 1),  \
                       "i" (errret), "0" (retval));                     \
 })
 
index aeda9bb8af506f13e66996c77ac1bd9f85c6a6e6..72950401b223741048943c8ba445db00cc047c54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UACCESS_32_H
 #define _ASM_X86_UACCESS_32_H
 
index b16f6a1d8b26708d41a5a4d2b6111b543ac0b1c2..f07ef3c575db0be15314f1c78bf582157f4c7155 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UACCESS_64_H
 #define _ASM_X86_UACCESS_64_H
 
index a7bd416b4763832f0a9851df49e92c938b8c5232..9c754a7447aa5ef93e99a5a58a2109a219170e2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UNALIGNED_H
 #define _ASM_X86_UNALIGNED_H
 
index 1ba1536f627ea1bc7e81bdc106634240c864c04f..51c4eee007329b8bc7ce138722dad39d67766ddf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UNISTD_H
 #define _ASM_X86_UNISTD_H 1
 
index e9f793e2df7a135f72a5dcbeee6a09a1d73fb383..87adc0d38c4aa913b59820606e40a33b8edc9e8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UNWIND_H
 #define _ASM_X86_UNWIND_H
 
index 59a54e869f1598f05a38310e955d360f59bd87ad..413c91746b27c82ec1a90892aab1248edc842a8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_USER_H
 #define _ASM_X86_USER_H
 
index 14cbb73ebcba488c730662f7129d6cff7c4997a2..fa577312f63ab80b3bfd9f9ecb8bfa0ac9c7cf96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_USER32_H
 #define _ASM_X86_USER32_H
 
index bebfd86440162d04f6022acbe98ecaf314765a00..d72c3d66e94f7afcea6c97fb35532bbf5e232d26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_USER_32_H
 #define _ASM_X86_USER_32_H
 
index faf2cd3e0d765166351d5487abd9075f8ab6f991..db909923611c250e44eb53fa960ed8ed0a84570b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_USER_64_H
 #define _ASM_X86_USER_64_H
 
index b5a32231abd89a5925897a19d7f753a0c9ac4d60..a80c0673798fe760f6ce86ebcaf1c9ce9c75e7a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_UV_UV_H
 #define _ASM_X86_UV_UV_H
 
index bccdf4938ddf3df0d78dd20a2b40623960f47f01..27566e57e87d999c386d3ade383045e921747d6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_VDSO_H
 #define _ASM_X86_VDSO_H
 
index 9f42beefc67a3d5d5242e054425c713ca394553e..46f9b2deab4de21f5debf864a6b4abd2930a7e66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 022e5971456260e108981ce451ea23099558d6ce..52250681f68c7410b30f42d9e424553aaed4f313 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_VGTOD_H
 #define _ASM_X86_VGTOD_H
 
index 1e491f3af3178cc123da2ff70aabf97774bf726c..26efbec94448d9a118db21e315efe4553b8276f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_VM86_H
 #define _ASM_X86_VM86_H
 
index 6ba66ee79710ffdc19806994df22375859b95736..d9a7c659009c94b2ee04b4ddcc94e5874cc403b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_VSYSCALL_H
 #define _ASM_X86_VSYSCALL_H
 
index 5b238981542a2fa5b84134d65bf630b5a580fca5..06006b0351f3cfb3fc3865f9dcde0d0a7d21c102 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_WORD_AT_A_TIME_H
 #define _ASM_WORD_AT_A_TIME_H
 
index f90f0a587c66c34f235ea741596c737789f92cf0..78ccf28d17db7e1ec466d09f031a402a7013ed0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common bits for X2APIC cluster/physical modes.
  */
index 7ba7e90a9ad69e69723dd7dd152c2bc2b0e9ba16..8a1ebf9540ddf0822c3f80c2fa09340c339860f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_PLATFORM_H
 #define _ASM_X86_PLATFORM_H
 
index e6911caf5bbf16ddc46430c44fcd4186258b713c..d383140e1dc88b802d51fd68dddfeb77b002408e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XEN_EVENTS_H
 #define _ASM_X86_XEN_EVENTS_H
 
index 9606688caa4bea8db0175fe71fe61d9706108aba..7cb282e9e58777aeb2ffd86b344d39a5189c5f84 100644 (file)
@@ -113,10 +113,9 @@ extern struct { char _entry[32]; } hypercall_page[];
        register unsigned long __arg2 asm(__HYPERCALL_ARG2REG) = __arg2; \
        register unsigned long __arg3 asm(__HYPERCALL_ARG3REG) = __arg3; \
        register unsigned long __arg4 asm(__HYPERCALL_ARG4REG) = __arg4; \
-       register unsigned long __arg5 asm(__HYPERCALL_ARG5REG) = __arg5; \
-       register void *__sp asm(_ASM_SP);
+       register unsigned long __arg5 asm(__HYPERCALL_ARG5REG) = __arg5;
 
-#define __HYPERCALL_0PARAM     "=r" (__res), "+r" (__sp)
+#define __HYPERCALL_0PARAM     "=r" (__res), ASM_CALL_CONSTRAINT
 #define __HYPERCALL_1PARAM     __HYPERCALL_0PARAM, "+r" (__arg1)
 #define __HYPERCALL_2PARAM     __HYPERCALL_1PARAM, "+r" (__arg2)
 #define __HYPERCALL_3PARAM     __HYPERCALL_2PARAM, "+r" (__arg3)
@@ -552,13 +551,13 @@ static inline void
 MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
                        struct desc_struct desc)
 {
-       u32 *p = (u32 *) &desc;
-
        mcl->op = __HYPERVISOR_update_descriptor;
        if (sizeof(maddr) == sizeof(long)) {
                mcl->args[0] = maddr;
                mcl->args[1] = *(unsigned long *)&desc;
        } else {
+               u32 *p = (u32 *)&desc;
+
                mcl->args[0] = maddr;
                mcl->args[1] = maddr >> 32;
                mcl->args[2] = *p++;
index 8413688b2571d760f77d918713b758345bdece0a..dc40578abded7d66b997e86f0c1bfc8a46460e5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * arch-x86_32.h
  *
index 839a4811cf983630faa5b724277aafacfefe36cb..c599ec269a254401a5c60b24e18ccb180e37490c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XEN_INTERFACE_64_H
 #define _ASM_X86_XEN_INTERFACE_64_H
 
index f02f025ff988bfecb9e2c14d033be16241207c2a..116777e7f3872250e3b359e2da6d13449cf5e9cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XEN_PAGE_COHERENT_H
 #define _ASM_X86_XEN_PAGE_COHERENT_H
 
index 07b6531813c495a8c8fed7c2624e514bf8d8d274..c6b84245e5ab61c55c0090b734087b1df8fd9c9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XEN_PAGE_H
 #define _ASM_X86_XEN_PAGE_H
 
index f320ee32d5a139a522c1b26f75e1076c9606f563..3506d8c598c18b78596816ab99e98a5ab99d4ba6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XEN_PCI_H
 #define _ASM_X86_XEN_PCI_H
 
index ee52fcac6f72211ec3ac06e0e295193bc0e44817..6b56d0d45d15304f4330cd926e4dab60df1023aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SWIOTLB_XEN_H
 #define _ASM_X86_SWIOTLB_XEN_H
 
index 21e1874c0a0b6f66c83625494c27946ae512fdc7..2aad0abd68e2482ac7c4cc9cc05a1e26a402019f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_XEN_TRACE_TYPES_H
 #define _ASM_XEN_TRACE_TYPES_H
 
index 546f1e3b87cce3d346f95fec83ff2630342da47c..0307e4ec50440571399cc37137cd14423fc45a07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_XOR_64_H
 #define _ASM_X86_XOR_64_H
 
index 4684f97a5bbd1b1edce881a88e75393b580a2cd1..094c49d8ea8e1e34f07911d3cb668dc3b695ef95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_A_OUT_H
 #define _ASM_X86_A_OUT_H
 
index 77203ac352de1efe74a3b9b2425430510c295a41..580e3c567046703c5e8752512a52d9e6ab88106b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_AUXVEC_H
 #define _ASM_X86_AUXVEC_H
 /*
index 217909b4d6f56d84892655f680f974eaf83ec78e..5d72c84588388793d0d54a21b8252c48af3347d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_X86_BITSPERLONG_H
 #define __ASM_X86_BITSPERLONG_H
 
index 94292c4c812237f90f883775312faaa4f55b15c1..88ffc5aee0870c0e3bd9dc2b05a80c479a505ef8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_BOOT_H
 #define _UAPI_ASM_X86_BOOT_H
 
index 66b8f93333d1ee14ed7d937373377bd7ed1c3db8..afdd5ae0fcc41db304db3be9cd88761143dc2d4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_BOOTPARAM_H
 #define _ASM_X86_BOOTPARAM_H
 
index b13a7a88f3ebdeee563075dab2664b46ebcc5383..484e3cfd7ef2df9852f3af72e85072681841d5f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_BYTEORDER_H
 #define _ASM_X86_BYTEORDER_H
 
index 3c0874dd98611868ad3dd8a37a9f04530d7b6eb2..d95d080b30e3ea833a5ddbe47f95e1195c6870a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_DEBUGREG_H
 #define _UAPI_ASM_X86_DEBUGREG_H
 
index 9dafe59cf6e2fe56d6af1e7e0d02fbad90afc009..2f491efe3a1263898c4ec0fccf0086b69079883e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_E820_H
 #define _UAPI_ASM_X86_E820_H
 #define E820MAP        0x2d0           /* our map */
index 79a9626b5500c171eaa6dbeef1681e91f922e9dc..6789884c7701b0fa74b0d1fdb39fc194bd046576 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* */
index 0bd2be5c7617dab877d0cad5ea90c5bf95b67678..6ebaae90e207983d45fad59c8407ec682e85abab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_HWCAP2_H
 #define _ASM_X86_HWCAP2_H
 
index f65d12504e8051f2e47aae2a0076a883c1ce535e..1a5bfead93b410dd1b65dcefa4c8c804bebc5ea4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_HYPERV_H
 #define _ASM_X86_HYPERV_H
 
index bad9f5ea407040bdf31771fa52527c9ef8949f68..eac5b207939debf9255c46b0eef6badc6080a3e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Include file for the interface to IST BIOS
  * Copyright 2002 Andy Grover <andrew.grover@intel.com>
index c2824d02ba3762553b62a07709058102050e34da..f3a960488eae0fcf308ba8467c8de26a3061a840 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_KVM_H
 #define _ASM_X86_KVM_H
 
index a965e5b0d32804fa19f9434600054b39014dd310..554aa8f24f9167fe8ecc683384bce290fd4042dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_KVM_PARA_H
 #define _UAPI_ASM_X86_KVM_PARA_H
 
index 3bb964f88aa14c9d497b8e063846179e1773ed88..125cf5cdf6c5f6118dac56675d4a8dbb5460d20f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_KVM_PERF_H
 #define _ASM_X86_KVM_PERF_H
 
index 6e1aaf73852ac956156df80f4dfcb931633f5269..d62ac5db093b4907d017f539861d8f2c72fad725 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ldt.h
  *
index eb6247a7009b00d0900ef90f365ca16939c6e7ea..91723461dc1feb0d63352c653fe0dafe625af379 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_MCE_H
 #define _UAPI_ASM_X86_MCE_H
 
index 3be08f07695c0ebe567dbad418152c5767277912..d4a8d0424bfbffb17864224399fd4300336341a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_MMAN_H
 #define _ASM_X86_MMAN_H
 
index c41f4fe25483ae7eed13eb9ee3e65a7aa9f6edbe..e7516b402a00f1057208f22444847ef646217c76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_MSR_H
 #define _UAPI_ASM_X86_MSR_H
 
index 7528dcf59691652571283d186a52f50abe4270a6..376563f2bac1f5d93ab53b32c32ae0ea4b55e652 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */
 /*  Generic MTRR (Memory Type Range Register) ioctls.
 
     Copyright (C) 1997-1999  Richard Gooch
index 3f2207bfd17b0eb7efd12e043e58b12543a3c300..f3329cabce5c6d9e7c605a0fb46f764e2d643141 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_PERF_REGS_H
 #define _ASM_X86_PERF_REGS_H
 
index 85506b383627a48354af0ca86455f74e82540b3c..c661e95f0134dbedab539462c1d620e2071a8e5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __KERNEL__
 # ifdef __i386__
 #  include <asm/posix_types_32.h>
index 8e525059e7d81c0a4cd46dfa2f62695daba80fee..840659f4b96f5447cee1f7b03cdedb69ebdd0234 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_POSIX_TYPES_32_H
 #define _ASM_X86_POSIX_TYPES_32_H
 
index cba0c1ead162834d56b3a6c945f5b98d1d10f028..515afb8059ce359f9deef21dba95003fc11e2781 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_POSIX_TYPES_64_H
 #define _ASM_X86_POSIX_TYPES_64_H
 
index 85f9bdafa93c1d9b8ecadbcbfa4703962b2b17f1..f60479b07fc8b456d7af896738fb41e3d3fbb9c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_POSIX_TYPES_X32_H
 #define _ASM_X86_POSIX_TYPES_X32_H
 
index c4576551709216cd51c17e42af20c36a19cd5e7a..5a6aac9fa41f7b565e5c688462000256f00cbb64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_PRCTL_H
 #define _ASM_X86_PRCTL_H
 
index 185f3d10c194b23bbb3def1e77c8362ed4bc5aea..6f335539966500b11311d2a0a5c4dd5f3c315eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_PROCESSOR_FLAGS_H
 #define _UAPI_ASM_X86_PROCESSOR_FLAGS_H
 /* Various flags defined: can be included from assembler. */
index 580aee3072e0684082b0f74e1358925efaf4f540..16074b9c93bb5174e2b2a8299f1cfeb56711c9dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_PTRACE_ABI_H
 #define _ASM_X86_PTRACE_ABI_H
 
index bc16115af39b9e66c048b5e0237180f505535b77..85165c0edafc8627e8f39fb0d1e22d45945f9dc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_PTRACE_H
 #define _UAPI_ASM_X86_PTRACE_H
 
index cc2d6a3aeae7ed24e9fd1d7e8e69204f1a0bc4e4..cabd7476bd6c3efa2e0603e9e421a96892dc9dcf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_SEMBUF_H
 #define _ASM_X86_SEMBUF_H
 
index 62d4111c1c549a8f1cc70636e708934a83605cde..844d60eb1882755f3653ddfdf3a130285a4fbe3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_SIGCONTEXT_H
 #define _UAPI_ASM_X86_SIGCONTEXT_H
 
index a92b0f0dc09e70ec4f35f26fd25f6063cd6ce56f..6b18e88de8a613f4d7a90c1300e517716d210f22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_SIGCONTEXT32_H
 #define _ASM_X86_SIGCONTEXT32_H
 
index 34c47b3341c0343a7bca3f09fa35e87121df08c8..b3d15795717791e895c154a6d02117dfc8bb5b7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_SIGINFO_H
 #define _ASM_X86_SIGINFO_H
 
index 8264f47cf53ed7de5b445350179b94935361463b..e5745d593dc727103b567d126ad9d431440cce7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_SIGNAL_H
 #define _UAPI_ASM_X86_SIGNAL_H
 
index bc03eb5d6360f8cf98ece5365ff2f8c5ea42c85c..9e3982d95d0f18ebaceb38795a326778310c946f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_STAT_H
 #define _ASM_X86_STAT_H
 
index 2d0adbf99a8e2ce94a7e5a3a13a936c16283b815..13c2464cd2c4bdba447c54dce78c70a44db7e468 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_STATFS_H
 #define _ASM_X86_STATFS_H
 
index 3725e145aa58c2879458f818016c8e9ddd268193..a9731f8a480f3bca0785c94e870c74be6c191a67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SVM_H
 #define _UAPI__SVM_H
 
index 7f235c7105c19713c0a22e2e2ea40ea5579895f0..cd3fd8ddbe9a31d25ae0e49e92929d997eb4b374 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_SWAB_H
 #define _ASM_X86_SWAB_H
 
index 8e8c23fef08cee476a41a88c367e937385cb642c..df55e1ddb0c929b5b6b80e37917aff300efbbf4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_TYPES_H
 #define _ASM_X86_TYPES_H
 
index e3d1ec90616ed39fcdc259fae324530c5d0477d5..5657b7a49f03a94c5dfbc17d89658742b592d785 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_UCONTEXT_H
 #define _ASM_X86_UCONTEXT_H
 
index a26df0d75cd059294822dcea96180270c7654383..30d7d04d72d6bad6dfb419f7606e8d5c8fd9b622 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_UNISTD_H
 #define _UAPI_ASM_X86_UNISTD_H
 
index e0b243e9d859841e087b1ef022519f374304018d..d2ee4e307ef81fed296b10f78dc1ca38a6a1d156 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_VM86_H
 #define _UAPI_ASM_X86_VM86_H
 
index 690a2dcf407860cf54793f03e69d8761b06f068d..f0b0c90dd398246eb2882050d69c6b53ccca11af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * vmx.h: VMX Architecture related definitions
  * Copyright (c) 2004, Intel Corporation.
index b97dd6e263d293aade784e0c9e238a65a3d9cbd4..75275f5474449c8ff69591d9d9e721cb15fb1f0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_VSYSCALL_H
 #define _UAPI_ASM_X86_VSYSCALL_H
 
index fd0a7895b63f57bd77a4310936e6d239a45035d1..5f70044340ff1c6a379691c3d9ad6f5959c34bed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 85a9e17e0dbc409c759c06a8b4dec1efae9d3be8..f1bb57b0e41ea780754e4fb495222a413a2e9bf8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD_wakeup_$(BITS).o := y
 
 obj-$(CONFIG_ACPI)             += boot.o
index ed014814ea35fb46ddc14b95b7d030e0baaaf82c..7188aea91549bb31450d049b689fda1032b21f5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sleep.c - x86-specific ACPI sleep support.
  *
index 65c7b606b60697d73cd4a91c2702aacb678765ec..fbb60ca4255c68fc89acb2762b252db5113a0943 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Variables and functions used by the code in sleep.c
  */
index 458da8509b75ecf9fb46769cc16965b02d7e4902..6db28f17ff2884e01122f2689b117e8ae63f9ec4 100644 (file)
@@ -27,6 +27,8 @@ static const struct pci_device_id amd_root_ids[] = {
        {}
 };
 
+#define PCI_DEVICE_ID_AMD_CNB17H_F4     0x1704
+
 const struct pci_device_id amd_nb_misc_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) },
@@ -37,6 +39,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
        {}
 };
 EXPORT_SYMBOL_GPL(amd_nb_misc_ids);
@@ -48,6 +51,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F4) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
        {}
 };
 
@@ -402,11 +406,48 @@ void amd_flush_garts(void)
 }
 EXPORT_SYMBOL_GPL(amd_flush_garts);
 
+static void __fix_erratum_688(void *info)
+{
+#define MSR_AMD64_IC_CFG 0xC0011021
+
+       msr_set_bit(MSR_AMD64_IC_CFG, 3);
+       msr_set_bit(MSR_AMD64_IC_CFG, 14);
+}
+
+/* Apply erratum 688 fix so machines without a BIOS fix work. */
+static __init void fix_erratum_688(void)
+{
+       struct pci_dev *F4;
+       u32 val;
+
+       if (boot_cpu_data.x86 != 0x14)
+               return;
+
+       if (!amd_northbridges.num)
+               return;
+
+       F4 = node_to_amd_nb(0)->link;
+       if (!F4)
+               return;
+
+       if (pci_read_config_dword(F4, 0x164, &val))
+               return;
+
+       if (val & BIT(2))
+               return;
+
+       on_each_cpu(__fix_erratum_688, NULL, 0);
+
+       pr_info("x86/cpu/AMD: CPU erratum 688 worked around\n");
+}
+
 static __init int init_amd_nbs(void)
 {
        amd_cache_northbridges();
        amd_cache_gart();
 
+       fix_erratum_688();
+
        return 0;
 }
 
index ef2859f9fccefca9cc48b22410b51c88c0e29ca2..f5d92bc3b8844422628b8e6d741be34d727aa45b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Firmware replacement code.
  *
index 8e63ebdcbd0b4cb2cfe43605ad48eaa46ca2d967..2fb7309c6900635aa0891537875647cdbbf0da10 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for local APIC drivers and for the IO-APIC code
 #
index d705c769f77d52ce55e4f7d5d32b9853ceb40394..ff891772c9f86492d7ca2721b66619b2be61ed9d 100644 (file)
@@ -573,11 +573,21 @@ static u32 bdx_deadline_rev(void)
        return ~0U;
 }
 
+static u32 skx_deadline_rev(void)
+{
+       switch (boot_cpu_data.x86_mask) {
+       case 0x03: return 0x01000136;
+       case 0x04: return 0x02000014;
+       }
+
+       return ~0U;
+}
+
 static const struct x86_cpu_id deadline_match[] = {
        DEADLINE_MODEL_MATCH_FUNC( INTEL_FAM6_HASWELL_X,        hsx_deadline_rev),
        DEADLINE_MODEL_MATCH_REV ( INTEL_FAM6_BROADWELL_X,      0x0b000020),
        DEADLINE_MODEL_MATCH_FUNC( INTEL_FAM6_BROADWELL_XEON_D, bdx_deadline_rev),
-       DEADLINE_MODEL_MATCH_REV ( INTEL_FAM6_SKYLAKE_X,        0x02000014),
+       DEADLINE_MODEL_MATCH_FUNC( INTEL_FAM6_SKYLAKE_X,        skx_deadline_rev),
 
        DEADLINE_MODEL_MATCH_REV ( INTEL_FAM6_HASWELL_CORE,     0x22),
        DEADLINE_MODEL_MATCH_REV ( INTEL_FAM6_HASWELL_ULT,      0x20),
@@ -600,7 +610,8 @@ static void apic_check_deadline_errata(void)
        const struct x86_cpu_id *m;
        u32 rev;
 
-       if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER))
+       if (!boot_cpu_has(X86_FEATURE_TSC_DEADLINE_TIMER) ||
+           boot_cpu_has(X86_FEATURE_HYPERVISOR))
                return;
 
        m = x86_match_cpu(deadline_match);
index 6599f437b4ab76b463d0abfa6507cf44719977ca..c8d211277315e6b1a34172160578f8091def26a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NOOP APIC driver.
  *
index 456e45e8bf8448e0438ad2512ac3df3ce98cb371..e12fbcfc95715586c9b3dc8840321fe1142dde46 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * APIC driver for "bigsmp" xAPIC machines with more than 8 virtual CPUs.
  *
index d6f387780849a218c44483a353ab13617ec3eedb..d1fc62a6732074dca8a376664a80e8a7099dcae0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  HW NMI watchdog support
  *
index 70e48aa6af982e4b94564986e352de61ba81d27f..3b89b27945fffc8f7c9d8dd28f9ed787158ad833 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Intel IO-APIC support for multi-Pentium hosts.
  *
index 3a205d4a12d02c0c0bd16c670eadacc9ee382173..82f9244fe61fbe7aa8779298503e4884e7d94fa8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cpumask.h>
 #include <linux/interrupt.h>
 
index 481237cb1544623cc1a136d8a6d36893896dcd07..e216cf3d64d2e8432589c6b2fdfaca1b33765bf8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/threads.h>
 #include <linux/cpumask.h>
 #include <linux/string.h>
index 3baf0c3dc875011790143c016f7f54f04e37936d..b94d35320f85e7bcc5d20c4461b43bc848e191b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/threads.h>
 #include <linux/cpumask.h>
 #include <linux/string.h>
index de827d6ac8c2e8ad751eba8699cd1e0ada0e7f4b..8ea78275480dafeb702e11ba73364cd9e7c52f21 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed to extract
index 710edab9e6443a0078d3b7fc91cc0500bba0ac6c..dedf428b20b68b0a4748fc1ac3032193c9121362 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef __LINUX_KBUILD_H
 # error "Please do not build this file directly, build asm-offsets.c instead"
 #endif
index cf42206926af5e985f449254e14968ad1bb9d557..630212fa9b9da3f0498fc30d4c193c5926c43abb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef __LINUX_KBUILD_H
 # error "Please do not build this file directly, build asm-offsets.c instead"
 #endif
index f3672508b2491b385dddbe83c864c455eccba4b0..e1efe44ebefc7ba2a18ff1ca1fa913d09259a7c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index 52c8e3c7789dc81f6f6bd5ae60a6672f500dc8ca..3fed7ae58b60380633276a9a71a0e8adfe41efec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Implement 'Simple Boot Flag Specification 2.0'
  */
index 145863d4d343c4138c167228550e4a0a6a9363a4..33399426793e0c3cf6abce2a62c9bd98f15f72dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/kthread.h>
index e17942c131c81e098e8c580624a7c2068cdaec24..236999c54edce69820fcf372a918db9899a5eef5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for x86-compatible CPU details, features and quirks
 #
@@ -21,7 +22,7 @@ obj-y                 += common.o
 obj-y                  += rdrand.o
 obj-y                  += match.o
 obj-y                  += bugs.o
-obj-$(CONFIG_CPU_FREQ) += aperfmperf.o
+obj-y                  += aperfmperf.o
 
 obj-$(CONFIG_PROC_FS)  += proc.o
 obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
index 9862e2cd6d93da331052f664f49fd4ce1edb8d6b..d58184b7cd4438144e2d0ac3f4744d19ff4ffb31 100644 (file)
@@ -763,6 +763,16 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
        }
 }
 
+static void init_amd_zn(struct cpuinfo_x86 *c)
+{
+       /*
+        * Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
+        * all up to and including B1.
+        */
+       if (c->x86_model <= 1 && c->x86_mask <= 1)
+               set_cpu_cap(c, X86_FEATURE_CPB);
+}
+
 static void init_amd(struct cpuinfo_x86 *c)
 {
        early_init_amd(c);
@@ -791,6 +801,7 @@ static void init_amd(struct cpuinfo_x86 *c)
        case 0x10: init_amd_gh(c); break;
        case 0x12: init_amd_ln(c); break;
        case 0x15: init_amd_bd(c); break;
+       case 0x17: init_amd_zn(c); break;
        }
 
        /* Enable workaround for FXSAVE leak */
index 0ee83321a3136fcca7a00a3b7e6c375e7a51e13f..957813e0180d278563bf33289c54c7462ca83a8a 100644 (file)
@@ -42,10 +42,6 @@ static void aperfmperf_snapshot_khz(void *dummy)
        s64 time_delta = ktime_ms_delta(now, s->time);
        unsigned long flags;
 
-       /* Don't bother re-computing within the cache threshold time. */
-       if (time_delta < APERFMPERF_CACHE_THRESHOLD_MS)
-               return;
-
        local_irq_save(flags);
        rdmsrl(MSR_IA32_APERF, aperf);
        rdmsrl(MSR_IA32_MPERF, mperf);
@@ -74,6 +70,7 @@ static void aperfmperf_snapshot_khz(void *dummy)
 
 unsigned int arch_freq_get_on_cpu(int cpu)
 {
+       s64 time_delta;
        unsigned int khz;
 
        if (!cpu_khz)
@@ -82,6 +79,12 @@ unsigned int arch_freq_get_on_cpu(int cpu)
        if (!static_cpu_has(X86_FEATURE_APERFMPERF))
                return 0;
 
+       /* Don't bother re-computing within the cache threshold time. */
+       time_delta = ktime_ms_delta(ktime_get(), per_cpu(samples.time, cpu));
+       khz = per_cpu(samples.khz, cpu);
+       if (khz && time_delta < APERFMPERF_CACHE_THRESHOLD_MS)
+               return khz;
+
        smp_call_function_single(cpu, aperfmperf_snapshot_khz, NULL, 1);
        khz = per_cpu(samples.khz, cpu);
        if (khz)
index db684880d74ae47fbff37888ff31dd13b9a4653b..ba0b2424c9b050100ac6eeef97c4aef45181d455 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1994  Linus Torvalds
  *
 
 void __init check_bugs(void)
 {
-#ifdef CONFIG_X86_32
-       /*
-        * Regardless of whether PCID is enumerated, the SDM says
-        * that it can't be enabled in 32-bit mode.
-        */
-       setup_clear_cpu_cap(X86_FEATURE_PCID);
-#endif
-
        identify_boot_cpu();
 
        if (!IS_ENABLED(CONFIG_SMP)) {
index 44207b71fee17ca2e5eae3b4286f2056f75d1c68..68bc6d9b313264d92e0705f3499eca2dc19b2f41 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/sched.h>
 #include <linux/sched/clock.h>
index 775f10100d7febac27a84bb9c8deab24e119a8c8..c9176bae7fd8cdb0e85f6d60766a809b9b36aa42 100644 (file)
@@ -904,6 +904,14 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
        setup_force_cpu_cap(X86_FEATURE_ALWAYS);
        fpu__init_system(c);
+
+#ifdef CONFIG_X86_32
+       /*
+        * Regardless of whether PCID is enumerated, the SDM says
+        * that it can't be enabled in 32-bit mode.
+        */
+       setup_clear_cpu_cap(X86_FEATURE_PCID);
+#endif
 }
 
 void __init early_cpu_init(void)
index 2584265d474556be72714dcb91721580290b8c6b..f52a370b6c00f99a4d4333a7f612bd351dd48c30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_X86_CPU_H
 #define ARCH_X86_CPU_H
 
index 6f077445647a6840b8318cba2584e1259e1a4db1..6b4bb335641f3f039c7cff50190ad38b5cf9de66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
index dfa90a3a5145d784dafdcd201243d2bcde537897..b720dacac0519568405ab07fbce1217422328527 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 
 #include <linux/string.h>
index 24f749324c0f0f5d6f63b6810c71143f452d0fac..54d04d5741481164fea1045eb9a96b752ae452c2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Routines to identify caches on Intel CPU.
  *
@@ -831,7 +832,6 @@ static int __cache_amd_cpumap_setup(unsigned int cpu, int index,
        } else if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
                unsigned int apicid, nshared, first, last;
 
-               this_leaf = this_cpu_ci->info_list + index;
                nshared = base->eax.split.num_threads_sharing + 1;
                apicid = cpu_data(cpu).apicid;
                first = apicid - (apicid % nshared);
index ebaddaeef023f8625a36f1064425826dedb1a39d..a43a72d8e88e45ef76a2dee5e5a4abbd0ecab308 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_INTEL_RDT_H
 #define _ASM_X86_INTEL_RDT_H
 
index e42117d5f4d75f14d5792b88e30d46d452e713cb..3fed38812eea340ff1ca2adb4b47534de1e73a59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/cpu_device_id.h>
 #include <asm/cpufeature.h>
 #include <linux/cpu.h>
index 43051f0777d44924e69d5d64eb121d9423d4fe91..bcc7c54c7041f95b2f0cf55b8d52fa07511b9365 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          =  mce.o mce-severity.o mce-genpool.o
 
 obj-$(CONFIG_X86_ANCIENT_MCE)  += winchip.o p5.o
index 10cec43aac389790e591f76be31de5cda0780c1c..7f85b76f43bcc622aa537e3bc40a35860f316479 100644 (file)
@@ -24,14 +24,6 @@ static DEFINE_MUTEX(mce_chrdev_read_mutex);
 static char mce_helper[128];
 static char *mce_helper_argv[2] = { mce_helper, NULL };
 
-#define mce_log_get_idx_check(p) \
-({ \
-       RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held() && \
-                        !lockdep_is_held(&mce_chrdev_read_mutex), \
-                        "suspicious mce_log_get_idx_check() usage"); \
-       smp_load_acquire(&(p)); \
-})
-
 /*
  * Lockless MCE logging infrastructure.
  * This avoids deadlocks on printk locks without having to break locks. Also
@@ -53,43 +45,32 @@ static int dev_mce_log(struct notifier_block *nb, unsigned long val,
                                void *data)
 {
        struct mce *mce = (struct mce *)data;
-       unsigned int next, entry;
-
-       wmb();
-       for (;;) {
-               entry = mce_log_get_idx_check(mcelog.next);
-               for (;;) {
-
-                       /*
-                        * When the buffer fills up discard new entries.
-                        * Assume that the earlier errors are the more
-                        * interesting ones:
-                        */
-                       if (entry >= MCE_LOG_LEN) {
-                               set_bit(MCE_OVERFLOW,
-                                       (unsigned long *)&mcelog.flags);
-                               return NOTIFY_OK;
-                       }
-                       /* Old left over entry. Skip: */
-                       if (mcelog.entry[entry].finished) {
-                               entry++;
-                               continue;
-                       }
-                       break;
-               }
-               smp_rmb();
-               next = entry + 1;
-               if (cmpxchg(&mcelog.next, entry, next) == entry)
-                       break;
+       unsigned int entry;
+
+       mutex_lock(&mce_chrdev_read_mutex);
+
+       entry = mcelog.next;
+
+       /*
+        * When the buffer fills up discard new entries. Assume that the
+        * earlier errors are the more interesting ones:
+        */
+       if (entry >= MCE_LOG_LEN) {
+               set_bit(MCE_OVERFLOW, (unsigned long *)&mcelog.flags);
+               goto unlock;
        }
+
+       mcelog.next = entry + 1;
+
        memcpy(mcelog.entry + entry, mce, sizeof(struct mce));
-       wmb();
        mcelog.entry[entry].finished = 1;
-       wmb();
 
        /* wake processes polling /dev/mcelog */
        wake_up_interruptible(&mce_chrdev_wait);
 
+unlock:
+       mutex_unlock(&mce_chrdev_read_mutex);
+
        return NOTIFY_OK;
 }
 
@@ -177,13 +158,6 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static void collect_tscs(void *data)
-{
-       unsigned long *cpu_tsc = (unsigned long *)data;
-
-       cpu_tsc[smp_processor_id()] = rdtsc();
-}
-
 static int mce_apei_read_done;
 
 /* Collect MCE record of previous boot in persistent storage via APEI ERST. */
@@ -231,14 +205,9 @@ static ssize_t mce_chrdev_read(struct file *filp, char __user *ubuf,
                                size_t usize, loff_t *off)
 {
        char __user *buf = ubuf;
-       unsigned long *cpu_tsc;
-       unsigned prev, next;
+       unsigned next;
        int i, err;
 
-       cpu_tsc = kmalloc(nr_cpu_ids * sizeof(long), GFP_KERNEL);
-       if (!cpu_tsc)
-               return -ENOMEM;
-
        mutex_lock(&mce_chrdev_read_mutex);
 
        if (!mce_apei_read_done) {
@@ -247,65 +216,29 @@ static ssize_t mce_chrdev_read(struct file *filp, char __user *ubuf,
                        goto out;
        }
 
-       next = mce_log_get_idx_check(mcelog.next);
-
        /* Only supports full reads right now */
        err = -EINVAL;
        if (*off != 0 || usize < MCE_LOG_LEN*sizeof(struct mce))
                goto out;
 
+       next = mcelog.next;
        err = 0;
-       prev = 0;
-       do {
-               for (i = prev; i < next; i++) {
-                       unsigned long start = jiffies;
-                       struct mce *m = &mcelog.entry[i];
-
-                       while (!m->finished) {
-                               if (time_after_eq(jiffies, start + 2)) {
-                                       memset(m, 0, sizeof(*m));
-                                       goto timeout;
-                               }
-                               cpu_relax();
-                       }
-                       smp_rmb();
-                       err |= copy_to_user(buf, m, sizeof(*m));
-                       buf += sizeof(*m);
-timeout:
-                       ;
-               }
-
-               memset(mcelog.entry + prev, 0,
-                      (next - prev) * sizeof(struct mce));
-               prev = next;
-               next = cmpxchg(&mcelog.next, prev, 0);
-       } while (next != prev);
-
-       synchronize_sched();
 
-       /*
-        * Collect entries that were still getting written before the
-        * synchronize.
-        */
-       on_each_cpu(collect_tscs, cpu_tsc, 1);
-
-       for (i = next; i < MCE_LOG_LEN; i++) {
+       for (i = 0; i < next; i++) {
                struct mce *m = &mcelog.entry[i];
 
-               if (m->finished && m->tsc < cpu_tsc[m->cpu]) {
-                       err |= copy_to_user(buf, m, sizeof(*m));
-                       smp_rmb();
-                       buf += sizeof(*m);
-                       memset(m, 0, sizeof(*m));
-               }
+               err |= copy_to_user(buf, m, sizeof(*m));
+               buf += sizeof(*m);
        }
 
+       memset(mcelog.entry, 0, next * sizeof(struct mce));
+       mcelog.next = 0;
+
        if (err)
                err = -EFAULT;
 
 out:
        mutex_unlock(&mce_chrdev_read_mutex);
-       kfree(cpu_tsc);
 
        return err ? err : buf - ubuf;
 }
index 098530a93bb7cc4e451687ae29a0b86447105861..aa0d5df9dc60e710b22ab7172f0e5fd6e05db2c9 100644 (file)
@@ -1,3 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __X86_MCE_INTERNAL_H__
+#define __X86_MCE_INTERNAL_H__
+
 #include <linux/device.h>
 #include <asm/mce.h>
 
@@ -108,3 +112,7 @@ static inline void mce_work_trigger(void)   { }
 static inline void mce_register_injector_chain(struct notifier_block *nb)      { }
 static inline void mce_unregister_injector_chain(struct notifier_block *nb)    { }
 #endif
+
+extern struct mca_config mca_cfg;
+
+#endif /* __X86_MCE_INTERNAL_H__ */
index 40e28ed77fbf017aee3ddb5c8dd128ff8ac2b826..486f640b02efd1313911c494588bb7875e7e5759 100644 (file)
@@ -28,6 +28,8 @@
 #include <asm/msr.h>
 #include <asm/trace/irq_vectors.h>
 
+#include "mce-internal.h"
+
 #define NR_BLOCKS         5
 #define THRESHOLD_MAX     0xFFF
 #define INT_TYPE_APIC     0x00020000
index e84db79ef27277ba9c78232f162262726afb3825..d05be307d081a67c12eef433b5c832fcfcffa1a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Intel specific MCE features.
  * Copyright 2004 Zwane Mwaikambo <zwane@linuxpower.ca>
index 2a0717bf803372d3968dca9d2b2e6c81740d946d..5cddf831720fd321b01a7393b8c678d635b46e4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * P5 specific Machine Check Exception Reporting
  * (C) Copyright 2002 Alan Cox <alan@lxorguk.ukuu.org.uk>
index 5e7249e42f8ff9f5410e0999420c953575e1dd34..2b584b319eff37532df8c8729fc520725bee5c29 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common corrected MCE threshold handler code:
  */
index c6a722e1d011458fa30ec5ad3ad4e78c58d2fa82..3b45b270a865d1658648667451f4b57fede21f26 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IDT Winchip specific Machine Check Exception Reporting
  * (C) Copyright 2002 Alan Cox <alan@lxorguk.ukuu.org.uk>
index 86e8f0b2537b3eaedd2da204d67c94947a1b16f1..c4fa4a85d4cb6f4e0cb4b34cd20467879167463d 100644 (file)
@@ -122,9 +122,6 @@ static bool __init check_loader_disabled_bsp(void)
        bool *res = &dis_ucode_ldr;
 #endif
 
-       if (!have_cpuid_p())
-               return *res;
-
        /*
         * CPUID(1).ECX[31]: reserved for hypervisor use. This is still not
         * completely accurate as xen pv guests don't see that CPUID bit set but
@@ -166,24 +163,36 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name)
 void __init load_ucode_bsp(void)
 {
        unsigned int cpuid_1_eax;
+       bool intel = true;
 
-       if (check_loader_disabled_bsp())
+       if (!have_cpuid_p())
                return;
 
        cpuid_1_eax = native_cpuid_eax(1);
 
        switch (x86_cpuid_vendor()) {
        case X86_VENDOR_INTEL:
-               if (x86_family(cpuid_1_eax) >= 6)
-                       load_ucode_intel_bsp();
+               if (x86_family(cpuid_1_eax) < 6)
+                       return;
                break;
+
        case X86_VENDOR_AMD:
-               if (x86_family(cpuid_1_eax) >= 0x10)
-                       load_ucode_amd_bsp(cpuid_1_eax);
+               if (x86_family(cpuid_1_eax) < 0x10)
+                       return;
+               intel = false;
                break;
+
        default:
-               break;
+               return;
        }
+
+       if (check_loader_disabled_bsp())
+               return;
+
+       if (intel)
+               load_ucode_intel_bsp();
+       else
+               load_ucode_amd_bsp(cpuid_1_eax);
 }
 
 static bool check_loader_disabled_ap(void)
index 8f7a9bbad514efbec73ed1beb167c7d8432521b2..7dbcb7adf7975f7f29c38651c23c478ad315a34c 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/mm.h>
 
 #include <asm/microcode_intel.h>
+#include <asm/intel-family.h>
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
 #include <asm/setup.h>
@@ -918,6 +919,18 @@ static int get_ucode_fw(void *to, const void *from, size_t n)
        return 0;
 }
 
+static bool is_blacklisted(unsigned int cpu)
+{
+       struct cpuinfo_x86 *c = &cpu_data(cpu);
+
+       if (c->x86 == 6 && c->x86_model == INTEL_FAM6_BROADWELL_X) {
+               pr_err_once("late loading on model 79 is disabled.\n");
+               return true;
+       }
+
+       return false;
+}
+
 static enum ucode_state request_microcode_fw(int cpu, struct device *device,
                                             bool refresh_fw)
 {
@@ -926,6 +939,9 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
        const struct firmware *firmware;
        enum ucode_state ret;
 
+       if (is_blacklisted(cpu))
+               return UCODE_NFOUND;
+
        sprintf(name, "intel-ucode/%02x-%02x-%02x",
                c->x86, c->x86_model, c->x86_mask);
 
@@ -950,6 +966,9 @@ static int get_ucode_user(void *to, const void *from, size_t n)
 static enum ucode_state
 request_microcode_user(int cpu, const void __user *buf, size_t size)
 {
+       if (is_blacklisted(cpu))
+               return UCODE_NFOUND;
+
        return generic_load_microcode(cpu, (void *)buf, size, &get_ucode_user);
 }
 
index 6988c74409a825313a2711be6914a20369d223e0..d0dfb892c72fe7e3648fba753e0d7351d19006f9 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h
 #
index 92ba9cd31c9a4fa0dd7d0cfbf48bb397b2e9e7bf..a65a0272096d00ac24440ae543bb254ce7a52bd0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <asm/mtrr.h>
index 3d689937fc1b13974a0a8a5edd31ddda0f6401b2..f27177816569ec38902d260932319282fa99ce2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/mm.h>
 
index b1086f79e57e44858105feb91d7f015caeaec18f..4296c702a3f71bdc33fa83081b5ea797a564980e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/mm.h>
index 6d9b455491097a7a68c89b7996d96f0d0e5bb2e1..558444b239230d0dba94c323a9dbd744c8e85f2e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/capability.h>
 #include <linux/seq_file.h>
 #include <linux/uaccess.h>
index ad8bd763efa52bd0426f2d756783c00f257b1f2a..2ac99e561181a98b87654f8e8c617a8c7ad2a555 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * local MTRR defines.
  */
index 181eabecae25bebbe004a08766d874b075195626..d389083330c50f8efb57a436a6af6773365ae00e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * local apic based NMI watchdog for various CPUs.
  *
index 1dd8294fd7301c979744deedc1922f226b0e0346..fd6ec2aa0303f14dfed771e90b37e38dd3db8d8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Strings for the various x86 power flags
  *
index 218f79825b3c802d9da17fd937320da3ce4456cc..4378a729b933508e806d28045401d99781587c84 100644 (file)
@@ -1,7 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/smp.h>
 #include <linux/timex.h>
 #include <linux/string.h>
 #include <linux/seq_file.h>
+#include <linux/cpufreq.h>
 
 /*
  *     Get CPU information for use by the procfs.
@@ -75,9 +77,16 @@ static int show_cpuinfo(struct seq_file *m, void *v)
        if (c->microcode)
                seq_printf(m, "microcode\t: 0x%x\n", c->microcode);
 
-       if (cpu_has(c, X86_FEATURE_TSC))
+       if (cpu_has(c, X86_FEATURE_TSC)) {
+               unsigned int freq = arch_freq_get_on_cpu(cpu);
+
+               if (!freq)
+                       freq = cpufreq_quick_get(cpu);
+               if (!freq)
+                       freq = cpu_khz;
                seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
-                          cpu_khz / 1000, (cpu_khz % 1000));
+                          freq / 1000, (freq % 1000));
+       }
 
        /* Cache size */
        if (c->x86_cache_size >= 0)
index cd531355e8386b4177d4dcecaf1031ba8c2086c8..b099024d339c386929dbda450a328bc2b3887377 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Check for extended topology enumeration cpuid leaf 0xb and if it
  * exists, use it for populating initial_apicid and cpu topology
index d77d07ab310b4317d33e44de10896297bb2a6654..42c939827621a56c31d9a60f80d6857d091a8ddf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/sched/clock.h>
index ef9c2a0078bd662649178de4b01766ec3f354907..65a58a390fc31161ec7f4139157c2ebb2c5c54f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <asm/processor.h>
 #include "cpu.h"
index 538fedea9b3f24fef0c828ee81036f1d2f73a800..33ee47670b9938823d0b1c908b84233eb7a9272e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Memory preserving reboot related code.
  *
index afa64adb75eeb2bf830fbef1ef5a66960b14663e..4f2e0778feac2fac9f0546d4c2fb6e6ce1cafa13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Memory preserving reboot related code.
  *
index cbf1f6ba39a8328acded677cf10822b45ec4b198..76e07698e6d1524fe7c55ba73acbfe8e9911e68a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Architecture specific OF callbacks.
  */
index f9c324e08d8554feebfe1fc25942cf2430c4e68f..0e662c55ae902fedd5c78c1ed87a972b35a79856 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/sched/debug.h>
index 4f04814749037e403f063a33a3249896a4c97f55..daefae83a3aa86c59602b75bd3e6734c6e3b1030 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
index 225af4184f06bf4d343eb1eb43ded549299fc031..88ce2ffdb110303502ad33e64d357d8af5afd8c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
index 927abeaf63e27744125cab694bc0f4917dc1b449..1e82f787c1603b2aab3eee724c7ebf3ec64cc79f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Various workarounds for chipset bugs.
    This code runs very early and can't use the regular PCI subsystem
    The entries are keyed to PCI bridges which usually identify chipsets
index 0f0840304452c5e2357621d674daf3d478ae77dc..5e801c8c8ce7cfaf191505fc9feaae5414f7270b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/console.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 4312f8ae71b78515885d8415ee5064034919b8d5..38e7d597b6604d95fa381c2e487e5f85b1e6d646 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/memblock.h>
index d913047f832cde4daa9d9e4e04aab1223c3554b9..2954fab15e51c5372135e383f2924136baeffcba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * x86 FPU bug checks:
  */
index e1114f070c2dfdedf9911cd587afb7cca1769785..f92a6593de1ec651d244d43d16acbd8d49959e4b 100644 (file)
@@ -100,7 +100,7 @@ void __kernel_fpu_begin(void)
 
        kernel_fpu_disable();
 
-       if (fpu->fpregs_active) {
+       if (fpu->initialized) {
                /*
                 * Ignore return value -- we don't care if reg state
                 * is clobbered.
@@ -116,7 +116,7 @@ void __kernel_fpu_end(void)
 {
        struct fpu *fpu = &current->thread.fpu;
 
-       if (fpu->fpregs_active)
+       if (fpu->initialized)
                copy_kernel_to_fpregs(&fpu->state);
 
        kernel_fpu_enable();
@@ -148,7 +148,7 @@ void fpu__save(struct fpu *fpu)
 
        preempt_disable();
        trace_x86_fpu_before_save(fpu);
-       if (fpu->fpregs_active) {
+       if (fpu->initialized) {
                if (!copy_fpregs_to_fpstate(fpu)) {
                        copy_kernel_to_fpregs(&fpu->state);
                }
@@ -189,10 +189,9 @@ EXPORT_SYMBOL_GPL(fpstate_init);
 
 int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu)
 {
-       dst_fpu->fpregs_active = 0;
        dst_fpu->last_cpu = -1;
 
-       if (!src_fpu->fpstate_active || !static_cpu_has(X86_FEATURE_FPU))
+       if (!src_fpu->initialized || !static_cpu_has(X86_FEATURE_FPU))
                return 0;
 
        WARN_ON_FPU(src_fpu != &current->thread.fpu);
@@ -206,26 +205,14 @@ int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu)
        /*
         * Save current FPU registers directly into the child
         * FPU context, without any memory-to-memory copying.
-        * In lazy mode, if the FPU context isn't loaded into
-        * fpregs, CR0.TS will be set and do_device_not_available
-        * will load the FPU context.
         *
-        * We have to do all this with preemption disabled,
-        * mostly because of the FNSAVE case, because in that
-        * case we must not allow preemption in the window
-        * between the FNSAVE and us marking the context lazy.
-        *
-        * It shouldn't be an issue as even FNSAVE is plenty
-        * fast in terms of critical section length.
+        * ( The function 'fails' in the FNSAVE case, which destroys
+        *   register contents so we have to copy them back. )
         */
-       preempt_disable();
        if (!copy_fpregs_to_fpstate(dst_fpu)) {
-               memcpy(&src_fpu->state, &dst_fpu->state,
-                      fpu_kernel_xstate_size);
-
+               memcpy(&src_fpu->state, &dst_fpu->state, fpu_kernel_xstate_size);
                copy_kernel_to_fpregs(&src_fpu->state);
        }
-       preempt_enable();
 
        trace_x86_fpu_copy_src(src_fpu);
        trace_x86_fpu_copy_dst(dst_fpu);
@@ -237,45 +224,48 @@ int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu)
  * Activate the current task's in-memory FPU context,
  * if it has not been used before:
  */
-void fpu__activate_curr(struct fpu *fpu)
+void fpu__initialize(struct fpu *fpu)
 {
        WARN_ON_FPU(fpu != &current->thread.fpu);
 
-       if (!fpu->fpstate_active) {
+       if (!fpu->initialized) {
                fpstate_init(&fpu->state);
                trace_x86_fpu_init_state(fpu);
 
                trace_x86_fpu_activate_state(fpu);
                /* Safe to do for the current task: */
-               fpu->fpstate_active = 1;
+               fpu->initialized = 1;
        }
 }
-EXPORT_SYMBOL_GPL(fpu__activate_curr);
+EXPORT_SYMBOL_GPL(fpu__initialize);
 
 /*
  * This function must be called before we read a task's fpstate.
  *
- * If the task has not used the FPU before then initialize its
- * fpstate.
+ * There's two cases where this gets called:
+ *
+ * - for the current task (when coredumping), in which case we have
+ *   to save the latest FPU registers into the fpstate,
+ *
+ * - or it's called for stopped tasks (ptrace), in which case the
+ *   registers were already saved by the context-switch code when
+ *   the task scheduled out - we only have to initialize the registers
+ *   if they've never been initialized.
  *
  * If the task has used the FPU before then save it.
  */
-void fpu__activate_fpstate_read(struct fpu *fpu)
+void fpu__prepare_read(struct fpu *fpu)
 {
-       /*
-        * If fpregs are active (in the current CPU), then
-        * copy them to the fpstate:
-        */
-       if (fpu->fpregs_active) {
+       if (fpu == &current->thread.fpu) {
                fpu__save(fpu);
        } else {
-               if (!fpu->fpstate_active) {
+               if (!fpu->initialized) {
                        fpstate_init(&fpu->state);
                        trace_x86_fpu_init_state(fpu);
 
                        trace_x86_fpu_activate_state(fpu);
                        /* Safe to do for current and for stopped child tasks: */
-                       fpu->fpstate_active = 1;
+                       fpu->initialized = 1;
                }
        }
 }
@@ -283,17 +273,17 @@ void fpu__activate_fpstate_read(struct fpu *fpu)
 /*
  * This function must be called before we write a task's fpstate.
  *
- * If the task has used the FPU before then unlazy it.
+ * If the task has used the FPU before then invalidate any cached FPU registers.
  * If the task has not used the FPU before then initialize its fpstate.
  *
  * After this function call, after registers in the fpstate are
  * modified and the child task has woken up, the child task will
  * restore the modified FPU state from the modified context. If we
- * didn't clear its lazy status here then the lazy in-registers
+ * didn't clear its cached status here then the cached in-registers
  * state pending on its former CPU could be restored, corrupting
  * the modifications.
  */
-void fpu__activate_fpstate_write(struct fpu *fpu)
+void fpu__prepare_write(struct fpu *fpu)
 {
        /*
         * Only stopped child tasks can be used to modify the FPU
@@ -301,8 +291,8 @@ void fpu__activate_fpstate_write(struct fpu *fpu)
         */
        WARN_ON_FPU(fpu == &current->thread.fpu);
 
-       if (fpu->fpstate_active) {
-               /* Invalidate any lazy state: */
+       if (fpu->initialized) {
+               /* Invalidate any cached state: */
                __fpu_invalidate_fpregs_state(fpu);
        } else {
                fpstate_init(&fpu->state);
@@ -310,73 +300,10 @@ void fpu__activate_fpstate_write(struct fpu *fpu)
 
                trace_x86_fpu_activate_state(fpu);
                /* Safe to do for stopped child tasks: */
-               fpu->fpstate_active = 1;
+               fpu->initialized = 1;
        }
 }
 
-/*
- * This function must be called before we write the current
- * task's fpstate.
- *
- * This call gets the current FPU register state and moves
- * it in to the 'fpstate'.  Preemption is disabled so that
- * no writes to the 'fpstate' can occur from context
- * swiches.
- *
- * Must be followed by a fpu__current_fpstate_write_end().
- */
-void fpu__current_fpstate_write_begin(void)
-{
-       struct fpu *fpu = &current->thread.fpu;
-
-       /*
-        * Ensure that the context-switching code does not write
-        * over the fpstate while we are doing our update.
-        */
-       preempt_disable();
-
-       /*
-        * Move the fpregs in to the fpu's 'fpstate'.
-        */
-       fpu__activate_fpstate_read(fpu);
-
-       /*
-        * The caller is about to write to 'fpu'.  Ensure that no
-        * CPU thinks that its fpregs match the fpstate.  This
-        * ensures we will not be lazy and skip a XRSTOR in the
-        * future.
-        */
-       __fpu_invalidate_fpregs_state(fpu);
-}
-
-/*
- * This function must be paired with fpu__current_fpstate_write_begin()
- *
- * This will ensure that the modified fpstate gets placed back in
- * the fpregs if necessary.
- *
- * Note: This function may be called whether or not an _actual_
- * write to the fpstate occurred.
- */
-void fpu__current_fpstate_write_end(void)
-{
-       struct fpu *fpu = &current->thread.fpu;
-
-       /*
-        * 'fpu' now has an updated copy of the state, but the
-        * registers may still be out of date.  Update them with
-        * an XRSTOR if they are active.
-        */
-       if (fpregs_active())
-               copy_kernel_to_fpregs(&fpu->state);
-
-       /*
-        * Our update is done and the fpregs/fpstate are in sync
-        * if necessary.  Context switches can happen again.
-        */
-       preempt_enable();
-}
-
 /*
  * 'fpu__restore()' is called to copy FPU registers from
  * the FPU fpstate to the live hw registers and to activate
@@ -389,7 +316,7 @@ void fpu__current_fpstate_write_end(void)
  */
 void fpu__restore(struct fpu *fpu)
 {
-       fpu__activate_curr(fpu);
+       fpu__initialize(fpu);
 
        /* Avoid __kernel_fpu_begin() right after fpregs_activate() */
        kernel_fpu_disable();
@@ -414,15 +341,17 @@ void fpu__drop(struct fpu *fpu)
 {
        preempt_disable();
 
-       if (fpu->fpregs_active) {
-               /* Ignore delayed exceptions from user space */
-               asm volatile("1: fwait\n"
-                            "2:\n"
-                            _ASM_EXTABLE(1b, 2b));
-               fpregs_deactivate(fpu);
+       if (fpu == &current->thread.fpu) {
+               if (fpu->initialized) {
+                       /* Ignore delayed exceptions from user space */
+                       asm volatile("1: fwait\n"
+                                    "2:\n"
+                                    _ASM_EXTABLE(1b, 2b));
+                       fpregs_deactivate(fpu);
+               }
        }
 
-       fpu->fpstate_active = 0;
+       fpu->initialized = 0;
 
        trace_x86_fpu_dropped(fpu);
 
@@ -462,9 +391,11 @@ void fpu__clear(struct fpu *fpu)
         * Make sure fpstate is cleared and initialized.
         */
        if (static_cpu_has(X86_FEATURE_FPU)) {
-               fpu__activate_curr(fpu);
+               preempt_disable();
+               fpu__initialize(fpu);
                user_fpu_begin();
                copy_init_fpstate_to_fpregs();
+               preempt_enable();
        }
 }
 
index d5d44c452624c88e3abb5c75e68d00b55fee6019..7affb7e3d9a5b94326b51528119787f4f956640b 100644 (file)
@@ -240,7 +240,7 @@ static void __init fpu__init_system_ctx_switch(void)
        WARN_ON_FPU(!on_boot_cpu);
        on_boot_cpu = 0;
 
-       WARN_ON_FPU(current->thread.fpu.fpstate_active);
+       WARN_ON_FPU(current->thread.fpu.initialized);
 }
 
 /*
index b188b16841e376574c5f39e55b7b687ffdd09495..bc02f5144b958bd8182f284e2cfa6dd5a65384c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * FPU register's regset abstraction, for ptrace, core dumps, etc.
  */
@@ -16,14 +17,14 @@ int regset_fpregs_active(struct task_struct *target, const struct user_regset *r
 {
        struct fpu *target_fpu = &target->thread.fpu;
 
-       return target_fpu->fpstate_active ? regset->n : 0;
+       return target_fpu->initialized ? regset->n : 0;
 }
 
 int regset_xregset_fpregs_active(struct task_struct *target, const struct user_regset *regset)
 {
        struct fpu *target_fpu = &target->thread.fpu;
 
-       if (boot_cpu_has(X86_FEATURE_FXSR) && target_fpu->fpstate_active)
+       if (boot_cpu_has(X86_FEATURE_FXSR) && target_fpu->initialized)
                return regset->n;
        else
                return 0;
@@ -38,7 +39,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
        if (!boot_cpu_has(X86_FEATURE_FXSR))
                return -ENODEV;
 
-       fpu__activate_fpstate_read(fpu);
+       fpu__prepare_read(fpu);
        fpstate_sanitize_xstate(fpu);
 
        return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
@@ -55,7 +56,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
        if (!boot_cpu_has(X86_FEATURE_FXSR))
                return -ENODEV;
 
-       fpu__activate_fpstate_write(fpu);
+       fpu__prepare_write(fpu);
        fpstate_sanitize_xstate(fpu);
 
        ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
@@ -89,10 +90,13 @@ int xstateregs_get(struct task_struct *target, const struct user_regset *regset,
 
        xsave = &fpu->state.xsave;
 
-       fpu__activate_fpstate_read(fpu);
+       fpu__prepare_read(fpu);
 
        if (using_compacted_format()) {
-               ret = copyout_from_xsaves(pos, count, kbuf, ubuf, xsave);
+               if (kbuf)
+                       ret = copy_xstate_to_kernel(kbuf, xsave, pos, count);
+               else
+                       ret = copy_xstate_to_user(ubuf, xsave, pos, count);
        } else {
                fpstate_sanitize_xstate(fpu);
                /*
@@ -129,28 +133,29 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
 
        xsave = &fpu->state.xsave;
 
-       fpu__activate_fpstate_write(fpu);
+       fpu__prepare_write(fpu);
 
-       if (boot_cpu_has(X86_FEATURE_XSAVES))
-               ret = copyin_to_xsaves(kbuf, ubuf, xsave);
-       else
+       if (using_compacted_format()) {
+               if (kbuf)
+                       ret = copy_kernel_to_xstate(xsave, kbuf);
+               else
+                       ret = copy_user_to_xstate(xsave, ubuf);
+       } else {
                ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, xsave, 0, -1);
-
-       /*
-        * In case of failure, mark all states as init:
-        */
-       if (ret)
-               fpstate_init(&fpu->state);
+               if (!ret)
+                       ret = validate_xstate_header(&xsave->header);
+       }
 
        /*
         * mxcsr reserved bits must be masked to zero for security reasons.
         */
        xsave->i387.mxcsr &= mxcsr_feature_mask;
-       xsave->header.xfeatures &= xfeatures_mask;
+
        /*
-        * These bits must be zero.
+        * In case of failure, mark all states as init:
         */
-       memset(&xsave->header.reserved, 0, 48);
+       if (ret)
+               fpstate_init(&fpu->state);
 
        return ret;
 }
@@ -299,7 +304,7 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset,
        struct fpu *fpu = &target->thread.fpu;
        struct user_i387_ia32_struct env;
 
-       fpu__activate_fpstate_read(fpu);
+       fpu__prepare_read(fpu);
 
        if (!boot_cpu_has(X86_FEATURE_FPU))
                return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);
@@ -329,7 +334,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
        struct user_i387_ia32_struct env;
        int ret;
 
-       fpu__activate_fpstate_write(fpu);
+       fpu__prepare_write(fpu);
        fpstate_sanitize_xstate(fpu);
 
        if (!boot_cpu_has(X86_FEATURE_FPU))
@@ -369,7 +374,7 @@ int dump_fpu(struct pt_regs *regs, struct user_i387_struct *ufpu)
        struct fpu *fpu = &tsk->thread.fpu;
        int fpvalid;
 
-       fpvalid = fpu->fpstate_active;
+       fpvalid = fpu->initialized;
        if (fpvalid)
                fpvalid = !fpregs_get(tsk, NULL,
                                      0, sizeof(struct user_i387_ia32_struct),
index 83c23c230b4c4fc78664ba08663a04c684c2105b..23f1691670b66c3ad8efcbc2db79bd495e266c1d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * FPU signal frame handling routines.
  */
@@ -155,7 +156,8 @@ static inline int copy_fpregs_to_sigframe(struct xregs_state __user *buf)
  */
 int copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size)
 {
-       struct xregs_state *xsave = &current->thread.fpu.state.xsave;
+       struct fpu *fpu = &current->thread.fpu;
+       struct xregs_state *xsave = &fpu->state.xsave;
        struct task_struct *tsk = current;
        int ia32_fxstate = (buf != buf_fx);
 
@@ -170,13 +172,13 @@ int copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size)
                        sizeof(struct user_i387_ia32_struct), NULL,
                        (struct _fpstate_32 __user *) buf) ? -1 : 1;
 
-       if (fpregs_active() || using_compacted_format()) {
+       if (fpu->initialized || using_compacted_format()) {
                /* Save the live register state to the user directly. */
                if (copy_fpregs_to_sigframe(buf_fx))
                        return -1;
                /* Update the thread's fxstate to save the fsave header. */
                if (ia32_fxstate)
-                       copy_fxregs_to_kernel(&tsk->thread.fpu);
+                       copy_fxregs_to_kernel(fpu);
        } else {
                /*
                 * It is a *bug* if kernel uses compacted-format for xsave
@@ -189,7 +191,7 @@ int copy_fpstate_to_sigframe(void __user *buf, void __user *buf_fx, int size)
                        return -1;
                }
 
-               fpstate_sanitize_xstate(&tsk->thread.fpu);
+               fpstate_sanitize_xstate(fpu);
                if (__copy_to_user(buf_fx, xsave, fpu_user_xstate_size))
                        return -1;
        }
@@ -213,8 +215,11 @@ sanitize_restored_xstate(struct task_struct *tsk,
        struct xstate_header *header = &xsave->header;
 
        if (use_xsave()) {
-               /* These bits must be zero. */
-               memset(header->reserved, 0, 48);
+               /*
+                * Note: we don't need to zero the reserved bits in the
+                * xstate_header here because we either didn't copy them at all,
+                * or we checked earlier that they aren't set.
+                */
 
                /*
                 * Init the state that is not present in the memory
@@ -223,7 +228,7 @@ sanitize_restored_xstate(struct task_struct *tsk,
                if (fx_only)
                        header->xfeatures = XFEATURE_MASK_FPSSE;
                else
-                       header->xfeatures &= (xfeatures_mask & xfeatures);
+                       header->xfeatures &= xfeatures;
        }
 
        if (use_fxsr()) {
@@ -279,7 +284,7 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
        if (!access_ok(VERIFY_READ, buf, size))
                return -EACCES;
 
-       fpu__activate_curr(fpu);
+       fpu__initialize(fpu);
 
        if (!static_cpu_has(X86_FEATURE_FPU))
                return fpregs_soft_set(current, NULL,
@@ -307,28 +312,29 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
                /*
                 * For 32-bit frames with fxstate, copy the user state to the
                 * thread's fpu state, reconstruct fxstate from the fsave
-                * header. Sanitize the copied state etc.
+                * header. Validate and sanitize the copied state.
                 */
                struct fpu *fpu = &tsk->thread.fpu;
                struct user_i387_ia32_struct env;
                int err = 0;
 
                /*
-                * Drop the current fpu which clears fpu->fpstate_active. This ensures
+                * Drop the current fpu which clears fpu->initialized. This ensures
                 * that any context-switch during the copy of the new state,
                 * avoids the intermediate state from getting restored/saved.
                 * Thus avoiding the new restored state from getting corrupted.
                 * We will be ready to restore/save the state only after
-                * fpu->fpstate_active is again set.
+                * fpu->initialized is again set.
                 */
                fpu__drop(fpu);
 
                if (using_compacted_format()) {
-                       err = copyin_to_xsaves(NULL, buf_fx,
-                                              &fpu->state.xsave);
+                       err = copy_user_to_xstate(&fpu->state.xsave, buf_fx);
                } else {
-                       err = __copy_from_user(&fpu->state.xsave,
-                                              buf_fx, state_size);
+                       err = __copy_from_user(&fpu->state.xsave, buf_fx, state_size);
+
+                       if (!err && state_size > offsetof(struct xregs_state, header))
+                               err = validate_xstate_header(&fpu->state.xsave.header);
                }
 
                if (err || __copy_from_user(&env, buf, sizeof(env))) {
@@ -339,7 +345,7 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
                        sanitize_restored_xstate(tsk, &env, xfeatures, fx_only);
                }
 
-               fpu->fpstate_active = 1;
+               fpu->initialized = 1;
                preempt_disable();
                fpu__restore(fpu);
                preempt_enable();
index c24ac1efb12d7a1574450a1359699309148afcd6..f1d5476c902209eebeae83d3cd30fe5b6226921c 100644 (file)
@@ -483,6 +483,30 @@ int using_compacted_format(void)
        return boot_cpu_has(X86_FEATURE_XSAVES);
 }
 
+/* Validate an xstate header supplied by userspace (ptrace or sigreturn) */
+int validate_xstate_header(const struct xstate_header *hdr)
+{
+       /* No unknown or supervisor features may be set */
+       if (hdr->xfeatures & (~xfeatures_mask | XFEATURE_MASK_SUPERVISOR))
+               return -EINVAL;
+
+       /* Userspace must use the uncompacted format */
+       if (hdr->xcomp_bv)
+               return -EINVAL;
+
+       /*
+        * If 'reserved' is shrunken to add a new field, make sure to validate
+        * that new field here!
+        */
+       BUILD_BUG_ON(sizeof(hdr->reserved) != 48);
+
+       /* No reserved bits may be set */
+       if (memchr_inv(hdr->reserved, 0, sizeof(hdr->reserved)))
+               return -EINVAL;
+
+       return 0;
+}
+
 static void __xstate_dump_leaves(void)
 {
        int i;
@@ -867,7 +891,7 @@ const void *get_xsave_field_ptr(int xsave_state)
 {
        struct fpu *fpu = &current->thread.fpu;
 
-       if (!fpu->fpstate_active)
+       if (!fpu->initialized)
                return NULL;
        /*
         * fpu__save() takes the CPU's xstate registers
@@ -920,39 +944,130 @@ int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
 }
 #endif /* ! CONFIG_ARCH_HAS_PKEYS */
 
+/*
+ * Weird legacy quirk: SSE and YMM states store information in the
+ * MXCSR and MXCSR_FLAGS fields of the FP area. That means if the FP
+ * area is marked as unused in the xfeatures header, we need to copy
+ * MXCSR and MXCSR_FLAGS if either SSE or YMM are in use.
+ */
+static inline bool xfeatures_mxcsr_quirk(u64 xfeatures)
+{
+       if (!(xfeatures & (XFEATURE_MASK_SSE|XFEATURE_MASK_YMM)))
+               return false;
+
+       if (xfeatures & XFEATURE_MASK_FP)
+               return false;
+
+       return true;
+}
+
 /*
  * This is similar to user_regset_copyout(), but will not add offset to
  * the source data pointer or increment pos, count, kbuf, and ubuf.
  */
-static inline int xstate_copyout(unsigned int pos, unsigned int count,
-                                void *kbuf, void __user *ubuf,
-                                const void *data, const int start_pos,
-                                const int end_pos)
+static inline void
+__copy_xstate_to_kernel(void *kbuf, const void *data,
+                       unsigned int offset, unsigned int size, unsigned int size_total)
 {
-       if ((count == 0) || (pos < start_pos))
-               return 0;
+       if (offset < size_total) {
+               unsigned int copy = min(size, size_total - offset);
 
-       if (end_pos < 0 || pos < end_pos) {
-               unsigned int copy = (end_pos < 0 ? count : min(count, end_pos - pos));
+               memcpy(kbuf + offset, data, copy);
+       }
+}
 
-               if (kbuf) {
-                       memcpy(kbuf + pos, data, copy);
-               } else {
-                       if (__copy_to_user(ubuf + pos, data, copy))
-                               return -EFAULT;
+/*
+ * Convert from kernel XSAVES compacted format to standard format and copy
+ * to a kernel-space ptrace buffer.
+ *
+ * It supports partial copy but pos always starts from zero. This is called
+ * from xstateregs_get() and there we check the CPU has XSAVES.
+ */
+int copy_xstate_to_kernel(void *kbuf, struct xregs_state *xsave, unsigned int offset_start, unsigned int size_total)
+{
+       unsigned int offset, size;
+       struct xstate_header header;
+       int i;
+
+       /*
+        * Currently copy_regset_to_user() starts from pos 0:
+        */
+       if (unlikely(offset_start != 0))
+               return -EFAULT;
+
+       /*
+        * The destination is a ptrace buffer; we put in only user xstates:
+        */
+       memset(&header, 0, sizeof(header));
+       header.xfeatures = xsave->header.xfeatures;
+       header.xfeatures &= ~XFEATURE_MASK_SUPERVISOR;
+
+       /*
+        * Copy xregs_state->header:
+        */
+       offset = offsetof(struct xregs_state, header);
+       size = sizeof(header);
+
+       __copy_xstate_to_kernel(kbuf, &header, offset, size, size_total);
+
+       for (i = 0; i < XFEATURE_MAX; i++) {
+               /*
+                * Copy only in-use xstates:
+                */
+               if ((header.xfeatures >> i) & 1) {
+                       void *src = __raw_xsave_addr(xsave, 1 << i);
+
+                       offset = xstate_offsets[i];
+                       size = xstate_sizes[i];
+
+                       /* The next component has to fit fully into the output buffer: */
+                       if (offset + size > size_total)
+                               break;
+
+                       __copy_xstate_to_kernel(kbuf, src, offset, size, size_total);
                }
+
+       }
+
+       if (xfeatures_mxcsr_quirk(header.xfeatures)) {
+               offset = offsetof(struct fxregs_state, mxcsr);
+               size = MXCSR_AND_FLAGS_SIZE;
+               __copy_xstate_to_kernel(kbuf, &xsave->i387.mxcsr, offset, size, size_total);
+       }
+
+       /*
+        * Fill xsave->i387.sw_reserved value for ptrace frame:
+        */
+       offset = offsetof(struct fxregs_state, sw_reserved);
+       size = sizeof(xstate_fx_sw_bytes);
+
+       __copy_xstate_to_kernel(kbuf, xstate_fx_sw_bytes, offset, size, size_total);
+
+       return 0;
+}
+
+static inline int
+__copy_xstate_to_user(void __user *ubuf, const void *data, unsigned int offset, unsigned int size, unsigned int size_total)
+{
+       if (!size)
+               return 0;
+
+       if (offset < size_total) {
+               unsigned int copy = min(size, size_total - offset);
+
+               if (__copy_to_user(ubuf + offset, data, copy))
+                       return -EFAULT;
        }
        return 0;
 }
 
 /*
  * Convert from kernel XSAVES compacted format to standard format and copy
- * to a ptrace buffer. It supports partial copy but pos always starts from
+ * to a user-space buffer. It supports partial copy but pos always starts from
  * zero. This is called from xstateregs_get() and there we check the CPU
  * has XSAVES.
  */
-int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
-                       void __user *ubuf, struct xregs_state *xsave)
+int copy_xstate_to_user(void __user *ubuf, struct xregs_state *xsave, unsigned int offset_start, unsigned int size_total)
 {
        unsigned int offset, size;
        int ret, i;
@@ -961,7 +1076,7 @@ int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
        /*
         * Currently copy_regset_to_user() starts from pos 0:
         */
-       if (unlikely(pos != 0))
+       if (unlikely(offset_start != 0))
                return -EFAULT;
 
        /*
@@ -977,8 +1092,7 @@ int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
        offset = offsetof(struct xregs_state, header);
        size = sizeof(header);
 
-       ret = xstate_copyout(offset, size, kbuf, ubuf, &header, 0, count);
-
+       ret = __copy_xstate_to_user(ubuf, &header, offset, size, size_total);
        if (ret)
                return ret;
 
@@ -992,25 +1106,30 @@ int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
                        offset = xstate_offsets[i];
                        size = xstate_sizes[i];
 
-                       ret = xstate_copyout(offset, size, kbuf, ubuf, src, 0, count);
+                       /* The next component has to fit fully into the output buffer: */
+                       if (offset + size > size_total)
+                               break;
 
+                       ret = __copy_xstate_to_user(ubuf, src, offset, size, size_total);
                        if (ret)
                                return ret;
-
-                       if (offset + size >= count)
-                               break;
                }
 
        }
 
+       if (xfeatures_mxcsr_quirk(header.xfeatures)) {
+               offset = offsetof(struct fxregs_state, mxcsr);
+               size = MXCSR_AND_FLAGS_SIZE;
+               __copy_xstate_to_user(ubuf, &xsave->i387.mxcsr, offset, size, size_total);
+       }
+
        /*
         * Fill xsave->i387.sw_reserved value for ptrace frame:
         */
        offset = offsetof(struct fxregs_state, sw_reserved);
        size = sizeof(xstate_fx_sw_bytes);
 
-       ret = xstate_copyout(offset, size, kbuf, ubuf, xstate_fx_sw_bytes, 0, count);
-
+       ret = __copy_xstate_to_user(ubuf, xstate_fx_sw_bytes, offset, size, size_total);
        if (ret)
                return ret;
 
@@ -1018,55 +1137,98 @@ int copyout_from_xsaves(unsigned int pos, unsigned int count, void *kbuf,
 }
 
 /*
- * Convert from a ptrace standard-format buffer to kernel XSAVES format
- * and copy to the target thread. This is called from xstateregs_set() and
- * there we check the CPU has XSAVES and a whole standard-sized buffer
- * exists.
+ * Convert from a ptrace standard-format kernel buffer to kernel XSAVES format
+ * and copy to the target thread. This is called from xstateregs_set().
  */
-int copyin_to_xsaves(const void *kbuf, const void __user *ubuf,
-                    struct xregs_state *xsave)
+int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf)
 {
        unsigned int offset, size;
        int i;
-       u64 xfeatures;
-       u64 allowed_features;
+       struct xstate_header hdr;
 
        offset = offsetof(struct xregs_state, header);
-       size = sizeof(xfeatures);
+       size = sizeof(hdr);
 
-       if (kbuf) {
-               memcpy(&xfeatures, kbuf + offset, size);
-       } else {
-               if (__copy_from_user(&xfeatures, ubuf + offset, size))
-                       return -EFAULT;
+       memcpy(&hdr, kbuf + offset, size);
+
+       if (validate_xstate_header(&hdr))
+               return -EINVAL;
+
+       for (i = 0; i < XFEATURE_MAX; i++) {
+               u64 mask = ((u64)1 << i);
+
+               if (hdr.xfeatures & mask) {
+                       void *dst = __raw_xsave_addr(xsave, 1 << i);
+
+                       offset = xstate_offsets[i];
+                       size = xstate_sizes[i];
+
+                       memcpy(dst, kbuf + offset, size);
+               }
+       }
+
+       if (xfeatures_mxcsr_quirk(hdr.xfeatures)) {
+               offset = offsetof(struct fxregs_state, mxcsr);
+               size = MXCSR_AND_FLAGS_SIZE;
+               memcpy(&xsave->i387.mxcsr, kbuf + offset, size);
        }
 
        /*
-        * Reject if the user sets any disabled or supervisor features:
+        * The state that came in from userspace was user-state only.
+        * Mask all the user states out of 'xfeatures':
+        */
+       xsave->header.xfeatures &= XFEATURE_MASK_SUPERVISOR;
+
+       /*
+        * Add back in the features that came in from userspace:
         */
-       allowed_features = xfeatures_mask & ~XFEATURE_MASK_SUPERVISOR;
+       xsave->header.xfeatures |= hdr.xfeatures;
 
-       if (xfeatures & ~allowed_features)
+       return 0;
+}
+
+/*
+ * Convert from a ptrace or sigreturn standard-format user-space buffer to
+ * kernel XSAVES format and copy to the target thread. This is called from
+ * xstateregs_set(), as well as potentially from the sigreturn() and
+ * rt_sigreturn() system calls.
+ */
+int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf)
+{
+       unsigned int offset, size;
+       int i;
+       struct xstate_header hdr;
+
+       offset = offsetof(struct xregs_state, header);
+       size = sizeof(hdr);
+
+       if (__copy_from_user(&hdr, ubuf + offset, size))
+               return -EFAULT;
+
+       if (validate_xstate_header(&hdr))
                return -EINVAL;
 
        for (i = 0; i < XFEATURE_MAX; i++) {
                u64 mask = ((u64)1 << i);
 
-               if (xfeatures & mask) {
+               if (hdr.xfeatures & mask) {
                        void *dst = __raw_xsave_addr(xsave, 1 << i);
 
                        offset = xstate_offsets[i];
                        size = xstate_sizes[i];
 
-                       if (kbuf) {
-                               memcpy(dst, kbuf + offset, size);
-                       } else {
-                               if (__copy_from_user(dst, ubuf + offset, size))
-                                       return -EFAULT;
-                       }
+                       if (__copy_from_user(dst, ubuf + offset, size))
+                               return -EFAULT;
                }
        }
 
+       if (xfeatures_mxcsr_quirk(hdr.xfeatures)) {
+               offset = offsetof(struct fxregs_state, mxcsr);
+               size = MXCSR_AND_FLAGS_SIZE;
+               if (__copy_from_user(&xsave->i387.mxcsr, ubuf + offset, size))
+                       return -EFAULT;
+       }
+
        /*
         * The state that came in from userspace was user-state only.
         * Mask all the user states out of 'xfeatures':
@@ -1076,7 +1238,7 @@ int copyin_to_xsaves(const void *kbuf, const void __user *ubuf,
        /*
         * Add back in the features that came in from userspace:
         */
-       xsave->header.xfeatures |= xfeatures;
+       xsave->header.xfeatures |= hdr.xfeatures;
 
        return 0;
 }
index 9bef1bbeba63885e3ba584960b97e8c190b4c5a8..01ebcb6f263e39accb3f8e53ab7eb5372e0726f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dynamic function tracing support.
  *
index 722a145b4139bc1072eb41cfb3e6c0b84b3ad334..b6c6468e10bc96625c25c4ae8d19b734af81366b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 2017  Steven Rostedt, VMware Inc.
  */
index 1dfac634bbf7f2a5470d0c12d2074a9cf71d4fc4..c832291d948a6b4fd487a3e42fab8b8f7b9dd244 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 2014  Steven Rostedt, Red Hat Inc
  */
index cf2ce063f65aff6166d51aa74e56d1ebdd22bb41..ec6fefbfd3c0454b009a2a7a04a76edc44b8c5e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/i386/kernel/head32.c -- prepare to run common code
  *
@@ -30,10 +31,11 @@ static void __init i386_default_early_setup(void)
 
 asmlinkage __visible void __init i386_start_kernel(void)
 {
-       cr4_init_shadow();
-
+       /* Make sure IDT is set up before any exception happens */
        idt_setup_early_handler();
 
+       cr4_init_shadow();
+
        sanitize_boot_params(&boot_params);
 
        x86_early_init_platform_quirks();
index bab4fa579450cd5192a60366993a168493789fb4..6a5d757b9cfdc7c9bf4b815c0c13197ecbd32719 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  prepare to run common code
  *
index 9ed3074d0d2747baf51f9d1e83b388a61d7b8d78..f1d528bb66a6ceb54d3b506f3df09ac92f3e8a82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
index 513cbb012eccc51f18ac16f9dac74a33abaa4c16..6dde3f3fc1f8e7cc213ded1d9098a17649d0e54d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/arch/x86/kernel/head_64.S -- start in 32bit and switch to 64bit
  *
index 6ebe00cb4a3b704d19eca6a75dce913135446262..0d307a657abbb253d4679471bd1ac202279ff447 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * 8253/PIT functions
  *
index 4e3b8a587c882ee8a0e2c39678fde12738c7752c..8f5cb2c7060cfc29b46ec24669ec418dfdf0c0df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/linkage.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
index 7ebcc4a744389d192df8d9c2078922a2ffbca74a..805b7a341aca2e773b67317aea90f334ea0f96d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * I/O delay strategies for inb_p/outb_p
  *
index 9c3cf0944bce35471cf0d1c34eac1e9a92d2eaa7..3feb648781c470a7a49ee26749712ba7da891fe9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This contains the io-permission bitmap code - written by obz, with changes
  * by Linus. 32/64 bits code unification by Miguel Botón.
index 1f38d9a4d9deaf707af2b7e658bd9e9022ba8d75..a83b3346a0e104833793687aea68f7f216cf0374 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
  *
@@ -64,7 +65,7 @@ static void call_on_stack(void *func, void *stack)
 
 static inline void *current_stack(void)
 {
-       return (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1));
+       return (void *)(current_stack_pointer & ~(THREAD_SIZE - 1));
 }
 
 static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc)
@@ -88,7 +89,7 @@ static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc)
 
        /* Save the next esp at the bottom of the stack */
        prev_esp = (u32 *)irqstk;
-       *prev_esp = current_stack_pointer();
+       *prev_esp = current_stack_pointer;
 
        if (unlikely(overflow))
                call_on_stack(print_stack_overflow, isp);
@@ -139,7 +140,7 @@ void do_softirq_own_stack(void)
 
        /* Push the previous esp onto the stack */
        prev_esp = (u32 *)irqstk;
-       *prev_esp = current_stack_pointer();
+       *prev_esp = current_stack_pointer;
 
        call_on_stack(__do_softirq, isp);
 }
index 3be74fbdeff27f63934667aa7813a06426f19b43..020efbf5786b35d343a8632cd14ac4f800465d9b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
  *
index 70dee056f92b671ac1b3f77c68c83d187262b095..80bee7695a2040122c48deb65452f93890ac41f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * x86 specific code for irq_work
  *
index 1add9e08e83ede731aab12d650a4284d97120cf6..1e4094eba15e95e6f9b3c6f19de6d748bb894dd1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/linkage.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
index ab4f491da2a982789073952a2c2ffd599823cdf7..e56c95be2808af74b93c879a5df48201056329b2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * jump label x86 support
  *
index db2182d63ed0c40ae9057ea100314d0a7c7de8fb..615105cf7d58073f9ec03e041b3dd3749f1bfd60 100644 (file)
@@ -1,8 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __X86_KERNEL_KPROBES_COMMON_H
 #define __X86_KERNEL_KPROBES_COMMON_H
 
 /* Kprobes and Optprobes common header */
 
+#include <asm/asm.h>
+
+#ifdef CONFIG_FRAME_POINTER
+# define SAVE_RBP_STRING "     push %" _ASM_BP "\n" \
+                        "      mov  %" _ASM_SP ", %" _ASM_BP "\n"
+#else
+# define SAVE_RBP_STRING "     push %" _ASM_BP "\n"
+#endif
+
 #ifdef CONFIG_X86_64
 #define SAVE_REGS_STRING                       \
        /* Skip cs, ip, orig_ax. */             \
@@ -17,7 +27,7 @@
        "       pushq %r10\n"                   \
        "       pushq %r11\n"                   \
        "       pushq %rbx\n"                   \
-       "       pushq %rbp\n"                   \
+       SAVE_RBP_STRING                         \
        "       pushq %r12\n"                   \
        "       pushq %r13\n"                   \
        "       pushq %r14\n"                   \
@@ -48,7 +58,7 @@
        "       pushl %es\n"                    \
        "       pushl %ds\n"                    \
        "       pushl %eax\n"                   \
-       "       pushl %ebp\n"                   \
+       SAVE_RBP_STRING                         \
        "       pushl %edi\n"                   \
        "       pushl %esi\n"                   \
        "       pushl %edx\n"                   \
index f0153714ddac6b2305645ef5c0e35fd3a6c9fb2c..0742491cbb734d29e1be790d890aeb5271ea6eb4 100644 (file)
@@ -1080,8 +1080,6 @@ int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
         * raw stack chunk with redzones:
         */
        __memcpy(kcb->jprobes_stack, (kprobe_opcode_t *)addr, MIN_STACK_SIZE(addr));
-       regs->flags &= ~X86_EFLAGS_IF;
-       trace_hardirqs_off();
        regs->ip = (unsigned long)(jp->entry);
 
        /*
index 4b0592ca9e47b332d0ce67f8bcf5f555653587b2..8c1cc08f514f4362bdaefa933fda3cd3769b04f9 100644 (file)
@@ -299,7 +299,7 @@ static int __init create_setup_data_nodes(struct kobject *parent)
        return 0;
 
 out_clean_nodes:
-       for (j = i - 1; j > 0; j--)
+       for (j = i - 1; j >= 0; j--)
                cleanup_setup_data_node(*(kobjp + j));
        kfree(kobjp);
 out_setup_data_kobj:
index aa60a08b65b1090392b542ec7dc642e9827b7606..8bb9594d076166ee0f6bd4f70350fe3ecf8c3d8b 100644 (file)
@@ -117,7 +117,11 @@ static struct kvm_task_sleep_node *_find_apf_task(struct kvm_task_sleep_head *b,
        return NULL;
 }
 
-void kvm_async_pf_task_wait(u32 token)
+/*
+ * @interrupt_kernel: Is this called from a routine which interrupts the kernel
+ *                   (other than user space)?
+ */
+void kvm_async_pf_task_wait(u32 token, int interrupt_kernel)
 {
        u32 key = hash_32(token, KVM_TASK_SLEEP_HASHBITS);
        struct kvm_task_sleep_head *b = &async_pf_sleepers[key];
@@ -140,7 +144,10 @@ void kvm_async_pf_task_wait(u32 token)
 
        n.token = token;
        n.cpu = smp_processor_id();
-       n.halted = is_idle_task(current) || preempt_count() > 1;
+       n.halted = is_idle_task(current) ||
+                  (IS_ENABLED(CONFIG_PREEMPT_COUNT)
+                   ? preempt_count() > 1 || rcu_preempt_depth()
+                   : interrupt_kernel);
        init_swait_queue_head(&n.wq);
        hlist_add_head(&n.link, &b->list);
        raw_spin_unlock(&b->lock);
@@ -268,7 +275,7 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
        case KVM_PV_REASON_PAGE_NOT_PRESENT:
                /* page is swapped out by the host. */
                prev_state = exception_enter();
-               kvm_async_pf_task_wait((u32)read_cr2());
+               kvm_async_pf_task_wait((u32)read_cr2(), !user_mode(regs));
                exception_exit(prev_state);
                break;
        case KVM_PV_REASON_PAGE_READY:
index d88967659098b59478633d9707e0045562fdd85c..5b609e28ce3f40514be95ac47cddd5a0c4d77ab0 100644 (file)
@@ -79,7 +79,7 @@ static void kvm_get_wallclock(struct timespec *now)
 
 static int kvm_set_wallclock(const struct timespec *now)
 {
-       return -1;
+       return -ENODEV;
 }
 
 static u64 kvm_clock_read(void)
index f0e64db18ac83db5f45e6bb7f531e1536d11522a..4d17bacf40308cbc9e0414b1b60d038f7a340f0a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
  * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
index f4c886d9165c5915968d7bf10c7c3fc961280d54..b5cb49e57df850343f63cae4ba197361a09f1f51 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * AMD Family 10h mmconfig enablement
  */
index 62e7d70aadd5ffece72b357ac1e3024a1b9f7897..da0c160e558905c2164bf1d3879bd1a1cf368f34 100644 (file)
@@ -172,19 +172,27 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
                case R_X86_64_NONE:
                        break;
                case R_X86_64_64:
+                       if (*(u64 *)loc != 0)
+                               goto invalid_relocation;
                        *(u64 *)loc = val;
                        break;
                case R_X86_64_32:
+                       if (*(u32 *)loc != 0)
+                               goto invalid_relocation;
                        *(u32 *)loc = val;
                        if (val != *(u32 *)loc)
                                goto overflow;
                        break;
                case R_X86_64_32S:
+                       if (*(s32 *)loc != 0)
+                               goto invalid_relocation;
                        *(s32 *)loc = val;
                        if ((s64)val != *(s32 *)loc)
                                goto overflow;
                        break;
                case R_X86_64_PC32:
+                       if (*(u32 *)loc != 0)
+                               goto invalid_relocation;
                        val -= (u64)loc;
                        *(u32 *)loc = val;
 #if 0
@@ -200,6 +208,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
        }
        return 0;
 
+invalid_relocation:
+       pr_err("x86/modules: Skipping invalid relocation target, existing value is nonzero for type %d, loc %p, val %Lx\n",
+              (int)ELF64_R_TYPE(rel[i].r_info), loc, val);
+       return -ENOEXEC;
+
 overflow:
        pr_err("overflow in relocation type %d val %Lx\n",
               (int)ELF64_R_TYPE(rel[i].r_info), val);
index 5cbb3177ed17270b993a4c1a686282ce80608ed1..410c5dadcee31930f8c30ddaeb1b4c940835a081 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Intel Multiprocessor Specification 1.1 and 1.4
  *     compliant MP-table parsing routines.
index d27f8d84c4ff70cf1fd6f5a83e0c143e809b9ccc..a1a96df3dff11923d59d17d2dc553eb56b333b09 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/x86/kernel/nmi-selftest.c
  *
index 8f2d1c9d43a8f285fe70c2c0f4e9021b56936e72..71f2d1125ec0fcfb4ac88d6160fe6c0674712367 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Split spinlock implementation out into its own file, so it can be
  * compiled in a FTRACE-compatible way.
index 553acbbb4d32d72d0807f037a513fe05cfd7629b..758e69d72ebf3c11797c7ab09778f9ceb9d84756 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/paravirt.h>
 
 DEF_NATIVE(pv_irq_ops, irq_disable, "cli");
index 11aaf1eaa0e4c9eb6373a3856fdc4af3ad143360..ac0be8283325edfdc2752f862b4c0cef208a931c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/paravirt.h>
 #include <asm/asm-offsets.h>
 #include <linux/stringify.h>
index 0accc2404b9214d1b318577668f103bc41bc8d35..599d7462ecccf5051af086ea4f1fa111bc255c55 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/dma-mapping.h>
 #include <linux/dma-debug.h>
 #include <linux/dmar.h>
index f712dfdf1357f7bf1164d9c03ce2a6789eaf1522..4dfd90a75e63a13fe37469982d727347f9359e01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/dma-mapping.h>
 #include <asm/iommu_table.h>
 #include <linux/string.h>
index 4fc3cb60ea11a546b08ae8c2f3fdbb9007dee670..b0caae27e1b7c48039dd3a69f9be554dcf84b2e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Fallback functions when the main IOMMU code is not compiled in. This
    code is roughly equivalent to i386. */
 #include <linux/dma-mapping.h>
index 677077510e308ebfabb56d8072a2afed439f23c8..53bd05ea90d82d6444be6f4a564e0da6a5ca08b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Glue code to lib/swiotlb.c */
 
 #include <linux/pci.h>
index a311ffcaad165c13032fc8972abc4bab44d251b4..da5190a1ea168df7ab903985a2a4dadd2c0665b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/platform_device.h>
 #include <linux/err.h>
 #include <linux/init.h>
index 587d887f7f17b26d414aad4c802341819a770485..e47b2dbbdef3d14189f9e04942fba3f074be3b16 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index 502a77d0adb0504861155484d01dfd263bf47897..39a59299bfa08ec4884065c75cd5b61cc275e72b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 
index 0c5315d322c88792be616a4e451cb0973474c0e4..3fe6900678026e2cee5eb721dbba3eaae84bbb81 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015, Christoph Hellwig.
  * Copyright (c) 2015, Intel Corporation.
index 963e3fb564377d1c9aca9cab11cdcb2b78e9b20f..ee0286390a4c18dbf47412ca7bb945372873176a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/uaccess.h>
index bd6b85fac66696da70e316656ad6f0d51291f8aa..c67685337c5ac33a5d5ddcec9a07a7949ae2922e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/errno.h>
index eaa591cfd98b4d4f466f9a2afd38b508d9daffd4..697a4ce0430827c89be2cbd86caedfac97e884f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains work-arounds for x86 and x86_64 platform bugs.
  */
index 54180fa6f66fa8fe04c7528f054d642db522b617..2126b9d27c3401e5ee518b490f8cb045fc0a29cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/export.h>
@@ -105,6 +106,10 @@ void __noreturn machine_real_restart(unsigned int type)
        load_cr3(initial_page_table);
 #else
        write_cr3(real_mode_header->trampoline_pgd);
+
+       /* Exiting long mode will fail if CR4.PCIDE is set. */
+       if (static_cpu_has(X86_FEATURE_PCID))
+               cr4_clear_bits(X86_CR4_PCIDE);
 #endif
 
        /* Jump to the identity-mapped low memory code */
index c8e41e90f59ceb9da7be768fcfe197a83602742e..b7c0f142d02611fb3cddf8939aa8b88389ccd701 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is a good place to put board specific reboot fixups.
  *
index 5ab3895516ac14966a80d53f3e331c576db8c463..9b9fb7882c206c46e164d5d772cebda4b16dc540 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ioport.h>
 #include <asm/e820/api.h>
 
index 5b21cb7d84d67773c6d4bfb86ab414bf7bc1c465..69ac9cb9cac63c8c30049864c2a0092926328747 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * RTC related functions
  */
index 28dafed6c68279f46963f89c4a8ce4b01d092c57..497aa766fab38e21e5d1c24048e65a1e9c5b1e22 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
index e04442345fc0977cf73f2573f77b3df71310f0a8..b9e00e8f1c9b63a92fa380fcb4fd12ef4acb9a29 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs
@@ -263,7 +264,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
                sp = (unsigned long) ka->sa.sa_restorer;
        }
 
-       if (fpu->fpstate_active) {
+       if (fpu->initialized) {
                sp = fpu__alloc_mathframe(sp, IS_ENABLED(CONFIG_X86_32),
                                          &buf_fx, &math_size);
                *fpstate = (void __user *)sp;
@@ -279,7 +280,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
                return (void __user *)-1L;
 
        /* save i387 and extended state */
-       if (fpu->fpstate_active &&
+       if (fpu->initialized &&
            copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size) < 0)
                return (void __user *)-1L;
 
@@ -755,7 +756,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)
                /*
                 * Ensure the signal handler starts with the new fpu state.
                 */
-               if (fpu->fpstate_active)
+               if (fpu->initialized)
                        fpu__clear(fpu);
        }
        signal_setup_done(failed, ksig, stepping);
index ab9feb5887b149ee8cc284045ca96d97c8eb4e78..8c6da1a643da24feedd225a5c064d6f5ca558245 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compat.h>
 #include <linux/uaccess.h>
 #include <linux/ptrace.h>
index 0854ff1692745adf4831e2deea0cb203977847d9..ad59edd84de70cfb978b8c0bc2ac38b892418b71 100644 (file)
@@ -232,12 +232,6 @@ static void notrace start_secondary(void *unused)
         */
        if (boot_cpu_has(X86_FEATURE_PCID))
                __write_cr4(__read_cr4() | X86_CR4_PCIDE);
-       cpu_init();
-       x86_cpuinit.early_percpu_clock_init();
-       preempt_disable();
-       smp_callin();
-
-       enable_start_cpu0 = 0;
 
 #ifdef CONFIG_X86_32
        /* switch away from the initial page table */
@@ -245,6 +239,13 @@ static void notrace start_secondary(void *unused)
        __flush_tlb_all();
 #endif
 
+       cpu_init();
+       x86_cpuinit.early_percpu_clock_init();
+       preempt_disable();
+       smp_callin();
+
+       enable_start_cpu0 = 0;
+
        /* otherwise gcc will move up smp_processor_id before the cpu_init */
        barrier();
        /*
index 5ee663836c08fc8eaa78e18118f1b99bf15edb4b..60d2c3798ba28ffe902151e27541958a99d71b24 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * x86 single-step support code, common to 32-bit and 64-bit.
  */
index 73e4d28112f8a14a1d741ab664b3f76ea0bf6479..a63fe77b32179662353ba51f31d8097980d6fa74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/sched/mm.h>
index e0754cdbad37609abd1123ce16b5a9a6f7add178..879af864d99afd6c8645f0d74fe71bf6a2bade07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (c) 1991,1992,1995  Linus Torvalds
  *  Copyright (c) 1994  Alan Modra
index a106b9719c58bbe90f06b6a71c1f64af28d4d679..9a9c9b076955dd493c7de80b8d814a27dd0fceb7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
index 80bb24d9b880cd257b2daa2e8ea5aea3aaf9ea12..b8e7abe00b065e08a3982dad5e19eef70f2a191d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * X86 trace clocks
  */
index c6636d1f60b933e3bb7eb46f181d15d369b73311..5bd30c442794888ace52ffc2658c7b9b6e21d32a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Code for supporting irq vector tracepoints.
  *
index 34ea3651362ef8383fb456f24125ec4881f42668..67db4f43309ecadc86f4d7e95c6a0db0650a0d18 100644 (file)
@@ -142,7 +142,7 @@ void ist_begin_non_atomic(struct pt_regs *regs)
         * from double_fault.
         */
        BUG_ON((unsigned long)(current_top_of_stack() -
-                              current_stack_pointer()) >= THREAD_SIZE);
+                              current_stack_pointer) >= THREAD_SIZE);
 
        preempt_enable_no_resched();
 }
index 7842371bc9e47179dba5c104fadddcb9d6b184c8..e76a9881306b34fc800b4e290e1eb7d38baaad6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * check TSC synchronization.
  *
index d145a0b1f529877b67e16992ca4c3830869f9950..3dc26f95d46e8a1ea439dba8ae144bae0dc9444d 100644 (file)
@@ -44,7 +44,8 @@ static void unwind_dump(struct unwind_state *state)
                        state->stack_info.type, state->stack_info.next_sp,
                        state->stack_mask, state->graph_idx);
 
-       for (sp = state->orig_sp; sp; sp = PTR_ALIGN(stack_info.next_sp, sizeof(long))) {
+       for (sp = PTR_ALIGN(state->orig_sp, sizeof(long)); sp;
+            sp = PTR_ALIGN(stack_info.next_sp, sizeof(long))) {
                if (get_stack_info(sp, state->task, &stack_info, &visit_mask))
                        break;
 
@@ -174,6 +175,7 @@ static bool is_last_task_frame(struct unwind_state *state)
  * This determines if the frame pointer actually contains an encoded pointer to
  * pt_regs on the stack.  See ENCODE_FRAME_POINTER.
  */
+#ifdef CONFIG_X86_64
 static struct pt_regs *decode_frame_pointer(unsigned long *bp)
 {
        unsigned long regs = (unsigned long)bp;
@@ -183,6 +185,23 @@ static struct pt_regs *decode_frame_pointer(unsigned long *bp)
 
        return (struct pt_regs *)(regs & ~0x1);
 }
+#else
+static struct pt_regs *decode_frame_pointer(unsigned long *bp)
+{
+       unsigned long regs = (unsigned long)bp;
+
+       if (regs & 0x80000000)
+               return NULL;
+
+       return (struct pt_regs *)(regs | 0x80000000);
+}
+#endif
+
+#ifdef CONFIG_X86_32
+#define KERNEL_REGS_SIZE (sizeof(struct pt_regs) - 2*sizeof(long))
+#else
+#define KERNEL_REGS_SIZE (sizeof(struct pt_regs))
+#endif
 
 static bool update_stack_state(struct unwind_state *state,
                               unsigned long *next_bp)
@@ -202,7 +221,7 @@ static bool update_stack_state(struct unwind_state *state,
        regs = decode_frame_pointer(next_bp);
        if (regs) {
                frame = (unsigned long *)regs;
-               len = regs_size(regs);
+               len = KERNEL_REGS_SIZE;
                state->got_irq = true;
        } else {
                frame = next_bp;
@@ -226,6 +245,14 @@ static bool update_stack_state(struct unwind_state *state,
            frame < prev_frame_end)
                return false;
 
+       /*
+        * On 32-bit with user mode regs, make sure the last two regs are safe
+        * to access:
+        */
+       if (IS_ENABLED(CONFIG_X86_32) && regs && user_mode(regs) &&
+           !on_stack(info, frame, len + 2*sizeof(long)))
+               return false;
+
        /* Move state to the next frame: */
        if (regs) {
                state->regs = regs;
@@ -328,6 +355,13 @@ bad_address:
            state->regs->sp < (unsigned long)task_pt_regs(state->task))
                goto the_end;
 
+       /*
+        * There are some known frame pointer issues on 32-bit.  Disable
+        * unwinder warnings on 32-bit until it gets objtool support.
+        */
+       if (IS_ENABLED(CONFIG_X86_32))
+               goto the_end;
+
        if (state->regs) {
                printk_deferred_once(KERN_WARNING
                        "WARNING: kernel stack regs at %p in %s:%d has bad 'bp' value %p\n",
index 570b70d3f604a12ebb06a77c6290ba0d72824ee5..b95007e7c1b305e24ee63e728e003d53ff7a5c31 100644 (file)
@@ -86,8 +86,8 @@ static struct orc_entry *orc_find(unsigned long ip)
                idx = (ip - LOOKUP_START_IP) / LOOKUP_BLOCK_SIZE;
 
                if (unlikely((idx >= lookup_num_blocks-1))) {
-                       orc_warn("WARNING: bad lookup idx: idx=%u num=%u ip=%lx\n",
-                                idx, lookup_num_blocks, ip);
+                       orc_warn("WARNING: bad lookup idx: idx=%u num=%u ip=%pB\n",
+                                idx, lookup_num_blocks, (void *)ip);
                        return NULL;
                }
 
@@ -96,8 +96,8 @@ static struct orc_entry *orc_find(unsigned long ip)
 
                if (unlikely((__start_orc_unwind + start >= __stop_orc_unwind) ||
                             (__start_orc_unwind + stop > __stop_orc_unwind))) {
-                       orc_warn("WARNING: bad lookup value: idx=%u num=%u start=%u stop=%u ip=%lx\n",
-                                idx, lookup_num_blocks, start, stop, ip);
+                       orc_warn("WARNING: bad lookup value: idx=%u num=%u start=%u stop=%u ip=%pB\n",
+                                idx, lookup_num_blocks, start, stop, (void *)ip);
                        return NULL;
                }
 
@@ -373,7 +373,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_REG_R10:
                if (!state->regs || !state->full_regs) {
-                       orc_warn("missing regs for base reg R10 at ip %p\n",
+                       orc_warn("missing regs for base reg R10 at ip %pB\n",
                                 (void *)state->ip);
                        goto done;
                }
@@ -382,7 +382,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_REG_R13:
                if (!state->regs || !state->full_regs) {
-                       orc_warn("missing regs for base reg R13 at ip %p\n",
+                       orc_warn("missing regs for base reg R13 at ip %pB\n",
                                 (void *)state->ip);
                        goto done;
                }
@@ -391,7 +391,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_REG_DI:
                if (!state->regs || !state->full_regs) {
-                       orc_warn("missing regs for base reg DI at ip %p\n",
+                       orc_warn("missing regs for base reg DI at ip %pB\n",
                                 (void *)state->ip);
                        goto done;
                }
@@ -400,7 +400,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_REG_DX:
                if (!state->regs || !state->full_regs) {
-                       orc_warn("missing regs for base reg DX at ip %p\n",
+                       orc_warn("missing regs for base reg DX at ip %pB\n",
                                 (void *)state->ip);
                        goto done;
                }
@@ -408,7 +408,7 @@ bool unwind_next_frame(struct unwind_state *state)
                break;
 
        default:
-               orc_warn("unknown SP base reg %d for ip %p\n",
+               orc_warn("unknown SP base reg %d for ip %pB\n",
                         orc->sp_reg, (void *)state->ip);
                goto done;
        }
@@ -436,7 +436,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_TYPE_REGS:
                if (!deref_stack_regs(state, sp, &state->ip, &state->sp, true)) {
-                       orc_warn("can't dereference registers at %p for ip %p\n",
+                       orc_warn("can't dereference registers at %p for ip %pB\n",
                                 (void *)sp, (void *)orig_ip);
                        goto done;
                }
@@ -448,7 +448,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        case ORC_TYPE_REGS_IRET:
                if (!deref_stack_regs(state, sp, &state->ip, &state->sp, false)) {
-                       orc_warn("can't dereference iret registers at %p for ip %p\n",
+                       orc_warn("can't dereference iret registers at %p for ip %pB\n",
                                 (void *)sp, (void *)orig_ip);
                        goto done;
                }
@@ -465,7 +465,8 @@ bool unwind_next_frame(struct unwind_state *state)
                break;
 
        default:
-               orc_warn("unknown .orc_unwind entry type %d\n", orc->type);
+               orc_warn("unknown .orc_unwind entry type %d for ip %pB\n",
+                        orc->type, (void *)orig_ip);
                break;
        }
 
@@ -487,7 +488,7 @@ bool unwind_next_frame(struct unwind_state *state)
                break;
 
        default:
-               orc_warn("unknown BP base reg %d for ip %p\n",
+               orc_warn("unknown BP base reg %d for ip %pB\n",
                         orc->bp_reg, (void *)orig_ip);
                goto done;
        }
@@ -496,7 +497,7 @@ bool unwind_next_frame(struct unwind_state *state)
        if (state->stack_info.type == prev_type &&
            on_stack(&state->stack_info, (void *)state->sp, sizeof(long)) &&
            state->sp <= prev_sp) {
-               orc_warn("stack going in the wrong direction? ip=%p\n",
+               orc_warn("stack going in the wrong direction? ip=%pB\n",
                         (void *)orig_ip);
                goto done;
        }
index 7924a5356c8a9105171f1b07a3911758b815a3ee..68244742ecb0bc376232bbab4b94164251e434dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1994  Linus Torvalds
  *
index f05f00acac89c3846e56bbd69acdaf6665b223d9..a4009fb9be8725ce7bda96cd5e8160e524903266 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ld script for the x86 kernel
  *
index 3ea624452f9327d252dda724100bd6e97f8c6e0c..3df51c28784428ed111e065595ed9e59ef376933 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # KVM configuration
 #
@@ -23,6 +24,7 @@ config KVM
        depends on HIGH_RES_TIMERS
        # for TASKSTATS/TASK_DELAY_ACCT:
        depends on NET && MULTIUSER
+       depends on X86_LOCAL_APIC
        select PREEMPT_NOTIFIERS
        select MMU_NOTIFIER
        select ANON_INODES
index 09d4b17be0226613990f1cefc4cd2e0b3a272d8c..dc4f2fdf5e5793aee01ca5b301f2139bda73bb50 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 ccflags-y += -Iarch/x86/kvm
 
index 0bc5c1315708e6aad8b409d377be41e2291efb40..cdc70a3a65838b10d558c3d0b14bcdf4d9e996d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_X86_KVM_CPUID_H
 #define ARCH_X86_KVM_CPUID_H
 
index 16bf6655aa858e2815135ada11a462329a0df386..d90cdc77e077354f1407235e6b73f2fda21c430c 100644 (file)
@@ -425,8 +425,10 @@ static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *));
        #op " %al \n\t" \
        FOP_RET
 
-asm(".global kvm_fastop_exception \n"
-    "kvm_fastop_exception: xor %esi, %esi; ret");
+asm(".pushsection .fixup, \"ax\"\n"
+    ".global kvm_fastop_exception \n"
+    "kvm_fastop_exception: xor %esi, %esi; ret\n"
+    ".popsection");
 
 FOP_START(setcc)
 FOP_SETCC(seto)
@@ -4102,10 +4104,12 @@ static int check_cr_write(struct x86_emulate_ctxt *ctxt)
                ctxt->ops->get_msr(ctxt, MSR_EFER, &efer);
                if (efer & EFER_LMA) {
                        u64 maxphyaddr;
-                       u32 eax = 0x80000008;
+                       u32 eax, ebx, ecx, edx;
 
-                       if (ctxt->ops->get_cpuid(ctxt, &eax, NULL, NULL,
-                                                NULL, false))
+                       eax = 0x80000008;
+                       ecx = 0;
+                       if (ctxt->ops->get_cpuid(ctxt, &eax, &ebx, &ecx,
+                                                &edx, false))
                                maxphyaddr = eax & 0xff;
                        else
                                maxphyaddr = 36;
@@ -5296,7 +5300,6 @@ static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt,
 
 static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *))
 {
-       register void *__sp asm(_ASM_SP);
        ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF;
 
        if (!(ctxt->d & ByteOp))
@@ -5304,7 +5307,7 @@ static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *))
 
        asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n"
            : "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags),
-             [fastop]"+S"(fop), "+r"(__sp)
+             [fastop]"+S"(fop), ASM_CALL_CONSTRAINT
            : "c"(ctxt->src2.val));
 
        ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
index 600bee9dcbbd85041be84528fb5b4e22795ab505..394d9527da7ee904dbd262626c3fd8575de58706 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __I8254_H
 #define __I8254_H
 
index 29ce19732ccf8e2f2b22ff91a6991818936d63fd..ea1a4e0297dae117832e19e44079e031b7fd5a94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_IO_APIC_H
 #define __KVM_IO_APIC_H
 
index 9add410f195fc5ea3ac94bb520ca52afa2906adc..f500293dad8d6122704958be16bf343fe154ef15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASM_KVM_CACHE_REGS_H
 #define ASM_KVM_CACHE_REGS_H
 
index 69c5612be786fbc7909b6f81a8d0a29f2cd324a6..36c90d631096d8c4eea10291d2958d6fb1393b4b 100644 (file)
@@ -1992,6 +1992,11 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event)
                                vcpu->arch.apic_base | MSR_IA32_APICBASE_BSP);
        vcpu->arch.pv_eoi.msr_val = 0;
        apic_update_ppr(apic);
+       if (vcpu->arch.apicv_active) {
+               kvm_x86_ops->apicv_post_state_restore(vcpu);
+               kvm_x86_ops->hwapic_irr_update(vcpu, -1);
+               kvm_x86_ops->hwapic_isr_update(vcpu, -1);
+       }
 
        vcpu->arch.apic_arb_prio = 0;
        vcpu->arch.apic_attention = 0;
index 215721e1426aea6ebb4017b22ef74c6bddf8d528..4b9935a38347927ed36048e499cd13a10580f8d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_X86_LAPIC_H
 #define __KVM_X86_LAPIC_H
 
index eca30c1eb1d97cd367c6b2b76396991b79328b1a..7a69cf053711197df9a0f2ec284ef5a436c42514 100644 (file)
@@ -3837,7 +3837,7 @@ int kvm_handle_page_fault(struct kvm_vcpu *vcpu, u64 error_code,
        case KVM_PV_REASON_PAGE_NOT_PRESENT:
                vcpu->arch.apf.host_apf_reason = 0;
                local_irq_disable();
-               kvm_async_pf_task_wait(fault_address);
+               kvm_async_pf_task_wait(fault_address, 0);
                local_irq_enable();
                break;
        case KVM_PV_REASON_PAGE_READY:
@@ -3973,13 +3973,6 @@ static bool sync_mmio_spte(struct kvm_vcpu *vcpu, u64 *sptep, gfn_t gfn,
 static inline bool is_last_gpte(struct kvm_mmu *mmu,
                                unsigned level, unsigned gpte)
 {
-       /*
-        * PT_PAGE_TABLE_LEVEL always terminates.  The RHS has bit 7 set
-        * iff level <= PT_PAGE_TABLE_LEVEL, which for our purpose means
-        * level == PT_PAGE_TABLE_LEVEL; set PT_PAGE_SIZE_MASK in gpte then.
-        */
-       gpte |= level - PT_PAGE_TABLE_LEVEL - 1;
-
        /*
         * The RHS has bit 7 set iff level < mmu->last_nonleaf_level.
         * If it is clear, there are no large pages at this level, so clear
@@ -3987,6 +3980,13 @@ static inline bool is_last_gpte(struct kvm_mmu *mmu,
         */
        gpte &= level - mmu->last_nonleaf_level;
 
+       /*
+        * PT_PAGE_TABLE_LEVEL always terminates.  The RHS has bit 7 set
+        * iff level <= PT_PAGE_TABLE_LEVEL, which for our purpose means
+        * level == PT_PAGE_TABLE_LEVEL; set PT_PAGE_SIZE_MASK in gpte then.
+        */
+       gpte |= level - PT_PAGE_TABLE_LEVEL - 1;
+
        return gpte & PT_PAGE_SIZE_MASK;
 }
 
@@ -4555,6 +4555,7 @@ void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly,
 
        update_permission_bitmask(vcpu, context, true);
        update_pkru_bitmask(vcpu, context, true);
+       update_last_nonleaf_level(vcpu, context);
        reset_rsvds_bits_mask_ept(vcpu, context, execonly);
        reset_ept_shadow_zero_bits_mask(vcpu, context, execonly);
 }
index 64a2dbd2b1afaa1e25fe776bc364231eac95dfbb..efc857615d8ea48305be79ba4205371f70837540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_X86_MMU_H
 #define __KVM_X86_MMU_H
 
index 8b97a6cba8d1177a8d54ab47737826396d2bd115..c73bf4e4988cb5c84065dd324b50b93cbe12c2e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVMMMU_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVMMMU_H
 
index 86b68dc5a6493152b9032f1fda970b31ca8d755a..f18d1f8d332b8a2b0512c1f6d8d85fe4ca303ef3 100644 (file)
@@ -334,10 +334,11 @@ retry_walk:
                --walker->level;
 
                index = PT_INDEX(addr, walker->level);
-
                table_gfn = gpte_to_gfn(pte);
                offset    = index * sizeof(pt_element_t);
                pte_gpa   = gfn_to_gpa(table_gfn) + offset;
+
+               BUG_ON(walker->level < 1);
                walker->table_gfn[walker->level - 1] = table_gfn;
                walker->pte_gpa[walker->level - 1] = pte_gpa;
 
index f96e1f9625873d0a8faea96a18ad1fa8aa7655ef..a9a62b9a73e25c3594fb1a537db7c498213cdfcd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_X86_PMU_H
 #define __KVM_X86_PMU_H
 
index 8a202c49e2a01852c7a8f734c5e0a24c94c39093..9807c314c4788bad75ede5c9c8a804976f889bb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_H
 
index 622aa10f692fa9f50386474fb43fb24356f5d05e..3f9150125e7010a7a2c118035d1828be7a650e0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TSS_SEGMENT_H
 #define __TSS_SEGMENT_H
 
index 06c0c6d0541e9bf95eabbcaa8d20c8ec45f19496..a6f4f095f8f4eb4aa5b4bae2a21dd66cccd824e7 100644 (file)
@@ -200,6 +200,8 @@ struct loaded_vmcs {
        int cpu;
        bool launched;
        bool nmi_known_unmasked;
+       unsigned long vmcs_host_cr3;    /* May not match real cr3 */
+       unsigned long vmcs_host_cr4;    /* May not match real cr4 */
        struct list_head loaded_vmcss_on_cpu_link;
 };
 
@@ -600,8 +602,6 @@ struct vcpu_vmx {
                int           gs_ldt_reload_needed;
                int           fs_reload_needed;
                u64           msr_host_bndcfgs;
-               unsigned long vmcs_host_cr3;    /* May not match real cr3 */
-               unsigned long vmcs_host_cr4;    /* May not match real cr4 */
        } host_state;
        struct {
                int vm86_active;
@@ -2202,46 +2202,44 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
        struct pi_desc old, new;
        unsigned int dest;
 
-       if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-               !irq_remapping_cap(IRQ_POSTING_CAP)  ||
-               !kvm_vcpu_apicv_active(vcpu))
+       /*
+        * In case of hot-plug or hot-unplug, we may have to undo
+        * vmx_vcpu_pi_put even if there is no assigned device.  And we
+        * always keep PI.NDST up to date for simplicity: it makes the
+        * code easier, and CPU migration is not a fast path.
+        */
+       if (!pi_test_sn(pi_desc) && vcpu->cpu == cpu)
+               return;
+
+       /*
+        * First handle the simple case where no cmpxchg is necessary; just
+        * allow posting non-urgent interrupts.
+        *
+        * If the 'nv' field is POSTED_INTR_WAKEUP_VECTOR, do not change
+        * PI.NDST: pi_post_block will do it for us and the wakeup_handler
+        * expects the VCPU to be on the blocked_vcpu_list that matches
+        * PI.NDST.
+        */
+       if (pi_desc->nv == POSTED_INTR_WAKEUP_VECTOR ||
+           vcpu->cpu == cpu) {
+               pi_clear_sn(pi_desc);
                return;
+       }
 
+       /* The full case.  */
        do {
                old.control = new.control = pi_desc->control;
 
-               /*
-                * If 'nv' field is POSTED_INTR_WAKEUP_VECTOR, there
-                * are two possible cases:
-                * 1. After running 'pre_block', context switch
-                *    happened. For this case, 'sn' was set in
-                *    vmx_vcpu_put(), so we need to clear it here.
-                * 2. After running 'pre_block', we were blocked,
-                *    and woken up by some other guy. For this case,
-                *    we don't need to do anything, 'pi_post_block'
-                *    will do everything for us. However, we cannot
-                *    check whether it is case #1 or case #2 here
-                *    (maybe, not needed), so we also clear sn here,
-                *    I think it is not a big deal.
-                */
-               if (pi_desc->nv != POSTED_INTR_WAKEUP_VECTOR) {
-                       if (vcpu->cpu != cpu) {
-                               dest = cpu_physical_id(cpu);
-
-                               if (x2apic_enabled())
-                                       new.ndst = dest;
-                               else
-                                       new.ndst = (dest << 8) & 0xFF00;
-                       }
+               dest = cpu_physical_id(cpu);
 
-                       /* set 'NV' to 'notification vector' */
-                       new.nv = POSTED_INTR_VECTOR;
-               }
+               if (x2apic_enabled())
+                       new.ndst = dest;
+               else
+                       new.ndst = (dest << 8) & 0xFF00;
 
-               /* Allow posting non-urgent interrupts */
                new.sn = 0;
-       } while (cmpxchg(&pi_desc->control, old.control,
-                       new.control) != old.control);
+       } while (cmpxchg64(&pi_desc->control, old.control,
+                          new.control) != old.control);
 }
 
 static void decache_tsc_multiplier(struct vcpu_vmx *vmx)
@@ -5077,21 +5075,30 @@ static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu,
        int pi_vec = nested ? POSTED_INTR_NESTED_VECTOR : POSTED_INTR_VECTOR;
 
        if (vcpu->mode == IN_GUEST_MODE) {
-               struct vcpu_vmx *vmx = to_vmx(vcpu);
-
                /*
-                * Currently, we don't support urgent interrupt,
-                * all interrupts are recognized as non-urgent
-                * interrupt, so we cannot post interrupts when
-                * 'SN' is set.
+                * The vector of interrupt to be delivered to vcpu had
+                * been set in PIR before this function.
+                *
+                * Following cases will be reached in this block, and
+                * we always send a notification event in all cases as
+                * explained below.
+                *
+                * Case 1: vcpu keeps in non-root mode. Sending a
+                * notification event posts the interrupt to vcpu.
                 *
-                * If the vcpu is in guest mode, it means it is
-                * running instead of being scheduled out and
-                * waiting in the run queue, and that's the only
-                * case when 'SN' is set currently, warning if
-                * 'SN' is set.
+                * Case 2: vcpu exits to root mode and is still
+                * runnable. PIR will be synced to vIRR before the
+                * next vcpu entry. Sending a notification event in
+                * this case has no effect, as vcpu is not in root
+                * mode.
+                *
+                * Case 3: vcpu exits to root mode and is blocked.
+                * vcpu_block() has already synced PIR to vIRR and
+                * never blocks vcpu if vIRR is not cleared. Therefore,
+                * a blocked vcpu here does not wait for any requested
+                * interrupts in PIR, and sending a notification event
+                * which has no effect is safe here.
                 */
-               WARN_ON_ONCE(pi_test_sn(&vmx->pi_desc));
 
                apic->send_IPI_mask(get_cpu_mask(vcpu->cpu), pi_vec);
                return true;
@@ -5169,12 +5176,12 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
         */
        cr3 = __read_cr3();
        vmcs_writel(HOST_CR3, cr3);             /* 22.2.3  FIXME: shadow tables */
-       vmx->host_state.vmcs_host_cr3 = cr3;
+       vmx->loaded_vmcs->vmcs_host_cr3 = cr3;
 
        /* Save the most likely value for this task's CR4 in the VMCS. */
        cr4 = cr4_read_shadow();
        vmcs_writel(HOST_CR4, cr4);                     /* 22.2.3, 22.2.5 */
-       vmx->host_state.vmcs_host_cr4 = cr4;
+       vmx->loaded_vmcs->vmcs_host_cr4 = cr4;
 
        vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS);  /* 22.2.4 */
 #ifdef CONFIG_X86_64
@@ -5612,9 +5619,6 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
 
        kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu);
 
-       if (kvm_vcpu_apicv_active(vcpu))
-               memset(&vmx->pi_desc, 0, sizeof(struct pi_desc));
-
        if (vmx->vpid != 0)
                vmcs_write16(VIRTUAL_PROCESSOR_ID, vmx->vpid);
 
@@ -9036,7 +9040,6 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)
 static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
 {
        u32 exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
-       register void *__sp asm(_ASM_SP);
 
        if ((exit_intr_info & (INTR_INFO_VALID_MASK | INTR_INFO_INTR_TYPE_MASK))
                        == (INTR_INFO_VALID_MASK | INTR_TYPE_EXT_INTR)) {
@@ -9065,7 +9068,7 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
 #ifdef CONFIG_X86_64
                        [sp]"=&r"(tmp),
 #endif
-                       "+r"(__sp)
+                       ASM_CALL_CONSTRAINT
                        :
                        [entry]"r"(entry),
                        [ss]"i"(__KERNEL_DS),
@@ -9265,15 +9268,15 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
                vmcs_writel(GUEST_RIP, vcpu->arch.regs[VCPU_REGS_RIP]);
 
        cr3 = __get_current_cr3_fast();
-       if (unlikely(cr3 != vmx->host_state.vmcs_host_cr3)) {
+       if (unlikely(cr3 != vmx->loaded_vmcs->vmcs_host_cr3)) {
                vmcs_writel(HOST_CR3, cr3);
-               vmx->host_state.vmcs_host_cr3 = cr3;
+               vmx->loaded_vmcs->vmcs_host_cr3 = cr3;
        }
 
        cr4 = cr4_read_shadow();
-       if (unlikely(cr4 != vmx->host_state.vmcs_host_cr4)) {
+       if (unlikely(cr4 != vmx->loaded_vmcs->vmcs_host_cr4)) {
                vmcs_writel(HOST_CR4, cr4);
-               vmx->host_state.vmcs_host_cr4 = cr4;
+               vmx->loaded_vmcs->vmcs_host_cr4 = cr4;
        }
 
        /* When single-stepping over STI and MOV SS, we must clear the
@@ -9583,6 +9586,13 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
 
        vmx->msr_ia32_feature_control_valid_bits = FEATURE_CONTROL_LOCKED;
 
+       /*
+        * Enforce invariant: pi_desc.nv is always either POSTED_INTR_VECTOR
+        * or POSTED_INTR_WAKEUP_VECTOR.
+        */
+       vmx->pi_desc.nv = POSTED_INTR_VECTOR;
+       vmx->pi_desc.sn = 1;
+
        return &vmx->vcpu;
 
 free_vmcs:
@@ -9831,7 +9841,8 @@ static void vmx_inject_page_fault_nested(struct kvm_vcpu *vcpu,
 
        WARN_ON(!is_guest_mode(vcpu));
 
-       if (nested_vmx_is_page_fault_vmexit(vmcs12, fault->error_code)) {
+       if (nested_vmx_is_page_fault_vmexit(vmcs12, fault->error_code) &&
+               !to_vmx(vcpu)->nested.nested_run_pending) {
                vmcs12->vm_exit_intr_error_code = fault->error_code;
                nested_vmx_vmexit(vcpu, EXIT_REASON_EXCEPTION_NMI,
                                  PF_VECTOR | INTR_TYPE_HARD_EXCEPTION |
@@ -11283,7 +11294,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
 
        /* Same as above - no reason to call set_cr4_guest_host_mask().  */
        vcpu->arch.cr4_guest_owned_bits = ~vmcs_readl(CR4_GUEST_HOST_MASK);
-       kvm_set_cr4(vcpu, vmcs12->host_cr4);
+       vmx_set_cr4(vcpu, vmcs12->host_cr4);
 
        nested_ept_uninit_mmu_context(vcpu);
 
@@ -11696,6 +11707,37 @@ static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm,
        kvm_mmu_clear_dirty_pt_masked(kvm, memslot, offset, mask);
 }
 
+static void __pi_post_block(struct kvm_vcpu *vcpu)
+{
+       struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
+       struct pi_desc old, new;
+       unsigned int dest;
+
+       do {
+               old.control = new.control = pi_desc->control;
+               WARN(old.nv != POSTED_INTR_WAKEUP_VECTOR,
+                    "Wakeup handler not enabled while the VCPU is blocked\n");
+
+               dest = cpu_physical_id(vcpu->cpu);
+
+               if (x2apic_enabled())
+                       new.ndst = dest;
+               else
+                       new.ndst = (dest << 8) & 0xFF00;
+
+               /* set 'NV' to 'notification vector' */
+               new.nv = POSTED_INTR_VECTOR;
+       } while (cmpxchg64(&pi_desc->control, old.control,
+                          new.control) != old.control);
+
+       if (!WARN_ON_ONCE(vcpu->pre_pcpu == -1)) {
+               spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+               list_del(&vcpu->blocked_vcpu_list);
+               spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+               vcpu->pre_pcpu = -1;
+       }
+}
+
 /*
  * This routine does the following things for vCPU which is going
  * to be blocked if VT-d PI is enabled.
@@ -11711,7 +11753,6 @@ static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm,
  */
 static int pi_pre_block(struct kvm_vcpu *vcpu)
 {
-       unsigned long flags;
        unsigned int dest;
        struct pi_desc old, new;
        struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
@@ -11721,34 +11762,20 @@ static int pi_pre_block(struct kvm_vcpu *vcpu)
                !kvm_vcpu_apicv_active(vcpu))
                return 0;
 
-       vcpu->pre_pcpu = vcpu->cpu;
-       spin_lock_irqsave(&per_cpu(blocked_vcpu_on_cpu_lock,
-                         vcpu->pre_pcpu), flags);
-       list_add_tail(&vcpu->blocked_vcpu_list,
-                     &per_cpu(blocked_vcpu_on_cpu,
-                     vcpu->pre_pcpu));
-       spin_unlock_irqrestore(&per_cpu(blocked_vcpu_on_cpu_lock,
-                              vcpu->pre_pcpu), flags);
+       WARN_ON(irqs_disabled());
+       local_irq_disable();
+       if (!WARN_ON_ONCE(vcpu->pre_pcpu != -1)) {
+               vcpu->pre_pcpu = vcpu->cpu;
+               spin_lock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+               list_add_tail(&vcpu->blocked_vcpu_list,
+                             &per_cpu(blocked_vcpu_on_cpu,
+                                      vcpu->pre_pcpu));
+               spin_unlock(&per_cpu(blocked_vcpu_on_cpu_lock, vcpu->pre_pcpu));
+       }
 
        do {
                old.control = new.control = pi_desc->control;
 
-               /*
-                * We should not block the vCPU if
-                * an interrupt is posted for it.
-                */
-               if (pi_test_on(pi_desc) == 1) {
-                       spin_lock_irqsave(&per_cpu(blocked_vcpu_on_cpu_lock,
-                                         vcpu->pre_pcpu), flags);
-                       list_del(&vcpu->blocked_vcpu_list);
-                       spin_unlock_irqrestore(
-                                       &per_cpu(blocked_vcpu_on_cpu_lock,
-                                       vcpu->pre_pcpu), flags);
-                       vcpu->pre_pcpu = -1;
-
-                       return 1;
-               }
-
                WARN((pi_desc->sn == 1),
                     "Warning: SN field of posted-interrupts "
                     "is set before blocking\n");
@@ -11770,10 +11797,15 @@ static int pi_pre_block(struct kvm_vcpu *vcpu)
 
                /* set 'NV' to 'wakeup vector' */
                new.nv = POSTED_INTR_WAKEUP_VECTOR;
-       } while (cmpxchg(&pi_desc->control, old.control,
-                       new.control) != old.control);
+       } while (cmpxchg64(&pi_desc->control, old.control,
+                          new.control) != old.control);
 
-       return 0;
+       /* We should not block the vCPU if an interrupt is posted for it.  */
+       if (pi_test_on(pi_desc) == 1)
+               __pi_post_block(vcpu);
+
+       local_irq_enable();
+       return (vcpu->pre_pcpu == -1);
 }
 
 static int vmx_pre_block(struct kvm_vcpu *vcpu)
@@ -11789,44 +11821,13 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu)
 
 static void pi_post_block(struct kvm_vcpu *vcpu)
 {
-       struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
-       struct pi_desc old, new;
-       unsigned int dest;
-       unsigned long flags;
-
-       if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-               !irq_remapping_cap(IRQ_POSTING_CAP)  ||
-               !kvm_vcpu_apicv_active(vcpu))
+       if (vcpu->pre_pcpu == -1)
                return;
 
-       do {
-               old.control = new.control = pi_desc->control;
-
-               dest = cpu_physical_id(vcpu->cpu);
-
-               if (x2apic_enabled())
-                       new.ndst = dest;
-               else
-                       new.ndst = (dest << 8) & 0xFF00;
-
-               /* Allow posting non-urgent interrupts */
-               new.sn = 0;
-
-               /* set 'NV' to 'notification vector' */
-               new.nv = POSTED_INTR_VECTOR;
-       } while (cmpxchg(&pi_desc->control, old.control,
-                       new.control) != old.control);
-
-       if(vcpu->pre_pcpu != -1) {
-               spin_lock_irqsave(
-                       &per_cpu(blocked_vcpu_on_cpu_lock,
-                       vcpu->pre_pcpu), flags);
-               list_del(&vcpu->blocked_vcpu_list);
-               spin_unlock_irqrestore(
-                       &per_cpu(blocked_vcpu_on_cpu_lock,
-                       vcpu->pre_pcpu), flags);
-               vcpu->pre_pcpu = -1;
-       }
+       WARN_ON(irqs_disabled());
+       local_irq_disable();
+       __pi_post_block(vcpu);
+       local_irq_enable();
 }
 
 static void vmx_post_block(struct kvm_vcpu *vcpu)
@@ -11911,12 +11912,8 @@ static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
 
                if (set)
                        ret = irq_set_vcpu_affinity(host_irq, &vcpu_info);
-               else {
-                       /* suppress notification event before unposting */
-                       pi_set_sn(vcpu_to_pi_desc(vcpu));
+               else
                        ret = irq_set_vcpu_affinity(host_irq, NULL);
-                       pi_clear_sn(vcpu_to_pi_desc(vcpu));
-               }
 
                if (ret < 0) {
                        printk(KERN_INFO "%s: failed to update PI IRTE\n",
index cd17b7d9a1076c1d28904bc4cd1ea06af5e0f2c0..03869eb7fcd67b64e54dcb67acd559a70fd61139 100644 (file)
@@ -7225,7 +7225,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
        int r;
        sigset_t sigsaved;
 
-       fpu__activate_curr(fpu);
+       fpu__initialize(fpu);
 
        if (vcpu->sigset_active)
                sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved);
index 51e349cf5f45276891883502d91d6bf4856186fb..d0b95b7a90b4ecbed10eaf076ad19059b702a60b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_X86_KVM_X86_H
 #define ARCH_X86_KVM_X86_H
 
index 34a74131a12c58ef9f38712261900093b53220f1..457f681ef37921be836c0e50bf659b07cc534fc5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for x86 specific library files.
 #
index 216a629a4a1a6d4f684b51e224fcd26f169929d4..1811fa4a1b1ae398611a488c5ffa7e2e98cb5af7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/smp.h>
 #include <linux/export.h>
 
index e8508156c99d5e0a8f3aa8a6dc2ad659d59c021e..fd2d09afa0974b59a0bf54063682e6502fb44573 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */
 
 #include <linux/linkage.h>
index 378e5d5bf9b13834dec061738f356b8fc674b47e..9baca3e054bef32acd14a538d14289adee71fee0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * arch/x86_64/lib/csum-partial.c
  *
index 29df077cb0899be78cf604a3e21eb7262a729159..553f8fd23cc4733d0edafa862b95446f7a04bab1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Precise Delay Loops for i386
  *
index 37b62d4121481df990741fac20ee48c2e68492e7..c97d935a29e8021ea16d88061d3b5a44a9c0b699 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * __get_user functions.
  *
index 23d893cbc2001094b0885ebf1811cf391192bbad..a14f9939c365d66f4c3215c31573a3936df94869 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/export.h>
 
index ab2d1d73e9e7c0deaf06f040d178baee04a2b514..79778ab200e494c16cac7441cdb5da9507940715 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Entropy functions used on early boot for KASLR base and memory
  * randomization. The base randomization is done in the compressed
index 2eab7d0bfeddc6ddccee9c1318188418ebe0585e..e565d1c9019ee204c6c6745808877d415fc27408 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/export.h>
 
index 15de86cd15b05bf95d0275cce0d52188999ac5d0..bbec69d8223bf045c57c98328ee70b7531db50dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Normally compiler builtins are used, but sometimes the compiler calls out
  * of line code. Based on asm-i386/string.h.
index 55b95db30a61c08df145e2c321fb0362696a623f..9bc861c71e754ed37a83d600de302b29baa9a974 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright 2002 Andi Kleen, SuSE Labs */
 
 #include <linux/linkage.h>
index 76b373af03f091962204af63fa7d00a8158dff29..a018ec4fba53ef456264b14dabfdf30575e346f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Count the digits of @val including a possible sign.
  *
index c2311a678332c55798f62377331aa7650cf2021c..4321fa02e18df07368689469049cad31b87eca04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     MMX 3DNow! library helper functions
  *
index ff29e8d3941472f02702dd314fb825f54de736ea..876b4168ab0adcee40cb09c8bcf9f7858b1f3fb3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <asm/msr.h>
 
index 10ffa7e8519f06ac1d6ea7e7ecf7faba1e260594..ed33cbab39582f0c057a301a2e63882c6cd260c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <linux/errno.h>
 #include <asm/asm.h>
index ce68b6a9d7d1e68a1db697ed0ee441db5d83f7f0..693cce0be82dffb822cecd0c7e38d2821aff896c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/preempt.h>
 #include <linux/smp.h>
index 07764255b61198bc2bb74ed307c79474d19aaa74..3bd905e10ee21bd532338740c5294ea75a8284ba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/percpu.h>
 #include <linux/preempt.h>
index cd5d716d289783cd5c0d853b461701822db96a63..96dce5fe2a35f49c92c6e44a3273567931227ceb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * __put_user functions.
  *
index dc0ad12f80bbca8f847430ded8023e531f5f3d11..d15fdae9656e92366950d268b4b372260e91cdb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Most of the string-functions are rather heavily hand-optimized,
  * see especially strsep,strstr,str[c]spn. They should work, but are not
index a03b1c750bfed32e061b93fcfa45c81f9c9ecdad..38f37df056f72ea6f93c0c11d15bc8c80103c785 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/export.h>
 
index bd057a4ffe6e5ef6791038e9d3386442e940cf1e..1b377f734e64a8e7629c0f9503aa5c0f4ef0ce4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User address space access functions.
  * The non inlined parts of asm-i386/uaccess.h are here.
index 1b2dac1743213475c461df056b4009641e7ced49..02211fc6f2ecfaa44602ceeaadb605862a4325a8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #               Makefile for wm-FPU-emu
 #
index ae2274dbd305120b29f4ae8a86bd638cb1ce053d..60f4dcc5edc3cbfb9656e1b0ec96849cce1d5a88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  control_w.h                                                              |
  |                                                                           |
index 066996dba6a26e815e7f79bb395334a19e032b6a..ee08449d20fd80063aeb18398551592f7d3102bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "div_Xsig.S"
 /*---------------------------------------------------------------------------+
  |  div_Xsig.S                                                               |
index 2c71527bd917461913f7046a9b5ac7a0aa92120f..8f5025c80ee055dc846553143844690158f6d4fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "div_small.S"
 /*---------------------------------------------------------------------------+
  |  div_small.S                                                              |
index 2ccc424a57d996e786969a42f672bfee760b8f42..6b468517ab7167fcffd0fed7f4f0134e71f70b50 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  errors.c                                                                 |
  |                                                                           |
index 67f43a4683d51a909af6e1b89dd8478b510b3e14..75230b9775777ad69362564c200918e48145acf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  exception.h                                                              |
  |                                                                           |
index aeab24e083c40a5f4aa231b2346f5af3377b660f..09006dc474a0aff09dc87ef55bcd87657c20aa5d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_arith.c                                                              |
  |                                                                           |
index 955b932735a415a3147b96c9c79c29d6db023554..a83353d5271c2984876e0bb2163d10afd2dbc209 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  fpu_asm.h                                                                |
  |                                                                           |
index 024f6e971174e88df9d96ffb66641f7835b8729d..034748459482a945fff91f3e9554e46bccdf4a30 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_aux.c                                                                |
  |                                                                           |
index c9c320dccca13678df20155b450abe648aef7488..a5a41ec5807211d8cb634f2ef009a9ad867da4a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  fpu_emu.h                                                                |
  |                                                                           |
index d4a7df2205b8de2576bc7cdbf8455f2fa9987b66..9e2ba7e667f6109f146fa3a109375813aa989c36 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_entry.c                                                              |
  |                                                                           |
@@ -114,7 +115,7 @@ void math_emulate(struct math_emu_info *info)
        struct desc_struct code_descriptor;
        struct fpu *fpu = &current->thread.fpu;
 
-       fpu__activate_curr(fpu);
+       fpu__initialize(fpu);
 
 #ifdef RE_ENTRANT_CHECKING
        if (emulating) {
index 233e5af566f5123d53e0f8794c75c6af3f23fb89..1b118fd93140931e515898e51bd316a50dab97cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_etc.c                                                                |
  |                                                                           |
index caff438b9c1dac8c82eaf647ccb23fd7c2fbb580..70d35c20094517aee19b3577c806d6488d21955b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FPU_PROTO_H
 #define _FPU_PROTO_H
 
index 699f329f1d4073e70d83aba848c2e97ce0bf619c..c8b1b31ed7c44b9bcfc0b570d5643e80655147ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  fpu_system.h                                                             |
  |                                                                           |
index d9c657cd7746ece9578766cd114f4dc9abf5a855..bff95d4e7dca0d29fa8dd915a7ce461b1b862205 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_tags.c                                                               |
  |                                                                           |
index ecd06680581c51cbb7631cd0240708e92d9ef919..783c509f957a6975401d5c9a5693468f5027d57e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  fpu_trig.c                                                               |
  |                                                                           |
index c48967c6a0e2b28083de2dd8fc66e18832321c14..b82ca14ba71826a247268de49e4a8d22d81b216b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  get_address.c                                                            |
  |                                                                           |
index 1643054766eb59b5313180d5067e1530ca34d5be..f821a9cd7753c8940901911472423e6f280b2995 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  load_store.c                                                             |
  |                                                                           |
index 22e0631bb85aaa8436669840ab40ee38b8de3554..3e489122a2b0c714c5d42d19863f73e883f8e2b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  mul_Xsig.S                                                               |
  |                                                                           |
index 168eb44c93c8eff2a7c27b16778204971493bde1..fc1c887ca07318710bab5d6adddd20c757565513 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  poly.h                                                                   |
  |                                                                           |
index b00e9e10cdce244ba073e84f54690ec95bb5e698..aa33006bafd5fa74cc085c98a07f2f813094ea62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  poly_2xm1.c                                                              |
  |                                                                           |
index 20c28e58e2d446c84adb3a04dbad6275270dc641..7e7412c5a1fef4539d426804eddeae3c78adffb1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  poly_atan.c                                                              |
  |                                                                           |
index 8e2ff4b28a0abbe455c965282a7b3096265c10cc..98b6949bb854a639dd79c37e18e53d5f58a1ebad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  poly_l2.c                                                                |
  |                                                                           |
index b862039c728e628cd4257afecb194f3b2703699f..c192fba51526455d00adf6917fb9c89c6ba6bc1a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  poly_sin.c                                                               |
  |                                                                           |
index 1875763e0c02b88dbd23061e6d9797efbf82b089..1f5b1d71232307240b7527d0184a5f35f10b917a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  poly_tan.c                                                               |
  |                                                                           |
index a9aaf414135daf8dd189dd361ccd7e54314d240d..604f0b2d17e89c345072caaa89092ee90464bc2b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  polynomial_Xsig.S                                                        |
  |                                                                           |
index deea48b9f13a41c6807ecde0ca0f7f9d4d39bd60..29451dd0755670be3239cac0cbd7edf3c1d5276d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_add_sub.c                                                            |
  |                                                                           |
index 19b33b50adfacc0e6cd607750378219cd3052bf8..eacb5128fc09e85873776e021f51021b879aa87d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_compare.c                                                            |
  |                                                                           |
index 00548354912f41b4a2268dc7a10cbbeaa737798d..8dc9095bab224daab73338b7551d26b71319b9a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_constant.c                                                           |
  |                                                                           |
index 1bffaec3a13419fb6debb8670118d099ad84ddd0..f2fdd344dcaad8d528c990029379e6552b7ddaa1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  reg_constant.h                                                           |
  |                                                                           |
index 108060779977f3dbc417ee219fce7576aa47b62f..251180623ce0574b0e2fbf2a9f8e8679c12ae13c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_convert.c                                                            |
  |                                                                           |
index 6827012db341324c5388e70c49fc3e51ca8d2d81..08c2f6de0288b070d3773b556ff9313250cdb727 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_divide.c                                                             |
  |                                                                           |
index 2c98965a60ba70f6701edd22a52b2eeb43dd6ca6..d40ff45497b9bb554aa14d49fe5d7f15da660b97 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_ld_str.c                                                             |
  |                                                                           |
index 36c37f71f713b69537387c658303ca579e456730..d69618572f14d91531629b8cfbaa587facc4a50e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*---------------------------------------------------------------------------+
  |  reg_mul.c                                                                |
  |                                                                           |
index 53ac1a343c697cd2ac3d4c95a710c0bc496bcaea..7f6b4392a15de64b659cf2477557297f7f8c3245 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  reg_norm.S                                                               |
  |                                                                           |
index 41af5b208d88f5b6975162c27a05bf9b7ad06d4a..04563421ee7d4614a33ec8b38ab85104f5dacb98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file "reg_round.S"
 /*---------------------------------------------------------------------------+
  |  reg_round.S                                                              |
index 3b1bc5e9b2f6383a6a4f518cf6e70f568b125df9..50fe9f8c893c97a0c248bd8275f045864d560a55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "reg_u_add.S"
 /*---------------------------------------------------------------------------+
  |  reg_u_add.S                                                              |
index 796eb5ab921b64b4b898121b2205f6a70f44e6ce..94d545e118e40af46ab372bd9ac15f84b600ddd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "reg_u_div.S"
 /*---------------------------------------------------------------------------+
  |  reg_u_div.S                                                              |
index 6196f68cf3c1e4e01b9a47140fab8bbb6be6341d..21cde47fb3e5d6d11d80d69cdaac7476569a0f9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "reg_u_mul.S"
 /*---------------------------------------------------------------------------+
  |  reg_u_mul.S                                                              |
index d115b900919a10ca8f3c36c8034ad1eec1164757..f05dea7dec38f7e2ecacbaf3e5017507cc0bd48a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "reg_u_sub.S"
 /*---------------------------------------------------------------------------+
  |  reg_u_sub.S                                                              |
index 87c99749a495d3ea5d24c424542e9209a8610ff7..226a51e991f10dc5ed11327b3a2464bd8fb59f5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  round_Xsig.S                                                             |
  |                                                                           |
index c8552edeec7535f42579883dce72bb8b30bf10ab..96f4779aa9c19f31ddc6a8b60d3bf601ad4ccad0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "shr_Xsig.S"
 /*---------------------------------------------------------------------------+
  |  shr_Xsig.S                                                               |
index 54a3f226982dcd108db4691eb7cde3c8d9061faf..b77bafec95260b83d9fc475c0b4ac068dc888daa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*---------------------------------------------------------------------------+
  |  status_w.h                                                               |
  |                                                                           |
index 340dd6897f85cb4a444ece88d20bdb34ccca0891..d588874eb6fb1000a01ea11abd1ef0aae16f4b71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "wm_shrx.S"
 /*---------------------------------------------------------------------------+
  |  wm_shrx.S                                                                |
index 695afae38fdf3c087ce2d1671e058db4aa71a5bf..f031c0e19356563e8ffa23333d9f2a03e717eb9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .file   "wm_sqrt.S"
 /*---------------------------------------------------------------------------+
  |  wm_sqrt.S                                                                |
index 72bf8c01c6e3a58254cc915aded88eea8146f41a..7ba7f3d7f477582516a9375f9a7d189e7249493d 100644 (file)
@@ -1,5 +1,13 @@
-# Kernel does not boot with instrumentation of tlb.c.
-KCOV_INSTRUMENT_tlb.o  := n
+# SPDX-License-Identifier: GPL-2.0
+# Kernel does not boot with instrumentation of tlb.c and mem_encrypt.c
+KCOV_INSTRUMENT_tlb.o          := n
+KCOV_INSTRUMENT_mem_encrypt.o  := n
+
+KASAN_SANITIZE_mem_encrypt.o   := n
+
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_mem_encrypt.o    = -pg
+endif
 
 obj-y  :=  init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
            pat.o pgtable.o physaddr.o setup_nx.o tlb.o
index 91f501b2da3bb2d8d2fe4a24b2b83e8bb6d7c3e4..048c761d97b09539830ad461a12fc1cb3b7f7674 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * AMD NUMA support.
  * Discover the memory map and associated nodes.
index c076f710de4cb4e283125f706226fc059fbebb5b..c3521e2be39610c3d932c34126fadd5203f28958 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/uaccess.h>
 #include <linux/sched/debug.h>
 
+#include <asm/fpu/internal.h>
 #include <asm/traps.h>
 #include <asm/kdebug.h>
 
@@ -78,6 +79,29 @@ bool ex_handler_refcount(const struct exception_table_entry *fixup,
 }
 EXPORT_SYMBOL_GPL(ex_handler_refcount);
 
+/*
+ * Handler for when we fail to restore a task's FPU state.  We should never get
+ * here because the FPU state of a task using the FPU (task->thread.fpu.state)
+ * should always be valid.  However, past bugs have allowed userspace to set
+ * reserved bits in the XSAVE area using PTRACE_SETREGSET or sys_rt_sigreturn().
+ * These caused XRSTOR to fail when switching to the task, leaking the FPU
+ * registers of the task previously executing on the CPU.  Mitigate this class
+ * of vulnerability by restoring from the initial state (essentially, zeroing
+ * out all the FPU registers) if we can't restore from the task's FPU state.
+ */
+bool ex_handler_fprestore(const struct exception_table_entry *fixup,
+                         struct pt_regs *regs, int trapnr)
+{
+       regs->ip = ex_fixup_addr(fixup);
+
+       WARN_ONCE(1, "Bad FPU state detected at %pB, reinitializing FPU registers.",
+                 (void *)instruction_pointer(regs));
+
+       __copy_kernel_to_fpregs(&init_fpstate, -1);
+       return true;
+}
+EXPORT_SYMBOL_GPL(ex_handler_fprestore);
+
 bool ex_handler_ext(const struct exception_table_entry *fixup,
                   struct pt_regs *regs, int trapnr)
 {
index b836a7274e123af88edd7b4f261da88609778be9..b0ff378650a9c7ef988d2fa6c984ceae9c19df54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1995  Linus Torvalds
  *  Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
@@ -192,8 +193,7 @@ is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr)
  * 6. T1   : reaches here, sees vma_pkey(vma)=5, when we really
  *          faulted on a pte with its pkey=4.
  */
-static void fill_sig_info_pkey(int si_code, siginfo_t *info,
-               struct vm_area_struct *vma)
+static void fill_sig_info_pkey(int si_code, siginfo_t *info, u32 *pkey)
 {
        /* This is effectively an #ifdef */
        if (!boot_cpu_has(X86_FEATURE_OSPKE))
@@ -209,7 +209,7 @@ static void fill_sig_info_pkey(int si_code, siginfo_t *info,
         * valid VMA, so we should never reach this without a
         * valid VMA.
         */
-       if (!vma) {
+       if (!pkey) {
                WARN_ONCE(1, "PKU fault with no VMA passed in");
                info->si_pkey = 0;
                return;
@@ -219,13 +219,12 @@ static void fill_sig_info_pkey(int si_code, siginfo_t *info,
         * absolutely guranteed to be 100% accurate because of
         * the race explained above.
         */
-       info->si_pkey = vma_pkey(vma);
+       info->si_pkey = *pkey;
 }
 
 static void
 force_sig_info_fault(int si_signo, int si_code, unsigned long address,
-                    struct task_struct *tsk, struct vm_area_struct *vma,
-                    int fault)
+                    struct task_struct *tsk, u32 *pkey, int fault)
 {
        unsigned lsb = 0;
        siginfo_t info;
@@ -240,7 +239,7 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
                lsb = PAGE_SHIFT;
        info.si_addr_lsb = lsb;
 
-       fill_sig_info_pkey(si_code, &info, vma);
+       fill_sig_info_pkey(si_code, &info, pkey);
 
        force_sig_info(si_signo, &info, tsk);
 }
@@ -762,8 +761,6 @@ no_context(struct pt_regs *regs, unsigned long error_code,
        struct task_struct *tsk = current;
        unsigned long flags;
        int sig;
-       /* No context means no VMA to pass down */
-       struct vm_area_struct *vma = NULL;
 
        /* Are we prepared to handle this kernel fault? */
        if (fixup_exception(regs, X86_TRAP_PF)) {
@@ -788,7 +785,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
 
                        /* XXX: hwpoison faults will set the wrong code. */
                        force_sig_info_fault(signal, si_code, address,
-                                            tsk, vma, 0);
+                                            tsk, NULL, 0);
                }
 
                /*
@@ -806,7 +803,6 @@ no_context(struct pt_regs *regs, unsigned long error_code,
        if (is_vmalloc_addr((void *)address) &&
            (((unsigned long)tsk->stack - 1 - address < PAGE_SIZE) ||
             address - ((unsigned long)tsk->stack + THREAD_SIZE) < PAGE_SIZE)) {
-               register void *__sp asm("rsp");
                unsigned long stack = this_cpu_read(orig_ist.ist[DOUBLEFAULT_STACK]) - sizeof(void *);
                /*
                 * We're likely to be running with very little stack space
@@ -821,7 +817,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
                asm volatile ("movq %[stack], %%rsp\n\t"
                              "call handle_stack_overflow\n\t"
                              "1: jmp 1b"
-                             : "+r" (__sp)
+                             : ASM_CALL_CONSTRAINT
                              : "D" ("kernel stack overflow (page fault)"),
                                "S" (regs), "d" (address),
                                [stack] "rm" (stack));
@@ -897,8 +893,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
 
 static void
 __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
-                      unsigned long address, struct vm_area_struct *vma,
-                      int si_code)
+                      unsigned long address, u32 *pkey, int si_code)
 {
        struct task_struct *tsk = current;
 
@@ -946,7 +941,7 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
                tsk->thread.error_code  = error_code;
                tsk->thread.trap_nr     = X86_TRAP_PF;
 
-               force_sig_info_fault(SIGSEGV, si_code, address, tsk, vma, 0);
+               force_sig_info_fault(SIGSEGV, si_code, address, tsk, pkey, 0);
 
                return;
        }
@@ -959,9 +954,9 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
 
 static noinline void
 bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
-                    unsigned long address, struct vm_area_struct *vma)
+                    unsigned long address, u32 *pkey)
 {
-       __bad_area_nosemaphore(regs, error_code, address, vma, SEGV_MAPERR);
+       __bad_area_nosemaphore(regs, error_code, address, pkey, SEGV_MAPERR);
 }
 
 static void
@@ -969,6 +964,10 @@ __bad_area(struct pt_regs *regs, unsigned long error_code,
           unsigned long address,  struct vm_area_struct *vma, int si_code)
 {
        struct mm_struct *mm = current->mm;
+       u32 pkey;
+
+       if (vma)
+               pkey = vma_pkey(vma);
 
        /*
         * Something tried to access memory that isn't in our memory map..
@@ -976,7 +975,8 @@ __bad_area(struct pt_regs *regs, unsigned long error_code,
         */
        up_read(&mm->mmap_sem);
 
-       __bad_area_nosemaphore(regs, error_code, address, vma, si_code);
+       __bad_area_nosemaphore(regs, error_code, address,
+                              (vma) ? &pkey : NULL, si_code);
 }
 
 static noinline void
@@ -1019,7 +1019,7 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code,
 
 static void
 do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
-         struct vm_area_struct *vma, unsigned int fault)
+         u32 *pkey, unsigned int fault)
 {
        struct task_struct *tsk = current;
        int code = BUS_ADRERR;
@@ -1046,13 +1046,12 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,
                code = BUS_MCEERR_AR;
        }
 #endif
-       force_sig_info_fault(SIGBUS, code, address, tsk, vma, fault);
+       force_sig_info_fault(SIGBUS, code, address, tsk, pkey, fault);
 }
 
 static noinline void
 mm_fault_error(struct pt_regs *regs, unsigned long error_code,
-              unsigned long address, struct vm_area_struct *vma,
-              unsigned int fault)
+              unsigned long address, u32 *pkey, unsigned int fault)
 {
        if (fatal_signal_pending(current) && !(error_code & PF_USER)) {
                no_context(regs, error_code, address, 0, 0);
@@ -1076,9 +1075,9 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
        } else {
                if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|
                             VM_FAULT_HWPOISON_LARGE))
-                       do_sigbus(regs, error_code, address, vma, fault);
+                       do_sigbus(regs, error_code, address, pkey, fault);
                else if (fault & VM_FAULT_SIGSEGV)
-                       bad_area_nosemaphore(regs, error_code, address, vma);
+                       bad_area_nosemaphore(regs, error_code, address, pkey);
                else
                        BUG();
        }
@@ -1268,6 +1267,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
        struct mm_struct *mm;
        int fault, major = 0;
        unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
+       u32 pkey;
 
        tsk = current;
        mm = tsk->mm;
@@ -1441,7 +1441,17 @@ good_area:
         * make sure we exit gracefully rather than endlessly redo
         * the fault.  Since we never set FAULT_FLAG_RETRY_NOWAIT, if
         * we get VM_FAULT_RETRY back, the mmap_sem has been unlocked.
+        *
+        * Note that handle_userfault() may also release and reacquire mmap_sem
+        * (and not return with VM_FAULT_RETRY), when returning to userland to
+        * repeat the page fault later with a VM_FAULT_NOPAGE retval
+        * (potentially after handling any pending signal during the return to
+        * userland). The return to userland is identified whenever
+        * FAULT_FLAG_USER|FAULT_FLAG_KILLABLE are both set in flags.
+        * Thus we have to be careful about not touching vma after handling the
+        * fault, so we read the pkey beforehand.
         */
+       pkey = vma_pkey(vma);
        fault = handle_mm_fault(vma, address, flags);
        major |= fault & VM_FAULT_MAJOR;
 
@@ -1470,7 +1480,7 @@ good_area:
 
        up_read(&mm->mmap_sem);
        if (unlikely(fault & VM_FAULT_ERROR)) {
-               mm_fault_error(regs, error_code, address, vma, fault);
+               mm_fault_error(regs, error_code, address, &pkey, fault);
                return;
        }
 
index 6d06cf33e3de54ab6daa49910458c2cbb79c848b..8ae0000cbdb34d8c6db0efacc566fb3a5b78d2d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IA-32 Huge TLB Page Support for Kernel.
  *
index 31cea988fa36c5571687d1e18e2d5c914271b0f8..ab33a32df2a8e34541c6784f04fb7032b62457cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Helper routines for building identity mapping page tables. This is
  * included by both the compressed kernel and the regular kernel.
index bc84b73684b7e134a910b193c0103942e2cd0a19..8f5be3eb40ddb37c9faa9be57803438563bd982a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define DISABLE_BRANCH_PROFILING
 #define pr_fmt(fmt) "kasan: " fmt
 #include <linux/bootmem.h>
index af599167fe3cfdafe8725ea5f3670b891519d741..879ef930e2c2b04d60c85efec9f6e0fa5555fa2a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file implements KASLR memory randomization for x86_64. It randomizes
  * the virtual address space of kernel memory regions (physical memory
index dab41876cdd561294dafc02cd08d71a7a508500b..872ec4159a68fb8378066a67c1818300d029b2aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/interrupt.h>
 #include <linux/kdebug.h>
 #include <linux/kmemcheck.h>
index 0efc2e8d0a201cea71169667006b6bb43af2feb1..39f80d7a874de97ee0b54ef68f117699e47ee7dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH__X86__MM__KMEMCHECK__ERROR_H
 #define ARCH__X86__MM__KMEMCHECK__ERROR_H
 
index 324aa3f072379a46c1f21668680d3b83b9cf10cc..df8109ddf7fe30d60dfb077ff039f08f195c7f54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 
 #include "opcode.h"
index 6956aad66b5b7f157f8b7271d5fc7103afd89026..51a1ce94c24a46068f1a7e38e11064ce5244ef43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH__X86__MM__KMEMCHECK__OPCODE_H
 #define ARCH__X86__MM__KMEMCHECK__OPCODE_H
 
index 4ead26eeaf96c783463e8626c41b4df2c57cbfda..8a03be90272a938012419086572092f16561039c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 
 #include <asm/pgtable.h>
index 9f5966456492fa771162a8385fd51f86d454f668..b595612382c27b92d15586f2a08639a7b7c59d76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH__X86__MM__KMEMCHECK__PTE_H
 #define ARCH__X86__MM__KMEMCHECK__PTE_H
 
index aef7140c00632bacba55162da625dd4d6d8e631d..7ce0be1f99eb663755f31dd7b38c9032a50c4e2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/kernel.h>
 
index 8fed4fe11f951bcb523f4a6335561a50af95b4a3..8d759aae453db618011e63176227e555cc06246b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_X86_MM_KMEMCHECK_SELFTEST_H
 #define ARCH_X86_MM_KMEMCHECK_SELFTEST_H
 
index ff0b2f70fbcb9368e7266a94f9a4698c70496595..49768dc18664bea7fb3b954de1fb47da20139baf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH__X86__MM__KMEMCHECK__SHADOW_H
 #define ARCH__X86__MM__KMEMCHECK__SHADOW_H
 
index afc47f5c953135cd427b88fadd83dd6c6e2d5c6d..c21c2ed046120c8e12d439e71848200f11c41bd5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Support for MMIO probes.
  * Benfit many code from kprobes
  * (C) 2002 Louis Zhuang <louis.zhuang@intel.com>.
index 3fcc8e01683bef96b219d65dbdd0315db1f60605..16c5f37933a2ae2d120402f1871af93872aebb07 100644 (file)
@@ -10,6 +10,8 @@
  * published by the Free Software Foundation.
  */
 
+#define DISABLE_BRANCH_PROFILING
+
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 62474ba66c8e03d3cfefe3e9e8e4d32e7cdce2a9..4e1f6e1b8159e7ddc78d46c8ebb6a4e8d05f4964 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __X86_MM_INTERNAL_H
 #define __X86_MM_INTERNAL_H
 
index 9ceaa955d2bacc317582b510753a91f64eca401b..7eb06701a93593118ee444ed4abe122055ca9d41 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mpx.c - Memory Protection eXtensions
  *
index 9405ffc915026a14e5658d82ab9a6c54c9a781b2..066f3511d5f1fc29069c2a577466c6a1df1f8884 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generic VM initialization for x86-64 NUMA setups.
  * Copyright 2002,2003 Andi Kleen, SuSE Labs.
index d805162e6045b643106a2d1000b5e7fcc318fddc..34a2a3bfde9c144623f4bfafbeb32404e4e3a21d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NUMA emulation
  */
index ad86ec91e640f15063a7a111c731fed39cd81b7c..86860f2796625b50d60b7b7f4ccf9eda8ab24e8d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __X86_MM_NUMA_INTERNAL_H
 #define __X86_MM_NUMA_INTERNAL_H
 
index 5f169d5d76a889cf1c489f6f1c8a0f7a40c10c4a..a25588ad75efef495c4abb9778439da2f7e64a5d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * self test for change_page_attr.
  *
index a739bfc40690b77537ca774b74092fe1beefdcce..eeb5caeb089b448252de2fd96366a09350afe166 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PAT_INTERNAL_H_
 #define __PAT_INTERNAL_H_
 
index d76485b228243c2215b287e3d7dc1012f685f425..fa16036fa5929b44fa5c2d4df1a2c5df41fc2d84 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Handle caching attributes in page tables (PAT)
  *
index b372f3442bbf3b5cff5782001e5c79b46d49edc6..17ebc5a978ccd92b001e99adf8e9a59e63a7ff06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/gfp.h>
 #include <asm/pgalloc.h>
index b9bd5b8b14fa8a75023ebcc6ac126bed499ba925..6b9bf023a700559b87ae7ac89570d9bbd26d1f05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
index cfc3b9121ce4e602f98dec6b9329f5f0d4ea6c69..7f9acb68324ce3c61672f654be80a79b89661b44 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bootmem.h>
 #include <linux/mmdebug.h>
 #include <linux/export.h>
index a3cd5a0c97b3ec7316eafffc977e465c58661b8f..9f6419cafc3298aa2105b54b32c8e38ea37d7006 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/processor.h>
 
 static inline int phys_addr_valid(resource_size_t addr)
index 2dab69a706ec062affe14eb7d9f10fd8538a9018..d7bc0eea20a5ed2fc8ec43ebc06429517cbb362b 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <asm/cpufeature.h>             /* boot_cpu_has, ...            */
 #include <asm/mmu_context.h>            /* vma_pkey()                   */
-#include <asm/fpu/internal.h>           /* fpregs_active()              */
 
 int __execute_only_pkey(struct mm_struct *mm)
 {
@@ -45,7 +44,7 @@ int __execute_only_pkey(struct mm_struct *mm)
         */
        preempt_disable();
        if (!need_to_set_mm_pkey &&
-           fpregs_active() &&
+           current->thread.fpu.initialized &&
            !__pkru_allows_read(read_pkru(), execute_only_pkey)) {
                preempt_enable();
                return execute_only_pkey;
index f65a33f505b683a02aa7543ea653e54a8cdedc28..adb3c5784dac92294253162970647d9bc0d134d7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/init.h>
index 3ea20d61b5236a67ec521c52cc85a5f96d92b766..dac07e4f5834ea458f96aab1f6651732965155fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ACPI 3.0 based NUMA setup
  * Copyright 2004 Andi Kleen, SuSE Labs.
index 1ab3821f9e2629df571544077d63be950361bc20..3118392cdf756bfc913d7a4137d5f7e0d46b046d 100644 (file)
@@ -30,6 +30,7 @@
 
 atomic64_t last_mm_ctx_id = ATOMIC64_INIT(1);
 
+
 static void choose_new_asid(struct mm_struct *next, u64 next_tlb_gen,
                            u16 *new_asid, bool *need_flush)
 {
@@ -80,10 +81,11 @@ void leave_mm(int cpu)
                return;
 
        /* Warn if we're not lazy. */
-       WARN_ON(cpumask_test_cpu(smp_processor_id(), mm_cpumask(loaded_mm)));
+       WARN_ON(!this_cpu_read(cpu_tlbstate.is_lazy));
 
        switch_mm(NULL, &init_mm, NULL);
 }
+EXPORT_SYMBOL_GPL(leave_mm);
 
 void switch_mm(struct mm_struct *prev, struct mm_struct *next,
               struct task_struct *tsk)
@@ -126,8 +128,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
         * isn't free.
         */
 #ifdef CONFIG_DEBUG_VM
-       if (WARN_ON_ONCE(__read_cr3() !=
-                        (__sme_pa(real_prev->pgd) | prev_asid))) {
+       if (WARN_ON_ONCE(__read_cr3() != build_cr3(real_prev, prev_asid))) {
                /*
                 * If we were to BUG here, we'd be very likely to kill
                 * the system so hard that we don't see the call trace.
@@ -143,45 +144,24 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
                __flush_tlb_all();
        }
 #endif
+       this_cpu_write(cpu_tlbstate.is_lazy, false);
 
        if (real_prev == next) {
-               VM_BUG_ON(this_cpu_read(cpu_tlbstate.ctxs[prev_asid].ctx_id) !=
-                         next->context.ctx_id);
-
-               if (cpumask_test_cpu(cpu, mm_cpumask(next))) {
-                       /*
-                        * There's nothing to do: we weren't lazy, and we
-                        * aren't changing our mm.  We don't need to flush
-                        * anything, nor do we need to update CR3, CR4, or
-                        * LDTR.
-                        */
-                       return;
-               }
-
-               /* Resume remote flushes and then read tlb_gen. */
-               cpumask_set_cpu(cpu, mm_cpumask(next));
-               next_tlb_gen = atomic64_read(&next->context.tlb_gen);
-
-               if (this_cpu_read(cpu_tlbstate.ctxs[prev_asid].tlb_gen) <
-                   next_tlb_gen) {
-                       /*
-                        * Ideally, we'd have a flush_tlb() variant that
-                        * takes the known CR3 value as input.  This would
-                        * be faster on Xen PV and on hypothetical CPUs
-                        * on which INVPCID is fast.
-                        */
-                       this_cpu_write(cpu_tlbstate.ctxs[prev_asid].tlb_gen,
-                                      next_tlb_gen);
-                       write_cr3(__sme_pa(next->pgd) | prev_asid);
-                       trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH,
-                                       TLB_FLUSH_ALL);
-               }
+               VM_WARN_ON(this_cpu_read(cpu_tlbstate.ctxs[prev_asid].ctx_id) !=
+                          next->context.ctx_id);
 
                /*
-                * We just exited lazy mode, which means that CR4 and/or LDTR
-                * may be stale.  (Changes to the required CR4 and LDTR states
-                * are not reflected in tlb_gen.)
+                * We don't currently support having a real mm loaded without
+                * our cpu set in mm_cpumask().  We have all the bookkeeping
+                * in place to figure out whether we would need to flush
+                * if our cpu were cleared in mm_cpumask(), but we don't
+                * currently use it.
                 */
+               if (WARN_ON_ONCE(real_prev != &init_mm &&
+                                !cpumask_test_cpu(cpu, mm_cpumask(next))))
+                       cpumask_set_cpu(cpu, mm_cpumask(next));
+
+               return;
        } else {
                u16 new_asid;
                bool need_flush;
@@ -192,7 +172,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
                         * mapped in the new pgd, we'll double-fault.  Forcibly
                         * map it.
                         */
-                       unsigned int index = pgd_index(current_stack_pointer());
+                       unsigned int index = pgd_index(current_stack_pointer);
                        pgd_t *pgd = next->pgd + index;
 
                        if (unlikely(pgd_none(*pgd)))
@@ -200,10 +180,9 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
                }
 
                /* Stop remote flushes for the previous mm */
-               if (cpumask_test_cpu(cpu, mm_cpumask(real_prev)))
-                       cpumask_clear_cpu(cpu, mm_cpumask(real_prev));
-
-               VM_WARN_ON_ONCE(cpumask_test_cpu(cpu, mm_cpumask(next)));
+               VM_WARN_ON_ONCE(!cpumask_test_cpu(cpu, mm_cpumask(real_prev)) &&
+                               real_prev != &init_mm);
+               cpumask_clear_cpu(cpu, mm_cpumask(real_prev));
 
                /*
                 * Start remote flushes and then read tlb_gen.
@@ -216,13 +195,23 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
                if (need_flush) {
                        this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id);
                        this_cpu_write(cpu_tlbstate.ctxs[new_asid].tlb_gen, next_tlb_gen);
-                       write_cr3(__sme_pa(next->pgd) | new_asid);
-                       trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH,
-                                       TLB_FLUSH_ALL);
+                       write_cr3(build_cr3(next, new_asid));
+
+                       /*
+                        * NB: This gets called via leave_mm() in the idle path
+                        * where RCU functions differently.  Tracing normally
+                        * uses RCU, so we need to use the _rcuidle variant.
+                        *
+                        * (There is no good reason for this.  The idle code should
+                        *  be rearranged to call this before rcu_idle_enter().)
+                        */
+                       trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
                } else {
                        /* The new ASID is already up to date. */
-                       write_cr3(__sme_pa(next->pgd) | new_asid | CR3_NOFLUSH);
-                       trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, 0);
+                       write_cr3(build_cr3_noflush(next, new_asid));
+
+                       /* See above wrt _rcuidle. */
+                       trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, 0);
                }
 
                this_cpu_write(cpu_tlbstate.loaded_mm, next);
@@ -233,6 +222,40 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
        switch_ldt(real_prev, next);
 }
 
+/*
+ * Please ignore the name of this function.  It should be called
+ * switch_to_kernel_thread().
+ *
+ * enter_lazy_tlb() is a hint from the scheduler that we are entering a
+ * kernel thread or other context without an mm.  Acceptable implementations
+ * include doing nothing whatsoever, switching to init_mm, or various clever
+ * lazy tricks to try to minimize TLB flushes.
+ *
+ * The scheduler reserves the right to call enter_lazy_tlb() several times
+ * in a row.  It will notify us that we're going back to a real mm by
+ * calling switch_mm_irqs_off().
+ */
+void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
+{
+       if (this_cpu_read(cpu_tlbstate.loaded_mm) == &init_mm)
+               return;
+
+       if (tlb_defer_switch_to_init_mm()) {
+               /*
+                * There's a significant optimization that may be possible
+                * here.  We have accurate enough TLB flush tracking that we
+                * don't need to maintain coherence of TLB per se when we're
+                * lazy.  We do, however, need to maintain coherence of
+                * paging-structure caches.  We could, in principle, leave our
+                * old mm loaded and only switch to init_mm when
+                * tlb_remove_page() happens.
+                */
+               this_cpu_write(cpu_tlbstate.is_lazy, true);
+       } else {
+               switch_mm(NULL, &init_mm, NULL);
+       }
+}
+
 /*
  * Call this when reinitializing a CPU.  It fixes the following potential
  * problems:
@@ -265,7 +288,7 @@ void initialize_tlbstate_and_flush(void)
                !(cr4_read_shadow() & X86_CR4_PCIDE));
 
        /* Force ASID 0 and force a TLB flush. */
-       write_cr3(cr3 & ~CR3_PCID_MASK);
+       write_cr3(build_cr3(mm, 0));
 
        /* Reinitialize tlbstate. */
        this_cpu_write(cpu_tlbstate.loaded_mm_asid, 0);
@@ -304,16 +327,20 @@ static void flush_tlb_func_common(const struct flush_tlb_info *f,
        /* This code cannot presently handle being reentered. */
        VM_WARN_ON(!irqs_disabled());
 
+       if (unlikely(loaded_mm == &init_mm))
+               return;
+
        VM_WARN_ON(this_cpu_read(cpu_tlbstate.ctxs[loaded_mm_asid].ctx_id) !=
                   loaded_mm->context.ctx_id);
 
-       if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(loaded_mm))) {
+       if (this_cpu_read(cpu_tlbstate.is_lazy)) {
                /*
-                * We're in lazy mode -- don't flush.  We can get here on
-                * remote flushes due to races and on local flushes if a
-                * kernel thread coincidentally flushes the mm it's lazily
-                * still using.
+                * We're in lazy mode.  We need to at least flush our
+                * paging-structure cache to avoid speculatively reading
+                * garbage into our TLB.  Since switching to init_mm is barely
+                * slower than a minimal flush, just switch to init_mm.
                 */
+               switch_mm_irqs_off(NULL, &init_mm, NULL);
                return;
        }
 
index 8c9573660d51e6b0297e4464b3af2056d93b9f3c..0554e8aef4d54522393f78b8b7973f8dfac4750c 100644 (file)
@@ -284,9 +284,9 @@ static void emit_bpf_tail_call(u8 **pprog)
        /* if (index >= array->map.max_entries)
         *   goto out;
         */
-       EMIT4(0x48, 0x8B, 0x46,                   /* mov rax, qword ptr [rsi + 16] */
+       EMIT2(0x89, 0xD2);                        /* mov edx, edx */
+       EMIT3(0x39, 0x56,                         /* cmp dword ptr [rsi + 16], edx */
              offsetof(struct bpf_array, map.max_entries));
-       EMIT3(0x48, 0x39, 0xD0);                  /* cmp rax, rdx */
 #define OFFSET1 43 /* number of bytes to jump */
        EMIT2(X86_JBE, OFFSET1);                  /* jbe out */
        label1 = cnt;
index 1599f568f0e2fc5e7eef53c63fdce878820b1b25..4d49b5a27025ca7b58602d263a7f1195509b3097 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index 5c6fc3577a49f80a75c86cd3815a6c5758ba1288..c806b57d3f22f94fa74fb01469768ed6a15f931f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                          := i386.o init.o
 
 obj-$(CONFIG_PCI_BIOS)         += pcbios.o
index 3961103e91760a14d24eec1ad3caffa5ad1f2adb..7df49c40665ed13315e713621984a10f69dae4c2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/acpi.h>
 #include <linux/init.h>
index ae387e5ee6f79435ecd206bfd237b499d7e50b51..649bdde63e328b223ff8371057e9052371ddb7e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/topology.h>
index 6eb3c8af96e23678f16378858d05d435e12199fd..2752c02e3f0e66e44134dd22a1a4d977f1b22614 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/range.h>
index ff8f65b04574d6a3ac29b3ca6d0050d2971c732b..697dd841b118acac57187ff0560fa842f7fa466d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BUS_NUMA_H
 #define __BUS_NUMA_H
 /*
index 15460590b8c551c023e7cd0eb1df768cdb572d45..2d9503323d104f65bca6798badd6e7cdd0a41890 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * direct.c - Low-level direct PCI config space access
  */
index d1067d539bee2da24fb260ac64b2162ecf63d17b..f0114007e9159acbba649b7b03eb95d41ce2b433 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <asm/pci-direct.h>
index f2228b150faa69caf10bc40574897597e3cd686a..4210da7b44dec8f6c556680eacc6512991fbcdfa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Exceptions for specific devices. Usually work-arounds for fatal design flaws.
  */
index 7b4307163eacc8f120983948c634d83c90155328..ed4ac215305d02e578db31ec9ccfd281b1e607fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Low-Level PCI Access for i386 machines
  *
index adb62aaa7ecd5ad591efd2becad4f43e6fbdfe02..5fc617edf10856b88fda394c3a7456a0b9888ec7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <asm/pci_x86.h>
index b901ece278dddb4f6aaf61c8b6479a26526af71a..1012a5f0f98d928db2f44c3b252a3441b048444a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Intel MID PCI support
  *   Copyright (c) 2008 Intel Corporation
index 0f5f60b14f4895a7fc1550e788a540bc20a111d1..0452629148be6fc27b3f3286f79481bc0e2cccb8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Low-Level PCI Support for PC -- Routing of Interrupts
  *
index d1b47d5bc9c33f8869357f04cc7def1f83eb271e..96684d0adcf944abbd1d9688d0c1cd90fb2fdf2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mmconfig-shared.c - Low-level direct PCI config space access via
  *                     MMCONFIG - common code between i386 and x86-64.
index f1c1aa0430ae365712d6105d2574006f2e098545..887d181b769b0cd2789f817f99efb64eaffc73b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mmconfig.c - Low-level direct PCI config space access via MMCONFIG
  *
index 76595408ff53f2e065f97d740d6aaa086033e841..9c97d814125eb901ef8f6302fe3ae83cdfcaf123 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * BIOS32 and PCI BIOS handling.
  */
index 184842ef332e0123762c3463bd795ef4a9aaa282..d0e835470d01aff90b0f54cc45217c550870f3fb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Platform specific code goes here
 obj-y  += atom/
 obj-y  += ce4100/
index 2f56e1ed61c30f9e57300e8ee311b2d2767115c4..e4dc3862d423c2be625f63ea56c73afc828d79d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD_efi_thunk_$(BITS).o := y
 OBJECT_FILES_NON_STANDARD_efi_stub_$(BITS).o := y
 
index 928b6dceeca08a54797e25bc4da9b449288d5335..9061babfbc83d73b59a1cddb7b954353e3f53c2d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common EFI (Extensible Firmware Interface) support functions
  * Based on Extensible Firmware Interface Specification version 1.0
index 52f7faa1538f65df3107203b7ec18de2d3a216f7..324b93328b3746f4bb8010780ee85915707b8095 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Extensible Firmware Interface
  *
index 12e83888e5b96714a4ad7bd8b9cc84844dd91ded..20fb31579b6942ccbcb4c8ebea350d72a81e860f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * x86_64 specific EFI support functions
  * Based on Extensible Firmware Interface Specification version 1.0
index 040192b50d0209b46b64e2607b0e41fe2bb0123b..ab2e91e7689425f40eeb46a2b0cd49d34c4bbf20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * EFI call stub for IA32.
  *
index cd95075944abff4a7f447d9727c40c050407768c..74628ec78f29713dd9121174b129768a553959d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Function calling ABI conversion from Linux to EFI for x86_64
  *
index ff85d28c50f261c728eb0731391706b1af3777af..189b218da87cb67c68b4b40d6600eb6b3f0e2de8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2014 Intel Corporation; author Matt Fleming
  *
index 53e0235e308f1c69e783288496c0f3d0ee6dcefe..480fed21cc7d41a8188135b441ae2f8bb69c3d69 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Family-Level Interface Shim (FLIS)
 obj-$(subst m,y,$(CONFIG_PINCTRL_MERRIFIELD)) += platform_mrfld_pinctrl.o
 # SDHCI Devices
index b8f562049cad102cd315987f87b099bed97e4cce..42f879b75f9b9d7536a659c6079ab880cd04daf9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**
  * imr_selftest.c -- Intel Isolated Memory Region self-test driver
  *
index fd332c5339474abdb3a7db5245014e744607d1f9..049f92a9379d76c957daa2bcb2bb474e7413b967 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OLPC)             += olpc.o olpc_ofw.o olpc_dt.o
 obj-$(CONFIG_OLPC_XO1_PM)              += olpc-xo1-pm.o xo1-wakeup.o
 obj-$(CONFIG_OLPC_XO1_RTC)     += olpc-xo1-rtc.o
index 948deb289753f8a26c1cbf3e47d96898e97fe983..5fee3a2c2fd4dfc0959a99d0e0a2b6b41f0a32f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 .text
 #include <linux/linkage.h>
 #include <asm/segment.h>
index 05041871ac9098026bbe2614a70d03f1bfd6f816..a4701389562ca7f98016bd5176d9d40cabb0075a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD_hibernate_asm_$(BITS).o := y
 
 # __restore_processor_state() restores %gs after S3 resume and so should not
index 1d0fa0e24070bbec0a8607a717dfbcc960ef38e5..6e56815e13a0aac896974a042ec8cb8ede70aa70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This may not use any stack, nor any variable that is not "NoSave":
  *
index 7dbdb780264df9258d98829f8a11496cd58bb7ab..2f15a2ac4209cac748339aba85a4c09f87e88af5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD := y
 
 purgatory-y := purgatory.o stack.o setup-x86_$(BITS).o sha256.o entry64.o string.o
index bb026699ad190837c4a66596ab566cba63f57f5e..a9c3db1252221aa710d8e81652488ca8059aaf0a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config RAS_CEC
        bool "Correctable Errors Collector"
        depends on X86_MCE && MEMORY_FAILURE && DEBUG_FS
index 1f71980fc5e0fa9983c1687aa4ff81f02eb0b989..ed84d3917a5916fe003188c2603b81317cce7732 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/memblock.h>
index a28221d94e69eb60fc18aab9c5997ed52a7a763f..30b0d30d861a22679b69127c2bfa0ebe2c5ea4d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Real-mode blob header; this should match realmode.h and be
  * readonly; for mutable data instead add pointers into the .data
index d74cff6350edc2208fcb6321f63ec7d5966f8c44..c76041a353970de221b7a60526b0434b1a6d47e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_X86_REALMODE_RM_REALMODE_H
 #define ARCH_X86_REALMODE_RM_REALMODE_H
 
index 86b2e8d6b1f1bdf99883c8174dd5a63841add207..df8e11e26bc39bddd3003b2855b3a9d0d19b7f75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * realmode.lds.S
  *
index d66c607bdc580941b387981c5ac5837e8274a511..cd2f97b9623baeec44b4d3128d613f82802e439b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 #include <asm/segment.h>
 #include <asm/page_types.h>
index 867ae87adfae8d22cff122fc8163ffc7461d2cc9..8d4cb64799eaeaacc766b19fff8508b59a622d02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common heap and stack allocations
  */
index 48ddd76bc4c3d202fe77740bda68a91edd8b1ee2..2dd866c9e21ea4f8fb7e04180ff408978d87d4f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *     Trampoline.S    Derived from Setup.S by Linus Torvalds
index 614fd7064d0a21366c3f27721e610038fda1e9b0..de53bd15df5a865589e7eda181a1771fbe7297e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *     Trampoline.S    Derived from Setup.S by Linus Torvalds
index b1ecdb9692ad92d7d449ca5bac0efc901d3e5a42..7c706772ab59f15ce4d5713cb1eac5a6538d3153 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        .section ".rodata","a"
        .balign 16
 tr_idt: .fill 1, 6, 0
index 91405d515ec69003db7e3bcdbd3ecc510171d6b8..1d6437e6d2ba3bcf5701a8c49fb117dc36c3e8a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "wakeup.h"
 #include "boot.h"
 
index 7dd86a419f5d215401ef66627eb388b2cddd5f14..0e4fd08ae447131b95ba33afb8eed0af85226040 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for the wakeup data structure at the head of the
  * wakeup code.
index 9e7e14797a72dda0b85d4c70afca61fdb2fdf92e..05ac9c17c8111b9c9672386fcddaa5dcca1dd98e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ACPI wakeup real mode startup stub
  */
index 204c6ece0e97640d6373206a12155356655a585c..c078dba40cef89a2d95ab4dc65e903606392b650 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Wrapper script for the realmode binary as a transport object
  * before copying to low memory.
index 604a37efd4d5fd10ae54a1455a98e608a963f6d7..972b8e8d939c77ef787c9961cd613ff4d2656cbd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 PHONY += posttest
 
 ifeq ($(KBUILD_VERBOSE),1)
index c13c0ee48ab421a9a13e9170420dce1fe3e3d796..e0edeccc142921ddeb57ef44c8ef908b4f20f4ef 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # Usage: objdump -d a.out | awk -f distill.awk | ./test_get_len
 # Distills the disassembly as follows:
 # - Removes all lines except the disassembled instructions.
index a3d2c62fd805772c0c9d56fe57b80a9d058cf3ff..b02a36b2c14fb20522dc16d3f4093cbe36e2e740 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # gen-insn-attr-x86.awk: Instruction attribute table generator
 # Written by Masami Hiramatsu <mhiramat@redhat.com>
 #
index 73eb7fd4aec48d02e367b87ec1326da6c4022bde..5d73c443e778b3a0e2fd79b4bf0f301cd1c8d878 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* This is included from relocs_32/64.c */
 
 #define ElfW(type)             _ElfW(ELF_BITS, type)
index 1d23bf953a4a451033f2d25a08eab2eebd751b3f..43c83c0fd22c80e2e77b7a53fe363a4ce2bc5f54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RELOCS_H
 #define RELOCS_H
 
index b2ade2bb4162784a2b295a60b06b021c7e0bde95..9442ff78be837ecc99e55ccef6fbddf123fd5e53 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "relocs.h"
 
 #define ELF_BITS 32
index 56b61b743c4cd7f9db83a334172a2c3d257f99c9..9029cb619cb1ffaacc17582dd71109d1a37d9222 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "relocs.h"
 
 #define ELF_BITS 64
index acab636bcb348191794e0b8a4343c1874daa45a1..6634352a20bc7835ac8365a31ec6b9e146581cb2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "relocs.h"
 
 void die(char *fmt, ...)
index ed56a1c4ae734d8fa2b3cb2ccd4133c2ebc4c5a8..13ed827c7c665c105dfa430e1ce7c61ea4fd9d4e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 mainmenu "User Mode Linux/$SUBARCH $KERNELVERSION Kernel Configuration"
 
 source "arch/um/Kconfig.common"
index 46cbbfe03285922a520c40c78061853d55a2de1a..c2d3d7c51e9e8f938accd4b695ea0dd8a5bf6957 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
 #
index c656cf443f4a2b8214717cbdaca3139b68e95da1..0d2d5fbb3a39331f1e05df6869775da6aaedf880 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UM_HWEIGHT_H
 #define _ASM_UM_HWEIGHT_H
 
index 00c319048d52d78e58755f7da2639aa044e0b885..b7d73400ea29aa095acd58c5e8502a6524aff04f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_UM_BARRIER_H_
 #define _ASM_UM_BARRIER_H_
 
index 54d96f1e35943c227fa998f7d6c5120417df9956..2a56cac646879d219885ea446e03aa9362c8782b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_CHECKSUM_H
 #define __UM_CHECKSUM_H
 
index 4ec34a51b62c9631302ce1fc8d6a3aa867d301e0..34de4e93d945face6b0f0f553d2a7933d27bbeda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_DESC_H
 #define __UM_DESC_H
 
index 61af80e932ebfbe84763b50032561d012641fa74..a3b061d66082ba88e76fa22033af8e6df1041b9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_MODULE_H
 #define __UM_MODULE_H
 
index c77db228898225d02e72d524e656a4e20a1d8aa0..593d5f3902bd60a5eeb2b7f1ebc9decf6276e738 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_PROCESSOR_H
 #define __UM_PROCESSOR_H
 
index b291ca5cf66bfc83e8176d0d6c05fa82a49ad823..83822fd42204d3ffeab14d3a2c652a30f71d9205 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_X86_PTRACE_H
 #define __UM_X86_PTRACE_H
 
index 41dd5e1f3cd705b7c70f08d50efb2c67811b4a62..453db377150d6f60e0563cadf6ee5c9aa726fbb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_SEGMENT_H
 #define __UM_SEGMENT_H
 
index 11ab90dc5f14e95b521ee389e800f8abcfba0ca6..ef898af102d164270cb27f0655780df60a45c1a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_ASM_SYSCALL_H
 #define __UM_ASM_SYSCALL_H
 
index 7bb89a27a5e43c266583d753e0e270aa73a0ceda..48a3eb09d95165b4baea6e2cc8f00071e032ec76 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/elf.h>
 #include <linux/coredump.h>
 #include <linux/fs.h>
index 7642e2e2aa6104215a2ab8c4ae08dde5b0786570..c027e93d1002d2f32a5a0575dbf364763a81cec8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <asm/elf.h>
 
index 1d33d72c6284d73e0078fd3ba7c38bee07f207db..49c3744cac371bb8a3a64154fc63e2607f679841 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/ucontext.h>
 #define __FRAME_OFFSETS
 #include <asm/ptrace.h>
index 5adb6a2fd117df01c232156e2091bfc3d190eac7..e62174638f009231fa6a6c4fd3e25eb02e177cfe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
index ed8ea90967dcc355ad51d5ae2d86b6c0a2341c67..3e1b1bf6acbcce7050a0757a5c257e19adff23ec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <linux/unistd.h>
 
index 39053192918da8b66bd983d6abf03ae3feabd77c..62eaf8c80e041791e142315a6a369b0d0f2d6b6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #
 # arch/i386/setjmp.S
 #
index c56942e1a38caccb006119b50de77053459fb8c4..1b5d40d4ff46d28dc545db3e3732115e3c02c1c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #
 # arch/x86_64/setjmp.S
 #
index ff7766d282263b4a7726279973275844e5500b6b..166cedbab9266fb9eac60a07cbeaf681ffee3fcd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __i386__
 #include "archsetjmp_32.h"
 #else
index 0f312085ce1d26ce7bec6b890d646f4f0194fc14..fb08f2576438262eeeaff441801165f38d1ff2b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/um/include/sysdep-i386/archsetjmp.h
  */
index 2af8f12ca16169a8f78f2a1d0b138bd563f98334..9b499e457ba0f182ebf63f8faba43ef7f107c191 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * arch/um/include/sysdep-x86_64/archsetjmp.h
  */
index 862ecb1c7781b2aac00c24fbe86d8594f2ed9025..4390803e07a10d53ba81d7750263e49f850b7fda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __i386__
 #include "faultinfo_32.h"
 #else
index 7e1d35b6ad5c0990c4fb33984ecd833767cdbeb9..a004bffb7b8d2e5c25223fe76f901b0f4df918de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/stddef.h>
 #include <linux/sched.h>
 #include <linux/elf.h>
index eb9356904ad3bdeee29211039e940f51d267d2e3..6ca4ecabc55b55c478359e60cdd28afb52c1f6ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SYSDEP_X86_PTRACE_H
 #define __SYSDEP_X86_PTRACE_H
 
index 16cd6b5e71f75163416fab642010b9a9ccb48b04..44782bbad41ea90658dfc8b19a619f4bd344789e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <generated/user_constants.h>
 
 #define PT_OFFSET(r) ((r) * sizeof(long))
index 3f55e5bd3cecd8e669a5b5af7c47babbe893da31..ce0ca46ad383c5aec4f5a22a05ffedc2b3770049 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm/unistd.h>
 #include <sys/mman.h>
 #include <signal.h>
index bd9a89b67e41f20bdd17b2f38f5c9543ef28c7b1..b2060ac707f0c172938614998bd1b9c3985695c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __i386__
 #include "syscalls_32.h"
 #else
index a682db13df23b373ab23c9510699f04e54fae77a..b968016aa379e13359ea645397fcbf6aa62f89b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SYSDEP_TLS_H
 #define _SYSDEP_TLS_H
 
index 98816804e131fcb8701f3b360055de2501a8300a..a193e88536a904a54abf4177323e2d871825423a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <as-layout.h>
 
 .section .__syscall_stub, "ax"
index ba914b3b8cc4d960203ba3a038afbeb00cab0d1d..8a95c5b2eaf93266a64543ae2fa86cfdecff89b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <as-layout.h>
 
 .section .__syscall_stub, "ax"
index bfce503dffae23bb0b39c621f5d8c2e0d936fec5..9649b5ad2ca2a54325573d4f389163b935e6c772 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * System call table for UML/i386, copied from arch/x86/kernel/syscall_*.c
  * with some changes for UML.
index f306413d3eb6e332d5ad10db63700101cafd40f0..c8bc7fb8cbd65460a3c7c0bfd8cdc5baceeb9e89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * System call table for UML/x86-64, copied from arch/x86/kernel/syscall_*.c
  * with some changes for UML.
index 627d68836b163a97d132cb3475b45396558060bd..5c65254c8f35d76934873bcedc85e9b24239f975 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/syscalls.h>
 #include <os.h>
 
index 3ad714373d7f13ca2130ef3ebcc3c811840b4b8e..3a621e0d39253aa30a7d5eadb523cd4a2e1315cb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched.h>
 #include <asm/ptrace-abi.h>
 
index 3099c209546f8722c03f84c25c9615adee9c4095..5b37b7f952ddffc4cb76b53e590609fcb2d076a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stddef.h>
 #include <signal.h>
index 329406224330cd7317e5b9fc5bf46521dc93805f..10003359e6330ff893c882f16e16afd450551afe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Building vDSO images for x86.
 #
index 7ee90a9b549da32c9c12d694215b89d08645574c..8e3ea6bb956fc8fead5e280bf82a52287d1328a4 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 nm="$1"
 file="$2"
 $nm "$file" | grep '^ *U' > /dev/null 2>&1
index 634a2cf620465ebc29414652885858dc44d466f3..439b790df18f0b01e47910df0a256d289be90ed9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for vDSO.  This is an ELF shared object prelinked to
  * its virtual address, and with only one read-only segment.
index 1cb468adacbbd50d02ae13c69191aa789337aaf0..a4a3870dc059b0f89c3b345909345b51eef0164a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 
 __INITDATA
index b96b2677cad82820207bb38a3e09bdd8c4a61eba..73c508587a984079ce25cbf697a65a3ae3f61e47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linker script for 64-bit vDSO.
  * We #include the file to define the layout details.
index 1ecd419811a2b30a88d1fccc140829292e184035..f605825a04abf86126d5b349bd9d297fca1aa344 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # This Kconfig describes xen options
 #
index bced7a369a11dea1284ddc9416ca3256531104c4..d83cb5478f541e71e59ec1f2fac8931b549acd19 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD_xen-asm_$(BITS).o := y
 OBJECT_FILES_NON_STANDARD_xen-pvh.o := y
 
index b5e48da7fbff408e3beb144219d17e95b86cfcb4..30434b8708f206d62888b1b9bd46466a25af7861 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 
 #include <asm/x86_init.h>
index 1daff5545c0a17992a112d5f677f9930c8698a29..13da87918b4f3288d1e437fa0c97390ec6a6810c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/debugfs.h>
 #include <linux/slab.h>
index 12ebf3325c7bbd1c324a845792bf02a2806ebb56..6b813ad1091c02b17f8e6d099cfb50e07c4b2263 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_DEBUGFS_H
 #define _XEN_DEBUGFS_H
 
index 0e7ef69e853151207c985d5306927c09d335acdc..d669e9d890017770456abe458f1161eb2509c09e 100644 (file)
@@ -93,11 +93,11 @@ int xen_cpuhp_setup(int (*cpu_up_prepare_cb)(unsigned int),
        int rc;
 
        rc = cpuhp_setup_state_nocalls(CPUHP_XEN_PREPARE,
-                                      "x86/xen/hvm_guest:prepare",
+                                      "x86/xen/guest:prepare",
                                       cpu_up_prepare_cb, cpu_dead_cb);
        if (rc >= 0) {
                rc = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
-                                              "x86/xen/hvm_guest:online",
+                                              "x86/xen/guest:online",
                                               xen_cpu_up_online, NULL);
                if (rc < 0)
                        cpuhp_remove_state_nocalls(CPUHP_XEN_PREPARE);
index 69b9deff7e5c84c4133064ada0606eb872908152..d4396e27b1fb755994fc839a08b86e45e625db42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Core of Xen paravirt_ops implementation.
  *
index 98ab1767345437bbb8267e1e43af23d923791cd9..7bd3ee08393e60620bc744ac1768221267652a3f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/acpi.h>
 
 #include <xen/hvc-console.h>
index d4eff5676cfabc85cffb07a187270fe1352cecf1..74179852e46c31108adf405e86230c3830add94a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/hardirq.h>
 
 #include <asm/x86_init.h>
index 3fe2b3292915847b8a74b3a58bdfd9464db35935..a7e47cf7ec6cdc2eb709188d47829a415bbbffec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_MMU_H
 
 #include <linux/linkage.h>
index 1c57f1cd545c518083a35546f748e52816942a43..2cfcfe4f6b2a054e52868f6fa49e35caf3c2fe54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/crash_dump.h>
 
index 509f560bd0c6d4731cac96fc64296184e6818b9c..71495f1a86d72f7df1464ce3ffe805d880948bbd 100644 (file)
@@ -1238,21 +1238,16 @@ static void __init xen_pagetable_cleanhighmap(void)
         * from _brk_limit way up to the max_pfn_mapped (which is the end of
         * the ramdisk). We continue on, erasing PMD entries that point to page
         * tables - do note that they are accessible at this stage via __va.
-        * For good measure we also round up to the PMD - which means that if
+        * As Xen is aligning the memory end to a 4MB boundary, for good
+        * measure we also round up to PMD_SIZE * 2 - which means that if
         * anybody is using __ka address to the initial boot-stack - and try
         * to use it - they are going to crash. The xen_start_info has been
         * taken care of already in xen_setup_kernel_pagetable. */
        addr = xen_start_info->pt_base;
-       size = roundup(xen_start_info->nr_pt_frames * PAGE_SIZE, PMD_SIZE);
+       size = xen_start_info->nr_pt_frames * PAGE_SIZE;
 
-       xen_cleanhighmap(addr, addr + size);
+       xen_cleanhighmap(addr, roundup(addr + size, PMD_SIZE * 2));
        xen_start_info->pt_base = (unsigned long)__va(__pa(xen_start_info->pt_base));
-#ifdef DEBUG
-       /* This is superfluous and is not necessary, but you know what
-        * lets do it. The MODULES_VADDR -> MODULES_END should be clear of
-        * anything at this stage. */
-       xen_cleanhighmap(MODULES_VADDR, roundup(MODULES_VADDR, PUD_SIZE) - 1);
-#endif
 }
 #endif
 
@@ -2220,7 +2215,7 @@ static void __init xen_write_cr3_init(unsigned long cr3)
  * not the first page table in the page table pool.
  * Iterate through the initial page tables to find the real page table base.
  */
-static phys_addr_t xen_find_pt_base(pmd_t *pmd)
+static phys_addr_t __init xen_find_pt_base(pmd_t *pmd)
 {
        phys_addr_t pt_base, paddr;
        unsigned pmdidx;
index ea54a08d83012dce01f542e46cbaf453a0881ba5..dc502ca8263e8a682588a6e7fcf1206586470ba7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen hypercall batching.
  *
index 9c2e74f9096c9eba23a71b2e4f736132d6ab2585..1c51b2c87f30a12dfb8d022c54de1f88046234ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_MULTICALLS_H
 #define _XEN_MULTICALLS_H
 
index b9fc52556bcc7ee185ef41c1263e27f9d667fa71..7d00d4ad44d44d62f9a6a089a2c8d4a649e6aa08 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/interrupt.h>
 
index 4be5355b56f74264727fbb9d678be54cbc38e794..0e83a160589bc2e6c9149bbbae7e049c08e0e8c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __XEN_PMU_H
 #define __XEN_PMU_H
 
index ac55c02f98e901d6c1dabfb0196f82f0fb1db959..c114ca767b3b8a382918e2b0160983fa257318db 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Machine specific setup for xen
  *
index e7f02eb73727270326705bb28563755a05905f87..77c959cf81e7c3fb573066513067c47f2698fedc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/smp.h>
 #include <linux/cpu.h>
 #include <linux/slab.h>
index 87d3c76cba37a5ff108ac8a38a8718ce69473da4..bd02f9d50107e06b9fad0fabd6e206234e7263b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_SMP_H
 
 #ifdef CONFIG_SMP
index fd60abedf65804e0379d751cfb79192d81c6127b..f8d39440b2923fff0be8848e886db829a51b2e1f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/smp.h>
 
 #include <xen/events.h>
index 51471408fdd1329b0097f2463acff17596b83b1e..05f91ce9b55eea1519a900dd57a48a29f6c08da1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen SMP support
  *
index 25a7c4302ce70390e81f98be0df2324a725364d5..08324c64005dba48d79ee8914a198562e582e0d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Split spinlock implementation out into its own file, so it can be
  * compiled in a FTRACE-compatible way.
index d6b1680693a9b7114e7d87e59b52d871e28a6b27..92bf5ecb6bafa2fe844c52a82847316403b55ef2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/tick.h>
 
index 484999416d8bd14d0863f1861c419436943fb3f0..e666b614cf6d2cb80ac956b0913baae65e50d30b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 
 #include <xen/xen.h>
index 3abe4f07f34a4292fc571485f7b5dbee4824f2b8..a2e0f110af56ddac120b382691dcf61e70e3db14 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 
 #include <asm/fixmap.h>
index 1ecb05db363203ec004f0e3c6764ca5f448fbc78..80c2a4bdf230ae4cfe89c6cea6810d57512a9507 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen time implementation.
  *
index a702ec2f59317f7b9ee98f1cec876a07f99b7b28..329f60eb95deb1cffdbe5818df5a6139dddb33b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ftrace.h>
 #include <xen/interface/xen.h>
 #include <xen/interface/xen-mca.h>
index 6722e3733f02433e75bf2d91f185191e3ada65c0..e336f223f7f47425181ba3b6e154f9ef28f482f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/screen_info.h>
 #include <linux/init.h>
 
index dcd31fa39b5d8ebc35956add3ca71a7df54d6f3a..8019edd0125c93d1310c187cf74e6520852c1ef7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Asm versions of Xen pv-ops, suitable for direct use.
  *
index 1200e262a11643ebe6bc964875c1d2ed5756f986..c15db060a2425e45cded5b40e6363ebf29696cd6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Asm versions of Xen pv-ops, suitable for direct use.
  *
index dae2cc33afb55f6ef27b959996cc4282b2046d12..c98a48c861fd33ec4958dccc462ecbccf6856f3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Asm versions of Xen pv-ops, suitable for direct use.
  *
index a7525e95d53fe9d35ce31349d6fb45dc112f9418..b5b8d7f4355744d24b00404ac9eb35360d5e9e82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Xen-specific pieces of head.S, intended to be included in the right
        place in head.S */
 
index c8a6d224f7edca46447c5e94a7d633531500fa03..f377e1820c6ccabc828733be2e3a404ae46a140e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef XEN_OPS_H
 #define XEN_OPS_H
 
index 7ad6d77b2f223b11566603e8bed614e5f32868c5..eb1f196c3f6e5f1ddab977b72d1b87a4bcd3a206 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ZONE_DMA
        def_bool y
 
index 8430af27de0a67e915ec330d43eb71ce9a7d3f37..f64c14adadb365ddebd758908df05c9fe2e20d93 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
index 86c34dbc9cd0abdf1b5b055f6d9a7b46e082aae2..bf7fabe6310dbf38d4dd9dfc0a9d4a572a430441 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <variant/core.h>
 #include <asm/regs.h>
 #include <asm/asmmacro.h>
index 4082f26716b9a56768946568b267c04bf7f00764..885495460f7e4b38ef9cc559ee02e4bbca6c8331 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
 / {
index 6106bdc097ad2f51a257d7643770b89c8d82ab8e..6887ff090fce63e93ca8c5802202ea92d5730374 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "xtfpga.dtsi"
 /include/ "xtfpga-flash-128m.dtsi"
index 65f3d741b9649c8ed14cccd5a87e16fc2b15b6a8..d8e194a0f64e21305ba4697e4727faf862409121 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "xtfpga.dtsi"
 /include/ "xtfpga-flash-128m.dtsi"
index 249822b99bd618e8e44e77eb591982786b7b70e6..974a8d9041b3774a57d3d6d450a96c41351ab683 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "xtfpga.dtsi"
 /include/ "xtfpga-flash-16m.dtsi"
index a0f8b8ad39204d99f977972f38b5cd9f737fdf0a..7c203c1c746a1de6e2162a74523d2974380578ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "xtfpga.dtsi"
 /include/ "xtfpga-flash-4m.dtsi"
index 905c3a5035e96983799ca116c9cd05a24f24f54c..08e5c8d471974184bc4c40280dc7c1bb72499ddd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /include/ "xtfpga.dtsi"
 /include/ "xtfpga-flash-16m.dtsi"
index d3a88e029873d8facc0a21649414c89c61712427..9bf8bad1dd18afcf2ac4e64264784067e5863efe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        soc {
                flash: flash@00000000 {
index 1d97203c18e7f787b5696b4468e4901c9b88fcbb..40c2f81f7cb66f8f31b700070017698069b9c3c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        soc {
                flash: flash@08000000 {
index d1c621ca8be10cba5565fa9ce1e7b82cabaef973..fb8d3a9f33c2308ca0e57ba7fd0caca83ed99b90 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        soc {
                flash: flash@08000000 {
index 91616a9d79dfbbc5bd181e85b4a78a8cbce3f3a9..1090528825ec6aee23f921338f62fd30f02a8a2e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 / {
        compatible = "cdns,xtensa-xtfpga";
        #address-cells = <1>;
index 6868f2ca6af83372bfd336686e07a14d9c231b66..d2a7f48564a470d5af6352da21a3affac9566180 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for some libs needed by zImage.
 #
index d9862aa8ca255c9731179575d29a253fe2c6db3c..e3ecd743c5153d3437e501280fa36b35177fb8a4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/zlib.h>
 
 /* bits taken from ppc */
index 60e0d6a4579569e228b8b232a646abf6a8d3fcc4..b8532d7877b38b7d6a1353b433ca7249b0621ecd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_XTENSA_FLAT_H
 #define __ASM_XTENSA_FLAT_H
 
index 22984fd1d8464addb8e041e552f281ff76f3daf1..2cebdbbdb6334666e29662b8e34ff46410e53c4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static inline void init_mmu(void)
 {
 }
index 30ee8c608853d4fb4b238a01319589d38ce018b7..5b0027d4ecc05cff651baec243a612d8deea20bc 100644 (file)
@@ -208,11 +208,6 @@ struct mm_struct;
 /* Free all resources held by a thread. */
 #define release_thread(thread) do { } while(0)
 
-/* Copy and release all segment info associated with a VM */
-#define copy_segments(p, mm)   do { } while(0)
-#define release_segments(mm)   do { } while(0)
-#define forget_segments()      do { } while (0)
-
 extern unsigned long get_wchan(struct task_struct *p);
 
 #define KSTK_EIP(tsk)          (task_pt_regs(tsk)->pc)
index 7ec5ce10c9e9cd3d53db75acf509a2b052cfbe65..bb1fe6c1816eb1e04733f4e4086c5e2604c1256f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SPINLOCK_TYPES_H
 #define __ASM_SPINLOCK_TYPES_H
 
index cb4c2ce8d447b16711aff6fc06c0e27f21c6180e..ed66db3bc9bbf795bf5e00d52456fbd0dc6e4fb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XTENSA_UNISTD_H
 #define _XTENSA_UNISTD_H
 
index 54eb6315349cd1040379eafa4cd234f53f6bf77e..5b9f832c2e77b5f10a562cb9259f2c6916af44bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XTENSA_BYTEORDER_H
 #define _XTENSA_BYTEORDER_H
 
index 47d82c09be7b0b0df85c9fd97ec50334cc6d738c..ec43609cbfc533c411e6ddb1bbcda8a3089ebf43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/ioctls.h
  *
index c33aa6a421455639fcf594e5e29c15afd2105d9b..a57afa0b606fe723082879bf4ff4709ead5c7b3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/ipcbuf.h
  *
index b15b278aa314b4923adfb856fad1e5925eedc83b..2bfe590694fc8072645ddca52e1879648757218f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/mman.h
  *
index 693c967552805b3055c6de4912e225ad13bc6456..36e2e103ca385265dc624ca811b06d0ce3c0e4b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/msgbuf.h
  *
index 87bc2eae630e1cb9f2ee243d98831700ff3a6595..e6feb4ee05909c3f61d2eedb732c8f54e5ad3505 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/param.h
  *
index 9d2d5993f0685c339d307a08f40ae09b50c25cdb..4d249040b33d25a26ee4c211c051950f4ecf41f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/poll.h
  *
index 6e96be0d02d382dd26d68b5774e74f1b914fbd4d..1dc67592881fb7e107888f771fbd419d55271df4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/posix_types.h
  *
index 8853a0d544c842c3135ee6a4d97e883be2199d22..a10b42963703ee9884dc1fbcb1207642c495d256 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/ptrace.h
  *
index c15870493b33e9610275d8af0785992275e95c28..f61b6331a10c055d61da8e112af9ba9be225eab0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/sembuf.h
  *
index 9fa8ad9793611f9d1c2295849b90f0444a2a9835..57e6c210e84f524ed46677c91c30087095f27d68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/setup.h
  *
index ad4b0121782c90535d19655564e3d21d2292d65f..26550bdc84307c0155054b8bdacccacb36aaf171 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/shmbuf.h
  *
index 03383af8c3b789f94920983f57c976aeb1b8094a..9cbf39e63f744e9f49cad024ac668112e3533fa9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/sigcontext.h
  *
index 586756ee267a00712d506ab5d3780b3d453d3e51..005dec5bfde4d33a9870e2e9fb26ba3ec59ca403 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/signal.h
  *
index 220059999e74005ce35f9cb2dd58ea148e8faa2f..75a07b8119a96b9eea2258c7d235972552265f46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/socket.h
  *
index efe0af379f0146be384f6e8787f78fffe3af06b6..fb8ac36071894fd47a09f0a2970f046ba480c458 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/sockios.h
  *
index c4992038cee0baabab187085df8ffd87a89cc861..7b4d90d6d7716ee874343dc3ea83983d587b6f8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/stat.h
  *
index 226a3916231085f12eace8432d57b1770ca58853..e677cf4cc0924e9562965171dff4dc6f0f3cac8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/swab.h
  *
index 0d6c8715b24f7fc4683fa5e5b0d9d3156dd8a897..d4206a7c5138e831de74e52d36d4d942d3a01811 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/termbits.h
  *
index 2efc921506c4b277253e111f0fb45d1bab458369..12db8ac38750fc33bf420437129aba2e87147354 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/asm-xtensa/types.h
  *
index 6be7eb27fd29d68b7c3a13643f628b7f2ae40c57..bc3f62db5c5f4df8596e43edb3de8c410e9f30bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #if !defined(_UAPI_XTENSA_UNISTD_H) || defined(__SYSCALL)
 #define _UAPI_XTENSA_UNISTD_H
 
index 264fb89c444e9fde9fd5ba9157aba6d7b06eae2f..bb8d55775a97ce99637eee4baacb44068c173282 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux/Xtensa kernel.
 #
index 99341028cc77c5d24f10ee1ec6b1cb534137cc84..18e4ef34ac4559a1afe105d93d480094d44f9667 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/arch/xtensa/kernel/irq.c
  *
index abe4513eb0ddf072f628406eb8af2d13b2774678..358d748d9083f64879bcd404f15774c44bc2bba0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xtensa mmu stuff
  *
index 69ffbe80f184d7eb4814e13bda42dfd23e9738e2..f559b9ffbb3fd12498f96717f6ae86e1dfadee7b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPROFILE) += oprofile.o
 
 DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
index 3ab42bbb06d58fdb9d0dd679b160a6d1d27490af..28ec55752b68e89bd1babc0b0c6eb4b3e4576014 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Block layer core configuration
 #
index fd2cefa47d354fae842f1596176b52f261dc00a4..a4a8914bf7a408ddb0ace6bab8ba4e5894e59d94 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 if BLOCK
 
 menu "IO Schedulers"
index 9396ebc85d24516a1e22ebedfb7a70625ffaa8c3..6a56303b992529a08e0d719d08a54a9702950c79 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel block layer
 #
index b38e962fa83e774c5c9121bbbe277124d13dd793..101c2a9b548150cd3f7bb5b28a460ef82c9e4a75 100644 (file)
@@ -1239,8 +1239,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
         */
        bmd->is_our_pages = map_data ? 0 : 1;
        memcpy(bmd->iov, iter->iov, sizeof(struct iovec) * iter->nr_segs);
-       iov_iter_init(&bmd->iter, iter->type, bmd->iov,
-                       iter->nr_segs, iter->count);
+       bmd->iter = *iter;
+       bmd->iter.iov = bmd->iov;
 
        ret = -ENOMEM;
        bio = bio_kmalloc(gfp_mask, nr_pages);
@@ -1331,6 +1331,7 @@ struct bio *bio_map_user_iov(struct request_queue *q,
        int ret, offset;
        struct iov_iter i;
        struct iovec iov;
+       struct bio_vec *bvec;
 
        iov_for_each(iov, i, *iter) {
                unsigned long uaddr = (unsigned long) iov.iov_base;
@@ -1375,7 +1376,12 @@ struct bio *bio_map_user_iov(struct request_queue *q,
                ret = get_user_pages_fast(uaddr, local_nr_pages,
                                (iter->type & WRITE) != WRITE,
                                &pages[cur_page]);
-               if (ret < local_nr_pages) {
+               if (unlikely(ret < local_nr_pages)) {
+                       for (j = cur_page; j < page_limit; j++) {
+                               if (!pages[j])
+                                       break;
+                               put_page(pages[j]);
+                       }
                        ret = -EFAULT;
                        goto out_unmap;
                }
@@ -1383,6 +1389,7 @@ struct bio *bio_map_user_iov(struct request_queue *q,
                offset = offset_in_page(uaddr);
                for (j = cur_page; j < page_limit; j++) {
                        unsigned int bytes = PAGE_SIZE - offset;
+                       unsigned short prev_bi_vcnt = bio->bi_vcnt;
 
                        if (len <= 0)
                                break;
@@ -1397,6 +1404,13 @@ struct bio *bio_map_user_iov(struct request_queue *q,
                                            bytes)
                                break;
 
+                       /*
+                        * check if vector was merged with previous
+                        * drop page reference if needed
+                        */
+                       if (bio->bi_vcnt == prev_bi_vcnt)
+                               put_page(pages[j]);
+
                        len -= bytes;
                        offset = 0;
                }
@@ -1423,10 +1437,8 @@ struct bio *bio_map_user_iov(struct request_queue *q,
        return bio;
 
  out_unmap:
-       for (j = 0; j < nr_pages; j++) {
-               if (!pages[j])
-                       break;
-               put_page(pages[j]);
+       bio_for_each_segment_all(bvec, bio, j) {
+               put_page(bvec->bv_page);
        }
  out:
        kfree(pages);
index aebe676225e6fdf360f39760cacf7326cf78cd9f..048be4aa602446f93e3e981f1ece5659e3d7287b 100644 (file)
@@ -854,6 +854,9 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
 
        kobject_init(&q->kobj, &blk_queue_ktype);
 
+#ifdef CONFIG_BLK_DEV_IO_TRACE
+       mutex_init(&q->blk_trace_mutex);
+#endif
        mutex_init(&q->sysfs_lock);
        spin_lock_init(&q->__queue_lock);
 
index 63898d229cb90bccf30430a59b33378721585636..f23311e4b201fe60a6cf460a5c194cf43fd8f65b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to io context handling
  */
index 62240f8832ca6e62f8f3e5dddedb9428a978250d..63fb971d65745ac0621c69b6bc22ad5b0b76dd84 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to generic helpers functions
  */
index 2547016aa7aac8d1b596435b49a8831c955c102e..d5251edcc0ddd7200a153c547eae40009ee40d04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to mapping data to requests
  */
index aa524cad5bea3a0d46232f6becbfe970947df39e..f5dedd57dff6b40fb6e88faa532bb88a94fcde61 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to segment and merge handling
  */
index 980e7309564332ee1c23e0d96b13996f27c0aeca..de294d775acfa413854c109eeaa08b9b6bdfd354 100644 (file)
@@ -815,10 +815,14 @@ int blk_mq_debugfs_register(struct request_queue *q)
                goto err;
 
        /*
-        * blk_mq_init_hctx() attempted to do this already, but q->debugfs_dir
+        * blk_mq_init_sched() attempted to do this already, but q->debugfs_dir
         * didn't exist yet (because we don't know what to name the directory
         * until the queue is registered to a gendisk).
         */
+       if (q->elevator && !q->sched_debugfs_dir)
+               blk_mq_debugfs_register_sched(q);
+
+       /* Similarly, blk_mq_init_hctx() couldn't do this previously. */
        queue_for_each_hw_ctx(q, hctx, i) {
                if (!hctx->debugfs_dir && blk_mq_debugfs_register_hctx(q, hctx))
                        goto err;
index a182e6f975657d2afa30671ccf0388ea5dd1b52e..b9d366e57097dad4d1149ac1a6822fad10b8ffe0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef INT_BLK_MQ_DEBUGFS_H
 #define INT_BLK_MQ_DEBUGFS_H
 
index 9267d0b7c1978ae1a01dc218f07c1e16cb6643cc..ba1d1418a96dbbd1a394e07d06f7847b4df2c8fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BLK_MQ_SCHED_H
 #define BLK_MQ_SCHED_H
 
index 5cb51e53cc0353cbba8e44ae808e6d2f9f9257a7..c190165d92ea3fda4a24efca107be007f9787051 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef INT_BLK_MQ_TAG_H
 #define INT_BLK_MQ_TAG_H
 
index ef15b3414da548f4b5c8d2a438d8b52a54cf8e36..4933af9d61f736ed1b99630231b6988071b1e6d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef INT_BLK_MQ_H
 #define INT_BLK_MQ_H
 
index 07125e7941f4a0dfe8138437180413caeac2a415..01e2b353a2b9aadc2b5d20fe227739d1d0ae296b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to softirq rq completions
  */
index 2fb20d1a341a8db97afb11ce366e740cd29d3bcc..2dd36347252ab1eacd76fd0fc7814341dc58f4f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BLK_STAT_H
 #define BLK_STAT_H
 
index b8362c0df51d582fea9ab43377adc0a0e0e055b0..e54be402899daa18dc45ef35130d7e191d459bb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to sysfs handling
  */
index e1a9c15eb1b8953881077c0e31477872523dfc4d..09f19c6c52ceb209868485e7a824c282df2b6fe6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to tagged command queuing
  */
index 0fea76aa0f3ff0093c4867f10139d331589df53a..8631763866c6d973225cd643f3d422c9c6a21845 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Interface for controlling IO bandwidth on a request queue
  *
@@ -1911,11 +1912,11 @@ static void throtl_upgrade_state(struct throtl_data *td)
 
                tg->disptime = jiffies - 1;
                throtl_select_dispatch(sq);
-               throtl_schedule_next_dispatch(sq, false);
+               throtl_schedule_next_dispatch(sq, true);
        }
        rcu_read_unlock();
        throtl_select_dispatch(&td->service_queue);
-       throtl_schedule_next_dispatch(&td->service_queue, false);
+       throtl_schedule_next_dispatch(&td->service_queue, true);
        queue_work(kthrotld_workqueue, &td->dispatch_work);
 }
 
index df6de50c5d594847b16aabb9d88e16c5ca2312d0..a232c98fbf4d85675501cf82e5b5ed666ee5f30c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WB_THROTTLE_H
 #define WB_THROTTLE_H
 
index fcb9775b997d268580f134e1e1527dc4823d4390..85be8b232b373b3f69ac829f374e550f06725460 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BLK_INTERNAL_H
 #define BLK_INTERNAL_H
 
index 5793c2dc1a155697feab533b5365f661087313e4..fceb1a96480bfb9600e4664fa2b4992c8bb64210 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* bounce buffer handling for block devices
  *
  * - Split from highmem.c
index c82408c7cc3c91181f91d32c0147e18781506691..15d25ccd51a5cad7c9505427888f88c15a9e5d99 100644 (file)
@@ -154,7 +154,6 @@ static int bsg_prepare_job(struct device *dev, struct request *req)
 failjob_rls_rqst_payload:
        kfree(job->request_payload.sg_list);
 failjob_rls_job:
-       kfree(job);
        return -ENOMEM;
 }
 
@@ -208,20 +207,34 @@ static int bsg_init_rq(struct request_queue *q, struct request *req, gfp_t gfp)
        struct bsg_job *job = blk_mq_rq_to_pdu(req);
        struct scsi_request *sreq = &job->sreq;
 
+       /* called right after the request is allocated for the request_queue */
+
+       sreq->sense = kzalloc(SCSI_SENSE_BUFFERSIZE, gfp);
+       if (!sreq->sense)
+               return -ENOMEM;
+
+       return 0;
+}
+
+static void bsg_initialize_rq(struct request *req)
+{
+       struct bsg_job *job = blk_mq_rq_to_pdu(req);
+       struct scsi_request *sreq = &job->sreq;
+       void *sense = sreq->sense;
+
+       /* called right before the request is given to the request_queue user */
+
        memset(job, 0, sizeof(*job));
 
        scsi_req_init(sreq);
+
+       sreq->sense = sense;
        sreq->sense_len = SCSI_SENSE_BUFFERSIZE;
-       sreq->sense = kzalloc(sreq->sense_len, gfp);
-       if (!sreq->sense)
-               return -ENOMEM;
 
        job->req = req;
-       job->reply = sreq->sense;
+       job->reply = sense;
        job->reply_len = sreq->sense_len;
        job->dd_data = job + 1;
-
-       return 0;
 }
 
 static void bsg_exit_rq(struct request_queue *q, struct request *req)
@@ -252,6 +265,7 @@ struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
        q->cmd_size = sizeof(struct bsg_job) + dd_job_size;
        q->init_rq_fn = bsg_init_rq;
        q->exit_rq_fn = bsg_exit_rq;
+       q->initialize_rq_fn = bsg_initialize_rq;
        q->request_fn = bsg_request_fn;
 
        ret = blk_init_allocated_queue(q);
index 9dbc67e42a993193fb56d169cab00ecf4b825ef0..f2a14571882bcf348a8d168eb3e9204c5f424c60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Parse command line, get partition information
  *
index abaf9d78a2061d8d307a3f05858afbc8445c15d7..6ca015f92766e9052d444f9e81ba3c307846166c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <linux/blktrace_api.h>
index 86e8fe1adcdb7f1b10fd5acd8f5c36f712736971..91622db9aedffd997947642a5872802312346869 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Code extracted from drivers/block/genhd.c
  *  Copyright (C) 1991-1998  Linus Torvalds
@@ -112,7 +113,7 @@ ssize_t part_stat_show(struct device *dev,
                       struct device_attribute *attr, char *buf)
 {
        struct hd_struct *p = dev_to_part(dev);
-       struct request_queue *q = dev_to_disk(dev)->queue;
+       struct request_queue *q = part_to_disk(p)->queue;
        unsigned int inflight[2];
        int cpu;
 
index 9b29a996c3114a3d09c41abdcaaa0f3f19abe3ff..37b9710cc80a5a4fe96a76c35f639c745add84c6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Partition configuration
 #
index 37a95270503c495ce74f793245b4c65f24b5562d..2f276b677c81798ec10bd43bb660a10c14928dd2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index ede8285296926fb47fb0ed0c53beef6fbe93d377..67b06601ca4c94ad7349374dfba6cf1c3e164a27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/partitions/acorn.h
  *
index f3ed7b2d89bf5eae8e4c128472c03fb174330e24..007f95eea0e1a9b6b79751ce6f109d151daa12f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/aix.c
  *
index 2b13533d60a294e43f460fe1276256e34ef6b256..560936617d9c146b84d980de6137a3d241da2986 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/amiga.c
  *
index ff1fb93712c1a84eb2fa605678d39feca7acc09e..2305840c85228fa91312d03b4c6f80db2fa5a187 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/atari.c
  *
index f2ec43bfeec139b59b8a2dd0ecef47a7e86dc488..01c2b9457394c081283f3ad64bc51f4838174157 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  fs/partitions/atari.h
  *  Moved by Russell King from:
index 16118d11dbfc002cdc11463c3ee4024685615420..720145c49066ccd6e77449033aa3c6f910b7c2d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/check.c
  *
index eade17ea910b7f7f5e5e210e58170afb8f711e46..6042f769471abbbe3ae6d172b22cf01a38feaf30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/pagemap.h>
 #include <linux/blkdev.h>
 #include <linux/genhd.h>
index 5141b563adf1b9a41c6b6054a8d2dcf5618da4d6..e333583ab38c981279401205d2e2151a872287c7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013 HUAWEI
  * Author: Cai Zhiyong <caizhiyong@huawei.com>
index 26e0f8da141443c31bf830a8a1fd4c26a0d3dec8..e64a31636a1fa3b2dd4cba822f49ccc6ffb5245a 100644 (file)
@@ -1,2 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 int cmdline_partition(struct parsed_partitions *state);
index 14b081af8d61bc7fa4cbffa086b3d150c99c0156..a5d480f807f352522eda8388c1e292f9c13d7088 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                  Volker Sameske <sameske@de.ibm.com>
index 9721fa589bb17f8b0740bcc14df09e179ce4f636..59812d705c3d1a0c1cc9df6ccd15f413a757e86b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/karma.c
  *  Rio Karma partition info.
index 621317ac4d59f5fd75e433718a194bad7b1c2a56..b6095335636c917908330929a059c44536e4392b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/mac.c
  *
index 3c7d98436380095aa8642ecbc5f8cbcf5cc45b76..453ed2964804f1ece892d707b728d80e4bd92403 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  fs/partitions/mac.h
  */
index 5610cd537da78812e2633d76ca90e5c3fb66e7cc..0af3a3db6fb07dab3ad72bb9e5e8431cea020370 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/msdos.c
  *
index 764b86a01965acb6078897fd97c4db314c8679c4..4b873973d6c0617d098d1011fee6abd4208f93d7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/osf.c
  *
index ea8a86dceaf4175f89e54c9f313b1467e75a6b6f..d7b421c6e530bdf93b8f0ec2e2b43051d040637f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/sgi.c
  *
index b5b6fcfb3d363e851b3d86632687a871aaaf39ad..90f36724e796d733993207b10d8c511a268ab2f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/sun.c
  *
index 9627ccffc1c44da0c312ed2b053092fe64ae0213..92e810826b01f37eb6a666f8133767815878d89c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/sysv68.c
  *
index 8dbaf9f77a997af6fdbc412da33ee5edeb9689f9..ecd0d7346c3dabf1af4f55dc68687e8aad9b5596 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/partitions/ultrix.c
  *
index 6ce51ede9e9b4617f62a5e2f3cc3aeda75f9a77f..5f7663df6e8e306fb7181e7fb94c11a88a49c828 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Certificates for signature checking"
 
 config MODULE_SIG_KEY
index 847361ce14d10e69bb7b5c4ecd02769dd308082c..5d0999b9e21b14fe143749abd311a5f87324e63e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel signature checking certificates.
 #
index 5bd449f7db177e39c902c9ad75712b730758ff31..344892337be0797cc713877ad64014b8cacaec20 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "blacklist.h"
 
 const char __initdata *const blacklist_hashes[] = {
index 851de10706a5be867071570c0b114e9c0846aefd..73fd99098ad7ce5f4eb12eef6111500f4a89063e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "blacklist.h"
 
 const char __initdata *const blacklist_hashes[] = {
index c9ceb71a43fef10925090939e9ce3de8367e8e86..3918ff7235ed8bfb1425269a867cd3133ec58730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/export.h>
 #include <linux/init.h>
 
index 0a121f9ddf8e315affaef0f668e19dbf81cff9f0..ac5fb37e6f4b71513a83b53af5683b4f6b859d7b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Generic algorithms support
 #
index d41f0331b085ca8a4f78f6bb369b83e9a51e450e..da190be60ce2fd4680f160f9ae2da88492efa217 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Cryptographic API
 #
index ffa9f4ccd9b455ef36c48d3ba57d4256574cd450..337cf382718ee3cd81ffe3cdc480052a6f634798 100644 (file)
@@ -619,14 +619,14 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
        struct af_alg_ctx *ctx = ask->private;
        struct af_alg_tsgl *sgl;
        struct scatterlist *sg;
-       unsigned int i, j;
+       unsigned int i, j = 0;
 
        while (!list_empty(&ctx->tsgl_list)) {
                sgl = list_first_entry(&ctx->tsgl_list, struct af_alg_tsgl,
                                       list);
                sg = sgl->sg;
 
-               for (i = 0, j = 0; i < sgl->cur; i++) {
+               for (i = 0; i < sgl->cur; i++) {
                        size_t plen = min_t(size_t, used, sg[i].length);
                        struct page *page = sg_page(sg + i);
 
index 331f6baf2df8ea39148a49f5f7408238adc2fb0f..f3702e533ff41044694625aad813abc58b8af4dd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ASYMMETRIC_KEY_TYPE
        bool "Asymmetric (public-key cryptographic) key type"
        depends on KEYS
index 6516855bec18e665cb8c0a0de89bfb4d86164fb0..4719aad5dec0beee0f10bee468a3052c218539b7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for asymmetric cryptographic keys
 #
index e4b0ed386bc82f339829fea2dcedd42fe2f0aff5..39aecad286fe482ff3f44fe08b286c2edbf3553b 100644 (file)
@@ -57,6 +57,8 @@ struct key *find_asymmetric_key(struct key *keyring,
        char *req, *p;
        int len;
 
+       BUG_ON(!id_0 && !id_1);
+
        if (id_0) {
                lookup = id_0->data;
                len = id_0->len;
@@ -105,7 +107,7 @@ struct key *find_asymmetric_key(struct key *keyring,
        if (id_0 && id_1) {
                const struct asymmetric_key_ids *kids = asymmetric_key_ids(key);
 
-               if (!kids->id[0]) {
+               if (!kids->id[1]) {
                        pr_debug("First ID matches, but second is missing\n");
                        goto reject;
                }
index af4cd864911752478ba5f3c2732273f9624d434f..d140d8bb2c96140c408b1e3450f288e562372743 100644 (file)
@@ -88,6 +88,9 @@ static int pkcs7_check_authattrs(struct pkcs7_message *msg)
        bool want = false;
 
        sinfo = msg->signed_infos;
+       if (!sinfo)
+               goto inconsistent;
+
        if (sinfo->authattrs) {
                want = true;
                msg->have_authattrs = true;
index f38a58aef3ecbffc2777e83d4e47309f5d00dfa2..89bafa2efc300eabc5b6ec84f51fbe588bff5df4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ASYNC_CORE
        tristate
 
index 462e4abbfe693e2f11bc9656ed2398c1cae3bb59..056e482453730f748ecc278485e4a3d83892c0f9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ASYNC_CORE) += async_tx.o
 obj-$(CONFIG_ASYNC_MEMCPY) += async_memcpy.o
 obj-$(CONFIG_ASYNC_XOR) += async_xor.o
index 633a88e93ab0c421b7b01a041726ad9563ce2d49..70018397e59abf10d125864f5770c41cd13f2021 100644 (file)
@@ -1133,10 +1133,10 @@ static inline void drbg_dealloc_state(struct drbg_state *drbg)
 {
        if (!drbg)
                return;
-       kzfree(drbg->V);
-       drbg->Vbuf = NULL;
-       kzfree(drbg->C);
-       drbg->Cbuf = NULL;
+       kzfree(drbg->Vbuf);
+       drbg->V = NULL;
+       kzfree(drbg->Cbuf);
+       drbg->C = NULL;
        kzfree(drbg->scratchpadbuf);
        drbg->scratchpadbuf = NULL;
        drbg->reseed_ctr = 0;
index 03ae5f71402840913a78eafad7d55d7c7400b2a3..b80f45da829cfd1eb50773140fe38ae7417b5bd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYTO_ECC_CURVE_DEFS_H
 #define _CRYTO_ECC_CURVE_DEFS_H
 
index c57a2d4ce8d9b4c1f91c668265171fff1d17d162..93edbf52197d4ba94333a71fadfecc2034773e6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for RIPEMD algorithms
  */
index 5e31c8d776dfc8a144f25e70122ee77d335e196a..325a14da58278f01b8c1ffd92bdd8990db2860c4 100644 (file)
@@ -41,7 +41,7 @@ static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
        int err;
 
        absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1));
-       buffer = kmalloc(absize, GFP_KERNEL);
+       buffer = kmalloc(absize, GFP_ATOMIC);
        if (!buffer)
                return -ENOMEM;
 
@@ -275,12 +275,14 @@ static int shash_async_finup(struct ahash_request *req)
 
 int shash_ahash_digest(struct ahash_request *req, struct shash_desc *desc)
 {
-       struct scatterlist *sg = req->src;
-       unsigned int offset = sg->offset;
        unsigned int nbytes = req->nbytes;
+       struct scatterlist *sg;
+       unsigned int offset;
        int err;
 
-       if (nbytes < min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset)) {
+       if (nbytes &&
+           (sg = req->src, offset = sg->offset,
+            nbytes < min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset))) {
                void *data;
 
                data = kmap_atomic(sg_page(sg));
index 4faa0fd53b0c120d39022ad726dbbe2c74f787bd..d5692e35fab1f069376f7c54358ff5e5f0cb352e 100644 (file)
@@ -426,14 +426,9 @@ static int skcipher_copy_iv(struct skcipher_walk *walk)
 
 static int skcipher_walk_first(struct skcipher_walk *walk)
 {
-       walk->nbytes = 0;
-
        if (WARN_ON_ONCE(in_irq()))
                return -EDEADLK;
 
-       if (unlikely(!walk->total))
-               return 0;
-
        walk->buffer = NULL;
        if (unlikely(((unsigned long)walk->iv & walk->alignmask))) {
                int err = skcipher_copy_iv(walk);
@@ -452,10 +447,15 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk,
 {
        struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
 
+       walk->total = req->cryptlen;
+       walk->nbytes = 0;
+
+       if (unlikely(!walk->total))
+               return 0;
+
        scatterwalk_start(&walk->in, req->src);
        scatterwalk_start(&walk->out, req->dst);
 
-       walk->total = req->cryptlen;
        walk->iv = req->iv;
        walk->oiv = req->iv;
 
@@ -509,6 +509,11 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk,
        struct crypto_aead *tfm = crypto_aead_reqtfm(req);
        int err;
 
+       walk->nbytes = 0;
+
+       if (unlikely(!walk->total))
+               return 0;
+
        walk->flags &= ~SKCIPHER_WALK_PHYS;
 
        scatterwalk_start(&walk->in, req->src);
index d86c11a8c882c37ee7a7c2c18e41d54aaec25af8..e31828ed00466cc08e8ee2e73bacb2d99c1e0a34 100644 (file)
@@ -554,8 +554,10 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
                ctx->name[len - 1] = 0;
 
                if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,
-                            "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME)
-                       return -ENAMETOOLONG;
+                            "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) {
+                       err = -ENAMETOOLONG;
+                       goto err_drop_spawn;
+               }
        } else
                goto err_drop_spawn;
 
index 505c676fa9c7053fbaf6932a813eef3468795c3a..1d7af3c2ff27c770218272115a287cb35d02ec0b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Device Drivers"
 
 source "drivers/amba/Kconfig"
index d90fdc413648c445d55c9727faf2d8fd15f251db..d242d3514d30589e79d1ac61e905827f7b53f8aa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux kernel device drivers.
 #
index ef3b65bfdd0ac57d49a323174fab431b167c69c0..00f7512c9cf42235c352c1e455011fc281d52317 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig ACCESSIBILITY
        bool "Accessibility support"
        ---help---
index 1ce52f84dc2323a5d64c97d955d1840b32437cde..5b1938f4b626196c68689d3606c9a4bf5f646f59 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # ACPI Configuration
 #
index 90265ab4437aef84cc413546c996f9edc6a39e17..cd1abc9bc325c5dbd966089e8fe61344d4eaf5ea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux ACPI interpreter
 #
index bf22c29d25179e937523c026c8028f644f3379f6..11b113f8e36741aeb00e921ee64a5ae871f8d55f 100644 (file)
@@ -66,7 +66,7 @@ void __init acpi_watchdog_init(void)
        for (i = 0; i < wdat->entries; i++) {
                const struct acpi_generic_address *gas;
                struct resource_entry *rentry;
-               struct resource res;
+               struct resource res = {};
                bool found;
 
                gas = &entries[i].register_region;
index 1709551bc4aa8bf518ba4eac1e30c2996692d5ca..e05232da05888a69660082fcd7751652ec9e81d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ACPICA Core interpreter
 #
index de14d49a5c903276ed8442feb6831cfe93f0dc7d..52ae5438edeb95b786ebccbcf2310fe5521870ed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config HAVE_ACPI_APEI
        bool
 
index e50573de25f189f48589e3d5dee7066733c43701..4dfac2128737c6ea99ec79c2e4fc6d911c94ae09 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ACPI_APEI)                += apei.o
 obj-$(CONFIG_ACPI_APEI_GHES)   += ghes.o
 obj-$(CONFIG_ACPI_APEI_EINJ)   += einj.o
index cb4126051f6220ba18bbd793e7b1684bc3fc448a..1d6ef96547252d510b570858d937bc7c222586fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * apei-internal.h - ACPI Platform Error Interface internal
  * definitions.
index 077f9bad6f44a57bd01e930f9dd740001eadcd76..3c3a37b8503bd43db4200230309ddeff96eb4e00 100644 (file)
@@ -743,17 +743,19 @@ static int ghes_proc(struct ghes *ghes)
        }
        ghes_do_proc(ghes, ghes->estatus);
 
+out:
+       ghes_clear_estatus(ghes);
+
+       if (rc == -ENOENT)
+               return rc;
+
        /*
         * GHESv2 type HEST entries introduce support for error acknowledgment,
         * so only acknowledge the error if this support is present.
         */
-       if (is_hest_type_generic_v2(ghes)) {
-               rc = ghes_ack_error(ghes->generic_v2);
-               if (rc)
-                       return rc;
-       }
-out:
-       ghes_clear_estatus(ghes);
+       if (is_hest_type_generic_v2(ghes))
+               return ghes_ack_error(ghes->generic_v2);
+
        return rc;
 }
 
index 9565d572f8dd2f3d65c0e16b8257f61100bbad50..de56394dd161f7813b7f5bce64321d3196bc4904 100644 (file)
@@ -1178,12 +1178,44 @@ dev_put:
        return ret;
 }
 
+static bool __init iort_enable_acs(struct acpi_iort_node *iort_node)
+{
+       if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
+               struct acpi_iort_node *parent;
+               struct acpi_iort_id_mapping *map;
+               int i;
+
+               map = ACPI_ADD_PTR(struct acpi_iort_id_mapping, iort_node,
+                                  iort_node->mapping_offset);
+
+               for (i = 0; i < iort_node->mapping_count; i++, map++) {
+                       if (!map->output_reference)
+                               continue;
+
+                       parent = ACPI_ADD_PTR(struct acpi_iort_node,
+                                       iort_table,  map->output_reference);
+                       /*
+                        * If we detect a RC->SMMU mapping, make sure
+                        * we enable ACS on the system.
+                        */
+                       if ((parent->type == ACPI_IORT_NODE_SMMU) ||
+                               (parent->type == ACPI_IORT_NODE_SMMU_V3)) {
+                               pci_request_acs();
+                               return true;
+                       }
+               }
+       }
+
+       return false;
+}
+
 static void __init iort_init_platform_devices(void)
 {
        struct acpi_iort_node *iort_node, *iort_end;
        struct acpi_table_iort *iort;
        struct fwnode_handle *fwnode;
        int i, ret;
+       bool acs_enabled = false;
 
        /*
         * iort_table and iort both point to the start of IORT table, but
@@ -1203,6 +1235,9 @@ static void __init iort_init_platform_devices(void)
                        return;
                }
 
+               if (!acs_enabled)
+                       acs_enabled = iort_enable_acs(iort_node);
+
                if ((iort_node->type == ACPI_IORT_NODE_SMMU) ||
                        (iort_node->type == ACPI_IORT_NODE_SMMU_V3)) {
 
index 6c084976987d84798cb3b253669a8bc14eb0b7ee..225f493d4c276e80d8b57419b23e7976eac43403 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_BATTERY_H
 #define __ACPI_BATTERY_H
 
index ac0a6ed0cf466ab54fbfeb0550080c6a44003cde..90a2fd9792823d5b3f95308985bafebb5085abe4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config DPTF_POWER
        tristate "DPTF Platform Power Participant"
        depends on X86
index 7fceb3b4691b0f5d4b42043d42ec422a60319051..5a127f3f2d5c3a912998611a04f1ec5813bd5ba6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * event.c - exporting ACPI events via procfs
  *
index 929ba4da0b3097d6d9c2ae583f4950be20227124..f7c57e33499e6545e3377e9f73c597ca0a699e08 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ACPI_NFIT
        tristate "ACPI NVDIMM Firmware Interface Table (NFIT)"
        depends on PHYS_ADDR_T_64BIT
index e8bfa7b865a524dc106a8d0b54b923462142418b..095afc96952ee5acf03b19df763343f121e91ff7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INTEL_PMIC_H
 #define __INTEL_PMIC_H
 
index 85ac848ac6ab60dbd5488c36de79cd7b62fbceba..652f19e6c541509f66a3b3b42c103da0468e2431 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/export.h>
index 2736e25e9dc6458d736383ed0bc60761e7eb4a5f..d50a7b6ccddd99785dc7c6b1e0f368144c597d0e 100644 (file)
@@ -710,6 +710,8 @@ static DEFINE_RAW_SPINLOCK(c3_lock);
 static void acpi_idle_enter_bm(struct acpi_processor *pr,
                               struct acpi_processor_cx *cx, bool timer_bc)
 {
+       acpi_unlazy_tlb(smp_processor_id());
+
        /*
         * Must be done before busmaster disable as we might need to
         * access HPET !
index 74f738cb6073646ac075bb033403b14e70cb6773..813f1b78c16a91bf294cc191960e58a33c63e493 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2005 Intel Corporation
  * Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
index c1c216163de3f0ab5b044c52527ed10e3090a9e5..e26ea209b63ef1b8f89a6112de5c983db3f4feee 100644 (file)
@@ -571,10 +571,9 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
  *     }
  * }
  *
- * Calling this function with index %2 return %-ENOENT and with index %3
- * returns the last entry. If the property does not contain any more values
- * %-ENODATA is returned. The NULL entry must be single integer and
- * preferably contain value %0.
+ * Calling this function with index %2 or index %3 return %-ENOENT. If the
+ * property does not contain any more values %-ENOENT is returned. The NULL
+ * entry must be single integer and preferably contain value %0.
  *
  * Return: %0 on success, negative error code on failure.
  */
@@ -590,11 +589,11 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
 
        data = acpi_device_data_of_node(fwnode);
        if (!data)
-               return -EINVAL;
+               return -ENOENT;
 
        ret = acpi_data_get_property(data, propname, ACPI_TYPE_ANY, &obj);
        if (ret)
-               return ret;
+               return ret == -EINVAL ? -ENOENT : -EINVAL;
 
        /*
         * The simplest case is when the value is a single reference.  Just
@@ -606,7 +605,7 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
 
                ret = acpi_bus_get_device(obj->reference.handle, &device);
                if (ret)
-                       return ret;
+                       return ret == -ENODEV ? -EINVAL : ret;
 
                args->adev = device;
                args->nargs = 0;
@@ -622,8 +621,10 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
         * The index argument is then used to determine which reference
         * the caller wants (along with the arguments).
         */
-       if (obj->type != ACPI_TYPE_PACKAGE || index >= obj->package.count)
-               return -EPROTO;
+       if (obj->type != ACPI_TYPE_PACKAGE)
+               return -EINVAL;
+       if (index >= obj->package.count)
+               return -ENOENT;
 
        element = obj->package.elements;
        end = element + obj->package.count;
@@ -635,7 +636,7 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
                        ret = acpi_bus_get_device(element->reference.handle,
                                                  &device);
                        if (ret)
-                               return -ENODEV;
+                               return -EINVAL;
 
                        nargs = 0;
                        element++;
@@ -649,11 +650,11 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
                                else if (type == ACPI_TYPE_LOCAL_REFERENCE)
                                        break;
                                else
-                                       return -EPROTO;
+                                       return -EINVAL;
                        }
 
                        if (nargs > MAX_ACPI_REFERENCE_ARGS)
-                               return -EPROTO;
+                               return -EINVAL;
 
                        if (idx == index) {
                                args->adev = device;
@@ -670,13 +671,13 @@ int __acpi_node_get_property_reference(const struct fwnode_handle *fwnode,
                                return -ENOENT;
                        element++;
                } else {
-                       return -EPROTO;
+                       return -EINVAL;
                }
 
                idx++;
        }
 
-       return -ENODATA;
+       return -ENOENT;
 }
 EXPORT_SYMBOL_GPL(__acpi_node_get_property_reference);
 
@@ -908,11 +909,12 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
                                            struct fwnode_handle *child)
 {
        const struct acpi_device *adev = to_acpi_device_node(fwnode);
-       struct acpi_device *child_adev = NULL;
        const struct list_head *head;
        struct list_head *next;
 
        if (!child || is_acpi_device_node(child)) {
+               struct acpi_device *child_adev;
+
                if (adev)
                        head = &adev->children;
                else
@@ -922,8 +924,8 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
                        goto nondev;
 
                if (child) {
-                       child_adev = to_acpi_device_node(child);
-                       next = child_adev->node.next;
+                       adev = to_acpi_device_node(child);
+                       next = adev->node.next;
                        if (next == head) {
                                child = NULL;
                                goto nondev;
@@ -941,8 +943,8 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
                const struct acpi_data_node *data = to_acpi_data_node(fwnode);
                struct acpi_data_node *dn;
 
-               if (child_adev)
-                       head = &child_adev->data.subnodes;
+               if (adev)
+                       head = &adev->data.subnodes;
                else if (data)
                        head = &data->data.subnodes;
                else
@@ -1293,3 +1295,16 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
 DECLARE_ACPI_FWNODE_OPS(acpi_device_fwnode_ops);
 DECLARE_ACPI_FWNODE_OPS(acpi_data_fwnode_ops);
 const struct fwnode_operations acpi_static_fwnode_ops;
+
+bool is_acpi_device_node(const struct fwnode_handle *fwnode)
+{
+       return !IS_ERR_OR_NULL(fwnode) &&
+               fwnode->ops == &acpi_device_fwnode_ops;
+}
+EXPORT_SYMBOL(is_acpi_device_node);
+
+bool is_acpi_data_node(const struct fwnode_handle *fwnode)
+{
+       return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &acpi_data_fwnode_ops;
+}
+EXPORT_SYMBOL(is_acpi_data_node);
index a6c77e8b37bde54c266cae17d620c441a896e3b9..71769fd687b202b385cdcd67de20143d138ec8a7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/pci.h>
 #include <linux/acpi.h>
index a57b0762dd7f4651e9adcc3a99b5e5d38dc5f71e..06372a37df10f1da6e345f73020bbae53aa68c5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 struct acpi_smb_hc;
 enum acpi_smb_protocol {
        SMBUS_WRITE_QUICK = 2,
index a82ff74faf7a2ae94c8b16ce7a60cdc4c78f70fc..41675d24a9bc0a9e8b1efaf1941d9c4b975940ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 extern void acpi_enable_wakeup_devices(u8 sleep_state);
 extern void acpi_disable_wakeup_devices(u8 sleep_state);
index 78a5a23010ab4522923ccae5709d4100458cfbbb..0fd57bf33524a46938396210eabfad57226100f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysfs.c - ACPI sysfs interface to userspace.
  */
index 1638401ab282ef2dc554fff498ebaba8babf8daf..9614126bf56eed29147c84ae74eb6431f1b5927a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * wakeup.c - support wakeup devices
  * Copyright (C) 2004 Li Shaohua <shaohua.li@intel.com>
index 294ba6f363960617c3d1ac2e6191c81e4b384372..fb6c7e0b4cce286f806c4b43871ac10817375d28 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ARM_AMBA
        bool
 
index 9801d852bd56e854de83868fba6750f51dc181ec..7dce3795b8874ba83d29215e5c70daf7e4a3cee9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Android"
 
 config ANDROID
index d055b3f2a2078cedb078b3359777146c66c910a9..fddf76ef5bd6d824e2017fedb9110418b45270de 100644 (file)
@@ -2217,7 +2217,7 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,
                                       debug_id, (u64)fda->num_fds);
                                continue;
                        }
-                       fd_array = (u32 *)(parent_buffer + fda->parent_offset);
+                       fd_array = (u32 *)(parent_buffer + (uintptr_t)fda->parent_offset);
                        for (fd_index = 0; fd_index < fda->num_fds; fd_index++)
                                task_close_fd(proc, fd_array[fd_index]);
                } break;
@@ -2326,7 +2326,6 @@ static int binder_translate_handle(struct flat_binder_object *fp,
                             (u64)node->ptr);
                binder_node_unlock(node);
        } else {
-               int ret;
                struct binder_ref_data dest_rdata;
 
                binder_node_unlock(node);
@@ -2442,7 +2441,7 @@ static int binder_translate_fd_array(struct binder_fd_array_object *fda,
         */
        parent_buffer = parent->buffer -
                binder_alloc_get_user_buffer_offset(&target_proc->alloc);
-       fd_array = (u32 *)(parent_buffer + fda->parent_offset);
+       fd_array = (u32 *)(parent_buffer + (uintptr_t)fda->parent_offset);
        if (!IS_ALIGNED((unsigned long)fd_array, sizeof(u32))) {
                binder_user_error("%d:%d parent offset not aligned correctly.\n",
                                  proc->pid, thread->pid);
@@ -2508,7 +2507,7 @@ static int binder_fixup_parent(struct binder_transaction *t,
                                  proc->pid, thread->pid);
                return -EINVAL;
        }
-       parent_buffer = (u8 *)(parent->buffer -
+       parent_buffer = (u8 *)((uintptr_t)parent->buffer -
                        binder_alloc_get_user_buffer_offset(
                                &target_proc->alloc));
        *(binder_uintptr_t *)(parent_buffer + bp->parent_offset) = bp->buffer;
@@ -2583,6 +2582,48 @@ static bool binder_proc_transaction(struct binder_transaction *t,
        return true;
 }
 
+/**
+ * binder_get_node_refs_for_txn() - Get required refs on node for txn
+ * @node:         struct binder_node for which to get refs
+ * @proc:         returns @node->proc if valid
+ * @error:        if no @proc then returns BR_DEAD_REPLY
+ *
+ * User-space normally keeps the node alive when creating a transaction
+ * since it has a reference to the target. The local strong ref keeps it
+ * alive if the sending process dies before the target process processes
+ * the transaction. If the source process is malicious or has a reference
+ * counting bug, relying on the local strong ref can fail.
+ *
+ * Since user-space can cause the local strong ref to go away, we also take
+ * a tmpref on the node to ensure it survives while we are constructing
+ * the transaction. We also need a tmpref on the proc while we are
+ * constructing the transaction, so we take that here as well.
+ *
+ * Return: The target_node with refs taken or NULL if no @node->proc is NULL.
+ * Also sets @proc if valid. If the @node->proc is NULL indicating that the
+ * target proc has died, @error is set to BR_DEAD_REPLY
+ */
+static struct binder_node *binder_get_node_refs_for_txn(
+               struct binder_node *node,
+               struct binder_proc **procp,
+               uint32_t *error)
+{
+       struct binder_node *target_node = NULL;
+
+       binder_node_inner_lock(node);
+       if (node->proc) {
+               target_node = node;
+               binder_inc_node_nilocked(node, 1, 0, NULL);
+               binder_inc_node_tmpref_ilocked(node);
+               node->proc->tmp_ref++;
+               *procp = node->proc;
+       } else
+               *error = BR_DEAD_REPLY;
+       binder_node_inner_unlock(node);
+
+       return target_node;
+}
+
 static void binder_transaction(struct binder_proc *proc,
                               struct binder_thread *thread,
                               struct binder_transaction_data *tr, int reply,
@@ -2686,43 +2727,35 @@ static void binder_transaction(struct binder_proc *proc,
                        ref = binder_get_ref_olocked(proc, tr->target.handle,
                                                     true);
                        if (ref) {
-                               binder_inc_node(ref->node, 1, 0, NULL);
-                               target_node = ref->node;
-                       }
-                       binder_proc_unlock(proc);
-                       if (target_node == NULL) {
+                               target_node = binder_get_node_refs_for_txn(
+                                               ref->node, &target_proc,
+                                               &return_error);
+                       } else {
                                binder_user_error("%d:%d got transaction to invalid handle\n",
-                                       proc->pid, thread->pid);
+                                                 proc->pid, thread->pid);
                                return_error = BR_FAILED_REPLY;
-                               return_error_param = -EINVAL;
-                               return_error_line = __LINE__;
-                               goto err_invalid_target_handle;
                        }
+                       binder_proc_unlock(proc);
                } else {
                        mutex_lock(&context->context_mgr_node_lock);
                        target_node = context->binder_context_mgr_node;
-                       if (target_node == NULL) {
+                       if (target_node)
+                               target_node = binder_get_node_refs_for_txn(
+                                               target_node, &target_proc,
+                                               &return_error);
+                       else
                                return_error = BR_DEAD_REPLY;
-                               mutex_unlock(&context->context_mgr_node_lock);
-                               return_error_line = __LINE__;
-                               goto err_no_context_mgr_node;
-                       }
-                       binder_inc_node(target_node, 1, 0, NULL);
                        mutex_unlock(&context->context_mgr_node_lock);
                }
-               e->to_node = target_node->debug_id;
-               binder_node_lock(target_node);
-               target_proc = target_node->proc;
-               if (target_proc == NULL) {
-                       binder_node_unlock(target_node);
-                       return_error = BR_DEAD_REPLY;
+               if (!target_node) {
+                       /*
+                        * return_error is set above
+                        */
+                       return_error_param = -EINVAL;
                        return_error_line = __LINE__;
                        goto err_dead_binder;
                }
-               binder_inner_proc_lock(target_proc);
-               target_proc->tmp_ref++;
-               binder_inner_proc_unlock(target_proc);
-               binder_node_unlock(target_node);
+               e->to_node = target_node->debug_id;
                if (security_binder_transaction(proc->tsk,
                                                target_proc->tsk) < 0) {
                        return_error = BR_FAILED_REPLY;
@@ -3072,6 +3105,8 @@ static void binder_transaction(struct binder_proc *proc,
        if (target_thread)
                binder_thread_dec_tmpref(target_thread);
        binder_proc_dec_tmpref(target_proc);
+       if (target_node)
+               binder_dec_node_tmpref(target_node);
        /*
         * write barrier to synchronize with initialization
         * of log entry
@@ -3083,6 +3118,7 @@ static void binder_transaction(struct binder_proc *proc,
 err_dead_proc_or_thread:
        return_error = BR_DEAD_REPLY;
        return_error_line = __LINE__;
+       binder_dequeue_work(proc, tcomplete);
 err_translate_failed:
 err_bad_object_type:
 err_bad_offset:
@@ -3090,6 +3126,8 @@ err_bad_parent:
 err_copy_data_failed:
        trace_binder_transaction_failed_buffer_release(t->buffer);
        binder_transaction_buffer_release(target_proc, t->buffer, offp);
+       if (target_node)
+               binder_dec_node_tmpref(target_node);
        target_node = NULL;
        t->buffer->transaction = NULL;
        binder_alloc_free_buf(&target_proc->alloc, t->buffer);
@@ -3104,13 +3142,14 @@ err_bad_call_stack:
 err_empty_call_stack:
 err_dead_binder:
 err_invalid_target_handle:
-err_no_context_mgr_node:
        if (target_thread)
                binder_thread_dec_tmpref(target_thread);
        if (target_proc)
                binder_proc_dec_tmpref(target_proc);
-       if (target_node)
+       if (target_node) {
                binder_dec_node(target_node, 1, 0);
+               binder_dec_node_tmpref(target_node);
+       }
 
        binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
                     "%d:%d transaction failed %d/%d, size %lld-%lld line %d\n",
@@ -3623,12 +3662,6 @@ static void binder_stat_br(struct binder_proc *proc,
        }
 }
 
-static int binder_has_thread_work(struct binder_thread *thread)
-{
-       return !binder_worklist_empty(thread->proc, &thread->todo) ||
-               thread->looper_need_return;
-}
-
 static int binder_put_node_cmd(struct binder_proc *proc,
                               struct binder_thread *thread,
                               void __user **ptrp,
@@ -4258,12 +4291,9 @@ static unsigned int binder_poll(struct file *filp,
 
        binder_inner_proc_unlock(thread->proc);
 
-       if (binder_has_work(thread, wait_for_proc_work))
-               return POLLIN;
-
        poll_wait(filp, &thread->wait, wait);
 
-       if (binder_has_thread_work(thread))
+       if (binder_has_work(thread, wait_for_proc_work))
                return POLLIN;
 
        return 0;
index 8fe165844e4708a3646a69384fe55db592fbe87f..c2819a3d58a66e63e49cd7e91d3b7caa7a6551a1 100644 (file)
@@ -215,17 +215,12 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
                }
        }
 
-       if (!vma && need_mm)
-               mm = get_task_mm(alloc->tsk);
+       if (!vma && need_mm && mmget_not_zero(alloc->vma_vm_mm))
+               mm = alloc->vma_vm_mm;
 
        if (mm) {
                down_write(&mm->mmap_sem);
                vma = alloc->vma;
-               if (vma && mm != alloc->vma_vm_mm) {
-                       pr_err("%d: vma mm and task mm mismatch\n",
-                               alloc->pid);
-                       vma = NULL;
-               }
        }
 
        if (!vma && need_mm) {
@@ -565,7 +560,7 @@ static void binder_delete_free_buffer(struct binder_alloc *alloc,
                binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
                                   "%d: merge free, buffer %pK do not share page with %pK or %pK\n",
                                   alloc->pid, buffer->data,
-                                  prev->data, next->data);
+                                  prev->data, next ? next->data : NULL);
                binder_update_page_range(alloc, 0, buffer_start_page(buffer),
                                         buffer_start_page(buffer) + PAGE_SIZE,
                                         NULL);
@@ -720,6 +715,7 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
        barrier();
        alloc->vma = vma;
        alloc->vma_vm_mm = vma->vm_mm;
+       mmgrab(alloc->vma_vm_mm);
 
        return 0;
 
@@ -795,6 +791,8 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
                vfree(alloc->buffer);
        }
        mutex_unlock(&alloc->mutex);
+       if (alloc->vma_vm_mm)
+               mmdrop(alloc->vma_vm_mm);
 
        binder_alloc_debug(BINDER_DEBUG_OPEN_CLOSE,
                     "%s: %d buffers %d, pages %d\n",
@@ -889,7 +887,6 @@ int binder_alloc_get_allocated_count(struct binder_alloc *alloc)
 void binder_alloc_vma_close(struct binder_alloc *alloc)
 {
        WRITE_ONCE(alloc->vma, NULL);
-       WRITE_ONCE(alloc->vma_vm_mm, NULL);
 }
 
 /**
@@ -913,6 +910,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
        struct binder_alloc *alloc;
        uintptr_t page_addr;
        size_t index;
+       struct vm_area_struct *vma;
 
        alloc = page->alloc;
        if (!mutex_trylock(&alloc->mutex))
@@ -923,16 +921,22 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
 
        index = page - alloc->pages;
        page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
-       if (alloc->vma) {
-               mm = get_task_mm(alloc->tsk);
-               if (!mm)
-                       goto err_get_task_mm_failed;
+       vma = alloc->vma;
+       if (vma) {
+               if (!mmget_not_zero(alloc->vma_vm_mm))
+                       goto err_mmget;
+               mm = alloc->vma_vm_mm;
                if (!down_write_trylock(&mm->mmap_sem))
                        goto err_down_write_mmap_sem_failed;
+       }
+
+       list_lru_isolate(lru, item);
+       spin_unlock(lock);
 
+       if (vma) {
                trace_binder_unmap_user_start(alloc, index);
 
-               zap_page_range(alloc->vma,
+               zap_page_range(vma,
                               page_addr + alloc->user_buffer_offset,
                               PAGE_SIZE);
 
@@ -950,14 +954,13 @@ enum lru_status binder_alloc_free_page(struct list_head *item,
 
        trace_binder_unmap_kernel_end(alloc, index);
 
-       list_lru_isolate(lru, item);
-
+       spin_lock(lock);
        mutex_unlock(&alloc->mutex);
-       return LRU_REMOVED;
+       return LRU_REMOVED_RETRY;
 
 err_down_write_mmap_sem_failed:
-       mmput(mm);
-err_get_task_mm_failed:
+       mmput_async(mm);
+err_mmget:
 err_page_already_freed:
        mutex_unlock(&alloc->mutex);
 err_get_alloc_mutex_failed:
@@ -996,7 +999,6 @@ struct shrinker binder_shrinker = {
  */
 void binder_alloc_init(struct binder_alloc *alloc)
 {
-       alloc->tsk = current->group_leader;
        alloc->pid = current->group_leader->pid;
        mutex_init(&alloc->mutex);
        INIT_LIST_HEAD(&alloc->buffers);
index a3a3602c689c9a905a05991fcdb121c9ac9446ba..2dd33b6df1044e64b785a6193bc30b84ddf9d1c5 100644 (file)
@@ -100,7 +100,6 @@ struct binder_lru_page {
  */
 struct binder_alloc {
        struct mutex mutex;
-       struct task_struct *tsk;
        struct vm_area_struct *vma;
        struct mm_struct *vma_vm_mm;
        void *buffer;
index 488c93724220021155563d82806fa13b604bedef..cb5339166563e9b941351ea6c68aaeb4e4e30949 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # SATA/PATA driver configuration
 #
index ff9cd2e37458c629663e9cabc7feff370d81c205..8daec3e657f8a9d21b9285cfe102e831693a2196 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_ATA)              += libata.o
 
index cb9b0e9090e3b8ec7e32fff751b1e34332cb7068..9f78bb03bb763c8ba9577ffce47c405c9fa7fb27 100644 (file)
@@ -621,8 +621,11 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
 static int ahci_pci_reset_controller(struct ata_host *host)
 {
        struct pci_dev *pdev = to_pci_dev(host->dev);
+       int rc;
 
-       ahci_reset_controller(host);
+       rc = ahci_reset_controller(host);
+       if (rc)
+               return rc;
 
        if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
                struct ahci_host_priv *hpriv = host->private_data;
index 8401c3b5be921335492ccc3f76f0a7d229306ec0..b702c20fbc2bbb2d9ebcb6188e5e1f522adf9271 100644 (file)
@@ -492,6 +492,7 @@ static const struct ich_laptop ich_laptop[] = {
        { 0x27DF, 0x152D, 0x0778 },     /* ICH7 on unknown Intel */
        { 0x24CA, 0x1025, 0x0061 },     /* ICH4 on ACER Aspire 2023WLMi */
        { 0x24CA, 0x1025, 0x003d },     /* ICH4 on ACER TM290 */
+       { 0x24CA, 0x10CF, 0x11AB },     /* ICH4M on Fujitsu-Siemens Lifebook S6120 */
        { 0x266F, 0x1025, 0x0066 },     /* ICH6 on ACER Aspire 1694WLMi */
        { 0x2653, 0x1043, 0x82D8 },     /* ICH6M on Asus Eee 701 */
        { 0x27df, 0x104d, 0x900e },     /* ICH7 on Sony TZ-90 */
index 1945a8ea20998490b48aa70dfe56c4fbaad744ea..ee4c1ec9dca0ef9e51f4abf56924aab2112d9f77 100644 (file)
@@ -3234,19 +3234,19 @@ static const struct ata_timing ata_timing[] = {
 };
 
 #define ENOUGH(v, unit)                (((v)-1)/(unit)+1)
-#define EZ(v, unit)            ((v)?ENOUGH(v, unit):0)
+#define EZ(v, unit)            ((v)?ENOUGH(((v) * 1000), unit):0)
 
 static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT)
 {
-       q->setup        = EZ(t->setup      * 1000,  T);
-       q->act8b        = EZ(t->act8b      * 1000,  T);
-       q->rec8b        = EZ(t->rec8b      * 1000,  T);
-       q->cyc8b        = EZ(t->cyc8b      * 1000,  T);
-       q->active       = EZ(t->active     * 1000,  T);
-       q->recover      = EZ(t->recover    * 1000,  T);
-       q->dmack_hold   = EZ(t->dmack_hold * 1000,  T);
-       q->cycle        = EZ(t->cycle      * 1000,  T);
-       q->udma         = EZ(t->udma       * 1000, UT);
+       q->setup        = EZ(t->setup,       T);
+       q->act8b        = EZ(t->act8b,       T);
+       q->rec8b        = EZ(t->rec8b,       T);
+       q->cyc8b        = EZ(t->cyc8b,       T);
+       q->active       = EZ(t->active,      T);
+       q->recover      = EZ(t->recover,     T);
+       q->dmack_hold   = EZ(t->dmack_hold,  T);
+       q->cycle        = EZ(t->cycle,       T);
+       q->udma         = EZ(t->udma,       UT);
 }
 
 void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,
index 2820cf864f11080e67a4a305f624c5fa572f1c44..08a57fb9dc6183da08d7c4b8f45309b10dbb503d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBATA_TRANSPORT_H
 #define _LIBATA_TRANSPORT_H
 
index 23a62e4015d073aeecb3cb50cc6a07cce8165df6..de4ddd0e8550a66dac6856099180bc59dc622d05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/libata.h>
 #include <linux/cdrom.h>
 #include <linux/pm_runtime.h>
index ca1837a394c8042eaa416b1d5c7a50a31412467f..6f6e691d60071629fdfba9179244f9f515ee65df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Header for the Gemini SATA bridge */
 #ifndef SATA_GEMINI_H
 #define SATA_GEMINI_H
index f7f3eebe666c463ef3909609704a64ff1c59be18..0be49691fb249787cc52ecb1adc7e8c00ab6d060 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 struct ata_port_info;
 
index 31c60101a69a42ddef0f58bab569c2e052cb1fbe..2e2efa577437e82ecdeb20d9d41b6ce63635bf16 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # ATM device configuration
 #
index c6c9ee9f5da285213e6a96be1565683520e42904..aa191616a72e23192f72ef7734fbe2ded30701a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux network (ATM) device drivers.
 #
index 565e53a5cb7882984358eea9517700991d1f798f..de1ed802cbf8c31c8dddcf79669f77386c18b638 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index ba34a02b717d2329d94433bc4e8bddab0ac8a30f..c8a02c8fba154bee37962e4afe960325d6705d15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FORE200E_H
 #define _FORE200E_H
 
index 3fd2bc8997618b787825a7e55deb5ff9240fdd45..8dfea9e361de266fb2061442c62249a1b562cf1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/idt77105.h - IDT77105 (PHY) declarations */
  
 /* Written 1999 by Greg Banks, NEC Australia <gnb@linuxfan.com>. Based on suni.h */
index b6c8ee512fb406c368d831bf9c275b6d03b5698d..12b81e046a7b4af9843c90a69a8015b52094e546 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Do not edit, automatically generated by `./genrtbl'.
  *
  * Cell Line Rate: 353207.55 (155520000 bps)
index d8bec0f2a71cba2a2851f1bb5c38bd80bad0f07c..d47307adc0c9d41e92b5f39479613a240ba949b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/midway.h - Efficient Networks Midway (SAR) description */
  
 /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
index 9bc27ea5088e5776b0a23ce52bbe5c87216151a9..1b7f1dfc1735271f1bf9f274db78716c6c9dc38d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * nicstar.h
  *
index f594526f8c6dc8f632c67af54c8dbe0488e2261b..e0dda9062e6b11baf31379fecad9171403f9dc85 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * this file included by nicstar.c
  */
index 9a676ee308249c038757e5fba35b29847e4fb538..1830d1b8619fc9a4a269ddbb6c2af3a224a51fb2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 SOLOS_ATTR_RO(DriverVersion)
 SOLOS_ATTR_RO(APIVersion)
 SOLOS_ATTR_RO(FirmwareVersion)
index 7e3e656b39937342dfdb435713156b0fac1450c0..d28a50d47d8b31d90dd85fe732a79950193e6e64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * drivers/atm/suni.h - S/UNI PHY driver
  */
index 672da96243ca67fb226c9e8370f5afe0024333ed..771b3f95246c0fd15d5d0a2f79ca30d27e5dd8c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/tonga.h - Efficient Networks Tonga (PCI bridge) declarations */
  
 /* Written 1995 by Werner Almesberger, EPFL LRC */
index 0ab36503a4b74f166e4a35eb99766725f51b5b47..f766a5ef0c5db82186cbc31d8c33a2d31e8a09fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/uPD98401.h - NEC uPD98401 (SAR) declarations */
  
 /* Written 1995 by Werner Almesberger, EPFL LRC */
index c947214db7e3e75c15b64b53c73ed899cd00ba9d..437cfaa20c962095e75c6dbd79a8eddd65c2709c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/uPD98402.h - NEC uPD98402 (PHY) declarations */
  
 /* Written 1995 by Werner Almesberger, EPFL LRC */
index ae9165ce15a0a2f2b3b9050bd15e02c95d8bc717..8204369fe8256fecdc0d77536bb0d633a42e6fa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/zatm.h - ZeitNet ZN122x device driver declarations */
 
 /* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
index 019bb82490e9046bf578275950de872337301262..88e01f808a867ae2959b48dd91f69b84ae90c8e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* drivers/atm/zeprom.h - ZeitNet ZN122x EEPROM (NM93C46) declarations */
 
 /* Written 1995,1996 by Werner Almesberger, EPFL LRC */
index 9ae6681c90ad265920c80888115e76e9c95f9426..d7d21118d3e0f5fc23bad06ccbaaf5c2b409e9e1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/kconfig-language.txt.
index 2b8af3dc5e427137baa63721ff8851e0dcb9dbab..7ac6776ca3f674683c538aca2d7473198e01a3a9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel auxiliary displays device drivers.
 #
index cfeb049a01ef84425672682c50acb492cbfb04eb..642afd88870ba99ef1c79db74b457515079684b7 100644 (file)
@@ -647,18 +647,25 @@ static ssize_t charlcd_write(struct file *file, const char __user *buf,
 static int charlcd_open(struct inode *inode, struct file *file)
 {
        struct charlcd_priv *priv = to_priv(the_charlcd);
+       int ret;
 
+       ret = -EBUSY;
        if (!atomic_dec_and_test(&charlcd_available))
-               return -EBUSY;  /* open only once at a time */
+               goto fail;      /* open only once at a time */
 
+       ret = -EPERM;
        if (file->f_mode & FMODE_READ)  /* device is write-only */
-               return -EPERM;
+               goto fail;
 
        if (priv->must_clear) {
                charlcd_clear_display(&priv->lcd);
                priv->must_clear = false;
        }
        return nonseekable_open(inode, file);
+
+ fail:
+       atomic_inc(&charlcd_available);
+       return ret;
 }
 
 static int charlcd_release(struct inode *inode, struct file *file)
index 25306fa2725101e714b5344d4af084e3de7f6ce3..a9020f82eea7139dbc0e3961c20c4e32f40dbb3a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index df126dcdaf18e1b84951426b6f501810036a64a3..6911acd896d935946b3c805d07c88bc03bf41918 100644 (file)
@@ -1105,14 +1105,21 @@ static ssize_t keypad_read(struct file *file,
 
 static int keypad_open(struct inode *inode, struct file *file)
 {
+       int ret;
+
+       ret = -EBUSY;
        if (!atomic_dec_and_test(&keypad_available))
-               return -EBUSY;  /* open only once at a time */
+               goto fail;      /* open only once at a time */
 
+       ret = -EPERM;
        if (file->f_mode & FMODE_WRITE) /* device is read-only */
-               return -EPERM;
+               goto fail;
 
        keypad_buflen = 0;      /* flush the buffer on opening */
        return 0;
+ fail:
+       atomic_inc(&keypad_available);
+       return ret;
 }
 
 static int keypad_release(struct inode *inode, struct file *file)
index 1a5f6a157a57d7bf13b85ff63d5ed33e2198aeba..2f6614c9a229ab213f8a140a3e0bcc272dcc1bfd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menu "Generic Driver Options"
 
 config UEVENT_HELPER
index 397e5c344e6a982c493cd1e5d073089510e2a748..e32a52490051dea3bece8548ca52d350b2531647 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux device tree
 
 obj-y                  := component.o core.o bus.o dd.o syscore.o \
index 41be9ff7d70a96d7d901918c6186ea3be035f88c..6df7d6676a48104267b5e739c6e58b85a00724e1 100644 (file)
@@ -166,11 +166,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
 }
 
 #ifdef CONFIG_CPU_FREQ
-static cpumask_var_t cpus_to_visit;
-static void parsing_done_workfn(struct work_struct *work);
-static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
+static cpumask_var_t cpus_to_visit __initdata;
+static void __init parsing_done_workfn(struct work_struct *work);
+static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
-static int
+static int __init
 init_cpu_capacity_callback(struct notifier_block *nb,
                           unsigned long val,
                           void *data)
@@ -206,7 +206,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
        return 0;
 }
 
-static struct notifier_block init_cpu_capacity_notifier = {
+static struct notifier_block init_cpu_capacity_notifier __initdata = {
        .notifier_call = init_cpu_capacity_callback,
 };
 
@@ -232,7 +232,7 @@ static int __init register_cpufreq_notifier(void)
 }
 core_initcall(register_cpufreq_notifier);
 
-static void parsing_done_workfn(struct work_struct *work)
+static void __init parsing_done_workfn(struct work_struct *work)
 {
        cpufreq_unregister_notifier(&init_cpu_capacity_notifier,
                                         CPUFREQ_POLICY_NOTIFIER);
index 539432a14b5c60ede9da6acca14e50a08d927ef2..d800de650fa56bc264b8465621e12c829b01d60d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/notifier.h>
 
 /**
index d2fb9c8ed2057b16954dd8871b1e8a033625da10..50025d7959cbd36698ab05168a76b411c7f5ad7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * devtmpfs - kernel-maintained tmpfs-based /dev
  *
index a39b2166b145616d2a6261da8da7252aa7e28b4d..1e6396bb807b1255ab61e0a168e1b7eac40f892c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Coherent per-device memory handling.
  * Borrowed from i386
@@ -348,16 +349,15 @@ static int rmem_dma_device_init(struct reserved_mem *rmem, struct device *dev)
        struct dma_coherent_mem *mem = rmem->priv;
        int ret;
 
-       if (!mem)
-               return -ENODEV;
-
-       ret = dma_init_coherent_memory(rmem->base, rmem->base, rmem->size,
-                                      DMA_MEMORY_EXCLUSIVE, &mem);
-
-       if (ret) {
-               pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
-                       &rmem->base, (unsigned long)rmem->size / SZ_1M);
-               return ret;
+       if (!mem) {
+               ret = dma_init_coherent_memory(rmem->base, rmem->base,
+                                              rmem->size,
+                                              DMA_MEMORY_EXCLUSIVE, &mem);
+               if (ret) {
+                       pr_err("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n",
+                               &rmem->base, (unsigned long)rmem->size / SZ_1M);
+                       return ret;
+               }
        }
        mem->use_dev_dma_pfn_offset = true;
        rmem->priv = mem;
index 4e3b61cda520812830e7daf6881318984bea2618..1d60b58a8c19ec6ac5f0a04fc119a685100f4619 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory subsystem support
  *
index 3855902f2c5b369dc538759950f5b4c951c484d6..ee090ab9171c269dfaeade5f1c1c4e5584566e70 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Basic Node interface support
  */
@@ -27,13 +28,21 @@ static struct bus_type node_subsys = {
 
 static ssize_t node_read_cpumap(struct device *dev, bool list, char *buf)
 {
+       ssize_t n;
+       cpumask_var_t mask;
        struct node *node_dev = to_node(dev);
-       const struct cpumask *mask = cpumask_of_node(node_dev->dev.id);
 
        /* 2008/04/07: buf currently PAGE_SIZE, need 9 chars per 32 bits. */
        BUILD_BUG_ON((NR_CPUS/32 * 9) > (PAGE_SIZE-1));
 
-       return cpumap_print_to_pagebuf(list, buf, mask);
+       if (!alloc_cpumask_var(&mask, GFP_KERNEL))
+               return 0;
+
+       cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask);
+       n = cpumap_print_to_pagebuf(list, buf, mask);
+       free_cpumask_var(mask);
+
+       return n;
 }
 
 static inline ssize_t node_read_cpumask(struct device *dev,
index d1bd9927106638d7ad94b5cec29650942453b98a..9045c5f3734e8df88d19ec58106e01efbe8f5a31 100644 (file)
@@ -868,7 +868,8 @@ static ssize_t driver_override_store(struct device *dev,
        struct platform_device *pdev = to_platform_device(dev);
        char *driver_override, *old, *cp;
 
-       if (count > PATH_MAX)
+       /* We need to keep extra room for a newline */
+       if (count >= (PAGE_SIZE - 1))
                return -EINVAL;
 
        driver_override = kstrndup(buf, count, GFP_KERNEL);
index 5998c53280f547cc5854a6449d41ccb95fa99c75..29cd71d8b360c17e310d672b1127d9793eaf248a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PM)       += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
 obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o
 obj-$(CONFIG_PM_TRACE_RTC)     += trace.o
index ea1732ed7a9d9071db73784c7e37d505ed8dea0a..770b1539a083d111ba1a65b569d3a75eaa81dd38 100644 (file)
@@ -1860,10 +1860,13 @@ void device_pm_check_callbacks(struct device *dev)
 {
        spin_lock_irq(&dev->power.lock);
        dev->power.no_pm_callbacks =
-               (!dev->bus || pm_ops_is_empty(dev->bus->pm)) &&
-               (!dev->class || pm_ops_is_empty(dev->class->pm)) &&
+               (!dev->bus || (pm_ops_is_empty(dev->bus->pm) &&
+                !dev->bus->suspend && !dev->bus->resume)) &&
+               (!dev->class || (pm_ops_is_empty(dev->class->pm) &&
+                !dev->class->suspend && !dev->class->resume)) &&
                (!dev->type || pm_ops_is_empty(dev->type->pm)) &&
                (!dev->pm_domain || pm_ops_is_empty(&dev->pm_domain->ops)) &&
-               (!dev->driver || pm_ops_is_empty(dev->driver->pm));
+               (!dev->driver || (pm_ops_is_empty(dev->driver->pm) &&
+                !dev->driver->suspend && !dev->driver->resume));
        spin_unlock_irq(&dev->power.lock);
 }
index a8cc14fd8ae49ff92cb2fc3dd593273aefd6e10d..a6de325306933b57928b8d16d741247e93274102 100644 (file)
@@ -1581,6 +1581,9 @@ static int _opp_set_availability(struct device *dev, unsigned long freq,
 
        opp->available = availability_req;
 
+       dev_pm_opp_get(opp);
+       mutex_unlock(&opp_table->lock);
+
        /* Notify the change of the OPP availability */
        if (availability_req)
                blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ENABLE,
@@ -1589,8 +1592,12 @@ static int _opp_set_availability(struct device *dev, unsigned long freq,
                blocking_notifier_call_chain(&opp_table->head,
                                             OPP_EVENT_DISABLE, opp);
 
+       dev_pm_opp_put(opp);
+       goto put_table;
+
 unlock:
        mutex_unlock(&opp_table->lock);
+put_table:
        dev_pm_opp_put_opp_table(opp_table);
        return r;
 }
index a46e97e515c5d2e9f0fd1cb35c097d4b3c4037b9..7beee75399d41f2811d10afbdf88b685b573fe27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/pm_qos.h>
 
 static inline void device_pm_init_common(struct device *dev)
index f850daeffba4417ae6b2cc69a0f4aa5bf065987e..277d43a83f53e8dc011184ebaf6c783c02f7395b 100644 (file)
@@ -277,11 +277,11 @@ void dev_pm_qos_constraints_destroy(struct device *dev)
        mutex_unlock(&dev_pm_qos_sysfs_mtx);
 }
 
-static bool dev_pm_qos_invalid_request(struct device *dev,
-                                      struct dev_pm_qos_request *req)
+static bool dev_pm_qos_invalid_req_type(struct device *dev,
+                                       enum dev_pm_qos_req_type type)
 {
-       return !req || (req->type == DEV_PM_QOS_LATENCY_TOLERANCE
-                       && !dev->power.set_latency_tolerance);
+       return type == DEV_PM_QOS_LATENCY_TOLERANCE &&
+              !dev->power.set_latency_tolerance;
 }
 
 static int __dev_pm_qos_add_request(struct device *dev,
@@ -290,7 +290,7 @@ static int __dev_pm_qos_add_request(struct device *dev,
 {
        int ret = 0;
 
-       if (!dev || dev_pm_qos_invalid_request(dev, req))
+       if (!dev || !req || dev_pm_qos_invalid_req_type(dev, type))
                return -EINVAL;
 
        if (WARN(dev_pm_qos_request_active(req),
index d0b65bbe7e1513f140f198aa839fd03ef925e5e6..7ed99c1b2a8b99cab9b5bc6bd002933615e9d00f 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/phy.h>
 
 struct property_set {
+       struct device *dev;
        struct fwnode_handle fwnode;
        const struct property_entry *properties;
 };
@@ -682,6 +683,10 @@ EXPORT_SYMBOL_GPL(fwnode_property_match_string);
  * Caller is responsible to call fwnode_handle_put() on the returned
  * args->fwnode pointer.
  *
+ * Returns: %0 on success
+ *         %-ENOENT when the index is out of bounds, the index has an empty
+ *                  reference or the property was not found
+ *         %-EINVAL on parse error
  */
 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode,
                                       const char *prop, const char *nargs_prop,
@@ -891,6 +896,7 @@ static struct property_set *pset_copy_set(const struct property_set *pset)
 void device_remove_properties(struct device *dev)
 {
        struct fwnode_handle *fwnode;
+       struct property_set *pset;
 
        fwnode = dev_fwnode(dev);
        if (!fwnode)
@@ -900,16 +906,16 @@ void device_remove_properties(struct device *dev)
         * the pset. If there is no real firmware node (ACPI/DT) primary
         * will hold the pset.
         */
-       if (is_pset_node(fwnode)) {
+       pset = to_pset_node(fwnode);
+       if (pset) {
                set_primary_fwnode(dev, NULL);
-               pset_free_set(to_pset_node(fwnode));
        } else {
-               fwnode = fwnode->secondary;
-               if (!IS_ERR(fwnode) && is_pset_node(fwnode)) {
+               pset = to_pset_node(fwnode->secondary);
+               if (pset && dev == pset->dev)
                        set_secondary_fwnode(dev, NULL);
-                       pset_free_set(to_pset_node(fwnode));
-               }
        }
+       if (pset && dev == pset->dev)
+               pset_free_set(pset);
 }
 EXPORT_SYMBOL_GPL(device_remove_properties);
 
@@ -938,6 +944,7 @@ int device_add_properties(struct device *dev,
 
        p->fwnode.ops = &pset_fwnode_ops;
        set_secondary_fwnode(dev, &p->fwnode);
+       p->dev = dev;
        return 0;
 }
 EXPORT_SYMBOL_GPL(device_add_properties);
index 073c0b77e5b301f263fca13cd869cc20aef74d77..0368fd7b3a414796f78db5e5d91788a3069358ca 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Generic register map support.  There are no user servicable options here,
 # this is an API intended to be used by other kernel subsystems.  These
 # subsystems should select the appropriate symbols.
index 0cf4abc8fbf13f9128a006dd520f1bd344b62007..0d298c446108e9787e4fdb701fd89b6933ca9c8b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # For include/trace/define_trace.h to include trace.h
 CFLAGS_regmap.o := -I$(src)
 
index 64586a1c5a4293ec93448d2d090bb21d19be3dd2..d4066fa079ab6f0c7737fd0846692095e401d1be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM regmap
 
index 9aa0d45a60dbcd7424d7f920f53b0cf0c4c22ec6..86e85daa80bf88d636abf45f45f4d2ad1c4674fc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config TEST_ASYNC_DRIVER_PROBE
        tristate "Build kernel module to test asynchronous driver probing"
        depends on m
index 54f81c554815ce34755ed063f2a4aeb4271dccc6..a2df1ad03463413f38a126a21b2ddb5661b6b5d7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config BCMA_POSSIBLE
        bool
        depends on HAS_IOMEM && HAS_DMA
index 087948a1d20d96d9aa83540897b827cc34936e8f..f8c37de35da2917ce81bf8b0b9e6854c6b67612b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 bcma-y                                 += main.o scan.o core.o sprom.o
 bcma-y                                 += driver_chipcommon.o driver_chipcommon_pmu.o
 bcma-y                                 += driver_chipcommon_b.o
index 168fa175d65a08319f5e92ad10f8f5ff4baea54a..a4aac370f21f670f55633f62f63cd3c4bdeab28e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_PRIVATE_H_
 #define LINUX_BCMA_PRIVATE_H_
 
index 30eb475e4d195e75d17d79b635181fa1ef87f00f..e53079a3daf792c8fb533a0b51e800610b73efbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCMA_SCAN_H_
 #define BCMA_SCAN_H_
 
index 4a438b8abe27ad9c1774c89f608bd47fecc295a3..7b2df7a54d8759f45e5467bb31a31a94500f7651 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Block device driver configuration
 #
@@ -17,7 +18,7 @@ if BLK_DEV
 
 config BLK_DEV_NULL_BLK
        tristate "Null test block driver"
-       depends on CONFIGFS_FS
+       select CONFIGFS_FS
 
 config BLK_DEV_FD
        tristate "Normal floppy disk support"
index 1f456d86a1907c3085e3ff558f7fd285b3af76f3..dc061158b4036e75992451690138985f241b45cc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel block device drivers.
 #
index bbd0d186cfc00ff89f9378b5816ff15ee90b1005..2d7178f7754edddf06278e46e87cc9aefc6d4427 100644 (file)
@@ -342,7 +342,7 @@ static long __brd_direct_access(struct brd_device *brd, pgoff_t pgoff,
 
        if (!brd)
                return -ENODEV;
-       page = brd_insert_page(brd, PFN_PHYS(pgoff) / 512);
+       page = brd_insert_page(brd, (sector_t)pgoff << PAGE_SECTORS_SHIFT);
        if (!page)
                return -ENOSPC;
        *kaddr = page_address(page);
index 7845bd6ee414715463a81d4975d493a1a7327464..87aab6910d2dbf875a395765fccac57a2b7dc862 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # DRBD device driver configuration
 #
index 4464e353c1e81fd2faf3fe823bf244807fa0afd3..8bd534697d1b764a5a7fd9d8dcc15c89677f92d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 drbd-y := drbd_bitmap.o drbd_proc.o
 drbd-y += drbd_worker.o drbd_receiver.o drbd_req.o drbd_actlog.o
 drbd-y += drbd_main.o drbd_strings.o drbd_nl.o
index 494837e59f232fc1d2d76026ed8f09c581b2b05d..ab21976a87b2e1e47bcf133e93bbda69f5d3562c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) "drbd debugfs: " fmt
 #include <linux/kernel.h>
 #include <linux/module.h>
index 8bee21340dce16caf9760efe037b312aa206c35f..4ecfbb3358d799c2a1a82445d60da09064f56561 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/debugfs.h>
index 51b25ad852515d2514e5215490e146d13371d6c4..c58986556161ff5a46e092bb8bb55c1fec87f0a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/bug.h>
 #include <linux/rbtree_augmented.h>
 #include "drbd_interval.h"
index 23c5a94428d2611bcd89e2c10758da8eeda40d48..b8c2dee5edc8112ef667b959c5e168b06f7d8395 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRBD_INTERVAL_H
 #define __DRBD_INTERVAL_H
 
index 6bf806df60dc6008e6754b74dec4ff9a021ce8ae..8e261cb5198bd1ab03f4926ccb0ebc35da766d67 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <net/netlink.h>
 #include <linux/drbd_genl_api.h>
index 679c2d5b45355f2718c4b4725efcebda098fab8f..f5eaffb6474e87dc5228605240d0aa56e7ab0d2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRBD_NLA_H
 #define __DRBD_NLA_H
 
index 4d296800f70680dd8dba0219d12c301e3e375bf7..c3081f93051cfb9a9199befdc796785bfa088f24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRBD_PROTOCOL_H
 #define __DRBD_PROTOCOL_H
 
index 0276c98fbbdde5f3cf2a8a263a507167490037d5..ea58301d0895c96212f2fdc38e39e9859d9c627d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DRBD_STATE_H
 #define DRBD_STATE_H
 
index 9e503a1a0bfbcb950e45e41483d06b967b13505e..ba80f612d6abbc185dc9a73ee5e72dbb86932b8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DRBD_STATE_CHANGE_H
 #define DRBD_STATE_CHANGE_H
 
index f9923cc88afb1122c854325bd3199aa3a223d204..87b94a27358a0eb3fb876904a69dee16e949310d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRBD_STRINGS_H
 #define __DRBD_STRINGS_H
 
index f68c1d50802fddb3289480124fc1459c9b66ea9e..1f3956702993883859070b2ef39a9b164978a213 100644 (file)
@@ -67,10 +67,8 @@ struct loop_device {
 struct loop_cmd {
        struct kthread_work work;
        struct request *rq;
-       union {
-               bool use_aio; /* use AIO interface to handle I/O */
-               atomic_t ref; /* only for aio */
-       };
+       bool use_aio; /* use AIO interface to handle I/O */
+       atomic_t ref; /* only for aio */
        long ret;
        struct kiocb iocb;
        struct bio_vec *bvec;
index 0ba837fc62a874511a910dd077feea2f26dfbd37..bf221358567e7a78f52c340339d0951ac5ecb5e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # mtip32xx device driver configuration
 #
index 2aa87cbdede0ed19b77c8e4aaffea2c2d8146758..9adfb5445f8dca5a88a4ffe59d3573ed5b854e02 100644 (file)
@@ -243,7 +243,6 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize,
        struct nbd_config *config = nbd->config;
        config->blksize = blocksize;
        config->bytesize = blocksize * nr_blocks;
-       nbd_size_update(nbd);
 }
 
 static void nbd_complete_rq(struct request *req)
@@ -387,6 +386,15 @@ static int sock_xmit(struct nbd_device *nbd, int index, int send,
        return result;
 }
 
+/*
+ * Different settings for sk->sk_sndtimeo can result in different return values
+ * if there is a signal pending when we enter sendmsg, because reasons?
+ */
+static inline int was_interrupted(int result)
+{
+       return result == -ERESTARTSYS || result == -EINTR;
+}
+
 /* always call with the tx_lock held */
 static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
 {
@@ -459,7 +467,7 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
        result = sock_xmit(nbd, index, 1, &from,
                        (type == NBD_CMD_WRITE) ? MSG_MORE : 0, &sent);
        if (result <= 0) {
-               if (result == -ERESTARTSYS) {
+               if (was_interrupted(result)) {
                        /* If we havne't sent anything we can just return BUSY,
                         * however if we have sent something we need to make
                         * sure we only allow this req to be sent until we are
@@ -503,7 +511,7 @@ send_pages:
                        }
                        result = sock_xmit(nbd, index, 1, &from, flags, &sent);
                        if (result <= 0) {
-                               if (result == -ERESTARTSYS) {
+                               if (was_interrupted(result)) {
                                        /* We've already sent the header, we
                                         * have no choice but to set pending and
                                         * return BUSY.
@@ -820,9 +828,13 @@ static blk_status_t nbd_queue_rq(struct blk_mq_hw_ctx *hctx,
         * appropriate.
         */
        ret = nbd_handle_cmd(cmd, hctx->queue_num);
+       if (ret < 0)
+               ret = BLK_STS_IOERR;
+       else if (!ret)
+               ret = BLK_STS_OK;
        complete(&cmd->send_complete);
 
-       return ret < 0 ? BLK_STS_IOERR : BLK_STS_OK;
+       return ret;
 }
 
 static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
@@ -1090,6 +1102,7 @@ static int nbd_start_device(struct nbd_device *nbd)
                args->index = i;
                queue_work(recv_workqueue, &args->work);
        }
+       nbd_size_update(nbd);
        return error;
 }
 
@@ -1194,6 +1207,12 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
+       /* The block layer will pass back some non-nbd ioctls in case we have
+        * special handling for them, but we don't so just return an error.
+        */
+       if (_IOC_TYPE(cmd) != 0xab)
+               return -EINVAL;
+
        mutex_lock(&nbd->config_lock);
 
        /* Don't allow ioctl operations on a nbd device that was created with
index 3a15247942e41119bd26822a8e5b636b9a8a01e0..b226835a909a3106f1adf2f6a5e6614596caae51 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # PARIDE configuration
 #
index a539e004bb7a2f46b5ca79c258691d777f5c0780..cf1742a8475efdfb2e44787922d25ac3255a7b1f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Parallel port IDE device drivers.
 #
index 971f099b40aa63ef2c483fcf01392bdf29318708..6d0d802479ea2ede4a2471033132a02408a8c877 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # mkd -- a script to create the device special files for the PARIDE subsystem
 #
index 7cedb4295e9d325343e296b8b299cb407b7b2a55..64d0fc17c1742ab74aa232da503d08e344b594b2 100644 (file)
@@ -2604,7 +2604,7 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
                return NULL;
        *dma_handle = dma_map_single(dev, buf, s->size, dir);
        if (dma_mapping_error(dev, *dma_handle)) {
-               kfree(buf);
+               kmem_cache_free(s, buf);
                buf = NULL;
        }
        return buf;
index 34e17ee799be30e4d60f8fa45a58ea6baa3dd598..68846897d2139baa1208619469a4ef15385d7aa8 100644 (file)
@@ -593,10 +593,22 @@ static int virtblk_map_queues(struct blk_mq_tag_set *set)
        return blk_mq_virtio_map_queues(set, vblk->vdev, 0);
 }
 
+#ifdef CONFIG_VIRTIO_BLK_SCSI
+static void virtblk_initialize_rq(struct request *req)
+{
+       struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
+
+       scsi_req_init(&vbr->sreq);
+}
+#endif
+
 static const struct blk_mq_ops virtio_mq_ops = {
        .queue_rq       = virtio_queue_rq,
        .complete       = virtblk_request_done,
        .init_request   = virtblk_init_request,
+#ifdef CONFIG_VIRTIO_BLK_SCSI
+       .initialize_rq_fn = virtblk_initialize_rq,
+#endif
        .map_queues     = virtblk_map_queues,
 };
 
index 7cd4a8ec3c8fa24b827a19004179f1231b8c2999..ac3a31d433b2e9f698d051bfcd06f76d0efad971 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config ZRAM
        tristate "Compressed RAM block device support"
        depends on BLOCK && SYSFS && ZSMALLOC && CRYPTO
index 2981c27d3aae316fedd267c6c79d76eb68a9395e..f149d3e612341d1f5e70797a8f62d0330fa3973d 100644 (file)
@@ -766,27 +766,6 @@ static void zram_slot_unlock(struct zram *zram, u32 index)
        bit_spin_unlock(ZRAM_ACCESS, &zram->table[index].value);
 }
 
-static bool zram_same_page_read(struct zram *zram, u32 index,
-                               struct page *page,
-                               unsigned int offset, unsigned int len)
-{
-       zram_slot_lock(zram, index);
-       if (unlikely(!zram_get_handle(zram, index) ||
-                       zram_test_flag(zram, index, ZRAM_SAME))) {
-               void *mem;
-
-               zram_slot_unlock(zram, index);
-               mem = kmap_atomic(page);
-               zram_fill_page(mem + offset, len,
-                                       zram_get_element(zram, index));
-               kunmap_atomic(mem);
-               return true;
-       }
-       zram_slot_unlock(zram, index);
-
-       return false;
-}
-
 static void zram_meta_free(struct zram *zram, u64 disksize)
 {
        size_t num_pages = disksize >> PAGE_SHIFT;
@@ -884,11 +863,20 @@ static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index,
                zram_slot_unlock(zram, index);
        }
 
-       if (zram_same_page_read(zram, index, page, 0, PAGE_SIZE))
-               return 0;
-
        zram_slot_lock(zram, index);
        handle = zram_get_handle(zram, index);
+       if (!handle || zram_test_flag(zram, index, ZRAM_SAME)) {
+               unsigned long value;
+               void *mem;
+
+               value = handle ? zram_get_element(zram, index) : 0;
+               mem = kmap_atomic(page);
+               zram_fill_page(mem, PAGE_SIZE, value);
+               kunmap_atomic(mem);
+               zram_slot_unlock(zram, index);
+               return 0;
+       }
+
        size = zram_get_obj_size(zram, index);
 
        src = zs_map_object(zram->mem_pool, handle, ZS_MM_RO);
index fae5a74dc737cbd1841c10498708793d9562b93e..98a60db8e5d14c07d10b6e357afebe25da657801 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 menu "Bluetooth device drivers"
        depends on BT
index e693ca6eeed9267d53f3eae0386bf90643d25cb3..4e4e44d0979689db444a05c2d8e742d388965219 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Bluetooth HCI device drivers.
 #
index ae3d8f3444b9bd3741cd0160b47600231aa8aba4..3e66f4cc1a59ca84108c4f5533a1b3bf37469666 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Bus Devices
 #
index cc6364bec05402e8834b2982ec8e801fe4fb2118..3ae96cffabd501af96240d2e50c3aa4ac81be5fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the bus drivers.
 #
index c7f39690318473d4b75bca11c0c3fd4830f4d084..70db4d5638a6338632a916e4ee07f0f4b3ca5e04 100644 (file)
@@ -720,7 +720,7 @@ mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus)
                        if (mbus->hw_io_coherency)
                                w->mbus_attr |= ATTR_HW_COHERENCY;
                        w->base = base & DDR_BASE_CS_LOW_MASK;
-                       w->size = (size | ~DDR_SIZE_MASK) + 1;
+                       w->size = (u64)(size | ~DDR_SIZE_MASK) + 1;
                }
        }
        mvebu_mbus_dram_info.num_cs = cs;
index 8ffde4f8ab9ae53f3f6007890a709ce795d19d8f..a95566ff47d30043994642901b6341cc8bb78ec1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the kernel cdrom device drivers.
 #
 # 30 Jan 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
index 6237143446002767402ba8af1f30a968e297d8c0..c28dca0c613d1be5d99c924fe68da994c32b7847 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Character device configuration
 #
index 53e33720818c0aba856ca2d8f7386618d73a8f40..7dc3abe664648eeec97b303d4c75488fadd04bf9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel character device drivers.
 #
index c528f96ee204fb3f480e29d96992e1e0c1870272..6231714ef3c8f95ec99769db5a2e75731e29dee3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 menuconfig AGP
        tristate "/dev/agpgart (AGP Support)"
        depends on ALPHA || IA64 || PARISC || PPC || X86
index 604489bcdbf9b6c70b51e89f093accfdb34f4d25..4a786ffd9dee80ae0a1195003a2133dd73f254fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 agpgart-y := backend.o frontend.o generic.o isoch.o
 
 agpgart-$(CONFIG_COMPAT)       += compat_ioctl.o
index fda073dcd96716199a24c2d480f053179c676b2c..164bf651953f17aa567971c1b0b1b36a418f023c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common Intel AGPGART and GTT definitions.
  */
index c73385cc4b8a4f907161eca5258294bea2a9b159..fc8e1bc3347d10853e0bdbb47b55ec8f73e040c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Setup routines for AGP 3.5 compliant bridges.
  */
index 35530b3d9bd63dc60bf17d5734e8839db95ac550..282e08f159d5c59443e0b093c1f79148170fa002 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: applicom.h,v 1.2 1999/08/28 15:09:49 dwmw2 Exp $ */
 
 
index c614a56e68ccb6f2562f8635a90b10f162740c1f..8e16ad5d6d898481ea670378fd29adaac43c053e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*!***************************************************************************
 *!
 *! FILE NAME  : ds1302.c
index 39a67defac67cba157fb5587c34cce315614a6b6..f3728d008fff9f1aa3a7fee446a3ece5f2727894 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for HW Random Number Generator (RNG) device drivers.
 #
index 9b6eb5cd59f6eb6f66d8d62f501f88458d547e89..c205df43d5ae8afabeee85316d7eeca1953fc1f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* n2-asm.S: Niagara2 RNG hypervisor call assembler.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index 6bad6cc634e857d772ceadfe9ed5a5460050fe41..9a870f5dc3712273d58b94439640bd1abe8c2c52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* n2rng.h: Niagara2 RNG defines.
  *
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
index eefb0b301e836bf77f481e39db0f1181729e8485..43b7d86cc5f29f967e577a4f0d78513c0e592ac6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ipmi drivers.
 #
index 2a84401dea05b2cc96a83c1530b1d9318418e219..2059f79d669a07f2f734ad88a907538a6085cfe8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * A hack to create a platform device from a DMI entry.  This will
  * allow autoloading of the IPMI drive based on SMBIOS entries.
index 0a1afe5ceb1ed699eadbd10e957de049456116b5..ea990a8e3b09b698847681dd68d1a1155caa64ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * DMI defines for use by IPMI
  */
index 593a8818aca99e345e03d0fb56eabd25b5ffd05a..970e1242a282a097405cf30d0c87e7518bca67f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/drivers/char/mem.c
  *
index c9cd1ea6844a63bfff6426505d4c2ddb46faebe5..1bb9e7cc82e306a34c970540e58301d0ca2a60ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/drivers/char/misc.c
  *
index c3ebc16ce8a7722b18f7589b437f43e3c905ed75..abee3ca748019bb8c5c71a9f547868b49584f17d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NWBUTTON_H
 #define __NWBUTTON_H
 
index 9a8b805c5095487a8f59ac22475d417d6436ac23..e2ffff995d512a04ea36c3286d5117c0861b0183 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        _CM4040_H_
 #define        _CM4040_H_
 
index 23681f01f95a214d417b29298660fb3d1d5a5b01..34b4bcf46f43bc33d77bbf7e8c702d13f9a1616d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel tpm device drivers.
 #
index 74a722e5e068e3c0367ff640b469653251331891..649e41107de9b68e4ce2c278f30e43f469cfc0ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ST33ZP24 TPM 1.2 driver
 #
index ff15cf719badd91b7fc586eb54dc09bb49f0ba8b..ba3b6f9dacf7c6a0f55bca4de024ea736f3304b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TPM_DEV_H
 #define _TPM_DEV_H
 
index fe597e6c55c40ca34f070f83a2af53e9b42a66de..1d6729be4cd6376727b9b210319bd77f03ccfb02 100644 (file)
@@ -455,7 +455,7 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
                        goto out;
                }
 
-               msleep(TPM_TIMEOUT);    /* CHECK */
+               tpm_msleep(TPM_TIMEOUT);
                rmb();
        } while (time_before(jiffies, stop));
 
@@ -970,7 +970,7 @@ int tpm_do_selftest(struct tpm_chip *chip)
                        dev_info(
                            &chip->dev, HW_ERR
                            "TPM command timed out during continue self test");
-                       msleep(delay_msec);
+                       tpm_msleep(delay_msec);
                        continue;
                }
 
@@ -985,7 +985,7 @@ int tpm_do_selftest(struct tpm_chip *chip)
                }
                if (rc != TPM_WARN_DOING_SELFTEST)
                        return rc;
-               msleep(delay_msec);
+               tpm_msleep(delay_msec);
        } while (--loops > 0);
 
        return rc;
@@ -1085,7 +1085,7 @@ again:
                }
        } else {
                do {
-                       msleep(TPM_TIMEOUT);
+                       tpm_msleep(TPM_TIMEOUT);
                        status = chip->ops->status(chip);
                        if ((status & mask) == mask)
                                return 0;
@@ -1150,7 +1150,7 @@ int tpm_pm_suspend(struct device *dev)
                 */
                if (rc != TPM_WARN_RETRY)
                        break;
-               msleep(TPM_TIMEOUT_RETRY);
+               tpm_msleep(TPM_TIMEOUT_RETRY);
        }
 
        if (rc)
index 04fbff2edbf38ce19845e5c1fdd1cd619293419d..2d5466a72e40f82b3272b857b74a1f822f82b966 100644 (file)
@@ -50,7 +50,8 @@ enum tpm_const {
 
 enum tpm_timeout {
        TPM_TIMEOUT = 5,        /* msecs */
-       TPM_TIMEOUT_RETRY = 100 /* msecs */
+       TPM_TIMEOUT_RETRY = 100, /* msecs */
+       TPM_TIMEOUT_RANGE_US = 300      /* usecs */
 };
 
 /* TPM addresses */
@@ -527,6 +528,12 @@ int tpm_pm_resume(struct device *dev);
 int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
                      wait_queue_head_t *queue, bool check_cancel);
 
+static inline void tpm_msleep(unsigned int delay_msec)
+{
+       usleep_range(delay_msec * 1000,
+                    (delay_msec * 1000) + TPM_TIMEOUT_RANGE_US);
+};
+
 struct tpm_chip *tpm_chip_find_get(int chip_num);
 __must_check int tpm_try_get_ops(struct tpm_chip *chip);
 void tpm_put_ops(struct tpm_chip *chip);
index f7f34b2aa98190c7474b3dd6c0f02b2abc032ec9..e1a41b788f081c829ad0d0353ac7d3622752c82f 100644 (file)
@@ -899,7 +899,7 @@ static int tpm2_do_selftest(struct tpm_chip *chip)
                if (rc != TPM2_RC_TESTING)
                        break;
 
-               msleep(delay_msec);
+               tpm_msleep(delay_msec);
        }
 
        return rc;
index a4ac63a21d8a051da3c336f5343b9dc72574b719..8f0a98dea327a5bc90d7fcf3529c3701d17abd6b 100644 (file)
@@ -665,7 +665,7 @@ static const struct dev_pm_ops crb_pm = {
        SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL)
 };
 
-static struct acpi_device_id crb_device_ids[] = {
+static const struct acpi_device_id crb_device_ids[] = {
        {"MSFT0101", 0},
        {"", 0},
 };
index b4b5495592035bbc2996be216404b12c5c9287c5..204466cc4d05d0c3ee540941ae60359ff32df629 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __TPM_EVENTLOG_H__
 #define __TPM_EVENTLOG_H__
index f01d083eced2fc056d6d74e4423a62f28470e302..25f6e2665385d063d47c50ad9f21e25591f828c9 100644 (file)
 
 static const char tpm_ibmvtpm_driver_name[] = "tpm_ibmvtpm";
 
-static struct vio_device_id tpm_ibmvtpm_device_table[] = {
+static const struct vio_device_id tpm_ibmvtpm_device_table[] = {
        { "IBM,vtpm", "IBM,vtpm"},
        { "", "" }
 };
 MODULE_DEVICE_TABLE(vio, tpm_ibmvtpm_device_table);
 
 /**
+ *
+ * ibmvtpm_send_crq_word - Send a CRQ request
+ * @vdev:      vio device struct
+ * @w1:                pre-constructed first word of tpm crq (second word is reserved)
+ *
+ * Return:
+ *     0 - Success
+ *     Non-zero - Failure
+ */
+static int ibmvtpm_send_crq_word(struct vio_dev *vdev, u64 w1)
+{
+       return plpar_hcall_norets(H_SEND_CRQ, vdev->unit_address, w1, 0);
+}
+
+/**
+ *
  * ibmvtpm_send_crq - Send a CRQ request
  *
  * @vdev:      vio device struct
- * @w1:                first word
- * @w2:                second word
+ * @valid:     Valid field
+ * @msg:       Type field
+ * @len:       Length field
+ * @data:      Data field
+ *
+ * The ibmvtpm crq is defined as follows:
+ *
+ * Byte  |   0   |   1   |   2   |   3   |   4   |   5   |   6   |   7
+ * -----------------------------------------------------------------------
+ * Word0 | Valid | Type  |     Length    |              Data
+ * -----------------------------------------------------------------------
+ * Word1 |                Reserved
+ * -----------------------------------------------------------------------
+ *
+ * Which matches the following structure (on bigendian host):
+ *
+ * struct ibmvtpm_crq {
+ *         u8 valid;
+ *         u8 msg;
+ *         __be16 len;
+ *         __be32 data;
+ *         __be64 reserved;
+ * } __attribute__((packed, aligned(8)));
+ *
+ * However, the value is passed in a register so just compute the numeric value
+ * to load into the register avoiding byteswap altogether. Endian only affects
+ * memory loads and stores - registers are internally represented the same.
  *
  * Return:
- *     0 -Sucess
+ *     0 (H_SUCCESS) - Success
  *     Non-zero - Failure
  */
-static int ibmvtpm_send_crq(struct vio_dev *vdev, u64 w1, u64 w2)
+static int ibmvtpm_send_crq(struct vio_dev *vdev,
+               u8 valid, u8 msg, u16 len, u32 data)
 {
-       return plpar_hcall_norets(H_SEND_CRQ, vdev->unit_address, w1, w2);
+       u64 w1 = ((u64)valid << 56) | ((u64)msg << 48) | ((u64)len << 32) |
+               (u64)data;
+       return ibmvtpm_send_crq_word(vdev, w1);
 }
 
 /**
@@ -109,8 +153,6 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)
 static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
 {
        struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
-       struct ibmvtpm_crq crq;
-       __be64 *word = (__be64 *)&crq;
        int rc, sig;
 
        if (!ibmvtpm->rtce_buf) {
@@ -137,10 +179,6 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
        spin_lock(&ibmvtpm->rtce_lock);
        ibmvtpm->res_len = 0;
        memcpy((void *)ibmvtpm->rtce_buf, (void *)buf, count);
-       crq.valid = (u8)IBMVTPM_VALID_CMD;
-       crq.msg = (u8)VTPM_TPM_COMMAND;
-       crq.len = cpu_to_be16(count);
-       crq.data = cpu_to_be32(ibmvtpm->rtce_dma_handle);
 
        /*
         * set the processing flag before the Hcall, since we may get the
@@ -148,8 +186,9 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
         */
        ibmvtpm->tpm_processing_cmd = true;
 
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, be64_to_cpu(word[0]),
-                             be64_to_cpu(word[1]));
+       rc = ibmvtpm_send_crq(ibmvtpm->vdev,
+                       IBMVTPM_VALID_CMD, VTPM_TPM_COMMAND,
+                       count, ibmvtpm->rtce_dma_handle);
        if (rc != H_SUCCESS) {
                dev_err(ibmvtpm->dev, "tpm_ibmvtpm_send failed rc=%d\n", rc);
                rc = 0;
@@ -182,15 +221,10 @@ static u8 tpm_ibmvtpm_status(struct tpm_chip *chip)
  */
 static int ibmvtpm_crq_get_rtce_size(struct ibmvtpm_dev *ibmvtpm)
 {
-       struct ibmvtpm_crq crq;
-       u64 *buf = (u64 *) &crq;
        int rc;
 
-       crq.valid = (u8)IBMVTPM_VALID_CMD;
-       crq.msg = (u8)VTPM_GET_RTCE_BUFFER_SIZE;
-
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
-                             cpu_to_be64(buf[1]));
+       rc = ibmvtpm_send_crq(ibmvtpm->vdev,
+                       IBMVTPM_VALID_CMD, VTPM_GET_RTCE_BUFFER_SIZE, 0, 0);
        if (rc != H_SUCCESS)
                dev_err(ibmvtpm->dev,
                        "ibmvtpm_crq_get_rtce_size failed rc=%d\n", rc);
@@ -210,15 +244,10 @@ static int ibmvtpm_crq_get_rtce_size(struct ibmvtpm_dev *ibmvtpm)
  */
 static int ibmvtpm_crq_get_version(struct ibmvtpm_dev *ibmvtpm)
 {
-       struct ibmvtpm_crq crq;
-       u64 *buf = (u64 *) &crq;
        int rc;
 
-       crq.valid = (u8)IBMVTPM_VALID_CMD;
-       crq.msg = (u8)VTPM_GET_VERSION;
-
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
-                             cpu_to_be64(buf[1]));
+       rc = ibmvtpm_send_crq(ibmvtpm->vdev,
+                       IBMVTPM_VALID_CMD, VTPM_GET_VERSION, 0, 0);
        if (rc != H_SUCCESS)
                dev_err(ibmvtpm->dev,
                        "ibmvtpm_crq_get_version failed rc=%d\n", rc);
@@ -238,7 +267,7 @@ static int ibmvtpm_crq_send_init_complete(struct ibmvtpm_dev *ibmvtpm)
 {
        int rc;
 
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, INIT_CRQ_COMP_CMD, 0);
+       rc = ibmvtpm_send_crq_word(ibmvtpm->vdev, INIT_CRQ_COMP_CMD);
        if (rc != H_SUCCESS)
                dev_err(ibmvtpm->dev,
                        "ibmvtpm_crq_send_init_complete failed rc=%d\n", rc);
@@ -258,7 +287,7 @@ static int ibmvtpm_crq_send_init(struct ibmvtpm_dev *ibmvtpm)
 {
        int rc;
 
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, INIT_CRQ_CMD, 0);
+       rc = ibmvtpm_send_crq_word(ibmvtpm->vdev, INIT_CRQ_CMD);
        if (rc != H_SUCCESS)
                dev_err(ibmvtpm->dev,
                        "ibmvtpm_crq_send_init failed rc=%d\n", rc);
@@ -340,15 +369,10 @@ static int tpm_ibmvtpm_suspend(struct device *dev)
 {
        struct tpm_chip *chip = dev_get_drvdata(dev);
        struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
-       struct ibmvtpm_crq crq;
-       u64 *buf = (u64 *) &crq;
        int rc = 0;
 
-       crq.valid = (u8)IBMVTPM_VALID_CMD;
-       crq.msg = (u8)VTPM_PREPARE_TO_SUSPEND;
-
-       rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
-                             cpu_to_be64(buf[1]));
+       rc = ibmvtpm_send_crq(ibmvtpm->vdev,
+                       IBMVTPM_VALID_CMD, VTPM_PREPARE_TO_SUSPEND, 0, 0);
        if (rc != H_SUCCESS)
                dev_err(ibmvtpm->dev,
                        "tpm_ibmvtpm_suspend failed rc=%d\n", rc);
index 3b1b9f9322d5547120f35f490b7ec7b802d2b085..d8f10047fbbaf1f2f965a795358e60be859fb759 100644 (file)
@@ -191,7 +191,7 @@ static int wait(struct tpm_chip *chip, int wait_for_bit)
                /* check the status-register if wait_for_bit is set */
                if (status & 1 << wait_for_bit)
                        break;
-               msleep(TPM_MSLEEP_TIME);
+               tpm_msleep(TPM_MSLEEP_TIME);
        }
        if (i == TPM_MAX_TRIES) {       /* timeout occurs */
                if (wait_for_bit == STAT_XFE)
@@ -226,7 +226,7 @@ static void tpm_wtx(struct tpm_chip *chip)
        wait_and_send(chip, TPM_CTRL_WTX);
        wait_and_send(chip, 0x00);
        wait_and_send(chip, 0x00);
-       msleep(TPM_WTX_MSLEEP_TIME);
+       tpm_msleep(TPM_WTX_MSLEEP_TIME);
 }
 
 static void tpm_wtx_abort(struct tpm_chip *chip)
@@ -237,7 +237,7 @@ static void tpm_wtx_abort(struct tpm_chip *chip)
        wait_and_send(chip, 0x00);
        wait_and_send(chip, 0x00);
        number_of_wtx = 0;
-       msleep(TPM_WTX_MSLEEP_TIME);
+       tpm_msleep(TPM_WTX_MSLEEP_TIME);
 }
 
 static int tpm_inf_recv(struct tpm_chip *chip, u8 * buf, size_t count)
index b617b2eeb080ad41034b7b7cbd1b21aaed524a3a..63bc6c3b949e51406527a484d356e24959ed9615 100644 (file)
@@ -51,7 +51,7 @@ static int wait_startup(struct tpm_chip *chip, int l)
 
                if (access & TPM_ACCESS_VALID)
                        return 0;
-               msleep(TPM_TIMEOUT);
+               tpm_msleep(TPM_TIMEOUT);
        } while (time_before(jiffies, stop));
        return -1;
 }
@@ -117,7 +117,7 @@ again:
                do {
                        if (check_locality(chip, l))
                                return l;
-                       msleep(TPM_TIMEOUT);
+                       tpm_msleep(TPM_TIMEOUT);
                } while (time_before(jiffies, stop));
        }
        return -1;
@@ -164,7 +164,7 @@ static int get_burstcount(struct tpm_chip *chip)
                burstcnt = (value >> 8) & 0xFFFF;
                if (burstcnt)
                        return burstcnt;
-               msleep(TPM_TIMEOUT);
+               tpm_msleep(TPM_TIMEOUT);
        } while (time_before(jiffies, stop));
        return -EBUSY;
 }
@@ -396,7 +396,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
        priv->irq = irq;
        chip->flags |= TPM_CHIP_FLAG_IRQ;
        if (!priv->irq_tested)
-               msleep(1);
+               tpm_msleep(1);
        if (!priv->irq_tested)
                disable_interrupts(chip);
        priv->irq_tested = true;
index c99f363826f02f683c6018ddf02a0d4d3a58033f..f7f761b02bedaed4cd54a2e6613fef90ba43aa5e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # common clock types
 obj-$(CONFIG_HAVE_CLK)         += clk-devres.o clk-bulk.o
 obj-$(CONFIG_CLKDEV_LOOKUP)    += clkdev.o
index c68947b65a4c4a176f7f679459f97b60c57ea1e3..082596f37c1d2cd21723c9e41985ee8b87926c48 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for at91 specific clk
 #
index a0c14fa4aa1e7f8408b61952cbb1c7c41b490735..e3f0cb0d90f33d4f4338a464e12c6ce55c37d9cd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CLK_BCM_63XX)     += clk-bcm63xx.o
 obj-$(CONFIG_CLK_BCM_KONA)     += clk-kona.o
 obj-$(CONFIG_CLK_BCM_KONA)     += clk-kona-setup.o
index c834f5abfc497e8ce674de2a736b9c3103bf55fa..4c10456f8a32923c0dade56265e4eeef714df641 100644 (file)
@@ -105,6 +105,7 @@ err:
 
        return  ret;
 }
+EXPORT_SYMBOL_GPL(clk_bulk_prepare);
 
 #endif /* CONFIG_HAVE_CLK_PREPARE */
 
index f940e5af845b8d71eabe0bd2e20de20a1cb3f25e..5e66e6c0205ecb57d0dc83b044611a66a3cc22fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Cortina Gemini SoC Clock Controller driver
  * Copyright (c) 2017 Linus Walleij <linus.walleij@linaro.org>
index eef75e305a595f6f4e453c6d5f0e950cc419bd56..34b22b7930fbc0483611c8e752fb93db30e64b8d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/clk-provider.h>
 #include <linux/of_address.h>
index 715b882205a8587a001a80017500b44f10a8f4df..4ae624425e9d4e58dedcf506583505e1ea42afa6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * H8/300 divide clock driver
  *
index a263124606211bf3514eaf24b77ae66fbb36922c..fc24b0b55a3d7dfb872408a00e42913372344562 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * H8S2678 clock driver
  *
index 1e4c3ddbad840ed88f760c7c252dfbf33bbb0cd8..0e55612112af86484caabad01b7ec5553294c16c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Hisilicon Clock specific Makefile
 #
index f18f10351785014ffc466dda9af5de2d9201b44b..15af423cc0c907c89affc1c48f910723dbd516ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016-2017 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 1ada68abb158a08a4769d31919a83f84265ef655..f91f2b2e11cdd63dc1cfc3f97e48e09b45943d78 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-y += \
        clk.o \
index cf5cf75a484872ce516fe82f548cb629ea7726a7..0a0ab95d16fe6f18380c4ca846b47beb7f9c0927 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/clkdev.h>
index 82fe3662b5f6d43e5bf4d8cc1acb3ea3b29048b9..e47a1c2fe8bd01d217ad9adb7c380e9bdab9ec5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/slab.h>
index 4aeda56ce37279006a5cb8be93f9146d7e3d56d7..9842d657e974e71539a690fe0b778a82ad3c16dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/clk.h>
 #include <linux/io.h>
index a634b1185be38a1b5cd34dc93c23983a37448f0c..9074e6974b6de75d39f84170222a2e7d9c1a96ca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/of.h>
index d54f0720afbaa7f274e30b966ca6f92bae10c391..d69c4bbf35971e7b46d7e4ea38f98f2661324454 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_IMX_CLK_H
 #define __MACH_IMX_CLK_H
 
index e8248f9185f7f3b37e25dc6734d40e8bb33971ac..ab393637f7b0f80791657fa88f458df9b3e7b609 100644 (file)
@@ -2,7 +2,7 @@
  * Ingenic SoC CGU driver
  *
  * Copyright (c) 2013-2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
index 09700b2c555da5a239845cdb85b6962f464e7137..e78b586536ea3291523ad8da3d6da0d171b506da 100644 (file)
@@ -2,7 +2,7 @@
  * Ingenic SoC CGU driver
  *
  * Copyright (c) 2013-2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
index 510fe7e0c8f1c176379f14c1c5855a47abaa112a..32fcc75f6f77e362279775dd9b20444660347911 100644 (file)
@@ -2,7 +2,7 @@
  * Ingenic JZ4740 SoC CGU driver
  *
  * Copyright (c) 2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
index b35d6d9dd5aa1c8e5effd7fe14aa62bd3889b6c6..ac3585ed82286ed978377662b34df3dab304da2e 100644 (file)
@@ -2,7 +2,7 @@
  * Ingenic JZ4780 SoC CGU driver
  *
  * Copyright (c) 2013-2015 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
index 2a755b5fb51b96a96561ec5f72519524dbf9476a..ba2a070765f09c9ee3bf1936c94fdb387c974c4f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o clk-cpumux.o
 obj-$(CONFIG_RESET_CONTROLLER) += reset.o
 obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o
index 9d4bc41e4239506b7061fc183d6756cead5b2dad..7bc7ac69391e3394fd30050c4dc519917e190ecf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for mmp specific clk
 #
index 089927e4cda2e2e331820fe76f4f4b8a947a23b5..ad8d483a35cd5c16d3cbae4019dd345e3c7bb69b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/io.h>
 #include <linux/clk-provider.h>
 #include <linux/slab.h>
index adf9b711b03702e61c989b315124b66aafa6c07a..70bb73257647a2fe4ab280833175388d8d2bbdf7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MMP_CLK_H
 #define __MACH_MMP_CLK_H
 
index b4e4d6aa26319a3b871d7d609df4ac6ee9a9ab78..ded7e391c737a9fc32d3a4e3b2f2d6ef1fd6c10b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/io.h>
 #include <linux/of.h>
index be8b1a7000f766be65a221286c336cdfbdfa6a79..3d0470ca3fd961e9bcb5b3dc7e86157bab100404 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MMP_CLK_RESET_H
 #define __MACH_MMP_CLK_RESET_H
 
index d71c7fd5da168d24f9a6f63deb4ca0ff00755e63..93ac3685271f92d5cf9e976a48c38c85563bc49f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MVEBU_CLK_COMMON) += common.o
 obj-$(CONFIG_MVEBU_CLK_CPU)    += clk-cpu.o
 obj-$(CONFIG_MVEBU_CLK_COREDIV)        += clk-corediv.o
index 4091f3cfee19fd341ce962b41604aefef1885a18..7e35c891e1684338460d0cba223ce656c4d52c25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Marvell Dove PMU Core PLL divider driver
  *
index 4f2f718deb8eb7cadfddc434edfa49ef617b6e44..38ea373088ca4ee0e2eb098f8939cbbde01dd96c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DOVE_DIVIDER_H
 #define DOVE_DIVIDER_H
 
index 3f3aff229fb785a8935b4d59013b0a5d583d1459..26410d31446b51d49dcd2b032027b26e65f110f0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_COMMON_CLK_QCOM) += clk-qcom.o
 
 clk-qcom-y += common.o
index 9bda3ec5b199561b6cd48d82093ef54d8b36e7e5..cbbb081e2145e20ab25480461ff412a4387fdb4b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # SoC
 obj-$(CONFIG_CLK_EMEV2)                        += clk-emev2.o
 obj-$(CONFIG_CLK_RZA1)                 += clk-rz.o
index 567b31d2bfa5269cf16b759196d6d39b9dbd804e..065dfb49adf6fb10170422b56298e47809372e78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RENESAS_CLK_DIV6_H__
 #define __RENESAS_CLK_DIV6_H__
 
index 6f19826cc4473ee2d65f39ead8d8611d5c178108..59b8d320960aaafc440c9f5c2715d9e742e9bb45 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Rockchip Clock specific Makefile
 #
index 62d7854e4b873fe04c38dbeaaaf4e02f5031dc45..5970a50671b9a6638d637f8a017e1cc0cf063e97 100644 (file)
@@ -315,13 +315,13 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
                        RK2928_CLKGATE_CON(10), 8, GFLAGS),
 
        GATE(SCLK_PVTM_CORE, "clk_pvtm_core", "xin24m", 0,
-                       RK2928_CLKGATE_CON(10), 8, GFLAGS),
+                       RK2928_CLKGATE_CON(10), 0, GFLAGS),
        GATE(SCLK_PVTM_GPU, "clk_pvtm_gpu", "xin24m", 0,
-                       RK2928_CLKGATE_CON(10), 8, GFLAGS),
+                       RK2928_CLKGATE_CON(10), 1, GFLAGS),
        GATE(SCLK_PVTM_FUNC, "clk_pvtm_func", "xin24m", 0,
-                       RK2928_CLKGATE_CON(10), 8, GFLAGS),
+                       RK2928_CLKGATE_CON(10), 2, GFLAGS),
        GATE(SCLK_MIPI_24M, "clk_mipi_24m", "xin24m", CLK_IGNORE_UNUSED,
-                       RK2928_CLKGATE_CON(10), 8, GFLAGS),
+                       RK2928_CLKGATE_CON(2), 15, GFLAGS),
 
        COMPOSITE(SCLK_SDMMC, "sclk_sdmmc0", mux_mmc_src_p, 0,
                        RK2928_CLKSEL_CON(11), 6, 2, MFLAGS, 0, 6, DFLAGS,
@@ -541,7 +541,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
        GATE(0, "pclk_grf", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 4, GFLAGS),
        GATE(0, "pclk_mipiphy", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 0, GFLAGS),
 
-       GATE(0, "pclk_pmu", "pclk_pmu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 2, GFLAGS),
+       GATE(0, "pclk_pmu", "pclk_pmu_pre", 0, RK2928_CLKGATE_CON(9), 2, GFLAGS),
        GATE(0, "pclk_pmu_niu", "pclk_pmu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 3, GFLAGS),
 
        /* PD_MMC */
@@ -577,6 +577,8 @@ static const char *const rk3128_critical_clocks[] __initconst = {
        "aclk_peri",
        "hclk_peri",
        "pclk_peri",
+       "pclk_pmu",
+       "sclk_timer5",
 };
 
 static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device_node *np)
index 7afc21dc374efc4bdeed813b6a2c3db9f23be0ce..23835001e8bdb5007efc9b1e66cd8c9557fd6de1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Samsung Clock specific Makefile
 #
index e40b77583c476f4cb413b34a7c6f2a734895efec..d8d3cb67b4029ac58c905fcae097a2c6957a9f22 100644 (file)
@@ -294,6 +294,18 @@ static const struct samsung_clk_reg_dump src_mask_suspend_e4210[] = {
 #define PLL_ENABLED    (1 << 31)
 #define PLL_LOCKED     (1 << 29)
 
+static void exynos4_clk_enable_pll(u32 reg)
+{
+       u32 pll_con = readl(reg_base + reg);
+       pll_con |= PLL_ENABLED;
+       writel(pll_con, reg_base + reg);
+
+       while (!(pll_con & PLL_LOCKED)) {
+               cpu_relax();
+               pll_con = readl(reg_base + reg);
+       }
+}
+
 static void exynos4_clk_wait_for_pll(u32 reg)
 {
        u32 pll_con;
@@ -315,6 +327,9 @@ static int exynos4_clk_suspend(void)
        samsung_clk_save(reg_base, exynos4_save_pll,
                                ARRAY_SIZE(exynos4_clk_pll_regs));
 
+       exynos4_clk_enable_pll(EPLL_CON0);
+       exynos4_clk_enable_pll(VPLL_CON0);
+
        if (exynos4_soc == EXYNOS4210) {
                samsung_clk_save(reg_base, exynos4_save_soc,
                                        ARRAY_SIZE(exynos4210_clk_save));
index 376217f3bf8fc1aa6096c7ff316ebf9d8538b6f2..cb871e30a1758da6a8ed6cfd2e5445e322b09abc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define SIRFSOC_CLKC_CLK_EN0    0x0000
 #define SIRFSOC_CLKC_CLK_EN1    0x0004
 #define SIRFSOC_CLKC_REF_CFG    0x0020
index 01bc3854a058f03c2613b7d84b09abc53629c0c8..2fb56941795db42795aa6babdae83ef856e80572 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define SIRFSOC_CLKC_CLK_EN0    0x0000
 #define SIRFSOC_CLKC_CLK_EN1    0x0004
 #define SIRFSOC_CLKC_REF_CFG    0x0014
index d8bb239753a4747261c9ead8f8eb57cf68459e5e..9146c20fe21f41936ffd91ee387c712e5702e93e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += clk.o
 obj-y += clk-gate.o
 obj-y += clk-pll.o
index cdb425d3b8eef72c09b440ec1d8e6ca4fdc419f4..d7e75d2d42dfd4da2a313de88d3731ab4438c4e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # SPEAr Clock specific Makefile
 #
index f7ec2d9139d63f5dcf87f714665d8cde2c643452..44302fc7ca96b0bbd6b608b06bae7cfb0fb26d3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /************************************************************************
 File  : Clock H/w specific Information
 
index 85a0633c1eac2554cfddca0b202eb5f81cc9c826..d1c2fa93ddd9bcf782829245545c35db05cfd06d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Common objects
 lib-$(CONFIG_SUNXI_CCU)                += ccu_common.o
 lib-$(CONFIG_SUNXI_CCU)                += ccu_mmc_timing.o
index f9c37b987d72b560d096faf7b24356863fd17cbc..6b30b0c10807e7583a32cf48374585bae1d1bedc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CCU_MULT_H_
 #define _CCU_MULT_H_
 
index f20c0bd62a47fb4d34af81fa7bd521ef4b392eb1..f165395effb5a560af56334a7a41e6adf293e242 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CCU_MUX_H_
 #define _CCU_MUX_H_
 
index 39d2044a1f49ced406f4a8748846672f35069906..be88368b48a1c1046ee82b3a343eed9c059244ac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for sunxi specific clk
 #
index 1e63c5b2d5f4cb6866127100be2274a7095641cd..824f746b2567396b11d4ffffefa5b65ad3cefc94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SUNXI_CLK_FACTORS_H
 #define __MACH_SUNXI_CLK_FACTORS_H
 
index 7626d2194b96a98355b77f7bf83ddfcfa66dd638..4d5e14142e15b9008f67897b70d2e4f3c0bb4f20 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2015 Chen-Yu Tsai
  *
index 4be8af28ee61061e02922801beca10a026b181e2..b71692391bd6c1e435c4cd95407375b2a66fb816 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                                  += clk.o
 obj-y                                  += clk-audio-sync.o
 obj-y                                  += clk-dfll.o
index 689f344377a7aad3604be95f457b27a7585547bb..11ee5f9ce99e134a73851d0a5709114d0e0aa1a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides IDs for clocks common between several Tegra SoCs
  */
index edb9f471e525c55f7119f9da88bb20d614352742..a2293ee09440bdddc26dffc3b934dba290a863d2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifeq ($(CONFIG_ARCH_OMAP2PLUS), y)
 
 obj-y                                  += clk.o autoidle.o clockdomain.o
index 665d1d65a90e5a39084b2ec79eab717e9aa0fe95..e5715abef1806ad2ab4324e4456e2c28d87536da 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y  += clk-uniphier-core.o
 
 obj-y  += clk-uniphier-cpugear.o
index 0e396f3da526df46ab9d685c26e7a3cc78b1872c..07f3b91a7daf36f3f15873626312c68707709484 100644 (file)
@@ -233,9 +233,9 @@ const struct uniphier_clk_data uniphier_pxs3_sys_clk_data[] = {
        UNIPHIER_LD20_SYS_CLK_SD,
        UNIPHIER_LD11_SYS_CLK_NAND(2),
        UNIPHIER_LD11_SYS_CLK_EMMC(4),
-       UNIPHIER_CLK_GATE("usb30", 12, NULL, 0x2104, 4),        /* =GIO0 */
-       UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x2104, 5),      /* =GIO1 */
-       UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x2104, 6),      /* =GIO1-1 */
+       UNIPHIER_CLK_GATE("usb30", 12, NULL, 0x210c, 4),        /* =GIO0 */
+       UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x210c, 5),      /* =GIO1 */
+       UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x210c, 6),      /* =GIO1-1 */
        UNIPHIER_CLK_GATE("usb30-phy0", 16, NULL, 0x210c, 16),
        UNIPHIER_CLK_GATE("usb30-phy1", 17, NULL, 0x210c, 18),
        UNIPHIER_CLK_GATE("usb30-phy2", 18, NULL, 0x210c, 20),
index f3baef29859c46cd927d6bbf299a4cd5fe62e95d..fedc083dc8beda67140e252b406123b9c980ea6c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ux500 clocks
 #
index 5add02ebec5d0af809b1a6c5c2eae4481217d634..e36ca1a20e90862b1958e25c10d82a5aff1b4a13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * struct clk_icst_desc - descriptor for the ICST VCO
  * @params: ICST parameters
index dbc1ad14515ede462b1ae4053d5834a530543374..72711f1491e3ee14e67beacc7c4b9e8688e9e07d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TIMER_OF)         += timer-of.o
 obj-$(CONFIG_TIMER_PROBE)      += timer-probe.o
 obj-$(CONFIG_ATMEL_PIT)                += timer-atmel-pit.o
index a1df588343f2dac1fb1c6acb8f579f3688ad6938..1de8cac99a0e93b21d38f5c23f29739ec06caab7 100644 (file)
@@ -117,7 +117,8 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
        /* Turn off the clock (and clear the event) */
        disable_timer(cs5535_event_clock);
 
-       if (clockevent_state_shutdown(&cs5535_clockevent))
+       if (clockevent_state_detached(&cs5535_clockevent) ||
+           clockevent_state_shutdown(&cs5535_clockevent))
                return IRQ_HANDLED;
 
        /* Clear the counter */
index dfbd4f8051cbecce1ff7c1c84cfaef26d4f76f50..86ca91451b2ece3091fe535d940ace7a8bd46ef7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  H8/300 16bit Timer driver
  *
index f6ffb0cef09141728a48c4f400bf997f3fda0b7c..1d740a8c42ab32ed9d36dd6d38635d6032a48215 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/arch/h8300/kernel/cpu/timer/timer8.c
  *
index 45a8d17dac1e816775c6d70c8e4b1bf0e096ab9e..17d4ab0f6ad1914da5703d6e59a8a2ec7bcf5339 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  H8S TPU Driver
  *
index 64f6490740d78b19b58f31178554630542685fc4..9c38895542f4abb5bff8c487ff22701e008443a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * i8253 PIT clocksource
  */
index 6a20dc8b253f4c66981e39bec82f1e2634c50f41..9a7d7f0f23feae971f1f8d959b66578e9c59833e 100644 (file)
@@ -43,7 +43,7 @@ static int numachip2_set_next_event(unsigned long delta, struct clock_event_devi
        return 0;
 }
 
-static struct clock_event_device numachip2_clockevent = {
+static const struct clock_event_device numachip2_clockevent __initconst = {
        .name            = "numachip2",
        .rating          = 400,
        .set_next_event  = numachip2_set_next_event,
index 6a8d9838ce33b28a97bba302bfdd304a685466d7..3f94e454ef9995cd8440c4bb1ec79411bd768a08 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/clocksource.h>
 #include <linux/sched_clock.h>
 #include <linux/of_address.h>
index 59e8aee0ec16dcf68d2dae5ac8959c4778e3f2d0..9de47d4d2d9ef9338d87bf4c45f4695df7b1702c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
index 66dd909960c69fd63c9ef465a9ddfb735d12ae4b..cdf23b62868820adf8463a2ac494d96fea6cd905 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Faraday Technology FTTMR010 timer driver
  * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
index 2ff64d9d4fb31a3a10a85361d8f5b3b33039f76d..62d24690ba0205df997f588207bfe3e9b649c325 100644 (file)
@@ -36,8 +36,8 @@ static u64 notrace integrator_read_sched_clock(void)
        return -readl(sched_clk_base + TIMER_VALUE);
 }
 
-static int integrator_clocksource_init(unsigned long inrate,
-                                      void __iomem *base)
+static int __init integrator_clocksource_init(unsigned long inrate,
+                                             void __iomem *base)
 {
        u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
        unsigned long rate = inrate;
index e0d727255f728d6b3dddc60f57c8d733e913629a..c6d995ab93d59959fe4a54d0a753a07be58bc05c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TIMER_OF_H__
 #define __TIMER_OF_H__
 
index 050d88561e9c6b346259ff9cb476ea798cf57834..b2037eb94a41485b6b08bd16ee10e62cabe3bddd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ARM timer implementation, found in Integrator, Versatile and Realview
  * platforms.  Not all platforms support all registers and bits in these
index c7af9b2a255e1914fafd89d5bcfe2032c8db5b07..812f9e0d01a343a1477ecc91fee0fbaa353fb26d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # CPUfreq core
 obj-$(CONFIG_CPU_FREQ)                 += cpufreq.o freq_table.o
 
index a020da7940d6395a326d5c2ddb6dd01c8f5835e3..a753c50e9e412ea96cb69fa454e81e084a3016be 100644 (file)
@@ -106,6 +106,22 @@ static const struct of_device_id whitelist[] __initconst = {
  * platforms using "operating-points-v2" property.
  */
 static const struct of_device_id blacklist[] __initconst = {
+       { .compatible = "calxeda,highbank", },
+       { .compatible = "calxeda,ecx-2000", },
+
+       { .compatible = "marvell,armadaxp", },
+
+       { .compatible = "nvidia,tegra124", },
+
+       { .compatible = "st,stih407", },
+       { .compatible = "st,stih410", },
+
+       { .compatible = "sigma,tango4", },
+
+       { .compatible = "ti,am33xx", },
+       { .compatible = "ti,am43", },
+       { .compatible = "ti,dra7", },
+
        { }
 };
 
index 601b88c490cfe2f20a9bbce4f2a1ab65fb4cd9c8..455b4fb78cba64006e75c219ad1f7c2e3692cbb8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/cpufreq.h>
index 22b2cdde74d9b170e175f8352ed7b920cb24170c..4c4b5dd685e3ca4ba7c03d2fd4d6c3dbe83cd1c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/cpufreq.h>
index 3eace725ccd6c6c20c8db9abfaf139b15d41c3cb..9d973519d669169b70c76e144a8c083bf880a818 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ppc_cbe_cpufreq.h
  *
index b29cd339846302402dcee8333765ad670555a2b3..4bf47de6101faca3896966cd4a3214d190568b5c 100644 (file)
@@ -190,7 +190,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
 
 static const struct of_device_id ti_cpufreq_of_match[] = {
        { .compatible = "ti,am33xx", .data = &am3x_soc_data, },
-       { .compatible = "ti,am4372", .data = &am4x_soc_data, },
+       { .compatible = "ti,am43", .data = &am4x_soc_data, },
        { .compatible = "ti,dra7", .data = &dra7_soc_data },
        {},
 };
index 0b67a05a7aae74384ffa1a3e7b5a5e718ef7552e..9d7176cee3d376195a6bbe7ebbe67956e4a5ca52 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for cpuidle.
 #
index 7080c384ad5de656e8c345a336167624b236a2bb..52a75053ee0312146e0ab879bc351b46153faee7 100644 (file)
@@ -104,13 +104,13 @@ static int __init arm_idle_init(void)
                ret = dt_init_idle_driver(drv, arm_idle_state_match, 1);
                if (ret <= 0) {
                        ret = ret ? : -ENODEV;
-                       goto out_fail;
+                       goto init_fail;
                }
 
                ret = cpuidle_register_driver(drv);
                if (ret) {
                        pr_err("Failed to register cpuidle driver\n");
-                       goto out_fail;
+                       goto init_fail;
                }
 
                /*
@@ -149,6 +149,8 @@ static int __init arm_idle_init(void)
        }
 
        return 0;
+init_fail:
+       kfree(drv);
 out_fail:
        while (--cpu >= 0) {
                dev = per_cpu(cpuidle_devices, cpu);
index 72b5e47286b4b7bb3747fcbf91623259febba0ab..dac8ff6391faac45c773b53aeae64ad28eb96f56 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
index 42896a67aeae38325cbda2acb7ca655c1b43915c..ed6531f075c621156a658cf6a0b51e39bc1dd7cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  cpuidle-powernv - idle state cpuidle driver.
  *  Adapted from drivers/cpuidle/cpuidle-pseries
index e9b3853d93ea3754cd1972c765a2bab2c8bc4e83..a187a39fb86628c958f9fed412de104f4ce8b4a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  cpuidle-pseries - idle state cpuidle driver.
  *  Adapted from drivers/idle/intel_idle.c and
index f87f399b0540c139dad8e58134ebd21e925d4fd9..2965ab32a583f769ea919c30427eb7255b04909a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * cpuidle.h - The internal header file
  */
index 4818134bc65b10acac3433b1b4d6f8a29d5841c7..14ae88cef1deaff4b32fe0158e8e467cc32fa664 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_IDLE_STATES
 #define __DT_IDLE_STATES
 
index 808432b44c6bb0a75997d603077acb0f4097a58e..c00708d04be67513b4fde8a267247f4637fd8423 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
 obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o
 obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
index 7694679802b38528783892d8321f59771bbec289..62f9d3038757d56a453be8e0a141b10a513b71fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_AES_REGS_H__
 #define __ATMEL_AES_REGS_H__
 
index 1b0eba4a2706ee6436801b0ee4ffb2bdfb0f9104..b2b5e634e80f99fa226697ed55753be083d92b0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_SHA_REGS_H__
 #define __ATMEL_SHA_REGS_H__
 
index f86734d0fda4eeafc3bb5cf9993e703bf88bad54..fbd905720dfa002f85c4ff1d995c6feb6ed0334c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_TDES_REGS_H__
 #define __ATMEL_TDES_REGS_H__
 
index d9fbbf01062bc84f17001808ea6060c8fa7d7110..0f9754e077191e07f3ad985ad2897822f99a932c 100644 (file)
@@ -349,8 +349,6 @@ struct artpec6_crypto_aead_req_ctx {
 /* The crypto framework makes it hard to avoid this global. */
 static struct device *artpec6_crypto_dev;
 
-static struct dentry *dbgfs_root;
-
 #ifdef CONFIG_FAULT_INJECTION
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_status_read);
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_dma_array_full);
@@ -2984,6 +2982,8 @@ struct dbgfs_u32 {
        char *desc;
 };
 
+static struct dentry *dbgfs_root;
+
 static void artpec6_crypto_init_debugfs(void)
 {
        dbgfs_root = debugfs_create_dir("artpec6_crypto", NULL);
index e36aeacd763596e76ce9eac46e3a1edd5f5443c8..1eb852765469e6633a0af44e3d6ed26ad52234ec 100644 (file)
@@ -1,6 +1,7 @@
 config CRYPTO_DEV_FSL_CAAM
        tristate "Freescale CAAM-Multicore driver backend"
        depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
+       select SOC_BUS
        help
          Enables the driver module for Freescale's Cryptographic Accelerator
          and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
@@ -141,10 +142,6 @@ config CRYPTO_DEV_FSL_CAAM_RNG_API
          To compile this as a module, choose M here: the module
          will be called caamrng.
 
-config CRYPTO_DEV_FSL_CAAM_IMX
-       def_bool SOC_IMX6 || SOC_IMX7D
-       depends on CRYPTO_DEV_FSL_CAAM
-
 config CRYPTO_DEV_FSL_CAAM_DEBUG
        bool "Enable debug output in CAAM driver"
        depends on CRYPTO_DEV_FSL_CAAM
index 9e2e98856b9b714e60413f7d08fc6c5c914f70af..cb652ee7dfc81e5f2b55bb2bcce4651d485a5808 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the CAAM backend and dependent components
 #
index 8731e4a7ff05274680dae6fdf56eb950e64ef926..e412ec8f7005c48c089721c0c285b314e9d813e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared descriptors for aead, ablkcipher algorithms
  *
index 87ab75e9df43d6b055a0080316db9166e5cf0f81..fd145c46eae17a8928749df2b4e3bcf26a400730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * caam - Freescale FSL CAAM support for Public Key Cryptography descriptors
  *
index 7149cd2492e065f5d7262480257b8946127b860f..5f2f1b288d3743e677361e484811c1366bc89a7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2008-2011 Freescale Semiconductor, Inc.
  */
index dacb53fb690e9583323500333de5d74be3af20f5..027e121c6f70aa9214a29692e8a3ef1e6d886496 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/device.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
+#include <linux/sys_soc.h>
 
 #include "compat.h"
 #include "regs.h"
@@ -19,6 +20,8 @@ bool caam_little_end;
 EXPORT_SYMBOL(caam_little_end);
 bool caam_dpaa2;
 EXPORT_SYMBOL(caam_dpaa2);
+bool caam_imx;
+EXPORT_SYMBOL(caam_imx);
 
 #ifdef CONFIG_CAAM_QI
 #include "qi.h"
@@ -28,19 +31,11 @@ EXPORT_SYMBOL(caam_dpaa2);
  * i.MX targets tend to have clock control subsystems that can
  * enable/disable clocking to our device.
  */
-#ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_IMX
 static inline struct clk *caam_drv_identify_clk(struct device *dev,
                                                char *clk_name)
 {
-       return devm_clk_get(dev, clk_name);
+       return caam_imx ? devm_clk_get(dev, clk_name) : NULL;
 }
-#else
-static inline struct clk *caam_drv_identify_clk(struct device *dev,
-                                               char *clk_name)
-{
-       return NULL;
-}
-#endif
 
 /*
  * Descriptor to instantiate RNG State Handle 0 in normal mode and
@@ -430,6 +425,10 @@ static int caam_probe(struct platform_device *pdev)
 {
        int ret, ring, gen_sk, ent_delay = RTSDCTL_ENT_DLY_MIN;
        u64 caam_id;
+       static const struct soc_device_attribute imx_soc[] = {
+               {.family = "Freescale i.MX"},
+               {},
+       };
        struct device *dev;
        struct device_node *nprop, *np;
        struct caam_ctrl __iomem *ctrl;
@@ -451,6 +450,8 @@ static int caam_probe(struct platform_device *pdev)
        dev_set_drvdata(dev, ctrlpriv);
        nprop = pdev->dev.of_node;
 
+       caam_imx = (bool)soc_device_match(imx_soc);
+
        /* Enable clocking */
        clk = caam_drv_identify_clk(&pdev->dev, "ipg");
        if (IS_ERR(clk)) {
index 7e7bf68c9ef5e469302e609492ff6b7641e2abe5..be693a2cc25ef1d9082209b0f664e1692270f3bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM control-plane driver backend public-level include definitions
  *
index 2e6766a1573f3b2eb789bb7824eac93abad0a3ec..6633fbb80e74c70ee5f78c32a49bc486d90dcb27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM descriptor composition header
  * Definitions to support CAAM descriptor instruction generation
index d8e83ca104e02f3a16e70554c8d729f0138a5162..ba1ca0806f0afe6c68d4d08d29cb80c154c61a8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * caam descriptor construction helper functions
  *
index 3d639f3b45aa0d33b86e1ee0e96047ee6158fb4e..8da88beb1abbe1def7582add0e49e88023c430dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CAAM Error Reporting
  *
index 250e1a21c473e17744db32a598ac1b8b15a88755..5aa332bac4b06fc607e44cbb015fca41646c989c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM Error Reporting code header
  *
index a52361258d3a0d0081d0df9c758bea616f8e3da8..91f1107276e56446ff9866b82ef1f2eca0dfb430 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM/SEC 4.x driver backend
  * Private/internal definitions between modules
index 97113a6d6c58f500cd7aeb64a4d506ebfc0ca688..eab611530f3602f0aae377dcae423dea0ae46413 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM public-level include definitions for the JobR backend
  *
index c425d4adaf2af69a85ea830a78f41238c980720d..8c79c3a153dc2d829708d5c41197495c5893b81b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CAAM/SEC 4.x functions for handling key-generation jobs
  *
index 4628f389eb64d51b88e1dda24b0c42ea90018f9b..5db055c25bd29b8247a06c2e308706415fd0024d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM/SEC 4.x definitions for handling key-generation jobs
  *
index 31e59963f4d227f0645e9ed2858c17d92b1e5590..810f0bef0652b38c299d2c5888c1e90265090a73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM Protocol Data Block (PDB) definition header file
  *
index 9e2ce6fe2e43f7717e462f558c31cf997a4888ad..2a8d87ea94bf46d24f813790110a33d61342bbaf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * caam - Freescale FSL CAAM support for Public Key Cryptography descriptors
  *
index e4cf00014233121d7086cb81bf551d1bc1528c7e..f9a44f485aac3341a4a15e67dab55a323841dbb5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CAAM/SEC 4.x QI transport/backend driver
  * Queue Interface backend functionality
index ecb21f207637bda96aebd0a410a6de58be5bcc5c..357b69f570725bb50749ca92449afaa066f475d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Public definitions for the CAAM/QI (Queue Interface) backend.
  *
index 2b5efff9ec3caa69a49bd48b1121aa680e08a2c1..fee363865d88ea4faf4c82b7ece86e63b8a9c963 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM hardware register-level view
  *
@@ -67,6 +68,7 @@
  */
 
 extern bool caam_little_end;
+extern bool caam_imx;
 
 #define caam_to_cpu(len)                               \
 static inline u##len caam##len ## _to_cpu(u##len val)  \
@@ -154,13 +156,10 @@ static inline u64 rd_reg64(void __iomem *reg)
 #else /* CONFIG_64BIT */
 static inline void wr_reg64(void __iomem *reg, u64 data)
 {
-#ifndef CONFIG_CRYPTO_DEV_FSL_CAAM_IMX
-       if (caam_little_end) {
+       if (!caam_imx && caam_little_end) {
                wr_reg32((u32 __iomem *)(reg) + 1, data >> 32);
                wr_reg32((u32 __iomem *)(reg), data);
-       } else
-#endif
-       {
+       } else {
                wr_reg32((u32 __iomem *)(reg), data >> 32);
                wr_reg32((u32 __iomem *)(reg) + 1, data);
        }
@@ -168,41 +167,40 @@ static inline void wr_reg64(void __iomem *reg, u64 data)
 
 static inline u64 rd_reg64(void __iomem *reg)
 {
-#ifndef CONFIG_CRYPTO_DEV_FSL_CAAM_IMX
-       if (caam_little_end)
+       if (!caam_imx && caam_little_end)
                return ((u64)rd_reg32((u32 __iomem *)(reg) + 1) << 32 |
                        (u64)rd_reg32((u32 __iomem *)(reg)));
-       else
-#endif
-               return ((u64)rd_reg32((u32 __iomem *)(reg)) << 32 |
-                       (u64)rd_reg32((u32 __iomem *)(reg) + 1));
+
+       return ((u64)rd_reg32((u32 __iomem *)(reg)) << 32 |
+               (u64)rd_reg32((u32 __iomem *)(reg) + 1));
 }
 #endif /* CONFIG_64BIT  */
 
+static inline u64 cpu_to_caam_dma64(dma_addr_t value)
+{
+       if (caam_imx)
+               return (((u64)cpu_to_caam32(lower_32_bits(value)) << 32) |
+                        (u64)cpu_to_caam32(upper_32_bits(value)));
+
+       return cpu_to_caam64(value);
+}
+
+static inline u64 caam_dma64_to_cpu(u64 value)
+{
+       if (caam_imx)
+               return (((u64)caam32_to_cpu(lower_32_bits(value)) << 32) |
+                        (u64)caam32_to_cpu(upper_32_bits(value)));
+
+       return caam64_to_cpu(value);
+}
+
 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
-#ifdef CONFIG_SOC_IMX7D
-#define cpu_to_caam_dma(value) \
-               (((u64)cpu_to_caam32(lower_32_bits(value)) << 32) | \
-                 (u64)cpu_to_caam32(upper_32_bits(value)))
-#define caam_dma_to_cpu(value) \
-               (((u64)caam32_to_cpu(lower_32_bits(value)) << 32) | \
-                 (u64)caam32_to_cpu(upper_32_bits(value)))
-#else
-#define cpu_to_caam_dma(value) cpu_to_caam64(value)
-#define caam_dma_to_cpu(value) caam64_to_cpu(value)
-#endif /* CONFIG_SOC_IMX7D */
+#define cpu_to_caam_dma(value) cpu_to_caam_dma64(value)
+#define caam_dma_to_cpu(value) caam_dma64_to_cpu(value)
 #else
 #define cpu_to_caam_dma(value) cpu_to_caam32(value)
 #define caam_dma_to_cpu(value) caam32_to_cpu(value)
-#endif /* CONFIG_ARCH_DMA_ADDR_T_64BIT  */
-
-#ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_IMX
-#define cpu_to_caam_dma64(value) \
-               (((u64)cpu_to_caam32(lower_32_bits(value)) << 32) | \
-                (u64)cpu_to_caam32(upper_32_bits(value)))
-#else
-#define cpu_to_caam_dma64(value) cpu_to_caam64(value)
-#endif
+#endif /* CONFIG_ARCH_DMA_ADDR_T_64BIT */
 
 /*
  * jr_outentry
index 936b1b63005815a2eff3d7541d72043ae4707aca..e586ffab83585a60e40c6b55206945abc5067ac4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * CAAM/SEC 4.x functions for using scatterlists in caam driver
  *
index 5af2e4368267f70d0403068b22e07368a0e30842..45b7379e8e30b0252794676c99ebb31d91c86385 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_NITROX_CNN55XX) += n5pf.o
 
 n5pf-objs := nitrox_main.o \
index ce330278ef8a4d66449dba92d3b76aa6f620287b..2ae6124e5da673e1d73fe0141beed7adaf5e5360 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/crypto.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 4888c7823a5fb07cf999e06ed1d6a03765c30f08..312f72801af6166b08587889d34ec254c22c0214 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NITROX_COMMON_H
 #define __NITROX_COMMON_H
 
index 30b04c4c607639ca03524239d0de303f8895f97e..9dcb7fdbe0a795bd021e49cc15f2a31cb711c118 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NITROX_CSR_H
 #define __NITROX_CSR_H
 
index 57858b04f165df4adbbcd3f83fe1f1bdea198af0..9a476bb6d4c7eace932edb09b040098eccee7aa0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NITROX_DEV_H
 #define __NITROX_DEV_H
 
index f0655f82fa7d9fccc7ae2c852d5008d4d2d2170c..bf9900bc4804fed8451b16bb21deb02824290d04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/delay.h>
 
 #include "nitrox_dev.h"
index 71f934871a89a897d68f935f3ec6cd8c69be5664..dbead5f45df31ec3c6e0b94667fc60993186ec83 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/printk.h>
 #include <linux/slab.h>
index b4a391adb9b676a7b3ef5a33f858797c605c1e5f..4fdc921ba611b94b9a8d14e3a657a63497a4cce9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cpumask.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmapool.h>
index 74f4c20dc87de7193c9167ed13fa77a69d41b742..d091b6f5f5dd697d56ec01e1afd2449d5d03127e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NITROX_REQ_H
 #define __NITROX_REQ_H
 
index 4bb4377c5ac013778271e3d79731f8d7545bacfc..4addc238a6ef361db59cf49359d96ea8fae98f9a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/gfp.h>
 #include <linux/workqueue.h>
 #include <crypto/internal/skcipher.h>
index b2f3baaff757bbadfd6afc67d62210bf4752df58..020d189d793ded90f0637ebfdb226dc15629b8f7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Cavium's ZIP Driver.
 #
index 57f8debfcfb38218c21cfdc0e1b7fb5412a60759..c4ce726b931e3d0b05daea09aafb49e280c89c41 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_CCP_DD) += ccp.o
 ccp-objs  := sp-dev.o sp-platform.o
 ccp-$(CONFIG_CRYPTO_DEV_SP_CCP) += ccp-dev.o \
index d2207ac5ba19cdd357ab5bbae3a128d1fa92183e..5438552bc6d783b57a23763e64c59afb90c340ae 100644 (file)
@@ -386,7 +386,7 @@ static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm)
        struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
        struct safexcel_crypto_priv *priv = ctx->priv;
        struct skcipher_request req;
-       struct safexcel_inv_result result = { 0 };
+       struct safexcel_inv_result result = {};
        int ring = ctx->base.ring;
 
        memset(&req, 0, sizeof(struct skcipher_request));
index 3f819399cd95519a9956ed1d3ecba76fa2aa62b4..3980f946874fa08b64288b5d8b04bcac9134a0ad 100644 (file)
@@ -419,7 +419,7 @@ static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm)
        struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm);
        struct safexcel_crypto_priv *priv = ctx->priv;
        struct ahash_request req;
-       struct safexcel_inv_result result = { 0 };
+       struct safexcel_inv_result result = {};
        int ring = ctx->base.ring;
 
        memset(&req, 0, sizeof(struct ahash_request));
index b7872f62f67475fdc6889420c38de4f8418ffafd..0032e3bf46ee436ea8587376c39fce15ac4e4762 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MARVELL_CESA_H__
 #define __MARVELL_CESA_H__
 
index 9249d3ed184bbc403c3c48f6ca5198b0037c846e..0be3f0aa4afd52e3f78ef5b8235682dd0d8b4555 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MV_CRYPTO_H__
 #define __MV_CRYPTO_H__
 
index f7c793745a1e279075f2ef6f5d4b583a8a58db39..9a67dbf340f45a5c264a0768143bb2c7405fdd62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* n2_asm.S: Hypervisor calls for NCS support.
  *
  * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
index 4bcbbeae98f51da0891df0c27cd957f8a0059243..2406763b03062062ad45c1ea4df3243d718db170 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _N2_CORE_H
 #define _N2_CORE_H
 
index b727821c8ed4eb9277113859e5530692ce86ed19..015155da59c29f4e0d425f4cd68099efeac4a3e5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_NX_ENCRYPT) += nx-crypto.o
 nx-crypto-objs := nx.o \
                  nx_debugfs.o \
index bb2f317926838e01e09318ccb2593d380b9119ec..b66f19ac600f2a1df6c49e12624c564ce8ba9e57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __NX_842_H__
 #define __NX_842_H__
index 9347878d4f30c13a06ee6e781e72f1c04ef1d7c2..c3e54af18645c930220ae2801525ff490c89704b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __NX_H__
 #define __NX_H__
index a304f956d6f8d0cfc41cc0ecd4bbd0a333660234..493f8490ff942d3a6a2d8255be91acca5cf5a1da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __NX_CSBCPB_H__
 #define __NX_CSBCPB_H__
index 8265106f1c8ed3aceb9f3ec529a1cd20cfdf37e5..7dd15e751d02b9e1acf368b5be920b615ab4a3f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_QAT) += qat_common/
 obj-$(CONFIG_CRYPTO_DEV_QAT_DH895xCC) += qat_dh895xcc/
 obj-$(CONFIG_CRYPTO_DEV_QAT_C3XXX) += qat_c3xxx/
index 92fb6ffdc062295e586aa37378eac8a465b4f0b0..47a8e3d8b81aca5aaab2a50c9113bca3f8e55e57 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_QAT) += intel_qat.o
 intel_qat-objs := adf_cfg.o \
        adf_isr.o \
index 348dc3173afa5b9cb130a36a7b57669cc3abbe67..19a7f899acff96289915ec5e6dc018cd65952283 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_QCE) += qcrypto.o
 qcrypto-objs := core.o \
                common.o \
index ab6a1b4c40f0cf4a8799c283c1cd893398a83bc6..d5fb4013fb42a23d520009df3e9f7a524eb2a5f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RK3288_CRYPTO_H__
 #define __RK3288_CRYPTO_H__
 
index b585ce54a8028ccfabd61c8a0e4a768f17328345..4835dd4a9e5075e3c652ea78072c515fc5537fd1 100644 (file)
@@ -553,9 +553,9 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
 {
        struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req);
        struct scatterlist sg[1], *tsg;
-       int err = 0, len = 0, reg, ncp;
+       int err = 0, len = 0, reg, ncp = 0;
        unsigned int i;
-       const u32 *buffer = (const u32 *)rctx->buffer;
+       u32 *buffer = (void *)rctx->buffer;
 
        rctx->sg = hdev->req->src;
        rctx->total = hdev->req->nbytes;
@@ -620,10 +620,13 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
                reg |= HASH_CR_DMAA;
                stm32_hash_write(hdev, HASH_CR, reg);
 
-               for (i = 0; i < DIV_ROUND_UP(ncp, sizeof(u32)); i++)
-                       stm32_hash_write(hdev, HASH_DIN, buffer[i]);
-
-               stm32_hash_set_nblw(hdev, ncp);
+               if (ncp) {
+                       memset(buffer + ncp, 0,
+                              DIV_ROUND_UP(ncp, sizeof(u32)) - ncp);
+                       writesl(hdev->io_base + HASH_DIN, buffer,
+                               DIV_ROUND_UP(ncp, sizeof(u32)));
+               }
+               stm32_hash_set_nblw(hdev, DIV_ROUND_UP(ncp, sizeof(u32)));
                reg = stm32_hash_read(hdev, HASH_STR);
                reg |= HASH_STR_DCAL;
                stm32_hash_write(hdev, HASH_STR, reg);
index 79791c690858fb1cea4aa057fb726efe46160df9..dff88838dce762c33ca7e898420f051c3a2f80cb 100644 (file)
@@ -1756,9 +1756,9 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,
                req_ctx->swinit = 0;
        } else {
                desc->ptr[1] = zero_entry;
-               /* Indicate next op is not the first. */
-               req_ctx->first = 0;
        }
+       /* Indicate next op is not the first. */
+       req_ctx->first = 0;
 
        /* HMAC key */
        if (ctx->keylen)
@@ -1769,7 +1769,7 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,
 
        sg_count = edesc->src_nents ?: 1;
        if (is_sec1 && sg_count > 1)
-               sg_copy_to_buffer(areq->src, sg_count, edesc->buf, length);
+               sg_copy_to_buffer(req_ctx->psrc, sg_count, edesc->buf, length);
        else
                sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count,
                                      DMA_TO_DEVICE);
@@ -3057,7 +3057,8 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
                t_alg->algt.alg.hash.final = ahash_final;
                t_alg->algt.alg.hash.finup = ahash_finup;
                t_alg->algt.alg.hash.digest = ahash_digest;
-               t_alg->algt.alg.hash.setkey = ahash_setkey;
+               if (!strncmp(alg->cra_name, "hmac", 4))
+                       t_alg->algt.alg.hash.setkey = ahash_setkey;
                t_alg->algt.alg.hash.import = ahash_import;
                t_alg->algt.alg.hash.export = ahash_export;
 
index dd342c947ff91929ab120f9f3ddb96ad9da2d412..cbfccccfa135d63367739c621686ceb2958ddb83 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_VIRTIO) += virtio_crypto.o
 virtio_crypto-objs := \
        virtio_crypto_algs.o \
index 55f7c392582f648cff1b7466350d4b5554efe00c..cab32cfec9c45d0e90d930404462743beab2d542 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
 
index 01972e16a6c0be8bd06855d083e724148c6a9836..349646b73754f827622194fc6a6d3d065b981c1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/types.h>
 #include <crypto/aes.h>
 
index b18e67d0e065d897bd34d4e2b255056293a17550..36db2ef09e5bf52047ee368c665bbcefbd2b0412 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 
 # PowerPC assembler distiller by <appro>.
 
index dc74225304623253c129afcb86f468ae3bd3a8e8..574286fac87ce71b88e61bf5935e3905e226638b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DAX) += dax.o
 obj-$(CONFIG_DEV_DAX) += device_dax.o
 obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem.o
index fbff40a508a437edc4ec2629a3450a380340908f..32b8d4d3f12c742a56c00ed74618fe9c90172da4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PM_DEVFREQ)       += devfreq.o
 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o
 obj-$(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)      += governor_simpleondemand.o
index 0d0677f2391633113406de6293164e77d8341b5d..92e78d16b476550c365baad796e82a50f7ba0191 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Code to support devices on the DIO and DIO-II bus
  * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk>
  * Copyright (C) 2004 Jochen Friedrich <jochen@scram.de>
index 66fb40d0ebdbbec521499cd58cf2e1d55c195878..03830634e141e70782c96ca42945f30babc0283a 100644 (file)
@@ -383,7 +383,7 @@ err_put_fd:
        return err;
 }
 
-static void sync_fill_fence_info(struct dma_fence *fence,
+static int sync_fill_fence_info(struct dma_fence *fence,
                                 struct sync_fence_info *info)
 {
        strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
@@ -399,6 +399,8 @@ static void sync_fill_fence_info(struct dma_fence *fence,
                test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags) ?
                ktime_to_ns(fence->timestamp) :
                ktime_set(0, 0);
+
+       return info->status;
 }
 
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
@@ -424,8 +426,12 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
         * sync_fence_info and return the actual number of fences on
         * info->num_fences.
         */
-       if (!info.num_fences)
+       if (!info.num_fences) {
+               info.status = dma_fence_is_signaled(sync_file->fence);
                goto no_fences;
+       } else {
+               info.status = 1;
+       }
 
        if (info.num_fences < num_fences)
                return -EINVAL;
@@ -435,8 +441,10 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
        if (!fence_info)
                return -ENOMEM;
 
-       for (i = 0; i < num_fences; i++)
-               sync_fill_fence_info(fences[i], &fence_info[i]);
+       for (i = 0; i < num_fences; i++) {
+               int status = sync_fill_fence_info(fences[i], &fence_info[i]);
+               info.status = info.status <= 0 ? info.status : status;
+       }
 
        if (copy_to_user(u64_to_user_ptr(info.sync_fence_info), fence_info,
                         size)) {
@@ -446,7 +454,6 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 
 no_fences:
        sync_file_get_name(sync_file, info.name, sizeof(info.name));
-       info.status = dma_fence_is_signaled(sync_file->fence);
        info.num_fences = num_fences;
 
        if (copy_to_user((void __user *)arg, &info, sizeof(info)))
index d13d59ff1b85fabd870fd0bedac6dc36b17060ce..06e468a218ff81eb8a280c5375b7e394a9ae2662 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_INCLUDE_PATH ../../drivers/dma-buf
 #define TRACE_SYSTEM sync_trace
index f08f8de1b567c1f4911cd4216be85cf203debd36..9d0156b502946a63fe93e344dc50fe0680ff7608 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #dmaengine debug flags
 subdir-ccflags-$(CONFIG_DMADEVICES_DEBUG)  := -DDEBUG
 subdir-ccflags-$(CONFIG_DMADEVICES_VDEBUG) += -DVERBOSE_DEBUG
index 32905d5606ac8b90585148e26ace36c2b7352808..55f9c62ee54b063521bfbf0d4b19627b43e8c155 100644 (file)
@@ -212,11 +212,12 @@ struct msgdma_device {
 static struct msgdma_sw_desc *msgdma_get_descriptor(struct msgdma_device *mdev)
 {
        struct msgdma_sw_desc *desc;
+       unsigned long flags;
 
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, flags);
        desc = list_first_entry(&mdev->free_list, struct msgdma_sw_desc, node);
        list_del(&desc->node);
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, flags);
 
        INIT_LIST_HEAD(&desc->tx_list);
 
@@ -306,13 +307,14 @@ static dma_cookie_t msgdma_tx_submit(struct dma_async_tx_descriptor *tx)
        struct msgdma_device *mdev = to_mdev(tx->chan);
        struct msgdma_sw_desc *new;
        dma_cookie_t cookie;
+       unsigned long flags;
 
        new = tx_to_desc(tx);
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, flags);
        cookie = dma_cookie_assign(tx);
 
        list_add_tail(&new->node, &mdev->pending_list);
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, flags);
 
        return cookie;
 }
@@ -336,17 +338,18 @@ msgdma_prep_memcpy(struct dma_chan *dchan, dma_addr_t dma_dst,
        struct msgdma_extended_desc *desc;
        size_t copy;
        u32 desc_cnt;
+       unsigned long irqflags;
 
        desc_cnt = DIV_ROUND_UP(len, MSGDMA_MAX_TRANS_LEN);
 
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, irqflags);
        if (desc_cnt > mdev->desc_free_cnt) {
-               spin_unlock_bh(&mdev->lock);
+               spin_unlock_irqrestore(&mdev->lock, irqflags);
                dev_dbg(mdev->dev, "mdev %p descs are not available\n", mdev);
                return NULL;
        }
        mdev->desc_free_cnt -= desc_cnt;
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, irqflags);
 
        do {
                /* Allocate and populate the descriptor */
@@ -397,18 +400,19 @@ msgdma_prep_slave_sg(struct dma_chan *dchan, struct scatterlist *sgl,
        u32 desc_cnt = 0, i;
        struct scatterlist *sg;
        u32 stride;
+       unsigned long irqflags;
 
        for_each_sg(sgl, sg, sg_len, i)
                desc_cnt += DIV_ROUND_UP(sg_dma_len(sg), MSGDMA_MAX_TRANS_LEN);
 
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, irqflags);
        if (desc_cnt > mdev->desc_free_cnt) {
-               spin_unlock_bh(&mdev->lock);
+               spin_unlock_irqrestore(&mdev->lock, irqflags);
                dev_dbg(mdev->dev, "mdev %p descs are not available\n", mdev);
                return NULL;
        }
        mdev->desc_free_cnt -= desc_cnt;
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, irqflags);
 
        avail = sg_dma_len(sgl);
 
@@ -566,10 +570,11 @@ static void msgdma_start_transfer(struct msgdma_device *mdev)
 static void msgdma_issue_pending(struct dma_chan *chan)
 {
        struct msgdma_device *mdev = to_mdev(chan);
+       unsigned long flags;
 
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, flags);
        msgdma_start_transfer(mdev);
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, flags);
 }
 
 /**
@@ -634,10 +639,11 @@ static void msgdma_free_descriptors(struct msgdma_device *mdev)
 static void msgdma_free_chan_resources(struct dma_chan *dchan)
 {
        struct msgdma_device *mdev = to_mdev(dchan);
+       unsigned long flags;
 
-       spin_lock_bh(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, flags);
        msgdma_free_descriptors(mdev);
-       spin_unlock_bh(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, flags);
        kfree(mdev->sw_desq);
 }
 
@@ -682,8 +688,9 @@ static void msgdma_tasklet(unsigned long data)
        u32 count;
        u32 __maybe_unused size;
        u32 __maybe_unused status;
+       unsigned long flags;
 
-       spin_lock(&mdev->lock);
+       spin_lock_irqsave(&mdev->lock, flags);
 
        /* Read number of responses that are available */
        count = ioread32(mdev->csr + MSGDMA_CSR_RESP_FILL_LEVEL);
@@ -698,13 +705,13 @@ static void msgdma_tasklet(unsigned long data)
                 * bits. So we need to just drop these values.
                 */
                size = ioread32(mdev->resp + MSGDMA_RESP_BYTES_TRANSFERRED);
-               status = ioread32(mdev->resp - MSGDMA_RESP_STATUS);
+               status = ioread32(mdev->resp + MSGDMA_RESP_STATUS);
 
                msgdma_complete_descriptor(mdev);
                msgdma_chan_desc_cleanup(mdev);
        }
 
-       spin_unlock(&mdev->lock);
+       spin_unlock_irqrestore(&mdev->lock, flags);
 }
 
 /**
index aed2df2a6580ed8b9b5f28cb00f340ae5bda55ab..8d1b33a2f0a11e62f94f42a14ea409877decf12c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for BestComm & co
 #
index 882ff9448c3bac78b5e1524c405c490bdd285795..501c0b063f852d9a38a619940699d71b146399f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The contents of this file are private to DMA engine drivers, and is not
  * part of the API to be used by DMA engine users.
index 3eebd1ce2c6bb6ade135011a739ab6a3b7c9c426..2b949c2e45045f3afb8c1ef45b4293c3ec11ac42 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DW_DMAC_CORE)     += dw_dmac_core.o
 dw_dmac_core-objs      := core.o
 
index 3879f80a4815cb27ba4329e29510752e34331ba4..a7ea20e7b8e94cd9527d73785578abd599e5029d 100644 (file)
@@ -1143,11 +1143,24 @@ static struct dma_async_tx_descriptor *edma_prep_dma_memcpy(
        struct edma_desc *edesc;
        struct device *dev = chan->device->dev;
        struct edma_chan *echan = to_edma_chan(chan);
-       unsigned int width, pset_len;
+       unsigned int width, pset_len, array_size;
 
        if (unlikely(!echan || !len))
                return NULL;
 
+       /* Align the array size (acnt block) with the transfer properties */
+       switch (__ffs((src | dest | len))) {
+       case 0:
+               array_size = SZ_32K - 1;
+               break;
+       case 1:
+               array_size = SZ_32K - 2;
+               break;
+       default:
+               array_size = SZ_32K - 4;
+               break;
+       }
+
        if (len < SZ_64K) {
                /*
                 * Transfer size less than 64K can be handled with one paRAM
@@ -1169,7 +1182,7 @@ static struct dma_async_tx_descriptor *edma_prep_dma_memcpy(
                 * When the full_length is multibple of 32767 one slot can be
                 * used to complete the transfer.
                 */
-               width = SZ_32K - 1;
+               width = array_size;
                pset_len = rounddown(len, width);
                /* One slot is enough for lengths multiple of (SZ_32K -1) */
                if (unlikely(pset_len == len))
@@ -1217,7 +1230,7 @@ static struct dma_async_tx_descriptor *edma_prep_dma_memcpy(
                }
                dest += pset_len;
                src += pset_len;
-               pset_len = width = len % (SZ_32K - 1);
+               pset_len = width = len % array_size;
 
                ret = edma_config_pset(chan, &edesc->pset[1], src, dest, 1,
                                       width, pset_len, DMA_MEM_TO_MEM);
index 4bfc38b45220a02d6ae5927ce6c19988e198209f..1ae92da88b0c97f5c926871335583f95fa5fbe9e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_QCOM_BAM_DMA) += bam_dma.o
 obj-$(CONFIG_QCOM_HIDMA_MGMT) += hdma_mgmt.o
 hdma_mgmt-objs  := hidma_mgmt.o hidma_mgmt_sys.o
index f1e2fd64f2790798defd255b709c811891335710..7d7c9491ade1216df7430b0f8559369dab4ab1a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # DMA Engine Helpers
 #
index 2f65a8fde21d4f5be2e2a623676047e4674da27f..f1d04b70ee672af4c99dcd21298d03c65898be96 100644 (file)
@@ -262,13 +262,14 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec,
        mutex_lock(&xbar->mutex);
        map->xbar_out = find_first_zero_bit(xbar->dma_inuse,
                                            xbar->dma_requests);
-       mutex_unlock(&xbar->mutex);
        if (map->xbar_out == xbar->dma_requests) {
+               mutex_unlock(&xbar->mutex);
                dev_err(&pdev->dev, "Run out of free DMA requests\n");
                kfree(map);
                return ERR_PTR(-ENOMEM);
        }
        set_bit(map->xbar_out, xbar->dma_inuse);
+       mutex_unlock(&xbar->mutex);
 
        map->xbar_in = (u16)dma_spec->args[0];
 
index 4709c60798482e1e0b276ef35d810a30801111d4..393be3351493fe3dea61b1ebe6d0b23b8ca9cc14 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "amd64_edac.h"
 
 #define EDAC_DCT_ATTR_SHOW(reg)                                                \
index e14977ff95dbb49dcd1038018091f37561cf86d4..d96d6116f0fb70b9275547d19a71f09662eb9400 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "amd64_edac.h"
 
 static ssize_t amd64_inject_section_show(struct device *dev,
index 014871e169ccf2b9ee98824d0172713ffc1ab454..dec88dcea036f5b7672409fb2f2cfd78bc863609 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  * edac_module.h
index 0b6a68673e0e3a977ef3e9d9ecb600125b5dbade..4e9c5e596c6c20890f1c40b997a2d4fbcf9f46b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _EDAC_MCE_AMD_H
 #define _EDAC_MCE_AMD_H
 
index 5369ce957c6d5397146cbbcb71c75aed01ebaa57..a1dd0eaec2d46fd1ce83d21851eb1bc56ec89a0e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux device tree
 
 obj-$(CONFIG_EISA)             += eisa-bus.o
index a73624e7619388b7b9c18aac2e9d3da40ce4d3b4..0888fdeded7230de9ca368e4af3efa3529451211 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 # Makefile for external connector class (extcon) devices
 #
index dddddcfa05873ed9ad8e77779515c509f2499d8e..61358479bfccfc71d0342a5186e22dd57e19d4f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_EXTCON_INTERNAL_H__
 #define __LINUX_EXTCON_INTERNAL_H__
 
index e3870d5c43ddeac5d89b35702b181bbf151ed891..e58c8c7947782f56dfcbac2b9afa3a86d664b98e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux IEEE 1394 implementation
 #
index c07962ead5e47c0b570ff59bc8b64216f8144a66..0f0bed3a4bbb8490315b5c6cf0a08436cf16f8e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FIREWIRE_CORE_H
 #define _FIREWIRE_CORE_H
 
index e48aa6200c722b5b59af71d599b4b2fe3fe59d51..3446c5b772e5974325efc3200e87c98f47960d78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __nosy_user_h
 #define __nosy_user_h
 
index 078ff27f4756aa2009f9a604c4ab5cce0ca9d1c6..4078d69e93f87b29ce2c28f14d860fe04ef23c70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Chip register definitions for PCILynx chipset.  Based on pcilynx.h
  * from the Linux 1394 drivers, but modified a bit so the names here
index ef5e7336da68ddf6af413ecd0cc616a812ae1490..c4d005a9901a8a5fd655c19afb678117f796db48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FIREWIRE_OHCI_H
 #define _FIREWIRE_OHCI_H
 
index a37f12e8d137c3a4a69456c56d9f8b982f70435f..feaa890197f32329fffef8b08ea44785961912ce 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 0329d319d89a0cd6164c1470e5e73506123d4c5f..269501dfba53dbaaf068d5ca07774fd97143bbab 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for linux kernel
 #
index dedf9bde44db244c1be9ee990373787a616114f5..adaa4a964f0c548811dedae5f22e846f76fe44a1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # The stub may be linked into the kernel proper or into a separate boot binary,
 # but in either case, it executes before the kernel does (with MMU disabled) so
@@ -33,13 +34,14 @@ lib-y                               := efi-stub-helper.o gop.o secureboot.o
 lib-$(CONFIG_RESET_ATTACK_MITIGATION) += tpm.o
 
 # include the stub's generic dependencies from lib/ when building for ARM/arm64
-arm-deps := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c sort.c
+arm-deps-y := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c
+arm-deps-$(CONFIG_ARM64) += sort.c
 
 $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
        $(call if_changed_rule,cc_o_c)
 
 lib-$(CONFIG_EFI_ARMSTUB)      += arm-stub.o fdt.o string.o random.o \
-                                  $(patsubst %.c,lib-%.o,$(arm-deps))
+                                  $(patsubst %.c,lib-%.o,$(arm-deps-y))
 
 lib-$(CONFIG_ARM)              += arm32-stub.o
 lib-$(CONFIG_ARM64)            += arm64-stub.o
@@ -90,5 +92,4 @@ quiet_cmd_stubcopy = STUBCPY $@
 # explicitly by the decompressor linker script.
 #
 STUBCOPY_FLAGS-$(CONFIG_ARM)   += --rename-section .data=.data.efistub
-STUBCOPY_RM-$(CONFIG_ARM)      += -R ___ksymtab+sort -R ___kcrctab+sort
 STUBCOPY_RELOC-$(CONFIG_ARM)   := R_ARM_ABS
index 1cb2d1c070c31ba1a80e8e9460d0d102e9dddd74..01a9d78ee4154702e89ab8534727dc1ab66998d4 100644 (file)
@@ -238,7 +238,8 @@ unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
 
        efi_random_get_seed(sys_table);
 
-       if (!nokaslr()) {
+       /* hibernation expects the runtime regions to stay in the same place */
+       if (!IS_ENABLED(CONFIG_HIBERNATION) && !nokaslr()) {
                /*
                 * Randomize the base of the UEFI runtime services region.
                 * Preserve the 2 MB alignment of the region by taking a
@@ -349,7 +350,9 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size,
         * The easiest way to find adjacent regions is to sort the memory map
         * before traversing it.
         */
-       sort(memory_map, map_size / desc_size, desc_size, cmp_mem_desc, NULL);
+       if (IS_ENABLED(CONFIG_ARM64))
+               sort(memory_map, map_size / desc_size, desc_size, cmp_mem_desc,
+                    NULL);
 
        for (l = 0; l < map_size; l += desc_size, prev = in) {
                u64 paddr, size;
@@ -366,7 +369,8 @@ void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size,
                 * a 4k page size kernel to kexec a 64k page size kernel and
                 * vice versa.
                 */
-               if (!regions_are_adjacent(prev, in) ||
+               if ((IS_ENABLED(CONFIG_ARM64) &&
+                    !regions_are_adjacent(prev, in)) ||
                    !regions_have_compatible_memory_type_attrs(prev, in)) {
 
                        paddr = round_down(in->phys_addr, SZ_64K);
index 83f268c050071c658609e8040a5fad98bf68c378..f59564b72ddcdc0fae2c438f71c0c3d414f4a627 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _DRIVERS_FIRMWARE_EFI_EFISTUB_H
 #define _DRIVERS_FIRMWARE_EFI_EFISTUB_H
index 09d5a0894343ac929a223be46681076de6a1a8c7..ed10e3f602c5edde5b57a502dd7d0b74c0dd6fb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Taken from:
  *  linux/lib/string.c
index 78686443cb378abf616c7cfe595b82d3a51c9cd6..5fc70520e04c4b57cd047c9dc6c0f5f7fab590f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Common EFI memory map functions.
  */
index 22874544d301bd77ca85c48137486214a68cd3a4..7effff969eb9053b16a79a38b60da79f1ba6006d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2014 Intel Corporation; author Matt Fleming
  * Copyright (c) 2014 Red Hat, Inc., Mark Salter <msalter@redhat.com>
index 08129b7b80ab9bbf2320a4061b4059554d90973f..41c48a1e8baaa8e46e9609c0b76a2698b5ac5c49 100644 (file)
@@ -593,6 +593,9 @@ static long efi_runtime_query_capsulecaps(unsigned long arg)
        if (copy_from_user(&qcaps, qcaps_user, sizeof(qcaps)))
                return -EFAULT;
 
+       if (qcaps.capsule_count == ULONG_MAX)
+               return -EINVAL;
+
        capsules = kcalloc(qcaps.capsule_count + 1,
                           sizeof(efi_capsule_header_t), GFP_KERNEL);
        if (!capsules)
index a33a6c633852ce6eb375c16a12c63fdab58f79ea..9812c6a02b40082b44807529d8c7093d6852675b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * EFI Test driver Header
  *
index bc4de02202ad2f2507a7479d0527ff930f1bafde..dcd3675efcfc72f5cc7e68f6e1b0fa50531c8fac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_GOOGLE_SMI)               += gsmi.o
 obj-$(CONFIG_GOOGLE_COREBOOT_TABLE)        += coreboot_table.o
index e809322e1bacef845ede8bd589da636212c904d7..e3da6192cf3948cb4b4221c101ba277bf0e6e9e3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_FMC) += fmc.o
 
index e09895f0525b2f04f4720191c29e6f769eded0e9..f98dcf1d89e1afa6da1480f60b00a70e8674af1b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the fpga framework and fpga manager drivers.
 #
index 08629ee69d1121604ee74949f0bbe0dc39a229fd..00e73d28077cee3732b61973222422f152ebb033 100644 (file)
@@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = {
        .write_complete = altera_cvp_write_complete,
 };
 
-static ssize_t show_chkcfg(struct device_driver *dev, char *buf)
+static ssize_t chkcfg_show(struct device_driver *dev, char *buf)
 {
        return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg);
 }
 
-static ssize_t store_chkcfg(struct device_driver *drv, const char *buf,
+static ssize_t chkcfg_store(struct device_driver *drv, const char *buf,
                            size_t count)
 {
        int ret;
@@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf,
        return count;
 }
 
-static DRIVER_ATTR(chkcfg, 0600, show_chkcfg, store_chkcfg);
+static DRIVER_ATTR_RW(chkcfg);
 
 static int altera_cvp_probe(struct pci_dev *pdev,
                            const struct pci_device_id *dev_id);
index 3388d54ba11468a0ab013f1160b1ea2a258ca354..3f80f167ed56d917405aaad1dd5e09598c7fc9e6 100644 (file)
@@ -453,7 +453,8 @@ config GPIO_TS4800
 config GPIO_THUNDERX
        tristate "Cavium ThunderX/OCTEON-TX GPIO"
        depends on ARCH_THUNDER || (64BIT && COMPILE_TEST)
-       depends on PCI_MSI && IRQ_DOMAIN_HIERARCHY
+       depends on PCI_MSI
+       select IRQ_DOMAIN_HIERARCHY
        select IRQ_FASTEOI_HIERARCHY_HANDLERS
        help
          Say yes here to support the on-chip GPIO lines on the ThunderX
index aeb70e9de6f2192fc678a279b59483bd9aa0eb17..8a2dfba3b2310ef2e25c0a1086a12c60a53ecda2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # generic gpio support: platform drivers, dedicated expander chips, etc
 
 ccflags-$(CONFIG_DEBUG_GPIO)   += -DDEBUG
index 14c6aac267809baa0b8efd3f8ecc1bbb3db5693b..94db1bf4bfdb9a71fd890e9d1ebc04594a02bd88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/gpio/driver.h>
index e9386f8b67f568e3b6d9ff4b0376c86b0874c442..139f73d3f4baef13950d037faec08ea8d14cc508 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Faraday Technolog FTGPIO010 gpiochip and interrupt routines
  * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
index dbf869fb63ced2cb2884be234c5275f2893237b2..3233b72b682809e197ed2528f2c9bc634400d878 100644 (file)
@@ -518,7 +518,13 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
        if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
                irq_set_handler_locked(d, handle_level_irq);
        else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
-               irq_set_handler_locked(d, handle_edge_irq);
+               /*
+                * Edge IRQs are already cleared/acked in irq_handler and
+                * not need to be masked, as result handle_edge_irq()
+                * logic is excessed here and may cause lose of interrupts.
+                * So just use handle_simple_irq.
+                */
+               irq_set_handler_locked(d, handle_simple_irq);
 
        return 0;
 
@@ -678,7 +684,7 @@ static void omap_gpio_free(struct gpio_chip *chip, unsigned offset)
 static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
 {
        void __iomem *isr_reg = NULL;
-       u32 isr;
+       u32 enabled, isr, level_mask;
        unsigned int bit;
        struct gpio_bank *bank = gpiobank;
        unsigned long wa_lock_flags;
@@ -691,23 +697,21 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
        pm_runtime_get_sync(bank->chip.parent);
 
        while (1) {
-               u32 isr_saved, level_mask = 0;
-               u32 enabled;
-
                raw_spin_lock_irqsave(&bank->lock, lock_flags);
 
                enabled = omap_get_gpio_irqbank_mask(bank);
-               isr_saved = isr = readl_relaxed(isr_reg) & enabled;
+               isr = readl_relaxed(isr_reg) & enabled;
 
                if (bank->level_mask)
                        level_mask = bank->level_mask & enabled;
+               else
+                       level_mask = 0;
 
                /* clear edge sensitive interrupts before handler(s) are
                called so that we don't miss any interrupt occurred while
                executing them */
-               omap_disable_gpio_irqbank(bank, isr_saved & ~level_mask);
-               omap_clear_gpio_irqbank(bank, isr_saved & ~level_mask);
-               omap_enable_gpio_irqbank(bank, isr_saved & ~level_mask);
+               if (isr & ~level_mask)
+                       omap_clear_gpio_irqbank(bank, isr & ~level_mask);
 
                raw_spin_unlock_irqrestore(&bank->lock, lock_flags);
 
@@ -1010,7 +1014,7 @@ static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 
 /*---------------------------------------------------------------------*/
 
-static void __init omap_gpio_show_rev(struct gpio_bank *bank)
+static void omap_gpio_show_rev(struct gpio_bank *bank)
 {
        static bool called;
        u32 rev;
index 4d2113530735185e5dcdc87553b2764df8121242..eb4528c87c0b3977420a2108c7feaaf9b2a95869 100644 (file)
@@ -203,7 +203,7 @@ static acpi_status acpi_gpiochip_request_interrupt(struct acpi_resource *ares,
 
        if (pin <= 255) {
                char ev_name[5];
-               sprintf(ev_name, "_%c%02X",
+               sprintf(ev_name, "_%c%02hhX",
                        agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L',
                        pin);
                if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
index a8acc197dec37760f6e6b6c44eec0abda5e97e0c..8ce07039bb898aae62333bc22a8f6e5878d8c789 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index 658bac0cdc5e96094499a13c2183de9f56e6f12f..567b0377e1e21e1b36a8dd09137d4ad5a9799b65 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index 1c88bd5e29adc161719a93bc07de4485c4fecce3..34c99a3c8d2d697d1123f6bb062632b5e09e6951 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_AMDGPU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _AMDGPU_TRACE_H_
 
index 385b7e1d72f9e99bf1f30a78a88ae55f70048f23..89680d554ed8320c9fcc3485d38539607b48fa80 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright Red Hat Inc 2010.
  * Author : Dave Airlie <airlied@redhat.com>
  */
index 7ef6c28a34d991a2bba6f20224284072330c22d1..bc746131987ffda438988f7b11bbb413b4c335c3 100644 (file)
@@ -834,7 +834,7 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
        placement.busy_placement = &placements;
        placements.fpfn = 0;
        placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT;
-       placements.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT;
+       placements.flags = bo->mem.placement | TTM_PL_FLAG_TT;
 
        r = ttm_bo_mem_space(bo, &placement, &tmp, true, false);
        if (unlikely(r))
index d228f5a990449f0b2c28314c972db2664c6bc1cd..dbbe986f90f29ffb6c77662866e336d8130d1af2 100644 (file)
@@ -636,7 +636,194 @@ static void gfx_v6_0_tiling_mode_table_init(struct amdgpu_device *adev)
                                NUM_BANKS(ADDR_SURF_2_BANK);
                for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
                        WREG32(mmGB_TILE_MODE0 + reg_offset, tilemode[reg_offset]);
-       } else if (adev->asic_type == CHIP_OLAND || adev->asic_type == CHIP_HAINAN) {
+       } else if (adev->asic_type == CHIP_OLAND) {
+               tilemode[0] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[1] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[2] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[3] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[4] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[5] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(split_equal_to_row_size) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[6] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(split_equal_to_row_size) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[7] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(split_equal_to_row_size) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[8] =   MICRO_TILE_MODE(ADDR_SURF_DISPLAY_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[9] =   MICRO_TILE_MODE(ADDR_SURF_DISPLAY_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[10] =  MICRO_TILE_MODE(ADDR_SURF_DISPLAY_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[11] =  MICRO_TILE_MODE(ADDR_SURF_DISPLAY_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[12] =  MICRO_TILE_MODE(ADDR_SURF_DISPLAY_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[13] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[14] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[15] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[16] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[17] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P4_8x16) |
+                               TILE_SPLIT(split_equal_to_row_size) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[21] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P8_32x32_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[22] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P8_32x32_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4);
+               tilemode[23] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P8_32x32_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[24] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P8_32x32_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
+                               NUM_BANKS(ADDR_SURF_16_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2);
+               tilemode[25] =  MICRO_TILE_MODE(ADDR_SURF_THIN_MICRO_TILING) |
+                               ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
+                               PIPE_CONFIG(ADDR_SURF_P8_32x32_8x16) |
+                               TILE_SPLIT(ADDR_SURF_TILE_SPLIT_1KB) |
+                               NUM_BANKS(ADDR_SURF_8_BANK) |
+                               BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
+                               BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
+                               MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1);
+               for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
+                       WREG32(mmGB_TILE_MODE0 + reg_offset, tilemode[reg_offset]);
+       } else if (adev->asic_type == CHIP_HAINAN) {
                tilemode[0] =   MICRO_TILE_MODE(ADDR_SURF_DEPTH_MICRO_TILING) |
                                ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
                                PIPE_CONFIG(ADDR_SURF_P2) |
index 31db356476f8f1f72f488c54282a09409bcbb749..62cd16a23921279f8205e6f58b463f3f9bf97152 100644 (file)
@@ -93,6 +93,10 @@ static int uvd_v6_0_early_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       if (!(adev->flags & AMD_IS_APU) &&
+           (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK))
+               return -ENOENT;
+
        uvd_v6_0_set_ring_funcs(adev);
        uvd_v6_0_set_irq_funcs(adev);
 
@@ -225,11 +229,7 @@ static int uvd_v6_0_suspend(void *handle)
        if (r)
                return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
 }
 
 static int uvd_v6_0_resume(void *handle)
@@ -237,12 +237,10 @@ static int uvd_v6_0_resume(void *handle)
        int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
        return uvd_v6_0_hw_init(adev);
 }
 
index 90332f55cfba91b7a543da4ec3820809bb876336..cf81065e3c5ab95030f24f4a883924f27c71bc90 100644 (file)
@@ -365,15 +365,10 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
 {
        u32 tmp;
 
-       /* Fiji, Stoney, Polaris10, Polaris11, Polaris12 are single pipe */
        if ((adev->asic_type == CHIP_FIJI) ||
-           (adev->asic_type == CHIP_STONEY) ||
-           (adev->asic_type == CHIP_POLARIS10) ||
-           (adev->asic_type == CHIP_POLARIS11) ||
-           (adev->asic_type == CHIP_POLARIS12))
+           (adev->asic_type == CHIP_STONEY))
                return AMDGPU_VCE_HARVEST_VCE1;
 
-       /* Tonga and CZ are dual or single pipe */
        if (adev->flags & AMD_IS_APU)
                tmp = (RREG32_SMC(ixVCE_HARVEST_FUSE_MACRO__ADDRESS) &
                       VCE_HARVEST_FUSE_MACRO__MASK) >>
@@ -391,6 +386,11 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
        case 3:
                return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
        default:
+               if ((adev->asic_type == CHIP_POLARIS10) ||
+                   (adev->asic_type == CHIP_POLARIS11) ||
+                   (adev->asic_type == CHIP_POLARIS12))
+                       return AMDGPU_VCE_HARVEST_VCE1;
+
                return 0;
        }
 }
index b400d5664252c3b0c62eb8482845cae6331022e7..7bb0bc0ca3d6aaa9ff330d41c896089ce2121011 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Heterogenous System Architecture support for AMD GPU devices
 #
index e4a8c2e52cb2c14ab566d015b178a2e6bd243cac..660b3fbade4194f796ebe0be8e4fc7f7e9c46109 100644 (file)
@@ -892,6 +892,8 @@ static int kfd_ioctl_get_tile_config(struct file *filep,
        int err = 0;
 
        dev = kfd_device_by_id(args->gpu_id);
+       if (!dev)
+               return -EINVAL;
 
        dev->kfd2kgd->get_tile_config(dev->kgd, &config);
 
index 5979158c3f7b93e96627af2c03cd814228b0fe01..944abfad39c1f67447ca720d5e47c4b086336a82 100644 (file)
@@ -292,7 +292,10 @@ static int create_signal_event(struct file *devkfd,
                                struct kfd_event *ev)
 {
        if (p->signal_event_count == KFD_SIGNAL_EVENT_LIMIT) {
-               pr_warn("Signal event wasn't created because limit was reached\n");
+               if (!p->signal_event_limit_reached) {
+                       pr_warn("Signal event wasn't created because limit was reached\n");
+                       p->signal_event_limit_reached = true;
+               }
                return -ENOMEM;
        }
 
index 681b639f51330b78af84854880cae988fd90b252..ed71ad40e8f797ca3c7b7d4f129f5e9fda382d27 100644 (file)
@@ -183,8 +183,8 @@ static void uninitialize(struct kernel_queue *kq)
 {
        if (kq->queue->properties.type == KFD_QUEUE_TYPE_HIQ)
                kq->mqd->destroy_mqd(kq->mqd,
-                                       NULL,
-                                       false,
+                                       kq->queue->mqd,
+                                       KFD_PREEMPT_TYPE_WAVEFRONT_RESET,
                                        QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS,
                                        kq->queue->pipe,
                                        kq->queue->queue);
@@ -210,6 +210,11 @@ static int acquire_packet_buffer(struct kernel_queue *kq,
        uint32_t wptr, rptr;
        unsigned int *queue_address;
 
+       /* When rptr == wptr, the buffer is empty.
+        * When rptr == wptr + 1, the buffer is full.
+        * It is always rptr that advances to the position of wptr, rather than
+        * the opposite. So we can only use up to queue_size_dwords - 1 dwords.
+        */
        rptr = *kq->rptr_kernel;
        wptr = *kq->wptr_kernel;
        queue_address = (unsigned int *)kq->pq_kernel_addr;
@@ -219,11 +224,10 @@ static int acquire_packet_buffer(struct kernel_queue *kq,
        pr_debug("wptr: %d\n", wptr);
        pr_debug("queue_address 0x%p\n", queue_address);
 
-       available_size = (rptr - 1 - wptr + queue_size_dwords) %
+       available_size = (rptr + queue_size_dwords - 1 - wptr) %
                                                        queue_size_dwords;
 
-       if (packet_size_in_dwords >= queue_size_dwords ||
-                       packet_size_in_dwords >= available_size) {
+       if (packet_size_in_dwords > available_size) {
                /*
                 * make sure calling functions know
                 * acquire_packet_buffer() failed
@@ -233,6 +237,14 @@ static int acquire_packet_buffer(struct kernel_queue *kq,
        }
 
        if (wptr + packet_size_in_dwords >= queue_size_dwords) {
+               /* make sure after rolling back to position 0, there is
+                * still enough space.
+                */
+               if (packet_size_in_dwords >= rptr) {
+                       *buffer_ptr = NULL;
+                       return -ENOMEM;
+               }
+               /* fill nops, roll back and start at position 0 */
                while (wptr > 0) {
                        queue_address[wptr] = kq->nop_packet;
                        wptr = (wptr + 1) % queue_size_dwords;
index b397ec726400c2a52533356363b36bfd275dfb39..b87e96cee5facfea112a874f4e69bfad52f3b70b 100644 (file)
@@ -521,6 +521,7 @@ struct kfd_process {
        struct list_head signal_event_pages;
        u32 next_nonsignal_event_id;
        size_t signal_event_count;
+       bool signal_event_limit_reached;
 };
 
 /**
index 1cae95e2b13adedfb19760279861fae827d057a7..03bec765b03d949de8bdac3cd8db62f8c684c92a 100644 (file)
@@ -143,7 +143,6 @@ int pqm_create_queue(struct process_queue_manager *pqm,
        int num_queues = 0;
        struct queue *cur;
 
-       memset(&q_properties, 0, sizeof(struct queue_properties));
        memcpy(&q_properties, properties, sizeof(struct queue_properties));
        q = NULL;
        kq = NULL;
index 4e132b936e3d2afdc885c21adbeba1280259405c..72d5f50508b60f431f1f1248e67b631813839859 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 subdir-ccflags-y += \
                -I$(FULL_AMD_PATH)/powerplay/inc/  \
index f0277c16c2bff5b62497d24b3f85e2437dd4fc54..d13fdadbbf9e8fbb19fa0b1807b10fb005cd8e0a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 'hw manager' sub-component of powerplay.
 # It provides the hardware management services for the driver.
index d09f254858447744985c6eab2ffbd2994d912ae1..e0766c5e3d74776d28e4b9dbde76a406aaf9a12f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "pp_overdriver.h"
 #include <linux/errno.h>
 
index c2743233ba10ed8dd9b55338730fbff9722ae680..b526f49be65d066d5eb49d7339ebe3e089c08877 100644 (file)
@@ -830,7 +830,7 @@ uint32_t smu7_get_xclk(struct pp_hwmgr *hwmgr)
 {
        uint32_t reference_clock, tmp;
        struct cgs_display_info info = {0};
-       struct cgs_mode_info mode_info;
+       struct cgs_mode_info mode_info = {0};
 
        info.mode_info = &mode_info;
 
@@ -3948,10 +3948,9 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
        uint32_t ref_clock;
        uint32_t refresh_rate = 0;
        struct cgs_display_info info = {0};
-       struct cgs_mode_info mode_info;
+       struct cgs_mode_info mode_info = {0};
 
        info.mode_info = &mode_info;
-
        cgs_get_active_displays_info(hwmgr->device, &info);
        num_active_displays = info.display_count;
 
@@ -3967,6 +3966,7 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
        frame_time_in_us = 1000000 / refresh_rate;
 
        pre_vbi_time_in_us = frame_time_in_us - 200 - mode_info.vblank_time_us;
+
        data->frame_time_x2 = frame_time_in_us * 2 / 100;
 
        display_gap2 = pre_vbi_time_in_us * (ref_clock / 100);
index b73d6b59ac32cc3c32510d8cca751f1c67591541..08cd70c75d8b8e55c8d19b51b680c703441685bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SMU72_H
 #define SMU72_H
 
index 98f76e925e6553381f7d1ca548253fc69b426e69..b2edbc0c3c4dfea4b66d3c8d5b7b5a38b24c165a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SMU72_DISCRETE_H
 #define SMU72_DISCRETE_H
 
index 1703bbefbfd52fb5d97537542b5cbb2e2cc914c8..e7ad45297b1d489d444b5b845e2aa0c3e02858a8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 'smu manager' sub-component of powerplay.
 # It provides the smu management services for the driver.
index 8bd38102b58e25c970a28d2844d0e345c1a06292..283a0dc25e84eac15d6383e1a5608ad885f3453b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _GPU_SCHED_TRACE_H_
 
index 97c94f9683fa047392ba62f128586e0b7e4492bc..38cea6fb25a8b9221d64b43da04c4268a2c986b8 100644 (file)
@@ -205,32 +205,17 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
                           struct amd_sched_entity *entity)
 {
        struct amd_sched_rq *rq = entity->rq;
-       int r;
 
        if (!amd_sched_entity_is_initialized(sched, entity))
                return;
+
        /**
         * The client will not queue more IBs during this fini, consume existing
-        * queued IBs or discard them on SIGKILL
+        * queued IBs
        */
-       if ((current->flags & PF_SIGNALED) && current->exit_code == SIGKILL)
-               r = -ERESTARTSYS;
-       else
-               r = wait_event_killable(sched->job_scheduled,
-                                       amd_sched_entity_is_idle(entity));
-       amd_sched_rq_remove_entity(rq, entity);
-       if (r) {
-               struct amd_sched_job *job;
+       wait_event(sched->job_scheduled, amd_sched_entity_is_idle(entity));
 
-               /* Park the kernel for a moment to make sure it isn't processing
-                * our enity.
-                */
-               kthread_park(sched->thread);
-               kthread_unpark(sched->thread);
-               while (kfifo_out(&entity->job_queue, &job, sizeof(job)))
-                       sched->ops->free_job(job);
-
-       }
+       amd_sched_rq_remove_entity(rq, entity);
        kfifo_free(&entity->job_queue);
 }
 
index e3950a0711524a13d637f7fc0ec6a9100b9c6219..56f34dfff64065640284e5eee100e628f4a59204 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ARM HDLCD Controller register definition
  */
index 64c0b4546fb240f92d0e91a8bdb4faff69417a1f..1ab4cf863bf7731853e0aad0fafbc22fa14b9e6d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 armada-y       := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \
                   armada_gem.o armada_overlay.o armada_trace.o
 armada-y       += armada_510.o
index 068b336ba75f4efa2808bd1fe5129bce6f4c3646..c64cce325cdf721bc70e791dc1a71a34dbe9a7d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef __CHECKER__
 #define CREATE_TRACE_POINTS
 #include "armada_trace.h"
index dc0cba70fd1a3195bec5fe342974ca3524f6284f..1e9f55fc8735dcd67c8c5c39f5590d45c54124b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(ARMADA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define ARMADA_TRACE_H
 
index 749646ae365fc36e7ab64df83228a9f04a472fc7..4c7375b45281124bd3af8bb35c3e752bb5516fe3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/firmware.h>
 #include <drm/drmP.h>
index 1d9c4e75d3030a7ce67cdc4c16b15545da049538..1e9ac9d6d26c7daa4d4f1d43ee9c124fa6eabf81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AST_DRAM_TABLES_H
 #define AST_DRAM_TABLES_H
 
index bb5f8507a8cee8d893beb23117ad01da98b2c010..49dc89f36b731a2d8d3f07aaae102ec8d55e3646 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 atmel-hlcdc-dc-y := atmel_hlcdc_crtc.o \
                atmel_hlcdc_dc.o \
                atmel_hlcdc_output.o \
index 76c490c3cdbcaacfe279441b1352541a8e079169..375bf92cd04fce8982a3b11067ba8681a1365d4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/io.h>
 #include <linux/console.h>
 
index defcf1e7ca1c69bf31466201ce2fb0c832fd342b..60dab87e4783cf35f38bcccbe5152fefbe56d5df 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o
 obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o
 obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o
index fd1f745c607377753ba613a03b0c4d76192f0e9b..63b5756f463bf236306ff63b7e4096131879d512 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DW_HDMI_AUDIO_H
 #define DW_HDMI_AUDIO_H
 
index 4e53aae9a1fb19fc6710202188a53119c566aef7..0028591f3f959ced1ad520ee280fb481d7a52898 100644 (file)
@@ -2960,6 +2960,7 @@ out:
                drm_modeset_backoff(&ctx);
        }
 
+       drm_atomic_state_put(state);
        drm_modeset_drop_locks(&ctx);
        drm_modeset_acquire_fini(&ctx);
 
index 14c5a777682e54b236e257e85c9f5699ea62e12d..a8370775ed50680951e0ff8b2376f41cdd51b032 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
 #define _DRM_TRACE_H_
 
index 4f76c992043f69fc2d5bd8a72b13c50aaa3986af..ab3f551831d7cb30d115babc8e96db02f3237685 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 etnaviv-y := \
        etnaviv_buffer.o \
        etnaviv_cmd_parser.o \
index 5a634594a6cea2d2be20e19a0e359229a860775c..57881167ccd22c9c16df18e1d93401edef2e1f82 100644 (file)
@@ -551,12 +551,15 @@ static const struct etnaviv_gem_ops etnaviv_gem_shmem_ops = {
 void etnaviv_gem_free_object(struct drm_gem_object *obj)
 {
        struct etnaviv_gem_object *etnaviv_obj = to_etnaviv_bo(obj);
+       struct etnaviv_drm_private *priv = obj->dev->dev_private;
        struct etnaviv_vram_mapping *mapping, *tmp;
 
        /* object should not be active */
        WARN_ON(is_active(etnaviv_obj));
 
+       mutex_lock(&priv->gem_lock);
        list_del(&etnaviv_obj->gem_node);
+       mutex_unlock(&priv->gem_lock);
 
        list_for_each_entry_safe(mapping, tmp, &etnaviv_obj->vram_list,
                                 obj_node) {
index 026ef4e02f85cab130586c5c0b8c9b97bd0101bb..46dfe0737f438d37e4e65dec320e9a7e773e3856 100644 (file)
@@ -445,8 +445,10 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
        cmdbuf->user_size = ALIGN(args->stream_size, 8);
 
        ret = etnaviv_gpu_submit(gpu, submit, cmdbuf);
-       if (ret == 0)
-               cmdbuf = NULL;
+       if (ret)
+               goto out;
+
+       cmdbuf = NULL;
 
        if (args->flags & ETNA_SUBMIT_FENCE_FD_OUT) {
                /*
index 3682183045662750b79474be18ec2ae17fd546bd..c27c1484cfa9ae5bfa820f616e67a32ef23a6664 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef STATE_XML
 #define STATE_XML
 
index d7146fd1394384726e689a12a4732ee32fb19b6f..73a97d35c51b78cad31cf73f03095e0dff4993ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef STATE_3D_XML
 #define STATE_3D_XML
 
index 43c73e2ed34fba825de434964801f69a807766fd..60808daf7e8d6ab78a2cb22d6b0f54550d6357df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef STATE_HI_XML
 #define STATE_HI_XML
 
index f663490e949db59f3f087b9fcaa1f7c589d81c34..bdf4212dde7b9bd97a354d93ac50f539051f29b8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index 730b8d9db18704c42346b9553c8d7ab737493392..6be5b53c3b279f42ee6dbcc445173fa539721ce5 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/clk.h>
 #include <linux/component.h>
 #include <linux/iopoll.h>
+#include <linux/irq.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
index b1f7299600f040947240618cf2cfc262d1847b70..82b72425a42f7977c993134a2142434d8689227f 100644 (file)
@@ -168,23 +168,21 @@ static struct drm_driver exynos_drm_driver = {
 static int exynos_drm_suspend(struct device *dev)
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
-       struct drm_connector *connector;
-       struct drm_connector_list_iter conn_iter;
+       struct exynos_drm_private *private;
 
        if (pm_runtime_suspended(dev) || !drm_dev)
                return 0;
 
-       drm_connector_list_iter_begin(drm_dev, &conn_iter);
-       drm_for_each_connector_iter(connector, &conn_iter) {
-               int old_dpms = connector->dpms;
-
-               if (connector->funcs->dpms)
-                       connector->funcs->dpms(connector, DRM_MODE_DPMS_OFF);
+       private = drm_dev->dev_private;
 
-               /* Set the old mode back to the connector for resume */
-               connector->dpms = old_dpms;
+       drm_kms_helper_poll_disable(drm_dev);
+       exynos_drm_fbdev_suspend(drm_dev);
+       private->suspend_state = drm_atomic_helper_suspend(drm_dev);
+       if (IS_ERR(private->suspend_state)) {
+               exynos_drm_fbdev_resume(drm_dev);
+               drm_kms_helper_poll_enable(drm_dev);
+               return PTR_ERR(private->suspend_state);
        }
-       drm_connector_list_iter_end(&conn_iter);
 
        return 0;
 }
@@ -192,22 +190,15 @@ static int exynos_drm_suspend(struct device *dev)
 static int exynos_drm_resume(struct device *dev)
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
-       struct drm_connector *connector;
-       struct drm_connector_list_iter conn_iter;
+       struct exynos_drm_private *private;
 
        if (pm_runtime_suspended(dev) || !drm_dev)
                return 0;
 
-       drm_connector_list_iter_begin(drm_dev, &conn_iter);
-       drm_for_each_connector_iter(connector, &conn_iter) {
-               if (connector->funcs->dpms) {
-                       int dpms = connector->dpms;
-
-                       connector->dpms = DRM_MODE_DPMS_OFF;
-                       connector->funcs->dpms(connector, dpms);
-               }
-       }
-       drm_connector_list_iter_end(&conn_iter);
+       private = drm_dev->dev_private;
+       drm_atomic_helper_resume(drm_dev, private->suspend_state);
+       exynos_drm_fbdev_resume(drm_dev);
+       drm_kms_helper_poll_enable(drm_dev);
 
        return 0;
 }
@@ -439,6 +430,7 @@ static void exynos_drm_unbind(struct device *dev)
 
        kfree(drm->dev_private);
        drm->dev_private = NULL;
+       dev_set_drvdata(dev, NULL);
 
        drm_dev_unref(drm);
 }
index cf131c2aa23e431f13a44fe1985bad58c32da250..f8bae4cb4823653562de92a20bec51f87747d07f 100644 (file)
@@ -202,6 +202,7 @@ struct drm_exynos_file_private {
  */
 struct exynos_drm_private {
        struct drm_fb_helper *fb_helper;
+       struct drm_atomic_state *suspend_state;
 
        struct device *dma_dev;
        void *mapping;
index c3a068409b484fda04bbf837626f011beb875c1f..dfb66ecf417b5c8ba9bd26b8966a52a5f14b4aaa 100644 (file)
@@ -18,6 +18,8 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/exynos_drm.h>
 
+#include <linux/console.h>
+
 #include "exynos_drm_drv.h"
 #include "exynos_drm_fb.h"
 #include "exynos_drm_fbdev.h"
@@ -285,3 +287,21 @@ void exynos_drm_output_poll_changed(struct drm_device *dev)
 
        drm_fb_helper_hotplug_event(fb_helper);
 }
+
+void exynos_drm_fbdev_suspend(struct drm_device *dev)
+{
+       struct exynos_drm_private *private = dev->dev_private;
+
+       console_lock();
+       drm_fb_helper_set_suspend(private->fb_helper, 1);
+       console_unlock();
+}
+
+void exynos_drm_fbdev_resume(struct drm_device *dev)
+{
+       struct exynos_drm_private *private = dev->dev_private;
+
+       console_lock();
+       drm_fb_helper_set_suspend(private->fb_helper, 0);
+       console_unlock();
+}
index 330eef87f7180b1b726ff41933874a6568b0474d..645d1bb7f665faed0dfa30bf3ab36c090a2c1c1f 100644 (file)
@@ -21,6 +21,8 @@ int exynos_drm_fbdev_init(struct drm_device *dev);
 void exynos_drm_fbdev_fini(struct drm_device *dev);
 void exynos_drm_fbdev_restore_mode(struct drm_device *dev);
 void exynos_drm_output_poll_changed(struct drm_device *dev);
+void exynos_drm_fbdev_suspend(struct drm_device *drm);
+void exynos_drm_fbdev_resume(struct drm_device *drm);
 
 #else
 
@@ -39,6 +41,14 @@ static inline void exynos_drm_fbdev_restore_mode(struct drm_device *dev)
 
 #define exynos_drm_output_poll_changed (NULL)
 
+static inline void exynos_drm_fbdev_suspend(struct drm_device *drm)
+{
+}
+
+static inline void exynos_drm_fbdev_resume(struct drm_device *drm)
+{
+}
+
 #endif
 
 #endif
index 214fa5e51963898ee5288f98d536681cdbebdcd6..0109ff40b1db2a95da6997e982fe0adaf4496196 100644 (file)
@@ -944,22 +944,27 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder,
        struct drm_device *dev = encoder->dev;
        struct drm_connector *connector;
        struct drm_display_mode *m;
+       struct drm_connector_list_iter conn_iter;
        int mode_ok;
 
        drm_mode_set_crtcinfo(adjusted_mode, 0);
 
-       list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+       drm_connector_list_iter_begin(dev, &conn_iter);
+       drm_for_each_connector_iter(connector, &conn_iter) {
                if (connector->encoder == encoder)
                        break;
        }
+       if (connector)
+               drm_connector_get(connector);
+       drm_connector_list_iter_end(&conn_iter);
 
-       if (connector->encoder != encoder)
+       if (!connector)
                return true;
 
        mode_ok = hdmi_mode_valid(connector, adjusted_mode);
 
        if (mode_ok == MODE_OK)
-               return true;
+               goto cleanup;
 
        /*
         * Find the most suitable mode and copy it to adjusted_mode.
@@ -979,6 +984,9 @@ static bool hdmi_mode_fixup(struct drm_encoder *encoder,
                }
        }
 
+cleanup:
+       drm_connector_put(connector);
+
        return true;
 }
 
index aca34f656beaca8103e0f3df2ed3c74934167158..b55c4482d0f9a3fde9460039c27bbb6f0b43804b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 fsl-dcu-drm-y := fsl_dcu_drm_drv.o \
                 fsl_dcu_drm_kms.o \
                 fsl_dcu_drm_rgb.o \
index c1c8dc18aa5357a75ab68c068da86718509edd3f..c8f2c89be99db49e45b574250fa37873e8783a7d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #      KMS driver for the GMA500
 #
index a77acfc1852ebce9fd2b34e5f3e707833434cafc..b20100c18ffb6e36db8c425933194c5e500a7a03 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ch7006-y := ch7006_drv.o ch7006_mode.o
 obj-$(CONFIG_DRM_I2C_CH7006) += ch7006.o
 
index 892f52b53060a00cc6bb23275eba23c5b1ef16d7..2e034efc4d6d84b60d273fd78e205721f2d057b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index f5486cb94818c335a78f74cb5662471ece98c3f9..2641ba510a61bd50f869dd27280546a757eb03b1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 GVT_DIR := gvt
 GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
        interrupt.o gtt.o cfg_space.o opregion.o mmio.o display.o edid.o \
index 40af17ec6312533d4080cc1581faa4683a0405b9..ff3154fe6588b6aa48d4c2618d65f1f2d912b137 100644 (file)
@@ -197,78 +197,65 @@ static int emulate_pci_command_write(struct intel_vgpu *vgpu,
 static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset,
        void *p_data, unsigned int bytes)
 {
-       unsigned int bar_index =
-               (rounddown(offset, 8) % PCI_BASE_ADDRESS_0) / 8;
        u32 new = *(u32 *)(p_data);
        bool lo = IS_ALIGNED(offset, 8);
        u64 size;
        int ret = 0;
        bool mmio_enabled =
                vgpu_cfg_space(vgpu)[PCI_COMMAND] & PCI_COMMAND_MEMORY;
+       struct intel_vgpu_pci_bar *bars = vgpu->cfg_space.bar;
 
-       if (WARN_ON(bar_index >= INTEL_GVT_PCI_BAR_MAX))
-               return -EINVAL;
-
+       /*
+        * Power-up software can determine how much address
+        * space the device requires by writing a value of
+        * all 1's to the register and then reading the value
+        * back. The device will return 0's in all don't-care
+        * address bits.
+        */
        if (new == 0xffffffff) {
-               /*
-                * Power-up software can determine how much address
-                * space the device requires by writing a value of
-                * all 1's to the register and then reading the value
-                * back. The device will return 0's in all don't-care
-                * address bits.
-                */
-               size = vgpu->cfg_space.bar[bar_index].size;
-               if (lo) {
-                       new = rounddown(new, size);
-               } else {
-                       u32 val = vgpu_cfg_space(vgpu)[rounddown(offset, 8)];
-                       /* for 32bit mode bar it returns all-0 in upper 32
-                        * bit, for 64bit mode bar it will calculate the
-                        * size with lower 32bit and return the corresponding
-                        * value
+               switch (offset) {
+               case PCI_BASE_ADDRESS_0:
+               case PCI_BASE_ADDRESS_1:
+                       size = ~(bars[INTEL_GVT_PCI_BAR_GTTMMIO].size -1);
+                       intel_vgpu_write_pci_bar(vgpu, offset,
+                                               size >> (lo ? 0 : 32), lo);
+                       /*
+                        * Untrap the BAR, since guest hasn't configured a
+                        * valid GPA
                         */
-                       if (val & PCI_BASE_ADDRESS_MEM_TYPE_64)
-                               new &= (~(size-1)) >> 32;
-                       else
-                               new = 0;
-               }
-               /*
-                * Unmapp & untrap the BAR, since guest hasn't configured a
-                * valid GPA
-                */
-               switch (bar_index) {
-               case INTEL_GVT_PCI_BAR_GTTMMIO:
                        ret = trap_gttmmio(vgpu, false);
                        break;
-               case INTEL_GVT_PCI_BAR_APERTURE:
+               case PCI_BASE_ADDRESS_2:
+               case PCI_BASE_ADDRESS_3:
+                       size = ~(bars[INTEL_GVT_PCI_BAR_APERTURE].size -1);
+                       intel_vgpu_write_pci_bar(vgpu, offset,
+                                               size >> (lo ? 0 : 32), lo);
                        ret = map_aperture(vgpu, false);
                        break;
+               default:
+                       /* Unimplemented BARs */
+                       intel_vgpu_write_pci_bar(vgpu, offset, 0x0, false);
                }
-               intel_vgpu_write_pci_bar(vgpu, offset, new, lo);
        } else {
-               /*
-                * Unmapp & untrap the old BAR first, since guest has
-                * re-configured the BAR
-                */
-               switch (bar_index) {
-               case INTEL_GVT_PCI_BAR_GTTMMIO:
-                       ret = trap_gttmmio(vgpu, false);
+               switch (offset) {
+               case PCI_BASE_ADDRESS_0:
+               case PCI_BASE_ADDRESS_1:
+                       /*
+                        * Untrap the old BAR first, since guest has
+                        * re-configured the BAR
+                        */
+                       trap_gttmmio(vgpu, false);
+                       intel_vgpu_write_pci_bar(vgpu, offset, new, lo);
+                       ret = trap_gttmmio(vgpu, mmio_enabled);
                        break;
-               case INTEL_GVT_PCI_BAR_APERTURE:
-                       ret = map_aperture(vgpu, false);
+               case PCI_BASE_ADDRESS_2:
+               case PCI_BASE_ADDRESS_3:
+                       map_aperture(vgpu, false);
+                       intel_vgpu_write_pci_bar(vgpu, offset, new, lo);
+                       ret = map_aperture(vgpu, mmio_enabled);
                        break;
-               }
-               intel_vgpu_write_pci_bar(vgpu, offset, new, lo);
-               /* Track the new BAR */
-               if (mmio_enabled) {
-                       switch (bar_index) {
-                       case INTEL_GVT_PCI_BAR_GTTMMIO:
-                               ret = trap_gttmmio(vgpu, true);
-                               break;
-                       case INTEL_GVT_PCI_BAR_APERTURE:
-                               ret = map_aperture(vgpu, true);
-                               break;
-                       }
+               default:
+                       intel_vgpu_write_pci_bar(vgpu, offset, new, lo);
                }
        }
        return ret;
@@ -299,10 +286,7 @@ int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset,
        }
 
        switch (rounddown(offset, 4)) {
-       case PCI_BASE_ADDRESS_0:
-       case PCI_BASE_ADDRESS_1:
-       case PCI_BASE_ADDRESS_2:
-       case PCI_BASE_ADDRESS_3:
+       case PCI_BASE_ADDRESS_0 ... PCI_BASE_ADDRESS_5:
                if (WARN_ON(!IS_ALIGNED(offset, 4)))
                        return -EINVAL;
                return emulate_pci_bar_write(vgpu, offset, p_data, bytes);
@@ -344,7 +328,6 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,
        struct intel_gvt *gvt = vgpu->gvt;
        const struct intel_gvt_device_info *info = &gvt->device_info;
        u16 *gmch_ctl;
-       int i;
 
        memcpy(vgpu_cfg_space(vgpu), gvt->firmware.cfg_space,
               info->cfg_space_size);
@@ -371,13 +354,13 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu,
         */
        memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_1, 0, 4);
        memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_3, 0, 4);
+       memset(vgpu_cfg_space(vgpu) + PCI_BASE_ADDRESS_4, 0, 8);
        memset(vgpu_cfg_space(vgpu) + INTEL_GVT_PCI_OPREGION, 0, 4);
 
-       for (i = 0; i < INTEL_GVT_MAX_BAR_NUM; i++) {
-               vgpu->cfg_space.bar[i].size = pci_resource_len(
-                                             gvt->dev_priv->drm.pdev, i * 2);
-               vgpu->cfg_space.bar[i].tracked = false;
-       }
+       vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_GTTMMIO].size =
+                               pci_resource_len(gvt->dev_priv->drm.pdev, 0);
+       vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE].size =
+                               pci_resource_len(gvt->dev_priv->drm.pdev, 2);
 }
 
 /**
index 21c36e256884fb8414352d5ffdd1f3baaa6606a3..d4726a3358a4a5b241ff50af1efb9ddcd64f4fbf 100644 (file)
@@ -2723,6 +2723,9 @@ static int combine_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
        uint32_t per_ctx_start[CACHELINE_DWORDS] = {0};
        unsigned char *bb_start_sva;
 
+       if (!wa_ctx->per_ctx.valid)
+               return 0;
+
        per_ctx_start[0] = 0x18800001;
        per_ctx_start[1] = wa_ctx->per_ctx.guest_gma;
 
index 91b4300f3b394a59e6ad2f19ea5fae9834d82806..e5320b4eb698e9793ab1d6d8284935422b706a89 100644 (file)
@@ -701,8 +701,7 @@ static int submit_context(struct intel_vgpu *vgpu, int ring_id,
                        CACHELINE_BYTES;
                workload->wa_ctx.per_ctx.guest_gma =
                        per_ctx & PER_CTX_ADDR_MASK;
-
-               WARN_ON(workload->wa_ctx.indirect_ctx.size && !(per_ctx & 0x1));
+               workload->wa_ctx.per_ctx.valid = per_ctx & 1;
        }
 
        if (emulate_schedule_in)
index 2294466dd4150b943ad80c53a8ca3b611c9324c8..a5bed2e71b9260afbe5ee3db7bb6649f29b826a2 100644 (file)
@@ -1429,18 +1429,7 @@ static int skl_lcpll_write(struct intel_vgpu *vgpu, unsigned int offset,
        return 0;
 }
 
-static int ring_timestamp_mmio_read(struct intel_vgpu *vgpu,
-               unsigned int offset, void *p_data, unsigned int bytes)
-{
-       struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
-
-       mmio_hw_access_pre(dev_priv);
-       vgpu_vreg(vgpu, offset) = I915_READ(_MMIO(offset));
-       mmio_hw_access_post(dev_priv);
-       return intel_vgpu_default_mmio_read(vgpu, offset, p_data, bytes);
-}
-
-static int instdone_mmio_read(struct intel_vgpu *vgpu,
+static int mmio_read_from_hw(struct intel_vgpu *vgpu,
                unsigned int offset, void *p_data, unsigned int bytes)
 {
        struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
@@ -1589,6 +1578,8 @@ static int ring_reset_ctl_write(struct intel_vgpu *vgpu,
        MMIO_F(prefix(BLT_RING_BASE), s, f, am, rm, d, r, w); \
        MMIO_F(prefix(GEN6_BSD_RING_BASE), s, f, am, rm, d, r, w); \
        MMIO_F(prefix(VEBOX_RING_BASE), s, f, am, rm, d, r, w); \
+       if (HAS_BSD2(dev_priv)) \
+               MMIO_F(prefix(GEN8_BSD2_RING_BASE), s, f, am, rm, d, r, w); \
 } while (0)
 
 #define MMIO_RING_D(prefix, d) \
@@ -1635,10 +1626,9 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x6c)
-       MMIO_RING_DFH(RING_REG, D_ALL, 0, instdone_mmio_read, NULL);
-       MMIO_DH(RING_REG(GEN8_BSD2_RING_BASE), D_ALL, instdone_mmio_read, NULL);
+       MMIO_RING_DFH(RING_REG, D_ALL, 0, mmio_read_from_hw, NULL);
 #undef RING_REG
-       MMIO_DH(GEN7_SC_INSTDONE, D_BDW_PLUS, instdone_mmio_read, NULL);
+       MMIO_DH(GEN7_SC_INSTDONE, D_BDW_PLUS, mmio_read_from_hw, NULL);
 
        MMIO_GM_RDR(0x2148, D_ALL, NULL, NULL);
        MMIO_GM_RDR(CCID, D_ALL, NULL, NULL);
@@ -1648,7 +1638,7 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
        MMIO_RING_DFH(RING_TAIL, D_ALL, F_CMD_ACCESS, NULL, NULL);
        MMIO_RING_DFH(RING_HEAD, D_ALL, F_CMD_ACCESS, NULL, NULL);
        MMIO_RING_DFH(RING_CTL, D_ALL, F_CMD_ACCESS, NULL, NULL);
-       MMIO_RING_DFH(RING_ACTHD, D_ALL, F_CMD_ACCESS, NULL, NULL);
+       MMIO_RING_DFH(RING_ACTHD, D_ALL, F_CMD_ACCESS, mmio_read_from_hw, NULL);
        MMIO_RING_GM_RDR(RING_START, D_ALL, NULL, NULL);
 
        /* RING MODE */
@@ -1662,9 +1652,9 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
        MMIO_RING_DFH(RING_INSTPM, D_ALL, F_MODE_MASK | F_CMD_ACCESS,
                        NULL, NULL);
        MMIO_RING_DFH(RING_TIMESTAMP, D_ALL, F_CMD_ACCESS,
-                       ring_timestamp_mmio_read, NULL);
+                       mmio_read_from_hw, NULL);
        MMIO_RING_DFH(RING_TIMESTAMP_UDW, D_ALL, F_CMD_ACCESS,
-                       ring_timestamp_mmio_read, NULL);
+                       mmio_read_from_hw, NULL);
 
        MMIO_DFH(GEN7_GT_MODE, D_ALL, F_MODE_MASK | F_CMD_ACCESS, NULL, NULL);
        MMIO_DFH(CACHE_MODE_0_GEN7, D_ALL, F_MODE_MASK | F_CMD_ACCESS,
@@ -2411,9 +2401,6 @@ static int init_broadwell_mmio_info(struct intel_gvt *gvt)
        struct drm_i915_private *dev_priv = gvt->dev_priv;
        int ret;
 
-       MMIO_DFH(RING_IMR(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_CMD_ACCESS, NULL,
-                       intel_vgpu_reg_imr_handler);
-
        MMIO_DH(GEN8_GT_IMR(0), D_BDW_PLUS, NULL, intel_vgpu_reg_imr_handler);
        MMIO_DH(GEN8_GT_IER(0), D_BDW_PLUS, NULL, intel_vgpu_reg_ier_handler);
        MMIO_DH(GEN8_GT_IIR(0), D_BDW_PLUS, NULL, intel_vgpu_reg_iir_handler);
@@ -2476,68 +2463,34 @@ static int init_broadwell_mmio_info(struct intel_gvt *gvt)
        MMIO_DH(GEN8_MASTER_IRQ, D_BDW_PLUS, NULL,
                intel_vgpu_reg_master_irq_handler);
 
-       MMIO_DFH(RING_HWSTAM(GEN8_BSD2_RING_BASE), D_BDW_PLUS,
-               F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(0x1c134, D_BDW_PLUS, F_CMD_ACCESS, NULL, NULL);
-
-       MMIO_DFH(RING_TAIL(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_CMD_ACCESS,
-               NULL, NULL);
-       MMIO_DFH(RING_HEAD(GEN8_BSD2_RING_BASE),  D_BDW_PLUS,
-               F_CMD_ACCESS, NULL, NULL);
-       MMIO_GM_RDR(RING_START(GEN8_BSD2_RING_BASE), D_BDW_PLUS, NULL, NULL);
-       MMIO_DFH(RING_CTL(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_CMD_ACCESS,
-               NULL, NULL);
-       MMIO_DFH(RING_ACTHD(GEN8_BSD2_RING_BASE), D_BDW_PLUS,
-               F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(RING_ACTHD_UDW(GEN8_BSD2_RING_BASE), D_BDW_PLUS,
-               F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(0x1c29c, D_BDW_PLUS, F_MODE_MASK | F_CMD_ACCESS, NULL,
-               ring_mode_mmio_write);
-       MMIO_DFH(RING_MI_MODE(GEN8_BSD2_RING_BASE), D_BDW_PLUS,
-               F_MODE_MASK | F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(RING_INSTPM(GEN8_BSD2_RING_BASE), D_BDW_PLUS,
-               F_MODE_MASK | F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(RING_TIMESTAMP(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_CMD_ACCESS,
-                       ring_timestamp_mmio_read, NULL);
-
-       MMIO_RING_DFH(RING_ACTHD_UDW, D_BDW_PLUS, F_CMD_ACCESS, NULL, NULL);
+       MMIO_RING_DFH(RING_ACTHD_UDW, D_BDW_PLUS, F_CMD_ACCESS,
+               mmio_read_from_hw, NULL);
 
 #define RING_REG(base) (base + 0xd0)
        MMIO_RING_F(RING_REG, 4, F_RO, 0,
                ~_MASKED_BIT_ENABLE(RESET_CTL_REQUEST_RESET), D_BDW_PLUS, NULL,
                ring_reset_ctl_write);
-       MMIO_F(RING_REG(GEN8_BSD2_RING_BASE), 4, F_RO, 0,
-               ~_MASKED_BIT_ENABLE(RESET_CTL_REQUEST_RESET), D_BDW_PLUS, NULL,
-               ring_reset_ctl_write);
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x230)
        MMIO_RING_DFH(RING_REG, D_BDW_PLUS, 0, NULL, elsp_mmio_write);
-       MMIO_DH(RING_REG(GEN8_BSD2_RING_BASE), D_BDW_PLUS, NULL, elsp_mmio_write);
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x234)
        MMIO_RING_F(RING_REG, 8, F_RO | F_CMD_ACCESS, 0, ~0, D_BDW_PLUS,
                NULL, NULL);
-       MMIO_F(RING_REG(GEN8_BSD2_RING_BASE), 4, F_RO | F_CMD_ACCESS, 0,
-               ~0LL, D_BDW_PLUS, NULL, NULL);
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x244)
        MMIO_RING_DFH(RING_REG, D_BDW_PLUS, F_CMD_ACCESS, NULL, NULL);
-       MMIO_DFH(RING_REG(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_CMD_ACCESS,
-               NULL, NULL);
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x370)
        MMIO_RING_F(RING_REG, 48, F_RO, 0, ~0, D_BDW_PLUS, NULL, NULL);
-       MMIO_F(RING_REG(GEN8_BSD2_RING_BASE), 48, F_RO, 0, ~0, D_BDW_PLUS,
-                       NULL, NULL);
 #undef RING_REG
 
 #define RING_REG(base) (base + 0x3a0)
        MMIO_RING_DFH(RING_REG, D_BDW_PLUS, F_MODE_MASK, NULL, NULL);
-       MMIO_DFH(RING_REG(GEN8_BSD2_RING_BASE), D_BDW_PLUS, F_MODE_MASK, NULL, NULL);
 #undef RING_REG
 
        MMIO_D(PIPEMISC(PIPE_A), D_BDW_PLUS);
@@ -2557,11 +2510,9 @@ static int init_broadwell_mmio_info(struct intel_gvt *gvt)
 
 #define RING_REG(base) (base + 0x270)
        MMIO_RING_F(RING_REG, 32, 0, 0, 0, D_BDW_PLUS, NULL, NULL);
-       MMIO_F(RING_REG(GEN8_BSD2_RING_BASE), 32, 0, 0, 0, D_BDW_PLUS, NULL, NULL);
 #undef RING_REG
 
        MMIO_RING_GM_RDR(RING_HWS_PGA, D_BDW_PLUS, NULL, NULL);
-       MMIO_GM_RDR(RING_HWS_PGA(GEN8_BSD2_RING_BASE), D_BDW_PLUS, NULL, NULL);
 
        MMIO_DFH(HDC_CHICKEN0, D_BDW_PLUS, F_MODE_MASK | F_CMD_ACCESS, NULL, NULL);
 
@@ -2849,7 +2800,6 @@ static int init_skl_mmio_info(struct intel_gvt *gvt)
        MMIO_D(0x65f08, D_SKL | D_KBL);
        MMIO_D(0x320f0, D_SKL | D_KBL);
 
-       MMIO_DFH(_REG_VCS2_EXCC, D_SKL_PLUS, F_CMD_ACCESS, NULL, NULL);
        MMIO_D(0x70034, D_SKL_PLUS);
        MMIO_D(0x71034, D_SKL_PLUS);
        MMIO_D(0x72034, D_SKL_PLUS);
index fbd023a16f18163d6dcb52bcf795675e3c16a4f7..7d01c77a0f7ac61212d17c901860b2ef5e6fab63 100644 (file)
@@ -54,9 +54,6 @@
 
 #define VGT_SPRSTRIDE(pipe)    _PIPE(pipe, _SPRA_STRIDE, _PLANE_STRIDE_2_B)
 
-#define _REG_VECS_EXCC         0x1A028
-#define _REG_VCS2_EXCC         0x1c028
-
 #define _REG_701C0(pipe, plane) (0x701c0 + pipe * 0x1000 + (plane - 1) * 0x100)
 #define _REG_701C4(pipe, plane) (0x701c4 + pipe * 0x1000 + (plane - 1) * 0x100)
 
index 436377da41baced8e81352587cc3e035d0dc1ba3..03532dfc0cd51b8342e50da61524024dafc8ac34 100644 (file)
@@ -308,20 +308,8 @@ static int tbs_sched_init_vgpu(struct intel_vgpu *vgpu)
 
 static void tbs_sched_clean_vgpu(struct intel_vgpu *vgpu)
 {
-       struct intel_gvt_workload_scheduler *scheduler = &vgpu->gvt->scheduler;
-       int ring_id;
-
        kfree(vgpu->sched_data);
        vgpu->sched_data = NULL;
-
-       spin_lock_bh(&scheduler->mmio_context_lock);
-       for (ring_id = 0; ring_id < I915_NUM_ENGINES; ring_id++) {
-               if (scheduler->engine_owner[ring_id] == vgpu) {
-                       intel_gvt_switch_mmio(vgpu, NULL, ring_id);
-                       scheduler->engine_owner[ring_id] = NULL;
-               }
-       }
-       spin_unlock_bh(&scheduler->mmio_context_lock);
 }
 
 static void tbs_sched_start_schedule(struct intel_vgpu *vgpu)
@@ -388,6 +376,7 @@ void intel_vgpu_stop_schedule(struct intel_vgpu *vgpu)
 {
        struct intel_gvt_workload_scheduler *scheduler =
                &vgpu->gvt->scheduler;
+       int ring_id;
 
        gvt_dbg_core("vgpu%d: stop schedule\n", vgpu->id);
 
@@ -401,4 +390,13 @@ void intel_vgpu_stop_schedule(struct intel_vgpu *vgpu)
                scheduler->need_reschedule = true;
                scheduler->current_vgpu = NULL;
        }
+
+       spin_lock_bh(&scheduler->mmio_context_lock);
+       for (ring_id = 0; ring_id < I915_NUM_ENGINES; ring_id++) {
+               if (scheduler->engine_owner[ring_id] == vgpu) {
+                       intel_gvt_switch_mmio(vgpu, NULL, ring_id);
+                       scheduler->engine_owner[ring_id] = NULL;
+               }
+       }
+       spin_unlock_bh(&scheduler->mmio_context_lock);
 }
index 0d431a968a32970f07cda55bb37f55a0634afc98..93a49eb0209ee645818a673a07d8a31291840ce7 100644 (file)
@@ -68,6 +68,7 @@ struct shadow_indirect_ctx {
 struct shadow_per_ctx {
        unsigned long guest_gma;
        unsigned long shadow_gma;
+       unsigned valid;
 };
 
 struct intel_shadow_wa_ctx {
index 19404c96eeb10670da75ce5426c96c10f6a5d7e1..dc1faa49687d148876b1089e517af3e66e110d6a 100644 (file)
@@ -2214,8 +2214,10 @@ static void __i915_gem_object_reset_page_iter(struct drm_i915_gem_object *obj)
        struct radix_tree_iter iter;
        void __rcu **slot;
 
+       rcu_read_lock();
        radix_tree_for_each_slot(slot, &obj->mm.get_page.radix, &iter, 0)
                radix_tree_delete(&obj->mm.get_page.radix, iter.index);
+       rcu_read_unlock();
 }
 
 void __i915_gem_object_put_pages(struct drm_i915_gem_object *obj,
@@ -2657,6 +2659,9 @@ i915_gem_object_pwrite_gtt(struct drm_i915_gem_object *obj,
        if (READ_ONCE(obj->mm.pages))
                return -ENODEV;
 
+       if (obj->mm.madv != I915_MADV_WILLNEED)
+               return -EFAULT;
+
        /* Before the pages are instantiated the object is treated as being
         * in the CPU domain. The pages will be clflushed as required before
         * use, and we can freely write into the pages directly. If userspace
@@ -3013,10 +3018,15 @@ void i915_gem_reset_finish(struct drm_i915_private *dev_priv)
 
 static void nop_submit_request(struct drm_i915_gem_request *request)
 {
+       unsigned long flags;
+
        GEM_BUG_ON(!i915_terminally_wedged(&request->i915->gpu_error));
        dma_fence_set_error(&request->fence, -EIO);
-       i915_gem_request_submit(request);
+
+       spin_lock_irqsave(&request->engine->timeline->lock, flags);
+       __i915_gem_request_submit(request);
        intel_engine_init_global_seqno(request->engine, request->global_seqno);
+       spin_unlock_irqrestore(&request->engine->timeline->lock, flags);
 }
 
 static void engine_set_wedged(struct intel_engine_cs *engine)
index 58a2a44f88bd0067059fb8695a087c04968ecb3d..8afd2ce59b8d5050161bdd13611fcec4602a5321 100644 (file)
@@ -104,6 +104,7 @@ static void lut_close(struct i915_gem_context *ctx)
                kmem_cache_free(ctx->i915->luts, lut);
        }
 
+       rcu_read_lock();
        radix_tree_for_each_slot(slot, &ctx->handles_vma, &iter, 0) {
                struct i915_vma *vma = rcu_dereference_raw(*slot);
                struct drm_i915_gem_object *obj = vma->obj;
@@ -115,6 +116,7 @@ static void lut_close(struct i915_gem_context *ctx)
 
                __i915_gem_object_release_unless_active(obj);
        }
+       rcu_read_unlock();
 }
 
 static void i915_gem_context_free(struct i915_gem_context *ctx)
index 4df039ef2ce316509ecc6faa04e707d135acf507..e161d383b526757a79097eadb9e65260392befe1 100644 (file)
 #include "intel_drv.h"
 #include "i915_trace.h"
 
-static bool ggtt_is_idle(struct drm_i915_private *dev_priv)
+static bool ggtt_is_idle(struct drm_i915_private *i915)
 {
-       struct i915_ggtt *ggtt = &dev_priv->ggtt;
-       struct intel_engine_cs *engine;
-       enum intel_engine_id id;
+       struct intel_engine_cs *engine;
+       enum intel_engine_id id;
 
-       for_each_engine(engine, dev_priv, id) {
-               struct intel_timeline *tl;
+       if (i915->gt.active_requests)
+              return false;
 
-               tl = &ggtt->base.timeline.engine[engine->id];
-               if (i915_gem_active_isset(&tl->last_request))
-                       return false;
-       }
+       for_each_engine(engine, i915, id) {
+              if (engine->last_retired_context != i915->kernel_context)
+                      return false;
+       }
 
-       return true;
+       return true;
 }
 
 static int ggtt_flush(struct drm_i915_private *i915)
@@ -157,7 +156,8 @@ i915_gem_evict_something(struct i915_address_space *vm,
                                    min_size, alignment, cache_level,
                                    start, end, mode);
 
-       /* Retire before we search the active list. Although we have
+       /*
+        * Retire before we search the active list. Although we have
         * reasonable accuracy in our retirement lists, we may have
         * a stray pin (preventing eviction) that can only be resolved by
         * retiring.
@@ -182,7 +182,8 @@ search_again:
                BUG_ON(ret);
        }
 
-       /* Can we unpin some objects such as idle hw contents,
+       /*
+        * Can we unpin some objects such as idle hw contents,
         * or pending flips? But since only the GGTT has global entries
         * such as scanouts, rinbuffers and contexts, we can skip the
         * purge when inspecting per-process local address spaces.
@@ -190,19 +191,33 @@ search_again:
        if (!i915_is_ggtt(vm) || flags & PIN_NONBLOCK)
                return -ENOSPC;
 
-       if (ggtt_is_idle(dev_priv)) {
-               /* If we still have pending pageflip completions, drop
-                * back to userspace to give our workqueues time to
-                * acquire our locks and unpin the old scanouts.
-                */
-               return intel_has_pending_fb_unpin(dev_priv) ? -EAGAIN : -ENOSPC;
-       }
+       /*
+        * Not everything in the GGTT is tracked via VMA using
+        * i915_vma_move_to_active(), otherwise we could evict as required
+        * with minimal stalling. Instead we are forced to idle the GPU and
+        * explicitly retire outstanding requests which will then remove
+        * the pinning for active objects such as contexts and ring,
+        * enabling us to evict them on the next iteration.
+        *
+        * To ensure that all user contexts are evictable, we perform
+        * a switch to the perma-pinned kernel context. This all also gives
+        * us a termination condition, when the last retired context is
+        * the kernel's there is no more we can evict.
+        */
+       if (!ggtt_is_idle(dev_priv)) {
+               ret = ggtt_flush(dev_priv);
+               if (ret)
+                       return ret;
 
-       ret = ggtt_flush(dev_priv);
-       if (ret)
-               return ret;
+               goto search_again;
+       }
 
-       goto search_again;
+       /*
+        * If we still have pending pageflip completions, drop
+        * back to userspace to give our workqueues time to
+        * acquire our locks and unpin the old scanouts.
+        */
+       return intel_has_pending_fb_unpin(dev_priv) ? -EAGAIN : -ENOSPC;
 
 found:
        /* drm_mm doesn't allow any other other operations while
index 92437f455b43ca1a23c28935337cb7eba124aa58..4ac454ae54d73068ef3b79b673ad0c7c0e4e00cc 100644 (file)
@@ -337,6 +337,10 @@ eb_vma_misplaced(const struct drm_i915_gem_exec_object2 *entry,
            (vma->node.start + vma->node.size - 1) >> 32)
                return true;
 
+       if (flags & __EXEC_OBJECT_NEEDS_MAP &&
+           !i915_vma_is_map_and_fenceable(vma))
+               return true;
+
        return false;
 }
 
index e21ce9c18b6eee10ad8556d5fb310cd544987c88..b63893eeca73ddf78070bbecf055f6560f8636b7 100644 (file)
@@ -839,7 +839,6 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
                                                                pipe);
        int position;
        int vbl_start, vbl_end, hsync_start, htotal, vtotal;
-       bool in_vbl = true;
        unsigned long irqflags;
 
        if (WARN_ON(!mode->crtc_clock)) {
@@ -922,8 +921,6 @@ static bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
 
        spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
 
-       in_vbl = position >= vbl_start && position < vbl_end;
-
        /*
         * While in vblank, position will be negative
         * counting up towards 0 at vbl_end. And outside
index 94185d610673a77d17bf0bfb5796fbac4df2a05d..370b9d248fed89abe2b3601063ddffd27661c76e 100644 (file)
@@ -2537,6 +2537,10 @@ static const struct file_operations fops = {
        .poll           = i915_perf_poll,
        .read           = i915_perf_read,
        .unlocked_ioctl = i915_perf_ioctl,
+       /* Our ioctl have no arguments, so it's safe to use the same function
+        * to handle 32bits compatibility.
+        */
+       .compat_ioctl   = i915_perf_ioctl,
 };
 
 
index ed7cd9ee2c2af89737b2cc4618317c4d2fc9bedd..c9bcc6c450126e7cf638ba1c872a55938660add8 100644 (file)
@@ -6998,6 +6998,7 @@ enum {
  */
 #define  L3_GENERAL_PRIO_CREDITS(x)            (((x) >> 1) << 19)
 #define  L3_HIGH_PRIO_CREDITS(x)               (((x) >> 1) << 14)
+#define  L3_PRIO_CREDITS_MASK                  ((0x1f << 19) | (0x1f << 14))
 
 #define GEN7_L3CNTLREG1                                _MMIO(0xB01C)
 #define  GEN7_WA_FOR_GEN7_L3_CONTROL                   0x3C47FF8C
index 6fd5c57e21f6cb29f41138c3d02f17702d6e0c59..ef72da74b87f73f484d5b6f4322d457967e36f85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_I915_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
 #define _I915_TRACE_H_
 
index f1df2bd4ecf4cc37010ccb990614dcacde0936e9..463a7177997cf4990ff97bedd39d21187d344a95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright © 2009 Intel Corporation
  *
index 42fb436f6cdc9dc410681d4af0d5f4148b58dc07..d1abf4bb7c819ca34426aed485cdf4142f2294eb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Intel ACPI functions
  *
index d805b6e6fe71467ed4f9a85a74fdba1b5ed81998..27743be5b768e13c4be9749537b1af76dfb3f478 100644 (file)
@@ -606,11 +606,6 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder,
                         connector->encoder->base.id,
                         connector->encoder->name);
 
-       /* ELD Conn_Type */
-       connector->eld[5] &= ~(3 << 2);
-       if (intel_crtc_has_dp_encoder(crtc_state))
-               connector->eld[5] |= (1 << 2);
-
        connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
 
        if (dev_priv->display.audio_codec_enable)
index 183e87e8ea319ee7b4c8cb67dadbe6aaf159f106..5d4cd3d00564ce7a95bd02a7a5f56fbcb191337d 100644 (file)
@@ -1163,6 +1163,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
        is_hdmi = is_dvi && (child->common.device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
        is_edp = is_dp && (child->common.device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
 
+       if (port == PORT_A && is_dvi) {
+               DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
+                             is_hdmi ? "/HDMI" : "");
+               is_dvi = false;
+               is_hdmi = false;
+       }
+
        info->supports_dvi = is_dvi;
        info->supports_hdmi = is_hdmi;
        info->supports_dp = is_dp;
@@ -1233,7 +1240,7 @@ static void parse_ddi_ports(struct drm_i915_private *dev_priv,
 {
        enum port port;
 
-       if (!HAS_DDI(dev_priv))
+       if (!HAS_DDI(dev_priv) && !IS_CHERRYVIEW(dev_priv))
                return;
 
        if (!dev_priv->vbt.child_dev_num)
index ff9ecd211abbb07fd8bae3fb6d55a8c33b23770d..b8315bca852b56061ff4cf598245f7902722c09f 100644 (file)
@@ -74,7 +74,7 @@
 #define I9XX_CSC_COEFF_1_0             \
        ((7 << 12) | I9XX_CSC_COEFF_FP(CTM_COEFF_1_0, 8))
 
-static bool crtc_state_is_legacy(struct drm_crtc_state *state)
+static bool crtc_state_is_legacy_gamma(struct drm_crtc_state *state)
 {
        return !state->degamma_lut &&
                !state->ctm &&
@@ -288,7 +288,7 @@ static void cherryview_load_csc_matrix(struct drm_crtc_state *state)
        }
 
        mode = (state->ctm ? CGM_PIPE_MODE_CSC : 0);
-       if (!crtc_state_is_legacy(state)) {
+       if (!crtc_state_is_legacy_gamma(state)) {
                mode |= (state->degamma_lut ? CGM_PIPE_MODE_DEGAMMA : 0) |
                        (state->gamma_lut ? CGM_PIPE_MODE_GAMMA : 0);
        }
@@ -469,7 +469,7 @@ static void broadwell_load_luts(struct drm_crtc_state *state)
        struct intel_crtc_state *intel_state = to_intel_crtc_state(state);
        enum pipe pipe = to_intel_crtc(state->crtc)->pipe;
 
-       if (crtc_state_is_legacy(state)) {
+       if (crtc_state_is_legacy_gamma(state)) {
                haswell_load_luts(state);
                return;
        }
@@ -529,7 +529,7 @@ static void glk_load_luts(struct drm_crtc_state *state)
 
        glk_load_degamma_lut(state);
 
-       if (crtc_state_is_legacy(state)) {
+       if (crtc_state_is_legacy_gamma(state)) {
                haswell_load_luts(state);
                return;
        }
@@ -551,7 +551,7 @@ static void cherryview_load_luts(struct drm_crtc_state *state)
        uint32_t i, lut_size;
        uint32_t word0, word1;
 
-       if (crtc_state_is_legacy(state)) {
+       if (crtc_state_is_legacy_gamma(state)) {
                /* Turn off degamma/gamma on CGM block. */
                I915_WRITE(CGM_PIPE_MODE(pipe),
                           (state->ctm ? CGM_PIPE_MODE_CSC : 0));
@@ -632,12 +632,10 @@ int intel_color_check(struct drm_crtc *crtc,
                return 0;
 
        /*
-        * We also allow no degamma lut and a gamma lut at the legacy
+        * We also allow no degamma lut/ctm and a gamma lut at the legacy
         * size (256 entries).
         */
-       if (!crtc_state->degamma_lut &&
-           crtc_state->gamma_lut &&
-           crtc_state->gamma_lut->length == LEGACY_LUT_LENGTH)
+       if (crtc_state_is_legacy_gamma(crtc_state))
                return 0;
 
        return -EINVAL;
index 965988f79a558aaa933a546fb69b72f0ef81cc29..92c1f8e166dc55381ab77bb92b680909131ffc4f 100644 (file)
@@ -216,7 +216,7 @@ static void gen9_set_dc_state_debugmask(struct drm_i915_private *dev_priv)
 
        mask = DC_STATE_DEBUG_MASK_MEMORY_UP;
 
-       if (IS_BROXTON(dev_priv))
+       if (IS_GEN9_LP(dev_priv))
                mask |= DC_STATE_DEBUG_MASK_CORES;
 
        /* The below bit doesn't need to be cleared ever afterwards */
index 4b4fd1f8110b2f886d5c1299367dbea74eef77cb..5e5fe03b638cbf2ee17206ccd4c6ee985134645e 100644 (file)
@@ -664,8 +664,8 @@ intel_ddi_get_buf_trans_fdi(struct drm_i915_private *dev_priv,
                            int *n_entries)
 {
        if (IS_BROADWELL(dev_priv)) {
-               *n_entries = ARRAY_SIZE(hsw_ddi_translations_fdi);
-               return hsw_ddi_translations_fdi;
+               *n_entries = ARRAY_SIZE(bdw_ddi_translations_fdi);
+               return bdw_ddi_translations_fdi;
        } else if (IS_HASWELL(dev_priv)) {
                *n_entries = ARRAY_SIZE(hsw_ddi_translations_fdi);
                return hsw_ddi_translations_fdi;
@@ -1655,7 +1655,8 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder,
 out:
        if (ret && IS_GEN9_LP(dev_priv)) {
                tmp = I915_READ(BXT_PHY_CTL(port));
-               if ((tmp & (BXT_PHY_LANE_POWERDOWN_ACK |
+               if ((tmp & (BXT_PHY_CMNLANE_POWERDOWN_ACK |
+                           BXT_PHY_LANE_POWERDOWN_ACK |
                            BXT_PHY_LANE_ENABLED)) != BXT_PHY_LANE_ENABLED)
                        DRM_ERROR("Port %c enabled but PHY powered down? "
                                  "(PHY_CTL %08x)\n", port_name(port), tmp);
@@ -2101,8 +2102,7 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder,
                 * register writes.
                 */
                val = I915_READ(DPCLKA_CFGCR0);
-               val &= ~(DPCLKA_CFGCR0_DDI_CLK_OFF(port) |
-                        DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port));
+               val &= ~DPCLKA_CFGCR0_DDI_CLK_OFF(port);
                I915_WRITE(DPCLKA_CFGCR0, val);
        } else if (IS_GEN9_BC(dev_priv)) {
                /* DDI -> PLL mapping  */
index f17275519484bd8f598401269959c038fe139171..5ebdb63330ddf13af590fee88fda5eb9139f80bb 100644 (file)
@@ -10245,13 +10245,10 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
        struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-       enum transcoder cpu_transcoder = intel_crtc->config->cpu_transcoder;
+       enum transcoder cpu_transcoder;
        struct drm_display_mode *mode;
        struct intel_crtc_state *pipe_config;
-       int htot = I915_READ(HTOTAL(cpu_transcoder));
-       int hsync = I915_READ(HSYNC(cpu_transcoder));
-       int vtot = I915_READ(VTOTAL(cpu_transcoder));
-       int vsync = I915_READ(VSYNC(cpu_transcoder));
+       u32 htot, hsync, vtot, vsync;
        enum pipe pipe = intel_crtc->pipe;
 
        mode = kzalloc(sizeof(*mode), GFP_KERNEL);
@@ -10279,6 +10276,13 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
        i9xx_crtc_clock_get(intel_crtc, pipe_config);
 
        mode->clock = pipe_config->port_clock / pipe_config->pixel_multiplier;
+
+       cpu_transcoder = pipe_config->cpu_transcoder;
+       htot = I915_READ(HTOTAL(cpu_transcoder));
+       hsync = I915_READ(HSYNC(cpu_transcoder));
+       vtot = I915_READ(VTOTAL(cpu_transcoder));
+       vsync = I915_READ(VSYNC(cpu_transcoder));
+
        mode->hdisplay = (htot & 0xffff) + 1;
        mode->htotal = ((htot & 0xffff0000) >> 16) + 1;
        mode->hsync_start = (hsync & 0xffff) + 1;
@@ -12359,7 +12363,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
        struct drm_crtc_state *old_crtc_state, *new_crtc_state;
        struct drm_crtc *crtc;
        struct intel_crtc_state *intel_cstate;
-       bool hw_check = intel_state->modeset;
        u64 put_domains[I915_MAX_PIPES] = {};
        unsigned crtc_vblank_mask = 0;
        int i;
@@ -12376,7 +12379,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 
                if (needs_modeset(new_crtc_state) ||
                    to_intel_crtc_state(new_crtc_state)->update_pipe) {
-                       hw_check = true;
 
                        put_domains[to_intel_crtc(crtc)->pipe] =
                                modeset_get_crtc_power_domains(crtc,
@@ -14030,7 +14032,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
                if (mode_cmd->handles[i] != mode_cmd->handles[0]) {
                        DRM_DEBUG_KMS("bad plane %d handle\n", i);
-                       return -EINVAL;
+                       goto err;
                }
 
                stride_alignment = intel_fb_stride_alignment(fb, i);
@@ -15225,6 +15227,23 @@ void intel_connector_unregister(struct drm_connector *connector)
        intel_panel_destroy_backlight(connector);
 }
 
+static void intel_hpd_poll_fini(struct drm_device *dev)
+{
+       struct intel_connector *connector;
+       struct drm_connector_list_iter conn_iter;
+
+       /* First disable polling... */
+       drm_kms_helper_poll_fini(dev);
+
+       /* Then kill the work that may have been queued by hpd. */
+       drm_connector_list_iter_begin(dev, &conn_iter);
+       for_each_intel_connector_iter(connector, &conn_iter) {
+               if (connector->modeset_retry_work.func)
+                       cancel_work_sync(&connector->modeset_retry_work);
+       }
+       drm_connector_list_iter_end(&conn_iter);
+}
+
 void intel_modeset_cleanup(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
@@ -15245,7 +15264,7 @@ void intel_modeset_cleanup(struct drm_device *dev)
         * Due to the hpd irq storm handling the hotplug work can re-arm the
         * poll handlers. Hence disable polling after hpd handling is shut down.
         */
-       drm_kms_helper_poll_fini(dev);
+       intel_hpd_poll_fini(dev);
 
        /* poll work can call into fbdev, hence clean that up afterwards */
        intel_fbdev_fini(dev_priv);
index 64134947c0aae4e478767d3347f5ac73d8d87aa5..09f274419eea1c7466b2ff6b846b4cc41aeae3d0 100644 (file)
@@ -2307,8 +2307,8 @@ static void edp_panel_off(struct intel_dp *intel_dp)
        I915_WRITE(pp_ctrl_reg, pp);
        POSTING_READ(pp_ctrl_reg);
 
-       intel_dp->panel_power_off_time = ktime_get_boottime();
        wait_panel_off(intel_dp);
+       intel_dp->panel_power_off_time = ktime_get_boottime();
 
        /* We got a reference when we enabled the VDD. */
        intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
@@ -3731,9 +3731,16 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 
        }
 
-       /* Read the eDP Display control capabilities registers */
-       if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
-           drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
+       /*
+        * Read the eDP display control registers.
+        *
+        * Do this independent of DP_DPCD_DISPLAY_CONTROL_CAPABLE bit in
+        * DP_EDP_CONFIGURATION_CAP, because some buggy displays do not have it
+        * set, but require eDP 1.4+ detection (e.g. for supported link rates
+        * method). The display control registers should read zero if they're
+        * not supported anyway.
+        */
+       if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
                             intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
                             sizeof(intel_dp->edp_dpcd))
                DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),
@@ -5273,7 +5280,7 @@ intel_dp_init_panel_power_sequencer(struct drm_device *dev,
         * seems sufficient to avoid this problem.
         */
        if (dev_priv->quirks & QUIRK_INCREASE_T12_DELAY) {
-               vbt.t11_t12 = max_t(u16, vbt.t11_t12, 900 * 10);
+               vbt.t11_t12 = max_t(u16, vbt.t11_t12, 1300 * 10);
                DRM_DEBUG_KMS("Increasing T12 panel delay as per the quirk to %d\n",
                              vbt.t11_t12);
        }
index 09b6709297867d6751957dc12541812fe3f30344..de38d014ed39b937abc348988830a2f188815901 100644 (file)
@@ -208,12 +208,6 @@ static const struct bxt_ddi_phy_info glk_ddi_phy_info[] = {
        },
 };
 
-static u32 bxt_phy_port_mask(const struct bxt_ddi_phy_info *phy_info)
-{
-       return (phy_info->dual_channel * BIT(phy_info->channel[DPIO_CH1].port)) |
-               BIT(phy_info->channel[DPIO_CH0].port);
-}
-
 static const struct bxt_ddi_phy_info *
 bxt_get_phy_list(struct drm_i915_private *dev_priv, int *count)
 {
@@ -313,7 +307,6 @@ bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
                            enum dpio_phy phy)
 {
        const struct bxt_ddi_phy_info *phy_info;
-       enum port port;
 
        phy_info = bxt_get_phy_info(dev_priv, phy);
 
@@ -335,19 +328,6 @@ bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
                return false;
        }
 
-       for_each_port_masked(port, bxt_phy_port_mask(phy_info)) {
-               u32 tmp = I915_READ(BXT_PHY_CTL(port));
-
-               if (tmp & BXT_PHY_CMNLANE_POWERDOWN_ACK) {
-                       DRM_DEBUG_DRIVER("DDI PHY %d powered, but common lane "
-                                        "for port %c powered down "
-                                        "(PHY_CTL %08x)\n",
-                                        phy, port_name(port), tmp);
-
-                       return false;
-               }
-       }
-
        return true;
 }
 
index a2a3d93d67bd252a3c9d137bedb66be26816bd23..df808a94c51194a886d8664ff8b8118ad05870ef 100644 (file)
@@ -1996,7 +1996,7 @@ static void cnl_ddi_pll_enable(struct drm_i915_private *dev_priv,
 
        /* 3. Configure DPLL_CFGCR0 */
        /* Avoid touch CFGCR1 if HDMI mode is not enabled */
-       if (pll->state.hw_state.cfgcr0 & DPLL_CTRL1_HDMI_MODE(pll->id)) {
+       if (pll->state.hw_state.cfgcr0 & DPLL_CFGCR0_HDMI_MODE) {
                val = pll->state.hw_state.cfgcr1;
                I915_WRITE(CNL_DPLL_CFGCR1(pll->id), val);
                /* 4. Reab back to ensure writes completed */
index fa47285918f4d9fcbf67941a449fdd4c1e9b0552..79fbaf78f6044b33dcc8b4429efc41972a65c67d 100644 (file)
@@ -496,7 +496,6 @@ struct intel_crtc_scaler_state {
 
 struct intel_pipe_wm {
        struct intel_wm_level wm[5];
-       struct intel_wm_level raw_wm[5];
        uint32_t linetime;
        bool fbc_wm_enabled;
        bool pipe_enabled;
index f0c11aec5ea5c99933f4243d9ce408692cd66cda..7442891762be4e486f8e1bd4c4f9a365819d7c88 100644 (file)
@@ -892,8 +892,6 @@ static void intel_dsi_disable(struct intel_encoder *encoder,
                              struct intel_crtc_state *old_crtc_state,
                              struct drm_connector_state *old_conn_state)
 {
-       struct drm_device *dev = encoder->base.dev;
-       struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
        enum port port;
 
@@ -902,15 +900,6 @@ static void intel_dsi_disable(struct intel_encoder *encoder,
        intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_OFF);
        intel_panel_disable_backlight(old_conn_state);
 
-       /*
-        * Disable Device ready before the port shutdown in order
-        * to avoid split screen
-        */
-       if (IS_BROXTON(dev_priv)) {
-               for_each_dsi_port(port, intel_dsi->ports)
-                       I915_WRITE(MIPI_DEVICE_READY(port), 0);
-       }
-
        /*
         * According to the spec we should send SHUTDOWN before
         * MIPI_SEQ_DISPLAY_OFF only for v3+ VBTs, but field testing
index 9ab5969413722a5999a4266629ea2ba0fc2305f0..3c2d9cf22ed5a537253a14c2fe85ee200ce7b24c 100644 (file)
@@ -1048,9 +1048,12 @@ static int bxt_init_workarounds(struct intel_engine_cs *engine)
        }
 
        /* WaProgramL3SqcReg1DefaultForPerf:bxt */
-       if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
-               I915_WRITE(GEN8_L3SQCREG1, L3_GENERAL_PRIO_CREDITS(62) |
-                                          L3_HIGH_PRIO_CREDITS(2));
+       if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER)) {
+               u32 val = I915_READ(GEN8_L3SQCREG1);
+               val &= ~L3_PRIO_CREDITS_MASK;
+               val |= L3_GENERAL_PRIO_CREDITS(62) | L3_HIGH_PRIO_CREDITS(2);
+               I915_WRITE(GEN8_L3SQCREG1, val);
+       }
 
        /* WaToEnableHwFixForPushConstHWBug:bxt */
        if (IS_BXT_REVID(dev_priv, BXT_REVID_C0, REVID_FOREVER))
index 951e834dd2744f7f2fe84a54723136f743d185cf..28a778b785ac9e02ea7de55878e5fec98f019b98 100644 (file)
 #include "intel_drv.h"
 #include "i915_drv.h"
 
+static void intel_connector_update_eld_conn_type(struct drm_connector *connector)
+{
+       u8 conn_type;
+
+       if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
+           connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
+               conn_type = DRM_ELD_CONN_TYPE_DP;
+       } else {
+               conn_type = DRM_ELD_CONN_TYPE_HDMI;
+       }
+
+       connector->eld[DRM_ELD_SAD_COUNT_CONN_TYPE] &= ~DRM_ELD_CONN_TYPE_MASK;
+       connector->eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= conn_type;
+}
+
 /**
  * intel_connector_update_modes - update connector from edid
  * @connector: DRM connector device to use
@@ -44,6 +59,8 @@ int intel_connector_update_modes(struct drm_connector *connector,
        ret = drm_add_edid_modes(connector, edid);
        drm_edid_to_eld(connector, edid);
 
+       intel_connector_update_eld_conn_type(connector);
+
        return ret;
 }
 
index a17b1de7d7e0edf9ec2f605a2d257227587599ba..3b1c5d783ee7ccf12fc9d0cda009ab695fef4e57 100644 (file)
@@ -1699,6 +1699,8 @@ bxt_setup_backlight(struct intel_connector *connector, enum pipe unused)
        if (!panel->backlight.max)
                return -ENODEV;
 
+       panel->backlight.min = get_backlight_min_vbt(connector);
+
        val = bxt_get_backlight(connector);
        val = intel_panel_compute_brightness(connector, val);
        panel->backlight.level = clamp(val, panel->backlight.min,
@@ -1735,6 +1737,8 @@ cnp_setup_backlight(struct intel_connector *connector, enum pipe unused)
        if (!panel->backlight.max)
                return -ENODEV;
 
+       panel->backlight.min = get_backlight_min_vbt(connector);
+
        val = bxt_get_backlight(connector);
        val = intel_panel_compute_brightness(connector, val);
        panel->backlight.level = clamp(val, panel->backlight.min,
index ed662937ec3c85685b7fed049f381c6d1cb5654c..cb950752c34695063a2714be448834bec7ed354f 100644 (file)
@@ -2716,9 +2716,9 @@ static void ilk_compute_wm_level(const struct drm_i915_private *dev_priv,
                                 const struct intel_crtc *intel_crtc,
                                 int level,
                                 struct intel_crtc_state *cstate,
-                                struct intel_plane_state *pristate,
-                                struct intel_plane_state *sprstate,
-                                struct intel_plane_state *curstate,
+                                const struct intel_plane_state *pristate,
+                                const struct intel_plane_state *sprstate,
+                                const struct intel_plane_state *curstate,
                                 struct intel_wm_level *result)
 {
        uint16_t pri_latency = dev_priv->wm.pri_latency[level];
@@ -3038,28 +3038,24 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate)
        struct intel_pipe_wm *pipe_wm;
        struct drm_device *dev = state->dev;
        const struct drm_i915_private *dev_priv = to_i915(dev);
-       struct intel_plane *intel_plane;
-       struct intel_plane_state *pristate = NULL;
-       struct intel_plane_state *sprstate = NULL;
-       struct intel_plane_state *curstate = NULL;
+       struct drm_plane *plane;
+       const struct drm_plane_state *plane_state;
+       const struct intel_plane_state *pristate = NULL;
+       const struct intel_plane_state *sprstate = NULL;
+       const struct intel_plane_state *curstate = NULL;
        int level, max_level = ilk_wm_max_level(dev_priv), usable_level;
        struct ilk_wm_maximums max;
 
        pipe_wm = &cstate->wm.ilk.optimal;
 
-       for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
-               struct intel_plane_state *ps;
-
-               ps = intel_atomic_get_existing_plane_state(state,
-                                                          intel_plane);
-               if (!ps)
-                       continue;
+       drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, &cstate->base) {
+               const struct intel_plane_state *ps = to_intel_plane_state(plane_state);
 
-               if (intel_plane->base.type == DRM_PLANE_TYPE_PRIMARY)
+               if (plane->type == DRM_PLANE_TYPE_PRIMARY)
                        pristate = ps;
-               else if (intel_plane->base.type == DRM_PLANE_TYPE_OVERLAY)
+               else if (plane->type == DRM_PLANE_TYPE_OVERLAY)
                        sprstate = ps;
-               else if (intel_plane->base.type == DRM_PLANE_TYPE_CURSOR)
+               else if (plane->type == DRM_PLANE_TYPE_CURSOR)
                        curstate = ps;
        }
 
@@ -3081,11 +3077,9 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate)
        if (pipe_wm->sprites_scaled)
                usable_level = 0;
 
-       ilk_compute_wm_level(dev_priv, intel_crtc, 0, cstate,
-                            pristate, sprstate, curstate, &pipe_wm->raw_wm[0]);
-
        memset(&pipe_wm->wm, 0, sizeof(pipe_wm->wm));
-       pipe_wm->wm[0] = pipe_wm->raw_wm[0];
+       ilk_compute_wm_level(dev_priv, intel_crtc, 0, cstate,
+                            pristate, sprstate, curstate, &pipe_wm->wm[0]);
 
        if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
                pipe_wm->linetime = hsw_compute_linetime_wm(cstate);
@@ -3095,8 +3089,8 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate)
 
        ilk_compute_wm_reg_maximums(dev_priv, 1, &max);
 
-       for (level = 1; level <= max_level; level++) {
-               struct intel_wm_level *wm = &pipe_wm->raw_wm[level];
+       for (level = 1; level <= usable_level; level++) {
+               struct intel_wm_level *wm = &pipe_wm->wm[level];
 
                ilk_compute_wm_level(dev_priv, intel_crtc, level, cstate,
                                     pristate, sprstate, curstate, wm);
@@ -3106,13 +3100,10 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate)
                 * register maximums since such watermarks are
                 * always invalid.
                 */
-               if (level > usable_level)
-                       continue;
-
-               if (ilk_validate_wm_level(level, &max, wm))
-                       pipe_wm->wm[level] = *wm;
-               else
-                       usable_level = level;
+               if (!ilk_validate_wm_level(level, &max, wm)) {
+                       memset(wm, 0, sizeof(*wm));
+                       break;
+               }
        }
 
        return 0;
@@ -8245,14 +8236,17 @@ static void gen8_set_l3sqc_credits(struct drm_i915_private *dev_priv,
                                   int high_prio_credits)
 {
        u32 misccpctl;
+       u32 val;
 
        /* WaTempDisableDOPClkGating:bdw */
        misccpctl = I915_READ(GEN7_MISCCPCTL);
        I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
 
-       I915_WRITE(GEN8_L3SQCREG1,
-                  L3_GENERAL_PRIO_CREDITS(general_prio_credits) |
-                  L3_HIGH_PRIO_CREDITS(high_prio_credits));
+       val = I915_READ(GEN8_L3SQCREG1);
+       val &= ~L3_PRIO_CREDITS_MASK;
+       val |= L3_GENERAL_PRIO_CREDITS(general_prio_credits);
+       val |= L3_HIGH_PRIO_CREDITS(high_prio_credits);
+       I915_WRITE(GEN8_L3SQCREG1, val);
 
        /*
         * Wait at least 100 clocks before re-enabling clock gating.
index 02d8974bf9ab69c161dbe5fbeec2f77715ae656b..6b2067f1082402bf0f5598dda62fa1c28531fa0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INTEL_RINGBUFFER_H_
 #define _INTEL_RINGBUFFER_H_
 
index b66d8e136aa37c3b72d072312d0f06d141223237..49577eba8e7efc30e68e2b8ea8a88cda3232dae7 100644 (file)
@@ -368,7 +368,7 @@ static void hsw_power_well_enable(struct drm_i915_private *dev_priv,
 {
        enum i915_power_well_id id = power_well->id;
        bool wait_fuses = power_well->hsw.has_fuses;
-       enum skl_power_gate pg;
+       enum skl_power_gate uninitialized_var(pg);
        u32 val;
 
        if (wait_fuses) {
@@ -2782,6 +2782,9 @@ static void cnl_display_core_init(struct drm_i915_private *dev_priv, bool resume
 
        /* 6. Enable DBUF */
        gen9_dbuf_enable(dev_priv);
+
+       if (resume && dev_priv->csr.dmc_payload)
+               intel_csr_load_program(dev_priv);
 }
 
 #undef CNL_PROCMON_IDX
index 18b174d855ca7079956951368a8284804275d44b..1519f1b7841b124fbc85534adb0d1376ad887bd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as subtest__name to create
index fc74687501ba923c97f5afe14a13deba7ee6c893..e5a9e5dcf2f38e6bb2e9fdb644cc6f2d48c05b4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as subtest__name to create
index 4cca4d57f52c7a621e408434023fa82445b9410c..b5dc4e394555011c3eb6527a1c3164275ad81cb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MOCK_GEM_DEVICE_H__
 #define __MOCK_GEM_DEVICE_H__
 
index 9fbf67321662c8b7cee46f28353c02fbd3cfea4f..20acdbee7bd0d9f0989d033ecb7e954363fd055d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MOCK_GEM_OBJECT_H__
 #define __MOCK_GEM_OBJECT_H__
 
index 16ecef33e0089bad9e4593c9f6dbabd41e01f3c7..ab6c83caceb733288fb710b06ade5650e4048638 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 imxdrm-objs := imx-drm-core.o ipuv3-crtc.o ipuv3-plane.o
 
index f6dd64be9cd594768e1cb7d37de9df8113c8603d..f0b7556c0857d40c41a0d8b8d6e853d5c94be25d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IMX_DRM_H_
 #define _IMX_DRM_H_
 
index 596b24ddbf657001472eae416abba3b38f064307..e563ea17a827c81e4be29b346f9f23e2fbc76853 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IPUV3_PLANE_H__
 #define __IPUV3_PLANE_H__
 
index a78c4b483e8dd613228f41e695155c850b00366d..eeb155826d270125882ee3319fae7da200d8f3a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/random.h>
index a78644bea7f9d2904a6222bc53c7e3530e6c2227..4a3e94dfa0c00161921f26f272825351cf5b95cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRM_RANDOM_H__
 #define __DRM_RANDOM_H__
 
index e37b55a23a659d407f958744bd3220e921f68ce8..ce83c396a742106afae3122368f11b7c3aea1529 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 mediatek-drm-y := mtk_disp_color.o \
                  mtk_disp_ovl.o \
                  mtk_disp_rdma.o \
index 3ae442a64bd6c735c491ed3ecb8a417dece95012..c096a9d6bcbc1d00a41d7834f4c09f7555bc0477 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MGA Millennium (MGA2064W) functions
  * MGA Mystique (MGA1064SG) functions
index 33008fa1be9b868898a7238859fe56ff22651530..ced70783b44e8e2d602fcee6ead1bf65d8390333 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Idrivers/gpu/drm/msm
 ccflags-$(CONFIG_DRM_MSM_DSI) += -Idrivers/gpu/drm/msm/dsi
 
index dbb31a0144194662a85f20ae0b77117ce071b901..deaf869374ea7016bbaa33aa45fb013aa00ec6ad 100644 (file)
@@ -248,7 +248,7 @@ disable_clks:
        clk_disable_unprepare(ahb_clk);
 disable_gdsc:
        regulator_disable(gdsc_reg);
-       pm_runtime_put_autosuspend(dev);
+       pm_runtime_put_sync(dev);
 put_clk:
        clk_put(ahb_clk);
 put_gdsc:
index c2bdad88447eb59de05e1476d7607cacfb968376..824067d2d4277d36699b1f15c6d58f74a97fe23f 100644 (file)
@@ -83,6 +83,8 @@ const struct mdp5_cfg_hw msm8x74v1_config = {
                                  .caps = MDP_LM_CAP_WB },
                             },
                .nb_stages = 5,
+               .max_width = 2048,
+               .max_height = 0xFFFF,
        },
        .dspp = {
                .count = 3,
index 6fcb58ab718cd9c986155f50eb55cccf07c22c32..44097767700124df63f8a325969ea44b494256d7 100644 (file)
@@ -804,8 +804,6 @@ static int mdp5_crtc_cursor_set(struct drm_crtc *crtc,
 
        spin_unlock_irqrestore(&mdp5_crtc->cursor.lock, flags);
 
-       pm_runtime_put_autosuspend(&pdev->dev);
-
 set_cursor:
        ret = mdp5_ctl_set_cursor(ctl, pipeline, 0, cursor_enable);
        if (ret) {
index f15821a0d90089d1045e810e4b28af552db9eec0..ea5bb0e1632c69e45e746d8abfb820ba9d540e0b 100644 (file)
@@ -610,17 +610,6 @@ int msm_gem_sync_object(struct drm_gem_object *obj,
        struct dma_fence *fence;
        int i, ret;
 
-       if (!exclusive) {
-               /* NOTE: _reserve_shared() must happen before _add_shared_fence(),
-                * which makes this a slightly strange place to call it.  OTOH this
-                * is a convenient can-fail point to hook it in.  (And similar to
-                * how etnaviv and nouveau handle this.)
-                */
-               ret = reservation_object_reserve_shared(msm_obj->resv);
-               if (ret)
-                       return ret;
-       }
-
        fobj = reservation_object_get_list(msm_obj->resv);
        if (!fobj || (fobj->shared_count == 0)) {
                fence = reservation_object_get_excl(msm_obj->resv);
@@ -1045,10 +1034,10 @@ static void *_msm_gem_kernel_new(struct drm_device *dev, uint32_t size,
        }
 
        vaddr = msm_gem_get_vaddr(obj);
-       if (!vaddr) {
+       if (IS_ERR(vaddr)) {
                msm_gem_put_iova(obj, aspace);
                drm_gem_object_unreference(obj);
-               return ERR_PTR(-ENOMEM);
+               return ERR_CAST(vaddr);
        }
 
        if (bo)
index 5d0a75d4b249c439ff9ff072f89c87c5e95bd776..93535cac0676355d935e1cf032d4601ba5000ac3 100644 (file)
@@ -221,7 +221,7 @@ fail:
        return ret;
 }
 
-static int submit_fence_sync(struct msm_gem_submit *submit)
+static int submit_fence_sync(struct msm_gem_submit *submit, bool no_implicit)
 {
        int i, ret = 0;
 
@@ -229,6 +229,20 @@ static int submit_fence_sync(struct msm_gem_submit *submit)
                struct msm_gem_object *msm_obj = submit->bos[i].obj;
                bool write = submit->bos[i].flags & MSM_SUBMIT_BO_WRITE;
 
+               if (!write) {
+                       /* NOTE: _reserve_shared() must happen before
+                        * _add_shared_fence(), which makes this a slightly
+                        * strange place to call it.  OTOH this is a
+                        * convenient can-fail point to hook it in.
+                        */
+                       ret = reservation_object_reserve_shared(msm_obj->resv);
+                       if (ret)
+                               return ret;
+               }
+
+               if (no_implicit)
+                       continue;
+
                ret = msm_gem_sync_object(&msm_obj->base, submit->gpu->fctx, write);
                if (ret)
                        break;
@@ -451,11 +465,9 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
        if (ret)
                goto out;
 
-       if (!(args->flags & MSM_SUBMIT_NO_IMPLICIT)) {
-               ret = submit_fence_sync(submit);
-               if (ret)
-                       goto out;
-       }
+       ret = submit_fence_sync(submit, !!(args->flags & MSM_SUBMIT_NO_IMPLICIT));
+       if (ret)
+               goto out;
 
        ret = submit_pin_objects(submit);
        if (ret)
index ffbff27600e0ff620fe623172e30783f53ce5fe7..6a887032c66ae08ea5354599b997640c7b005ac5 100644 (file)
@@ -718,7 +718,8 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)
                        msm_gem_put_iova(gpu->rb->bo, gpu->aspace);
                msm_ringbuffer_destroy(gpu->rb);
        }
-       if (gpu->aspace) {
+
+       if (!IS_ERR_OR_NULL(gpu->aspace)) {
                gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu,
                        NULL, 0);
                msm_gem_address_space_put(gpu->aspace);
index 0366b8092f9772178334449ce121255087206ede..ec56794ad0399277693b9185c75b6abcf9241e4a 100644 (file)
@@ -111,10 +111,14 @@ static void rd_write(struct msm_rd_state *rd, const void *buf, int sz)
 
                wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0);
 
+               /* Note that smp_load_acquire() is not strictly required
+                * as CIRC_SPACE_TO_END() does not access the tail more
+                * than once.
+                */
                n = min(sz, circ_space_to_end(&rd->fifo));
                memcpy(fptr, ptr, n);
 
-               fifo->head = (fifo->head + n) & (BUF_SZ - 1);
+               smp_store_release(&fifo->head, (fifo->head + n) & (BUF_SZ - 1));
                sz  -= n;
                ptr += n;
 
@@ -145,13 +149,17 @@ static ssize_t rd_read(struct file *file, char __user *buf,
        if (ret)
                goto out;
 
+       /* Note that smp_load_acquire() is not strictly required
+        * as CIRC_CNT_TO_END() does not access the head more than
+        * once.
+        */
        n = min_t(int, sz, circ_count_to_end(&rd->fifo));
        if (copy_to_user(buf, fptr, n)) {
                ret = -EFAULT;
                goto out;
        }
 
-       fifo->tail = (fifo->tail + n) & (BUF_SZ - 1);
+       smp_store_release(&fifo->tail, (fifo->tail + n) & (BUF_SZ - 1));
        *ppos += n;
 
        wake_up_all(&rd->fifo_event);
index f26e44ea738974a873bd24a7413ad910bad10245..ebf860bd59af01dd8146dbad104b6146e86c1b9d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <drm/drmP.h>
 #include <drm/drm_mode.h>
 #include "nouveau_drv.h"
index 74a8795c2c2bf16a427ecc64416e07741d9b42aa..f74f1f2b186e3de5f249e0550d327d719de85054 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_DISPLAY_H__
 #define __NV04_DISPLAY_H__
 #include <subdev/bios.h>
index 6d72ed38da3215dfa8150ea2c34d1ae32ed08a35..1a8b45b4631f890c386ee16d6cd9cfd0fd301768 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL0002_H__
 #define __NVIF_CL0002_H__
 
index a6a71f4ad91eb097091f137b11367b8724dc5505..c0d5eba4f8fc55f3d469bf1844277e92d5f22d39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL0046_H__
 #define __NVIF_CL0046_H__
 
index 309ab8a3d9e8da5a158bb80822ec4e1c075e6232..d0e8f35d9e92a4170fab3705f33489f0a4cbae73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL006B_H__
 #define __NVIF_CL006B_H__
 
index 287a7d6fa4804d9dd0abe901d322f1fa3ed5ebd1..2740278d226b96c230d306197646c4559271b04b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL0080_H__
 #define __NVIF_CL0080_H__
 
index aa94b8cf9679e3cb5c5dd59dcd86beac5fb1412c..b4cd580933007a698d85cf14949c2fca4e99ca03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL506E_H__
 #define __NVIF_CL506E_H__
 
index 3b7101966de43e054fc327ba664c9900104a1ead..14d20c813cdb9be972336a9362ee9ac5a3003892 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL506F_H__
 #define __NVIF_CL506F_H__
 
index 542d95145a67ad74437f098c8535037a60b7216b..7cdf53615d7bb817494e81359dbb5007952d7683 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL5070_H__
 #define __NVIF_CL5070_H__
 
index 12e0643b78bda9192e403189cb40abf4298df761..36e5372185969417b88bdc68a7edd4ebf1dc96e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL507A_H__
 #define __NVIF_CL507A_H__
 
index 99e9d8c47f60122c954a3a9645a76467b54f978f..3e643b752bfcc6e45654fc32de0ca8270b6d597a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL507B_H__
 #define __NVIF_CL507B_H__
 
index 6af70dbdfd9f7733f177bd3ad353d633751013b1..fd9e336d0a241fb6a1d83231da6e343f5f0102be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL507C_H__
 #define __NVIF_CL507C_H__
 
index 5ab0c9e4c6a3e5ca64371ae82a262db5d0fb8b0c..e994c6894e3ec7c618f7dff8525f4fae9d553525 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL507D_H__
 #define __NVIF_CL507D_H__
 
index c06209f3cac4a8d4002bdee80a6a8c8890058fcb..8082d2fde248448772d8b5e58718783e4988cc25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL507E_H__
 #define __NVIF_CL507E_H__
 
index 91e33db21a2fe47178781469929675cc91cda191..36944ff09e3c6a24cb950384add06538e9a0086d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL826E_H__
 #define __NVIF_CL826E_H__
 
index e34efd4ec5371e2c42a4c89fc3052757a96724ab..df09a50817eb0a9ca0e306bebb47b04f42d520ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL826F_H__
 #define __NVIF_CL826F_H__
 
index a2d5410a491b8d434e3df8e65d4945f32c57e827..6d16a3a2ec02820dcabe7ec519de3d6219486f3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL906F_H__
 #define __NVIF_CL906F_H__
 
index 4057676d2981baa04a92bee00a8120cfe82c3753..e4c8de6d00b71f8ccbd866130573f8435f9ab826 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CL9097_H__
 #define __NVIF_CL9097_H__
 
index 2efa3d048bb9da20a220df3117c68c5babb45b3f..597ebb52d5f92e8e3da863a056904ae642faf48d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CLA06F_H__
 #define __NVIF_CLA06F_H__
 
index d08da82ba7ed489e4f1c537810da62b1527a62e7..e3a2ea8bde7051e739e3f633d9db88056d55f9e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CLASS_H__
 #define __NVIF_CLASS_H__
 
index b52a8eadce01aa36f66c0c6b5494df960894350b..f5df8b30c599366abcda890ec3c3288cb4747c39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_CLIENT_H__
 #define __NVIF_CLIENT_H__
 
index bcb981711617710eaaf30bf2fa2251244da11e61..09439b037870888a0fa4e3cc782f191475b81f7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_DEVICE_H__
 #define __NVIF_DEVICE_H__
 
index 0c6f48d8140a235ad46270d2d9f1159b61c5c9e9..93bccd45a042c1fe472bd77fe6ec5a3a14a0e650 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_DRIVER_H__
 #define __NVIF_DRIVER_H__
 #include <nvif/os.h>
index 21764499b4bef19b3eea0a5d6703dc024c305b02..ec5c924f576aadffcfad0b76eec907be8e02dfaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_EVENT_H__
 #define __NVIF_EVENT_H__
 
index c2c0fc41e01772db64cd7e166f0d492b6c755dd5..30ecd31db5df0505743448f4249e4c00b4290659 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0000_H__
 #define __NVIF_IF0000_H__
 
index bd5b64125eeda69b4169c786c7f6b0d6b928d402..ca921526221575f95bdc80b982326cbf390cfe90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0001_H__
 #define __NVIF_IF0001_H__
 
index c04c91d0b818841df4a773a8e9110d69e0f0ef6d..d9235c01119618530f988c2e54292fbf98bc42f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0002_H__
 #define __NVIF_IF0002_H__
 
index 0cd03efb80a1eaf616ce2e1aad4de91a12c17b96..ae30b8261b88231ca3f6390014933b4f1e9f5de0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0003_H__
 #define __NVIF_IF0003_H__
 
index bd5cd428cfd79ee60ff780498d85d74a133cc56f..b35547c8ea362ea90fc058a7aaf5d11f2aa653e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0004_H__
 #define __NVIF_IF0004_H__
 
index abfd373bb68b0c12fa8664c997b5ff3b7b51ccfc..8ed0ae101715bf2dd56fa3cc88e234e65e5d824a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IF0005_H__
 #define __NVIF_IF0005_H__
 #define NV10_NVSW_NTFY_UEVENT                                              0x00
index c5f5eb83a59449c1a55918588dcd4d0edc83546f..688c4bcd9c64d5cd14a476b0a0db05fdcfed8221 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_IOCTL_H__
 #define __NVIF_IOCTL_H__
 
index 51e2eb58080990fa86a91e196affe4e733a4c94b..4ed1692306575f0b1b9594dad7f71eb99480a272 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_NOTIFY_H__
 #define __NVIF_NOTIFY_H__
 
index 9e58b305b020380ac3f033d535e216485c09d05a..6912b8cffc98152879a7b4959755d87a01cf271d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_OBJECT_H__
 #define __NVIF_OBJECT_H__
 
index 9fcab67c85577ee380b5fae43ad2a9be8c708de9..6b16ab6b26d534258f23db99875dc9c21b658390 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_OS_H__
 #define __NOUVEAU_OS_H__
 
index 751bcf4930a7a892e0330599b3269588885eacc0..7f0d9f6cc1e7ef4613b66b9219058571a02e1c1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVIF_UNPACK_H__
 #define __NVIF_UNPACK_H__
 
index e876634da10a18a377c3565046f7ddd75295d8ca..ca23230d574377bfde2926c20ef3d6381e4b3101 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CLIENT_H__
 #define __NVKM_CLIENT_H__
 #define nvkm_client(p) container_of((p), struct nvkm_client, object)
index c59fd4e2ad5e264cbf1a8f1ba9ffdff1dc9ffeae..966d1822dd809703f823029a081778d1f2fe57d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEBUG_H__
 #define __NVKM_DEBUG_H__
 #define NV_DBG_FATAL    0
index bb4c214f10466a13ef84631343f34eaade3bf33d..d7ecb65ba19f62c85f4fc8c1c9aa29f64fa1cdea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_H__
 #define __NVKM_DEVICE_H__
 #include <core/event.h>
index d4cd2fbfde885eb0797b95bf9b725c470bde8094..c6bcd8a64caebb171afc97e507547f32f5605083 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_ENGINE_H__
 #define __NVKM_ENGINE_H__
 #define nvkm_engine(p) container_of((p), struct nvkm_engine, subdev)
index 40429a82f79228971134b680a451585609e6ecc8..38acbde2de4f27987b89fa5569e8d0430e0fc182 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_ENUM_H__
 #define __NVKM_ENUM_H__
 #include <core/os.h>
index b98fe2de546abdaecfe59ac6dd4477776d4ed99f..d3c45e90a1c1346fe4e5a0f533ea3a56e0ccea04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_EVENT_H__
 #define __NVKM_EVENT_H__
 #include <core/os.h>
index a626ce378f04c027d9bf6fcd691e0167c7fd08ea..ff0fa38aee72c03b07e60c24bf9167eea7efda8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FIRMWARE_H__
 #define __NVKM_FIRMWARE_H__
 
index c23da4f059290ffb93e37fac6dba9278ce49e2b2..473ba0b9a3682d0de7c3d34d0671c486be4feb3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GPUOBJ_H__
 #define __NVKM_GPUOBJ_H__
 #include <core/object.h>
index 88971eb37afa90d4b023c2c54571a58b29a79305..e2d39192fa26c170c3739ecc2b68dd09213f0856 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_IOCTL_H__
 #define __NVKM_IOCTL_H__
 #include <core/os.h>
index 33ca6769266a5d880228c0c99261244c4f69f4d1..affba21fcbade03b3ccfbe1a6ee767e9dbb7bf0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MEMORY_H__
 #define __NVKM_MEMORY_H__
 #include <core/os.h>
index 7bd4897a8a2adc4953f1b3bf4b44553743e9510c..2002a4da999905dfafcf5066ed281abf5caa82cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MM_H__
 #define __NVKM_MM_H__
 #include <core/os.h>
index 753d08c1767bb6d6c23740cb18f8a093227eb683..4eb82bc563f3a4f28a345701ac4b9233563e7114 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_NOTIFY_H__
 #define __NVKM_NOTIFY_H__
 #include <core/os.h>
index 96dda350ada310ddec344a2e9c708a1ab58a70b4..3f13ff1d4ee4a3332aeb97799234d25f2ed7d044 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_OBJECT_H__
 #define __NVKM_OBJECT_H__
 #include <core/os.h>
index bd52236cc2f483c129073a7f96c935f9bb3cea07..d950d5ee188b8e3cbff7e8ec2d454b73c5e4e851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_OPROXY_H__
 #define __NVKM_OPROXY_H__
 #define nvkm_oproxy(p) container_of((p), struct nvkm_oproxy, base)
index 80fdc146e816e57485ee2c42dbfd4e63c771c059..a34a79bacbd0a0f035b5e95d6952460f70fb4840 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_OPTION_H__
 #define __NVKM_OPTION_H__
 #include <core/os.h>
index cd57e238ddd34db82765d171b15e79c845b01bca..fc9e8cd360877dda261c280d5d37e5c253f8dd6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_OS_H__
 #define __NVKM_OS_H__
 #include <nvif/os.h>
index 78d41be20b8ce7b8447ae09380c99bab8e337170..4c7f647d2dc960049ef2343a3ca38de83cb33eb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_PCI_H__
 #define __NVKM_DEVICE_PCI_H__
 #include <core/device.h>
index 5ee6298991e2143f4ca6fd323295f6bdb1c9b97e..674a3840824038450e85c93543c6c0dfdb33ec84 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_RAMHT_H__
 #define __NVKM_RAMHT_H__
 #include <core/gpuobj.h>
index ca9ed3d68f44eeaa77fb4909d75747a8aa2576fb..38f51ff7ab40fdcd9e873ad56a0f71d2b3f4d364 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SUBDEV_H__
 #define __NVKM_SUBDEV_H__
 #include <core/device.h>
index 7c7d91cad09a94299317b2ab922acc9fce2b9222..5c102d0206a7abf298231949a56c94cb76249036 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_TEGRA_H__
 #define __NVKM_DEVICE_TEGRA_H__
 #include <core/device.h>
index 904820558fc074029c2adfe6cc093a7c7362338e..40613983fccb3acb5535417fa355a5f130aac1df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BSP_H__
 #define __NVKM_BSP_H__
 #include <engine/xtensa.h>
index b93f4c1a95e550394c875a46c16ee1eecc8753bd..5532459944504adbee5ab5ec4ec31f183bfffee0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CE_H__
 #define __NVKM_CE_H__
 #include <engine/falcon.h>
index 03fa57a7c30a80496d838ece698ad8917c214c71..72b9da2de7c2d288d467d9bafd397695731a0372 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CIPHER_H__
 #define __NVKM_CIPHER_H__
 #include <core/engine.h>
index 05f9c13ab8c3fb8984db2b3bbea42e9693626119..e83193d3ccab646909ca5342a54453f1b7edb452 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_H__
 #define __NVKM_DISP_H__
 #define nvkm_disp(p) container_of((p), struct nvkm_disp, engine)
index d2a6532ce3b990226daac5b5672d4a11f5ff2889..5f5cae7c474e88ab7633adad9a2ca0182658ef6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DMA_H__
 #define __NVKM_DMA_H__
 #include <core/engine.h>
index e1a854e2ade1af9540c920c5cc28e22b3a8ee601..5a51842bc241c9d4320c72822d59a80d5d077f87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FALCON_H__
 #define __NVKM_FALCON_H__
 #define nvkm_falcon(p) container_of((p), struct nvkm_falcon, engine)
index f00527b36accfdf10d8d422dd294b6c6b414921e..025f400c9f5d9f4b14a8b576cfdfc1f395c41460 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FIFO_H__
 #define __NVKM_FIFO_H__
 #include <core/engine.h>
index c7944b19bed80dfaa96720329ee6840a33a3f8fe..fb18f105fc4337db1b5fd22a4b57e75b0a35a345 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GR_H__
 #define __NVKM_GR_H__
 #include <core/engine.h>
index 257738eff9f62bbde0852ef91d73d0f867b43b76..4ef3d4c5e358a8513329fadeea11220b1a67af75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MPEG_H__
 #define __NVKM_MPEG_H__
 #include <core/engine.h>
index 748ea9b7e55961838555eab742630a61fcb1a6e5..985fc9490643a7c8879651f00856bd1df68a97ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSENC_H__
 #define __NVKM_MSENC_H__
 #include <core/engine.h>
index 08516ca82e0445d1f8b42814e17d47294a383c29..e03f33472486b1b3f292b92211bb697c629ab09c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSPDEC_H__
 #define __NVKM_MSPDEC_H__
 #include <engine/falcon.h>
index 85fd306021ac7954cdfb152adfa902e6250ab1fd..760bf17ea63de58d2599d4a0980de27616999ed6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSPPP_H__
 #define __NVKM_MSPPP_H__
 #include <engine/falcon.h>
index 99757ed96f76c92183a6b57b46fa7661d1eb21f0..281866d2501dbe3b385eedb933db003f4484a0a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSVLD_H__
 #define __NVKM_MSVLD_H__
 #include <engine/falcon.h>
index 00b2b227ff416daff3b08d8f5b6c567edfe75b2e..fe716859d4a92d7d5f88d47f4d0a60a364ed31e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_NVDEC_H__
 #define __NVKM_NVDEC_H__
 #define nvkm_nvdec(p) container_of((p), struct nvkm_nvdec, engine)
index 8a819328059b7e92a55cdbea55eb0f5d26247b49..cdd68a8bab8b054bb4d1b78483aae3a787e63a76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_NVENC_H__
 #define __NVKM_NVENC_H__
 #include <core/engine.h>
index 240855ad8c8d3ab19b0c4c1843b876e752201448..6cce8502f9df27cf159281c30bb03c2620e1ea02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PM_H__
 #define __NVKM_PM_H__
 #include <core/engine.h>
index 7317ef4c02072727b51b9b746120d7dba47a5d27..b206b918c43ef9211c033bbe5e9c1f82b09872cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SEC_H__
 #define __NVKM_SEC_H__
 #include <engine/falcon.h>
index d3db1b1e75c4f62d6b65b169c98daded0993ca75..f7d89822b905626a7b934428e680baf3371f71b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SEC2_H__
 #define __NVKM_SEC2_H__
 #include <core/engine.h>
index 096e7dbd1e6553539ca222cf8834062159513a62..83a17c4e11e73d385ecfe7d8a42efa784bf9741d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SW_H__
 #define __NVKM_SW_H__
 #include <core/engine.h>
index 2b0dc4c695c28bbd0c0e8ceb5dc1811a0b7926a0..9b7d4877cf41ab0541dfc06118e1ecd581da3c46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_VIC_H__
 #define __NVKM_VIC_H__
 #include <core/engine.h>
index 616ea91e03f80d0f5999d6a85ce72b3bf6dc5c4b..53bf8aed48fba23e2e534516879029f5b9ded0a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_VP_H__
 #define __NVKM_VP_H__
 #include <engine/xtensa.h>
index b1fcc416732f9366b4facb092615fc0839cfe0b7..13c00ce6d556269eeda06fbc1f4abb57b9f4929d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_XTENSA_H__
 #define __NVKM_XTENSA_H__
 #define nvkm_xtensa(p) container_of((p), struct nvkm_xtensa, engine)
index d3071b5a4f98202d9f4ac3df560eead182f3494d..91f1e0efe061c82b3576b3706c22e5a26f48ec4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BAR_H__
 #define __NVKM_BAR_H__
 #include <core/subdev.h>
index a72f3290528a4a0c8bddca75c3d8f3b6e186c95c..979e9a144e7b27f5e1f815e74da28101e8ce02f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BIOS_H__
 #define __NVKM_BIOS_H__
 #include <core/subdev.h>
index cf202c793a1de6b3a7b1687b9cf526d5fb58f0c3..703a5b524b96c7bd445f35a79bf402f60e7f6d4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_M0203_H__
 #define __NVBIOS_M0203_H__
 struct nvbios_M0203T {
index d34608ff241e2dc33268ecb8375d85d17e9c3fe9..b4e14e45a0e87b0ed4100984467c52e255c77475 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_M0205_H__
 #define __NVBIOS_M0205_H__
 struct nvbios_M0205T {
index c7ff8d9526e771d3dd21c30ccd1e246ec0b2a830..c09376894d12f9a214e4c54ef45cb3ff8adc1808 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_M0209_H__
 #define __NVBIOS_M0209_H__
 u32 nvbios_M0209Te(struct nvkm_bios *,
index 1c1c52eac97d46f8b4689006b0052901ab725c89..901d94ef11b8537b752203e2a311b30303437eef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_P0260_H__
 #define __NVBIOS_P0260_H__
 u32 nvbios_P0260Te(struct nvkm_bios *,
index 6711732b7cb19c6a470e7f3779e8c35d96120307..d068586f3263e9adcb9f4e4dc8aee050573ce515 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_BIT_H__
 #define __NVBIOS_BIT_H__
 struct bit_entry {
index 3f0c7c41402609af45291597671bd0c0ca692fe7..9a3f9483ee75a49e9cd58ffc251382ecb78c7f82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_BMP_H__
 #define __NVBIOS_BMP_H__
 static inline u16
index 2ff64a20c0ecdfdddd7c59a72556d47a46d21dd5..a1c48c6b223b3e18ced3452be967ea2239683a6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_BOOST_H__
 #define __NVBIOS_BOOST_H__
 u32 nvbios_boostTe(struct nvkm_bios *, u8 *, u8 *, u8 *, u8 *, u8 *, u8 *);
index deb477282dde370d47cd396627e53252eaf1ddcf..ed9e0a6a001190fed601b6af8255eed621f0307a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_CONN_H__
 #define __NVBIOS_CONN_H__
 enum dcb_connector_type {
index 76fe7d50a1ce901f09be4b9b87f9331b441ce0ee..49343d276e1143df1fdf1ad3e43af821a4cfa048 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_CSTEP_H__
 #define __NVBIOS_CSTEP_H__
 u32 nvbios_cstepTe(struct nvkm_bios *,
index 903d117603d82602d4865394bb6f6d861d24733b..63ddc6ed897af81159ba9c5fd595018029cf2c07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_DCB_H__
 #define __NVBIOS_DCB_H__
 enum dcb_output_type {
index c5a6ebd5a478691c90c61175adec8cb4df6c4600..423d92de0aae6c3bcb17e8904105db88d2e4c967 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_DISP_H__
 #define __NVBIOS_DISP_H__
 u16 nvbios_disp_table(struct nvkm_bios *,
index b4d39df70d4e03cc545f995453e1b216b3ad0a88..df34b41838d60090d85e2fdf1aecc976abffb288 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_DP_H__
 #define __NVBIOS_DP_H__
 struct nvbios_dpout {
index bb49bd5f879ed9358d999c798f7a69498448352c..f93e4f951f2f8305f6f746af4207838fbb7427cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_EXTDEV_H__
 #define __NVBIOS_EXTDEV_H__
 enum nvbios_extdev_type {
index a7513e8406a386063c5eec097e7097ad18cdd8ae..09c1d3b9d00984ef962f45cdfe5911fcc63c6eae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_FAN_H__
 #define __NVBIOS_FAN_H__
 #include <subdev/bios/therm.h>
index b7a54e6054698a68ae215f26d852f4c227414bd8..b71a3555c64e917f10e26792b15a37d0dab57997 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_GPIO_H__
 #define __NVBIOS_GPIO_H__
 enum dcb_gpio_func_name {
index 85c529ecf9b1067727767828e7fba7f2734edb1e..ae1f7483dd28c7eeb39e3d6fef21424d738f6655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_I2C_H__
 #define __NVBIOS_I2C_H__
 enum dcb_i2c_type {
index e933d3eede70f82da1a058a65257fb8104f02f95..e220a1ac13879d06ca3165e6e40a90938cb14fd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_ICCSENSE_H__
 #define __NVBIOS_ICCSENSE_H__
 struct pwr_rail_resistor_t {
index e15d63b9a5eb98f6dc6b406c502ac8efd7b53292..893288b060defb24e5dcd87c7c69c5fca7648247 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_IMAGE_H__
 #define __NVBIOS_IMAGE_H__
 struct nvbios_image {
index 06ab48052128ef404a4b483646537f08bbd045f5..744b1868e789e4ad35e2f3032718e0f927e2b492 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_INIT_H__
 #define __NVBIOS_INIT_H__
 
index 4e31b64c5edf5c290a334afa6264f352adac3992..327bf9c4b703d13743fb066febce23e07ebe3b46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_MXM_H__
 #define __NVBIOS_MXM_H__
 u16 mxm_table(struct nvkm_bios *, u8 *ver, u8 *hdr);
index 64a59549b7ea7571abff1a420365714a02653606..ee5419b7b45b4e95c61257ea85dd2518776475cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_NPDE_H__
 #define __NVBIOS_NPDE_H__
 struct nvbios_npdeT {
index e85931541f4f89fb75ff6a8110394e17487725fd..1dffe8d6cc8128a7b0473c993ecb581398412eb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_PCIR_H__
 #define __NVBIOS_PCIR_H__
 struct nvbios_pcirT {
index 478b1c0d2089cdab6b1a60dacc645200a1cbe4aa..0ee84ea6d73799cc102772361283c9cebf2582bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_PERF_H__
 #define __NVBIOS_PERF_H__
 u32 nvbios_perf_table(struct nvkm_bios *, u8 *ver, u8 *hdr,
index 5a69978d1e3b0a58363dca6f0cf10a39faa9a2a9..ab964e085f02a1bfcf4e094fa13ca5b0c9de015d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_PLL_H__
 #define __NVBIOS_PLL_H__
 /*XXX: kill me */
index 3a643df6de0496d293ee77b4ee9f3f9bf08f8a52..fb41ecab8f8c14df4abd8710222f59335ac34db6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_PMU_H__
 #define __NVBIOS_PMU_H__
 struct nvbios_pmuT {
index f5f4a14c403040e19b9f490da47db86157129db2..ff12d810dce3c3a9608f79ec18320ea11106eca8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_POWER_BUDGET_H__
 #define __NVBIOS_POWER_BUDGET_H__
 
index dca6c060a24f48100f0260598e2274f08d80b126..2b87a38adb7a6967dd732e9efa1150799ba8942b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_RAMCFG_H__
 #define __NVBIOS_RAMCFG_H__
 struct nvbios_ramcfg {
index 8d8ee13721ec80ec4018d9b8a8710367f3d3ed15..471eef434b51afec7285df66b721a2a59f46a4c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_RAMMAP_H__
 #define __NVBIOS_RAMMAP_H__
 #include <subdev/bios/ramcfg.h>
index dd3ba960e75d69ad47051439d016e59f090ab4ee..46a3b15e10ec33306f2369cbb42247b8f21707b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_THERM_H__
 #define __NVBIOS_THERM_H__
 struct nvbios_therm_threshold {
index 38188d4c9ab57baf224a3334baf141744eba4f70..40ceabf37827ec86df164ce11e954188ff18666e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_TIMING_H__
 #define __NVBIOS_TIMING_H__
 #include <subdev/bios/ramcfg.h>
index bea31cdd1dd1300a8208cd96f1b6abaea6652dd3..67419bad584c09cc98a7f15df2d47b379d62c3d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_VMAP_H__
 #define __NVBIOS_VMAP_H__
 struct nvbios_vmap {
index f0baa2c7de09d25a2fc19fafb57123c336b2dff3..6b36d5ecb8f965a5f055857ca01f1b24266ea73e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_VOLT_H__
 #define __NVBIOS_VOLT_H__
 
index 87f804fc3a887921418ee045155327da4652e5e1..36f3028d58ef7dd53d8a5799ff69263dac090892 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_VPSTATE_H__
 #define __NVBIOS_VPSTATE_H__
 struct nvbios_vpstate_header {
index 0c0fe234ff128122e7a98e3a1fec974410022508..d1bb5d0445854e3a7b4c65acaf03c492256204fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVBIOS_XPIO_H__
 #define __NVBIOS_XPIO_H__
 
index 33a057c334f2956f200d04671e03a365123b4000..7695f7f77a069eebc873ecdbad4aa61d516c0e4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BUS_H__
 #define __NVKM_BUS_H__
 #include <core/subdev.h>
index e5275f742977f01a0fca31e099ac0a16639b2ef3..15db75ef0189567da66f4ba9bc29a125eab3fbf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CLK_H__
 #define __NVKM_CLK_H__
 #include <core/subdev.h>
index 709d786f180867fae521dfe2134234ddcbda0cce..40558064d589b8baa26c925402fbfd12c42b6762 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVINIT_H__
 #define __NVKM_DEVINIT_H__
 #include <core/subdev.h>
index 28d513fbf44c387ff5e8a9197f461e7dcc95d9fe..4da68dd5261948a52df0b32809ee358545647950 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FB_H__
 #define __NVKM_FB_H__
 #include <core/subdev.h>
index ae201e388487197411339fc51f264d4a5b14bc90..092193b7f98ea1c7cc422b28c0f176858a03e67c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FUSE_H__
 #define __NVKM_FUSE_H__
 #include <core/subdev.h>
index 9b9c6d2f90b6d9840c51cdab4fd3c091223a4fe5..ee54899076e335e40a081ce9dddd7f5f4d8e7a3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GPIO_H__
 #define __NVKM_GPIO_H__
 #include <core/subdev.h>
index ce23cc6c672ecab3f0f2972af7a80cfecc3f69e8..eef54e9b5d77d29fd6e745543b60ea1b4624406b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_I2C_H__
 #define __NVKM_I2C_H__
 #include <core/subdev.h>
index 6e2b70bd2f411a524f985fc181f1d0aa227a3e83..919653c1d1010682313ee27e4e66c2859529aed6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_IBUS_H__
 #define __NVKM_IBUS_H__
 #include <core/subdev.h>
index b7a9b041e13085912727d2831c200aa07175fbe2..be9475cd94fd320a481a7ce2c65f6122a5aa9e13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_ICCSENSE_H__
 #define __NVKM_ICCSENSE_H__
 
index 40f845e312723744c52330bdc29b24666281b9f0..91126fd292223f8f70f8284ebb0f0e32efcb5448 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_INSTMEM_H__
 #define __NVKM_INSTMEM_H__
 #include <core/subdev.h>
index cd755baf9cab709b1384b2f1a0177117a5258721..63b7ad1f9ce23cd322b77a2cdc0c5188f93d7660 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_LTC_H__
 #define __NVKM_LTC_H__
 #include <core/subdev.h>
index 58f10890c3b6f16f5a6ccec859de646bd12c40ae..61c93c86e2e2473113ea1ed7f0b49b4c8b1a23f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MC_H__
 #define __NVKM_MC_H__
 #include <core/subdev.h>
index dcd3deff27a49eb73b947851034191e33369d5cf..0fdfc610ceb3e0d2d669011b1741b5db54461f83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MMU_H__
 #define __NVKM_MMU_H__
 #include <core/subdev.h>
index ed0250139dae5b07269d7861d24e0009ca20545e..0fd6d6f8eadab58566b2ab6a0415d0f3e2427b6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MXM_H__
 #define __NVKM_MXM_H__
 #include <core/subdev.h>
index ac2a695963c1a366a5dac22e959394cab9efd692..23803cc859fd15efbeac52d7d2652f0ed7a9cd5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PCI_H__
 #define __NVKM_PCI_H__
 #include <core/subdev.h>
index e7f04732a4250c96f8bbe602d7cbbb7b12c7b5a6..4bc9384046c624546cd8d538a711756f86dde5b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PMU_H__
 #define __NVKM_PMU_H__
 #include <core/subdev.h>
index 1bfd93b85575d0929019231a3f1a6dfa82d80e1a..98fe1d0fd592021608ee329dde698d69b5481e89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_THERM_H__
 #define __NVKM_THERM_H__
 #include <core/subdev.h>
index ff0709652f802957ae32e8f8efdc3780694a8461..e9b0746826ca66f9ac1765bbf8e757e1ee57a208 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_TIMER_H__
 #define __NVKM_TIMER_H__
 #include <core/subdev.h>
index d23209b62c2514f5fe67632f86e0e79fce5d9a50..f7d3eb647e2eae8b60d2d069b8fa853092cfba0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_TOP_H__
 #define __NVKM_TOP_H__
 #include <core/subdev.h>
index ce5636fe2a667a26bfac392cee6ecc1c356afab8..312933ad7c2be899d58079b26f0dab001da56dbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_VGA_H__
 #define __NOUVEAU_VGA_H__
 #include <core/subdev.h>
index 08ef9983c6435825d8deeb08573349e3a0e6ebd8..8a0f85f5fc1a86b4e47b4e06411c80a89c891bc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_VOLT_H__
 #define __NVKM_VOLT_H__
 #include <core/subdev.h>
index 841cc556fad83588d18f9c3205d08385963ec0cb..441100aa2320b70bd7b88aa0e79b6f9f66af8622 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_ABI16_H__
 #define __NOUVEAU_ABI16_H__
 
index 7459ef9943ec10bb2925854e9a11378b2e093bf7..5ffcb668377618f3521c77207429d6e39615a20e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci.h>
 #include <linux/acpi.h>
 #include <linux/slab.h>
index 2f03653aff86cf0cb8730acde70b0c965cbf2b8f..b86294fc99e84cbdaf6e027cbdd68b32891d9f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_ACPI_H__
 #define __NOUVEAU_ACPI_H__
 
index b06a5385d6dd14355848dd348902459731bef6c3..4caade5dee501845cc6dfc586c955cb2db738f2b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_BO_H__
 #define __NOUVEAU_BO_H__
 
index 46b947ba1cf4aab2034a7bc527c32d2194089557..9463a78613cb64780a42f461a9e8cd5a03b1620c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_CHAN_H__
 #define __NOUVEAU_CHAN_H__
 #include <nvif/object.h>
index b799f8dfb2b244dddd477dd97642a8b8450d4e66..1d01a82d4b6f782587f7fefab073b0c01be4fda0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_DEBUGFS_H__
 #define __NOUVEAU_DEBUGFS_H__
 
index 201aec2ea5b81c690e10c6765e0a406ec9af197c..34cd144681b9ba71a0e5fcc94a48ba8cdf4be517 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_DISPLAY_H__
 #define __NOUVEAU_DISPLAY_H__
 
index 822fe1d4d35e19045f4fcf7c12d3b3d43e78e98f..77dea95c1bf12fcf92e1749a83b7f0d5585bc7e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_DRV_H__
 #define __NOUVEAU_DRV_H__
 
index f7707849bb538697009ca3b68c8296100a67b2a4..2b12d82aac1509f7023b24e15d5f04fe7ecc8290 100644 (file)
@@ -223,7 +223,7 @@ void
 nouveau_fbcon_accel_save_disable(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       if (drm->fbcon) {
+       if (drm->fbcon && drm->fbcon->helper.fbdev) {
                drm->fbcon->saved_flags = drm->fbcon->helper.fbdev->flags;
                drm->fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED;
        }
@@ -233,7 +233,7 @@ void
 nouveau_fbcon_accel_restore(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
-       if (drm->fbcon) {
+       if (drm->fbcon && drm->fbcon->helper.fbdev) {
                drm->fbcon->helper.fbdev->flags = drm->fbcon->saved_flags;
        }
 }
@@ -245,7 +245,8 @@ nouveau_fbcon_accel_fini(struct drm_device *dev)
        struct nouveau_fbdev *fbcon = drm->fbcon;
        if (fbcon && drm->channel) {
                console_lock();
-               fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED;
+               if (fbcon->helper.fbdev)
+                       fbcon->helper.fbdev->flags |= FBINFO_HWACCEL_DISABLED;
                console_unlock();
                nouveau_channel_idle(drm->channel);
                nvif_object_fini(&fbcon->twod);
index d5e58a38f160182354b8c9a126bdcbb5d459f40a..c9b399ad89e6f732bd878bf2400c5ed7cbfb5b69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_FENCE_H__
 #define __NOUVEAU_FENCE_H__
 
index 8fa6ed9ddd3afc959c62a093d00a458dac0a3390..0456c94a5d4df29d5b7cb64e867d7f3efaf36df7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_GEM_H__
 #define __NOUVEAU_GEM_H__
 
index 3b9f2e5463a73c2717e8d67d39dfff00f75a5cba..380ede26806cc9ce45cf7ceda5f4a2aab6dbafb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_IOCTL_H__
 #define __NOUVEAU_IOCTL_H__
 
index 7226f1f609014e9249c2156dbdc523531e21352c..b5b5fe40779d7a54dba9723657c37a25538b12f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #define NV04_PFB_BOOT_0                                                0x00100000
 #      define NV04_PFB_BOOT_0_RAM_AMOUNT                       0x00000003
index b7ab268f7d6f59db8b31087b4eff92421beea653..fde11ce466e45cca46ee81c611e9e345332ab525 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pagemap.h>
 #include <linux/slab.h>
 
index 25b0de413352f5adc39e2f0d093d235d00a483df..96082b696420bd9dad734be9833be2069260e6ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_TTM_H__
 #define __NOUVEAU_TTM_H__
 
index c037e3ae8c70a1d973113112a9d4d1139818728a..c68f1c65af3b7a6642b73b8f7eaea3c03ab20b68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_USIF_H__
 #define __NOUVEAU_USIF_H__
 
index 48393a4f633129550ee5de4ce0b09045392f7b2d..52e52a360fb120300a3decc4b2ebe5f33f16f6fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/vgaarb.h>
 #include <linux/vga_switcheroo.h>
 
index ea3ad6974c653e1ce2ab1e4d99d117433f95b253..6a3000c88142ca2332c2886ba6b8d01a075bf6f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NOUVEAU_VGA_H__
 #define __NOUVEAU_VGA_H__
 
index b7a508585304a912bb8ebccfe74dbce5c9d993a7..7616c66803f882c3bb9b1d20dca780ec50fec9d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV10_FENCE_H_
 #define __NV10_FENCE_H_
 
index 2dbf62a2ac413081f7a15cb7c8779667447015d4..fb47d46050ec4f688664065f94ade1d9ab3bb2c0 100644 (file)
@@ -3265,11 +3265,14 @@ nv50_mstm = {
 void
 nv50_mstm_service(struct nv50_mstm *mstm)
 {
-       struct drm_dp_aux *aux = mstm->mgr.aux;
+       struct drm_dp_aux *aux = mstm ? mstm->mgr.aux : NULL;
        bool handled = true;
        int ret;
        u8 esi[8] = {};
 
+       if (!aux)
+               return;
+
        while (handled) {
                ret = drm_dp_dpcd_read(aux, DP_SINK_COUNT_ESI, esi, 8);
                if (ret != 8) {
@@ -4096,7 +4099,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
        struct nv50_disp *disp = nv50_disp(dev);
-       struct drm_plane_state *old_plane_state;
+       struct drm_plane_state *new_plane_state;
        struct drm_plane *plane;
        struct drm_crtc *crtc;
        bool active = false;
@@ -4126,8 +4129,8 @@ nv50_disp_atomic_commit(struct drm_device *dev,
        if (ret)
                goto err_cleanup;
 
-       for_each_old_plane_in_state(state, plane, old_plane_state, i) {
-               struct nv50_wndw_atom *asyw = nv50_wndw_atom(old_plane_state);
+       for_each_new_plane_in_state(state, plane, new_plane_state, i) {
+               struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state);
                struct nv50_wndw *wndw = nv50_wndw(plane);
 
                if (asyw->set.image) {
index 8e2e24a7477458d0ad2361885e79fca4f936068a..44e116f7880dd02e6754d3d328f1d909a0a7041a 100644 (file)
@@ -39,5 +39,5 @@ int
 g84_bsp_new(struct nvkm_device *device, int index, struct nvkm_engine **pengine)
 {
        return nvkm_xtensa_new_(&g84_bsp, device, index,
-                               true, 0x103000, pengine);
+                               device->chipset != 0x92, 0x103000, pengine);
 }
index d9ca9636a3e328226b91906adba92b1932706de3..da130f5058e5bafd261800909bdd1e470f8567ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf100_ce_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
index f0a1cf31c7ca3353c49dc642b63a229b9786c5ed..0b92eb32598df227b5cd7ed090d0178f95410b98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gt215_ce_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
index 2dce405976ad6a552855aef9ce61b63cb234dc1a..0e3d08f11b0b9b09859a870883daf2e5bbca29c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CE_PRIV_H__
 #define __NVKM_CE_PRIV_H__
 #include <engine/ce.h>
index 1bbe76e0740a028681978e5987dfef232d96b78b..6a62021e9861757ce5e1dc698fe6adf4e00d3f32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_ACPI_H__
 #define __NVKM_DEVICE_ACPI_H__
 #include <core/os.h>
index 20249d8e444de2daa2a6bd0f32174d658a135f7d..f279162f48c6b239443f0de2997a3e5b88ed167c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_CTRL_H__
 #define __NVKM_DEVICE_CTRL_H__
 #define nvkm_control(p) container_of((p), struct nvkm_control, object)
index 6c16f3835f443247991d5bda85c90462a803ce0d..08d0bf6057221f135671fabca96af167ac51bfb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVICE_PRIV_H__
 #define __NVKM_DEVICE_PRIV_H__
 #include <core/device.h>
index 737b38f6fbd2bbe9efeebeaf54dd285f19ea44ba..5701b3221a54e093f3ba383ba1e9b7ddf5570817 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_DISP_CHAN_H__
 #define __NV50_DISP_CHAN_H__
 #define nv50_disp_chan(p) container_of((p), struct nv50_disp_chan, object)
index de962b7b026dcefd3bfe62104f899a5f2e9268b2..090e869ae61220b8974c114aad491c9d6d24f89e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_CONN_H__
 #define __NVKM_DISP_CONN_H__
 #include <engine/disp.h>
index ea4a0d062e314fc799a9d71e90fd9d4939a23327..f9b98211da6a69be1fff7ec29ed37d0b55d9f419 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_DISP_DMAC_H__
 #define __NV50_DISP_DMAC_H__
 #define nv50_disp_dmac(p) container_of((p), struct nv50_disp_dmac, base)
index 59173c2905253961f59fcad611b2dff37c5b0af3..495f665a0ee683308fc1211b4b2e66a12efe39cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_DP_H__
 #define __NVKM_DISP_DP_H__
 #define nvkm_dp(p) container_of((p), struct nvkm_dp, outp)
index e82c68f1844476b3902a3df403c3a4fd88ecc687..d131cca999dd2c7f6361b9c784c4aef26c292ed7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "hdmi.h"
 
 void pack_hdmi_infoframe(struct packed_hdmi_infoframe *packed_frame,
index 528f5621a49632d8c7d83cc9dccb821355ecc051..45094c6e142555c58984fb51da83081b0cf88fbf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_HDMI_H__
 #define __NVKM_DISP_HDMI_H__
 #include "ior.h"
index b04c49d2eeeb986fec4dbc88d371bde14dbb16fa..57030b3a4a753409ea41c71f6ed014d9c3f5ffa1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_HEAD_H__
 #define __NVKM_DISP_HEAD_H__
 #include "priv.h"
index a1e8bf48b778430d45d46fb9e9de453fb897cd2a..cd6dd8742dc62e64bd81d7d51e890a43a55bcb96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_IOR_H__
 #define __NVKM_DISP_IOR_H__
 #include "priv.h"
index 6ea19466f43622565052d8600424c948c9705343..eb0b8acb1c5bb5a69c0335eb74e178577f34bcee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_DISP_H__
 #define __NV50_DISP_H__
 #define nv50_disp(p) container_of((p), struct nv50_disp, base)
index 146d101d4891de39b88fa69919a56a50665d9997..ea84d7d5741ad5a5e771483a225f6fea8a663223 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_OUTP_H__
 #define __NVKM_DISP_OUTP_H__
 #include <engine/disp.h>
index 5772f00941292a0bf0c636f0d9f090b85a4b3ed8..6c9bfff6d043b1794a439ea37274837b77991547 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DISP_PRIV_H__
 #define __NVKM_DISP_PRIV_H__
 #include <engine/disp.h>
index b147cf5b35183b650fef7efce8fed5a491119750..4818fa69ae6cff0dd46d622b8e46476e0c829cdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_DISP_ROOT_H__
 #define __NV50_DISP_ROOT_H__
 #define nv50_disp_root(p) container_of((p), struct nv50_disp_root, object)
index deb37ee55c0b5ab900d534267319675bb90ba47c..4307cbecd5c53e7cf0a22c544329228678183132 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DMA_PRIV_H__
 #define __NVKM_DMA_PRIV_H__
 #define nvkm_dma(p) container_of((p), struct nvkm_dma, engine)
index 69a7f103402427000cae267144c38907881119b3..4bbac8a21c713f931cdfde3477405e7ea543ac81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DMA_USER_H__
 #define __NVKM_DMA_USER_H__
 #define nvkm_dmaobj(p) container_of((p), struct nvkm_dmaobj, object)
index d8019bdacd61726a8f973886fd06f2133fb0628f..3ffef236189e6e1781af17a34cae7692ec2f4a1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FIFO_CHAN_H__
 #define __NVKM_FIFO_CHAN_H__
 #define nvkm_fifo_chan(p) container_of((p), struct nvkm_fifo_chan, object)
index 7d697e2dce1ab3405686731a3955e14303a8c8bb..27002caba42066123b4ecf45c37c28c05b426fa7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GF100_FIFO_CHAN_H__
 #define __GF100_FIFO_CHAN_H__
 #define gf100_fifo_chan(p) container_of((p), struct gf100_fifo_chan, base)
index 230f64e5f73180dbc944a87296de2f801456316d..ec10be2984a95d01de7a18bd758ba1825e4064b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GK104_FIFO_CHAN_H__
 #define __GK104_FIFO_CHAN_H__
 #define gk104_fifo_chan(p) container_of((p), struct gk104_fifo_chan, base)
index 3361a1fd03438dc7189be302b7cbe1007550c737..15b06bdf50679def3fb1ac8fe2f2f7806d32ecea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_FIFO_CHAN_H__
 #define __NV04_FIFO_CHAN_H__
 #define nv04_fifo_chan(p) container_of((p), struct nv04_fifo_chan, base)
index 4b9da469b704e933d934464b1101eaddc02a2de5..ad9aa157e07831c8211ad1fb3f5efde0b2712cef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_FIFO_CHAN_H__
 #define __NV50_FIFO_CHAN_H__
 #define nv50_fifo_chan(p) container_of((p), struct nv50_fifo_chan, base)
index 70db58eab9c3da61176ad8f17ddd8928ba6afea7..571a6edb3f97671a0ee05a9b7890c7bd0c747c24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GF100_FIFO_H__
 #define __GF100_FIFO_H__
 #define gf100_fifo(p) container_of((p), struct gf100_fifo, base)
index 44bff98d672519eb8778bc879faa98fe74c4e786..0506c52909361ca4150e93795dc9df60bbcdf75a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GK104_FIFO_H__
 #define __GK104_FIFO_H__
 #define gk104_fifo(p) container_of((p), struct gk104_fifo, base)
index 03f60004bf7ca3ce4dcd01380dc7bfbf34a5a65f..1d70542553cc0d151a462942fe5d308fdc1609ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_FIFO_H__
 #define __NV04_FIFO_H__
 #define nv04_fifo(p) container_of((p), struct nv04_fifo, base)
index 8ab53948cbb405bd5bc82adbe9fa7b4b5de570dc..a3994e8db462c741d591d258e0f1059e29a904ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_FIFO_H__
 #define __NV50_FIFO_H__
 #define nv50_fifo(p) container_of((p), struct nv50_fifo, base)
index f889b13b5e4178ce9c4a964676d75ab37307bc37..ae76b1aaccd461e0f761cce0a331c6285171fd92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FIFO_PRIV_H__
 #define __NVKM_FIFO_PRIV_H__
 #define nvkm_fifo(p) container_of((p), struct nvkm_fifo, engine)
index 92d56221197b96cbf85a774fe36b3bf72d2dcdce..49892a5e72010a61639adf6cc9e75825faddbfeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_FIFO_REGS_H__
 #define __NV04_FIFO_REGS_H__
 
index 017180d147cf55b9e341d29446e0d6d6c888eb47..2812ca511c9c3304608ac1fd0c5a67ca0725dfa1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GRCTX_NVC0_H__
 #define __NVKM_GRCTX_NVC0_H__
 #include "gf100.h"
index 50e808e9f926ec49891cc07ac2bf4a5abd8f13de..4d67d90261b867af6a99ce8f4d511b3f172037f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GRCTX_H__
 #define __NVKM_GRCTX_H__
 #include <core/gpuobj.h>
index 12a703fe355d32c01db0a5c97e1d78884d461df6..0323acb739c89c87a63e9c1f079c35f90bcfc479 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf100_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x00000064,
index ffbfc51200f19e6fbcac7e78977ca3f5f1ed094c..1bb26591791502a129160383d8f4f2c86bae84d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf117_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x0000006c,
index 357f662de5718446e8720c25e49a4965166469c9..cf8343a693ba9c2c97785829250f98dfdfb2abd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk104_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x0000006c,
index 4ffc8212a85c99e7a7b772bf225c045a1a13b898..f4bfa109ed274df443766d6cd0e3bda086aa6b5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk110_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x0000006c,
index 09196206c9bcfc7993820932e18200932f7968fe..59a3e1b2927fa49131dcc13d65e6920e7c9b3dc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk208_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x0000006c,
index 6d7d004363d91c64657b5847611c87783ed22108..8daa0516704aaa91ef93477b4872220bc3a82cae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gm107_grgpc_data[] = {
 /* 0x0000: gpc_mmio_list_head */
        0x0000006c,
index 7538404b8b134deb5659b84ba9b1d1ee20f4fd33..cbf2351f8da84f0617dafccc439b3b70d2d99fb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf100_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index ce000a47ec6dbacd2260aca36e6f1fe4822282df..70830036ffee6082bc21384025c7f20ed909e470 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf117_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index 1f26cb6a233c89e06cc8654b2f9a4a188b4a8f4a..7f2fd84d0c3a4144e37f5c186847a310375e347f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk104_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index 70436d93efe37097662a22283128b6c8e429dc82..560063789de895d72cef30bad8b7f7df8e66ce03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk110_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index e0933a07426addbec7fae172660fd0237d1fe2c8..71e85784b615225795a2372dea2824776ea1eff8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk208_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index 9b432823bcbe0c30f1b980ad7eb0825fafc828b3..d85eac6d1c61ecef1fa9b85931e9ca142fce66c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gm107_grhub_data[] = {
 /* 0x0000: hub_mmio_list_head */
        0x00000300,
index 1718ae4e82243e1e4ffc54906d8af932840bf89b..f87693809c9f00e6d29f2f7511ce8a7e8ebd785b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GRAPH_OS_H__
 #define __NVKM_GRAPH_OS_H__
 
index d7c3d86cc99dfec5f897c2871ed25a071ab224fd..d5a376c4dd0b86ef4c4a1f5c02d3444e4c3d957b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV10_GR_H__
 #define __NV10_GR_H__
 #include "priv.h"
index d1dc92999dc00f281f5c38507403a3ae0ff8e801..df2cd864147c9efc07ad561e4d10a72bbefcb107 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index cdf4501e3798dc2734c3c6114eb80949a31441ef..ad7e53bb7c235dec94b4168a4367f4e495cf0077 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV20_GR_H__
 #define __NV20_GR_H__
 #define nv20_gr(p) container_of((p), struct nv20_gr, base)
index 6c4a00819b4bda0fd45c75ba06abd66f2d01c587..e59a28a26d65092a78555f891cf4d0639cdfa9c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index 3cad26dbc2b1a5ebca0038cfc3149c138ab817a1..e113b2d4c8119f5e7b26bb83f39c9919217b1af6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index b4e3c50badc77e759fa8f93021220f340577b56d..4aac2c224874bb8997b9fabd6b026228719c0c84 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index e7ed04b935cd1f7014cb26fba9d366ea8db3431f..301556503e9319d5ca12398b8d054bdb6e69a5a0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index 5e8abacbacc64df941b55530ce3e2d2137e71041..5d6926611a5b7891cfb4de555ca0ec64f233fecc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "nv20.h"
 #include "regs.h"
 
index 2812ed11f877bce5b6315b7782902c78bd2fbff2..89b773233ac5f76ef363dc5a4568e6833c17658b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV40_GR_H__
 #define __NV40_GR_H__
 #define nv40_gr(p) container_of((p), struct nv40_gr, base)
index 45eec83a5969b905c8daee56bde996e8fbcef312..567fa4f3e5182aebd1a3746cd834c0c021ebcb9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_GR_H__
 #define __NV50_GR_H__
 #define nv50_gr(p) container_of((p), struct nv50_gr, base)
index 2a52d9f026ecbee89513941c66c0627b2504c58c..66359c23cbce278bfaad51e963dc0a7cdaa70923 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GR_PRIV_H__
 #define __NVKM_GR_PRIV_H__
 #define nvkm_gr(p) container_of((p), struct nvkm_gr, engine)
index 90a9873ce5228b68501d8370c3e7d6cf6d1f887d..dc4f936675aca3b9c64255a20df2cf48303c405b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GR_REGS_H__
 #define __NVKM_GR_REGS_H__
 
index d3bb34fcdebfe4f663c7c9814504a0fa2c288756..1ac2b4558bec4bc5bcb197c35feeb8d9bd9719f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV31_MPEG_H__
 #define __NV31_MPEG_H__
 #define nv31_mpeg(p) container_of((p), struct nv31_mpeg, engine)
index d5753103ff63f659be7f1b4b409d22434a04f839..26f9d14151e2752024c6707126d3ee8e612514f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MPEG_PRIV_H__
 #define __NVKM_MPEG_PRIV_H__
 #include <engine/mpeg.h>
index d518af4bc9de674abd8271dfcb3687bd8c05ff1d..db305072a82f5a9679b760d76de6f4e363a6aae0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSPDEC_PRIV_H__
 #define __NVKM_MSPDEC_PRIV_H__
 #include <engine/mspdec.h>
index 37a91f9d918145ae93296d2743c88360fa647cfe..7708e52c90432144e4fa28ddecd5097506d470c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSPPP_PRIV_H__
 #define __NVKM_MSPPP_PRIV_H__
 #include <engine/msppp.h>
index 9dc1da67d929e5cd0f1c79fbf7481d2654b68be1..66c36049abca417fca2abc2a9182f80083eb8beb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MSVLD_PRIV_H__
 #define __NVKM_MSVLD_PRIV_H__
 #include <engine/msvld.h>
index 353b94f51205a85d1b7af6f241efee5cccb0f549..6c300739f62164e65c2a51f2d0991ece9ab35e67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_NVDEC_PRIV_H__
 #define __NVKM_NVDEC_PRIV_H__
 #include <engine/nvdec.h>
index 56d0344853eacb48d27a62f2a4b29f055e8fef67..c74fd4557d41fd2e06c14d38ecbacd7c4da7829a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PM_NVC0_H__
 #define __NVKM_PM_NVC0_H__
 #include "priv.h"
index da481abe8f7a2dda878e6e5e465fb79e0d7a969a..3f37b713936cad914b4c4a97128d04637df5e6fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PM_NV40_H__
 #define __NVKM_PM_NV40_H__
 #define nv40_pm(p) container_of((p), struct nv40_pm, base)
index d7b81cbf82b50d001b20c380bf608c48759e29bd..17240d54b1ebd13c8ad2e0cd9d308a82f08f3d30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PM_PRIV_H__
 #define __NVKM_PM_PRIV_H__
 #define nvkm_pm(p) container_of((p), struct nvkm_pm, engine)
index 4b57f8814560d5876aa42b8a89a78cc93b41313d..6278a0c5fe8392f833cd07dfcd5c225070f28220 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t g98_sec_data[] = {
 /* 0x0000: ctx_dma */
 /* 0x0000: ctx_dma_query */
index 7ecc9d4724dc99417882c6d0ced63a22e390fdee..2f97c806a79d824cab3cc976235df689ce62b260 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SEC2_PRIV_H__
 #define __NVKM_SEC2_PRIV_H__
 #include <engine/sec2.h>
index 6608bf6c684211e6ce513e34bcbd53a4501ee9b4..b1fa69314e4a9472059fa197ec3aefa7d2ba22ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SW_CHAN_H__
 #define __NVKM_SW_CHAN_H__
 #define nvkm_sw_chan(p) container_of((p), struct nvkm_sw_chan, object)
index 25cdfdef2d461d8c8eeaba210cb48df971f0d18d..459afd30a484540fa08dd939010807e725ef7e3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SW_NV50_H__
 #define __NVKM_SW_NV50_H__
 #define nv50_sw_chan(p) container_of((p), struct nv50_sw_chan, base)
index 943ef4c10091c4ba8d5b71de2f68f097f3285489..7050a9e49db120a1ed666cc0270f28702c43f1a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_NVSW_H__
 #define __NVKM_NVSW_H__
 #define nvkm_nvsw(p) container_of((p), struct nvkm_nvsw, object)
index 0ef1318dc2fdeebaab4b33b3516ac2e2b365e411..4aca1791abc3c46c958f69976c6ec15d859666cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_SW_PRIV_H__
 #define __NVKM_SW_PRIV_H__
 #define nvkm_sw(p) container_of((p), struct nvkm_sw, engine)
index 97b56f759d0b53c2c7df4ca72ac6b8a3e1f1b501..d515ad9941996033faab10f259d3a07251c87ac6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FALCON_PRIV_H__
 #define __NVKM_FALCON_PRIV_H__
 #include <engine/falcon.h>
index 20a5255362baf60bd578c55381a74ed984ad98ee..9accd7923788f6a61d194ecf73fcf9cb2d4777a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GF100_BAR_H__
 #define __GF100_BAR_H__
 #define gf100_bar(p) container_of((p), struct gf100_bar, base)
index 1eb764f22a4994f74dfc5e85d708abe2ba231b70..ce9ab9110b08b3124fd9fa18da0a14122f18392a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_BAR_H__
 #define __NV50_BAR_H__
 #define nv50_bar(p) container_of((p), struct nv50_bar, base)
index d834ef20db5bb4b76b17e3866d709f199df2fef2..63d111c8afd4697ffd05e527c622f1cb493c0c16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BAR_PRIV_H__
 #define __NVKM_BAR_PRIV_H__
 #define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
index 7d1d3c6b4b728dec4711a75883df4d700a1a6290..33435ca16311cfe83087bd6e6cb6f0502ec45198 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BIOS_PRIV_H__
 #define __NVKM_BIOS_PRIV_H__
 #define nvkm_bios(p) container_of((p), struct nvkm_bios, subdev)
index 54ec3b131dfd3722dd2fcd1f2c0aca958bac93de..17ac1812a9287263c8dfa57255cbbd58acd29f6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BUS_HWSQ_H__
 #define __NVKM_BUS_HWSQ_H__
 #include <subdev/bus.h>
index a130f2c642d510e100c79beb3a8de9d1e0599d24..ef01e569352d34cbbf6e9d13a8a21c38cd2c7ed0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_BUS_PRIV_H__
 #define __NVKM_BUS_PRIV_H__
 #define nvkm_bus(p) container_of((p), struct nvkm_bus, subdev)
index 8865b59fe57523567fdd7961244249fdc3b2fce4..1ea886a4301fbe69320aac08b91391f51c819b9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CLK_NVA3_H__
 #define __NVKM_CLK_NVA3_H__
 #include "priv.h"
index d3c7fb6efa16c8228bad81519be58d343792b956..f134d979d88406c6b7db6692a2bfafecd7000183 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_CLK_H__
 #define __NV50_CLK_H__
 #define nv50_clk(p) container_of((p), struct nv50_clk, base)
index 44020a30dee8b35ffaeaa9caf8c913ff184b5faf..9a39f1fd2976e869dbf30b5a0818db6a6867c53c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PLL_H__
 #define __NVKM_PLL_H__
 #include <core/os.h>
index 51eafc00c8b108739d412b5f56c9dddac457d112..b656177923fb2a0c92d0448e6f612c244cad3ab4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CLK_PRIV_H__
 #define __NVKM_CLK_PRIV_H__
 #define nvkm_clk(p) container_of((p), struct nvkm_clk, subdev)
index d717e8b8f679077d0b2d4c6ab99e57ada9c5032c..d0715fe843288a7b3c79233ed5d921548eabdeb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_CLK_SEQ_H__
 #define __NVKM_CLK_SEQ_H__
 #include <subdev/bus/hwsq.h>
index 4a87c8c2bce84deca6672d0c40ba49c46ec6d594..b18e49847eee8d0ab520a9caba61edcd136a4729 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_DEVINIT_H__
 #define __NV04_DEVINIT_H__
 #define nv04_devinit(p) container_of((p), struct nv04_devinit, base)
index 25d2ae3af1c6ce5bac5bcd04af9366f3c080c90a..315ebaff1165ba10b89a105ede3cf18a89f94b3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV50_DEVINIT_H__
 #define __NV50_DEVINIT_H__
 #define nv50_devinit(p) container_of((p), struct nv50_devinit, base)
index e1f6ae58f1d354c7d07511d11f9351a8f68c3bfc..5b3097a586dd849b40de593a3df95da234038e37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_DEVINIT_PRIV_H__
 #define __NVKM_DEVINIT_PRIV_H__
 #define nvkm_devinit(p) container_of((p), struct nvkm_devinit, subdev)
index 412eb89834e8fb041e9b433fee6809de061e6454..1756f7b02858a1dd59762d2a177e241061679d91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_RAM_NVC0_H__
 #define __NVKM_RAM_NVC0_H__
 #define gf100_fb(p) container_of((p), struct gf100_fb, base)
index faa88c8c66fe6e5f59885b207d67922243033e18..a37758c76268f2e8232cabafaa53abc74d88a42b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FB_NV50_H__
 #define __NVKM_FB_NV50_H__
 #define nv50_fb(p) container_of((p), struct nv50_fb, base)
index e905d44fa1d59a88bf349e8bbcd467f49d7a7a00..8e87b887d4f5e4fd95b7e4355857bbfccd4e054b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FB_PRIV_H__
 #define __NVKM_FB_PRIV_H__
 #define nvkm_fb(p) container_of((p), struct nvkm_fb, subdev)
index fac7e73c3ddfb8d85c68b8ec9adecae682ff215a..b2122d261f8dc50195841e17d99d58beabe35df5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FB_RAM_PRIV_H__
 #define __NVKM_FB_RAM_PRIV_H__
 #include "priv.h"
index 9ef9d6aa3721efae65344565fd55d596609caa91..a65fa5586af8a354264a0efa527dc878e9f645a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FBRAM_FUC_H__
 #define __NVKM_FBRAM_FUC_H__
 #include <subdev/fb.h>
index 8a0524566b48681aa137ecfd73065df52ede6679..8549fdf2437cc61f8cd277f63b6e55c4908f6b81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV40_FB_RAM_H__
 #define __NV40_FB_RAM_H__
 #define nv40_ram(p) container_of((p), struct nv40_ram, base)
index 8df7306d572992c80d2776f2d78dfeb7fd999fa0..d8f5053e8e2a585ad1c62e9e103287fabea90960 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FBRAM_SEQ_H__
 #define __NVKM_FBRAM_SEQ_H__
 #include <subdev/bus/hwsq.h>
index 1f865f61504e5bf2814814fc297b6ab9ba1720d9..ad26fcbe9e066d2d0cb4587d3b1847adbd2f5fdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FB_REGS_04_H__
 #define __NVKM_FB_REGS_04_H__
 
index b0390b540ef5696736731630248dd98976174d4a..3a5595a9e457e2c70a0749074fa442bfa4dad35f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_FUSE_PRIV_H__
 #define __NVKM_FUSE_PRIV_H__
 #define nvkm_fuse(p) container_of((p), struct nvkm_fuse, subdev)
index 371bcdbbe0d67b9d2c247f26a2c5b6be78d10028..9759f13447bf14d837b6a95c000d13258e20ad62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_GPIO_PRIV_H__
 #define __NVKM_GPIO_PRIV_H__
 #define nvkm_gpio(p) container_of((p), struct nvkm_gpio, subdev)
index 9587ab456d9eaa882eb3e9e9749993dc8fe62e17..7d56c4ba693cf6b69d7441f52faebb940a0b364d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_I2C_AUX_H__
 #define __NVKM_I2C_AUX_H__
 #include "pad.h"
index e1be14c23e546ad96cabce96bf8a1decdfc39ebc..bea0dd33961e1e09537c15863d9881cf3183423c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_I2C_BUS_H__
 #define __NVKM_I2C_BUS_H__
 #include "pad.h"
index 316c4536f29a1e1e06eb6bdc4eedd60c53545c4f..33f0c809e583b1c9e231f1d3b7fb3a1947bccd78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_I2C_PAD_H__
 #define __NVKM_I2C_PAD_H__
 #include <subdev/i2c.h>
index bf655a66ef40073afa55669409851a75aadef959..f476a69b6cb780da72bb34ae271bdd196b69c1d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_I2C_PRIV_H__
 #define __NVKM_I2C_PRIV_H__
 #define nvkm_i2c(p) container_of((p), struct nvkm_i2c, subdev)
index 01caf798cf318dc5781e82b9ff0786734f1a9fea..504a6d37ec508070140e74310aceaf2ec9e5f8f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_IBUS_PRIV_H__
 #define __NVKM_IBUS_PRIV_H__
 
index e90e0f6ed00884c81b101650f16227cea287f90d..bd599b8252cabd3236cd0b9042e7e2c1370ea519 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_ICCSENSE_PRIV_H__
 #define __NVKM_ICCSENSE_PRIV_H__
 #define nvkm_iccsense(p) container_of((p), struct nvkm_iccsense, subdev)
index ace4471864a3c49d752652968109a9eeac2dd354..021e7a1f39a105c5e88be7dd32febaea9f4072bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_INSTMEM_PRIV_H__
 #define __NVKM_INSTMEM_PRIV_H__
 #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
index 8b95f96e3ffa1fad8cd26cf87a8b9f58ef872192..e71cc25cc775ee05f9d35d898f923c869cd697b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_LTC_PRIV_H__
 #define __NVKM_LTC_PRIV_H__
 #define nvkm_ltc(p) container_of((p), struct nvkm_ltc, subdev)
index 3be4126441e469ba4ef548c607208ed6dbff7631..8869d79c2b597cc6c542055c5bac7495bd5f44e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MC_PRIV_H__
 #define __NVKM_MC_PRIV_H__
 #define nvkm_mc(p) container_of((p), struct nvkm_mc, subdev)
index d06ad2c372bf30efb6b8ecc5978776def5721222..455da298227f65c2b4c2cfc6a2cedebe12661877 100644 (file)
@@ -241,6 +241,8 @@ nvkm_vm_unmap_pgt(struct nvkm_vm *vm, int big, u32 fpde, u32 lpde)
                        mmu->func->map_pgt(vpgd->obj, pde, vpgt->mem);
                }
 
+               mmu->func->flush(vm);
+
                nvkm_memory_del(&pgt);
        }
 }
index 363e33b296d5647b600ac869c7c7fa16cb504494..9c35c43635c2d50f20900ce2dad31c9bc46a4c06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV04_MMU_PRIV__
 #define __NV04_MMU_PRIV__
 #define nv04_mmu(p) container_of((p), struct nv04_mmu, base)
index 27cedc60b507ba6c5191bae81983831129fb7193..bf37f313b5bb8795c6680b13b81d4ef9854deb58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MMU_PRIV_H__
 #define __NVKM_MMU_PRIV_H__
 #define nvkm_mmu(p) container_of((p), struct nvkm_mmu, subdev)
index 333e0c01545a1f5c401a3b800dab782b64d8da2e..011a67fe4a8bd9effece6ace0711f1b01af804e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVMXM_MXMS_H__
 #define __NVMXM_MXMS_H__
 #include "priv.h"
index 7d970157aed10df368a2555709f1e54e4dcf5176..6767c2279e7c47f47dbf8942490de12d77fff79a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_MXM_PRIV_H__
 #define __NVKM_MXM_PRIV_H__
 #define nvkm_mxm(p) container_of((p), struct nvkm_mxm, subdev)
index df2dd08363ad42ea9980c1f5b254e17b463dad08..edb7f00f0de55bff89441d428d5d4eea6e1d0252 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "priv.h"
 #if defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))
 #ifndef __NVKM_PCI_AGP_H__
index 86921ec962d6b634ef5e287654767598d2b01d30..c17f6063c9ea60cddd4da9a48a7d7fc34dae5820 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PCI_PRIV_H__
 #define __NVKM_PCI_PRIV_H__
 #define nvkm_pci(p) container_of((p), struct nvkm_pci, subdev)
index 0bcf0b307a61ef5f4b791283db36e349b6126190..53d01fb00a8b66b189856d3d24a511f08101aa73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf100_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
index fe8905666c6786b16dc2ea1a54f159b96879bce5..e1e981966c2d1619a15488f70d4b1fe1d44718f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gf119_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
index 9cf4e6fc724e7b8ab9a78df04779c3c7cae7c945..c4edbc79e41a25303732d3982068f1710dba1200 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gk208_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
index 5d692425b190ffb7893f311f94b4065e28d70580..6a2572e8945ad7767b5756f6ea28a216a2c3aa56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static uint32_t gt215_pmu_data[] = {
 /* 0x0000: proc_kern */
        0x52544e49,
index c8b06cb77e7241cd50cec944b49adcc0325dd703..30d9480b9be522c91c9b1b05e73410a2cb9b7eda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PWR_OS_H__
 #define __NVKM_PWR_OS_H__
 
index e6f74168238c72ecc426471f061f676d66cc0829..11b28b086a062f7ba2cea541fb391095ea2cec43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef __NVKM_PMU_MEMX_H__
 #define __NVKM_PMU_MEMX_H__
 #include "priv.h"
index a4c48a10cd47f1292e87279ba87ab0b18a845b4e..e9c6f9725afe17d072ffa4c72e07ebbf47050c58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_PMU_PRIV_H__
 #define __NVKM_PMU_PRIV_H__
 #define nvkm_pmu(p) container_of((p), struct nvkm_pmu, subdev)
index f820ca2aeda449d3df464eac10d774bec2778f7a..3b8878486faaec53276424a19c090ce3bccedeab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_TIMER_PRIV_H__
 #define __NVKM_TIMER_PRIV_H__
 #define nvkm_timer(p) container_of((p), struct nvkm_timer, subdev)
index 10bef85b485ee42c9e3858aa5856ccb5cde38992..23d07f5f44d9ca10ddeed9a05e90e3887f486035 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define NV04_PTIMER_INTR_0      0x009100
 #define NV04_PTIMER_INTR_EN_0   0x009140
 #define NV04_PTIMER_NUMERATOR   0x009200
index adb3ed03d937ebc8a7931d117de1972d26310b77..4f49b0acaa0e6d71e98d208e89e2f31fa5816026 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_TOP_PRIV_H__
 #define __NVKM_TOP_PRIV_H__
 #define nvkm_top(p) container_of((p), struct nvkm_top, subdev)
index 354bafe4b4e2d7b9bac66060c5990d2cf8b78274..1a8ad560321b10d82649d30c6fdb76ead2640540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVKM_VOLT_PRIV_H__
 #define __NVKM_VOLT_PRIV_H__
 #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
index b391be7ecb6c3a0b03084ab94acd171937724217..f115253115c59abc542a206ed168cfaf5b9995de 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI)
index 46baafb1a83efc5b02d4442cdb65ed2e156c3541..d99659e1381b991ae69e51768b4d192acd446d82 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DRM_OMAP_ENCODER_OPA362) += encoder-opa362.o
 obj-$(CONFIG_DRM_OMAP_ENCODER_TFP410) += encoder-tfp410.o
 obj-$(CONFIG_DRM_OMAP_ENCODER_TPD12S015) += encoder-tpd12s015.o
index 142ce5a02542f28862956c2694e7033d37abc9d3..62d5b4f45420b5e9490b40109ef0aca5ae7bf237 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OMAP2_DSS_INIT) += omapdss-boot-init.o
 
 obj-$(CONFIG_OMAP_DSS_BASE) += omapdss-base.o
index 4dfb67fe5f6dcb75adae7321e4f86aee7ed76b1b..3ecde23ac60406071feddb897533f85c52c7aeee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #define DSS_SUBSYS_NAME "HDMI"
 
index 9f6610d08b009e99b18034a3bdd4656832c1f695..d73d3e661cec5e6943296292166d93663bf53c75 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o
 obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o
 obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o
index 59483d610ef5cd6898b5661ee771ef3fc0c20903..f2874bbdaa140bdfbd70f8f87508e5ee615024e0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 pl111_drm-y += pl111_connector.o \
                pl111_display.o \
                pl111_drv.o
index 14c5613b4388a839461915fc448d4772422861a3..afbf50d0c08fa1c89c49120717b7a51cb05d5b98 100644 (file)
@@ -509,23 +509,25 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
            .y2 = qfb->base.height
        };
 
-       if (!old_state->fb) {
-               qxl_io_log(qdev,
-                          "create primary fb: %dx%d,%d,%d\n",
-                          bo->surf.width, bo->surf.height,
-                          bo->surf.stride, bo->surf.format);
+       if (old_state->fb) {
+               qfb_old = to_qxl_framebuffer(old_state->fb);
+               bo_old = gem_to_qxl_bo(qfb_old->obj);
+       } else {
+               bo_old = NULL;
+       }
 
-               qxl_io_create_primary(qdev, 0, bo);
-               bo->is_primary = true;
+       if (bo == bo_old)
                return;
 
-       } else {
-               qfb_old = to_qxl_framebuffer(old_state->fb);
-               bo_old = gem_to_qxl_bo(qfb_old->obj);
+       if (bo_old && bo_old->is_primary) {
+               qxl_io_destroy_primary(qdev);
                bo_old->is_primary = false;
        }
 
-       bo->is_primary = true;
+       if (!bo->is_primary) {
+               qxl_io_create_primary(qdev, 0, bo);
+               bo->is_primary = true;
+       }
        qxl_draw_dirty_fb(qdev, qfb, bo, 0, 0, &norect, 1, 1);
 }
 
@@ -534,13 +536,15 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane,
 {
        struct qxl_device *qdev = plane->dev->dev_private;
 
-       if (old_state->fb)
-       {       struct qxl_framebuffer *qfb =
+       if (old_state->fb) {
+               struct qxl_framebuffer *qfb =
                        to_qxl_framebuffer(old_state->fb);
                struct qxl_bo *bo = gem_to_qxl_bo(qfb->obj);
 
-               qxl_io_destroy_primary(qdev);
-               bo->is_primary = false;
+               if (bo->is_primary) {
+                       qxl_io_destroy_primary(qdev);
+                       bo->is_primary = false;
+               }
        }
 }
 
@@ -698,14 +702,15 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane,
        struct drm_gem_object *obj;
        struct qxl_bo *user_bo;
 
-       if (!plane->state->fb) {
-               /* we never executed prepare_fb, so there's nothing to
+       if (!old_state->fb) {
+               /*
+                * we never executed prepare_fb, so there's nothing to
                 * unpin.
                 */
                return;
        }
 
-       obj = to_qxl_framebuffer(plane->state->fb)->obj;
+       obj = to_qxl_framebuffer(old_state->fb)->obj;
        user_bo = gem_to_qxl_bo(obj);
        qxl_bo_unpin(user_bo);
 }
index 4acbb944bcd2b2fb86db2a56d60220170a239a71..0ad8244b5ccf4a38d30f629eea4aed8672f833a0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index b928c17bdeed98d78286ef82bc97ddcab2a7b287..c21d8fa591efe53ca4f2d1c462673fb4555b750a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* utility to create the register check tables
  * this includes inlined list.h safe for userspace.
  *
index eb40888bdfcc1e563232e51ddc6641052c9b15d7..ad16a925f8d55fa8aa9e2a408e3688c4752f6693 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #define R100_TRACK_MAX_TEXTURE 3
 #define R200_TRACK_MAX_TEXTURE 6
index 997131d58c7f639f8dbb765e51433a35a7da27ba..ffc10cadcf34ccb79a7d09ae253b4a2dffda7cfe 100644 (file)
@@ -1663,7 +1663,7 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
        radeon_agp_suspend(rdev);
 
        pci_save_state(dev->pdev);
-       if (freeze && rdev->family >= CHIP_CEDAR) {
+       if (freeze && rdev->family >= CHIP_CEDAR && !(rdev->flags & RADEON_IS_IGP)) {
                rdev->asic->asic_reset(rdev, true);
                pci_restore_state(dev->pdev);
        } else if (suspend) {
index ebdf1b859cb6cb966d9ff34fa13ae56b4f59ed09..2917ea1b667e59ee6b4149851f9e10d2350b23b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <drm/drmP.h>
 #include <drm/drm_dp_mst_helper.h>
index 49750d07ab7d46e2352ce498bf07c63e8fc3dd25..611cf934b2119d0c82918c68ed676b41521e6155 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
 #include "radeon.h"
index fdce4062901fe91356ebf5646ab4e9d9e8e77eea..db8f079e441eb54e4a54826526da9dcc7c2551da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_RADEON_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _RADEON_TRACE_H_
 
index e51d3575976befb544455661ebfecf87cedcfa5e..66b3d5084662d42d16f73b45b76f589202c63dae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright Red Hat Inc 2010.
  * Author : Dave Airlie <airlied@redhat.com>
  */
index 2131e722de3bc3ae437236cb78a066d76085e8ec..0cf5c11030e8c773223ceb1a3f94c5309d3ffbc0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rcar-du-drm-y := rcar_du_crtc.o \
                 rcar_du_drv.o \
                 rcar_du_encoder.o \
index fa8dc9d9aac28dfdf546bd84cbc0b54f723b4121..305409818ffbf07b28792f3edc3336bbbcf500e8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index 37bbdac52896f85c37f233b94d8fc2bf0b965887..54acc117550cfac5fe16e38e753b6067a46ca884 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as igt__name to create
index 4c3eeb355630f9b87dc9ddee738f2da026c73a2d..861edafed8562c875b544715c554cdf3b787f269 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 shmob-drm-y := shmob_drm_backlight.o \
               shmob_drm_crtc.o \
               shmob_drm_drv.o \
index c35db12435c323f7444d4f78c29e9d8497437406..f203ac5514ae0b937f054b2a9a9e08fd4586df75 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 sti-drm-y := \
        sti_mixer.o \
        sti_gdp.o \
index 06f05302ee75e33b2a05f9c468b1a3bbd60619be..882d85db90539ae1b00e194a0cae43bf8fb4918d 100644 (file)
@@ -26,7 +26,7 @@ config DRM_SUN4I_HDMI_CEC
        bool "Allwinner A10 HDMI CEC Support"
        depends on DRM_SUN4I_HDMI
        select CEC_CORE
-       depends on CEC_PIN
+       select CEC_PIN
        help
          Choose this option if you have an Allwinner SoC with an HDMI
          controller and want to use CEC.
index 43c753cafc884dc2bc3da67e52e2a4bcad1a8c4c..55b32368f8fb4c7a5424d53711aafe14851b4cf1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 sun4i-drm-y += sun4i_drv.o
 sun4i-drm-y += sun4i_framebuffer.o
 
index 1457750988da4930792eceb3e543f211d66f84f7..a1f8cba251a245af7227d853da784518d19d405d 100644 (file)
@@ -15,7 +15,7 @@
 #include <drm/drm_connector.h>
 #include <drm/drm_encoder.h>
 
-#include <media/cec.h>
+#include <media/cec-pin.h>
 
 #define SUN4I_HDMI_CTRL_REG            0x004
 #define SUN4I_HDMI_CTRL_ENABLE                 BIT(31)
index 9ea6cd5a1370d92e6eb78c864641986bffbc0086..3cf1a6932facf0b33d25cebbd288477ff6152af7 100644 (file)
@@ -302,26 +302,29 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master,
        hdmi->mod_clk = devm_clk_get(dev, "mod");
        if (IS_ERR(hdmi->mod_clk)) {
                dev_err(dev, "Couldn't get the HDMI mod clock\n");
-               return PTR_ERR(hdmi->mod_clk);
+               ret = PTR_ERR(hdmi->mod_clk);
+               goto err_disable_bus_clk;
        }
        clk_prepare_enable(hdmi->mod_clk);
 
        hdmi->pll0_clk = devm_clk_get(dev, "pll-0");
        if (IS_ERR(hdmi->pll0_clk)) {
                dev_err(dev, "Couldn't get the HDMI PLL 0 clock\n");
-               return PTR_ERR(hdmi->pll0_clk);
+               ret = PTR_ERR(hdmi->pll0_clk);
+               goto err_disable_mod_clk;
        }
 
        hdmi->pll1_clk = devm_clk_get(dev, "pll-1");
        if (IS_ERR(hdmi->pll1_clk)) {
                dev_err(dev, "Couldn't get the HDMI PLL 1 clock\n");
-               return PTR_ERR(hdmi->pll1_clk);
+               ret = PTR_ERR(hdmi->pll1_clk);
+               goto err_disable_mod_clk;
        }
 
        ret = sun4i_tmds_create(hdmi);
        if (ret) {
                dev_err(dev, "Couldn't create the TMDS clock\n");
-               return ret;
+               goto err_disable_mod_clk;
        }
 
        writel(SUN4I_HDMI_CTRL_ENABLE, hdmi->base + SUN4I_HDMI_CTRL_REG);
@@ -362,7 +365,7 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master,
        ret = sun4i_hdmi_i2c_create(dev, hdmi);
        if (ret) {
                dev_err(dev, "Couldn't create the HDMI I2C adapter\n");
-               return ret;
+               goto err_disable_mod_clk;
        }
 
        drm_encoder_helper_add(&hdmi->encoder,
@@ -422,6 +425,10 @@ err_cleanup_connector:
        drm_encoder_cleanup(&hdmi->encoder);
 err_del_i2c_adapter:
        i2c_del_adapter(hdmi->i2c);
+err_disable_mod_clk:
+       clk_disable_unprepare(hdmi->mod_clk);
+err_disable_bus_clk:
+       clk_disable_unprepare(hdmi->bus_clk);
        return ret;
 }
 
@@ -434,6 +441,8 @@ static void sun4i_hdmi_unbind(struct device *dev, struct device *master,
        drm_connector_cleanup(&hdmi->connector);
        drm_encoder_cleanup(&hdmi->encoder);
        i2c_del_adapter(hdmi->i2c);
+       clk_disable_unprepare(hdmi->mod_clk);
+       clk_disable_unprepare(hdmi->bus_clk);
 }
 
 static const struct component_ops sun4i_hdmi_ops = {
index 8927784396e841105fef38ec566185019b7f09dc..46d65d39214d94fc973ad2539ff3613132a34397 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_DRM_TEGRA_DEBUG) += -DDEBUG
 
 tegra-drm-y := \
index e9b7cdad5c4c1beac73bca274321cc57280006bd..5a1ab4046e926fefe4cb6d73d2c3ebe031eb45bb 100644 (file)
@@ -63,6 +63,6 @@ DEFINE_EVENT(register_access, sor_readl,
 
 /* This part must be outside protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/tegra
 #define TRACE_INCLUDE_FILE trace
 #include <trace/define_trace.h>
index 55ebd516728fd9e055032acedc872753a7bd771a..b9e1108e5b4e81e8c6a9926361abff0c5226248a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifeq (, $(findstring -W,$(EXTRA_CFLAGS)))
        ccflags-y += -Werror
 endif
index 4d0c938ff4b215d7f6324e883472d417b8ade158..a60e560804e0ad3c64c6cf2b632a8c5085b59fde 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 
index 25bd5d30415df55e4715334a597ca1e7b3012bd7..837c82757339259bd168a01e22c2cbec7543ce83 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Please keep these build lists sorted!
 
 # core driver code
index 7684f613bdc3ef840412df4021d38582655ec39f..f29deec83d1f0478550b2d5b400e918a99607b55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
index a365330bbb82cdcbb8d040daf4f58a906ce72c88..ad80211e1098bbc4bc26292cd8a4c82aedb7926b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
            vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_buffer.o \
            vmwgfx_fifo.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \
index 120eab830eaf26056745c189746664415f05f5a1..3a195e8106b3b02bffe2f66546f3e831073d628f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VM_BASIC_TYPES_H_
 #define _VM_BASIC_TYPES_H_
 #include <linux/kernel.h>
index 9df7766a7f9ded0e277cc96a1dcd9ea00ea5e0f7..b6d966d849dd9f6a5977af931a451bed790b7489 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 zxdrm-y := \
        zx_drm_drv.o \
        zx_hdmi.o \
index a1d9974cfcb52424f09003e3b5d93c16f6db1ea1..c0b80244158d72a9465bc83cd8477e98f6c2099c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 host1x-y = \
        bus.o \
        syncpt.o \
index 8cdf9e4ae772c31fecddf658ecc913e43683ad16..7cc8b47e488b745ee9ee207a1d3303e5a2b8e3f3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
 
 imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
index 6a573d21d3cc2ec91ea3d0d0e0ebecda20e4c534..658fa2d3e40c260d051d4299bda4eddb0af5abeb 100644 (file)
@@ -405,6 +405,14 @@ int ipu_idmac_lock_enable(struct ipuv3_channel *channel, int num_bursts)
                return -EINVAL;
        }
 
+       /*
+        * IPUv3EX / i.MX51 has a different register layout, and on IPUv3M /
+        * i.MX53 channel arbitration locking doesn't seem to work properly.
+        * Allow enabling the lock feature on IPUv3H / i.MX6 only.
+        */
+       if (bursts && ipu->ipu_type != IPUV3H)
+               return -EINVAL;
+
        for (i = 0; i < ARRAY_SIZE(idmac_lock_en_info); i++) {
                if (channel->num == idmac_lock_en_info[i].chnum)
                        break;
index c35f74c830657f26a3e29c34f7cef7e9f864f71a..c860a7997cb59c981557e01021d6a4278b2470ea 100644 (file)
 #define  IPU_PRE_STORE_ENG_CTRL_WR_NUM_BYTES(v)                ((v & 0x7) << 1)
 #define  IPU_PRE_STORE_ENG_CTRL_OUTPUT_ACTIVE_BPP(v)   ((v & 0x3) << 4)
 
+#define IPU_PRE_STORE_ENG_STATUS                       0x120
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_X_MASK   0xffff
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_X_SHIFT  0
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK   0x3fff
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT  16
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_FIFO_FULL      (1 << 30)
+#define  IPU_PRE_STORE_ENG_STATUS_STORE_FIELD          (1 << 31)
+
 #define IPU_PRE_STORE_ENG_SIZE                         0x130
 #define  IPU_PRE_STORE_ENG_SIZE_INPUT_WIDTH(v)         ((v & 0xffff) << 0)
 #define  IPU_PRE_STORE_ENG_SIZE_INPUT_HEIGHT(v)                ((v & 0xffff) << 16)
@@ -93,6 +101,7 @@ struct ipu_pre {
        dma_addr_t              buffer_paddr;
        void                    *buffer_virt;
        bool                    in_use;
+       unsigned int            safe_window_end;
 };
 
 static DEFINE_MUTEX(ipu_pre_list_mutex);
@@ -160,6 +169,9 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
        u32 active_bpp = info->cpp[0] >> 1;
        u32 val;
 
+       /* calculate safe window for ctrl register updates */
+       pre->safe_window_end = height - 2;
+
        writel(bufaddr, pre->regs + IPU_PRE_CUR_BUF);
        writel(bufaddr, pre->regs + IPU_PRE_NEXT_BUF);
 
@@ -199,7 +211,24 @@ void ipu_pre_configure(struct ipu_pre *pre, unsigned int width,
 
 void ipu_pre_update(struct ipu_pre *pre, unsigned int bufaddr)
 {
+       unsigned long timeout = jiffies + msecs_to_jiffies(5);
+       unsigned short current_yblock;
+       u32 val;
+
        writel(bufaddr, pre->regs + IPU_PRE_NEXT_BUF);
+
+       do {
+               if (time_after(jiffies, timeout)) {
+                       dev_warn(pre->dev, "timeout waiting for PRE safe window\n");
+                       return;
+               }
+
+               val = readl(pre->regs + IPU_PRE_STORE_ENG_STATUS);
+               current_yblock =
+                       (val >> IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT) &
+                       IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK;
+       } while (current_yblock == 0 || current_yblock >= pre->safe_window_end);
+
        writel(IPU_PRE_CTRL_SDW_UPDATE, pre->regs + IPU_PRE_CTRL_SET);
 }
 
index ecc9ea44dc50fc4f5b815564ae54f46884f93a2e..0013ca9f72c83e8f85b3c91aa62aaf619690f234 100644 (file)
@@ -14,6 +14,7 @@
 #include <drm/drm_fourcc.h>
 #include <linux/clk.h>
 #include <linux/err.h>
+#include <linux/iopoll.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <linux/module.h>
@@ -329,6 +330,12 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan,
        val = IPU_PRG_REG_UPDATE_REG_UPDATE;
        writel(val, prg->regs + IPU_PRG_REG_UPDATE);
 
+       /* wait for both double buffers to be filled */
+       readl_poll_timeout(prg->regs + IPU_PRG_STATUS, val,
+                          (val & IPU_PRG_STATUS_BUFFER0_READY(prg_chan)) &&
+                          (val & IPU_PRG_STATUS_BUFFER1_READY(prg_chan)),
+                          5, 1000);
+
        clk_disable_unprepare(prg->clk_ipg);
 
        chan->enabled = true;
index 0a3117cc29e70c54b3f9b269889d9b4ccf2fb56c..374301fcbc86791e5005ba3e1b45a35c496174ad 100644 (file)
@@ -281,6 +281,7 @@ config HID_ELECOM
        Support for ELECOM devices:
          - BM084 Bluetooth Mouse
          - DEFT Trackball (Wired and wireless)
+         - HUGE Trackball (Wired and wireless)
 
 config HID_ELO
        tristate "ELO USB 4000/4500 touchscreen"
index 8659d7e633a5dad16c46f2632b0524a23226bd44..235bd2a7b333a4da9650ea4dc6d094318c90f7b2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the HID driver
 #
index 9bc91160819b6eaeac1b0368bdbdfe15a1328422..330ca983828ba6d11feaf5538841a6810d84f5c6 100644 (file)
@@ -2032,6 +2032,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
 #endif
 #if IS_ENABLED(CONFIG_HID_ELO)
        { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
index e2c7465df69f3ae74c2cb1979c531b02e2934089..54aeea57d2099bd8c0a1acf41b9d2f0c21c58ee6 100644 (file)
@@ -3,6 +3,7 @@
  *  Copyright (c) 2010 Richard Nauber <Richard.Nauber@gmail.com>
  *  Copyright (c) 2016 Yuxuan Shui <yshuiv7@gmail.com>
  *  Copyright (c) 2017 Diego Elio Pettenò <flameeyes@flameeyes.eu>
+ *  Copyright (c) 2017 Alex Manoussakis <amanou@gnu.org>
  */
 
 /*
@@ -32,9 +33,11 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                break;
        case USB_DEVICE_ID_ELECOM_DEFT_WIRED:
        case USB_DEVICE_ID_ELECOM_DEFT_WIRELESS:
-               /* The DEFT trackball has eight buttons, but its descriptor only
-                * reports five, disabling the three Fn buttons on the top of
-                * the mouse.
+       case USB_DEVICE_ID_ELECOM_HUGE_WIRED:
+       case USB_DEVICE_ID_ELECOM_HUGE_WIRELESS:
+               /* The DEFT/HUGE trackball has eight buttons, but its descriptor
+                * only reports five, disabling the three Fn buttons on the top
+                * of the mouse.
                 *
                 * Apply the following diff to the descriptor:
                 *
@@ -62,7 +65,7 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                 * End Collection,                     End Collection,
                 */
                if (*rsize == 213 && rdesc[13] == 5 && rdesc[21] == 5) {
-                       hid_info(hdev, "Fixing up Elecom DEFT Fn buttons\n");
+                       hid_info(hdev, "Fixing up Elecom DEFT/HUGE Fn buttons\n");
                        rdesc[13] = 8; /* Button/Variable Report Count */
                        rdesc[21] = 8; /* Button/Variable Usage Maximum */
                        rdesc[29] = 0; /* Button/Constant Report Count */
@@ -76,6 +79,8 @@ static const struct hid_device_id elecom_devices[] = {
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, elecom_devices);
index b397a14ab9703b259d7b258ebcfdc9d582b31b07..be2e005c3c516c6cb522a68a891d75e48f8f800f 100644 (file)
 #define USB_DEVICE_ID_ELECOM_BM084     0x0061
 #define USB_DEVICE_ID_ELECOM_DEFT_WIRED        0x00fe
 #define USB_DEVICE_ID_ELECOM_DEFT_WIRELESS     0x00ff
+#define USB_DEVICE_ID_ELECOM_HUGE_WIRED        0x010c
+#define USB_DEVICE_ID_ELECOM_HUGE_WIRELESS     0x010d
 
 #define USB_VENDOR_ID_DREAM_CHEEKY     0x1d34
 #define USB_DEVICE_ID_DREAM_CHEEKY_WN  0x0004
 #define USB_VENDOR_ID_IDEACOM          0x1cb6
 #define USB_DEVICE_ID_IDEACOM_IDC6650  0x6650
 #define USB_DEVICE_ID_IDEACOM_IDC6651  0x6651
+#define USB_DEVICE_ID_IDEACOM_IDC6680  0x6680
 
 #define USB_VENDOR_ID_ILITEK           0x222a
 #define USB_DEVICE_ID_ILITEK_MULTITOUCH        0x0001
 #define USB_DEVICE_ID_LENOVO_CBTKBD    0x6048
 #define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067
 #define USB_DEVICE_ID_LENOVO_X1_COVER  0x6085
+#define USB_DEVICE_ID_LENOVO_X1_TAB    0x60a3
 
 #define USB_VENDOR_ID_LG               0x1fd2
 #define USB_DEVICE_ID_LG_MULTITOUCH    0x0064
index 10dd8f0241352544b24bc057c861cc04415292ec..3d8902ba1c6cd56d874de5e5708164753444b8d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HID_LG_H
 #define __HID_LG_H
 
index de1f350e0bd300e5a81d4546bd1b4063becf8e11..e5c55d515ac27dc74a798fd575872bc35cf04686 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HID_LG4FF_H
 #define __HID_LG4FF_H
 
index 440b999304a554309c208999ae2be053ec218d32..9e8c4d2ba11d2cc7c2559f34dc46fe646640e131 100644 (file)
@@ -930,6 +930,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
            field->application != HID_DG_PEN &&
            field->application != HID_DG_TOUCHPAD &&
            field->application != HID_GD_KEYBOARD &&
+           field->application != HID_GD_SYSTEM_CONTROL &&
            field->application != HID_CP_CONSUMER_CONTROL &&
            field->application != HID_GD_WIRELESS_RADIO_CTLS &&
            !(field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS &&
@@ -1419,6 +1420,12 @@ static const struct hid_device_id mt_devices[] = {
                        USB_VENDOR_ID_ALPS_JP,
                        HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP) },
 
+       /* Lenovo X1 TAB Gen 2 */
+       { .driver_data = MT_CLS_WIN_8_DUAL,
+               HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
+                          USB_VENDOR_ID_LENOVO,
+                          USB_DEVICE_ID_LENOVO_X1_TAB) },
+
        /* Anton devices */
        { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
                MT_USB_DEVICE(USB_VENDOR_ID_ANTON,
index 5b40c26145993fafa51530dcb573bad0e971fb89..ef241d66562e00950e8979ef4fd0633fd4efdca3 100644 (file)
@@ -436,17 +436,24 @@ static int rmi_post_resume(struct hid_device *hdev)
        if (!(data->device_flags & RMI_DEVICE))
                return 0;
 
-       ret = rmi_reset_attn_mode(hdev);
+       /* Make sure the HID device is ready to receive events */
+       ret = hid_hw_open(hdev);
        if (ret)
                return ret;
 
+       ret = rmi_reset_attn_mode(hdev);
+       if (ret)
+               goto out;
+
        ret = rmi_driver_resume(rmi_dev, false);
        if (ret) {
                hid_warn(hdev, "Failed to resume device: %d\n", ret);
-               return ret;
+               goto out;
        }
 
-       return 0;
+out:
+       hid_hw_close(hdev);
+       return ret;
 }
 #endif /* CONFIG_PM */
 
index ec530454e6f68789fe57444fba14eb1daae94e2e..5fbe0f81ab2ebd2c972237fa1be2bc3b544afee8 100644 (file)
@@ -337,8 +337,8 @@ static void drop_ref(struct hidraw *hidraw, int exists_bit)
                        kfree(hidraw);
                } else {
                        /* close device for last reader */
-                       hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
                        hid_hw_close(hidraw->hid);
+                       hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
                }
        }
 }
index 77396145d2d093af60e44c825ffaabd25f9b68a1..9145c2129a967464e1e7ed8978dbe53c6db9e86e 100644 (file)
@@ -543,7 +543,8 @@ static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size)
 {
        /* the worst case is computed from the set_report command with a
         * reportID > 15 and the maximum report length */
-       int args_len = sizeof(__u8) + /* optional ReportID byte */
+       int args_len = sizeof(__u8) + /* ReportID */
+                      sizeof(__u8) + /* optional ReportID byte */
                       sizeof(__u16) + /* data register */
                       sizeof(__u16) + /* size of the report */
                       report_size; /* report */
index 8c08b0b358b1a28ca7f31f50996960cecabedd0d..825b70af672f8da19193b750d1fb852e796008f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel ISH HID drivers
 # Copyright (c) 2014-2016, Intel Corporation.
index 890f2914a8ff90a2b4c946b2d22ee8748e7855dc..0ff227d0c033c54beb92dc7a1b0d00356d9179ae 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the USB input drivers
 #
index 089bad8a9a21d6b35742df8819fabb4da5036730..045b5da9b992873ce74f5d401de34855b93a6f8e 100644 (file)
@@ -975,6 +975,8 @@ static int usbhid_parse(struct hid_device *hid)
        unsigned int rsize = 0;
        char *rdesc;
        int ret, n;
+       int num_descriptors;
+       size_t offset = offsetof(struct hid_descriptor, desc);
 
        quirks = usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
                        le16_to_cpu(dev->descriptor.idProduct));
@@ -997,10 +999,18 @@ static int usbhid_parse(struct hid_device *hid)
                return -ENODEV;
        }
 
+       if (hdesc->bLength < sizeof(struct hid_descriptor)) {
+               dbg_hid("hid descriptor is too short\n");
+               return -EINVAL;
+       }
+
        hid->version = le16_to_cpu(hdesc->bcdHID);
        hid->country = hdesc->bCountryCode;
 
-       for (n = 0; n < hdesc->bNumDescriptors; n++)
+       num_descriptors = min_t(int, hdesc->bNumDescriptors,
+              (hdesc->bLength - offset) / sizeof(struct hid_class_descriptor));
+
+       for (n = 0; n < num_descriptors; n++)
                if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
                        rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
 
index a83fa76655b94f6ab8461f167748f785d1a1cebc..f489a5cfcb48cf5216a532091482ac669786e61d 100644 (file)
@@ -99,6 +99,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0A4A, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
+       { USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680, HID_QUIRK_MULTI_INPUT },
        { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C007, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_C077, HID_QUIRK_ALWAYS_POLL },
        { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KEYBOARD_G710_PLUS, HID_QUIRK_NOGET },
index e82a696a1d07ca97df04371c00dc5dc95fbafec9..906e654fb0ba42fe85b49e3813beebabe86d7b3e 100644 (file)
@@ -668,8 +668,10 @@ static struct wacom_hdev_data *wacom_get_hdev_data(struct hid_device *hdev)
 
        /* Try to find an already-probed interface from the same device */
        list_for_each_entry(data, &wacom_udev_list, list) {
-               if (compare_device_paths(hdev, data->dev, '/'))
+               if (compare_device_paths(hdev, data->dev, '/')) {
+                       kref_get(&data->kref);
                        return data;
+               }
        }
 
        /* Fallback to finding devices that appear to be "siblings" */
@@ -766,6 +768,9 @@ static int wacom_led_control(struct wacom *wacom)
        if (!wacom->led.groups)
                return -ENOTSUPP;
 
+       if (wacom->wacom_wac.features.type == REMOTE)
+               return -ENOTSUPP;
+
        if (wacom->wacom_wac.pid) { /* wireless connected */
                report_id = WAC_CMD_WL_LED_CONTROL;
                buf_size = 13;
index bb17d7bbefd3e7bf033344e7e1bc6b5d5228fd27..aa692e28b2cd60e52bbae7dcb93454fa145ee69a 100644 (file)
@@ -567,8 +567,8 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
                                keys = data[9] & 0x07;
                        }
                } else {
-                       buttons = ((data[6] & 0x10) << 10) |
-                                 ((data[5] & 0x10) << 9)  |
+                       buttons = ((data[6] & 0x10) << 5)  |
+                                 ((data[5] & 0x10) << 4)  |
                                  ((data[6] & 0x0F) << 4)  |
                                  (data[5] & 0x0F);
                }
@@ -1227,11 +1227,17 @@ static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
                        continue;
 
                if (range) {
+                       /* Fix rotation alignment: userspace expects zero at left */
+                       int16_t rotation = (int16_t)get_unaligned_le16(&frame[9]);
+                       rotation += 1800/4;
+                       if (rotation > 899)
+                               rotation -= 1800;
+
                        input_report_abs(pen_input, ABS_X, get_unaligned_le16(&frame[1]));
                        input_report_abs(pen_input, ABS_Y, get_unaligned_le16(&frame[3]));
-                       input_report_abs(pen_input, ABS_TILT_X, frame[7]);
-                       input_report_abs(pen_input, ABS_TILT_Y, frame[8]);
-                       input_report_abs(pen_input, ABS_Z, get_unaligned_le16(&frame[9]));
+                       input_report_abs(pen_input, ABS_TILT_X, (char)frame[7]);
+                       input_report_abs(pen_input, ABS_TILT_Y, (char)frame[8]);
+                       input_report_abs(pen_input, ABS_Z, rotation);
                        input_report_abs(pen_input, ABS_WHEEL, get_unaligned_le16(&frame[11]));
                }
                input_report_abs(pen_input, ABS_PRESSURE, get_unaligned_le16(&frame[5]));
@@ -1319,12 +1325,19 @@ static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom)
        unsigned char *data = wacom->data;
 
        int buttons = (data[282] << 1) | ((data[281] >> 6) & 0x01);
-       int ring = data[285];
-       int prox = buttons | (ring & 0x80);
+       int ring = data[285] & 0x7F;
+       bool ringstatus = data[285] & 0x80;
+       bool prox = buttons || ringstatus;
+
+       /* Fix touchring data: userspace expects 0 at left and increasing clockwise */
+       ring = 71 - ring;
+       ring += 3*72/16;
+       if (ring > 71)
+               ring -= 72;
 
        wacom_report_numbered_buttons(pad_input, 9, buttons);
 
-       input_report_abs(pad_input, ABS_WHEEL, (ring & 0x80) ? (ring & 0x7f) : 0);
+       input_report_abs(pad_input, ABS_WHEEL, ringstatus ? ring : 0);
 
        input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0);
        input_report_abs(pad_input, ABS_MISC, prox ? PAD_DEVICE_ID : 0);
@@ -1616,6 +1629,20 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
        return 0;
 }
 
+static int wacom_offset_rotation(struct input_dev *input, struct hid_usage *usage,
+                                int value, int num, int denom)
+{
+       struct input_absinfo *abs = &input->absinfo[usage->code];
+       int range = (abs->maximum - abs->minimum + 1);
+
+       value += num*range/denom;
+       if (value > abs->maximum)
+               value -= range;
+       else if (value < abs->minimum)
+               value += range;
+       return value;
+}
+
 int wacom_equivalent_usage(int usage)
 {
        if ((usage & HID_USAGE_PAGE) == WACOM_HID_UP_WACOMDIGITIZER) {
@@ -1898,6 +1925,7 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
        unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
        int i;
        bool is_touch_on = value;
+       bool do_report = false;
 
        /*
         * Avoid reporting this event and setting inrange_state if this usage
@@ -1912,6 +1940,29 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
        }
 
        switch (equivalent_usage) {
+       case WACOM_HID_WD_TOUCHRING:
+               /*
+                * Userspace expects touchrings to increase in value with
+                * clockwise gestures and have their zero point at the
+                * tablet's left. HID events "should" be clockwise-
+                * increasing and zero at top, though the MobileStudio
+                * Pro and 2nd-gen Intuos Pro don't do this...
+                */
+               if (hdev->vendor == 0x56a &&
+                   (hdev->product == 0x34d || hdev->product == 0x34e ||  /* MobileStudio Pro */
+                    hdev->product == 0x357 || hdev->product == 0x358)) { /* Intuos Pro 2 */
+                       value = (field->logical_maximum - value);
+
+                       if (hdev->product == 0x357 || hdev->product == 0x358)
+                               value = wacom_offset_rotation(input, usage, value, 3, 16);
+                       else if (hdev->product == 0x34d || hdev->product == 0x34e)
+                               value = wacom_offset_rotation(input, usage, value, 1, 2);
+               }
+               else {
+                       value = wacom_offset_rotation(input, usage, value, 1, 4);
+               }
+               do_report = true;
+               break;
        case WACOM_HID_WD_TOUCHRINGSTATUS:
                if (!value)
                        input_event(input, usage->type, usage->code, 0);
@@ -1945,10 +1996,14 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
                                         value, i);
                 /* fall through*/
        default:
+               do_report = true;
+               break;
+       }
+
+       if (do_report) {
                input_event(input, usage->type, usage->code, value);
                if (value)
                        wacom_wac->hid_data.pad_input_event_flag = true;
-               break;
        }
 }
 
@@ -2086,22 +2141,34 @@ static void wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field
                wacom_wac->hid_data.tipswitch |= value;
                return;
        case HID_DG_TOOLSERIALNUMBER:
-               wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL);
-               wacom_wac->serial[0] |= (__u32)value;
+               if (value) {
+                       wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL);
+                       wacom_wac->serial[0] |= (__u32)value;
+               }
                return;
+       case HID_DG_TWIST:
+               /*
+                * Userspace expects pen twist to have its zero point when
+                * the buttons/finger is on the tablet's left. HID values
+                * are zero when buttons are toward the top.
+                */
+               value = wacom_offset_rotation(input, usage, value, 1, 4);
+               break;
        case WACOM_HID_WD_SENSE:
                wacom_wac->hid_data.sense_state = value;
                return;
        case WACOM_HID_WD_SERIALHI:
-               wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF);
-               wacom_wac->serial[0] |= ((__u64)value) << 32;
-               /*
-                * Non-USI EMR devices may contain additional tool type
-                * information here. See WACOM_HID_WD_TOOLTYPE case for
-                * more details.
-                */
-               if (value >> 20 == 1) {
-                       wacom_wac->id[0] |= value & 0xFFFFF;
+               if (value) {
+                       wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF);
+                       wacom_wac->serial[0] |= ((__u64)value) << 32;
+                       /*
+                        * Non-USI EMR devices may contain additional tool type
+                        * information here. See WACOM_HID_WD_TOOLTYPE case for
+                        * more details.
+                        */
+                       if (value >> 20 == 1) {
+                               wacom_wac->id[0] |= value & 0xFFFFF;
+                       }
                }
                return;
        case WACOM_HID_WD_TOOLTYPE:
@@ -2205,7 +2272,7 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
                input_report_key(input, wacom_wac->tool[0], prox);
                if (wacom_wac->serial[0]) {
                        input_event(input, EV_MSC, MSC_SERIAL, wacom_wac->serial[0]);
-                       input_report_abs(input, ABS_MISC, id);
+                       input_report_abs(input, ABS_MISC, prox ? id : 0);
                }
 
                wacom_wac->hid_data.tipswitch = false;
@@ -2216,6 +2283,7 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
        if (!prox) {
                wacom_wac->tool[0] = 0;
                wacom_wac->id[0] = 0;
+               wacom_wac->serial[0] = 0;
        }
 }
 
index 96944783d584f9bb1c44dc55bf84a537388739f4..53c3bcdbf1b07068c7b5759ae78b4354d9fe9a20 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for HSI
 #
index 39c9b2c08d33743c340d7717cd5ecf3876a5f52f..e7b1d796ba2e81acbf11096f29359dc501e8324d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_HYPERV)           += hv_vmbus.o
 obj-$(CONFIG_HYPERV_UTILS)     += hv_utils.o
 obj-$(CONFIG_HYPERV_BALLOON)   += hv_balloon.o
index efd5db743319282922a3fa9994bcee6c618781bb..894b67ac2cae509296cc6c421565df9b7ec48f7f 100644 (file)
@@ -640,6 +640,7 @@ void vmbus_close(struct vmbus_channel *channel)
                 */
                return;
        }
+       mutex_lock(&vmbus_connection.channel_mutex);
        /*
         * Close all the sub-channels first and then close the
         * primary channel.
@@ -648,16 +649,15 @@ void vmbus_close(struct vmbus_channel *channel)
                cur_channel = list_entry(cur, struct vmbus_channel, sc_list);
                vmbus_close_internal(cur_channel);
                if (cur_channel->rescind) {
-                       mutex_lock(&vmbus_connection.channel_mutex);
-                       hv_process_channel_removal(cur_channel,
+                       hv_process_channel_removal(
                                           cur_channel->offermsg.child_relid);
-                       mutex_unlock(&vmbus_connection.channel_mutex);
                }
        }
        /*
         * Now close the primary.
         */
        vmbus_close_internal(channel);
+       mutex_unlock(&vmbus_connection.channel_mutex);
 }
 EXPORT_SYMBOL_GPL(vmbus_close);
 
index 060df71c2e8b72f42020168fb574ff42f6827729..379b0df123bee913a8151640e727c38cce11e9eb 100644 (file)
@@ -159,7 +159,7 @@ static void vmbus_rescind_cleanup(struct vmbus_channel *channel)
 
 
        spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
-
+       channel->rescind = true;
        list_for_each_entry(msginfo, &vmbus_connection.chn_msg_list,
                                msglistentry) {
 
@@ -381,14 +381,21 @@ static void vmbus_release_relid(u32 relid)
                       true);
 }
 
-void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
+void hv_process_channel_removal(u32 relid)
 {
        unsigned long flags;
-       struct vmbus_channel *primary_channel;
+       struct vmbus_channel *primary_channel, *channel;
 
-       BUG_ON(!channel->rescind);
        BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex));
 
+       /*
+        * Make sure channel is valid as we may have raced.
+        */
+       channel = relid2channel(relid);
+       if (!channel)
+               return;
+
+       BUG_ON(!channel->rescind);
        if (channel->target_cpu != get_cpu()) {
                put_cpu();
                smp_call_function_single(channel->target_cpu,
@@ -515,6 +522,7 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
        if (!fnew) {
                if (channel->sc_creation_callback != NULL)
                        channel->sc_creation_callback(newchannel);
+               newchannel->probe_done = true;
                return;
        }
 
@@ -834,7 +842,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
 {
        struct vmbus_channel_rescind_offer *rescind;
        struct vmbus_channel *channel;
-       unsigned long flags;
        struct device *dev;
 
        rescind = (struct vmbus_channel_rescind_offer *)hdr;
@@ -873,16 +880,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
                return;
        }
 
-       spin_lock_irqsave(&channel->lock, flags);
-       channel->rescind = true;
-       spin_unlock_irqrestore(&channel->lock, flags);
-
-       /*
-        * Now that we have posted the rescind state, perform
-        * rescind related cleanup.
-        */
-       vmbus_rescind_cleanup(channel);
-
        /*
         * Now wait for offer handling to complete.
         */
@@ -901,6 +898,7 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
        if (channel->device_obj) {
                if (channel->chn_rescind_callback) {
                        channel->chn_rescind_callback(channel);
+                       vmbus_rescind_cleanup(channel);
                        return;
                }
                /*
@@ -909,6 +907,7 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
                 */
                dev = get_device(&channel->device_obj->device);
                if (dev) {
+                       vmbus_rescind_cleanup(channel);
                        vmbus_device_unregister(channel->device_obj);
                        put_device(dev);
                }
@@ -921,29 +920,28 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
                 * 1. Close all sub-channels first
                 * 2. Then close the primary channel.
                 */
+               mutex_lock(&vmbus_connection.channel_mutex);
+               vmbus_rescind_cleanup(channel);
                if (channel->state == CHANNEL_OPEN_STATE) {
                        /*
                         * The channel is currently not open;
                         * it is safe for us to cleanup the channel.
                         */
-                       mutex_lock(&vmbus_connection.channel_mutex);
-                       hv_process_channel_removal(channel,
-                                               channel->offermsg.child_relid);
-                       mutex_unlock(&vmbus_connection.channel_mutex);
+                       hv_process_channel_removal(rescind->child_relid);
                }
+               mutex_unlock(&vmbus_connection.channel_mutex);
        }
 }
 
 void vmbus_hvsock_device_unregister(struct vmbus_channel *channel)
 {
-       mutex_lock(&vmbus_connection.channel_mutex);
-
        BUG_ON(!is_hvsock_channel(channel));
 
-       channel->rescind = true;
-       vmbus_device_unregister(channel->device_obj);
+       /* We always get a rescind msg when a connection is closed. */
+       while (!READ_ONCE(channel->probe_done) || !READ_ONCE(channel->rescind))
+               msleep(1);
 
-       mutex_unlock(&vmbus_connection.channel_mutex);
+       vmbus_device_unregister(channel->device_obj);
 }
 EXPORT_SYMBOL_GPL(vmbus_hvsock_device_unregister);
 
index daa75bd41f8672ad181a7f1ec2d7b9ccc3ab99b8..2364281d8593ece99ce983f86beff657461c2c72 100644 (file)
@@ -170,6 +170,10 @@ static void fcopy_send_data(struct work_struct *dummy)
                out_src = smsg_out;
                break;
 
+       case WRITE_TO_FILE:
+               out_src = fcopy_transaction.fcopy_msg;
+               out_len = sizeof(struct hv_do_fcopy);
+               break;
        default:
                out_src = fcopy_transaction.fcopy_msg;
                out_len = fcopy_transaction.recv_len;
index a9d49f6f6501ccb1965217abb429d13571f26f12..937801ac2fe0eafb3d148072a604c4e50a159572 100644 (file)
@@ -768,8 +768,7 @@ static void vmbus_device_release(struct device *device)
        struct vmbus_channel *channel = hv_dev->channel;
 
        mutex_lock(&vmbus_connection.channel_mutex);
-       hv_process_channel_removal(channel,
-                                  channel->offermsg.child_relid);
+       hv_process_channel_removal(channel->offermsg.child_relid);
        mutex_unlock(&vmbus_connection.channel_mutex);
        kfree(hv_dev);
 
index c84d9784be980f92f4f70ea4b3759401f89be4aa..23e195a5a2f330f9873d9a460d265e6e5169d818 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for sensor chip drivers.
 #
index d491c698529ebb0c1bca4d49db807ea81c682a47..21ad15ce316370e5fbb21f6b6154e73c602735f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HWMON_ADT7X10_H__
 #define __HWMON_ADT7X10_H__
 
index 97a62f5b9ea466cc4277a14b1a8bc59a6bd360b5..a973eb6a28908be2c17092ad4a1169e288a6f8e8 100644 (file)
@@ -477,6 +477,11 @@ static int da9052_hwmon_probe(struct platform_device *pdev)
                /* disable touchscreen features */
                da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00);
 
+               /* Sample every 1ms */
+               da9052_reg_update(hwmon->da9052, DA9052_ADC_CONT_REG,
+                                         DA9052_ADCCONT_ADCMODE,
+                                         DA9052_ADCCONT_ADCMODE);
+
                err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY,
                                         "tsiready-irq", da9052_tsi_datardy_irq,
                                         hwmon);
index 459a6be3390e842bc7018b20e261b9c45fd43816..e9364420a5123d9bfe4f0ae9b3b1fe8548acaa29 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for PMBus chip drivers.
 #
index 5eafbaada7958d81b530637b5ab5c2a3a29066b0..dfc40c740d07b7a2029777b5f01a8bbd145439b0 100644 (file)
@@ -268,14 +268,11 @@ static int tmp102_probe(struct i2c_client *client,
                return err;
        }
 
-       tmp102->ready_time = jiffies;
-       if (tmp102->config_orig & TMP102_CONF_SD) {
-               /*
-                * Mark that we are not ready with data until the first
-                * conversion is complete
-                */
-               tmp102->ready_time += msecs_to_jiffies(CONVERSION_TIME_MS);
-       }
+       /*
+        * Mark that we are not ready with data until the first
+        * conversion is complete
+        */
+       tmp102->ready_time = jiffies + msecs_to_jiffies(CONVERSION_TIME_MS);
 
        hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
                                                         tmp102,
index 9c0dbb8191ad4da9e1c5111da2ab88790ae30966..e1be61095532f03dda79effe36fbde2147a31d66 100644 (file)
@@ -630,7 +630,7 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                         sizeof(struct slimpro_resp_msg) * ASYNC_MSG_FIFO_SIZE,
                         GFP_KERNEL);
        if (rc)
-               goto out_mbox_free;
+               return -ENOMEM;
 
        INIT_WORK(&ctx->workq, xgene_hwmon_evt_work);
 
@@ -646,7 +646,8 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                if (IS_ERR(ctx->mbox_chan)) {
                        dev_err(&pdev->dev,
                                "SLIMpro mailbox channel request failed\n");
-                       return -ENODEV;
+                       rc = -ENODEV;
+                       goto out_mbox_free;
                }
        } else {
                struct acpi_pcct_hw_reduced *cppc_ss;
@@ -654,7 +655,8 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                if (device_property_read_u32(&pdev->dev, "pcc-channel",
                                             &ctx->mbox_idx)) {
                        dev_err(&pdev->dev, "no pcc-channel property\n");
-                       return -ENODEV;
+                       rc = -ENODEV;
+                       goto out_mbox_free;
                }
 
                cl->rx_callback = xgene_hwmon_pcc_rx_cb;
@@ -662,7 +664,8 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                if (IS_ERR(ctx->mbox_chan)) {
                        dev_err(&pdev->dev,
                                "PPC channel request failed\n");
-                       return -ENODEV;
+                       rc = -ENODEV;
+                       goto out_mbox_free;
                }
 
                /*
@@ -675,13 +678,13 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                if (!cppc_ss) {
                        dev_err(&pdev->dev, "PPC subspace not found\n");
                        rc = -ENODEV;
-                       goto out_mbox_free;
+                       goto out;
                }
 
                if (!ctx->mbox_chan->mbox->txdone_irq) {
                        dev_err(&pdev->dev, "PCC IRQ not supported\n");
                        rc = -ENODEV;
-                       goto out_mbox_free;
+                       goto out;
                }
 
                /*
@@ -696,14 +699,14 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
                } else {
                        dev_err(&pdev->dev, "Failed to get PCC comm region\n");
                        rc = -ENODEV;
-                       goto out_mbox_free;
+                       goto out;
                }
 
                if (!ctx->pcc_comm_addr) {
                        dev_err(&pdev->dev,
                                "Failed to ioremap PCC comm region\n");
                        rc = -ENOMEM;
-                       goto out_mbox_free;
+                       goto out;
                }
 
                /*
index 14928aa7cc5a190a6cd16eaec77ddfee8d34fb80..b87c01a506a494c81a627062dff25ed1eae4ae4e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Generic Hardware Spinlock framework
 #
index 5bae90ce794d56811366d49f640facd33f62f1af..61db9dd0d571f0e1f991673be3511605296bb15f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for CoreSight drivers.
 #
index 81d42fe918f77b4604ed607575147297a21bd8a4..880c9b5e8566b71958d138e8d14edca5abda9bfe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INTEL_TH)         += intel_th.o
 intel_th-y                     := core.o
 intel_th-$(CONFIG_INTEL_TH_DEBUG) += debug.o
index bc9cebc305261bbd937f499472a66e64fcc03c05..c2a2ce8ee5410743c750bdbcad8c0170992af1e0 100644 (file)
@@ -143,6 +143,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
                PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x19e1),
                .driver_data = (kernel_ulong_t)0,
        },
+       {
+               /* Lewisburg PCH */
+               PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa1a6),
+               .driver_data = (kernel_ulong_t)0,
+       },
        {
                /* Gemini Lake */
                PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x318e),
@@ -158,6 +163,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
                PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9da6),
                .driver_data = (kernel_ulong_t)&intel_th_2x,
        },
+       {
+               /* Cedar Fork PCH */
+               PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x18e1),
+               .driver_data = (kernel_ulong_t)&intel_th_2x,
+       },
        { 0 },
 };
 
index 3abd84ce13d43960c09dc5a0f0136ebf9794944b..effc19e5190f429530892f530cdf4fa5f3ae866a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_STM)      += stm_core.o
 
 stm_core-y             := core.o policy.o
index 9414900575d86b9956fd0ac4b4275b39d63ea867..f129869e05a9b0dc6430b63ce8ff1693c25c4726 100644 (file)
@@ -1119,7 +1119,7 @@ void stm_source_unregister_device(struct stm_source_data *data)
 
        stm_source_link_drop(src);
 
-       device_destroy(&stm_source_class, src->dev.devt);
+       device_unregister(&src->dev);
 }
 EXPORT_SYMBOL_GPL(stm_source_unregister_device);
 
index 7bb65a4369e1e19baa02faf3263042096706ad8e..72c94c60fdd18b3dc6eb6c30b26c2b692003fa29 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the i2c core.
 #
index c06dce2c1da745fab9727715f5ffaa01a40d4d04..45a3f3ca29b383ce7edfbb34e6d3fd506c5173b6 100644 (file)
@@ -131,6 +131,7 @@ config I2C_I801
            Gemini Lake (SOC)
            Cannon Lake-H (PCH)
            Cannon Lake-LP (PCH)
+           Cedar Fork (PCH)
 
          This driver can also be built as a module.  If so, the module
          will be called i2c-i801.
index 47f3ac9a695ad21066fc5ab47df40a564913e024..2ce8576540a29a4abf80f4ca2767d9ca6448939d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the i2c bus drivers.
 #
index e114e4e00d2972e2bb55765bfbf7c431d38ccb44..9e12a53ef7b8cf2cdccf9de473af8e2cec9c5f36 100644 (file)
@@ -68,6 +68,7 @@
  * Gemini Lake (SOC)           0x31d4  32      hard    yes     yes     yes
  * Cannon Lake-H (PCH)         0xa323  32      hard    yes     yes     yes
  * Cannon Lake-LP (PCH)                0x9da3  32      hard    yes     yes     yes
+ * Cedar Fork (PCH)            0x18df  32      hard    yes     yes     yes
  *
  * Features supported by this driver:
  * Software PEC                                no
 
 /* Older devices have their ID defined in <linux/pci_ids.h> */
 #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS             0x0f12
+#define PCI_DEVICE_ID_INTEL_CDF_SMBUS                  0x18df
 #define PCI_DEVICE_ID_INTEL_DNV_SMBUS                  0x19df
 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS          0x1c22
 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS             0x1d22
@@ -1025,6 +1027,7 @@ static const struct pci_device_id i801_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS) },
+       { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CDF_SMBUS) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) },
@@ -1513,6 +1516,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
        case PCI_DEVICE_ID_INTEL_CANNONLAKE_LP_SMBUS:
        case PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS:
        case PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS:
+       case PCI_DEVICE_ID_INTEL_CDF_SMBUS:
        case PCI_DEVICE_ID_INTEL_DNV_SMBUS:
        case PCI_DEVICE_ID_INTEL_KABYLAKE_PCH_H_SMBUS:
                priv->features |= FEATURE_I2C_BLOCK_READ;
index 84fb35f6837f0861e628ecab0527dbc6561db008..eb1d91b986fdeaba683a19104465b947b894f10f 100644 (file)
@@ -1459,6 +1459,6 @@ static struct platform_driver img_scb_i2c_driver = {
 };
 module_platform_driver(img_scb_i2c_driver);
 
-MODULE_AUTHOR("James Hogan <james.hogan@imgtec.com>");
+MODULE_AUTHOR("James Hogan <jhogan@kernel.org>");
 MODULE_DESCRIPTION("IMG host I2C driver");
 MODULE_LICENSE("GPL v2");
index 54a47b40546f69c7ea0d3dbf033c22c95f106516..f96830ffd9f1c1456965810fad723ab365a7f263 100644 (file)
@@ -1021,7 +1021,7 @@ static int i2c_imx_init_recovery_info(struct imx_i2c_struct *i2c_imx,
        }
 
        dev_dbg(&pdev->dev, "using scl-gpio %d and sda-gpio %d for recovery\n",
-                       rinfo->sda_gpio, rinfo->scl_gpio);
+                       rinfo->scl_gpio, rinfo->sda_gpio);
 
        rinfo->prepare_recovery = i2c_imx_prepare_recovery;
        rinfo->unprepare_recovery = i2c_imx_unprepare_recovery;
@@ -1100,7 +1100,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
        }
 
        /* Request IRQ */
-       ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, 0,
+       ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, IRQF_SHARED,
                                pdev->name, i2c_imx);
        if (ret) {
                dev_err(&pdev->dev, "can't claim irq %d\n", irq);
index 22ffcb73c185f592d8b4e6bdbb1ede45cbeb4951..b51adffa484109efb842bbe75afec593ac8a1731 100644 (file)
@@ -340,12 +340,15 @@ static int ismt_process_desc(const struct ismt_desc *desc,
                        data->word = dma_buffer[0] | (dma_buffer[1] << 8);
                        break;
                case I2C_SMBUS_BLOCK_DATA:
-               case I2C_SMBUS_I2C_BLOCK_DATA:
                        if (desc->rxbytes != dma_buffer[0] + 1)
                                return -EMSGSIZE;
 
                        memcpy(data->block, dma_buffer, desc->rxbytes);
                        break;
+               case I2C_SMBUS_I2C_BLOCK_DATA:
+                       memcpy(&data->block[1], dma_buffer, desc->rxbytes);
+                       data->block[0] = desc->rxbytes;
+                       break;
                }
                return 0;
        }
index aa3c8f4771c1b60538f046526be52a27ce1baca2..a7ef19855bb8fa9b0670d7406652e1aa214e76c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/atomic.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
index 1ebb5e947e0b6625fcf0cda7a71f51e79ac29178..23c2ea2baedc07ee15dfab3e9ea0ce0629587374 100644 (file)
@@ -360,6 +360,7 @@ static int omap_i2c_init(struct omap_i2c_dev *omap)
        unsigned long fclk_rate = 12000000;
        unsigned long internal_clk = 0;
        struct clk *fclk;
+       int error;
 
        if (omap->rev >= OMAP_I2C_REV_ON_3430_3530) {
                /*
@@ -378,6 +379,13 @@ static int omap_i2c_init(struct omap_i2c_dev *omap)
                 * do this bit unconditionally.
                 */
                fclk = clk_get(omap->dev, "fck");
+               if (IS_ERR(fclk)) {
+                       error = PTR_ERR(fclk);
+                       dev_err(omap->dev, "could not get fck: %i\n", error);
+
+                       return error;
+               }
+
                fclk_rate = clk_get_rate(fclk);
                clk_put(fclk);
 
@@ -410,6 +418,12 @@ static int omap_i2c_init(struct omap_i2c_dev *omap)
                else
                        internal_clk = 4000;
                fclk = clk_get(omap->dev, "fck");
+               if (IS_ERR(fclk)) {
+                       error = PTR_ERR(fclk);
+                       dev_err(omap->dev, "could not get fck: %i\n", error);
+
+                       return error;
+               }
                fclk_rate = clk_get_rate(fclk) / 1000;
                clk_put(fclk);
 
index 0ecdb47a23abcbf9691bf809b126d72d6c3a46f8..174579d32e5f39ecdc44d2c230b55fbfb5d073e2 100644 (file)
@@ -85,6 +85,9 @@
 /* SB800 constants */
 #define SB800_PIIX4_SMB_IDX            0xcd6
 
+#define KERNCZ_IMC_IDX                 0x3e
+#define KERNCZ_IMC_DATA                        0x3f
+
 /*
  * SB800 port is selected by bits 2:1 of the smb_en register (0x2c)
  * or the smb_sel register (0x2e), depending on bit 0 of register 0x2f.
 #define SB800_PIIX4_PORT_IDX_ALT       0x2e
 #define SB800_PIIX4_PORT_IDX_SEL       0x2f
 #define SB800_PIIX4_PORT_IDX_MASK      0x06
+#define SB800_PIIX4_PORT_IDX_SHIFT     1
+
+/* On kerncz, SmBus0Sel is at bit 20:19 of PMx00 DecodeEn */
+#define SB800_PIIX4_PORT_IDX_KERNCZ            0x02
+#define SB800_PIIX4_PORT_IDX_MASK_KERNCZ       0x18
+#define SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ      3
 
 /* insmod parameters */
 
@@ -149,6 +158,8 @@ static const struct dmi_system_id piix4_dmi_ibm[] = {
  */
 static DEFINE_MUTEX(piix4_mutex_sb800);
 static u8 piix4_port_sel_sb800;
+static u8 piix4_port_mask_sb800;
+static u8 piix4_port_shift_sb800;
 static const char *piix4_main_port_names_sb800[PIIX4_MAX_ADAPTERS] = {
        " port 0", " port 2", " port 3", " port 4"
 };
@@ -159,6 +170,7 @@ struct i2c_piix4_adapdata {
 
        /* SB800 */
        bool sb800_main;
+       bool notify_imc;
        u8 port;                /* Port number, shifted */
 };
 
@@ -347,7 +359,19 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
 
        /* Find which register is used for port selection */
        if (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD) {
-               piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_ALT;
+               switch (PIIX4_dev->device) {
+               case PCI_DEVICE_ID_AMD_KERNCZ_SMBUS:
+                       piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_KERNCZ;
+                       piix4_port_mask_sb800 = SB800_PIIX4_PORT_IDX_MASK_KERNCZ;
+                       piix4_port_shift_sb800 = SB800_PIIX4_PORT_IDX_SHIFT_KERNCZ;
+                       break;
+               case PCI_DEVICE_ID_AMD_HUDSON2_SMBUS:
+               default:
+                       piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_ALT;
+                       piix4_port_mask_sb800 = SB800_PIIX4_PORT_IDX_MASK;
+                       piix4_port_shift_sb800 = SB800_PIIX4_PORT_IDX_SHIFT;
+                       break;
+               }
        } else {
                mutex_lock(&piix4_mutex_sb800);
                outb_p(SB800_PIIX4_PORT_IDX_SEL, SB800_PIIX4_SMB_IDX);
@@ -355,6 +379,8 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
                piix4_port_sel_sb800 = (port_sel & 0x01) ?
                                       SB800_PIIX4_PORT_IDX_ALT :
                                       SB800_PIIX4_PORT_IDX;
+               piix4_port_mask_sb800 = SB800_PIIX4_PORT_IDX_MASK;
+               piix4_port_shift_sb800 = SB800_PIIX4_PORT_IDX_SHIFT;
                mutex_unlock(&piix4_mutex_sb800);
        }
 
@@ -572,6 +598,67 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
        return 0;
 }
 
+static uint8_t piix4_imc_read(uint8_t idx)
+{
+       outb_p(idx, KERNCZ_IMC_IDX);
+       return inb_p(KERNCZ_IMC_DATA);
+}
+
+static void piix4_imc_write(uint8_t idx, uint8_t value)
+{
+       outb_p(idx, KERNCZ_IMC_IDX);
+       outb_p(value, KERNCZ_IMC_DATA);
+}
+
+static int piix4_imc_sleep(void)
+{
+       int timeout = MAX_TIMEOUT;
+
+       if (!request_muxed_region(KERNCZ_IMC_IDX, 2, "smbus_kerncz_imc"))
+               return -EBUSY;
+
+       /* clear response register */
+       piix4_imc_write(0x82, 0x00);
+       /* request ownership flag */
+       piix4_imc_write(0x83, 0xB4);
+       /* kick off IMC Mailbox command 96 */
+       piix4_imc_write(0x80, 0x96);
+
+       while (timeout--) {
+               if (piix4_imc_read(0x82) == 0xfa) {
+                       release_region(KERNCZ_IMC_IDX, 2);
+                       return 0;
+               }
+               usleep_range(1000, 2000);
+       }
+
+       release_region(KERNCZ_IMC_IDX, 2);
+       return -ETIMEDOUT;
+}
+
+static void piix4_imc_wakeup(void)
+{
+       int timeout = MAX_TIMEOUT;
+
+       if (!request_muxed_region(KERNCZ_IMC_IDX, 2, "smbus_kerncz_imc"))
+               return;
+
+       /* clear response register */
+       piix4_imc_write(0x82, 0x00);
+       /* release ownership flag */
+       piix4_imc_write(0x83, 0xB5);
+       /* kick off IMC Mailbox command 96 */
+       piix4_imc_write(0x80, 0x96);
+
+       while (timeout--) {
+               if (piix4_imc_read(0x82) == 0xfa)
+                       break;
+               usleep_range(1000, 2000);
+       }
+
+       release_region(KERNCZ_IMC_IDX, 2);
+}
+
 /*
  * Handles access to multiple SMBus ports on the SB800.
  * The port is selected by bits 2:1 of the smb_en register (0x2c).
@@ -612,12 +699,47 @@ static s32 piix4_access_sb800(struct i2c_adapter *adap, u16 addr,
                return -EBUSY;
        }
 
+       /*
+        * Notify the IMC (Integrated Micro Controller) if required.
+        * Among other responsibilities, the IMC is in charge of monitoring
+        * the System fans and temperature sensors, and act accordingly.
+        * All this is done through SMBus and can/will collide
+        * with our transactions if they are long (BLOCK_DATA).
+        * Therefore we need to request the ownership flag during those
+        * transactions.
+        */
+       if ((size == I2C_SMBUS_BLOCK_DATA) && adapdata->notify_imc) {
+               int ret;
+
+               ret = piix4_imc_sleep();
+               switch (ret) {
+               case -EBUSY:
+                       dev_warn(&adap->dev,
+                                "IMC base address index region 0x%x already in use.\n",
+                                KERNCZ_IMC_IDX);
+                       break;
+               case -ETIMEDOUT:
+                       dev_warn(&adap->dev,
+                                "Failed to communicate with the IMC.\n");
+                       break;
+               default:
+                       break;
+               }
+
+               /* If IMC communication fails do not retry */
+               if (ret) {
+                       dev_warn(&adap->dev,
+                                "Continuing without IMC notification.\n");
+                       adapdata->notify_imc = false;
+               }
+       }
+
        outb_p(piix4_port_sel_sb800, SB800_PIIX4_SMB_IDX);
        smba_en_lo = inb_p(SB800_PIIX4_SMB_IDX + 1);
 
        port = adapdata->port;
-       if ((smba_en_lo & SB800_PIIX4_PORT_IDX_MASK) != port)
-               outb_p((smba_en_lo & ~SB800_PIIX4_PORT_IDX_MASK) | port,
+       if ((smba_en_lo & piix4_port_mask_sb800) != port)
+               outb_p((smba_en_lo & ~piix4_port_mask_sb800) | port,
                       SB800_PIIX4_SMB_IDX + 1);
 
        retval = piix4_access(adap, addr, flags, read_write,
@@ -628,6 +750,9 @@ static s32 piix4_access_sb800(struct i2c_adapter *adap, u16 addr,
        /* Release the semaphore */
        outb_p(smbslvcnt | 0x20, SMBSLVCNT);
 
+       if ((size == I2C_SMBUS_BLOCK_DATA) && adapdata->notify_imc)
+               piix4_imc_wakeup();
+
        mutex_unlock(&piix4_mutex_sb800);
 
        return retval;
@@ -679,7 +804,7 @@ static struct i2c_adapter *piix4_main_adapters[PIIX4_MAX_ADAPTERS];
 static struct i2c_adapter *piix4_aux_adapter;
 
 static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
-                            bool sb800_main, u8 port,
+                            bool sb800_main, u8 port, bool notify_imc,
                             const char *name, struct i2c_adapter **padap)
 {
        struct i2c_adapter *adap;
@@ -706,7 +831,8 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
 
        adapdata->smba = smba;
        adapdata->sb800_main = sb800_main;
-       adapdata->port = port << 1;
+       adapdata->port = port << piix4_port_shift_sb800;
+       adapdata->notify_imc = notify_imc;
 
        /* set up the sysfs linkage to our parent device */
        adap->dev.parent = &dev->dev;
@@ -728,14 +854,15 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
        return 0;
 }
 
-static int piix4_add_adapters_sb800(struct pci_dev *dev, unsigned short smba)
+static int piix4_add_adapters_sb800(struct pci_dev *dev, unsigned short smba,
+                                   bool notify_imc)
 {
        struct i2c_piix4_adapdata *adapdata;
        int port;
        int retval;
 
        for (port = 0; port < PIIX4_MAX_ADAPTERS; port++) {
-               retval = piix4_add_adapter(dev, smba, true, port,
+               retval = piix4_add_adapter(dev, smba, true, port, notify_imc,
                                           piix4_main_port_names_sb800[port],
                                           &piix4_main_adapters[port]);
                if (retval < 0)
@@ -769,6 +896,7 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
             dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
             dev->revision >= 0x40) ||
            dev->vendor == PCI_VENDOR_ID_AMD) {
+               bool notify_imc = false;
                is_sb800 = true;
 
                if (!request_region(SB800_PIIX4_SMB_IDX, 2, "smba_idx")) {
@@ -778,6 +906,20 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
                        return -EBUSY;
                }
 
+               if (dev->vendor == PCI_VENDOR_ID_AMD &&
+                   dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) {
+                       u8 imc;
+
+                       /*
+                        * Detect if IMC is active or not, this method is
+                        * described on coreboot's AMD IMC notes
+                        */
+                       pci_bus_read_config_byte(dev->bus, PCI_DEVFN(0x14, 3),
+                                                0x40, &imc);
+                       if (imc & 0x80)
+                               notify_imc = true;
+               }
+
                /* base address location etc changed in SB800 */
                retval = piix4_setup_sb800(dev, id, 0);
                if (retval < 0) {
@@ -789,7 +931,7 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
                 * Try to register multiplexed main SMBus adapter,
                 * give up if we can't
                 */
-               retval = piix4_add_adapters_sb800(dev, retval);
+               retval = piix4_add_adapters_sb800(dev, retval, notify_imc);
                if (retval < 0) {
                        release_region(SB800_PIIX4_SMB_IDX, 2);
                        return retval;
@@ -800,7 +942,7 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
                        return retval;
 
                /* Try to register main SMBus adapter, give up if we can't */
-               retval = piix4_add_adapter(dev, retval, false, 0, "",
+               retval = piix4_add_adapter(dev, retval, false, 0, false, "",
                                           &piix4_main_adapters[0]);
                if (retval < 0)
                        return retval;
@@ -827,7 +969,7 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id)
        if (retval > 0) {
                /* Try to add the aux adapter if it exists,
                 * piix4_add_adapter will clean up if this fails */
-               piix4_add_adapter(dev, retval, false, 0,
+               piix4_add_adapter(dev, retval, false, 0, false,
                                  is_sb800 ? piix4_aux_port_name_sb800 : "",
                                  &piix4_aux_adapter);
        }
index 22e08ae1704f4a6730928ee1e1392f9e08a08778..25fcc3c1e32bf3d9a41fa345982039fb234dbcbd 100644 (file)
@@ -627,6 +627,7 @@ static const struct dev_pm_ops sprd_i2c_pm_ops = {
 
 static const struct of_device_id sprd_i2c_of_match[] = {
        { .compatible = "sprd,sc9860-i2c", },
+       {},
 };
 
 static struct platform_driver sprd_i2c_driver = {
index 47c67b0ca8960a2436ef899f9e1cecd5d35ab19c..d4a6e9c2e9aaeaa679bb159ade420bcdb37e6988 100644 (file)
@@ -215,7 +215,7 @@ struct stm32f7_i2c_dev {
        unsigned int msg_num;
        unsigned int msg_id;
        struct stm32f7_i2c_msg f7_msg;
-       struct stm32f7_i2c_setup *setup;
+       struct stm32f7_i2c_setup setup;
        struct stm32f7_i2c_timings timing;
 };
 
@@ -265,7 +265,7 @@ static struct stm32f7_i2c_spec i2c_specs[] = {
        },
 };
 
-struct stm32f7_i2c_setup stm32f7_setup = {
+static const struct stm32f7_i2c_setup stm32f7_setup = {
        .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT,
        .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT,
        .dnf = STM32F7_I2C_DNF_DEFAULT,
@@ -537,7 +537,7 @@ static void stm32f7_i2c_hw_config(struct stm32f7_i2c_dev *i2c_dev)
        writel_relaxed(timing, i2c_dev->base + STM32F7_I2C_TIMINGR);
 
        /* Enable I2C */
-       if (i2c_dev->setup->analog_filter)
+       if (i2c_dev->setup.analog_filter)
                stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1,
                                     STM32F7_I2C_CR1_ANFOFF);
        else
@@ -887,22 +887,19 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
        }
 
        setup = of_device_get_match_data(&pdev->dev);
-       i2c_dev->setup->rise_time = setup->rise_time;
-       i2c_dev->setup->fall_time = setup->fall_time;
-       i2c_dev->setup->dnf = setup->dnf;
-       i2c_dev->setup->analog_filter = setup->analog_filter;
+       i2c_dev->setup = *setup;
 
        ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns",
                                       &rise_time);
        if (!ret)
-               i2c_dev->setup->rise_time = rise_time;
+               i2c_dev->setup.rise_time = rise_time;
 
        ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-falling-time-ns",
                                       &fall_time);
        if (!ret)
-               i2c_dev->setup->fall_time = fall_time;
+               i2c_dev->setup.fall_time = fall_time;
 
-       ret = stm32f7_i2c_setup_timing(i2c_dev, i2c_dev->setup);
+       ret = stm32f7_i2c_setup_timing(i2c_dev, &i2c_dev->setup);
        if (ret)
                goto clk_free;
 
index 4a67d319987742e05d6ee1387059d3c972b35874..6d9d865e8518a27ab76ce96c44d7932e2e2ceee8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for multiplexer I2C chip drivers.
 
index 2a8c417d4081087daa50d154844bcb65f6cb55c0..9f617a77970f4e3bb853aeff2968cc6871291aa5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # link order is important here
 #
index 968038482d2f1ab502252118a2ff61d780d1a0a0..7d4e5c08f133ef74b101b86184a22deb6340ebe5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Provides ACPI support for IDE drives.
  *
index 81e18f9628d068e54cd5fca5f80b06594ee5d29f..a7355ab3bb221a0a6438d336719f1f3a30e4e00a 100644 (file)
@@ -1328,6 +1328,7 @@ static int ide_cdrom_prep_fs(struct request_queue *q, struct request *rq)
        unsigned long blocks = blk_rq_sectors(rq) / (hard_sect >> 9);
        struct scsi_request *req = scsi_req(rq);
 
+       scsi_req_init(req);
        memset(req->cmd, 0, BLK_MAX_CDB);
 
        if (rq_data_dir(rq) == READ)
index eea60c986c4fad5585d36c4212cb537aaca4913b..264e822eba58a1a9b8f7852448688d685e20411c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1996-98  Erik Andersen
  *  Copyright (C) 1998-2000 Jens Axboe
index 9d26c9737e2127066e80af152f61584a59b98b41..2acca12b9c946219b2e9e5e6e5cc5179baa4e545 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cdrom.c IOCTLs handling for ide-cd driver.
  *
index 58a6feb74c02f150388adfb67f64914c23273ed2..5ecd5b2f03a3379925f1f7b5cede7f210c4a6f26 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Verbose error logging for ATAPI CD/DVD devices.
  *
index ef7c8c43a380956ecfd00f066d1d504d0ffbb9ee..4e20747af32e298a01b950cbda03db4050dcc802 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/kernel.h>
 #include <linux/gfp.h>
index 241983da5fc400e68cc045e9696f2370c22f8271..188d1b03715d3f95e2ef1ca9e2ebd68c317f3926 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1994-1998       Linus Torvalds & authors (see below)
  *  Copyright (C) 1998-2002       Linux ATA Development
index d511dab7c4aacfafce1da38a1409b9d9dcfa54a1..0e8cc18bfda62bcc871f8901368e1377dbe6b114 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IDE_DISK_H
 #define __IDE_DISK_H
 
index da36f729ff3273b99e8700670047299ad3cfeab3..2c45616cff4f1d2ea09ed7289dd6b17ff40b2486 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/ide.h>
 #include <linux/hdreg.h>
index 0d1fae6cba6d571f3754bdffe6d209b57b150c73..82a36ced4e968c4fe4e554128320853f15e83628 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/ide.h>
 #include <linux/slab.h>
index 3ddd88219906bf17307aa48e57715ca23ca9a5bf..5bd2aafc375346fdae583545b7779d6a8bbe5923 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IDE ATAPI floppy driver.
  *
index 6dd2beb4843492586c78d9e117d82f5676e3cc5e..13c9b4b6d75ec78af99a5a99315a150f2f137282 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IDE_FLOPPY_H
 #define __IDE_FLOPPY_H
 
index a22ca846701080d3721ef32fc72dc9b3038b02fd..40a2ebe34e1d4f9ed9bed0eacde1d478399eeedd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ide-floppy IOCTLs handling.
  */
index e7a25ea757dfe76e827cdff00c64b60ab63eec4d..471457ebea671b1a870885c63a3fecced66fdb31 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/export.h>
 #include <linux/ide.h>
index 55970772bd04cc3e9f83681740ba5de2b2ee0635..af3fe1880e9e247515d4ea457e10b6b8e8bee491 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IDE_GD_H
 #define __IDE_GD_H
 
index 1f264d5d3f3fa5c3f4eb71cc2838b60b6fd5d2ee..6465bcc7cea6ae95dfffb3474e951bf41dcfe422 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/gfp.h>
 #include <linux/ide.h>
index 40e683a84ff91b61ebd7487cd6e074528c7d3c67..1fd24798e5c9095d19152f0f517a0f0fd718ff8f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PIO blacklist.  Some drives incorrectly report their maximal PIO mode,
  * at least in respect to CMD640.  Here we keep info on some known drives.
index 544f02d673ca2717224f643742d00dc00a7e828e..dccdca9eda38692fcbd0764908d9e532a26a7ff0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/gfp.h>
 #include <linux/ide.h>
index 01b2adfd8226bf1bcd048100f4e4bcb0f6afb180..eaf39e5db08ba98ad2bfcc32e9892e2f2c8be972 100644 (file)
@@ -1451,6 +1451,7 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
                if (hwif_init(hwif) == 0) {
                        printk(KERN_INFO "%s: failed to initialize IDE "
                                         "interface\n", hwif->name);
+                       device_unregister(hwif->portdev);
                        device_unregister(&hwif->gendev);
                        ide_disable_port(hwif);
                        continue;
index 86aa88aeb3a6b529315277f636fc07b196030d0a..acf874800ca4086803d6740d3df32ca38b732017 100644 (file)
@@ -56,6 +56,7 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
 {
        struct list_head *l;
        struct pci_driver *d;
+       int ret;
 
        list_for_each(l, &ide_pci_drivers) {
                d = list_entry(l, struct pci_driver, node);
@@ -63,10 +64,14 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
                        const struct pci_device_id *id =
                                pci_match_id(d->id_table, dev);
 
-                       if (id != NULL && d->probe(dev, id) >= 0) {
-                               dev->driver = d;
-                               pci_dev_get(dev);
-                               return 1;
+                       if (id != NULL) {
+                               pci_assign_irq(dev);
+                               ret = d->probe(dev, id);
+                               if (ret >= 0) {
+                                       dev->driver = d;
+                                       pci_dev_get(dev);
+                                       return 1;
+                               }
                        }
                }
        }
index 84a6a9e08d64d450ef2828e72d75da8949cf5052..b9dfeb2e8bd6603c20dc9e02554adc0eff6ed72c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/ide.h>
 
index 1fba2a5f281cddd06178bf701f3c0a351a714431..01a43ab45e0ec29ce4b3a647ab082b8edc14ae2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2000  Linus Torvalds & authors
  */
index 112d2fe1bcdbc8b3acb45d613901afa06798d556..fdc8e813170c32b4df99417c37d4940e0abbbc78 100644 (file)
@@ -179,6 +179,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
 /**
  *     ide_pci_enable  -       do PCI enables
  *     @dev: PCI device
+ *     @bars: PCI BARs mask
  *     @d: IDE port info
  *
  *     Enable the IDE PCI device. We attempt to enable the device in full
@@ -189,9 +190,10 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
  *     Returns zero on success or an error code
  */
 
-static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
+static int ide_pci_enable(struct pci_dev *dev, int bars,
+                         const struct ide_port_info *d)
 {
-       int ret, bars;
+       int ret;
 
        if (pci_enable_device(dev)) {
                ret = pci_enable_device_io(dev);
@@ -216,18 +218,6 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
                goto out;
        }
 
-       if (d->host_flags & IDE_HFLAG_SINGLE)
-               bars = (1 << 2) - 1;
-       else
-               bars = (1 << 4) - 1;
-
-       if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) {
-               if (d->host_flags & IDE_HFLAG_CS5520)
-                       bars |= (1 << 2);
-               else
-                       bars |= (1 << 4);
-       }
-
        ret = pci_request_selected_regions(dev, bars, d->name);
        if (ret < 0)
                printk(KERN_ERR "%s %s: can't reserve resources\n",
@@ -403,6 +393,7 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
 /**
  *     ide_setup_pci_controller        -       set up IDE PCI
  *     @dev: PCI device
+ *     @bars: PCI BARs mask
  *     @d: IDE port info
  *     @noisy: verbose flag
  *
@@ -411,7 +402,7 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
  *     and enables it if need be
  */
 
-static int ide_setup_pci_controller(struct pci_dev *dev,
+static int ide_setup_pci_controller(struct pci_dev *dev, int bars,
                                    const struct ide_port_info *d, int noisy)
 {
        int ret;
@@ -420,7 +411,7 @@ static int ide_setup_pci_controller(struct pci_dev *dev,
        if (noisy)
                ide_setup_pci_noise(dev, d);
 
-       ret = ide_pci_enable(dev, d);
+       ret = ide_pci_enable(dev, bars, d);
        if (ret < 0)
                goto out;
 
@@ -428,16 +419,20 @@ static int ide_setup_pci_controller(struct pci_dev *dev,
        if (ret < 0) {
                printk(KERN_ERR "%s %s: error accessing PCI regs\n",
                        d->name, pci_name(dev));
-               goto out;
+               goto out_free_bars;
        }
        if (!(pcicmd & PCI_COMMAND_IO)) {       /* is device disabled? */
                ret = ide_pci_configure(dev, d);
                if (ret < 0)
-                       goto out;
+                       goto out_free_bars;
                printk(KERN_INFO "%s %s: device enabled (Linux)\n",
                        d->name, pci_name(dev));
        }
 
+       goto out;
+
+out_free_bars:
+       pci_release_selected_regions(dev, bars);
 out:
        return ret;
 }
@@ -540,13 +535,28 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
 {
        struct pci_dev *pdev[] = { dev1, dev2 };
        struct ide_host *host;
-       int ret, i, n_ports = dev2 ? 4 : 2;
+       int ret, i, n_ports = dev2 ? 4 : 2, bars;
        struct ide_hw hw[4], *hws[] = { NULL, NULL, NULL, NULL };
 
+       if (d->host_flags & IDE_HFLAG_SINGLE)
+               bars = (1 << 2) - 1;
+       else
+               bars = (1 << 4) - 1;
+
+       if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) {
+               if (d->host_flags & IDE_HFLAG_CS5520)
+                       bars |= (1 << 2);
+               else
+                       bars |= (1 << 4);
+       }
+
        for (i = 0; i < n_ports / 2; i++) {
-               ret = ide_setup_pci_controller(pdev[i], d, !i);
-               if (ret < 0)
+               ret = ide_setup_pci_controller(pdev[i], bars, d, !i);
+               if (ret < 0) {
+                       if (i == 1)
+                               pci_release_selected_regions(pdev[0], bars);
                        goto out;
+               }
 
                ide_pci_setup_ports(pdev[i], d, &hw[i*2], &hws[i*2]);
        }
@@ -554,7 +564,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
        host = ide_host_alloc(d, hws, n_ports);
        if (host == NULL) {
                ret = -ENOMEM;
-               goto out;
+               goto out_free_bars;
        }
 
        host->dev[0] = &dev1->dev;
@@ -576,7 +586,7 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
                 * do_ide_setup_pci_device() on the first device!
                 */
                if (ret < 0)
-                       goto out;
+                       goto out_free_bars;
 
                /* fixup IRQ */
                if (ide_pci_is_in_compatibility_mode(pdev[i])) {
@@ -589,6 +599,13 @@ int ide_pci_init_two(struct pci_dev *dev1, struct pci_dev *dev2,
        ret = ide_host_register(host, d, hws);
        if (ret)
                ide_host_free(host);
+       else
+               goto out;
+
+out_free_bars:
+       i = n_ports / 2;
+       while (i--)
+               pci_release_selected_regions(pdev[i], bars);
 out:
        return ret;
 }
index 5dc7ea4b6bc4cc207cffd8d8efbaed776179c9d9..f0b06b14e782b5b926b5ba7876d827551ce4cfa9 100644 (file)
@@ -913,15 +913,16 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
        struct cpuidle_state *state = &drv->states[index];
        unsigned long eax = flg2MWAIT(state->flags);
        unsigned int cstate;
+       int cpu = smp_processor_id();
 
        cstate = (((eax) >> MWAIT_SUBSTATE_SIZE) & MWAIT_CSTATE_MASK) + 1;
 
        /*
-        * NB: if CPUIDLE_FLAG_TLB_FLUSHED is set, this idle transition
-        * will probably flush the TLB.  It's not guaranteed to flush
-        * the TLB, though, so it's not clear that we can do anything
-        * useful with this knowledge.
+        * leave_mm() to avoid costly and often unnecessary wakeups
+        * for flushing the user TLB's associated with the active mm.
         */
+       if (state->flags & CPUIDLE_FLAG_TLB_FLUSHED)
+               leave_mm(cpu);
 
        if (!(lapic_timer_reliable_states & (1 << (cstate))))
                tick_broadcast_enter();
index 93c769cd99bf8ec6f5d4c98fb65ca1e0b84a18d8..b16b2e9ddc401cbacad15a5b1030e3878f7a2443 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the industrial I/O core.
 #
index 31fba1974e9539b22d5143fe128c1369160df74b..703e7c21f547012b9e6c42861c26f194703d6ed4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O accelerometer drivers
 #
index 38a8b11f8c1941f489368cc729528cb39a04998f..ae6118ae11b1d6dbc6381a6c50cc07f4e1af9005 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BMC150_ACCEL_H_
 #define _BMC150_ACCEL_H_
 
index 95e20855d2ef1ebffa6da64d8c6862a73f69394c..98fbb628d5bdd13a5f0fb85ff37d1dd776db5a0f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/device.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 7e8a281683107ff8f06eb5c3220b9930e8ba4abf..5e3ca212f5be36edc880fb354bcfb385d47f8151 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/device.h>
 #include <linux/kernel.h>
 
index 57625653fcb6da69c67fbe381f7ac3e805adcf4f..1d13bf03c75863e745623260cae2cef71f012130 100644 (file)
@@ -243,6 +243,8 @@ config DA9150_GPADC
 config DLN2_ADC
        tristate "Diolan DLN-2 ADC driver support"
        depends on MFD_DLN2
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
        help
          Say yes here to build support for Diolan DLN-2 ADC.
 
index 9874e05f52d74f77267c15e9f8ea4b32d59f252c..9572c1090f35662d19e6ce1799d13c925bd75dfb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for IIO ADC drivers
 #
index e6706a09e100d271ea5528e3c8b8c289d6fca9a3..47c3d7f329004d577f865d261702622149d2cc46 100644 (file)
@@ -257,7 +257,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
        unsigned int vref_mv)
 {
        struct ad7793_state *st = iio_priv(indio_dev);
-       int i, ret = -1;
+       int i, ret;
        unsigned long long scale_uv;
        u32 id;
 
@@ -266,7 +266,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
                return ret;
 
        /* reset the serial interface */
-       ret = spi_write(st->sd.spi, (u8 *)&ret, sizeof(ret));
+       ret = ad_sd_reset(&st->sd, 32);
        if (ret < 0)
                goto out;
        usleep_range(500, 2000); /* Wait for at least 500us */
index d10bd0c97233fa2351954e8bc6fdcd0b299e61dd..22c4c17cd9969486fe1ef80b68eaa99e51c43032 100644 (file)
@@ -177,6 +177,34 @@ out:
 }
 EXPORT_SYMBOL_GPL(ad_sd_read_reg);
 
+/**
+ * ad_sd_reset() - Reset the serial interface
+ *
+ * @sigma_delta: The sigma delta device
+ * @reset_length: Number of SCLKs with DIN = 1
+ *
+ * Returns 0 on success, an error code otherwise.
+ **/
+int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
+       unsigned int reset_length)
+{
+       uint8_t *buf;
+       unsigned int size;
+       int ret;
+
+       size = DIV_ROUND_UP(reset_length, 8);
+       buf = kcalloc(size, sizeof(*buf), GFP_KERNEL);
+       if (!buf)
+               return -ENOMEM;
+
+       memset(buf, 0xff, size);
+       ret = spi_write(sigma_delta->spi, buf, size);
+       kfree(buf);
+
+       return ret;
+}
+EXPORT_SYMBOL_GPL(ad_sd_reset);
+
 static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
        unsigned int mode, unsigned int channel)
 {
index bc5b38e3a147e6559e4863bfc39e21115648d7b9..a70ef7fec95f05065295a41280d7b17632aac7c9 100644 (file)
@@ -225,6 +225,7 @@ struct at91_adc_trigger {
        char                            *name;
        unsigned int                    trgmod_value;
        unsigned int                    edge_type;
+       bool                            hw_trig;
 };
 
 struct at91_adc_state {
@@ -254,16 +255,25 @@ static const struct at91_adc_trigger at91_adc_trigger_list[] = {
                .name = "external_rising",
                .trgmod_value = AT91_SAMA5D2_TRGR_TRGMOD_EXT_TRIG_RISE,
                .edge_type = IRQ_TYPE_EDGE_RISING,
+               .hw_trig = true,
        },
        {
                .name = "external_falling",
                .trgmod_value = AT91_SAMA5D2_TRGR_TRGMOD_EXT_TRIG_FALL,
                .edge_type = IRQ_TYPE_EDGE_FALLING,
+               .hw_trig = true,
        },
        {
                .name = "external_any",
                .trgmod_value = AT91_SAMA5D2_TRGR_TRGMOD_EXT_TRIG_ANY,
                .edge_type = IRQ_TYPE_EDGE_BOTH,
+               .hw_trig = true,
+       },
+       {
+               .name = "software",
+               .trgmod_value = AT91_SAMA5D2_TRGR_TRGMOD_NO_TRIGGER,
+               .edge_type = IRQ_TYPE_NONE,
+               .hw_trig = false,
        },
 };
 
@@ -597,7 +607,7 @@ static int at91_adc_probe(struct platform_device *pdev)
        struct at91_adc_state *st;
        struct resource *res;
        int ret, i;
-       u32 edge_type;
+       u32 edge_type = IRQ_TYPE_NONE;
 
        indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*st));
        if (!indio_dev)
@@ -641,14 +651,14 @@ static int at91_adc_probe(struct platform_device *pdev)
        ret = of_property_read_u32(pdev->dev.of_node,
                                   "atmel,trigger-edge-type", &edge_type);
        if (ret) {
-               dev_err(&pdev->dev,
-                       "invalid or missing value for atmel,trigger-edge-type\n");
-               return ret;
+               dev_dbg(&pdev->dev,
+                       "atmel,trigger-edge-type not specified, only software trigger available\n");
        }
 
        st->selected_trig = NULL;
 
-       for (i = 0; i < AT91_SAMA5D2_HW_TRIG_CNT; i++)
+       /* find the right trigger, or no trigger at all */
+       for (i = 0; i < AT91_SAMA5D2_HW_TRIG_CNT + 1; i++)
                if (at91_adc_trigger_list[i].edge_type == edge_type) {
                        st->selected_trig = &at91_adc_trigger_list[i];
                        break;
@@ -717,24 +727,27 @@ static int at91_adc_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, indio_dev);
 
-       ret = at91_adc_buffer_init(indio_dev);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "couldn't initialize the buffer.\n");
-               goto per_clk_disable_unprepare;
-       }
+       if (st->selected_trig->hw_trig) {
+               ret = at91_adc_buffer_init(indio_dev);
+               if (ret < 0) {
+                       dev_err(&pdev->dev, "couldn't initialize the buffer.\n");
+                       goto per_clk_disable_unprepare;
+               }
 
-       ret = at91_adc_trigger_init(indio_dev);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "couldn't setup the triggers.\n");
-               goto per_clk_disable_unprepare;
+               ret = at91_adc_trigger_init(indio_dev);
+               if (ret < 0) {
+                       dev_err(&pdev->dev, "couldn't setup the triggers.\n");
+                       goto per_clk_disable_unprepare;
+               }
        }
 
        ret = iio_device_register(indio_dev);
        if (ret < 0)
                goto per_clk_disable_unprepare;
 
-       dev_info(&pdev->dev, "setting up trigger as %s\n",
-                st->selected_trig->name);
+       if (st->selected_trig->hw_trig)
+               dev_info(&pdev->dev, "setting up trigger as %s\n",
+                        st->selected_trig->name);
 
        dev_info(&pdev->dev, "version: %x\n",
                 readl_relaxed(st->base + AT91_SAMA5D2_VERSION));
index 634717ae12f354a79c77cea7fbd84633c1bb9f79..071dd23a33d9f0a8bbe51752f3f85cebf8362a42 100644 (file)
@@ -17,6 +17,8 @@
  * MCP3204
  * MCP3208
  * ------------
+ * 13 bit converter
+ * MCP3301
  *
  * Datasheet can be found here:
  * http://ww1.microchip.com/downloads/en/DeviceDoc/21293C.pdf  mcp3001
@@ -96,7 +98,7 @@ static int mcp320x_channel_to_tx_data(int device_index,
 }
 
 static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
-                                 bool differential, int device_index)
+                                 bool differential, int device_index, int *val)
 {
        int ret;
 
@@ -117,19 +119,25 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
 
        switch (device_index) {
        case mcp3001:
-               return (adc->rx_buf[0] << 5 | adc->rx_buf[1] >> 3);
+               *val = (adc->rx_buf[0] << 5 | adc->rx_buf[1] >> 3);
+               return 0;
        case mcp3002:
        case mcp3004:
        case mcp3008:
-               return (adc->rx_buf[0] << 2 | adc->rx_buf[1] >> 6);
+               *val = (adc->rx_buf[0] << 2 | adc->rx_buf[1] >> 6);
+               return 0;
        case mcp3201:
-               return (adc->rx_buf[0] << 7 | adc->rx_buf[1] >> 1);
+               *val = (adc->rx_buf[0] << 7 | adc->rx_buf[1] >> 1);
+               return 0;
        case mcp3202:
        case mcp3204:
        case mcp3208:
-               return (adc->rx_buf[0] << 4 | adc->rx_buf[1] >> 4);
+               *val = (adc->rx_buf[0] << 4 | adc->rx_buf[1] >> 4);
+               return 0;
        case mcp3301:
-               return sign_extend32((adc->rx_buf[0] & 0x1f) << 8 | adc->rx_buf[1], 12);
+               *val = sign_extend32((adc->rx_buf[0] & 0x1f) << 8
+                                   | adc->rx_buf[1], 12);
+               return 0;
        default:
                return -EINVAL;
        }
@@ -150,12 +158,10 @@ static int mcp320x_read_raw(struct iio_dev *indio_dev,
        switch (mask) {
        case IIO_CHAN_INFO_RAW:
                ret = mcp320x_adc_conversion(adc, channel->address,
-                       channel->differential, device_index);
-
+                       channel->differential, device_index, val);
                if (ret < 0)
                        goto out;
 
-               *val = ret;
                ret = IIO_VAL_INT;
                break;
 
@@ -312,6 +318,7 @@ static int mcp320x_probe(struct spi_device *spi)
        indio_dev->name = spi_get_device_id(spi)->name;
        indio_dev->modes = INDIO_DIRECT_MODE;
        indio_dev->info = &mcp320x_info;
+       spi_set_drvdata(spi, indio_dev);
 
        chip_info = &mcp320x_chip_infos[spi_get_device_id(spi)->driver_data];
        indio_dev->channels = chip_info->channels;
index 102fc51b10aa192a21fb77e972e5c0b4afe2e25b..47d24ae5462fe8afd131f9d771c7d00e9da1d03d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/bitops.h>
index 63c872a70adcf78488d5c6b0e091ab8b6a3d5d5c..1d5354ff5c7297d5999fc4094e502a2b792592d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Code shared between the different Qualcomm PMIC voltage ADCs
  */
index e3c15f88075f7beb37b290e0a7d89bcc5bcd35d1..4df32cf1650e7c7f58f680026610478857269a35 100644 (file)
@@ -1666,7 +1666,7 @@ static int stm32_adc_chan_of_init(struct iio_dev *indio_dev)
 
        num_channels = of_property_count_u32_elems(node, "st,adc-channels");
        if (num_channels < 0 ||
-           num_channels >= adc_info->max_channels) {
+           num_channels > adc_info->max_channels) {
                dev_err(&indio_dev->dev, "Bad st,adc-channels?\n");
                return num_channels < 0 ? num_channels : -EINVAL;
        }
index d1210024f6bccec6c321df49d537df5e7b1d7661..e0dc204883357270dfe7b568c3c588089cf96777 100644 (file)
@@ -52,7 +52,7 @@
 
 #define ADS1015_CFG_COMP_QUE_MASK      GENMASK(1, 0)
 #define ADS1015_CFG_COMP_LAT_MASK      BIT(2)
-#define ADS1015_CFG_COMP_POL_MASK      BIT(2)
+#define ADS1015_CFG_COMP_POL_MASK      BIT(3)
 #define ADS1015_CFG_COMP_MODE_MASK     BIT(4)
 #define ADS1015_CFG_DR_MASK    GENMASK(7, 5)
 #define ADS1015_CFG_MOD_MASK   BIT(8)
@@ -1017,10 +1017,12 @@ static int ads1015_probe(struct i2c_client *client,
 
                switch (irq_trig) {
                case IRQF_TRIGGER_LOW:
-                       cfg_comp |= ADS1015_CFG_COMP_POL_LOW;
+                       cfg_comp |= ADS1015_CFG_COMP_POL_LOW <<
+                                       ADS1015_CFG_COMP_POL_SHIFT;
                        break;
                case IRQF_TRIGGER_HIGH:
-                       cfg_comp |= ADS1015_CFG_COMP_POL_HIGH;
+                       cfg_comp |= ADS1015_CFG_COMP_POL_HIGH <<
+                                       ADS1015_CFG_COMP_POL_SHIFT;
                        break;
                default:
                        return -EINVAL;
index 1edd99f0c5e55a367772ab85b01e8a64cf399b54..e3cfb91bffc61122d56dc44b2ccd793afcd73800 100644 (file)
@@ -887,21 +887,27 @@ static int twl4030_madc_probe(struct platform_device *pdev)
 
        /* Enable 3v1 bias regulator for MADC[3:6] */
        madc->usb3v1 = devm_regulator_get(madc->dev, "vusb3v1");
-       if (IS_ERR(madc->usb3v1))
-               return -ENODEV;
+       if (IS_ERR(madc->usb3v1)) {
+               ret = -ENODEV;
+               goto err_i2c;
+       }
 
        ret = regulator_enable(madc->usb3v1);
-       if (ret)
+       if (ret) {
                dev_err(madc->dev, "could not enable 3v1 bias regulator\n");
+               goto err_i2c;
+       }
 
        ret = iio_device_register(iio_dev);
        if (ret) {
                dev_err(&pdev->dev, "could not register iio device\n");
-               goto err_i2c;
+               goto err_usb3v1;
        }
 
        return 0;
 
+err_usb3v1:
+       regulator_disable(madc->usb3v1);
 err_i2c:
        twl4030_madc_set_current_generator(madc, 0, 0);
 err_current_generator:
index 85beaae831aee154045601f507e9d053f731ae42..95f9f41c58b71a7ace78c5fb8b4bdd4d469f33bf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the industrial I/O buffer implementations
 #
index 6fa760e1bdd557d0cea6a545fac4db8a95f180db..4bc30bb548e2d5966862f68dcdb043553bd3cc5d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the IIO common modules.
 # Common modules contains modules, which can be shared among multiple
index 541c6590d69caa47333e9fcc117951e6b6ed157a..4528ab55eb68ad855b1033f37e1539e4b9308075 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SSP_IIO_SENSOR_H__
 #define __SSP_IIO_SENSOR_H__
 
index 9f3e24f3024bb36d6e6fa51d9b3f95e0f5ff0f6d..f7fb3b79b64c73bd2ffa7c8aa0e4e1a70c28087b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the STMicroelectronics sensor common modules.
 #
index d99bb1460fe240b1721cdeda742c092739e13e9f..02e833b14db08db9460b073f10a74f1942d3c752 100644 (file)
@@ -463,8 +463,17 @@ int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable)
        u8 drdy_mask;
        struct st_sensor_data *sdata = iio_priv(indio_dev);
 
-       if (!sdata->sensor_settings->drdy_irq.addr)
+       if (!sdata->sensor_settings->drdy_irq.addr) {
+               /*
+                * there are some devices (e.g. LIS3MDL) where drdy line is
+                * routed to a given pin and it is not possible to select a
+                * different one. Take into account irq status register
+                * to understand if irq trigger can be properly supported
+                */
+               if (sdata->sensor_settings->drdy_irq.addr_stat_drdy)
+                       sdata->hw_irq_trigger = enable;
                return 0;
+       }
 
        /* Enable/Disable the interrupt generator 1. */
        if (sdata->sensor_settings->drdy_irq.ig1.en_addr > 0) {
index cd88098ff6f1fa6ed9dd7fb8989f8a5e90eb0480..e8894be55660f6ea7a65e4bca1f56873a8529143 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Local functions in the ST Sensors core
  */
index 603587cc2f079242aa166180d01c5c9c64b6fd48..993511ba4b172ea74c6f0fca95967a5e610f7454 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O DAC drivers
 #
index 0765e93d78040947e62374a5acb823249aedaf20..f14fe20f365c7234a8ebe3ecf8c94ddf65d81fa6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the IIO Dummy Driver
 #
index d044b946e74a71d2a5a9f76d6f2cde0de40749ed..e0bf64fe9d67143c0154c50076d9aa0b77c84341 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IIO_DUMMY_EVGEN_H_
 #define _IIO_DUMMY_EVGEN_H_
 
index ed63ffd849f8201505499d2be4594572b09b535d..7ec2a0bb08076ffa4ffefaf50cc0336471553756 100644 (file)
@@ -72,6 +72,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
                                st->event_en = state;
                        else
                                return -EINVAL;
+                       break;
                default:
                        return -EINVAL;
                }
index f0e149a606b0aa54f7226fbdd43308e25e1f7606..295ec780c4eb8df7ed603cbae0502daec7d19548 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O gyroscope sensor drivers
 #
index 72db723c8fb6ba6b097a55089784d94025482a96..6bcff6562249547425bd91cb86a18e0137ec57e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BMG160_H_
 #define BMG160_H_
 
index bef87a714dc56b9a7417413ad11ebe4aea749a1d..835b0249c376981a21f560130aee7609f766d4bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/iio/iio.h>
 #include <linux/mutex.h>
 #include <linux/regmap.h>
index be0dedeb8f3c60c3eb232a99fca77142ffe1030d..ae4204995017ff687c08a2b91d1523bef062a9cf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for IIO humidity sensor drivers
 #
index 8b563c3323b572926217b54094a1b23a3f815857..68629c68b19bd6f45885253e1c04c75ffee433e3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Inertial Measurement Units
 #
index 90c24a23c679b8001e31cdff48b098cacb872682..e70a5339acb192006bf84e732a212d5106b26889 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/interrupt.h>
 #include <linux/mutex.h>
 #include <linux/kernel.h>
index d2ae6ed70271bca95cc367592718af2f45a9b555..e7b11e74fd1dffe3fcf441c4ef9e8cee86e254fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BMI160_H_
 #define BMI160_H_
 
index 734af5e6cef91f1e0a9a8b078d200fcec1e2308b..70ffe0d13d8c5cee62921828823c7e32d502e736 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Invensense MPU6050 device.
 #
index 17ec4cee51dc005a9f7cc0efc92a9326a3906a61..a47428b4d31be9b07adc5cfb96dd9c0472397006 100644 (file)
@@ -310,8 +310,10 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
        ret = indio_dev->info->debugfs_reg_access(indio_dev,
                                                  indio_dev->cached_reg_addr,
                                                  0, &val);
-       if (ret)
+       if (ret) {
                dev_err(indio_dev->dev.parent, "%s: read failed\n", __func__);
+               return ret;
+       }
 
        len = snprintf(buf, sizeof(buf), "0x%X\n", val);
 
index fa32fa459e2e4164943141c4fc427c66e0283b67..c263469b7ce9ef38c69707880d6117e44359bf19 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for IIO Light sensors
 #
index b86d6cb7f285146fe9358e3a3427d705e611fb58..664b2f866472d120e2d488c9f6a7939aae00f068 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O Magnetometer sensor drivers
 #
index 9a8e26812ca8dd16df8241d7225000795890e058..3b69232afd2c003a90924fc1be8896c5c01c92a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BMC150_MAGN_H_
 #define _BMC150_MAGN_H_
 
index e68368b5b2a38eed3ec722cc4a6e342401767ea0..08aafba4481c66345b7ef770b3e44ce8b464f843 100644 (file)
@@ -315,6 +315,10 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = {
                                },
                        },
                },
+               .drdy_irq = {
+                       /* drdy line is routed drdy pin */
+                       .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
+               },
                .multi_read_bit = true,
                .bootime = 2,
        },
index 2260d40e0936d71c2fbc3f17aa69d6052d99ba14..1afd1e70f8cc9982fa991c1b418e183df6be628c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O potentiometer drivers
 #
index 8386427893890985fce5f786787e0bdd82a04e2d..c2058d7b2f93c540ed03c94f1e5398f5ec50908b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O pressure drivers
 #
index 0d2ea3ee371b9fc8c0fff8c213f97ee3ab31b5a1..8f26428804a236fa1a38e612c0cd6aa3245b7eff 100644 (file)
@@ -573,7 +573,7 @@ static int bmp280_chip_config(struct bmp280_data *data)
        u8 osrs = BMP280_OSRS_TEMP_X(data->oversampling_temp + 1) |
                  BMP280_OSRS_PRESS_X(data->oversampling_press + 1);
 
-       ret = regmap_update_bits(data->regmap, BMP280_REG_CTRL_MEAS,
+       ret = regmap_write_bits(data->regmap, BMP280_REG_CTRL_MEAS,
                                 BMP280_OSRS_TEMP_MASK |
                                 BMP280_OSRS_PRESS_MASK |
                                 BMP280_MODE_MASK,
index 6807113ec09f89c8746e47b8f05b54474637ed17..08c00ac32bda9c112a2d8a5e7418ee0d3e75ac59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/device.h>
 #include <linux/module.h>
 #include <linux/regmap.h>
index 61347438b779e05f06f84b8c1a2ac8d50b9ddb1d..eda50ef65706c9f5d27ec8445c9e42f26f3b7060 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/regmap.h>
index ebfb1de7377ffb5b0c30cf3c23c61b0f7afcdddd..91431454eb85de1c51cf88e477ab3d8378e4d007 100644 (file)
@@ -865,7 +865,6 @@ complete:
 static int zpa2326_wait_oneshot_completion(const struct iio_dev   *indio_dev,
                                           struct zpa2326_private *private)
 {
-       int          ret;
        unsigned int val;
        long     timeout;
 
@@ -887,14 +886,11 @@ static int zpa2326_wait_oneshot_completion(const struct iio_dev   *indio_dev,
                /* Timed out. */
                zpa2326_warn(indio_dev, "no one shot interrupt occurred (%ld)",
                             timeout);
-               ret = -ETIME;
-       } else if (timeout < 0) {
-               zpa2326_warn(indio_dev,
-                            "wait for one shot interrupt cancelled");
-               ret = -ERESTARTSYS;
+               return -ETIME;
        }
 
-       return ret;
+       zpa2326_warn(indio_dev, "wait for one shot interrupt cancelled");
+       return -ERESTARTSYS;
 }
 
 static int zpa2326_init_managed_irq(struct device          *parent,
index ed1b6f4cc209d914c4c3aef16349b8c4647ab610..ad6686391f0831fdff0165c37bc5eb1f65c01262 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for IIO proximity sensors
 #
index 0eeff29b61bed8cc2f678c05a22f1fa51562794b..4a48b7ba3a1c1753c6c3f7d847131ca0ba61b4ac 100644 (file)
 #define AS3935_AFE_GAIN_MAX    0x1F
 #define AS3935_AFE_PWR_BIT     BIT(0)
 
+#define AS3935_NFLWDTH         0x01
+#define AS3935_NFLWDTH_MASK    0x7f
+
 #define AS3935_INT             0x03
 #define AS3935_INT_MASK                0x0f
+#define AS3935_DISTURB_INT     BIT(2)
 #define AS3935_EVENT_INT       BIT(3)
 #define AS3935_NOISE_INT       BIT(0)
 
@@ -48,6 +52,7 @@
 #define AS3935_DATA_MASK       0x3F
 
 #define AS3935_TUNE_CAP                0x08
+#define AS3935_DEFAULTS                0x3C
 #define AS3935_CALIBRATE       0x3D
 
 #define AS3935_READ_DATA       BIT(14)
@@ -62,7 +67,9 @@ struct as3935_state {
        struct mutex lock;
        struct delayed_work work;
 
+       unsigned long noise_tripped;
        u32 tune_cap;
+       u32 nflwdth_reg;
        u8 buffer[16]; /* 8-bit data + 56-bit padding + 64-bit timestamp */
        u8 buf[2] ____cacheline_aligned;
 };
@@ -145,12 +152,29 @@ static ssize_t as3935_sensor_sensitivity_store(struct device *dev,
        return len;
 }
 
+static ssize_t as3935_noise_level_tripped_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf)
+{
+       struct as3935_state *st = iio_priv(dev_to_iio_dev(dev));
+       int ret;
+
+       mutex_lock(&st->lock);
+       ret = sprintf(buf, "%d\n", !time_after(jiffies, st->noise_tripped + HZ));
+       mutex_unlock(&st->lock);
+
+       return ret;
+}
+
 static IIO_DEVICE_ATTR(sensor_sensitivity, S_IRUGO | S_IWUSR,
        as3935_sensor_sensitivity_show, as3935_sensor_sensitivity_store, 0);
 
+static IIO_DEVICE_ATTR(noise_level_tripped, S_IRUGO,
+       as3935_noise_level_tripped_show, NULL, 0);
 
 static struct attribute *as3935_attributes[] = {
        &iio_dev_attr_sensor_sensitivity.dev_attr.attr,
+       &iio_dev_attr_noise_level_tripped.dev_attr.attr,
        NULL,
 };
 
@@ -246,7 +270,11 @@ static void as3935_event_work(struct work_struct *work)
        case AS3935_EVENT_INT:
                iio_trigger_poll_chained(st->trig);
                break;
+       case AS3935_DISTURB_INT:
        case AS3935_NOISE_INT:
+               mutex_lock(&st->lock);
+               st->noise_tripped = jiffies;
+               mutex_unlock(&st->lock);
                dev_warn(&st->spi->dev, "noise level is too high\n");
                break;
        }
@@ -269,15 +297,14 @@ static irqreturn_t as3935_interrupt_handler(int irq, void *private)
 
 static void calibrate_as3935(struct as3935_state *st)
 {
-       /* mask disturber interrupt bit */
-       as3935_write(st, AS3935_INT, BIT(5));
-
+       as3935_write(st, AS3935_DEFAULTS, 0x96);
        as3935_write(st, AS3935_CALIBRATE, 0x96);
        as3935_write(st, AS3935_TUNE_CAP,
                BIT(5) | (st->tune_cap / TUNE_CAP_DIV));
 
        mdelay(2);
        as3935_write(st, AS3935_TUNE_CAP, (st->tune_cap / TUNE_CAP_DIV));
+       as3935_write(st, AS3935_NFLWDTH, st->nflwdth_reg);
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -370,6 +397,15 @@ static int as3935_probe(struct spi_device *spi)
                return -EINVAL;
        }
 
+       ret = of_property_read_u32(np,
+                       "ams,nflwdth", &st->nflwdth_reg);
+       if (!ret && st->nflwdth_reg > AS3935_NFLWDTH_MASK) {
+               dev_err(&spi->dev,
+                       "invalid nflwdth setting of %d\n",
+                       st->nflwdth_reg);
+               return -EINVAL;
+       }
+
        indio_dev->dev.parent = &spi->dev;
        indio_dev->name = spi_get_device_id(spi)->name;
        indio_dev->channels = as3935_channels;
@@ -384,6 +420,7 @@ static int as3935_probe(struct spi_device *spi)
                return -ENOMEM;
 
        st->trig = trig;
+       st->noise_tripped = jiffies - HZ;
        trig->dev.parent = indio_dev->dev.parent;
        iio_trigger_set_drvdata(trig, indio_dev);
        trig->ops = &iio_interrupt_trigger_ops;
index ad1d668de5460d85b8c796cffa1a0c7a7d967bf8..34bd9023727b61279a3256c2fe27fd40fe744e65 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O temperature drivers
 #
index 0a72a2a76cb2da5e3be48d76c064eb98dfb30e6f..f3d11acb8a0baab52cd708b796ae93b2423a855c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for triggers not associated with iio-devices
 #
index 9b9053494daf5ef2dd601db958a3c7177dcf3a27..eb212f8c88793b2c1029f087b40733039b5d9f96 100644 (file)
@@ -174,6 +174,7 @@ static void stm32_timer_stop(struct stm32_timer_trigger *priv)
                clk_disable(priv->clk);
 
        /* Stop timer */
+       regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
        regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN, 0);
        regmap_write(priv->regmap, TIM_PSC, 0);
        regmap_write(priv->regmap, TIM_ARR, 0);
@@ -715,8 +716,9 @@ static ssize_t stm32_count_set_preset(struct iio_dev *indio_dev,
        if (ret)
                return ret;
 
+       /* TIMx_ARR register shouldn't be buffered (ARPE=0) */
+       regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
        regmap_write(priv->regmap, TIM_ARR, preset);
-       regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, TIM_CR1_ARPE);
 
        return len;
 }
index b4df164f71a6af7c086e2a8df961e7c328e2909c..9c0a2b5c834e2d57264d86a0e02cb1452c772825 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS)     := rdma_cm.o
 user_access-$(CONFIG_INFINIBAND_ADDR_TRANS)    := rdma_ucm.o
 
index 30825bb9b8e9247800b3aaa6084c603383d45bbf..8861c052155ab72e0062be5e1c03d1723705f0c2 100644 (file)
@@ -100,6 +100,8 @@ int iwpm_register_pid(struct iwpm_dev_data *pm_msg, u8 nl_client)
        if (ret)
                goto pid_query_error;
 
+       nlmsg_end(skb, nlh);
+
        pr_debug("%s: Multicasting a nlmsg (dev = %s ifname = %s iwpm = %s)\n",
                __func__, pm_msg->dev_name, pm_msg->if_name, iwpm_ulib_name);
 
@@ -170,6 +172,8 @@ int iwpm_add_mapping(struct iwpm_sa_data *pm_msg, u8 nl_client)
                                &pm_msg->loc_addr, IWPM_NLA_MANAGE_ADDR);
        if (ret)
                goto add_mapping_error;
+
+       nlmsg_end(skb, nlh);
        nlmsg_request->req_buffer = pm_msg;
 
        ret = rdma_nl_unicast_wait(skb, iwpm_user_pid);
@@ -246,6 +250,8 @@ int iwpm_add_and_query_mapping(struct iwpm_sa_data *pm_msg, u8 nl_client)
                                &pm_msg->rem_addr, IWPM_NLA_QUERY_REMOTE_ADDR);
        if (ret)
                goto query_mapping_error;
+
+       nlmsg_end(skb, nlh);
        nlmsg_request->req_buffer = pm_msg;
 
        ret = rdma_nl_unicast_wait(skb, iwpm_user_pid);
@@ -308,6 +314,8 @@ int iwpm_remove_mapping(struct sockaddr_storage *local_addr, u8 nl_client)
        if (ret)
                goto remove_mapping_error;
 
+       nlmsg_end(skb, nlh);
+
        ret = rdma_nl_unicast_wait(skb, iwpm_user_pid);
        if (ret) {
                skb = NULL; /* skb is freed in the netlink send-op handling */
index c81c5594262621770b7f55f433cdd0340f153396..3c4faadb8cddd7fdf6611df3674811664b1eb890 100644 (file)
@@ -597,6 +597,9 @@ static int send_mapinfo_num(u32 mapping_num, u8 nl_client, int iwpm_pid)
                                &mapping_num, IWPM_NLA_MAPINFO_SEND_NUM);
        if (ret)
                goto mapinfo_num_error;
+
+       nlmsg_end(skb, nlh);
+
        ret = rdma_nl_unicast(skb, iwpm_pid);
        if (ret) {
                skb = NULL;
@@ -678,6 +681,8 @@ int iwpm_send_mapinfo(u8 nl_client, int iwpm_pid)
                        if (ret)
                                goto send_mapping_info_unlock;
 
+                       nlmsg_end(skb, nlh);
+
                        iwpm_print_sockaddr(&map_info->local_sockaddr,
                                "send_mapping_info: Local sockaddr:");
                        iwpm_print_sockaddr(&map_info->mapped_sockaddr,
index b12e58787c3ddc9f87d80e500392740336bfa362..1fb72c356e36ccc77fc3d97e384a238d9fa6d2f9 100644 (file)
@@ -175,13 +175,24 @@ static int rdma_nl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
            !netlink_capable(skb, CAP_NET_ADMIN))
                return -EPERM;
 
+       /*
+        * LS responses overload the 0x100 (NLM_F_ROOT) flag.  Don't
+        * mistakenly call the .dump() function.
+        */
+       if (index == RDMA_NL_LS) {
+               if (cb_table[op].doit)
+                       return cb_table[op].doit(skb, nlh, extack);
+               return -EINVAL;
+       }
        /* FIXME: Convert IWCM to properly handle doit callbacks */
        if ((nlh->nlmsg_flags & NLM_F_DUMP) || index == RDMA_NL_RDMA_CM ||
            index == RDMA_NL_IWCM) {
                struct netlink_dump_control c = {
                        .dump = cb_table[op].dump,
                };
-               return netlink_dump_start(nls, skb, nlh, &c);
+               if (c.dump)
+                       return netlink_dump_start(nls, skb, nlh, &c);
+               return -EINVAL;
        }
 
        if (cb_table[op].doit)
index 3ba24c428c3bda48ec8698934f275828754ac19d..2fae850a3eff6a92703aed33975af9b1e0fc3835 100644 (file)
@@ -214,7 +214,9 @@ static int nldev_port_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
 
        err = nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1,
                          nldev_policy, extack);
-       if (err || !tb[RDMA_NLDEV_ATTR_PORT_INDEX])
+       if (err ||
+           !tb[RDMA_NLDEV_ATTR_DEV_INDEX] ||
+           !tb[RDMA_NLDEV_ATTR_PORT_INDEX])
                return -EINVAL;
 
        index = nla_get_u32(tb[RDMA_NLDEV_ATTR_DEV_INDEX]);
index 70ad19c4c73e77da961ffccd9958887dcead8027..88bdafb297f5fe9f722c7a8edee27554ea3b6862 100644 (file)
@@ -432,8 +432,10 @@ int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev)
        atomic_set(&qp->qp_sec->error_list_count, 0);
        init_completion(&qp->qp_sec->error_complete);
        ret = security_ib_alloc_security(&qp->qp_sec->security);
-       if (ret)
+       if (ret) {
                kfree(qp->qp_sec);
+               qp->qp_sec = NULL;
+       }
 
        return ret;
 }
index 4ab30d832ac5b8a5ac4994b9c4f0b3f3802e019c..52a2cf2d83aaf483944ad9720e55121f2adb6484 100644 (file)
@@ -3869,15 +3869,15 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
        resp.raw_packet_caps = attr.raw_packet_caps;
        resp.response_length += sizeof(resp.raw_packet_caps);
 
-       if (ucore->outlen < resp.response_length + sizeof(resp.xrq_caps))
+       if (ucore->outlen < resp.response_length + sizeof(resp.tm_caps))
                goto end;
 
-       resp.xrq_caps.max_rndv_hdr_size = attr.xrq_caps.max_rndv_hdr_size;
-       resp.xrq_caps.max_num_tags      = attr.xrq_caps.max_num_tags;
-       resp.xrq_caps.max_ops           = attr.xrq_caps.max_ops;
-       resp.xrq_caps.max_sge           = attr.xrq_caps.max_sge;
-       resp.xrq_caps.flags             = attr.xrq_caps.flags;
-       resp.response_length += sizeof(resp.xrq_caps);
+       resp.tm_caps.max_rndv_hdr_size  = attr.tm_caps.max_rndv_hdr_size;
+       resp.tm_caps.max_num_tags       = attr.tm_caps.max_num_tags;
+       resp.tm_caps.max_ops            = attr.tm_caps.max_ops;
+       resp.tm_caps.max_sge            = attr.tm_caps.max_sge;
+       resp.tm_caps.flags              = attr.tm_caps.flags;
+       resp.response_length += sizeof(resp.tm_caps);
 end:
        err = ib_copy_to_udata(ucore, &resp, resp.response_length);
        return err;
index ee9e27dc799b50ead4663cd5fd13c94a3ac020d4..de57d6c11a25428d96e8bcb4868fc19794cc374d 100644 (file)
@@ -1646,7 +1646,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
         */
        if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) {
                if (attr.qp_state >= IB_QPS_INIT) {
-                       if (qp->device->get_link_layer(qp->device, attr.port_num) !=
+                       if (rdma_port_get_link_layer(qp->device, attr.port_num) !=
                            IB_LINK_LAYER_INFINIBAND)
                                return true;
                        goto lid_check;
@@ -1655,7 +1655,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
 
        /* Can't get a quick answer, iterate over all ports */
        for (port = 0; port < qp->device->phys_port_cnt; port++)
-               if (qp->device->get_link_layer(qp->device, port) !=
+               if (rdma_port_get_link_layer(qp->device, port) !=
                    IB_LINK_LAYER_INFINIBAND)
                        num_eth_ports++;
 
index 34c93abf0fe03913441c3bcd6f410ebdcf5445d1..e4f31c1be8f72c3e7a1bcc970b271c21a6cbc2cc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INFINIBAND_MTHCA)         += mthca/
 obj-$(CONFIG_INFINIBAND_QIB)           += qib/
 obj-$(CONFIG_INFINIBAND_CXGB3)         += cxgb3/
index afbaa0e20670e7923874d8c47e0257c1f15445a5..6e3bc25cc140ecedf6e54e48d7fb9b41fc91c359 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 ccflags-y := -Idrivers/net/ethernet/broadcom/bnxt
 obj-$(CONFIG_INFINIBAND_BNXT_RE) += bnxt_re.o
index b3ad37fec578be497cc55e3dc48552e62d71c595..ecbac91b2e1441acf4529d6d40fa4256892349c0 100644 (file)
@@ -93,11 +93,13 @@ struct bnxt_re_dev {
        struct ib_device                ibdev;
        struct list_head                list;
        unsigned long                   flags;
-#define BNXT_RE_FLAG_NETDEV_REGISTERED 0
-#define BNXT_RE_FLAG_IBDEV_REGISTERED  1
-#define BNXT_RE_FLAG_GOT_MSIX          2
-#define BNXT_RE_FLAG_RCFW_CHANNEL_EN   8
-#define BNXT_RE_FLAG_QOS_WORK_REG      16
+#define BNXT_RE_FLAG_NETDEV_REGISTERED         0
+#define BNXT_RE_FLAG_IBDEV_REGISTERED          1
+#define BNXT_RE_FLAG_GOT_MSIX                  2
+#define BNXT_RE_FLAG_HAVE_L2_REF               3
+#define BNXT_RE_FLAG_RCFW_CHANNEL_EN           4
+#define BNXT_RE_FLAG_QOS_WORK_REG              5
+#define BNXT_RE_FLAG_TASK_IN_PROG              6
        struct net_device               *netdev;
        unsigned int                    version, major, minor;
        struct bnxt_en_dev              *en_dev;
@@ -108,6 +110,8 @@ struct bnxt_re_dev {
 
        struct delayed_work             worker;
        u8                              cur_prio_map;
+       u8                              active_speed;
+       u8                              active_width;
 
        /* FP Notification Queue (CQ & SRQ) */
        struct tasklet_struct           nq_task;
index 01eee15bbd6598fa6ae103aa1b86a81023e67f1d..0d89621d9fe8ed81b0d28c031d48ffcacb31fdfd 100644 (file)
@@ -259,14 +259,9 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
        port_attr->sm_sl = 0;
        port_attr->subnet_timeout = 0;
        port_attr->init_type_reply = 0;
-       /* call the underlying netdev's ethtool hooks to query speed settings
-        * for which we acquire rtnl_lock _only_ if it's registered with
-        * IB stack to avoid race in the NETDEV_UNREG path
-        */
-       if (test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags))
-               if (ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed,
-                                    &port_attr->active_width))
-                       return -EINVAL;
+       port_attr->active_speed = rdev->active_speed;
+       port_attr->active_width = rdev->active_width;
+
        return 0;
 }
 
@@ -319,6 +314,7 @@ int bnxt_re_del_gid(struct ib_device *ibdev, u8 port_num,
        struct bnxt_re_gid_ctx *ctx, **ctx_tbl;
        struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
        struct bnxt_qplib_sgid_tbl *sgid_tbl = &rdev->qplib_res.sgid_tbl;
+       struct bnxt_qplib_gid *gid_to_del;
 
        /* Delete the entry from the hardware */
        ctx = *context;
@@ -328,11 +324,25 @@ int bnxt_re_del_gid(struct ib_device *ibdev, u8 port_num,
        if (sgid_tbl && sgid_tbl->active) {
                if (ctx->idx >= sgid_tbl->max)
                        return -EINVAL;
+               gid_to_del = &sgid_tbl->tbl[ctx->idx];
+               /* DEL_GID is called in WQ context(netdevice_event_work_handler)
+                * or via the ib_unregister_device path. In the former case QP1
+                * may not be destroyed yet, in which case just return as FW
+                * needs that entry to be present and will fail it's deletion.
+                * We could get invoked again after QP1 is destroyed OR get an
+                * ADD_GID call with a different GID value for the same index
+                * where we issue MODIFY_GID cmd to update the GID entry -- TBD
+                */
+               if (ctx->idx == 0 &&
+                   rdma_link_local_addr((struct in6_addr *)gid_to_del) &&
+                   ctx->refcnt == 1 && rdev->qp1_sqp) {
+                       dev_dbg(rdev_to_dev(rdev),
+                               "Trying to delete GID0 while QP1 is alive\n");
+                       return -EFAULT;
+               }
                ctx->refcnt--;
                if (!ctx->refcnt) {
-                       rc = bnxt_qplib_del_sgid(sgid_tbl,
-                                                &sgid_tbl->tbl[ctx->idx],
-                                                true);
+                       rc = bnxt_qplib_del_sgid(sgid_tbl, gid_to_del, true);
                        if (rc) {
                                dev_err(rdev_to_dev(rdev),
                                        "Failed to remove GID: %#x", rc);
@@ -816,6 +826,8 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp)
 
                kfree(rdev->sqp_ah);
                kfree(rdev->qp1_sqp);
+               rdev->qp1_sqp = NULL;
+               rdev->sqp_ah = NULL;
        }
 
        if (!IS_ERR_OR_NULL(qp->rumem))
@@ -1436,11 +1448,14 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
                qp->qplib_qp.modify_flags |=
                                CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU;
                qp->qplib_qp.path_mtu = __from_ib_mtu(qp_attr->path_mtu);
+               qp->qplib_qp.mtu = ib_mtu_enum_to_int(qp_attr->path_mtu);
        } else if (qp_attr->qp_state == IB_QPS_RTR) {
                qp->qplib_qp.modify_flags |=
                        CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU;
                qp->qplib_qp.path_mtu =
                        __from_ib_mtu(iboe_get_mtu(rdev->netdev->mtu));
+               qp->qplib_qp.mtu =
+                       ib_mtu_enum_to_int(iboe_get_mtu(rdev->netdev->mtu));
        }
 
        if (qp_attr_mask & IB_QP_TIMEOUT) {
@@ -1551,43 +1566,46 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
 {
        struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
        struct bnxt_re_dev *rdev = qp->rdev;
-       struct bnxt_qplib_qp qplib_qp;
+       struct bnxt_qplib_qp *qplib_qp;
        int rc;
 
-       memset(&qplib_qp, 0, sizeof(struct bnxt_qplib_qp));
-       qplib_qp.id = qp->qplib_qp.id;
-       qplib_qp.ah.host_sgid_index = qp->qplib_qp.ah.host_sgid_index;
+       qplib_qp = kzalloc(sizeof(*qplib_qp), GFP_KERNEL);
+       if (!qplib_qp)
+               return -ENOMEM;
+
+       qplib_qp->id = qp->qplib_qp.id;
+       qplib_qp->ah.host_sgid_index = qp->qplib_qp.ah.host_sgid_index;
 
-       rc = bnxt_qplib_query_qp(&rdev->qplib_res, &qplib_qp);
+       rc = bnxt_qplib_query_qp(&rdev->qplib_res, qplib_qp);
        if (rc) {
                dev_err(rdev_to_dev(rdev), "Failed to query HW QP");
-               return rc;
+               goto out;
        }
-       qp_attr->qp_state = __to_ib_qp_state(qplib_qp.state);
-       qp_attr->en_sqd_async_notify = qplib_qp.en_sqd_async_notify ? 1 : 0;
-       qp_attr->qp_access_flags = __to_ib_access_flags(qplib_qp.access);
-       qp_attr->pkey_index = qplib_qp.pkey_index;
-       qp_attr->qkey = qplib_qp.qkey;
+       qp_attr->qp_state = __to_ib_qp_state(qplib_qp->state);
+       qp_attr->en_sqd_async_notify = qplib_qp->en_sqd_async_notify ? 1 : 0;
+       qp_attr->qp_access_flags = __to_ib_access_flags(qplib_qp->access);
+       qp_attr->pkey_index = qplib_qp->pkey_index;
+       qp_attr->qkey = qplib_qp->qkey;
        qp_attr->ah_attr.type = RDMA_AH_ATTR_TYPE_ROCE;
-       rdma_ah_set_grh(&qp_attr->ah_attr, NULL, qplib_qp.ah.flow_label,
-                       qplib_qp.ah.host_sgid_index,
-                       qplib_qp.ah.hop_limit,
-                       qplib_qp.ah.traffic_class);
-       rdma_ah_set_dgid_raw(&qp_attr->ah_attr, qplib_qp.ah.dgid.data);
-       rdma_ah_set_sl(&qp_attr->ah_attr, qplib_qp.ah.sl);
-       ether_addr_copy(qp_attr->ah_attr.roce.dmac, qplib_qp.ah.dmac);
-       qp_attr->path_mtu = __to_ib_mtu(qplib_qp.path_mtu);
-       qp_attr->timeout = qplib_qp.timeout;
-       qp_attr->retry_cnt = qplib_qp.retry_cnt;
-       qp_attr->rnr_retry = qplib_qp.rnr_retry;
-       qp_attr->min_rnr_timer = qplib_qp.min_rnr_timer;
-       qp_attr->rq_psn = qplib_qp.rq.psn;
-       qp_attr->max_rd_atomic = qplib_qp.max_rd_atomic;
-       qp_attr->sq_psn = qplib_qp.sq.psn;
-       qp_attr->max_dest_rd_atomic = qplib_qp.max_dest_rd_atomic;
-       qp_init_attr->sq_sig_type = qplib_qp.sig_type ? IB_SIGNAL_ALL_WR :
-                                                       IB_SIGNAL_REQ_WR;
-       qp_attr->dest_qp_num = qplib_qp.dest_qpn;
+       rdma_ah_set_grh(&qp_attr->ah_attr, NULL, qplib_qp->ah.flow_label,
+                       qplib_qp->ah.host_sgid_index,
+                       qplib_qp->ah.hop_limit,
+                       qplib_qp->ah.traffic_class);
+       rdma_ah_set_dgid_raw(&qp_attr->ah_attr, qplib_qp->ah.dgid.data);
+       rdma_ah_set_sl(&qp_attr->ah_attr, qplib_qp->ah.sl);
+       ether_addr_copy(qp_attr->ah_attr.roce.dmac, qplib_qp->ah.dmac);
+       qp_attr->path_mtu = __to_ib_mtu(qplib_qp->path_mtu);
+       qp_attr->timeout = qplib_qp->timeout;
+       qp_attr->retry_cnt = qplib_qp->retry_cnt;
+       qp_attr->rnr_retry = qplib_qp->rnr_retry;
+       qp_attr->min_rnr_timer = qplib_qp->min_rnr_timer;
+       qp_attr->rq_psn = qplib_qp->rq.psn;
+       qp_attr->max_rd_atomic = qplib_qp->max_rd_atomic;
+       qp_attr->sq_psn = qplib_qp->sq.psn;
+       qp_attr->max_dest_rd_atomic = qplib_qp->max_dest_rd_atomic;
+       qp_init_attr->sq_sig_type = qplib_qp->sig_type ? IB_SIGNAL_ALL_WR :
+                                                        IB_SIGNAL_REQ_WR;
+       qp_attr->dest_qp_num = qplib_qp->dest_qpn;
 
        qp_attr->cap.max_send_wr = qp->qplib_qp.sq.max_wqe;
        qp_attr->cap.max_send_sge = qp->qplib_qp.sq.max_sge;
@@ -1596,7 +1614,9 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr,
        qp_attr->cap.max_inline_data = qp->qplib_qp.max_inline_data;
        qp_init_attr->cap = qp_attr->cap;
 
-       return 0;
+out:
+       kfree(qplib_qp);
+       return rc;
 }
 
 /* Routine for sending QP1 packets for RoCE V1 an V2
@@ -1908,6 +1928,7 @@ static int bnxt_re_build_atomic_wqe(struct ib_send_wr *wr,
        switch (wr->opcode) {
        case IB_WR_ATOMIC_CMP_AND_SWP:
                wqe->type = BNXT_QPLIB_SWQE_TYPE_ATOMIC_CMP_AND_SWP;
+               wqe->atomic.cmp_data = atomic_wr(wr)->compare_add;
                wqe->atomic.swap_data = atomic_wr(wr)->swap;
                break;
        case IB_WR_ATOMIC_FETCH_AND_ADD:
@@ -3062,7 +3083,7 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr)
                return rc;
        }
 
-       if (mr->npages && mr->pages) {
+       if (mr->pages) {
                rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res,
                                                        &mr->qplib_frpl);
                kfree(mr->pages);
index 82d1cbc27aeec80af4ac927227af347eba6f9714..e7450ea92aa9e11ba0d28792f54fcf373e470a66 100644 (file)
@@ -1161,6 +1161,8 @@ static int bnxt_re_ib_reg(struct bnxt_re_dev *rdev)
                }
        }
        set_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags);
+       ib_get_eth_speed(&rdev->ibdev, 1, &rdev->active_speed,
+                        &rdev->active_width);
        bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1, IB_EVENT_PORT_ACTIVE);
        bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1, IB_EVENT_GID_CHANGE);
 
@@ -1255,10 +1257,14 @@ static void bnxt_re_task(struct work_struct *work)
                else if (netif_carrier_ok(rdev->netdev))
                        bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1,
                                               IB_EVENT_PORT_ACTIVE);
+               ib_get_eth_speed(&rdev->ibdev, 1, &rdev->active_speed,
+                                &rdev->active_width);
                break;
        default:
                break;
        }
+       smp_mb__before_atomic();
+       clear_bit(BNXT_RE_FLAG_TASK_IN_PROG, &rdev->flags);
        kfree(re_work);
 }
 
@@ -1317,6 +1323,11 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier,
                break;
 
        case NETDEV_UNREGISTER:
+               /* netdev notifier will call NETDEV_UNREGISTER again later since
+                * we are still holding the reference to the netdev
+                */
+               if (test_bit(BNXT_RE_FLAG_TASK_IN_PROG, &rdev->flags))
+                       goto exit;
                bnxt_re_ib_unreg(rdev, false);
                bnxt_re_remove_one(rdev);
                bnxt_re_dev_unreg(rdev);
@@ -1335,6 +1346,7 @@ static int bnxt_re_netdev_event(struct notifier_block *notifier,
                        re_work->vlan_dev = (real_dev == netdev ?
                                             NULL : netdev);
                        INIT_WORK(&re_work->work, bnxt_re_task);
+                       set_bit(BNXT_RE_FLAG_TASK_IN_PROG, &rdev->flags);
                        queue_work(bnxt_re_wq, &re_work->work);
                }
        }
@@ -1375,6 +1387,22 @@ err_netdev:
 
 static void __exit bnxt_re_mod_exit(void)
 {
+       struct bnxt_re_dev *rdev;
+       LIST_HEAD(to_be_deleted);
+
+       mutex_lock(&bnxt_re_dev_lock);
+       /* Free all adapter allocated resources */
+       if (!list_empty(&bnxt_re_dev_list))
+               list_splice_init(&bnxt_re_dev_list, &to_be_deleted);
+       mutex_unlock(&bnxt_re_dev_lock);
+
+       list_for_each_entry(rdev, &to_be_deleted, list) {
+               dev_info(rdev_to_dev(rdev), "Unregistering Device");
+               bnxt_re_dev_stop(rdev);
+               bnxt_re_ib_unreg(rdev, true);
+               bnxt_re_remove_one(rdev);
+               bnxt_re_dev_unreg(rdev);
+       }
        unregister_netdevice_notifier(&bnxt_re_netdev_notifier);
        if (bnxt_re_wq)
                destroy_workqueue(bnxt_re_wq);
index 391bb7006e8ffb5fe42175e662c3b80c87d74f35..2bdb1562bd2197e850f14bcc353d6ee12c3271c4 100644 (file)
@@ -107,6 +107,9 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
                return -EINVAL;
        }
 
+       if (test_bit(FIRMWARE_TIMED_OUT, &rcfw->flags))
+               return -ETIMEDOUT;
+
        /* Cmdq are in 16-byte units, each request can consume 1 or more
         * cmdqe
         */
@@ -226,6 +229,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
                /* timed out */
                dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x timedout (%d)msec",
                        cookie, opcode, RCFW_CMD_WAIT_TIME_MS);
+               set_bit(FIRMWARE_TIMED_OUT, &rcfw->flags);
                return rc;
        }
 
index 0ed312f17c8de8025feea00fdd47feb063d65aa5..85b16da287f99edfee396fcdaa11ccef1c7c8d3b 100644 (file)
@@ -162,8 +162,9 @@ struct bnxt_qplib_rcfw {
        unsigned long           *cmdq_bitmap;
        u32                     bmap_size;
        unsigned long           flags;
-#define FIRMWARE_INITIALIZED_FLAG      1
+#define FIRMWARE_INITIALIZED_FLAG      BIT(0)
 #define FIRMWARE_FIRST_FLAG            BIT(31)
+#define FIRMWARE_TIMED_OUT             BIT(3)
        wait_queue_head_t       waitq;
        int                     (*aeq_handler)(struct bnxt_qplib_rcfw *,
                                               struct creq_func_event *);
index 2761364185af203d1dad8174d450bb44d3d0260b..2c66d35d19bd40255dfae6acca982668c83ed550 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb3
 
 obj-$(CONFIG_INFINIBAND_CXGB3) += iw_cxgb3.o
index ceaa2fa54d322d2c9368576602a8d47e448527d0..daf7a56e5d7ebe4a7b6dffd93245d5a1655b3805 100644 (file)
@@ -2333,9 +2333,14 @@ static int close_listsrv_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
        unsigned int stid = GET_TID(rpl);
        struct c4iw_listen_ep *ep = get_ep_from_stid(dev, stid);
 
+       if (!ep) {
+               pr_debug("%s stid %d lookup failure!\n", __func__, stid);
+               goto out;
+       }
        pr_debug("%s ep %p\n", __func__, ep);
        c4iw_wake_up(&ep->com.wr_wait, status2errno(rpl->status));
        c4iw_put_ep(&ep->com);
+out:
        return 0;
 }
 
@@ -2594,9 +2599,9 @@ fail:
        c4iw_put_ep(&child_ep->com);
 reject:
        reject_cr(dev, hwtid, skb);
+out:
        if (parent_ep)
                c4iw_put_ep(&parent_ep->com);
-out:
        return 0;
 }
 
@@ -3457,7 +3462,7 @@ int c4iw_create_listen(struct iw_cm_id *cm_id, int backlog)
                cm_id->provider_data = ep;
                goto out;
        }
-
+       remove_handle(ep->com.dev, &ep->com.dev->stid_idr, ep->stid);
        cxgb4_free_stid(ep->com.dev->rdev.lldi.tids, ep->stid,
                        ep->com.local_addr.ss_family);
 fail2:
index 66d538c033b0133a801205c350a928c899a40407..ce4010bad9828f1ca160c385eda8eac37d895fe7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # HFI driver
 #
index b2ed4b9cda6eef62f81b5ac22b71b4cc3a5a2d10..0be42787759fa78c73d0e0d9776209c2362a3ddc 100644 (file)
@@ -1066,6 +1066,8 @@ static int read_idle_sma(struct hfi1_devdata *dd, u64 *data);
 static int thermal_init(struct hfi1_devdata *dd);
 
 static void update_statusp(struct hfi1_pportdata *ppd, u32 state);
+static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd,
+                                           int msecs);
 static int wait_logical_linkstate(struct hfi1_pportdata *ppd, u32 state,
                                  int msecs);
 static void log_state_transition(struct hfi1_pportdata *ppd, u32 state);
@@ -8238,6 +8240,7 @@ static irqreturn_t general_interrupt(int irq, void *data)
        u64 regs[CCE_NUM_INT_CSRS];
        u32 bit;
        int i;
+       irqreturn_t handled = IRQ_NONE;
 
        this_cpu_inc(*dd->int_counter);
 
@@ -8258,9 +8261,10 @@ static irqreturn_t general_interrupt(int irq, void *data)
        for_each_set_bit(bit, (unsigned long *)&regs[0],
                         CCE_NUM_INT_CSRS * 64) {
                is_interrupt(dd, bit);
+               handled = IRQ_HANDLED;
        }
 
-       return IRQ_HANDLED;
+       return handled;
 }
 
 static irqreturn_t sdma_interrupt(int irq, void *data)
@@ -9413,7 +9417,7 @@ static void set_qsfp_int_n(struct hfi1_pportdata *ppd, u8 enable)
        write_csr(dd, dd->hfi1_id ? ASIC_QSFP2_MASK : ASIC_QSFP1_MASK, mask);
 }
 
-void reset_qsfp(struct hfi1_pportdata *ppd)
+int reset_qsfp(struct hfi1_pportdata *ppd)
 {
        struct hfi1_devdata *dd = ppd->dd;
        u64 mask, qsfp_mask;
@@ -9443,6 +9447,13 @@ void reset_qsfp(struct hfi1_pportdata *ppd)
         * for alarms and warnings
         */
        set_qsfp_int_n(ppd, 1);
+
+       /*
+        * After the reset, AOC transmitters are enabled by default. They need
+        * to be turned off to complete the QSFP setup before they can be
+        * enabled again.
+        */
+       return set_qsfp_tx(ppd, 0);
 }
 
 static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd,
@@ -10305,6 +10316,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
 {
        struct hfi1_devdata *dd = ppd->dd;
        u32 previous_state;
+       int offline_state_ret;
        int ret;
 
        update_lcb_cache(dd);
@@ -10326,28 +10338,11 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
                ppd->offline_disabled_reason =
                HFI1_ODR_MASK(OPA_LINKDOWN_REASON_TRANSIENT);
 
-       /*
-        * Wait for offline transition. It can take a while for
-        * the link to go down.
-        */
-       ret = wait_physical_linkstate(ppd, PLS_OFFLINE, 10000);
-       if (ret < 0)
-               return ret;
-
-       /*
-        * Now in charge of LCB - must be after the physical state is
-        * offline.quiet and before host_link_state is changed.
-        */
-       set_host_lcb_access(dd);
-       write_csr(dd, DC_LCB_ERR_EN, ~0ull); /* watch LCB errors */
-
-       /* make sure the logical state is also down */
-       ret = wait_logical_linkstate(ppd, IB_PORT_DOWN, 1000);
-       if (ret)
-               force_logical_link_state_down(ppd);
-
-       ppd->host_link_state = HLS_LINK_COOLDOWN; /* LCB access allowed */
+       offline_state_ret = wait_phys_link_offline_substates(ppd, 10000);
+       if (offline_state_ret < 0)
+               return offline_state_ret;
 
+       /* Disabling AOC transmitters */
        if (ppd->port_type == PORT_TYPE_QSFP &&
            ppd->qsfp_info.limiting_active &&
            qsfp_mod_present(ppd)) {
@@ -10364,6 +10359,30 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
                }
        }
 
+       /*
+        * Wait for the offline.Quiet transition if it hasn't happened yet. It
+        * can take a while for the link to go down.
+        */
+       if (offline_state_ret != PLS_OFFLINE_QUIET) {
+               ret = wait_physical_linkstate(ppd, PLS_OFFLINE, 30000);
+               if (ret < 0)
+                       return ret;
+       }
+
+       /*
+        * Now in charge of LCB - must be after the physical state is
+        * offline.quiet and before host_link_state is changed.
+        */
+       set_host_lcb_access(dd);
+       write_csr(dd, DC_LCB_ERR_EN, ~0ull); /* watch LCB errors */
+
+       /* make sure the logical state is also down */
+       ret = wait_logical_linkstate(ppd, IB_PORT_DOWN, 1000);
+       if (ret)
+               force_logical_link_state_down(ppd);
+
+       ppd->host_link_state = HLS_LINK_COOLDOWN; /* LCB access allowed */
+
        /*
         * The LNI has a mandatory wait time after the physical state
         * moves to Offline.Quiet.  The wait time may be different
@@ -10396,6 +10415,9 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
                        & (HLS_DN_POLL | HLS_VERIFY_CAP | HLS_GOING_UP)) {
                /* went down while attempting link up */
                check_lni_states(ppd);
+
+               /* The QSFP doesn't need to be reset on LNI failure */
+               ppd->qsfp_info.reset_needed = 0;
        }
 
        /* the active link width (downgrade) is 0 on link down */
@@ -12804,6 +12826,39 @@ static int wait_physical_linkstate(struct hfi1_pportdata *ppd, u32 state,
        return 0;
 }
 
+/*
+ * wait_phys_link_offline_quiet_substates - wait for any offline substate
+ * @ppd: port device
+ * @msecs: the number of milliseconds to wait
+ *
+ * Wait up to msecs milliseconds for any offline physical link
+ * state change to occur.
+ * Returns 0 if at least one state is reached, otherwise -ETIMEDOUT.
+ */
+static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd,
+                                           int msecs)
+{
+       u32 read_state;
+       unsigned long timeout;
+
+       timeout = jiffies + msecs_to_jiffies(msecs);
+       while (1) {
+               read_state = read_physical_state(ppd->dd);
+               if ((read_state & 0xF0) == PLS_OFFLINE)
+                       break;
+               if (time_after(jiffies, timeout)) {
+                       dd_dev_err(ppd->dd,
+                                  "timeout waiting for phy link offline.quiet substates. Read state 0x%x, %dms\n",
+                                  read_state, msecs);
+                       return -ETIMEDOUT;
+               }
+               usleep_range(1950, 2050); /* sleep 2ms-ish */
+       }
+
+       log_state_transition(ppd, read_state);
+       return read_state;
+}
+
 #define CLEAR_STATIC_RATE_CONTROL_SMASK(r) \
 (r &= ~SEND_CTXT_CHECK_ENABLE_DISALLOW_PBC_STATIC_RATE_CONTROL_SMASK)
 
index b8345a60a0fbc452215dba3c679daa6785fb4e4a..50b8645d0b876dbf6d58f56d677e3cfcc7984e55 100644 (file)
 #define PLS_OFFLINE_READY_TO_QUIET_LT     0x92
 #define PLS_OFFLINE_REPORT_FAILURE                0x93
 #define PLS_OFFLINE_READY_TO_QUIET_BCC    0x94
+#define PLS_OFFLINE_QUIET_DURATION        0x95
 #define PLS_POLLING                               0x20
 #define PLS_POLLING_QUIET                         0x20
 #define PLS_POLLING_ACTIVE                        0x21
@@ -722,7 +723,7 @@ void handle_link_downgrade(struct work_struct *work);
 void handle_link_bounce(struct work_struct *work);
 void handle_start_link(struct work_struct *work);
 void handle_sma_message(struct work_struct *work);
-void reset_qsfp(struct hfi1_pportdata *ppd);
+int reset_qsfp(struct hfi1_pportdata *ppd);
 void qsfp_event(struct work_struct *work);
 void start_freeze_handling(struct hfi1_pportdata *ppd, int flags);
 int send_idle_sma(struct hfi1_devdata *dd, u64 message);
index d46b171079010d2cf7e42dd7557f0abc2bef1348..1613af1c58d9ddaafca831b1282a6462fdc10b66 100644 (file)
@@ -204,7 +204,10 @@ done_asic:
        return ret;
 }
 
-/* magic character sequence that trails an image */
+/* magic character sequence that begins an image */
+#define IMAGE_START_MAGIC "APO="
+
+/* magic character sequence that might trail an image */
 #define IMAGE_TRAIL_MAGIC "egamiAPO"
 
 /* EPROM file types */
@@ -250,6 +253,7 @@ static int read_partition_platform_config(struct hfi1_devdata *dd, void **data,
 {
        void *buffer;
        void *p;
+       u32 length;
        int ret;
 
        buffer = kmalloc(P1_SIZE, GFP_KERNEL);
@@ -262,15 +266,21 @@ static int read_partition_platform_config(struct hfi1_devdata *dd, void **data,
                return ret;
        }
 
-       /* scan for image magic that may trail the actual data */
-       p = strnstr(buffer, IMAGE_TRAIL_MAGIC, P1_SIZE);
-       if (!p) {
+       /* config partition is valid only if it starts with IMAGE_START_MAGIC */
+       if (memcmp(buffer, IMAGE_START_MAGIC, strlen(IMAGE_START_MAGIC))) {
                kfree(buffer);
                return -ENOENT;
        }
 
+       /* scan for image magic that may trail the actual data */
+       p = strnstr(buffer, IMAGE_TRAIL_MAGIC, P1_SIZE);
+       if (p)
+               length = p - buffer;
+       else
+               length = P1_SIZE;
+
        *data = buffer;
-       *size = p - buffer;
+       *size = length;
        return 0;
 }
 
index 2bc89260235a1db1c744931cde7ec07fd3202495..d9a1e989313641b06f32ffdd4677ce8aa7e32802 100644 (file)
@@ -930,15 +930,8 @@ static int assign_ctxt(struct hfi1_filedata *fd, struct hfi1_user_info *uinfo)
        switch (ret) {
        case 0:
                ret = setup_base_ctxt(fd, uctxt);
-               if (uctxt->subctxt_cnt) {
-                       /*
-                        * Base context is done (successfully or not), notify
-                        * anybody using a sub-context that is waiting for
-                        * this completion.
-                        */
-                       clear_bit(HFI1_CTXT_BASE_UNINIT, &uctxt->event_flags);
-                       wake_up(&uctxt->wait);
-               }
+               if (ret)
+                       deallocate_ctxt(uctxt);
                break;
        case 1:
                ret = complete_subctxt(fd);
@@ -1305,25 +1298,25 @@ static int setup_base_ctxt(struct hfi1_filedata *fd,
        /* Now allocate the RcvHdr queue and eager buffers. */
        ret = hfi1_create_rcvhdrq(dd, uctxt);
        if (ret)
-               return ret;
+               goto done;
 
        ret = hfi1_setup_eagerbufs(uctxt);
        if (ret)
-               goto setup_failed;
+               goto done;
 
        /* If sub-contexts are enabled, do the appropriate setup */
        if (uctxt->subctxt_cnt)
                ret = setup_subctxt(uctxt);
        if (ret)
-               goto setup_failed;
+               goto done;
 
        ret = hfi1_alloc_ctxt_rcv_groups(uctxt);
        if (ret)
-               goto setup_failed;
+               goto done;
 
        ret = init_user_ctxt(fd, uctxt);
        if (ret)
-               goto setup_failed;
+               goto done;
 
        user_init(uctxt);
 
@@ -1331,12 +1324,22 @@ static int setup_base_ctxt(struct hfi1_filedata *fd,
        fd->uctxt = uctxt;
        hfi1_rcd_get(uctxt);
 
-       return 0;
+done:
+       if (uctxt->subctxt_cnt) {
+               /*
+                * On error, set the failed bit so sub-contexts will clean up
+                * correctly.
+                */
+               if (ret)
+                       set_bit(HFI1_CTXT_BASE_FAILED, &uctxt->event_flags);
 
-setup_failed:
-       /* Set the failed bit so sub-context init can do the right thing */
-       set_bit(HFI1_CTXT_BASE_FAILED, &uctxt->event_flags);
-       deallocate_ctxt(uctxt);
+               /*
+                * Base context is done (successfully or not), notify anybody
+                * using a sub-context that is waiting for this completion.
+                */
+               clear_bit(HFI1_CTXT_BASE_UNINIT, &uctxt->event_flags);
+               wake_up(&uctxt->wait);
+       }
 
        return ret;
 }
index 82447b7cdda1e958d7e7c42c3447ec4a72c1fb4a..09e50fd2a08f07bf7b2d42d3d4b4a1a00644b2ce 100644 (file)
@@ -68,7 +68,7 @@
 /*
  * Code to adjust PCIe capabilities.
  */
-static int tune_pcie_caps(struct hfi1_devdata *);
+static void tune_pcie_caps(struct hfi1_devdata *);
 
 /*
  * Do all the common PCIe setup and initialization.
@@ -351,7 +351,7 @@ int pcie_speeds(struct hfi1_devdata *dd)
  */
 int request_msix(struct hfi1_devdata *dd, u32 msireq)
 {
-       int nvec, ret;
+       int nvec;
 
        nvec = pci_alloc_irq_vectors(dd->pcidev, 1, msireq,
                                     PCI_IRQ_MSIX | PCI_IRQ_LEGACY);
@@ -360,12 +360,7 @@ int request_msix(struct hfi1_devdata *dd, u32 msireq)
                return nvec;
        }
 
-       ret = tune_pcie_caps(dd);
-       if (ret) {
-               dd_dev_err(dd, "tune_pcie_caps() failed: %d\n", ret);
-               pci_free_irq_vectors(dd->pcidev);
-               return ret;
-       }
+       tune_pcie_caps(dd);
 
        /* check for legacy IRQ */
        if (nvec == 1 && !dd->pcidev->msix_enabled)
@@ -502,7 +497,7 @@ uint aspm_mode = ASPM_MODE_DISABLED;
 module_param_named(aspm, aspm_mode, uint, S_IRUGO);
 MODULE_PARM_DESC(aspm, "PCIe ASPM: 0: disable, 1: enable, 2: dynamic");
 
-static int tune_pcie_caps(struct hfi1_devdata *dd)
+static void tune_pcie_caps(struct hfi1_devdata *dd)
 {
        struct pci_dev *parent;
        u16 rc_mpss, rc_mps, ep_mpss, ep_mps;
@@ -513,22 +508,14 @@ static int tune_pcie_caps(struct hfi1_devdata *dd)
         * Turn on extended tags in DevCtl in case the BIOS has turned it off
         * to improve WFR SDMA bandwidth
         */
-       ret = pcie_capability_read_word(dd->pcidev,
-                                       PCI_EXP_DEVCTL, &ectl);
-       if (ret) {
-               dd_dev_err(dd, "Unable to read from PCI config\n");
-               return ret;
-       }
-
-       if (!(ectl & PCI_EXP_DEVCTL_EXT_TAG)) {
+       ret = pcie_capability_read_word(dd->pcidev, PCI_EXP_DEVCTL, &ectl);
+       if ((!ret) && !(ectl & PCI_EXP_DEVCTL_EXT_TAG)) {
                dd_dev_info(dd, "Enabling PCIe extended tags\n");
                ectl |= PCI_EXP_DEVCTL_EXT_TAG;
                ret = pcie_capability_write_word(dd->pcidev,
                                                 PCI_EXP_DEVCTL, ectl);
-               if (ret) {
-                       dd_dev_err(dd, "Unable to write to PCI config\n");
-                       return ret;
-               }
+               if (ret)
+                       dd_dev_info(dd, "Unable to write to PCI config\n");
        }
        /* Find out supported and configured values for parent (root) */
        parent = dd->pcidev->bus->self;
@@ -536,15 +523,22 @@ static int tune_pcie_caps(struct hfi1_devdata *dd)
         * The driver cannot perform the tuning if it does not have
         * access to the upstream component.
         */
-       if (!parent)
-               return -EINVAL;
+       if (!parent) {
+               dd_dev_info(dd, "Parent not found\n");
+               return;
+       }
        if (!pci_is_root_bus(parent->bus)) {
                dd_dev_info(dd, "Parent not root\n");
-               return -EINVAL;
+               return;
+       }
+       if (!pci_is_pcie(parent)) {
+               dd_dev_info(dd, "Parent is not PCI Express capable\n");
+               return;
+       }
+       if (!pci_is_pcie(dd->pcidev)) {
+               dd_dev_info(dd, "PCI device is not PCI Express capable\n");
+               return;
        }
-
-       if (!pci_is_pcie(parent) || !pci_is_pcie(dd->pcidev))
-               return -EINVAL;
        rc_mpss = parent->pcie_mpss;
        rc_mps = ffs(pcie_get_mps(parent)) - 8;
        /* Find out supported and configured values for endpoint (us) */
@@ -590,8 +584,6 @@ static int tune_pcie_caps(struct hfi1_devdata *dd)
                ep_mrrs = max_mrrs;
                pcie_set_readrq(dd->pcidev, ep_mrrs);
        }
-
-       return 0;
 }
 
 /* End of PCIe capability tuning */
index a8af96d2b1b0ae0dc5e98ae08e3b5c9b5faa50e9..d486355880cb0da37e23755e8ed49197fed90fc8 100644 (file)
@@ -790,7 +790,9 @@ static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset,
         * reuse of stale settings established in our previous pass through.
         */
        if (ppd->qsfp_info.reset_needed) {
-               reset_qsfp(ppd);
+               ret = reset_qsfp(ppd);
+               if (ret)
+                       return ret;
                refresh_qsfp_cache(ppd, &ppd->qsfp_info);
        } else {
                ppd->qsfp_info.reset_needed = 1;
index 90068c03d2177a6955dd2dfaa24837875436c1ab..5a8a7a3f28aea79b22175c96b386ee8ccfc1b8f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y :=  -Idrivers/net/ethernet/intel/i40e
 
 obj-$(CONFIG_INFINIBAND_I40IW) += i40iw.o
index 9b1566468744ed81a922188f220e7ef64629273b..a65e4cbdce2f6ad336d58a226e84ac35fc7f7eda 100644 (file)
@@ -201,7 +201,6 @@ enum init_completion_state {
        CEQ_CREATED,
        ILQ_CREATED,
        IEQ_CREATED,
-       INET_NOTIFIER,
        IP_ADDR_REGISTERED,
        RDMA_DEV_REGISTERED
 };
index 14f36ba4e5bebf8e35970c9cc5b6030c95ffa213..5230dd3c938c2c506bc590afd8ef054d300ac480 100644 (file)
@@ -1504,23 +1504,40 @@ static void i40iw_add_hte_node(struct i40iw_cm_core *cm_core,
 }
 
 /**
- * listen_port_in_use - determine if port is in use
- * @port: Listen port number
+ * i40iw_port_in_use - determine if port is in use
+ * @port: port number
+ * @active_side: flag for listener side vs active side
  */
-static bool i40iw_listen_port_in_use(struct i40iw_cm_core *cm_core, u16 port)
+static bool i40iw_port_in_use(struct i40iw_cm_core *cm_core, u16 port, bool active_side)
 {
        struct i40iw_cm_listener *listen_node;
+       struct i40iw_cm_node *cm_node;
        unsigned long flags;
        bool ret = false;
 
-       spin_lock_irqsave(&cm_core->listen_list_lock, flags);
-       list_for_each_entry(listen_node, &cm_core->listen_nodes, list) {
-               if (listen_node->loc_port == port) {
-                       ret = true;
-                       break;
+       if (active_side) {
+               /* search connected node list */
+               spin_lock_irqsave(&cm_core->ht_lock, flags);
+               list_for_each_entry(cm_node, &cm_core->connected_nodes, list) {
+                       if (cm_node->loc_port == port) {
+                               ret = true;
+                               break;
+                       }
+               }
+                       if (!ret)
+                               clear_bit(port, cm_core->active_side_ports);
+               spin_unlock_irqrestore(&cm_core->ht_lock, flags);
+       } else {
+               spin_lock_irqsave(&cm_core->listen_list_lock, flags);
+               list_for_each_entry(listen_node, &cm_core->listen_nodes, list) {
+                       if (listen_node->loc_port == port) {
+                               ret = true;
+                               break;
+                       }
                }
+               spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
        }
-       spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
+
        return ret;
 }
 
@@ -1868,7 +1885,7 @@ static int i40iw_dec_refcnt_listen(struct i40iw_cm_core *cm_core,
                spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
 
                if (listener->iwdev) {
-                       if (apbvt_del && !i40iw_listen_port_in_use(cm_core, listener->loc_port))
+                       if (apbvt_del && !i40iw_port_in_use(cm_core, listener->loc_port, false))
                                i40iw_manage_apbvt(listener->iwdev,
                                                   listener->loc_port,
                                                   I40IW_MANAGE_APBVT_DEL);
@@ -2247,21 +2264,21 @@ static void i40iw_rem_ref_cm_node(struct i40iw_cm_node *cm_node)
        if (cm_node->listener) {
                i40iw_dec_refcnt_listen(cm_core, cm_node->listener, 0, true);
        } else {
-               if (!i40iw_listen_port_in_use(cm_core, cm_node->loc_port) &&
-                   cm_node->apbvt_set) {
+               if (!i40iw_port_in_use(cm_core, cm_node->loc_port, true) && cm_node->apbvt_set) {
                        i40iw_manage_apbvt(cm_node->iwdev,
                                           cm_node->loc_port,
                                           I40IW_MANAGE_APBVT_DEL);
-                       i40iw_get_addr_info(cm_node, &nfo);
-                       if (cm_node->qhash_set) {
-                               i40iw_manage_qhash(cm_node->iwdev,
-                                                  &nfo,
-                                                  I40IW_QHASH_TYPE_TCP_ESTABLISHED,
-                                                  I40IW_QHASH_MANAGE_TYPE_DELETE,
-                                                  NULL,
-                                                  false);
-                               cm_node->qhash_set = 0;
-                       }
+                       cm_node->apbvt_set = 0;
+               }
+               i40iw_get_addr_info(cm_node, &nfo);
+               if (cm_node->qhash_set) {
+                       i40iw_manage_qhash(cm_node->iwdev,
+                                          &nfo,
+                                          I40IW_QHASH_TYPE_TCP_ESTABLISHED,
+                                          I40IW_QHASH_MANAGE_TYPE_DELETE,
+                                          NULL,
+                                          false);
+                       cm_node->qhash_set = 0;
                }
        }
 
@@ -3255,7 +3272,8 @@ static void i40iw_init_tcp_ctx(struct i40iw_cm_node *cm_node,
        tcp_info->snd_mss = cpu_to_le32(((u32)cm_node->tcp_cntxt.mss));
        if (cm_node->vlan_id < VLAN_TAG_PRESENT) {
                tcp_info->insert_vlan_tag = true;
-               tcp_info->vlan_tag = cpu_to_le16(cm_node->vlan_id);
+               tcp_info->vlan_tag = cpu_to_le16(((u16)cm_node->user_pri << I40IW_VLAN_PRIO_SHIFT) |
+                                                 cm_node->vlan_id);
        }
        if (cm_node->ipv4) {
                tcp_info->src_port = cpu_to_le16(cm_node->loc_port);
@@ -3737,10 +3755,8 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
        struct sockaddr_in *raddr;
        struct sockaddr_in6 *laddr6;
        struct sockaddr_in6 *raddr6;
-       bool qhash_set = false;
-       int apbvt_set = 0;
-       int err = 0;
-       enum i40iw_status_code status;
+       int ret = 0;
+       unsigned long flags;
 
        ibqp = i40iw_get_qp(cm_id->device, conn_param->qpn);
        if (!ibqp)
@@ -3789,32 +3805,6 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
        cm_info.user_pri = rt_tos2priority(cm_id->tos);
        i40iw_debug(&iwdev->sc_dev, I40IW_DEBUG_DCB, "%s TOS:[%d] UP:[%d]\n",
                    __func__, cm_id->tos, cm_info.user_pri);
-       if ((cm_info.ipv4 && (laddr->sin_addr.s_addr != raddr->sin_addr.s_addr)) ||
-           (!cm_info.ipv4 && memcmp(laddr6->sin6_addr.in6_u.u6_addr32,
-                                    raddr6->sin6_addr.in6_u.u6_addr32,
-                                    sizeof(laddr6->sin6_addr.in6_u.u6_addr32)))) {
-               status = i40iw_manage_qhash(iwdev,
-                                           &cm_info,
-                                           I40IW_QHASH_TYPE_TCP_ESTABLISHED,
-                                           I40IW_QHASH_MANAGE_TYPE_ADD,
-                                           NULL,
-                                           true);
-               if (status)
-                       return -EINVAL;
-               qhash_set = true;
-       }
-       status = i40iw_manage_apbvt(iwdev, cm_info.loc_port, I40IW_MANAGE_APBVT_ADD);
-       if (status) {
-               i40iw_manage_qhash(iwdev,
-                                  &cm_info,
-                                  I40IW_QHASH_TYPE_TCP_ESTABLISHED,
-                                  I40IW_QHASH_MANAGE_TYPE_DELETE,
-                                  NULL,
-                                  false);
-               return -EINVAL;
-       }
-
-       apbvt_set = 1;
        cm_id->add_ref(cm_id);
        cm_node = i40iw_create_cm_node(&iwdev->cm_core, iwdev,
                                       conn_param->private_data_len,
@@ -3822,17 +3812,40 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                                       &cm_info);
 
        if (IS_ERR(cm_node)) {
-               err = PTR_ERR(cm_node);
-               goto err_out;
+               ret = PTR_ERR(cm_node);
+               cm_id->rem_ref(cm_id);
+               return ret;
+       }
+
+       if ((cm_info.ipv4 && (laddr->sin_addr.s_addr != raddr->sin_addr.s_addr)) ||
+           (!cm_info.ipv4 && memcmp(laddr6->sin6_addr.in6_u.u6_addr32,
+                                    raddr6->sin6_addr.in6_u.u6_addr32,
+                                    sizeof(laddr6->sin6_addr.in6_u.u6_addr32)))) {
+               if (i40iw_manage_qhash(iwdev, &cm_info, I40IW_QHASH_TYPE_TCP_ESTABLISHED,
+                                      I40IW_QHASH_MANAGE_TYPE_ADD, NULL, true)) {
+                       ret = -EINVAL;
+                       goto err;
+               }
+               cm_node->qhash_set = true;
        }
 
+       spin_lock_irqsave(&iwdev->cm_core.ht_lock, flags);
+       if (!test_and_set_bit(cm_info.loc_port, iwdev->cm_core.active_side_ports)) {
+               spin_unlock_irqrestore(&iwdev->cm_core.ht_lock, flags);
+               if (i40iw_manage_apbvt(iwdev, cm_info.loc_port, I40IW_MANAGE_APBVT_ADD)) {
+                       ret =  -EINVAL;
+                       goto err;
+               }
+       } else {
+               spin_unlock_irqrestore(&iwdev->cm_core.ht_lock, flags);
+       }
+
+       cm_node->apbvt_set = true;
        i40iw_record_ird_ord(cm_node, (u16)conn_param->ird, (u16)conn_param->ord);
        if (cm_node->send_rdma0_op == SEND_RDMA_READ_ZERO &&
            !cm_node->ord_size)
                cm_node->ord_size = 1;
 
-       cm_node->apbvt_set = apbvt_set;
-       cm_node->qhash_set = qhash_set;
        iwqp->cm_node = cm_node;
        cm_node->iwqp = iwqp;
        iwqp->cm_id = cm_id;
@@ -3840,11 +3853,9 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
        if (cm_node->state != I40IW_CM_STATE_OFFLOADED) {
                cm_node->state = I40IW_CM_STATE_SYN_SENT;
-               err = i40iw_send_syn(cm_node, 0);
-               if (err) {
-                       i40iw_rem_ref_cm_node(cm_node);
-                       goto err_out;
-               }
+               ret = i40iw_send_syn(cm_node, 0);
+               if (ret)
+                       goto err;
        }
 
        i40iw_debug(cm_node->dev,
@@ -3853,9 +3864,10 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
                    cm_node->rem_port,
                    cm_node,
                    cm_node->cm_id);
+
        return 0;
 
-err_out:
+err:
        if (cm_info.ipv4)
                i40iw_debug(&iwdev->sc_dev,
                            I40IW_DEBUG_CM,
@@ -3867,22 +3879,10 @@ err_out:
                            "Api - connect() FAILED: dest addr=%pI6",
                            cm_info.rem_addr);
 
-       if (qhash_set)
-               i40iw_manage_qhash(iwdev,
-                                  &cm_info,
-                                  I40IW_QHASH_TYPE_TCP_ESTABLISHED,
-                                  I40IW_QHASH_MANAGE_TYPE_DELETE,
-                                  NULL,
-                                  false);
-
-       if (apbvt_set && !i40iw_listen_port_in_use(&iwdev->cm_core,
-                                                  cm_info.loc_port))
-               i40iw_manage_apbvt(iwdev,
-                                  cm_info.loc_port,
-                                  I40IW_MANAGE_APBVT_DEL);
+       i40iw_rem_ref_cm_node(cm_node);
        cm_id->rem_ref(cm_id);
        iwdev->cm_core.stats_connect_errs++;
-       return err;
+       return ret;
 }
 
 /**
index 2e52e38ffcf37cf5673868f873536907dddc2cf1..45abef76295b24429accdce4e7a49d91dbc33cce 100644 (file)
@@ -71,6 +71,9 @@
 #define        I40IW_HW_IRD_SETTING_32 32
 #define        I40IW_HW_IRD_SETTING_64 64
 
+#define MAX_PORTS              65536
+#define I40IW_VLAN_PRIO_SHIFT   13
+
 enum ietf_mpa_flags {
        IETF_MPA_FLAGS_MARKERS = 0x80,  /* receive Markers */
        IETF_MPA_FLAGS_CRC = 0x40,      /* receive Markers */
@@ -411,6 +414,8 @@ struct i40iw_cm_core {
        spinlock_t ht_lock; /* manage hash table */
        spinlock_t listen_list_lock; /* listen list */
 
+       unsigned long active_side_ports[BITS_TO_LONGS(MAX_PORTS)];
+
        u64     stats_nodes_created;
        u64     stats_nodes_destroyed;
        u64     stats_listen_created;
index d1f5345f04f08eb916539162b024f7b59e9b9a94..42ca5346777ddfc4a5d433daf61146ed428fc424 100644 (file)
@@ -48,7 +48,7 @@
  * @wqe: cqp wqe for header
  * @header: header for the cqp wqe
  */
-static inline void i40iw_insert_wqe_hdr(u64 *wqe, u64 header)
+void i40iw_insert_wqe_hdr(u64 *wqe, u64 header)
 {
        wmb();            /* make sure WQE is populated before polarity is set */
        set_64bit_val(wqe, 24, header);
index cc742c3132c6f49afa38282a9f694e2fa68385f7..27590ae21881e91508bc0eb88308e97a7693f094 100644 (file)
@@ -99,8 +99,6 @@ static struct notifier_block i40iw_net_notifier = {
        .notifier_call = i40iw_net_event
 };
 
-static atomic_t i40iw_notifiers_registered;
-
 /**
  * i40iw_find_i40e_handler - find a handler given a client info
  * @ldev: pointer to a client info
@@ -1376,11 +1374,20 @@ error:
  */
 static void i40iw_register_notifiers(void)
 {
-       if (atomic_inc_return(&i40iw_notifiers_registered) == 1) {
-               register_inetaddr_notifier(&i40iw_inetaddr_notifier);
-               register_inet6addr_notifier(&i40iw_inetaddr6_notifier);
-               register_netevent_notifier(&i40iw_net_notifier);
-       }
+       register_inetaddr_notifier(&i40iw_inetaddr_notifier);
+       register_inet6addr_notifier(&i40iw_inetaddr6_notifier);
+       register_netevent_notifier(&i40iw_net_notifier);
+}
+
+/**
+ * i40iw_unregister_notifiers - unregister tcp ip notifiers
+ */
+
+static void i40iw_unregister_notifiers(void)
+{
+       unregister_netevent_notifier(&i40iw_net_notifier);
+       unregister_inetaddr_notifier(&i40iw_inetaddr_notifier);
+       unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier);
 }
 
 /**
@@ -1400,6 +1407,11 @@ static enum i40iw_status_code i40iw_save_msix_info(struct i40iw_device *iwdev,
        u32 i;
        u32 size;
 
+       if (!ldev->msix_count) {
+               i40iw_pr_err("No MSI-X vectors\n");
+               return I40IW_ERR_CONFIG;
+       }
+
        iwdev->msix_count = ldev->msix_count;
 
        size = sizeof(struct i40iw_msix_vector) * iwdev->msix_count;
@@ -1462,12 +1474,6 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev)
                if (!iwdev->reset)
                        i40iw_del_macip_entry(iwdev, (u8)iwdev->mac_ip_table_idx);
                /* fallthrough */
-       case INET_NOTIFIER:
-               if (!atomic_dec_return(&i40iw_notifiers_registered)) {
-                       unregister_netevent_notifier(&i40iw_net_notifier);
-                       unregister_inetaddr_notifier(&i40iw_inetaddr_notifier);
-                       unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier);
-               }
                /* fallthrough */
        case PBLE_CHUNK_MEM:
                i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc);
@@ -1550,7 +1556,7 @@ static enum i40iw_status_code i40iw_setup_init_state(struct i40iw_handler *hdl,
 
        status = i40iw_save_msix_info(iwdev, ldev);
        if (status)
-               goto exit;
+               return status;
        iwdev->hw.dev_context = (void *)ldev->pcidev;
        iwdev->hw.hw_addr = ldev->hw_addr;
        status = i40iw_allocate_dma_mem(&iwdev->hw,
@@ -1667,8 +1673,6 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client)
                        break;
                iwdev->init_state = PBLE_CHUNK_MEM;
                iwdev->virtchnl_wq = alloc_ordered_workqueue("iwvch", WQ_MEM_RECLAIM);
-               i40iw_register_notifiers();
-               iwdev->init_state = INET_NOTIFIER;
                status = i40iw_add_mac_ip(iwdev);
                if (status)
                        break;
@@ -2018,6 +2022,8 @@ static int __init i40iw_init_module(void)
        i40iw_client.type = I40E_CLIENT_IWARP;
        spin_lock_init(&i40iw_handler_lock);
        ret = i40e_register_client(&i40iw_client);
+       i40iw_register_notifiers();
+
        return ret;
 }
 
@@ -2029,6 +2035,7 @@ static int __init i40iw_init_module(void)
  */
 static void __exit i40iw_exit_module(void)
 {
+       i40iw_unregister_notifiers();
        i40e_unregister_client(&i40iw_client);
 }
 
index e217a1259f5703ac1ef1ac4d3ed70acd986e2336..5498ad01c280fde7f476778afba3669c72fcff8c 100644 (file)
@@ -59,6 +59,8 @@ enum i40iw_status_code i40iw_sc_mr_fast_register(struct i40iw_sc_qp *qp,
                                                 struct i40iw_fast_reg_stag_info *info,
                                                 bool post_sq);
 
+void i40iw_insert_wqe_hdr(u64 *wqe, u64 header);
+
 /* HMC/FPM functions */
 enum i40iw_status_code i40iw_sc_init_iw_hmc(struct i40iw_sc_dev *dev,
                                            u8 hmc_fn_id);
index c2cab20c4bc5d24e258a95bcf7d4f94f8985ced3..59f70676f0e0305ad03567192a340ecb0ef0c7a5 100644 (file)
@@ -123,12 +123,11 @@ static void i40iw_puda_post_recvbuf(struct i40iw_puda_rsrc *rsrc, u32 wqe_idx,
                get_64bit_val(wqe, 24, &offset24);
 
        offset24 = (offset24) ? 0 : LS_64(1, I40IWQPSQ_VALID);
-       set_64bit_val(wqe, 24, offset24);
 
        set_64bit_val(wqe, 0, buf->mem.pa);
        set_64bit_val(wqe, 8,
                      LS_64(buf->mem.size, I40IWQPSQ_FRAG_LEN));
-       set_64bit_val(wqe, 24, offset24);
+       i40iw_insert_wqe_hdr(wqe, offset24);
 }
 
 /**
@@ -409,9 +408,7 @@ enum i40iw_status_code i40iw_puda_send(struct i40iw_sc_qp *qp,
        set_64bit_val(wqe, 8, LS_64(info->len, I40IWQPSQ_FRAG_LEN));
        set_64bit_val(wqe, 16, header[0]);
 
-       /* Ensure all data is written before writing valid bit */
-       wmb();
-       set_64bit_val(wqe, 24, header[1]);
+       i40iw_insert_wqe_hdr(wqe, header[1]);
 
        i40iw_debug_buf(qp->dev, I40IW_DEBUG_PUDA, "PUDA SEND WQE", wqe, 32);
        i40iw_qp_post_wr(&qp->qp_uk);
@@ -539,7 +536,7 @@ static enum i40iw_status_code i40iw_puda_qp_wqe(struct i40iw_sc_dev *dev, struct
                 LS_64(2, I40IW_CQPSQ_QP_NEXTIWSTATE) |
                 LS_64(cqp->polarity, I40IW_CQPSQ_WQEVALID);
 
-       set_64bit_val(wqe, 24, header);
+       i40iw_insert_wqe_hdr(wqe, header);
 
        i40iw_debug_buf(cqp->dev, I40IW_DEBUG_PUDA, "PUDA CQE", wqe, 32);
        i40iw_sc_cqp_post_sq(cqp);
@@ -655,7 +652,7 @@ static enum i40iw_status_code i40iw_puda_cq_wqe(struct i40iw_sc_dev *dev, struct
            LS_64(1, I40IW_CQPSQ_CQ_ENCEQEMASK) |
            LS_64(1, I40IW_CQPSQ_CQ_CEQIDVALID) |
            LS_64(cqp->polarity, I40IW_CQPSQ_WQEVALID);
-       set_64bit_val(wqe, 24, header);
+       i40iw_insert_wqe_hdr(wqe, header);
 
        i40iw_debug_buf(dev, I40IW_DEBUG_PUDA, "PUDA CQE",
                        wqe, I40IW_CQP_WQE_SIZE * 8);
index 62f1f45b8737a4716d04d8a340ab5612ef4f1047..e52dbbb4165ec555d94eb5f55f5310c71562b387 100644 (file)
@@ -160,7 +160,7 @@ int i40iw_inetaddr_event(struct notifier_block *notifier,
                return NOTIFY_DONE;
 
        iwdev = &hdl->device;
-       if (iwdev->init_state < INET_NOTIFIER)
+       if (iwdev->init_state < IP_ADDR_REGISTERED || iwdev->closing)
                return NOTIFY_DONE;
 
        netdev = iwdev->ldev->netdev;
@@ -217,7 +217,7 @@ int i40iw_inet6addr_event(struct notifier_block *notifier,
                return NOTIFY_DONE;
 
        iwdev = &hdl->device;
-       if (iwdev->init_state < INET_NOTIFIER)
+       if (iwdev->init_state < IP_ADDR_REGISTERED || iwdev->closing)
                return NOTIFY_DONE;
 
        netdev = iwdev->ldev->netdev;
@@ -266,7 +266,7 @@ int i40iw_net_event(struct notifier_block *notifier, unsigned long event, void *
                if (!iwhdl)
                        return NOTIFY_DONE;
                iwdev = &iwhdl->device;
-               if (iwdev->init_state < INET_NOTIFIER)
+               if (iwdev->init_state < IP_ADDR_REGISTERED || iwdev->closing)
                        return NOTIFY_DONE;
                p = (__be32 *)neigh->primary_key;
                i40iw_copy_ip_ntohl(local_ipaddr, p);
index 1aa411034a272457ba9a0fda16761d808b38f5f8..62be0a41ad0b2ffeccb0b6e73d9a29621e4944f1 100644 (file)
@@ -826,12 +826,14 @@ static int i40iw_query_qp(struct ib_qp *ibqp,
        attr->cap.max_inline_data = I40IW_MAX_INLINE_DATA_SIZE;
        attr->cap.max_send_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
        attr->cap.max_recv_sge = I40IW_MAX_WQ_FRAGMENT_COUNT;
+       attr->port_num = 1;
        init_attr->event_handler = iwqp->ibqp.event_handler;
        init_attr->qp_context = iwqp->ibqp.qp_context;
        init_attr->send_cq = iwqp->ibqp.send_cq;
        init_attr->recv_cq = iwqp->ibqp.recv_cq;
        init_attr->srq = iwqp->ibqp.srq;
        init_attr->cap = attr->cap;
+       init_attr->port_num = 1;
        return 0;
 }
 
@@ -1027,7 +1029,19 @@ int i40iw_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
                                iwqp->hw_tcp_state = I40IW_TCP_STATE_CLOSED;
                                iwqp->last_aeq = I40IW_AE_RESET_SENT;
                                spin_unlock_irqrestore(&iwqp->lock, flags);
+                               i40iw_cm_disconn(iwqp);
                        }
+               } else {
+                       spin_lock_irqsave(&iwqp->lock, flags);
+                       if (iwqp->cm_id) {
+                               if (atomic_inc_return(&iwqp->close_timer_started) == 1) {
+                                       iwqp->cm_id->add_ref(iwqp->cm_id);
+                                       i40iw_schedule_cm_timer(iwqp->cm_node,
+                                                               (struct i40iw_puda_buf *)iwqp,
+                                                                I40IW_TIMER_TYPE_CLOSE, 1, 0);
+                               }
+                       }
+                       spin_unlock_irqrestore(&iwqp->lock, flags);
                }
        }
        return 0;
index ab3c562d5ba7f7fbfa95cb730576a64a2d038e49..552f7bd4ecc38bf17aff093fa037b423c4d0026b 100644 (file)
@@ -778,13 +778,13 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
        }
 
        if (MLX5_CAP_GEN(mdev, tag_matching)) {
-               props->xrq_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
-               props->xrq_caps.max_num_tags =
+               props->tm_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
+               props->tm_caps.max_num_tags =
                        (1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
-               props->xrq_caps.flags = IB_TM_CAP_RC;
-               props->xrq_caps.max_ops =
+               props->tm_caps.flags = IB_TM_CAP_RC;
+               props->tm_caps.max_ops =
                        1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
-               props->xrq_caps.max_sge = MLX5_TM_MAX_SGE;
+               props->tm_caps.max_sge = MLX5_TM_MAX_SGE;
        }
 
        if (field_avail(typeof(resp), cqe_comp_caps, uhw->outlen)) {
@@ -3837,11 +3837,13 @@ static int delay_drop_debugfs_init(struct mlx5_ib_dev *dev)
        if (!dbg)
                return -ENOMEM;
 
+       dev->delay_drop.dbg = dbg;
+
        dbg->dir_debugfs =
                debugfs_create_dir("delay_drop",
                                   dev->mdev->priv.dbg_root);
        if (!dbg->dir_debugfs)
-               return -ENOMEM;
+               goto out_debugfs;
 
        dbg->events_cnt_debugfs =
                debugfs_create_atomic_t("num_timeout_events", 0400,
@@ -3865,8 +3867,6 @@ static int delay_drop_debugfs_init(struct mlx5_ib_dev *dev)
        if (!dbg->timeout_debugfs)
                goto out_debugfs;
 
-       dev->delay_drop.dbg = dbg;
-
        return 0;
 
 out_debugfs:
@@ -4174,9 +4174,9 @@ err_bfreg:
 err_uar_page:
        mlx5_put_uars_page(dev->mdev, dev->mdev->priv.uar);
 
-err_cnt:
-       mlx5_ib_cleanup_cong_debugfs(dev);
 err_cong:
+       mlx5_ib_cleanup_cong_debugfs(dev);
+err_cnt:
        if (MLX5_CAP_GEN(dev->mdev, max_qp_cnt))
                mlx5_ib_dealloc_counters(dev);
 
index 914f212e7ef60652a655682a2d668c9cec19b64a..f3dbd75a0a968eade1c316e0fec9179e0012730a 100644 (file)
@@ -50,13 +50,9 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
 {
        unsigned long tmp;
        unsigned long m;
-       int i, k;
-       u64 base = 0;
-       int p = 0;
-       int skip;
-       int mask;
-       u64 len;
-       u64 pfn;
+       u64 base = ~0, p = 0;
+       u64 len, pfn;
+       int i = 0;
        struct scatterlist *sg;
        int entry;
        unsigned long page_shift = umem->page_shift;
@@ -76,33 +72,24 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr,
        m = find_first_bit(&tmp, BITS_PER_LONG);
        if (max_page_shift)
                m = min_t(unsigned long, max_page_shift - page_shift, m);
-       skip = 1 << m;
-       mask = skip - 1;
-       i = 0;
+
        for_each_sg(umem->sg_head.sgl, sg, umem->nmap, entry) {
                len = sg_dma_len(sg) >> page_shift;
                pfn = sg_dma_address(sg) >> page_shift;
-               for (k = 0; k < len; k++) {
-                       if (!(i & mask)) {
-                               tmp = (unsigned long)pfn;
-                               m = min_t(unsigned long, m, find_first_bit(&tmp, BITS_PER_LONG));
-                               skip = 1 << m;
-                               mask = skip - 1;
-                               base = pfn;
-                               p = 0;
-                       } else {
-                               if (base + p != pfn) {
-                                       tmp = (unsigned long)p;
-                                       m = find_first_bit(&tmp, BITS_PER_LONG);
-                                       skip = 1 << m;
-                                       mask = skip - 1;
-                                       base = pfn;
-                                       p = 0;
-                               }
-                       }
-                       p++;
-                       i++;
+               if (base + p != pfn) {
+                       /* If either the offset or the new
+                        * base are unaligned update m
+                        */
+                       tmp = (unsigned long)(pfn | p);
+                       if (!IS_ALIGNED(tmp, 1 << m))
+                               m = find_first_bit(&tmp, BITS_PER_LONG);
+
+                       base = pfn;
+                       p = 0;
                }
+
+               p += len;
+               i += len;
        }
 
        if (i) {
index 0e2789d9bb4d0575561aab569e227125cbc38882..37bbc543847a528f73f613df066fdbb4e36484c1 100644 (file)
@@ -47,7 +47,8 @@ enum {
 
 #define MLX5_UMR_ALIGN 2048
 
-static int clean_mr(struct mlx5_ib_mr *mr);
+static int clean_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr);
+static int dereg_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr);
 static int mr_cache_max_order(struct mlx5_ib_dev *dev);
 static int unreg_umr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr);
 
@@ -1270,8 +1271,9 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
 
                err = mlx5_ib_update_xlt(mr, 0, ncont, page_shift,
                                         update_xlt_flags);
+
                if (err) {
-                       mlx5_ib_dereg_mr(&mr->ibmr);
+                       dereg_mr(dev, mr);
                        return ERR_PTR(err);
                }
        }
@@ -1356,7 +1358,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
                err = mr_umem_get(pd, addr, len, access_flags, &mr->umem,
                                  &npages, &page_shift, &ncont, &order);
                if (err < 0) {
-                       clean_mr(mr);
+                       clean_mr(dev, mr);
                        return err;
                }
        }
@@ -1410,7 +1412,7 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
                if (err) {
                        mlx5_ib_warn(dev, "Failed to rereg UMR\n");
                        ib_umem_release(mr->umem);
-                       clean_mr(mr);
+                       clean_mr(dev, mr);
                        return err;
                }
        }
@@ -1469,9 +1471,8 @@ mlx5_free_priv_descs(struct mlx5_ib_mr *mr)
        }
 }
 
-static int clean_mr(struct mlx5_ib_mr *mr)
+static int clean_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
 {
-       struct mlx5_ib_dev *dev = to_mdev(mr->ibmr.device);
        int allocated_from_cache = mr->allocated_from_cache;
        int err;
 
@@ -1507,10 +1508,8 @@ static int clean_mr(struct mlx5_ib_mr *mr)
        return 0;
 }
 
-int mlx5_ib_dereg_mr(struct ib_mr *ibmr)
+static int dereg_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
 {
-       struct mlx5_ib_dev *dev = to_mdev(ibmr->device);
-       struct mlx5_ib_mr *mr = to_mmr(ibmr);
        int npages = mr->npages;
        struct ib_umem *umem = mr->umem;
 
@@ -1539,7 +1538,7 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr)
        }
 #endif
 
-       clean_mr(mr);
+       clean_mr(dev, mr);
 
        if (umem) {
                ib_umem_release(umem);
@@ -1549,6 +1548,14 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr)
        return 0;
 }
 
+int mlx5_ib_dereg_mr(struct ib_mr *ibmr)
+{
+       struct mlx5_ib_dev *dev = to_mdev(ibmr->device);
+       struct mlx5_ib_mr *mr = to_mmr(ibmr);
+
+       return dereg_mr(dev, mr);
+}
+
 struct ib_mr *mlx5_ib_alloc_mr(struct ib_pd *pd,
                               enum ib_mr_type mr_type,
                               u32 max_num_sg)
index e388d95d0cf1e76c6eceeb61a1b793585b26e1ff..3a09e9ffd63460342fc8202137a1af79b20cfc68 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INFINIBAND_MTHCA) += ib_mthca.o
 
 ib_mthca-y :=  mthca_main.o mthca_cmd.o mthca_profile.o mthca_reset.o \
index f0dc5f4aa177e26d622574ec638368fcb7d988cf..442b9bdc0f03bc70d955700e51703b14676b1661 100644 (file)
@@ -3232,7 +3232,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
                                            mr->ibmr.iova);
                        set_wqe_32bit_value(wqe->wqe_words,
                                            NES_IWARP_SQ_FMR_WQE_LENGTH_LOW_IDX,
-                                           mr->ibmr.length);
+                                           lower_32_bits(mr->ibmr.length));
                        set_wqe_32bit_value(wqe->wqe_words,
                                            NES_IWARP_SQ_FMR_WQE_LENGTH_HIGH_IDX, 0);
                        set_wqe_32bit_value(wqe->wqe_words,
@@ -3274,7 +3274,7 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
                                            mr->npages * 8);
 
                        nes_debug(NES_DBG_IW_TX, "SQ_REG_MR: iova_start: %llx, "
-                                 "length: %d, rkey: %0x, pgl_paddr: %llx, "
+                                 "length: %lld, rkey: %0x, pgl_paddr: %llx, "
                                  "page_list_len: %u, wqe_misc: %x\n",
                                  (unsigned long long) mr->ibmr.iova,
                                  mr->ibmr.length,
index dcb5942f9fb5a830f37e1757dd64cc0d836523b9..65b166cc743748fde5f89153dd96ed1950abb762 100644 (file)
@@ -252,7 +252,10 @@ static int ocrdma_get_mbx_errno(u32 status)
                case OCRDMA_MBX_ADDI_STATUS_INSUFFICIENT_RESOURCES:
                        err_num = -EAGAIN;
                        break;
+               default:
+                       err_num = -EFAULT;
                }
+               break;
        default:
                err_num = -EFAULT;
        }
index b2bb42e2805ddfb220b7033620d988e0877f3d6a..254083b524bd90e1557f69b91949b9dca6806223 100644 (file)
@@ -387,7 +387,7 @@ struct qedr_qp {
                u8 wqe_size;
 
                u8 smac[ETH_ALEN];
-               u16 vlan_id;
+               u16 vlan;
                int rc;
        } *rqe_wr_id;
 
index 4689e802b33264bb8b66bacf89cd77ac294d4372..ad8965397cf76a3ae8a1e5d1d36df2f2a33a6676 100644 (file)
@@ -105,7 +105,7 @@ void qedr_ll2_complete_rx_packet(void *cxt,
 
        qp->rqe_wr_id[qp->rq.gsi_cons].rc = data->u.data_length_error ?
                -EINVAL : 0;
-       qp->rqe_wr_id[qp->rq.gsi_cons].vlan_id = data->vlan;
+       qp->rqe_wr_id[qp->rq.gsi_cons].vlan = data->vlan;
        /* note: length stands for data length i.e. GRH is excluded */
        qp->rqe_wr_id[qp->rq.gsi_cons].sg_list[0].length =
                data->length.data_length;
@@ -694,6 +694,7 @@ int qedr_gsi_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
        struct qedr_cq *cq = get_qedr_cq(ibcq);
        struct qedr_qp *qp = dev->gsi_qp;
        unsigned long flags;
+       u16 vlan_id;
        int i = 0;
 
        spin_lock_irqsave(&cq->cq_lock, flags);
@@ -712,9 +713,14 @@ int qedr_gsi_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
                wc[i].wc_flags |= IB_WC_GRH | IB_WC_IP_CSUM_OK;
                ether_addr_copy(wc[i].smac, qp->rqe_wr_id[qp->rq.cons].smac);
                wc[i].wc_flags |= IB_WC_WITH_SMAC;
-               if (qp->rqe_wr_id[qp->rq.cons].vlan_id) {
+
+               vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan &
+                         VLAN_VID_MASK;
+               if (vlan_id) {
                        wc[i].wc_flags |= IB_WC_WITH_VLAN;
-                       wc[i].vlan_id = qp->rqe_wr_id[qp->rq.cons].vlan_id;
+                       wc[i].vlan_id = vlan_id;
+                       wc[i].sl = (qp->rqe_wr_id[qp->rq.cons].vlan &
+                                   VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
                }
 
                qedr_inc_sw_cons(&qp->rq);
index 79ebd79e840589c670db764b0ed5261fe66af821..80ffab88fbca0a935108631960ae634afe78161e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INFINIBAND_QIB) += ib_qib.o
 
 ib_qib-y := qib_diag.o qib_driver.o qib_eeprom.o \
index 99fb2db47cd563ab0d209217ba9d7fc197d5e4c9..94ae7a1a6950f60bd9137745630f7d0ee17a00f9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Idrivers/net/ethernet/cisco/enic
 
 obj-$(CONFIG_INFINIBAND_USNIC)+= usnic_verbs.o
index 663a0c301c4382d942fc594d1529b53a0936811b..984aa3484928d691db083c2c694aa90632d803d7 100644 (file)
@@ -416,9 +416,34 @@ static inline enum ib_wc_status pvrdma_wc_status_to_ib(
        return (enum ib_wc_status)status;
 }
 
-static inline int pvrdma_wc_opcode_to_ib(int opcode)
-{
-       return opcode;
+static inline int pvrdma_wc_opcode_to_ib(unsigned int opcode)
+{
+       switch (opcode) {
+       case PVRDMA_WC_SEND:
+               return IB_WC_SEND;
+       case PVRDMA_WC_RDMA_WRITE:
+               return IB_WC_RDMA_WRITE;
+       case PVRDMA_WC_RDMA_READ:
+               return IB_WC_RDMA_READ;
+       case PVRDMA_WC_COMP_SWAP:
+               return IB_WC_COMP_SWAP;
+       case PVRDMA_WC_FETCH_ADD:
+               return IB_WC_FETCH_ADD;
+       case PVRDMA_WC_LOCAL_INV:
+               return IB_WC_LOCAL_INV;
+       case PVRDMA_WC_FAST_REG_MR:
+               return IB_WC_REG_MR;
+       case PVRDMA_WC_MASKED_COMP_SWAP:
+               return IB_WC_MASKED_COMP_SWAP;
+       case PVRDMA_WC_MASKED_FETCH_ADD:
+               return IB_WC_MASKED_FETCH_ADD;
+       case PVRDMA_WC_RECV:
+               return IB_WC_RECV;
+       case PVRDMA_WC_RECV_RDMA_WITH_IMM:
+               return IB_WC_RECV_RDMA_WITH_IMM;
+       default:
+               return IB_WC_SEND;
+       }
 }
 
 static inline int pvrdma_wc_flags_to_ib(int flags)
index 3f12beb7076fce060701c0284a0e0fd69a703386..66af72dca759c795ca4ccee25b159443af46f95d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RDMA_RXE) += rdma_rxe.o
 
 rdma_rxe-y := \
index c28af1823a2db0f04b5133c5bab70713a88ef2ea..437813c7b4814cc71a8a5e4c3e94dfdb2b6a5292 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INFINIBAND_IPOIB)         += ipoib/
 obj-$(CONFIG_INFINIBAND_SRP)           += srp/
 obj-$(CONFIG_INFINIBAND_SRPT)          += srpt/
index e5430dd50764c9c6e13b871a51ee8c273a3f9941..6ece857ed26252c2ed7d05a9b4ede5a547dbe983 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INFINIBAND_IPOIB)                 += ib_ipoib.o
 
 ib_ipoib-y                                     := ipoib_main.o \
index 14b62f7472b4f6632f344d7d4ac2eb81518cf3c8..7774654c2ccbce600f99e751c7b37e15e7f1dd8a 100644 (file)
@@ -823,12 +823,18 @@ void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
            wc->status != IB_WC_WR_FLUSH_ERR) {
                struct ipoib_neigh *neigh;
 
-               if (wc->status != IB_WC_RNR_RETRY_EXC_ERR)
-                       ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
-                                  wc->status, wr_id, wc->vendor_err);
+               /* IB_WC[_RNR]_RETRY_EXC_ERR error is part of the life cycle,
+                * so don't make waves.
+                */
+               if (wc->status == IB_WC_RNR_RETRY_EXC_ERR ||
+                   wc->status == IB_WC_RETRY_EXC_ERR)
+                       ipoib_dbg(priv,
+                                 "%s: failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
+                                  __func__, wc->status, wr_id, wc->vendor_err);
                else
-                       ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
-                                 wc->status, wr_id, wc->vendor_err);
+                       ipoib_warn(priv,
+                                   "%s: failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
+                                  __func__, wc->status, wr_id, wc->vendor_err);
 
                spin_lock_irqsave(&priv->lock, flags);
                neigh = tx->neigh;
index 2e075377242e2baccc54cda5859d5b3ba7e768d0..6cd61638b44142029b85d0f057b8d04c6b2138c6 100644 (file)
@@ -1000,19 +1000,6 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)
                 */
                priv->dev->broadcast[8] = priv->pkey >> 8;
                priv->dev->broadcast[9] = priv->pkey & 0xff;
-
-               /*
-                * Update the broadcast address in the priv->broadcast object,
-                * in case it already exists, otherwise no one will do that.
-                */
-               if (priv->broadcast) {
-                       spin_lock_irq(&priv->lock);
-                       memcpy(priv->broadcast->mcmember.mgid.raw,
-                              priv->dev->broadcast + 4,
-                       sizeof(union ib_gid));
-                       spin_unlock_irq(&priv->lock);
-               }
-
                return 0;
        }
 
index bac95b509a9b2edc23af7b5e8505fc03acbb80c0..dcc77014018db037cd24540dfe8ddf06d9b70fef 100644 (file)
@@ -2180,6 +2180,7 @@ static struct net_device *ipoib_add_port(const char *format,
 {
        struct ipoib_dev_priv *priv;
        struct ib_port_attr attr;
+       struct rdma_netdev *rn;
        int result = -ENOMEM;
 
        priv = ipoib_intf_alloc(hca, port, format);
@@ -2279,7 +2280,8 @@ register_failed:
        ipoib_dev_cleanup(priv->dev);
 
 device_init_failed:
-       free_netdev(priv->dev);
+       rn = netdev_priv(priv->dev);
+       rn->free_rdma_netdev(priv->dev);
        kfree(priv);
 
 alloc_mem_failed:
@@ -2328,7 +2330,7 @@ static void ipoib_remove_one(struct ib_device *device, void *client_data)
                return;
 
        list_for_each_entry_safe(priv, tmp, dev_list, list) {
-               struct rdma_netdev *rn = netdev_priv(priv->dev);
+               struct rdma_netdev *parent_rn = netdev_priv(priv->dev);
 
                ib_unregister_event_handler(&priv->event_handler);
                flush_workqueue(ipoib_workqueue);
@@ -2350,10 +2352,15 @@ static void ipoib_remove_one(struct ib_device *device, void *client_data)
                unregister_netdev(priv->dev);
                mutex_unlock(&priv->sysfs_mutex);
 
-               rn->free_rdma_netdev(priv->dev);
+               parent_rn->free_rdma_netdev(priv->dev);
+
+               list_for_each_entry_safe(cpriv, tcpriv, &priv->child_intfs, list) {
+                       struct rdma_netdev *child_rn;
 
-               list_for_each_entry_safe(cpriv, tcpriv, &priv->child_intfs, list)
+                       child_rn = netdev_priv(cpriv->dev);
+                       child_rn->free_rdma_netdev(cpriv->dev);
                        kfree(cpriv);
+               }
 
                kfree(priv);
        }
index 9927cd6b7082b1dc24cbfa38431e6156646bf15f..55a9b71ed05a7ff8ff0ac9f7eb84af1d4f6476a0 100644 (file)
@@ -141,14 +141,17 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
                return restart_syscall();
        }
 
-       priv = ipoib_intf_alloc(ppriv->ca, ppriv->port, intf_name);
-       if (!priv) {
+       if (!down_write_trylock(&ppriv->vlan_rwsem)) {
                rtnl_unlock();
                mutex_unlock(&ppriv->sysfs_mutex);
-               return -ENOMEM;
+               return restart_syscall();
        }
 
-       down_write(&ppriv->vlan_rwsem);
+       priv = ipoib_intf_alloc(ppriv->ca, ppriv->port, intf_name);
+       if (!priv) {
+               result = -ENOMEM;
+               goto out;
+       }
 
        /*
         * First ensure this isn't a duplicate. We check the parent device and
@@ -175,8 +178,11 @@ out:
        rtnl_unlock();
        mutex_unlock(&ppriv->sysfs_mutex);
 
-       if (result) {
-               free_netdev(priv->dev);
+       if (result && priv) {
+               struct rdma_netdev *rn;
+
+               rn = netdev_priv(priv->dev);
+               rn->free_rdma_netdev(priv->dev);
                kfree(priv);
        }
 
@@ -204,7 +210,12 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
                return restart_syscall();
        }
 
-       down_write(&ppriv->vlan_rwsem);
+       if (!down_write_trylock(&ppriv->vlan_rwsem)) {
+               rtnl_unlock();
+               mutex_unlock(&ppriv->sysfs_mutex);
+               return restart_syscall();
+       }
+
        list_for_each_entry_safe(priv, tpriv, &ppriv->child_intfs, list) {
                if (priv->pkey == pkey &&
                    priv->child_type == IPOIB_LEGACY_CHILD) {
@@ -224,7 +235,10 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
        mutex_unlock(&ppriv->sysfs_mutex);
 
        if (dev) {
-               free_netdev(dev);
+               struct rdma_netdev *rn;
+
+               rn = netdev_priv(dev);
+               rn->free_rdma_netdev(priv->dev);
                kfree(priv);
                return 0;
        }
index 9c3e9ab53a415710b0e8bef65647efc4716dc239..322209d5ff5829b6dfd5f4de54f4d11fe141c63d 100644 (file)
@@ -154,7 +154,7 @@ static void iser_dump_page_vec(struct iser_page_vec *page_vec)
 {
        int i;
 
-       iser_err("page vec npages %d data length %d\n",
+       iser_err("page vec npages %d data length %lld\n",
                 page_vec->npages, page_vec->fake_mr.length);
        for (i = 0; i < page_vec->npages; i++)
                iser_err("vec[%d]: %llx\n", i, page_vec->pages[i]);
index 87d994de8c910d998c12a4205c0e66eb1220b12d..d6fd248320aebc042eee87828ae5e36abb113be0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/socket.h>
 #include <linux/in.h>
 #include <linux/in6.h>
index 595820bbabe95d6d32cd3c63dc640036148c89dc..40de6a7be641d6c6c4a9729531abbc009812e0aa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the input core drivers.
 #
index 8f2042432c85151b25fab1e885fe321e1563d641..66a46c84e28f543bc27f91479d5da669984e0d89 100644 (file)
@@ -237,9 +237,15 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file)
 EXPORT_SYMBOL_GPL(input_ff_erase);
 
 /*
- * flush_effects - erase all effects owned by a file handle
+ * input_ff_flush - erase all effects owned by a file handle
+ * @dev: input device to erase effect from
+ * @file: purported owner of the effects
+ *
+ * This function erases all force-feedback effects associated with
+ * the given owner from specified device. Note that @file may be %NULL,
+ * in which case all effects will be erased.
  */
-static int flush_effects(struct input_dev *dev, struct file *file)
+int input_ff_flush(struct input_dev *dev, struct file *file)
 {
        struct ff_device *ff = dev->ff;
        int i;
@@ -255,6 +261,7 @@ static int flush_effects(struct input_dev *dev, struct file *file)
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(input_ff_flush);
 
 /**
  * input_ff_event() - generic handler for force-feedback events
@@ -343,7 +350,7 @@ int input_ff_create(struct input_dev *dev, unsigned int max_effects)
        mutex_init(&ff->mutex);
 
        dev->ff = ff;
-       dev->flush = flush_effects;
+       dev->flush = input_ff_flush;
        dev->event = input_ff_event;
        __set_bit(EV_FF, dev->evbit);
 
index b6f6097bd8c4f005cd031f2d7b9ddcccb94712b6..73ad8fe4db799597d0bb7526e284e641c9d7ab3e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the gameport drivers.
 #
index d268fdc23c6419e2540cc941edb66231be3a900d..762bfb9487dc961cf1c7d12a18a0d10dd3386b4c 100644 (file)
@@ -933,58 +933,52 @@ int input_set_keycode(struct input_dev *dev,
 }
 EXPORT_SYMBOL(input_set_keycode);
 
+bool input_match_device_id(const struct input_dev *dev,
+                          const struct input_device_id *id)
+{
+       if (id->flags & INPUT_DEVICE_ID_MATCH_BUS)
+               if (id->bustype != dev->id.bustype)
+                       return false;
+
+       if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR)
+               if (id->vendor != dev->id.vendor)
+                       return false;
+
+       if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT)
+               if (id->product != dev->id.product)
+                       return false;
+
+       if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION)
+               if (id->version != dev->id.version)
+                       return false;
+
+       if (!bitmap_subset(id->evbit, dev->evbit, EV_MAX) ||
+           !bitmap_subset(id->keybit, dev->keybit, KEY_MAX) ||
+           !bitmap_subset(id->relbit, dev->relbit, REL_MAX) ||
+           !bitmap_subset(id->absbit, dev->absbit, ABS_MAX) ||
+           !bitmap_subset(id->mscbit, dev->mscbit, MSC_MAX) ||
+           !bitmap_subset(id->ledbit, dev->ledbit, LED_MAX) ||
+           !bitmap_subset(id->sndbit, dev->sndbit, SND_MAX) ||
+           !bitmap_subset(id->ffbit, dev->ffbit, FF_MAX) ||
+           !bitmap_subset(id->swbit, dev->swbit, SW_MAX) ||
+           !bitmap_subset(id->propbit, dev->propbit, INPUT_PROP_MAX)) {
+               return false;
+       }
+
+       return true;
+}
+EXPORT_SYMBOL(input_match_device_id);
+
 static const struct input_device_id *input_match_device(struct input_handler *handler,
                                                        struct input_dev *dev)
 {
        const struct input_device_id *id;
 
        for (id = handler->id_table; id->flags || id->driver_info; id++) {
-
-               if (id->flags & INPUT_DEVICE_ID_MATCH_BUS)
-                       if (id->bustype != dev->id.bustype)
-                               continue;
-
-               if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR)
-                       if (id->vendor != dev->id.vendor)
-                               continue;
-
-               if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT)
-                       if (id->product != dev->id.product)
-                               continue;
-
-               if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION)
-                       if (id->version != dev->id.version)
-                               continue;
-
-               if (!bitmap_subset(id->evbit, dev->evbit, EV_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->keybit, dev->keybit, KEY_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->relbit, dev->relbit, REL_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->absbit, dev->absbit, ABS_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->mscbit, dev->mscbit, MSC_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->ledbit, dev->ledbit, LED_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->sndbit, dev->sndbit, SND_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->ffbit, dev->ffbit, FF_MAX))
-                       continue;
-
-               if (!bitmap_subset(id->swbit, dev->swbit, SW_MAX))
-                       continue;
-
-               if (!handler->match || handler->match(handler, dev))
+               if (input_match_device_id(dev, id) &&
+                   (!handler->match || handler->match(handler, dev))) {
                        return id;
+               }
        }
 
        return NULL;
index 29d677c714d25fa2fca5d41713f32a5a9fe3e64f..7b29a894403981c233120fc282f62d93f3d5f71f 100644 (file)
@@ -747,6 +747,68 @@ static void joydev_cleanup(struct joydev *joydev)
                input_close_device(handle);
 }
 
+/*
+ * These codes are copied from from hid-ids.h, unfortunately there is no common
+ * usb_ids/bt_ids.h header.
+ */
+#define USB_VENDOR_ID_SONY                     0x054c
+#define USB_DEVICE_ID_SONY_PS3_CONTROLLER              0x0268
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER              0x05c4
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2            0x09cc
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE       0x0ba0
+
+#define USB_VENDOR_ID_THQ                      0x20d6
+#define USB_DEVICE_ID_THQ_PS3_UDRAW                    0xcb17
+
+#define ACCEL_DEV(vnd, prd)                                            \
+       {                                                               \
+               .flags = INPUT_DEVICE_ID_MATCH_VENDOR |                 \
+                               INPUT_DEVICE_ID_MATCH_PRODUCT |         \
+                               INPUT_DEVICE_ID_MATCH_PROPBIT,          \
+               .vendor = (vnd),                                        \
+               .product = (prd),                                       \
+               .propbit = { BIT_MASK(INPUT_PROP_ACCELEROMETER) },      \
+       }
+
+static const struct input_device_id joydev_blacklist[] = {
+       /* Avoid touchpads and touchscreens */
+       {
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+                               INPUT_DEVICE_ID_MATCH_KEYBIT,
+               .evbit = { BIT_MASK(EV_KEY) },
+               .keybit = { [BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH) },
+       },
+       /* Avoid tablets, digitisers and similar devices */
+       {
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT |
+                               INPUT_DEVICE_ID_MATCH_KEYBIT,
+               .evbit = { BIT_MASK(EV_KEY) },
+               .keybit = { [BIT_WORD(BTN_DIGI)] = BIT_MASK(BTN_DIGI) },
+       },
+       /* Disable accelerometers on composite devices */
+       ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER),
+       ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
+       ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+       ACCEL_DEV(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
+       ACCEL_DEV(USB_VENDOR_ID_THQ, USB_DEVICE_ID_THQ_PS3_UDRAW),
+       { /* sentinel */ }
+};
+
+static bool joydev_dev_is_blacklisted(struct input_dev *dev)
+{
+       const struct input_device_id *id;
+
+       for (id = joydev_blacklist; id->flags; id++) {
+               if (input_match_device_id(dev, id)) {
+                       dev_dbg(&dev->dev,
+                               "joydev: blacklisting '%s'\n", dev->name);
+                       return true;
+               }
+       }
+
+       return false;
+}
+
 static bool joydev_dev_is_absolute_mouse(struct input_dev *dev)
 {
        DECLARE_BITMAP(jd_scratch, KEY_CNT);
@@ -807,12 +869,8 @@ static bool joydev_dev_is_absolute_mouse(struct input_dev *dev)
 
 static bool joydev_match(struct input_handler *handler, struct input_dev *dev)
 {
-       /* Avoid touchpads and touchscreens */
-       if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_TOUCH, dev->keybit))
-               return false;
-
-       /* Avoid tablets, digitisers and similar devices */
-       if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_DIGI, dev->keybit))
+       /* Disable blacklisted devices */
+       if (joydev_dev_is_blacklisted(dev))
                return false;
 
        /* Avoid absolute mice */
index 496fd56b3f1bccee496b363fd214c5451a594ced..67651efda2e1ab734b6d471af8552b2c3bc3fe74 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the input core drivers.
 #
index d2338bacdad18b7086dc0e3f77e85f357c221df3..526e68294e6e560144cf541d8560a6dbe26db14b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the input core drivers.
 #
index e37e335e406ffbb13d4fa323705373fa2fa58d16..6da607d3b81172a38f95c672e37976bedc8d097d 100644 (file)
@@ -234,14 +234,7 @@ static irqreturn_t tca8418_irq_handler(int irq, void *dev_id)
 static int tca8418_configure(struct tca8418_keypad *keypad_data,
                             u32 rows, u32 cols)
 {
-       int reg, error;
-
-       /* Write config register, if this fails assume device not present */
-       error = tca8418_write_byte(keypad_data, REG_CFG,
-                               CFG_INT_CFG | CFG_OVR_FLOW_IEN | CFG_KE_IEN);
-       if (error < 0)
-               return -ENODEV;
-
+       int reg, error = 0;
 
        /* Assemble a mask for row and column registers */
        reg  =  ~(~0 << rows);
@@ -257,6 +250,12 @@ static int tca8418_configure(struct tca8418_keypad *keypad_data,
        error |= tca8418_write_byte(keypad_data, REG_DEBOUNCE_DIS2, reg >> 8);
        error |= tca8418_write_byte(keypad_data, REG_DEBOUNCE_DIS3, reg >> 16);
 
+       if (error)
+               return error;
+
+       error = tca8418_write_byte(keypad_data, REG_CFG,
+                               CFG_INT_CFG | CFG_OVR_FLOW_IEN | CFG_KE_IEN);
+
        return error;
 }
 
@@ -268,6 +267,7 @@ static int tca8418_keypad_probe(struct i2c_client *client,
        struct input_dev *input;
        u32 rows = 0, cols = 0;
        int error, row_shift, max_keys;
+       u8 reg;
 
        /* Check i2c driver capabilities */
        if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)) {
@@ -301,10 +301,10 @@ static int tca8418_keypad_probe(struct i2c_client *client,
        keypad_data->client = client;
        keypad_data->row_shift = row_shift;
 
-       /* Initialize the chip or fail if chip isn't present */
-       error = tca8418_configure(keypad_data, rows, cols);
-       if (error < 0)
-               return error;
+       /* Read key lock register, if this fails assume device not present */
+       error = tca8418_read_byte(keypad_data, REG_KEY_LCK_EC, &reg);
+       if (error)
+               return -ENODEV;
 
        /* Configure input device */
        input = devm_input_allocate_device(dev);
@@ -340,6 +340,11 @@ static int tca8418_keypad_probe(struct i2c_client *client,
                return error;
        }
 
+       /* Initialize the chip */
+       error = tca8418_configure(keypad_data, rows, cols);
+       if (error < 0)
+               return error;
+
        error = input_register_device(input);
        if (error) {
                dev_err(dev, "Unable to register input device, error: %d\n",
index 03fd4262ada9b9cfe64a676f664f0bd99f5ac5c0..4b6118d313fe78458c40e6885f3e9590b8276ccf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the input misc drivers.
 #
index 6cee5adc3b5cfa1ec322db10c49d84f1bcbc2ae3..debeeaeb88127baae0a65dba44875084af034945 100644 (file)
@@ -403,6 +403,7 @@ static const struct platform_device_id axp_pek_id_match[] = {
        },
        { /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(platform, axp_pek_id_match);
 
 static struct platform_driver axp20x_pek_driver = {
        .probe          = axp20x_pek_probe,
@@ -417,4 +418,3 @@ module_platform_driver(axp20x_pek_driver);
 MODULE_DESCRIPTION("axp20x Power Button");
 MODULE_AUTHOR("Carlo Caione <carlo@caione.org>");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:axp20x-pek");
index 6bf82ea8c918adcbbba700100ead7d270a60695c..ae473123583bb22bedbb33426f11eb8f802ea368 100644 (file)
@@ -1635,13 +1635,25 @@ ims_pcu_get_cdc_union_desc(struct usb_interface *intf)
                return NULL;
        }
 
-       while (buflen > 0) {
+       while (buflen >= sizeof(*union_desc)) {
                union_desc = (struct usb_cdc_union_desc *)buf;
 
+               if (union_desc->bLength > buflen) {
+                       dev_err(&intf->dev, "Too large descriptor\n");
+                       return NULL;
+               }
+
                if (union_desc->bDescriptorType == USB_DT_CS_INTERFACE &&
                    union_desc->bDescriptorSubType == USB_CDC_UNION_TYPE) {
                        dev_dbg(&intf->dev, "Found union header\n");
-                       return union_desc;
+
+                       if (union_desc->bLength >= sizeof(*union_desc))
+                               return union_desc;
+
+                       dev_err(&intf->dev,
+                               "Union descriptor to short (%d vs %zd\n)",
+                               union_desc->bLength, sizeof(*union_desc));
+                       return NULL;
                }
 
                buflen -= union_desc->bLength;
index 022be0e22eba97b10b95e653f48cee44f1d4ba36..443151de90c6b506f6847b656a68d84577576ad1 100644 (file)
@@ -98,14 +98,15 @@ static int uinput_request_reserve_slot(struct uinput_device *udev,
                                        uinput_request_alloc_id(udev, request));
 }
 
-static void uinput_request_done(struct uinput_device *udev,
-                               struct uinput_request *request)
+static void uinput_request_release_slot(struct uinput_device *udev,
+                                       unsigned int id)
 {
        /* Mark slot as available */
-       udev->requests[request->id] = NULL;
-       wake_up(&udev->requests_waitq);
+       spin_lock(&udev->requests_lock);
+       udev->requests[id] = NULL;
+       spin_unlock(&udev->requests_lock);
 
-       complete(&request->done);
+       wake_up(&udev->requests_waitq);
 }
 
 static int uinput_request_send(struct uinput_device *udev,
@@ -138,20 +139,22 @@ static int uinput_request_send(struct uinput_device *udev,
 static int uinput_request_submit(struct uinput_device *udev,
                                 struct uinput_request *request)
 {
-       int error;
+       int retval;
 
-       error = uinput_request_reserve_slot(udev, request);
-       if (error)
-               return error;
+       retval = uinput_request_reserve_slot(udev, request);
+       if (retval)
+               return retval;
 
-       error = uinput_request_send(udev, request);
-       if (error) {
-               uinput_request_done(udev, request);
-               return error;
-       }
+       retval = uinput_request_send(udev, request);
+       if (retval)
+               goto out;
 
        wait_for_completion(&request->done);
-       return request->retval;
+       retval = request->retval;
+
+ out:
+       uinput_request_release_slot(udev, request->id);
+       return retval;
 }
 
 /*
@@ -169,7 +172,7 @@ static void uinput_flush_requests(struct uinput_device *udev)
                request = udev->requests[i];
                if (request) {
                        request->retval = -ENODEV;
-                       uinput_request_done(udev, request);
+                       complete(&request->done);
                }
        }
 
@@ -230,6 +233,18 @@ static int uinput_dev_erase_effect(struct input_dev *dev, int effect_id)
        return uinput_request_submit(udev, &request);
 }
 
+static int uinput_dev_flush(struct input_dev *dev, struct file *file)
+{
+       /*
+        * If we are called with file == NULL that means we are tearing
+        * down the device, and therefore we can not handle FF erase
+        * requests: either we are handling UI_DEV_DESTROY (and holding
+        * the udev->mutex), or the file descriptor is closed and there is
+        * nobody on the other side anymore.
+        */
+       return file ? input_ff_flush(dev, file) : 0;
+}
+
 static void uinput_destroy_device(struct uinput_device *udev)
 {
        const char *name, *phys;
@@ -297,6 +312,12 @@ static int uinput_create_device(struct uinput_device *udev)
                dev->ff->playback = uinput_dev_playback;
                dev->ff->set_gain = uinput_dev_set_gain;
                dev->ff->set_autocenter = uinput_dev_set_autocenter;
+               /*
+                * The standard input_ff_flush() implementation does
+                * not quite work for uinput as we can't reasonably
+                * handle FF requests during device teardown.
+                */
+               dev->flush = uinput_dev_flush;
        }
 
        error = input_register_device(udev->dev);
@@ -939,7 +960,7 @@ static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
                        }
 
                        req->retval = ff_up.retval;
-                       uinput_request_done(udev, req);
+                       complete(&req->done);
                        goto out;
 
                case UI_END_FF_ERASE:
@@ -955,7 +976,7 @@ static long uinput_ioctl_handler(struct file *file, unsigned int cmd,
                        }
 
                        req->retval = ff_erase.retval;
-                       uinput_request_done(udev, req);
+                       complete(&req->done);
                        goto out;
        }
 
index 56bf0ad877c67e144cbcf1b1cb06ca44b71b1ac1..e49f0856507659b09eaaebac6812e19dfef28fa8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the mouse drivers.
 #
index d6c120cf36cddbb8943dbcb866e9c5a8f55302b6..8cb90d904186cfe29d76abfd2975654248f1b101 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BYD_H
 #define _BYD_H
 
index 81f68aaed7c8567d3cfbfb4afc56008815ead34d..1eaddd81800460be0157cbcc71545dc0f6f31e7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CYPRESS_PS2_H
 #define _CYPRESS_PS2_H
 
index 0e761d079dc4669720d2d4899f13ecbbfdb22b52..6d6b092e2da901969b8e3a2cfe65f2d0f2651098 100644 (file)
@@ -1258,6 +1258,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
        { "ELAN0605", 0 },
        { "ELAN0609", 0 },
        { "ELAN060B", 0 },
+       { "ELAN0611", 0 },
        { "ELAN1000", 0 },
        { }
 };
index 15b1330606c1c3fcfc28cf109f89987d0425f75a..e19eb60b3d2f5adcdf0182673680de25ddd15483 100644 (file)
@@ -598,7 +598,7 @@ static int elan_i2c_write_fw_block(struct i2c_client *client,
        }
 
        /* Wait for F/W to update one page ROM data. */
-       msleep(20);
+       msleep(35);
 
        error = elan_i2c_read_cmd(client, ETP_I2C_IAP_CTRL_CMD, val);
        if (error) {
index dd686771cfe0b53df84f0b75c37c0bc4db1ed972..98b7b384229b5f91e3718caa1ea26efda910bdd6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * OLPC HGPK (XO-1) touchpad PS/2 mouse driver
  */
index 38855e425f0114832566e487f0cee9953531c583..8cd453808cc7d8e6bd3026e3aca90fcd73d9758c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PSMOUSE_H
 #define _PSMOUSE_H
 
index 5af0b7d200bc23ff0f2287d6e0b69a631fb8bb22..ee5466a374bf0f370000cf002d94bf2514d02318 100644 (file)
@@ -1709,8 +1709,7 @@ static int synaptics_create_intertouch(struct psmouse *psmouse,
                .sensor_pdata = {
                        .sensor_type = rmi_sensor_touchpad,
                        .axis_align.flip_y = true,
-                       /* to prevent cursors jumps: */
-                       .kernel_tracking = true,
+                       .kernel_tracking = false,
                        .topbuttonpad = topbuttonpad,
                },
                .f30_data = {
index 9aaac3dd8613d66176c7ca7c01873184bd9013b5..f17631656987c875ad6068f0acfbfbc434faaa44 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RMI4_CORE) += rmi_core.o
 rmi_core-y := rmi_bus.o rmi_driver.o rmi_f01.o
 
index 34dfee555b201b0577e6e5fc0c58c63e7cc8cac7..82e0f0d43d55271c92c774ba325b1bc40099f83e 100644 (file)
@@ -232,9 +232,10 @@ static int rmi_f30_map_gpios(struct rmi_function *fn,
        unsigned int trackstick_button = BTN_LEFT;
        bool button_mapped = false;
        int i;
+       int button_count = min_t(u8, f30->gpioled_count, TRACKSTICK_RANGE_END);
 
        f30->gpioled_key_map = devm_kcalloc(&fn->dev,
-                                           f30->gpioled_count,
+                                           button_count,
                                            sizeof(f30->gpioled_key_map[0]),
                                            GFP_KERNEL);
        if (!f30->gpioled_key_map) {
@@ -242,7 +243,7 @@ static int rmi_f30_map_gpios(struct rmi_function *fn,
                return -ENOMEM;
        }
 
-       for (i = 0; i < f30->gpioled_count; i++) {
+       for (i = 0; i < button_count; i++) {
                if (!rmi_f30_is_valid_button(i, f30->ctrl))
                        continue;
 
index 767bd9b6e1ed05861836f0879f4de9ceb08c64c3..a3ca076215429270b4c6ac1f6f9a97149df09d8f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the input core drivers.
 #
index 6231d63860ee324031d36e6e1c42dd57407dc27f..7962898462045666a2b7052d680363062e6582f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _I8042_SPARCIO_H
 #define _I8042_SPARCIO_H
 
index bb0349fa64bc349c130d4f77a96fd7f3a1d525ca..fd03e55768c9f29a34112d00d3baf8d6b7336f67 100644 (file)
@@ -255,6 +255,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
 
        case KE_VSW:
                input_report_switch(dev, ke->sw.code, value);
+               input_sync(dev);
                break;
        }
 }
index 200fc4e11987bb4395e30427a3842096a724692a..8279ccc18b0a32f81fe62586f57814881d7f3975 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the tablet drivers
 #
index b796e891e2eed22e1ffdac3f3098fdf7afbe4ac6..4b8b9d7aa75e2785991fc5838bf55728c715e6fe 100644 (file)
@@ -230,13 +230,17 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
 
        /* Walk  this report and pull out the info we need */
        while (i < length) {
-               prefix = report[i];
-
-               /* Skip over prefix */
-               i++;
+               prefix = report[i++];
 
                /* Determine data size and save the data in the proper variable */
-               size = PREF_SIZE(prefix);
+               size = (1U << PREF_SIZE(prefix)) >> 1;
+               if (i + size > length) {
+                       dev_err(ddev,
+                               "Not enough data (need %d, have %d)\n",
+                               i + size, length);
+                       break;
+               }
+
                switch (size) {
                case 1:
                        data = report[i];
@@ -244,8 +248,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
                case 2:
                        data16 = get_unaligned_le16(&report[i]);
                        break;
-               case 3:
-                       size = 4;
+               case 4:
                        data32 = get_unaligned_le32(&report[i]);
                        break;
                }
index 6badce87037b54bcea7c91f5ddbaebca4c93db58..850c1562555a966687f4c162eba0eb3d764c116a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the touchscreen drivers.
 #
index f9dcbd63e59826b6fa98620a36af6cce5cfd4fbc..b35b640fdadfafa11276281768e0777aee9a447b 100644 (file)
@@ -117,6 +117,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
        input->open = ar1021_i2c_open;
        input->close = ar1021_i2c_close;
 
+       __set_bit(INPUT_PROP_DIRECT, input->propbit);
        input_set_capability(input, EV_KEY, BTN_TOUCH);
        input_set_abs_params(input, ABS_X, 0, AR1021_MAX_X, 0, 0);
        input_set_abs_params(input, ABS_Y, 0, AR1021_MAX_Y, 0, 0);
index 32d2762448aa24168c9dd0ad38c8c9eb1ec13ff3..b3bbad7d228296118f35a2d4bff7c295b5e9839c 100644 (file)
@@ -72,6 +72,9 @@ struct goodix_ts_data {
 #define GOODIX_REG_CONFIG_DATA         0x8047
 #define GOODIX_REG_ID                  0x8140
 
+#define GOODIX_BUFFER_STATUS_READY     BIT(7)
+#define GOODIX_BUFFER_STATUS_TIMEOUT   20
+
 #define RESOLUTION_LOC         1
 #define MAX_CONTACTS_LOC       5
 #define TRIGGER_LOC            6
@@ -195,35 +198,53 @@ static int goodix_get_cfg_len(u16 id)
 
 static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data)
 {
+       unsigned long max_timeout;
        int touch_num;
        int error;
 
-       error = goodix_i2c_read(ts->client, GOODIX_READ_COOR_ADDR, data,
-                               GOODIX_CONTACT_SIZE + 1);
-       if (error) {
-               dev_err(&ts->client->dev, "I2C transfer error: %d\n", error);
-               return error;
-       }
+       /*
+        * The 'buffer status' bit, which indicates that the data is valid, is
+        * not set as soon as the interrupt is raised, but slightly after.
+        * This takes around 10 ms to happen, so we poll for 20 ms.
+        */
+       max_timeout = jiffies + msecs_to_jiffies(GOODIX_BUFFER_STATUS_TIMEOUT);
+       do {
+               error = goodix_i2c_read(ts->client, GOODIX_READ_COOR_ADDR,
+                                       data, GOODIX_CONTACT_SIZE + 1);
+               if (error) {
+                       dev_err(&ts->client->dev, "I2C transfer error: %d\n",
+                                       error);
+                       return error;
+               }
 
-       if (!(data[0] & 0x80))
-               return -EAGAIN;
+               if (data[0] & GOODIX_BUFFER_STATUS_READY) {
+                       touch_num = data[0] & 0x0f;
+                       if (touch_num > ts->max_touch_num)
+                               return -EPROTO;
+
+                       if (touch_num > 1) {
+                               data += 1 + GOODIX_CONTACT_SIZE;
+                               error = goodix_i2c_read(ts->client,
+                                               GOODIX_READ_COOR_ADDR +
+                                                       1 + GOODIX_CONTACT_SIZE,
+                                               data,
+                                               GOODIX_CONTACT_SIZE *
+                                                       (touch_num - 1));
+                               if (error)
+                                       return error;
+                       }
+
+                       return touch_num;
+               }
 
-       touch_num = data[0] & 0x0f;
-       if (touch_num > ts->max_touch_num)
-               return -EPROTO;
-
-       if (touch_num > 1) {
-               data += 1 + GOODIX_CONTACT_SIZE;
-               error = goodix_i2c_read(ts->client,
-                                       GOODIX_READ_COOR_ADDR +
-                                               1 + GOODIX_CONTACT_SIZE,
-                                       data,
-                                       GOODIX_CONTACT_SIZE * (touch_num - 1));
-               if (error)
-                       return error;
-       }
+               usleep_range(1000, 2000); /* Poll every 1 - 2 ms */
+       } while (time_before(jiffies, max_timeout));
 
-       return touch_num;
+       /*
+        * The Goodix panel will send spurious interrupts after a
+        * 'finger up' event, which will always cause a timeout.
+        */
+       return 0;
 }
 
 static void goodix_ts_report_touch(struct goodix_ts_data *ts, u8 *coor_data)
index 157fdb4bb2e8ba931697d18281afb3887beceaca..8c6c6178ec12fd26ed9832311419da243ed4c154 100644 (file)
@@ -663,12 +663,10 @@ static int stmfts_probe(struct i2c_client *client,
        sdata->input->open = stmfts_input_open;
        sdata->input->close = stmfts_input_close;
 
+       input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_X);
+       input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_Y);
        touchscreen_parse_properties(sdata->input, true, &sdata->prop);
 
-       input_set_abs_params(sdata->input, ABS_MT_POSITION_X, 0,
-                                               sdata->prop.max_x, 0, 0);
-       input_set_abs_params(sdata->input, ABS_MT_POSITION_Y, 0,
-                                               sdata->prop.max_y, 0, 0);
        input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
        input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
        input_set_abs_params(sdata->input, ABS_MT_ORIENTATION, 0, 255, 0, 0);
index 7953381d939ab49f26f460bf7bac808600cb2549..f1043ae71dccb5c4a10126279ff0b1a3c6142089 100644 (file)
@@ -161,7 +161,7 @@ static void titsc_step_config(struct titsc *ts_dev)
                break;
        case 5:
                config |= ts_dev->bit_xp | STEPCONFIG_INP_AN4 |
-                               ts_dev->bit_xn | ts_dev->bit_yp;
+                               STEPCONFIG_XNP | STEPCONFIG_YPN;
                break;
        case 8:
                config |= ts_dev->bit_yp | STEPCONFIG_INP(ts_dev->inp_xp);
index 49a63a3c684094a331a7465dda370f1a2f0fcb21..a43c08ccfd3dc0bce3ff578584024b8a1fe028f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TSC200X_CORE_H
 #define _TSC200X_CORE_H
 
index 49bd2ab8c5075859bca8e2e90519e7da6cd6f48f..f3a21343e636a8f26066f206129d45924cdc9588 100644 (file)
@@ -278,7 +278,7 @@ config EXYNOS_IOMMU_DEBUG
 config IPMMU_VMSA
        bool "Renesas VMSA-compatible IPMMU"
        depends on ARM || IOMMU_DMA
-       depends on ARCH_RENESAS || COMPILE_TEST
+       depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
        select IOMMU_API
        select IOMMU_IO_PGTABLE_LPAE
        select ARM_DMA_USE_IOMMU
@@ -373,7 +373,8 @@ config MTK_IOMMU_V1
 config QCOM_IOMMU
        # Note: iommu drivers cannot (yet?) be built as modules
        bool "Qualcomm IOMMU Support"
-       depends on ARCH_QCOM || COMPILE_TEST
+       depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
+       depends on HAS_DMA
        select IOMMU_API
        select IOMMU_IO_PGTABLE_LPAE
        select ARM_DMA_USE_IOMMU
index b910aea813a15758690c79dbf229bbe2546c96b5..1fb695854809b0ff261dec43f51d72f90ff7e178 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IOMMU_API) += iommu.o
 obj-$(CONFIG_IOMMU_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
index 51f8215877f552ed168424107078ac786febaf3b..8e8874d23717ab5120c87f180146562be3e03ef6 100644 (file)
@@ -2773,14 +2773,16 @@ int __init amd_iommu_init_api(void)
 
 int __init amd_iommu_init_dma_ops(void)
 {
-       swiotlb        = iommu_pass_through ? 1 : 0;
+       swiotlb        = (iommu_pass_through || sme_me_mask) ? 1 : 0;
        iommu_detected = 1;
 
        /*
         * In case we don't initialize SWIOTLB (actually the common case
-        * when AMD IOMMU is enabled), make sure there are global
-        * dma_ops set as a fall-back for devices not handled by this
-        * driver (for example non-PCI devices).
+        * when AMD IOMMU is enabled and SME is not active), make sure there
+        * are global dma_ops set as a fall-back for devices not handled by
+        * this driver (for example non-PCI devices). When SME is active,
+        * make sure that swiotlb variable remains set so the global dma_ops
+        * continue to be SWIOTLB.
         */
        if (!swiotlb)
                dma_ops = &nommu_dma_ops;
@@ -3046,6 +3048,7 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova,
        mutex_unlock(&domain->api_lock);
 
        domain_flush_tlb_pde(domain);
+       domain_flush_complete(domain);
 
        return unmap_size;
 }
index 382de42b835939e167604053060e9944e19131ba..6fe2d03460730cabe0aa78060114844ad1a2a3cf 100644 (file)
@@ -874,7 +874,7 @@ static bool copy_device_table(void)
                hi = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET + 4);
                entry = (((u64) hi) << 32) + lo;
                if (last_entry && last_entry != entry) {
-                       pr_err("IOMMU:%d should use the same dev table as others!/n",
+                       pr_err("IOMMU:%d should use the same dev table as others!\n",
                                iommu->index);
                        return false;
                }
@@ -882,7 +882,7 @@ static bool copy_device_table(void)
 
                old_devtb_size = ((entry & ~PAGE_MASK) + 1) << 12;
                if (old_devtb_size != dev_table_size) {
-                       pr_err("The device table size of IOMMU:%d is not expected!/n",
+                       pr_err("The device table size of IOMMU:%d is not expected!\n",
                                iommu->index);
                        return false;
                }
@@ -890,7 +890,7 @@ static bool copy_device_table(void)
 
        old_devtb_phys = entry & PAGE_MASK;
        if (old_devtb_phys >= 0x100000000ULL) {
-               pr_err("The address of old device table is above 4G, not trustworthy!/n");
+               pr_err("The address of old device table is above 4G, not trustworthy!\n");
                return false;
        }
        old_devtb = memremap(old_devtb_phys, dev_table_size, MEMREMAP_WB);
@@ -901,7 +901,7 @@ static bool copy_device_table(void)
        old_dev_tbl_cpy = (void *)__get_free_pages(gfp_flag,
                                get_order(dev_table_size));
        if (old_dev_tbl_cpy == NULL) {
-               pr_err("Failed to allocate memory for copying old device table!/n");
+               pr_err("Failed to allocate memory for copying old device table!\n");
                return false;
        }
 
index ca5ebaeafd6acee8d11033b34ba912eeebc04689..57c920c1372d09f927a7dcdeadc25375bf4164a8 100644 (file)
@@ -497,7 +497,7 @@ static int dmar_parse_one_rhsa(struct acpi_dmar_header *header, void *arg)
 #define        dmar_parse_one_rhsa             dmar_res_noop
 #endif
 
-static void __init
+static void
 dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
 {
        struct acpi_dmar_hardware_unit *drhd;
index f596fcc3289830f5a74ec93d438aa626bebf42fe..25c2c75f5332efe3e98d7e1c290db71d515364f5 100644 (file)
@@ -709,7 +709,7 @@ static const struct dev_pm_ops sysmmu_pm_ops = {
                                pm_runtime_force_resume)
 };
 
-static const struct of_device_id sysmmu_of_match[] __initconst = {
+static const struct of_device_id sysmmu_of_match[] = {
        { .compatible   = "samsung,exynos-sysmmu", },
        { },
 };
index a5b89f6bcdbf08af9e4bfb75d1baf1e063735708..25842b566c39c1497d1cecd91b6af8a079492185 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #define pr_fmt(fmt)     "DMAR-IR: " fmt
 
index d665d0dc16e8f787813a6106d15bd83afacc4f34..6961fc393f0b25828f5981fad35ea744c7768b41 100644 (file)
@@ -245,7 +245,7 @@ static void __arm_v7s_free_table(void *table, int lvl,
 static void __arm_v7s_pte_sync(arm_v7s_iopte *ptep, int num_entries,
                               struct io_pgtable_cfg *cfg)
 {
-       if (!(cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA))
+       if (cfg->quirks & IO_PGTABLE_QUIRK_NO_DMA)
                return;
 
        dma_sync_single_for_device(cfg->iommu_dev, __arm_v7s_dma_addr(ptep),
index a3e667077b14e12ccca5df742922fe47d4e64005..cd2e1eafffe6883f6b43cb38bc23fb1c31bd4895 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IO_PGTABLE_H
 #define __IO_PGTABLE_H
 #include <linux/bitops.h>
index bf3b317ff0c1b2dd0e5b24eb780c09c360a0e15d..1e9ca7789de105e0a0ddbaf2971ff7376e5aedba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * iommu trace points
  *
index bd515be5b380e32ac224b55d5b9a2dfff26a15ef..16d33ac19db0f77837c30f44de044a3a46b9c558 100644 (file)
@@ -371,7 +371,8 @@ static int mtk_iommu_map(struct iommu_domain *domain, unsigned long iova,
        int ret;
 
        spin_lock_irqsave(&dom->pgtlock, flags);
-       ret = dom->iop->map(dom->iop, iova, paddr, size, prot);
+       ret = dom->iop->map(dom->iop, iova, paddr & DMA_BIT_MASK(32),
+                           size, prot);
        spin_unlock_irqrestore(&dom->pgtlock, flags);
 
        return ret;
index e60e3dba85a0d7c0457d9bdf650de2c350a5d11b..50947ebb6d1700e3f81acb5806c1b1a8b183c145 100644 (file)
@@ -157,10 +157,7 @@ static int of_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
 
        err = of_iommu_xlate(info->dev, &iommu_spec);
        of_node_put(iommu_spec.np);
-       if (err)
-               return err;
-
-       return info->np == pdev->bus->dev.of_node;
+       return err;
 }
 
 const struct iommu_ops *of_iommu_configure(struct device *dev,
index 0e2f31f9032bc922c80c4a9b0b9417883195caeb..22d4db302c1c8c2cc6b19a11a5ee8baf8c132acc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IOMMU API for s390 PCI devices
  *
index 845abc107ad5f05e0b85fe5325a05e216f6f9817..b842dfdc903f1f9649a27a907157a049e1cde4a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IRQCHIP)                  += irqchip.o
 
 obj-$(CONFIG_ALPINE_MSI)               += irq-alpine-msi.o
index cd2dc8bbbe9c2669c59374aa744e4ab3d23d2c45..0bf98425dca58878f3e850dd4d75daaa9817d2b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * irqchip for the Faraday Technology FTINTC010 Copyright (C) 2017 Linus
  * Walleij <linus.walleij@linaro.org>
index 18d58d2b4ffeb8b50e2df2179e95e15f3185d033..b4c1924f0255453937d11204f879a71d48068abc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Special GIC quirks for the ARM RealView
  * Copyright (C) 2015 Linus Walleij
index e8d89343d6139424e2caf0baa112955b7005b2e4..e88395605e32dc32960974a4e8707a30037b107b 100644 (file)
@@ -107,6 +107,10 @@ struct its_node {
 
 #define ITS_ITT_ALIGN          SZ_256
 
+/* The maximum number of VPEID bits supported by VLPI commands */
+#define ITS_MAX_VPEID_BITS     (16)
+#define ITS_MAX_VPEID          (1 << (ITS_MAX_VPEID_BITS))
+
 /* Convert page order to size in bytes */
 #define PAGE_ORDER_TO_SIZE(o)  (PAGE_SIZE << (o))
 
@@ -308,7 +312,7 @@ static void its_encode_size(struct its_cmd_block *cmd, u8 size)
 
 static void its_encode_itt(struct its_cmd_block *cmd, u64 itt_addr)
 {
-       its_mask_encode(&cmd->raw_cmd[2], itt_addr >> 8, 50, 8);
+       its_mask_encode(&cmd->raw_cmd[2], itt_addr >> 8, 51, 8);
 }
 
 static void its_encode_valid(struct its_cmd_block *cmd, int valid)
@@ -318,7 +322,7 @@ static void its_encode_valid(struct its_cmd_block *cmd, int valid)
 
 static void its_encode_target(struct its_cmd_block *cmd, u64 target_addr)
 {
-       its_mask_encode(&cmd->raw_cmd[2], target_addr >> 16, 50, 16);
+       its_mask_encode(&cmd->raw_cmd[2], target_addr >> 16, 51, 16);
 }
 
 static void its_encode_collection(struct its_cmd_block *cmd, u16 col)
@@ -358,7 +362,7 @@ static void its_encode_its_list(struct its_cmd_block *cmd, u16 its_list)
 
 static void its_encode_vpt_addr(struct its_cmd_block *cmd, u64 vpt_pa)
 {
-       its_mask_encode(&cmd->raw_cmd[3], vpt_pa >> 16, 50, 16);
+       its_mask_encode(&cmd->raw_cmd[3], vpt_pa >> 16, 51, 16);
 }
 
 static void its_encode_vpt_size(struct its_cmd_block *cmd, u8 vpt_size)
@@ -1478,9 +1482,9 @@ static int its_setup_baser(struct its_node *its, struct its_baser *baser,
        u64 val = its_read_baser(its, baser);
        u64 esz = GITS_BASER_ENTRY_SIZE(val);
        u64 type = GITS_BASER_TYPE(val);
+       u64 baser_phys, tmp;
        u32 alloc_pages;
        void *base;
-       u64 tmp;
 
 retry_alloc_baser:
        alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz);
@@ -1496,8 +1500,24 @@ retry_alloc_baser:
        if (!base)
                return -ENOMEM;
 
+       baser_phys = virt_to_phys(base);
+
+       /* Check if the physical address of the memory is above 48bits */
+       if (IS_ENABLED(CONFIG_ARM64_64K_PAGES) && (baser_phys >> 48)) {
+
+               /* 52bit PA is supported only when PageSize=64K */
+               if (psz != SZ_64K) {
+                       pr_err("ITS: no 52bit PA support when psz=%d\n", psz);
+                       free_pages((unsigned long)base, order);
+                       return -ENXIO;
+               }
+
+               /* Convert 52bit PA to 48bit field */
+               baser_phys = GITS_BASER_PHYS_52_to_48(baser_phys);
+       }
+
 retry_baser:
-       val = (virt_to_phys(base)                                |
+       val = (baser_phys                                        |
                (type << GITS_BASER_TYPE_SHIFT)                  |
                ((esz - 1) << GITS_BASER_ENTRY_SIZE_SHIFT)       |
                ((alloc_pages - 1) << GITS_BASER_PAGES_SHIFT)    |
@@ -1582,13 +1602,12 @@ retry_baser:
 
 static bool its_parse_indirect_baser(struct its_node *its,
                                     struct its_baser *baser,
-                                    u32 psz, u32 *order)
+                                    u32 psz, u32 *order, u32 ids)
 {
        u64 tmp = its_read_baser(its, baser);
        u64 type = GITS_BASER_TYPE(tmp);
        u64 esz = GITS_BASER_ENTRY_SIZE(tmp);
        u64 val = GITS_BASER_InnerShareable | GITS_BASER_RaWaWb;
-       u32 ids = its->device_ids;
        u32 new_order = *order;
        bool indirect = false;
 
@@ -1680,9 +1699,13 @@ static int its_alloc_tables(struct its_node *its)
                        continue;
 
                case GITS_BASER_TYPE_DEVICE:
+                       indirect = its_parse_indirect_baser(its, baser,
+                                                           psz, &order,
+                                                           its->device_ids);
                case GITS_BASER_TYPE_VCPU:
                        indirect = its_parse_indirect_baser(its, baser,
-                                                           psz, &order);
+                                                           psz, &order,
+                                                           ITS_MAX_VPEID_BITS);
                        break;
                }
 
@@ -2551,7 +2574,7 @@ static struct irq_chip its_vpe_irq_chip = {
 
 static int its_vpe_id_alloc(void)
 {
-       return ida_simple_get(&its_vpeid_ida, 0, 1 << 16, GFP_KERNEL);
+       return ida_simple_get(&its_vpeid_ida, 0, ITS_MAX_VPEID, GFP_KERNEL);
 }
 
 static void its_vpe_id_free(u16 id)
@@ -2851,7 +2874,7 @@ static int its_init_vpe_domain(void)
                return -ENOMEM;
        }
 
-       BUG_ON(entries != vpe_proxy.dev->nr_ites);
+       BUG_ON(entries > vpe_proxy.dev->nr_ites);
 
        raw_spin_lock_init(&vpe_proxy.lock);
        vpe_proxy.next_victim = 0;
index 519149ec905378d59e9abb931515542b91b133c6..b5df99c6f680f940a48223455a377a1ef8e07cb2 100644 (file)
@@ -1042,7 +1042,7 @@ static int get_cpu_number(struct device_node *dn)
 {
        const __be32 *cell;
        u64 hwid;
-       int i;
+       int cpu;
 
        cell = of_get_property(dn, "reg", NULL);
        if (!cell)
@@ -1056,9 +1056,9 @@ static int get_cpu_number(struct device_node *dn)
        if (hwid & ~MPIDR_HWID_BITMASK)
                return -1;
 
-       for (i = 0; i < num_possible_cpus(); i++)
-               if (cpu_logical_map(i) == hwid)
-                       return i;
+       for_each_possible_cpu(cpu)
+               if (cpu_logical_map(cpu) == hwid)
+                       return cpu;
 
        return -1;
 }
index 2370e6d9e603ad17a57016974608b8aade9f85a2..cd0bcc3b7e33709a472c1952c5ee7ccdf1ea0382 100644 (file)
@@ -173,7 +173,9 @@ int its_map_vlpi(int irq, struct its_vlpi_map *map)
 {
        struct its_cmd_info info = {
                .cmd_type = MAP_VLPI,
-               .map      = map,
+               {
+                       .map      = map,
+               },
        };
 
        /*
@@ -189,7 +191,9 @@ int its_get_vlpi(int irq, struct its_vlpi_map *map)
 {
        struct its_cmd_info info = {
                .cmd_type = GET_VLPI,
-               .map      = map,
+               {
+                       .map      = map,
+               },
        };
 
        return irq_set_vcpu_affinity(irq, &info);
@@ -205,7 +209,9 @@ int its_prop_update_vlpi(int irq, u8 config, bool inv)
 {
        struct its_cmd_info info = {
                .cmd_type = inv ? PROP_UPDATE_AND_INV_VLPI : PROP_UPDATE_VLPI,
-               .config   = config,
+               {
+                       .config   = config,
+               },
        };
 
        return irq_set_vcpu_affinity(irq, &info);
index c02d29c9dc05b77aa4ed62083ef22fbdf5feaea8..1f59998e03f806e72ad48434885192ffacf98c70 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IMG PowerDown Controller (PDC)
  *
index be7216bfb8dd7373d3bda856bf2a737090b7c0f9..e67483161f0fb6e221b40afe260fd3b88bca7d22 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Meta External interrupt code.
  *
index a5f053bd2f443301a3bf62a9c30c523cded309cd..857b946747eb434809c2919449a4994991662fcc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Meta internal (HWSTATMETA) interrupt code.
  *
index 6e52a88bbd9e9cc7a832d67b13c717efe5cb039a..c90976d7e53ccc596b65a0864ef169f1aa1fafd8 100644 (file)
@@ -169,20 +169,19 @@ static void gic_mask_irq(struct irq_data *d)
 {
        unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);
 
-       write_gic_rmask(BIT(intr));
+       write_gic_rmask(intr);
        gic_clear_pcpu_masks(intr);
 }
 
 static void gic_unmask_irq(struct irq_data *d)
 {
-       struct cpumask *affinity = irq_data_get_affinity_mask(d);
        unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);
        unsigned int cpu;
 
-       write_gic_smask(BIT(intr));
+       write_gic_smask(intr);
 
        gic_clear_pcpu_masks(intr);
-       cpu = cpumask_first_and(affinity, cpu_online_mask);
+       cpu = cpumask_first(irq_data_get_effective_affinity_mask(d));
        set_bit(intr, per_cpu_ptr(pcpu_masks, cpu));
 }
 
@@ -420,13 +419,17 @@ static int gic_shared_irq_domain_map(struct irq_domain *d, unsigned int virq,
                                     irq_hw_number_t hw, unsigned int cpu)
 {
        int intr = GIC_HWIRQ_TO_SHARED(hw);
+       struct irq_data *data;
        unsigned long flags;
 
+       data = irq_get_irq_data(virq);
+
        spin_lock_irqsave(&gic_lock, flags);
        write_gic_map_pin(intr, GIC_MAP_PIN_MAP_TO_PIN | gic_cpu_pin);
        write_gic_map_vp(intr, BIT(mips_cm_vp_id(cpu)));
        gic_clear_pcpu_masks(intr);
        set_bit(intr, per_cpu_ptr(pcpu_masks, cpu));
+       irq_data_update_effective_affinity(data, cpumask_of(cpu));
        spin_unlock_irqrestore(&gic_lock, flags);
 
        return 0;
@@ -645,7 +648,7 @@ static int __init gic_of_init(struct device_node *node,
 
        /* Find the first available CPU vector. */
        i = 0;
-       reserved = (C_SW0 | C_SW1) >> __fls(C_SW0);
+       reserved = (C_SW0 | C_SW1) >> __ffs(C_SW0);
        while (!of_property_read_u32_index(node, "mti,reserved-cpu-vectors",
                                           i++, &cpu_vec))
                reserved |= BIT(cpu_vec);
@@ -684,11 +687,11 @@ static int __init gic_of_init(struct device_node *node,
 
        gicconfig = read_gic_config();
        gic_shared_intrs = gicconfig & GIC_CONFIG_NUMINTERRUPTS;
-       gic_shared_intrs >>= __fls(GIC_CONFIG_NUMINTERRUPTS);
+       gic_shared_intrs >>= __ffs(GIC_CONFIG_NUMINTERRUPTS);
        gic_shared_intrs = (gic_shared_intrs + 1) * 8;
 
        gic_vpes = gicconfig & GIC_CONFIG_PVPS;
-       gic_vpes >>= __fls(GIC_CONFIG_PVPS);
+       gic_vpes >>= __ffs(GIC_CONFIG_PVPS);
        gic_vpes = gic_vpes + 1;
 
        if (cpu_has_veic) {
@@ -767,7 +770,7 @@ static int __init gic_of_init(struct device_node *node,
        for (i = 0; i < gic_shared_intrs; i++) {
                change_gic_pol(i, GIC_POL_ACTIVE_HIGH);
                change_gic_trig(i, GIC_TRIG_LEVEL);
-               write_gic_rmask(BIT(i));
+               write_gic_rmask(i);
        }
 
        for (i = 0; i < gic_vpes; i++) {
index b283fc90be1e2505066867d269bdecfe7a1113e4..17a4a7b6cdbb989e1cf9a3b165dc6392e0b7eaf8 100644 (file)
@@ -194,6 +194,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        gicp->dev = &pdev->dev;
+       spin_lock_init(&gicp->spi_lock);
 
        gicp->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!gicp->res)
index 98535e886ea5ac58e3509c27cffe6ed76a396c73..eaa12fb7210273308c284786a64868bb76c1ea5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MVEBU_GICP_H__
 #define __MVEBU_GICP_H__
 
index b8327590ae521e62c7555c26ae8e37b62c168a28..1054d74b7eddec94bf107be79c7bc3581976846c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * H8/300H interrupt controller driver
  *
index 71d8139be26cd43f18582b6f5d5186a0c578494c..aed31afb02169ca165271ea742a036ca71ac9879 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * H8S interrupt contoller driver
  *
index bdbb5c0ff7fe3bd956c1c9d12364aee4cd8c5eba..0c085303a58302cc982f69e52b0a5ea8e5c60c25 100644 (file)
@@ -141,7 +141,7 @@ static void __init tangox_irq_init_chip(struct irq_chip_generic *gc,
        for (i = 0; i < 2; i++) {
                ct[i].chip.irq_ack = irq_gc_ack_set_bit;
                ct[i].chip.irq_mask = irq_gc_mask_disable_reg;
-               ct[i].chip.irq_mask_ack = irq_gc_mask_disable_reg_and_ack;
+               ct[i].chip.irq_mask_ack = irq_gc_mask_disable_and_ack_set;
                ct[i].chip.irq_unmask = irq_gc_unmask_enable_reg;
                ct[i].chip.irq_set_type = tangox_irq_set_type;
                ct[i].chip.name = gc->domain->name;
index 37dd4645bf18810bc2d20a90fdd6a02946c03ba8..928858dada756255cbb4c27c2ae0c191373e6513 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Support for Versatile FPGA-based IRQ controllers
  */
index c32e45826c2c36d2ae379db2a12dce0f2d34c616..e7d3d8f2ad5a50c9c6bf2262241832a95edaad13 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the kernel ISDN subsystem and device drivers.
 
 # Object files in subdirectories
index 4d5b4b71db1e48314d079e77deffc7ba73f7b356..06da3ed2c40ab18e3f884e1d03767bf4f6b5e9d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the CAPI subsystem.
 
 # Ordering constraints: kernelcapi.o first
index 33361f833c01f5ace0bf1bf3bbd02e561cf2b5d5..a39ad3796bba101fa84c9226f145ebcedfe72c0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/slab.h>
 #include <linux/kernel.h>
index c453b72272a0902c4c73c95f591f7d0ab0232d78..ac45a2739f56224c2be4d353da4559ee95a7604c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 gigaset-y := common.o interface.o proc.o ev-layer.o asyncdata.o
 gigaset-$(CONFIG_GIGASET_CAPI) += capi.o
 gigaset-$(CONFIG_GIGASET_I4L) += i4l.o
index b540e8f2efb628d6ee834796bd9d8612db7a983e..3830a0573fcc61cfca610e7c1d5c5e22cd0580d0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the AVM ISDN device drivers
 
 # Each configuration option enables a list of files.
index 4fa7fdb7df0d7dbb2a96a2319b13ba860b092948..a0ab2e2d7df0d2371c5f5643344faa437a1d18e1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Eicon DIVA ISDN drivers.
 
 # Each configuration option enables a list of files.
index 71a7c2f084a731a8c748c2c799b9fd90b66f3781..f9b24eb8781dfcdc3d630eb8fe25ed60f2150b60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: adapter.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */
 
 #ifndef __DIVA_USER_MODE_IDI_ADAPTER_H__
index 8bc2791bc39c19f15ba91be7bd1f4007fdf43e94..301788115c4f5d38b1d9c537571d1b2cc38ef7da 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "platform.h"
 #include "pc.h"
 #include "di_defs.h"
index d91dd580e9781bc73704d3ad41c009265e227320..944a7f3380991d107b0a3f50a9dfd100ba0719a8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: diva.c,v 1.21.4.1 2004/05/08 14:33:43 armin Exp $ */
 
 #define CARDTYPE_H_WANT_DATA            1
index e979085d1b891ff50497337849cd8a5157ffa57e..b067032093a8a2bb656f3e8c58fa91bccad7b056 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: diva.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */
 
 #ifndef __DIVA_XDI_OS_PART_H__
index bb4b562050f6ab7560cb8d135c3b6042f7e07e2a..7ef5db98ad3c7d751a82d027fe0464c581d2a34a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: diva_pci.h,v 1.6 2003/01/04 15:29:45 schindler Exp $ */
 
 #ifndef __DIVA_PCI_INTERFACE_H__
index 6992c45457a4e54cb95fa245c4741622cd2c897e..2da9799686abea340f21229aa32bd5edd845c54a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: dqueue.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */
 
 #ifndef _DIVA_USER_MODE_IDI_DATA_QUEUE_H__
index fe36f138be8b8bdf149891f96f29dc65ace01eac..85edd3ea50f7d15a7bc55856dd005b4133ff8ce7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: dsp_tst.h,v 1.1.2.2 2001/02/08 12:25:43 armin Exp $ */
 
 #ifndef __DIVA_PRI_HOST_TEST_DSPS_H__
index fdb83416af31ce44eb50e066581a36d3c2f35cf5..f9767d321db9ed0af496cdf23d1d017f4f30325a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: entity.h,v 1.4 2004/03/21 17:26:01 armin Exp $ */
 
 #ifndef __DIVAS_USER_MODE_IDI_ENTITY__
index 1891246807edfadffbdb6d1cacb0b9a776217ac3..87db5f4df27d0ab1771781d829b6ea57cf548a78 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: os_4bri.c,v 1.28.4.4 2005/02/11 19:40:25 armin Exp $ */
 
 #include "platform.h"
index 72253278d4f5cc6bc4e83f7723bbb0b47b2f2dbe..94b2709537d83a384d449ab8bdc465b4d5314ea1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: os_4bri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */
 
 #ifndef __DIVA_OS_4_BRI_H__
index 20f2653c58fad6fa0644215ecb769b5e7c6f3b31..de93090bcacb1f68c74008bfc19934a5d27ad909 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: os_bri.c,v 1.21 2004/03/21 17:26:01 armin Exp $ */
 
 #include "platform.h"
index 02e7456f8962156e3a77628a97633cc247e708e9..37c92cc53dedc8971f88f84b93f38826ec15f06c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: os_bri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */
 
 #ifndef __DIVA_OS_BRI_REV_1_H__
index da4957abb422258c87d8044c17a8390237a976ac..b20f1fb89d14a76601e563d3afe4641d849d357e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: os_pri.c,v 1.32 2004/03/21 17:26:01 armin Exp $ */
 
 #include "platform.h"
index 537c74d042e71432ae8dd085ddadba809ad3bddc..0e91855b171a6f0db53401aad8aca1edb7066b99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: os_pri.h,v 1.1.2.2 2001/02/08 12:25:44 armin Exp $ */
 
 #ifndef __DIVA_OS_PRI_REV_1_H__
index e1519718ce67e3ed4363078eb3e8207b6b9f1db6..db4dd4ff3642db237c97b5bf48c0f7bc38f3df7b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Id: um_idi.c,v 1.14 2004/03/21 17:54:37 armin Exp $ */
 
 #include "platform.h"
index ffb88f7b42fc51c0332f4aef439d05c811f0e0d3..9aedd9e351a3990920f8e95e378bcf5484949e3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: um_idi.h,v 1.6 2004/03/21 17:26:01 armin Exp $ */
 
 #ifndef __DIVA_USER_MODE_IDI_CORE_H__
index b48fc042a5bc407bdb842a7a08c15e58ddc4bb35..1f37aa4efd18d693c51bb9b8bc7747bce50c1c79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: um_xdi.h,v 1.1.2.2 2002/10/02 14:38:38 armin Exp $ */
 
 #ifndef __DIVA_USER_MODE_XDI_H__
index d303e65dbe6cec03b871f345c69f64526b0924a1..b036e217c65953d77c686ffa5d120b7f7207008f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: xdi_adapter.h,v 1.7 2004/03/21 17:26:01 armin Exp $ */
 
 #ifndef __DIVA_OS_XDI_ADAPTER_H__
index 2498c349a32e49e9379559224b2652d6e9d33e82..0646079bf466bff44593ef2f4fe9f2aabd47d489 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: xdi_msg.h,v 1.1.2.2 2001/02/16 08:40:36 armin Exp $ */
 
 #ifndef __DIVA_XDI_UM_CFG_MESSAGE_H__
index 2987d990993f67e807f810e403cec47631dba678..422f9fd8ab9a441a2a11a7c45eae3c0d1c14fd78 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the modular ISDN hardware drivers
 #
index c601f880141e64e766ad470a350a49081b4f78ea..5acf826d913cd15e4a28217637450ec243855109 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * see notice in hfc_multi.c
  */
index 8a254747768e9de4181d6b133da05b292830e0ae..b0d772340e163d85217c2e19165b027c83a8984b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * For License see notice in hfc_multi.c
  *
index 5f8f1d9cac11a0b9b3c5d36a8e3b758644dd2e2b..e4fa2a2824af067c7b418fa1431eba1b05477767 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hfcsusb.h, HFC-S USB mISDN driver
  */
index 646368fe41c94a7a6444b3ce8023663c79cf0308..3eca9d23f1c2f1908bd242bf6746f9defaadfe5a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the hisax ISDN device driver
 
 # The target object and module list name.
index 6a8f89113d2f29b2b00e09e17f683e465b756c1c..4665b9d5df163a977b3c854f5bc68b129bcf7749 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /***************************************************************/
 /*  $Id: hfc4s8s_l1.h,v 1.1 2005/02/02 17:28:55 martinb1 Exp $ */
 /*                                                             */
index f987bf89da1a7c52cc44f33cc3cb5944fa8f04d5..9a212330e8a81831175141ecdc71ac4e63527b9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hfc_usb.h
  *
index aedef97827fe57f94e24e2d0ff1a75f17e84860d..1f64e9937aa13e70206f7ef6da38467c042af432 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "hisax_if.h"
 #include "hisax_isac.h"
 #include <linux/pci.h>
index 08890cf4d9239645c78907bf5e7fa525e3be77dd..d7301da97991ec786c2135cb39692da032bd2f52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HISAX_ISAC_H__
 #define __HISAX_ISAC_H__
 
index cb9d3bb9fae0a97926b6e9b13ff4483f1eb8739f..be77500c9e86ff1146b75b2e2fde9dbfa1c5f395 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the kernel ISDN subsystem and device drivers.
 
 # Each configuration option enables a list of files.
index 6c44609fd83a0f266df74b80bbe91f84b3bd4a67..cd2b3c69771a24b62a7952a8e7c626fde5459c6b 100644 (file)
@@ -825,7 +825,6 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
        isdn_net_local *lp;
        struct ippp_struct *is;
        int proto;
-       unsigned char protobuf[4];
 
        is = file->private_data;
 
@@ -839,24 +838,28 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
        if (!lp)
                printk(KERN_DEBUG "isdn_ppp_write: lp == NULL\n");
        else {
-               /*
-                * Don't reset huptimer for
-                * LCP packets. (Echo requests).
-                */
-               if (copy_from_user(protobuf, buf, 4))
-                       return -EFAULT;
-               proto = PPP_PROTOCOL(protobuf);
-               if (proto != PPP_LCP)
-                       lp->huptimer = 0;
+               if (lp->isdn_device < 0 || lp->isdn_channel < 0) {
+                       unsigned char protobuf[4];
+                       /*
+                        * Don't reset huptimer for
+                        * LCP packets. (Echo requests).
+                        */
+                       if (copy_from_user(protobuf, buf, 4))
+                               return -EFAULT;
+
+                       proto = PPP_PROTOCOL(protobuf);
+                       if (proto != PPP_LCP)
+                               lp->huptimer = 0;
 
-               if (lp->isdn_device < 0 || lp->isdn_channel < 0)
                        return 0;
+               }
 
                if ((dev->drv[lp->isdn_device]->flags & DRV_FLAG_RUNNING) &&
                    lp->dialstate == 0 &&
                    (lp->flags & ISDN_NET_CONNECTED)) {
                        unsigned short hl;
                        struct sk_buff *skb;
+                       unsigned char *cpy_buf;
                        /*
                         * we need to reserve enough space in front of
                         * sk_buff. old call to dev_alloc_skb only reserved
@@ -869,11 +872,21 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
                                return count;
                        }
                        skb_reserve(skb, hl);
-                       if (copy_from_user(skb_put(skb, count), buf, count))
+                       cpy_buf = skb_put(skb, count);
+                       if (copy_from_user(cpy_buf, buf, count))
                        {
                                kfree_skb(skb);
                                return -EFAULT;
                        }
+
+                       /*
+                        * Don't reset huptimer for
+                        * LCP packets. (Echo requests).
+                        */
+                       proto = PPP_PROTOCOL(cpy_buf);
+                       if (proto != PPP_LCP)
+                               lp->huptimer = 0;
+
                        if (is->debug & 0x40) {
                                printk(KERN_DEBUG "ppp xmit: len %d\n", (int) skb->len);
                                isdn_ppp_frame_log("xmit", skb->data, skb->len, 32, is->unit, lp->ppp_slot);
index 0a6bd2a9e730d5f0326f4f8c7152a95b890ed912..f3b4b7fa85f8eca391a4ff9eb70c9a373bf87e7c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the modular ISDN driver
 #
index bbca1eb5a8889afbb3a828455c81be8bdfba6d04..c9cb0ea249da0cc10663eb2775d57e56b7872014 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dsp_hwec.h
  */
index 661c060ada49fcea3cd9957a063be9eac8fbf683..7ea10db20e3a6567d91b4d6d8b63daa99eadaa98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * see notice in l1oip.c
  */
index 7d7b265529239496a3c508be42e45eade382e5ed..35980450db9b1e2c215178a56b62dc51d09d919a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 # LED Core
 obj-$(CONFIG_NEW_LEDS)                 += led-core.o
index bbbbe08982332a53fdad499cd5643f85b97e5898..9a257f9693009c7ec3a163dc83e7c0b2e5839dde 100644 (file)
 #define AS_PEAK_mA_TO_REG(a) \
        ((min_t(u32, AS_PEAK_mA_MAX, a) - 1250) / 250)
 
+/* LED numbers for Devicetree */
+#define AS_LED_FLASH                           0
+#define AS_LED_INDICATOR                       1
+
 enum as_mode {
        AS_MODE_EXT_TORCH = 0 << AS_CONTROL_MODE_SETTING_SHIFT,
        AS_MODE_INDICATOR = 1 << AS_CONTROL_MODE_SETTING_SHIFT,
@@ -491,10 +495,29 @@ static int as3645a_parse_node(struct as3645a *flash,
                              struct device_node *node)
 {
        struct as3645a_config *cfg = &flash->cfg;
+       struct device_node *child;
        const char *name;
        int rval;
 
-       flash->flash_node = of_get_child_by_name(node, "flash");
+       for_each_child_of_node(node, child) {
+               u32 id = 0;
+
+               of_property_read_u32(child, "reg", &id);
+
+               switch (id) {
+               case AS_LED_FLASH:
+                       flash->flash_node = of_node_get(child);
+                       break;
+               case AS_LED_INDICATOR:
+                       flash->indicator_node = of_node_get(child);
+                       break;
+               default:
+                       dev_warn(&flash->client->dev,
+                                "unknown LED %u encountered, ignoring\n", id);
+                       break;
+               }
+       }
+
        if (!flash->flash_node) {
                dev_err(&flash->client->dev, "can't find flash node\n");
                return -ENODEV;
@@ -534,11 +557,10 @@ static int as3645a_parse_node(struct as3645a *flash,
        of_property_read_u32(flash->flash_node, "voltage-reference",
                             &cfg->voltage_reference);
 
-       of_property_read_u32(flash->flash_node, "peak-current-limit",
+       of_property_read_u32(flash->flash_node, "ams,input-max-microamp",
                             &cfg->peak);
        cfg->peak = AS_PEAK_mA_TO_REG(cfg->peak);
 
-       flash->indicator_node = of_get_child_by_name(node, "indicator");
        if (!flash->indicator_node) {
                dev_warn(&flash->client->dev,
                         "can't find indicator node\n");
@@ -721,6 +743,7 @@ static int as3645a_remove(struct i2c_client *client)
        as3645a_set_control(flash, AS_MODE_EXT_TORCH, false);
 
        v4l2_flash_release(flash->vf);
+       v4l2_flash_release(flash->vfind);
 
        led_classdev_flash_unregister(&flash->fled);
        led_classdev_unregister(&flash->iled_cdev);
index a72c43cffebf43bc7ebfd1eb1103b9ccff73d075..9f2e868811e29d587cf82b25d42025990112d80f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o
 obj-$(CONFIG_LEDS_TRIGGER_ONESHOT)     += ledtrig-oneshot.o
 obj-$(CONFIG_LEDS_TRIGGER_DISK)                += ledtrig-disk.o
index 82d1a117fb2753c7610ae8790f996eac694ec2dc..2c3fd9d2c08c5e03477677eac57e188ed4fda427 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Open-Channel SSDs.
 #
index 516eb65bcaccb5e702788bc088f1c79b2bf8e570..ee803638e595baba642b9d7a10c35b0bc0b59be4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Macintosh-specific device drivers.
 #
index f5f4da3d0b675644963af93f327f03f455368bd8..dbc4a3e63396f49662128006ad1d9dff2ea9ce71 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * I/O Processor (IOP) ADB Driver
  * Written and (C) 1999 by Joshua M. Thompson (funaho@jurai.org)
index 039dc8285fc58b20b7ffc5513207415efdaadeee..289800b5235dc0b20457e4136f0821e0464beda4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for the Apple Desktop Bus
  * and the /dev/adb device on macintoshes.
index 09d72bb00d12c7756b2ba8c09012f2860f91f128..e091193104f741b724aaaf02e1a97037bf60c27f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/macintosh/adbhid.c
  *
index 90f094d454501eb1a9fe843466e3e42ac9471f9f..fe8d596f9845b92294ba05aeb2d09bce01919d6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/i2c.h>
 #include <linux/input-polldev.h>
 #include <linux/kthread.h>
index 281fa9e6fc1fee2a0b5caf9bffd2632fe31dc0d2..1de81d922d8ace11c08ee367f5af525aed134dcd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * /dev/lcd driver for Apple Network Servers.
  */
index d795b9fd2db671c714e92b818bf03e2e14009355..f0a6e4c685577c89b66d999aea028f6a01b87af1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PPC_ANS_LCD_H
 #define _PPC_ANS_LCD_H
 
index 87de8d9bcfada8f3ca56d1952dda4342fc0dcc32..9a6223add30e6dfd3f2e2ec2efa42335a7bb1a77 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Driver for the ADB controller in the Mac I/O (Hydra) chip.
  */
index 281f5345661ef3ac0595554a270ed1dd2c5aec7d..ca4fcffe454ba8ec9806408efeaca30e938266f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/stat.h>
 #include <asm/macio.h>
index 147da4edd0213de5b04858466673e9a5adcb7a15..98dd702eb867829bb3c6b7864c108d352a561ceb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for the Cuda and Egret system controllers found on PowerMacs
  * and 68k Macs.
index 415c145c82991842ad819f339a8ce4efedccd7e6..4ba06a1695ea16fc2e02987f23213578f68dc890 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for the via ADB on (many) Mac II-class machines
  *
index 6f68537c93ce18ea77d593fd54eafadfb9ea10ae..89ed51571b62b003a69e17c0e66bb346e97b01ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Backlight code for via-pmu
  *
index 72c54de408e836ec0f822eac2e0e05fc30bd6b2c..5e52109eb9a6ff39c94d87c05319722829975105 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __VIA_PMU_EVENT_H
 #define __VIA_PMU_EVENT_H
 
index cce99f72e4ae6d4b7ab0b757828d5fbb8f17e530..c4c2b3b85ebc05f4ceea9c484f674ed40d427b42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for the via-pmu on Apple Powermacs.
  *
index a411c5cb77a18a86e784b70db78008daec27d11d..25465fb91ec9bd246c08f42fd22e423f878f7dbe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for the PMU on 68K-based Apple PowerBooks
  *
index d54e41206e175e1f6da697fa8d4415e8fd1cf75d..4896f8dcae95c32cecb12e74a02cc6820db89ee9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Generic MAILBOX API
 
 obj-$(CONFIG_MAILBOX)          += mailbox.o
index bcc7745774abfee8ffa2e552c5f0175cd25be01b..77073c5928f421243a572c8f5387b102cac4846a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_MCB) += mcb.o
 
index d6e6933b19f1863f72a2b5fdc810dc3086a36f6f..3602cb3b2021740aaa0247403ae4a9946b459f1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MCB_INTERNAL
 #define __MCB_INTERNAL
 
index 786ec9e86d658aeb78d0cdc9adc7932bd9fc61ab..e94b6f9be941428890424902c5a8a6b56e13e58c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel software RAID and LVM drivers.
 #
index c488b846f831b9605789779310c90380fa3eb039..d26b35195825223ff7d45d9cabbcb4ab88761f62 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_BCACHE)   += bcache.o
 
index cacbe2dbd5c31757229e8e27e77845e59777d6ea..08035634795c12d26730375abc4ac8b7c399c5ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Primary bucket allocation code
  *
index 2ed9bd231d84bcac50098554dc845dc1b27d15df..abd31e847f967203e9f702cb4ca6e1772f6a7d46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_H
 #define _BCACHE_H
 
index 18526d44688de271fbb8a893920c0239c0bc12d0..e56d3ecdbfcb535625423d577ec2dc1b8a84422c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Code for working with individual keys, and sorted sets of keys with in a
  * btree node
index ae964624efb248d59f9af530c44b68175ac4324e..fa506c1aa5243376c42182485dcd79208ad3c002 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_BSET_H
 #define _BCACHE_BSET_H
 
index 866dcf78ff8e691e051dace4506ae0ac760b2901..658c54b3b07a96e8f53b73b1e30eba117e2a2274 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2010 Kent Overstreet <kent.overstreet@gmail.com>
  *
index 73da1f5626cb85880f41c1e3cf8fcd9e5584001f..42204d61bc9544d29f1d9b53f8eb0b6211c909f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_BTREE_H
 #define _BCACHE_BTREE_H
 
index 7d5286b05036976059c3af6c7277a987b457c59d..1841d0359bace765cc52acd6340bb96efb5aa2ee 100644 (file)
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(closure_put);
 void __closure_wake_up(struct closure_waitlist *wait_list)
 {
        struct llist_node *list;
-       struct closure *cl;
+       struct closure *cl, *t;
        struct llist_node *reverse = NULL;
 
        list = llist_del_all(&wait_list->list);
@@ -73,7 +73,7 @@ void __closure_wake_up(struct closure_waitlist *wait_list)
        reverse = llist_reverse_order(list);
 
        /* Then do the wakeups */
-       llist_for_each_entry(cl, reverse, list) {
+       llist_for_each_entry_safe(cl, t, reverse, list) {
                closure_set_waiting(cl, 0);
                closure_sub(cl, CLOSURE_WAITING + 1);
        }
index 295b7e43f92c233c0d1e0cf0575dc9f0e99481cf..965907ce1e2097672d260f43fb8f7ddc5343b414 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CLOSURE_H
 #define _LINUX_CLOSURE_H
 
index 61076eda2e6ddc24924c2d0886c3092eb50841ae..c7a02c4900dab31b31150d94efcc109f2b50b737 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Assorted bcache debug code
  *
index 1f63c195d2476ece1b0c50b6acdddd1a1d92ba8b..acc48d3fa274d9d031f13b3609ec41cd0e307478 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_DEBUG_H
 #define _BCACHE_DEBUG_H
 
index 243de0bf15cdbf359965dff55cac4762b804362f..41c238fc37338073632c017d705143b62e344e6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2010 Kent Overstreet <kent.overstreet@gmail.com>
  *
index e2ed54054e7a9106b50d0d2a3f6eb7967ce4e494..0cd3575afa1d0b68f6845dd7bebd4e041889b4f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_EXTENTS_H
 #define _BCACHE_EXTENTS_H
 
index 7e871bdc009755e942da9fc08441fafdd1950d72..fac97ec2d0e2b3924f9b153cdff89ab58147f893 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Some low level IO code, and hacks for various block layer limitations
  *
index 7e1d1c3ba33abe7edde492a6592d7fc112b35ed7..02a98ddb592d3b7aaaf0f12cc31b6a5937988ffe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bcache journalling code, for btree insertions
  *
index e3c39457afbb19a7a47b9c23eb9b127520223523..b5788199188feac0a2626be4a360c5d0fc7da368 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_JOURNAL_H
 #define _BCACHE_JOURNAL_H
 
index f633b30c962e197db1480f58eb6591c466dd9aab..d50c1c97da68ea841a0196a7e92f3abd29d863f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Moving/copying garbage collector
  *
index 681b4f12b05a0ceb2a23028bb8857b28e0ee86cd..3475d6628e219f6eecda80e1bf98c56ef67c3bc4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Main bcache entry point - handle a read or a write request and decide what to
  * do with it; the make_request functions are called by the block layer.
index 7689176951ce5bed3eeed3a0d33f9f8e28284fb9..dea0886b81c1740de564a64581eb9b3deff46dd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_REQUEST_H_
 #define _BCACHE_REQUEST_H_
 
index 0ca072c20d0d35dacce85e29d1ad8e8762854344..d0831d5bcc87076e9bdb9e95f5da35fdfad29447 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bcache stats code
  *
index adbff141c88786c0dd7c3926d682322dd7dfb6ec..0b70f9de0c037adddef78d58cc46eb8633b00329 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_STATS_H_
 #define _BCACHE_STATS_H_
 
index 104c57cd666ce7873912ac48be51d32a14b37a01..234b2f5b286df209984ed1223ae51cedfbb9e314 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bcache sysfs interfaces
  *
index 0526fe92a6839ff8f04e2ccc986f3d294e4d8445..b54fe9602529ebda4ab71e7d306617137290cf39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_SYSFS_H_
 #define _BCACHE_SYSFS_H_
 
index b7820b0d2621a1d34aa971c84601e884b33fc023..a9a73f560c044243e2ad9357d22725576ea5bbcc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "bcache.h"
 #include "btree.h"
 
index cb8d2ccbb6c6e7223aa0f806d45546c56421de7e..f54b58282f7756acd13600206714a1e4064728b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _BCACHE_UTIL_H
 #define _BCACHE_UTIL_H
index e663ca082183e6a126305fd62757ad538111cd9f..70454f2ad2faacde608f40638dd55955eed4e586 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * background writeback - scan btree for dirty data and write it to the backing
  * device
index e35421d20d2eb32b75d48707fe00ecb7f4fdfb72..151544740148618ef8b22407618e42af5855ea28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCACHE_WRITEBACK_H
 #define _BCACHE_WRITEBACK_H
 
index d15721ac07a6214298b611e2f5d4f6857705f790..5df35ca90f58b5b9156913a478d1f51f561a0a7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
  *
index f092771878c20299d829f87ae710b023eea91bc6..8eb52e425141d3491d72effe22b9ae2e794abb68 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "dm-core.h"
 
 /*
index 24eddbdf2ab4cb9437674a3783ffbbfaca8a21fd..203144762f3688ab118ccd2e865df3c427b4dca5 100644 (file)
@@ -149,5 +149,6 @@ static inline bool dm_message_test_buffer_overflow(char *result, unsigned maxlen
 
 extern atomic_t dm_global_event_nr;
 extern wait_queue_head_t dm_global_eventq;
+void dm_issue_global_event(void);
 
 #endif
index a55ffd4f5933fc1247b6729dcc0344964c9f01b8..96ab46512e1fdcf27e4669f22d97b553b491c196 100644 (file)
@@ -2466,6 +2466,7 @@ static int crypt_ctr_cipher_old(struct dm_target *ti, char *cipher_in, char *key
                kfree(cipher_api);
                return ret;
        }
+       kfree(cipher_api);
 
        return 0;
 bad_mem:
@@ -2584,6 +2585,10 @@ static int crypt_ctr_optional(struct dm_target *ti, unsigned int argc, char **ar
                                ti->error = "Invalid feature value for sector_size";
                                return -EINVAL;
                        }
+                       if (ti->len & ((cc->sector_size >> SECTOR_SHIFT) - 1)) {
+                               ti->error = "Device size is not multiple of sector_size feature";
+                               return -EINVAL;
+                       }
                        cc->sector_shift = __ffs(cc->sector_size) - SECTOR_SHIFT;
                } else if (!strcasecmp(opt_string, "iv_large_sectors"))
                        set_bit(CRYPT_IV_LARGE_SECTORS, &cc->cipher_flags);
index 8756a6850431d007f756079a595f5ae30d51a8df..e52676fa9832c53dcd57dc37eb654e3e7eee0d88 100644 (file)
@@ -477,9 +477,13 @@ static int remove_all(struct file *filp, struct dm_ioctl *param, size_t param_si
  * Round up the ptr to an 8-byte boundary.
  */
 #define ALIGN_MASK 7
+static inline size_t align_val(size_t val)
+{
+       return (val + ALIGN_MASK) & ~ALIGN_MASK;
+}
 static inline void *align_ptr(void *ptr)
 {
-       return (void *) (((size_t) (ptr + ALIGN_MASK)) & ~ALIGN_MASK);
+       return (void *)align_val((size_t)ptr);
 }
 
 /*
@@ -505,7 +509,7 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_
        struct hash_cell *hc;
        size_t len, needed = 0;
        struct gendisk *disk;
-       struct dm_name_list *nl, *old_nl = NULL;
+       struct dm_name_list *orig_nl, *nl, *old_nl = NULL;
        uint32_t *event_nr;
 
        down_write(&_hash_lock);
@@ -516,17 +520,15 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_
         */
        for (i = 0; i < NUM_BUCKETS; i++) {
                list_for_each_entry (hc, _name_buckets + i, name_list) {
-                       needed += sizeof(struct dm_name_list);
-                       needed += strlen(hc->name) + 1;
-                       needed += ALIGN_MASK;
-                       needed += (sizeof(uint32_t) + ALIGN_MASK) & ~ALIGN_MASK;
+                       needed += align_val(offsetof(struct dm_name_list, name) + strlen(hc->name) + 1);
+                       needed += align_val(sizeof(uint32_t));
                }
        }
 
        /*
         * Grab our output buffer.
         */
-       nl = get_result_buffer(param, param_size, &len);
+       nl = orig_nl = get_result_buffer(param, param_size, &len);
        if (len < needed) {
                param->flags |= DM_BUFFER_FULL_FLAG;
                goto out;
@@ -549,11 +551,16 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_
                        strcpy(nl->name, hc->name);
 
                        old_nl = nl;
-                       event_nr = align_ptr(((void *) (nl + 1)) + strlen(hc->name) + 1);
+                       event_nr = align_ptr(nl->name + strlen(hc->name) + 1);
                        *event_nr = dm_get_event_nr(hc->md);
                        nl = align_ptr(event_nr + 1);
                }
        }
+       /*
+        * If mismatch happens, security may be compromised due to buffer
+        * overflow, so it's better to crash.
+        */
+       BUG_ON((char *)nl - (char *)orig_nl != needed);
 
  out:
        up_write(&_hash_lock);
@@ -1621,7 +1628,8 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
  * which has a variable size, is not used by the function processing
  * the ioctl.
  */
-#define IOCTL_FLAGS_NO_PARAMS  1
+#define IOCTL_FLAGS_NO_PARAMS          1
+#define IOCTL_FLAGS_ISSUE_GLOBAL_EVENT 2
 
 /*-----------------------------------------------------------------
  * Implementation of open/close/ioctl on the special char
@@ -1635,12 +1643,12 @@ static ioctl_fn lookup_ioctl(unsigned int cmd, int *ioctl_flags)
                ioctl_fn fn;
        } _ioctls[] = {
                {DM_VERSION_CMD, 0, NULL}, /* version is dealt with elsewhere */
-               {DM_REMOVE_ALL_CMD, IOCTL_FLAGS_NO_PARAMS, remove_all},
+               {DM_REMOVE_ALL_CMD, IOCTL_FLAGS_NO_PARAMS | IOCTL_FLAGS_ISSUE_GLOBAL_EVENT, remove_all},
                {DM_LIST_DEVICES_CMD, 0, list_devices},
 
-               {DM_DEV_CREATE_CMD, IOCTL_FLAGS_NO_PARAMS, dev_create},
-               {DM_DEV_REMOVE_CMD, IOCTL_FLAGS_NO_PARAMS, dev_remove},
-               {DM_DEV_RENAME_CMD, 0, dev_rename},
+               {DM_DEV_CREATE_CMD, IOCTL_FLAGS_NO_PARAMS | IOCTL_FLAGS_ISSUE_GLOBAL_EVENT, dev_create},
+               {DM_DEV_REMOVE_CMD, IOCTL_FLAGS_NO_PARAMS | IOCTL_FLAGS_ISSUE_GLOBAL_EVENT, dev_remove},
+               {DM_DEV_RENAME_CMD, IOCTL_FLAGS_ISSUE_GLOBAL_EVENT, dev_rename},
                {DM_DEV_SUSPEND_CMD, IOCTL_FLAGS_NO_PARAMS, dev_suspend},
                {DM_DEV_STATUS_CMD, IOCTL_FLAGS_NO_PARAMS, dev_status},
                {DM_DEV_WAIT_CMD, 0, dev_wait},
@@ -1869,6 +1877,9 @@ static int ctl_ioctl(struct file *file, uint command, struct dm_ioctl __user *us
            unlikely(ioctl_flags & IOCTL_FLAGS_NO_PARAMS))
                DMERR("ioctl %d tried to output some data but has IOCTL_FLAGS_NO_PARAMS set", cmd);
 
+       if (!r && ioctl_flags & IOCTL_FLAGS_ISSUE_GLOBAL_EVENT)
+               dm_issue_global_event();
+
        /*
         * Copy the results back to userland.
         */
index 5bfe285ea9d1c815ae8014064a29e4a08566d374..2245d06d204597b537c22caf48c4f88626051f57 100644 (file)
@@ -3238,7 +3238,7 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
        if (unlikely(bio_end_sector(bio) > mddev->array_sectors))
                return DM_MAPIO_REQUEUE;
 
-       mddev->pers->make_request(mddev, bio);
+       md_handle_request(mddev, bio);
 
        return DM_MAPIO_SUBMITTED;
 }
@@ -3297,11 +3297,10 @@ static const char *__raid_dev_status(struct raid_set *rs, struct md_rdev *rdev,
 static sector_t rs_get_progress(struct raid_set *rs,
                                sector_t resync_max_sectors, bool *array_in_sync)
 {
-       sector_t r, recovery_cp, curr_resync_completed;
+       sector_t r, curr_resync_completed;
        struct mddev *mddev = &rs->md;
 
        curr_resync_completed = mddev->curr_resync_completed ?: mddev->recovery_cp;
-       recovery_cp = mddev->recovery_cp;
        *array_in_sync = false;
 
        if (rs_is_raid0(rs)) {
@@ -3330,9 +3329,11 @@ static sector_t rs_get_progress(struct raid_set *rs,
                } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
                        r = curr_resync_completed;
                else
-                       r = recovery_cp;
+                       r = mddev->recovery_cp;
 
-               if (r == MaxSector) {
+               if ((r == MaxSector) ||
+                   (test_bit(MD_RECOVERY_DONE, &mddev->recovery) &&
+                    (mddev->curr_resync_completed == resync_max_sectors))) {
                        /*
                         * Sync complete.
                         */
@@ -3892,7 +3893,7 @@ static void raid_resume(struct dm_target *ti)
 
 static struct target_type raid_target = {
        .name = "raid",
-       .version = {1, 12, 1},
+       .version = {1, 13, 0},
        .module = THIS_MODULE,
        .ctr = raid_ctr,
        .dtr = raid_dtr,
index 6028d8247f5830cd796356414980ff95a74b1647..a7868503d1352dfee4927ceeac246d39160685a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/numa.h>
 #include <linux/slab.h>
index f1c0956e3843f51e40dc2da23a68fc54d7a141c3..2ddfae678f320f84776c772f1107da8eab485385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DM_STATS_H
 #define DM_STATS_H
 
index 6e54145969c5ce30184cf162283db0f01796f1ca..4be85324f44dc26177c17bf9ab6acf451dca3fcf 100644 (file)
@@ -52,6 +52,12 @@ static struct workqueue_struct *deferred_remove_workqueue;
 atomic_t dm_global_event_nr = ATOMIC_INIT(0);
 DECLARE_WAIT_QUEUE_HEAD(dm_global_eventq);
 
+void dm_issue_global_event(void)
+{
+       atomic_inc(&dm_global_event_nr);
+       wake_up(&dm_global_eventq);
+}
+
 /*
  * One of these is allocated per bio.
  */
@@ -1865,9 +1871,8 @@ static void event_callback(void *context)
        dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
 
        atomic_inc(&md->event_nr);
-       atomic_inc(&dm_global_event_nr);
        wake_up(&md->eventq);
-       wake_up(&dm_global_eventq);
+       dm_issue_global_event();
 }
 
 /*
@@ -2283,6 +2288,7 @@ struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table)
        }
 
        map = __bind(md, table, &limits);
+       dm_issue_global_event();
 
 out:
        mutex_unlock(&md->suspend_lock);
index 8d392e6098b3295ddbebac59e418a27ae21712e5..8381d651d4ed0a4453cbeb3bb250003c2f763fb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINEAR_H
 #define _LINEAR_H
 
index 2740161779834c184e111fa08fc9404c3b63ec33..c0240708f44332c3fbb8e37f32bbd3bd84eef926 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 
 #ifndef _MD_CLUSTER_H
index 08fcaebc61bdb52b92f8ba37ccd4d2b3dac41779..0ff1bbf6c90e5cebc782268313ce39f8c66f7270 100644 (file)
@@ -266,6 +266,37 @@ static DEFINE_SPINLOCK(all_mddevs_lock);
  * call has finished, the bio has been linked into some internal structure
  * and so is visible to ->quiesce(), so we don't need the refcount any more.
  */
+void md_handle_request(struct mddev *mddev, struct bio *bio)
+{
+check_suspended:
+       rcu_read_lock();
+       if (mddev->suspended) {
+               DEFINE_WAIT(__wait);
+               for (;;) {
+                       prepare_to_wait(&mddev->sb_wait, &__wait,
+                                       TASK_UNINTERRUPTIBLE);
+                       if (!mddev->suspended)
+                               break;
+                       rcu_read_unlock();
+                       schedule();
+                       rcu_read_lock();
+               }
+               finish_wait(&mddev->sb_wait, &__wait);
+       }
+       atomic_inc(&mddev->active_io);
+       rcu_read_unlock();
+
+       if (!mddev->pers->make_request(mddev, bio)) {
+               atomic_dec(&mddev->active_io);
+               wake_up(&mddev->sb_wait);
+               goto check_suspended;
+       }
+
+       if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended)
+               wake_up(&mddev->sb_wait);
+}
+EXPORT_SYMBOL(md_handle_request);
+
 static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
 {
        const int rw = bio_data_dir(bio);
@@ -285,23 +316,6 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
                bio_endio(bio);
                return BLK_QC_T_NONE;
        }
-check_suspended:
-       rcu_read_lock();
-       if (mddev->suspended) {
-               DEFINE_WAIT(__wait);
-               for (;;) {
-                       prepare_to_wait(&mddev->sb_wait, &__wait,
-                                       TASK_UNINTERRUPTIBLE);
-                       if (!mddev->suspended)
-                               break;
-                       rcu_read_unlock();
-                       schedule();
-                       rcu_read_lock();
-               }
-               finish_wait(&mddev->sb_wait, &__wait);
-       }
-       atomic_inc(&mddev->active_io);
-       rcu_read_unlock();
 
        /*
         * save the sectors now since our bio can
@@ -310,20 +324,14 @@ check_suspended:
        sectors = bio_sectors(bio);
        /* bio could be mergeable after passing to underlayer */
        bio->bi_opf &= ~REQ_NOMERGE;
-       if (!mddev->pers->make_request(mddev, bio)) {
-               atomic_dec(&mddev->active_io);
-               wake_up(&mddev->sb_wait);
-               goto check_suspended;
-       }
+
+       md_handle_request(mddev, bio);
 
        cpu = part_stat_lock();
        part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
        part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], sectors);
        part_stat_unlock();
 
-       if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended)
-               wake_up(&mddev->sb_wait);
-
        return BLK_QC_T_NONE;
 }
 
@@ -439,16 +447,22 @@ static void md_submit_flush_data(struct work_struct *ws)
        struct mddev *mddev = container_of(ws, struct mddev, flush_work);
        struct bio *bio = mddev->flush_bio;
 
+       /*
+        * must reset flush_bio before calling into md_handle_request to avoid a
+        * deadlock, because other bios passed md_handle_request suspend check
+        * could wait for this and below md_handle_request could wait for those
+        * bios because of suspend check
+        */
+       mddev->flush_bio = NULL;
+       wake_up(&mddev->sb_wait);
+
        if (bio->bi_iter.bi_size == 0)
                /* an empty barrier - all done */
                bio_endio(bio);
        else {
                bio->bi_opf &= ~REQ_PREFLUSH;
-               mddev->pers->make_request(mddev, bio);
+               md_handle_request(mddev, bio);
        }
-
-       mddev->flush_bio = NULL;
-       wake_up(&mddev->sb_wait);
 }
 
 void md_flush_request(struct mddev *mddev, struct bio *bio)
index 561d22b9a9a8acc9479cabc389948753ffe703eb..d8287d3cd1bf81b048e90166d91afe76566202b3 100644 (file)
@@ -692,6 +692,7 @@ extern void md_stop_writes(struct mddev *mddev);
 extern int md_rdev_init(struct md_rdev *rdev);
 extern void md_rdev_clear(struct md_rdev *rdev);
 
+extern void md_handle_request(struct mddev *mddev, struct bio *bio);
 extern void mddev_suspend(struct mddev *mddev);
 extern void mddev_resume(struct mddev *mddev);
 extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
index 717c60f628982ebf659c7aa00bd1608e0fc8ddf0..0adb941f485a123fdb9c838dc293d8a848c1db76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MULTIPATH_H
 #define _MULTIPATH_H
 
index ff528792c3583e300834e52bc84eeb5224c9992e..66be7c66479a12cc07fdeb603781ba69ac27c9bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DM_PERSISTENT_DATA) += dm-persistent-data.o
 dm-persistent-data-objs := \
        dm-array.o \
index 7127a623f5da2d4e5592270ee9291b9820efea81..540e65d92642d8427fbe3af4d5960834cc967a74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAID0_H
 #define _RAID0_H
 
index 9f2670b45f31ae8b99b09f33309bf31c6f704c7c..400001b815db1e3e1d044b23a594e1e72ec77526 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Maximum size of each resync request */
 #define RESYNC_BLOCK_SIZE (64*1024)
 #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
index c8894ef1e9d25d4cf7cb0561793bda9c7365a647..c7294e7557e038bf5248e8c8bf9ce84cb6afad58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAID1_H
 #define _RAID1_H
 
index 735ce1a3d260b706d7375ef9659bca92b330be1e..abceccab6671ffc20f695aef25926659f0f28bfc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAID10_H
 #define _RAID10_H
 
index 328d67aedda49dcf2a7c93d1d188d77108794647..7f9ad5f7cda025e3c421995cb48a7365aac949f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAID5_LOG_H
 #define _RAID5_LOG_H
 
index 4188a488114814aadf7df7b4c2ba07240b8e0408..928e24a071338ab6e1fe7668c8caa42b2803ccfe 100644 (file)
@@ -811,6 +811,14 @@ static void stripe_add_to_batch_list(struct r5conf *conf, struct stripe_head *sh
                        spin_unlock(&head->batch_head->batch_lock);
                        goto unlock_out;
                }
+               /*
+                * We must assign batch_head of this stripe within the
+                * batch_lock, otherwise clear_batch_ready of batch head
+                * stripe could clear BATCH_READY bit of this stripe and
+                * this stripe->batch_head doesn't get assigned, which
+                * could confuse clear_batch_ready for this stripe
+                */
+               sh->batch_head = head->batch_head;
 
                /*
                 * at this point, head's BATCH_READY could be cleared, but we
@@ -818,8 +826,6 @@ static void stripe_add_to_batch_list(struct r5conf *conf, struct stripe_head *sh
                 */
                list_add(&sh->batch_list, &head->batch_list);
                spin_unlock(&head->batch_head->batch_lock);
-
-               sh->batch_head = head->batch_head;
        } else {
                head->batch_head = head;
                sh->batch_head = head->batch_head;
@@ -4599,7 +4605,8 @@ static void break_stripe_batch_list(struct stripe_head *head_sh,
 
                set_mask_bits(&sh->state, ~(STRIPE_EXPAND_SYNC_FLAGS |
                                            (1 << STRIPE_PREREAD_ACTIVE) |
-                                           (1 << STRIPE_DEGRADED)),
+                                           (1 << STRIPE_DEGRADED) |
+                                           (1 << STRIPE_ON_UNPLUG_LIST)),
                              head_sh->state & (1 << STRIPE_INSYNC));
 
                sh->check_state = head_sh->check_state;
@@ -6568,14 +6575,17 @@ static ssize_t
 raid5_store_group_thread_cnt(struct mddev *mddev, const char *page, size_t len)
 {
        struct r5conf *conf;
-       unsigned long new;
+       unsigned int new;
        int err;
        struct r5worker_group *new_groups, *old_groups;
        int group_cnt, worker_cnt_per_group;
 
        if (len >= PAGE_SIZE)
                return -EINVAL;
-       if (kstrtoul(page, 10, &new))
+       if (kstrtouint(page, 10, &new))
+               return -EINVAL;
+       /* 8192 should be big enough */
+       if (new > 8192)
                return -EINVAL;
 
        err = mddev_lock(mddev);
index f6536399677abcb43e973017ab1f3773bdad90a3..2e6123825095296555e8a73a52d63872f2fa2bff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAID5_H
 #define _RAID5_H
 
index 044503aa8801744785da9c637bda4c020bfac766..594b462ddf0efab902599b1c0441075dab1f1c8c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel multimedia device drivers.
 #
index 3353c1741961bd824320b68ab9e84583f50afb22..41ee3325e1ea446075212cd983c34c2b9efc8263 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.o
 
 ifeq ($(CONFIG_CEC_NOTIFIER),y)
index eed6c397d8400b0a25c57feb6ef23dc49eac71df..f8a808d45034e048f9b0bc2c764c51d95e22bdc9 100644 (file)
@@ -1797,12 +1797,19 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
         */
        switch (msg->msg[1]) {
        case CEC_MSG_GET_CEC_VERSION:
-       case CEC_MSG_GIVE_DEVICE_VENDOR_ID:
        case CEC_MSG_ABORT:
        case CEC_MSG_GIVE_DEVICE_POWER_STATUS:
-       case CEC_MSG_GIVE_PHYSICAL_ADDR:
        case CEC_MSG_GIVE_OSD_NAME:
+               /*
+                * These messages reply with a directed message, so ignore if
+                * the initiator is Unregistered.
+                */
+               if (!adap->passthrough && from_unregistered)
+                       return 0;
+               /* Fall through */
+       case CEC_MSG_GIVE_DEVICE_VENDOR_ID:
        case CEC_MSG_GIVE_FEATURES:
+       case CEC_MSG_GIVE_PHYSICAL_ADDR:
                /*
                 * Skip processing these messages if the passthrough mode
                 * is on.
@@ -1810,7 +1817,7 @@ static int cec_receive_notify(struct cec_adapter *adap, struct cec_msg *msg,
                if (adap->passthrough)
                        goto skip_processing;
                /* Ignore if addressing is wrong */
-               if (is_broadcast || from_unregistered)
+               if (is_broadcast)
                        return 0;
                break;
 
index 24993a5b38ba81fe27e2b16f85f02be70944849f..73df4a334eda753abb88f491c39081f15fa4b2a3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 b2c2-flexcop-objs += flexcop.o flexcop-fe-tuner.o flexcop-i2c.o
 b2c2-flexcop-objs += flexcop-sram.o flexcop-eeprom.o flexcop-misc.o
 b2c2-flexcop-objs += flexcop-hw-filter.o
index 2533574c0cf41a49e0e0538217a01d94bb6de493..b7e5e4c17acbb238d96fd5b22ddcaf2a65e877c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-common.h - common header file for device-specific source files
index 844c7836c2a6d8e568fa9b6bb4750a5a378c21bc..0f2151cd36f29f8de371be2193e34d8f1052af18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-eeprom.c - eeprom access methods (currently only MAC address reading)
index 7636606f0be575cfa6e78a85fd3c432b6733b9ea..a1ce3e8eb1d33e438af0dfc3fda70f925a3acbbe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-fe-tuner.c - methods for frontend attachment and DiSEqC controlling
index 8220257903ef5f7ebb19408488f320e9e62fe664..335f30a54ba84211fdef6c2c3a51ab49fc37ac66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-hw-filter.c - pid and mac address filtering and control functions
index 58d39a59fc09bb1ae9514e194de8efa9ac3bb3df..564da6fa900d5c8c59fd0116b47e7b69805f32ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-i2c.c - flexcop internal 2Wire bus (I2C) and dvb i2c initialization
index bb0d95fe64f9a33460d100a83b41b1c721544e73..83d01d3a81cc1c9d07867531acccb5b2059267b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-misc.c - miscellaneous functions
index 835c54d60e74cd15ef87e42e5ebc8bed69401907..dd7c962db565b73907292354872bb041a8eaf3fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-reg.h - register abstraction for FlexCopII, FlexCopIIb and FlexCopIII
index 185c285f70fc99fc2b1bcf36b897c6158b8fa8d8..d97962eb01128af647ac79aafe9f1c4768cbf625 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-sram.c - functions for controlling the SRAM
index 8942bdacbf61befba5640d845d95d00e566cbc42..911ece59ea025a1cce8d1cfd81ec58ed32bd9f2d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop.h - private header file for all flexcop-chip-source files
index 8f64bdbd72bb6ab35791d5a384b41f09541ce346..c97a0d6d7b3ac4d4dfb9dfb6bd4b8788f3fbd3af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * register descriptions
  * see flexcop.c for copyright information
index c75830d7d94286c6e60524dea8c846847dd18d73..5db3b46f21ee5f90b17cbccc58e3bf2c6e0d9485 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * register descriptions
  * see flexcop.c for copyright information
index 03583ef905064e56d1d78b7f11a0bc1a5d955de6..76dc16f402b9ffe3ecd7f83a7f84d97959dac37d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  */
 struct btcx_riscmem {
index 1e4f2735620529a5bc3531947c15e003679b95df..0aa46e602b0787ac8d1e92f4260b189dc392b1e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
  * see dvb-usb-init.c for copyright information.
index 75897f95e4b434cb248bfda407fc824e58a638ad..f9e099d812c8dae41cdfe9befd9d1c670db0b54a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <media/drv-intf/saa7146_vv.h>
index d79e4d7ecd9f964450627765c30848cc79fe1b0b..371c6f8606de70129c1148cc86455fd743622247 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <media/drv-intf/saa7146_vv.h>
 
 static int vbi_pixel_to_capture = 720 * 2;
index 4c0567f106b2dc42d662a889a0130e7ffb0216fc..88e2b7ffc5370660c54176f5e927d5130ad273c8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o
 smsdvb-objs := smsdvb-main.o
 
index 281bc89576e6d981a726e0251797e7d787457f00..47e2e391bfb8c33a89ab57de84279a5aecbf22ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel DVB device drivers.
 #
index 5b6041d462bca64133d6b4cd6b904963841016bd..54d7d8a48b183aa04f239a8690f15edfa96ff43a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* dvb-usb-ids.h is part of the DVB USB library.
  *
  * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) see
index 2fcba16161685888164565bb24e0e917024092eb..9139d01ba7ed6c9470896dea8500a433d9c05240 100644 (file)
@@ -141,22 +141,39 @@ struct dvb_frontend_private {
 static void dvb_frontend_invoke_release(struct dvb_frontend *fe,
                                        void (*release)(struct dvb_frontend *fe));
 
-static void dvb_frontend_free(struct kref *ref)
+static void __dvb_frontend_free(struct dvb_frontend *fe)
 {
-       struct dvb_frontend *fe =
-               container_of(ref, struct dvb_frontend, refcount);
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
+       if (!fepriv)
+               return;
+
        dvb_free_device(fepriv->dvbdev);
 
        dvb_frontend_invoke_release(fe, fe->ops.release);
 
        kfree(fepriv);
+       fe->frontend_priv = NULL;
+}
+
+static void dvb_frontend_free(struct kref *ref)
+{
+       struct dvb_frontend *fe =
+               container_of(ref, struct dvb_frontend, refcount);
+
+       __dvb_frontend_free(fe);
 }
 
 static void dvb_frontend_put(struct dvb_frontend *fe)
 {
-       kref_put(&fe->refcount, dvb_frontend_free);
+       /*
+        * Check if the frontend was registered, as otherwise
+        * kref was not initialized yet.
+        */
+       if (fe->frontend_priv)
+               kref_put(&fe->refcount, dvb_frontend_free);
+       else
+               __dvb_frontend_free(fe);
 }
 
 static void dvb_frontend_get(struct dvb_frontend *fe)
index f45f6a4a437142226399142e0667850e214719d6..d025eb37384250108ef18c1006cdf9db6ceb8fb2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel DVB frontend device drivers.
 #
index 224283fe100a8fe6f6a3f17f52cfbff2a723b15e..4d086a7248e9b2508905cd026038793dc7882241 100644 (file)
@@ -55,29 +55,57 @@ struct dib3000mc_state {
 
 static u16 dib3000mc_read_word(struct dib3000mc_state *state, u16 reg)
 {
-       u8 wb[2] = { (reg >> 8) | 0x80, reg & 0xff };
-       u8 rb[2];
        struct i2c_msg msg[2] = {
-               { .addr = state->i2c_addr >> 1, .flags = 0,        .buf = wb, .len = 2 },
-               { .addr = state->i2c_addr >> 1, .flags = I2C_M_RD, .buf = rb, .len = 2 },
+               { .addr = state->i2c_addr >> 1, .flags = 0,        .len = 2 },
+               { .addr = state->i2c_addr >> 1, .flags = I2C_M_RD, .len = 2 },
        };
+       u16 word;
+       u8 *b;
+
+       b = kmalloc(4, GFP_KERNEL);
+       if (!b)
+               return 0;
+
+       b[0] = (reg >> 8) | 0x80;
+       b[1] = reg;
+       b[2] = 0;
+       b[3] = 0;
+
+       msg[0].buf = b;
+       msg[1].buf = b + 2;
 
        if (i2c_transfer(state->i2c_adap, msg, 2) != 2)
                dprintk("i2c read error on %d\n",reg);
 
-       return (rb[0] << 8) | rb[1];
+       word = (b[2] << 8) | b[3];
+       kfree(b);
+
+       return word;
 }
 
 static int dib3000mc_write_word(struct dib3000mc_state *state, u16 reg, u16 val)
 {
-       u8 b[4] = {
-               (reg >> 8) & 0xff, reg & 0xff,
-               (val >> 8) & 0xff, val & 0xff,
-       };
        struct i2c_msg msg = {
-               .addr = state->i2c_addr >> 1, .flags = 0, .buf = b, .len = 4
+               .addr = state->i2c_addr >> 1, .flags = 0, .len = 4
        };
-       return i2c_transfer(state->i2c_adap, &msg, 1) != 1 ? -EREMOTEIO : 0;
+       int rc;
+       u8 *b;
+
+       b = kmalloc(4, GFP_KERNEL);
+       if (!b)
+               return -ENOMEM;
+
+       b[0] = reg >> 8;
+       b[1] = reg;
+       b[2] = val >> 8;
+       b[3] = val;
+
+       msg.buf = b;
+
+       rc = i2c_transfer(state->i2c_adap, &msg, 1) != 1 ? -EREMOTEIO : 0;
+       kfree(b);
+
+       return rc;
 }
 
 static int dib3000mc_identify(struct dib3000mc_state *state)
index 8f84dfa9bb58cd5200d4b736f105222ecf441d7d..df7ecb4314cd68f1550ddf266da1779080bead4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DIB7000M_H
 #define DIB7000M_H
 
index 205fbbff632bcbfe6d7e2851dc957fd901c18adb..2e10b5ccce67015c5e21f70e078d54af9b3a7887 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DIB7000P_H
 #define DIB7000P_H
 
index 75cc8e47ec8f6925c82c28fc7222438c2d86d049..b920fe76902170caafbadfca080dd28f0f381a4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DIB8000_H
 #define DIB8000_H
 
index 40883b41e66b5369b8214927cd57bab6133b0673..bb03362ac7a3a4d0fcf0a7ebac6ed6891d635b9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DIB9000_H
 #define DIB9000_H
 
index 61f4152f24ee5ae2889316175ee4bd435b92a236..8784af962eba1c32bfc69d5267ea8ebc6b4270f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DIBX000_COMMON_H
 #define DIBX000_COMMON_H
 
index a629897eb90511f6230cd0d2775f3b7479836d4f..eb9bdc9f59c4661bef12b63d8d5f8ef41ccb5b14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DRXK_H_
 #define _DRXK_H_
 
index 9ed88e014942079955c55ffbb267b96f59ec0c94..a850a876deeebf72f929350d400d0a9b41af4b1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "drxk_map.h"
 
 #define DRXK_VERSION_MAJOR 0
index 761613f9fd5a0d208788ac1e6ee16635eb830ae3..9234ef4fb68d3f97b2c0512e8aec2df071ec34f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define  AUD_COMM_EXEC__A                                                  0x1000000
 #define    AUD_COMM_EXEC_STOP                                              0x0
 #define  FEC_COMM_EXEC__A                                                  0x1C00000
index 7bec3e028beec10e188fea4d9f53cc40556f8ddf..5553b89b804e7d4219d6c767b96fbdb5006cce1b 100644 (file)
@@ -753,13 +753,19 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
                                    struct i2c_adapter *i2c,
                                    unsigned int pll_desc_id)
 {
-       u8 b1 [] = { 0 };
-       struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD,
-                              .buf = b1, .len = 1 };
+       u8 *b1;
+       struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .len = 1 };
        struct dvb_pll_priv *priv = NULL;
        int ret;
        const struct dvb_pll_desc *desc;
 
+       b1 = kmalloc(1, GFP_KERNEL);
+       if (!b1)
+               return NULL;
+
+       b1[0] = 0;
+       msg.buf = b1;
+
        if ((id[dvb_pll_devcount] > DVB_PLL_UNDEFINED) &&
            (id[dvb_pll_devcount] < ARRAY_SIZE(pll_list)))
                pll_desc_id = id[dvb_pll_devcount];
@@ -773,15 +779,19 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
                        fe->ops.i2c_gate_ctrl(fe, 1);
 
                ret = i2c_transfer (i2c, &msg, 1);
-               if (ret != 1)
+               if (ret != 1) {
+                       kfree(b1);
                        return NULL;
+               }
                if (fe->ops.i2c_gate_ctrl)
                             fe->ops.i2c_gate_ctrl(fe, 0);
        }
 
        priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
-       if (priv == NULL)
+       if (!priv) {
+               kfree(b1);
                return NULL;
+       }
 
        priv->pll_i2c_address = pll_addr;
        priv->i2c = i2c;
@@ -811,6 +821,8 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
                                "insmod option" : "autodetected");
        }
 
+       kfree(b1);
+
        return fe;
 }
 EXPORT_SYMBOL(dvb_pll_attach);
index bf9602a88b6c5a0bbee8e38aa0db7d90bb0c6e8e..6aaa9c6bff9c253122c9b4d43b4fde449db7765e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * descriptions + helper functions for simple dvb plls.
  */
index 0422e580038ac14719741c7c53e5b243f919b374..d317df02c8d7ff0ef7eb3cd0ecfddb14de20553b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Public Include File for DRV6000 users
  * (ie. NxtWave Communications - NXT6000 demodulator driver)
index b1be62f1983a8a0766485d5f8275cc6be5db6c65..43d480bb6ea2aa2d56758b88530d4846a899c51b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SI21XX_H
 #define SI21XX_H
 
index 412f011e6dfda83464c3fe7be9acf1a5df9ce203..a680cc22379c4a88182962f3348bd5065c6a965d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
    Driver for the Spase sp887x demodulator
 */
index e6ccf240f54cc2a4a216256de64614a0b6ae11db..289653db68e40857832f8ac7b257461ecfa9b62f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TDA18271C2DD_H_
 #define _TDA18271C2DD_H_
 
index f3bca5c237d74bd15d17e66999518571b9573f2f..5f75516bc0cb2c7b3bddc1b240fdf07bc1c092b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 enum HF_S {
        HF_None = 0, HF_B, HF_DK, HF_G, HF_I, HF_L, HF_L1, HF_MN, HF_FM_Radio,
        HF_AnalogMax, HF_DVBT_6MHZ, HF_DVBT_7MHZ, HF_DVBT_8MHZ,
index c843c181dfb9d52464df85106d7b6150c32e23be..f104650d60009bac8b1b5a7c337e9e7e46f9bc86 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 msp3400-objs   :=      msp3400-driver.o msp3400-kthreads.o
 obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o
 
index a8702aca187a97176eac9c4b2795e1b9c2969872..b6c7698bce5a1fe983d97e88e6176b9806be001b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  */
 
index 78532a7fb8e2ae2511ac1921a52f7946c0f5f8f9..faa2df8901d235be9cfd2db615e4bd500907bcc9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SOC_CAMERA_IMX074)                += imx074.o
 obj-$(CONFIG_SOC_CAMERA_MT9M001)       += mt9m001.o
 obj-$(CONFIG_SOC_CAMERA_MT9T031)       += mt9t031.o
index 3a47d697536ea24d3167b81e01333555bb089e91..f4322820744506d659bde36d387d721f9ce0265d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INCLUDED_TEA6415C__
 #define __INCLUDED_TEA6415C__
 
index 4aa3edb3e1930c8c6ef3f5ea789eabfbeca93eaf..07f9d72a86bb832262aedfaadb833cb9ec264229 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INCLUDED_TEA6420__
 #define __INCLUDED_TEA6420__
 
index 31e297a202fb83f2fc6dc5df47a5c452a329cd5c..e847aa82ae4175809dd9f3ff5a0ea3e921fe9f29 100644 (file)
@@ -1 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += siano/
index a7e8af0f64a7b2f5d096668cc05eff0ebfe090e5..1ab759e9b1bba50e0346e522389d7cad496edad3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel multimedia device drivers.
 #
index b894320a5f212c051082aa54186d7d3bdcbdda7f..35d6835ae43efc33ed4c8199ed77cb436e2bf587 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifneq ($(CONFIG_DVB_B2C2_FLEXCOP_PCI),)
 b2c2-flexcop-pci-objs += flexcop-dma.o
 endif
index 913dc97f8b4926b0e1c65138ec00f658f217cf56..f07610a1646d00bde2eae7d622306efd07fdadf9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-dma.c - configuring and controlling the DMA of the FlexCop
index 2d4c3dd88be125f3208834b1bae4d6c0e61dcf9e..009f1dc1521f0acc6832982d6382947ea19c11b6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 bttv-objs      :=      bttv-driver.o bttv-cards.o bttv-if.o \
                       bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \
                       bttv-input.o bttv-audio-hook.o btcx-risc.o
index 1ed7a000160a0b79c3a760b3e839a858c8049f6d..dc774a64cd1fa35959776c4575ed2ebcd51ee5df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 struct btcx_riscmem {
        unsigned int   size;
        __le32         *cpu;
index 91301c3cad1e096ddcad1c0c26d7c8d5818f90f0..eb67e362acf777a7974519c249212b811b0a3e0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *  bttv - Bt848 frame grabber driver
index 3974a4c6ebe75c704dc8d4ed5bb87788d5788362..a4319d41d1415b40fa1a9c49f46de7017881618b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dst-bt878.h: part of the DST driver for the TwinHan DST Frontend
  *
index d3ff1545c2c5da5c05748e033abd9da64286ee38..98914a40f6ac84b8ae2ce5cdab3aa72d2fc8c84e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cx18-objs    := cx18-driver.o cx18-cards.o cx18-i2c.o cx18-firmware.o cx18-gpio.o \
        cx18-queue.o cx18-streams.o cx18-fileops.o cx18-ioctl.o cx18-controls.o \
        cx18-mailbox.o cx18-vbi.o cx18-audio.o cx18-video.o cx18-irq.o \
index a2cbdcf15a8c48fde4cd79c43b33dd92c81a8def..b8bf7806124bad76421d0d58f68a257d7004a3b1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cx23885-objs   := cx23885-cards.o cx23885-video.o cx23885-vbi.o \
                    cx23885-core.o cx23885-i2c.o cx23885-dvb.o cx23885-417.o \
                    cx23885-ioctl.o cx23885-ir.o cx23885-av.o cx23885-input.o \
index be14d7de7cd83f0bc6223b62f0cba6844d4240e9..34aef3610aa9462d6cb1701ea96b7c4284e20a9a 100644 (file)
@@ -1,2 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 extern int f300_set_voltage(struct dvb_frontend *fe,
                            enum fe_sec_voltage voltage);
index c8f8598a2b86ceaf81028fa29c1ea535eb722f42..d14d65b1b042dd643b5cd45f89c603d89408caa1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cx25821-y   := cx25821-core.o cx25821-cards.o cx25821-i2c.o \
                       cx25821-gpio.o cx25821-medusa-video.o \
                       cx25821-video.o
index d3679c3ee248bf5bf5e14d1d0de2ea166bb2f1aa..86646eee4e6b532b8900836bdbce891685ce44e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cx88xx-objs    := cx88-cards.o cx88-core.o cx88-i2c.o cx88-tvaudio.o \
                   cx88-dsp.o cx88-input.o
 cx8800-objs    := cx88-video.o cx88-vbi.o
index 2d0ef19e6d65c7d20067332d65f378292ec66455..c637679b01b2f6f12dddd2977bb1b1b34dcef380 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  */
 
index 09703312a3f16c3bfe93ba25cfc8d2bc22c14777..7453b65104ff7fd50aab26aa6b015a83b1b5a579 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ddbridge device driver
 #
index 0eaa88298b7e11deea078cbf8b1d5c509c1c3b35..48f8a23f9a0f7ddf847471bd889fae699fdd602e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ivtv-objs      := ivtv-routing.o ivtv-cards.o ivtv-controls.o \
                   ivtv-driver.o ivtv-fileops.o ivtv-firmware.o \
                   ivtv-gpio.o ivtv-i2c.o ivtv-ioctl.o ivtv-irq.o \
index f715051e4453bfd6a5319146d84913f5c982fe54..a684dc2ec79e057b2a2c17d7fc70b98dd8c94337 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 mantis_core-objs :=    mantis_ioc.o    \
                        mantis_uart.o   \
                        mantis_dma.o    \
index ee6ae0501eae0de03a00a8980c5699f9dd1158de..07d3f1eb728bd3307409a2f0ee5b51da644e4ccc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 netup-unidvb-objs += netup_unidvb_core.o
 netup-unidvb-objs += netup_unidvb_i2c.o
 netup-unidvb-objs += netup_unidvb_ci.o
index 5c0b5d6b9d69b773f93b9d133f874ef75143fcb7..dbdf284970f8eb5002ba06383ebf25de819f8b2a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the nGene device driver
 #
index 396f146b1c18cb4dee6c79104f25713eac386c4d..aded8752ac2bf76a3dea1a9c77411de5ac5cb3f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 earth-pt3-objs += pt3.o pt3_i2c.o pt3_dma.o
 
index 09c43da675883058a581c96da0fe031feb73aa1f..dbaadddf432031d04d5bcfad18f2eadcefc367da 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 saa7134-y +=   saa7134-cards.o saa7134-core.o saa7134-i2c.o
 saa7134-y +=   saa7134-ts.o saa7134-tvaudio.o saa7134-vbi.o
index b6ea6f4f9b6cef621f865062dd377e0f57aa94c2..56b12641d733e76eac638e00b6d40261aaafa260 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * philips saa7134 registers
index ba0e33a1ee2488869544a06f15e57e2ef83a52a5..3896bcdb99d27f2c83253e6765836ac5a3bcb0de 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 saa7164-objs   := saa7164-cards.o saa7164-core.o saa7164-i2c.o saa7164-dvb.o \
                        saa7164-fw.o saa7164-bus.o saa7164-cmd.o saa7164-api.o \
                        saa7164-buffer.o saa7164-encoder.o saa7164-vbi.o
index 013bc3fe4294f5c55b8e92454c081b791e139ca6..6006aac3c41facc4496da200815c4bdf55e2931f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 smipcie-objs   := smipcie-main.o smipcie-ir.o
 
index 3cf617737f7c525d1c5b6709e7726e2689531a02..0b805339c123b89e6899aa4263aef0199f0c88e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel SAA7146 FULL TS DVB device driver
 # and the AV7110 DVB device driver
index 347827925c14c55247cafb4913b5c123b913db04..cd09fd6e6548cb6068f27b6d64d2f8d464a96089 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AV7110_H_
 #define _AV7110_H_
 
index f52276f4770927f76a4583c280aa4c9729980576..71bbd4391f571ee4e53b9a3f9661891f876dee66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AV7110_AV_H_
 #define _AV7110_AV_H_
 
index 70ee855ece1bb0c5d706c9b08f879434f9af99e5..a6e3f2955730d6e56af7158bd6d777adbb8dede1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AV7110_CA_H_
 #define _AV7110_CA_H_
 
index ccb1480594068f4058ac8c774cbc888ea16818be..6380d8950c6957b849840d1531ea2ca125646f8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AV7110_HW_H_
 #define _AV7110_HW_H_
 
index 699ef8b5b99ac9ac3ea720419777ffaa2b5e8dcf..5aff26574fe1e4e3708e86115af90955f81ecd25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "dvb_filter.h"
 #include "av7110_ipack.h"
 #include <linux/string.h>      /* for memcpy() */
index becf94d3fdfa07d6fd1235a334683e66b01b232e..943ec899bb93e651a0ab90e4f04934cd077d2793 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AV7110_IPACK_H_
 #define _AV7110_IPACK_H_
 
index d5ae4438153e59bbaeb2f5dbb428014bcdcd4b1d..fae83866b199b518a072463a47ebeecb091bb2ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __BUDGET_DVB__
 #define __BUDGET_DVB__
index b67127b67d4e0ccc4b8b348806bdae3ebe12100a..8c2eca5dcdc978bf0515ee71515e621cff9fb321 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/string.h>
index 771eef235755785c7f6e115f484d5764aed01e1b..b9cebe9d1740f50a9a2b54bb59cf9c67124e6c85 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tw5864.h"
 
 void tw5864_indir_writeb(struct tw5864_dev *dev, u16 addr, u8 data)
index 15a956642ef4bc36be9f7bf0d30c68e5f81c2414..8adacc928be12607cf4e61745490c512a383d389 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* DMA controller registers */
 #define REG8_1(a0) ((const u16[8]) { a0, a0 + 1, a0 + 2, a0 + 3, \
                                     a0 + 4, a0 + 5, a0 + 6, a0 + 7})
index 44cc13352c8884b3a07ea4352dacc02c5978b1cd..21ac29a71458619df08a82034db05c449c150598 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 zr36067-objs   :=      zoran_procfs.o zoran_device.o \
                        zoran_driver.o zoran_card.o
 
index 7e7cc49b867400093ba038baf9e14773970f15f4..3c4f7fa7b9d8ea06e7b1455ce3e0172d17322483 100644 (file)
@@ -112,7 +112,7 @@ config VIDEO_PXA27x
 
 config VIDEO_QCOM_CAMSS
        tristate "Qualcomm 8x16 V4L2 Camera Subsystem driver"
-       depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+       depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
        depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
        select VIDEOBUF2_DMA_SG
        select V4L2_FWNODE
index c1ef946bf0321e0f6a2348a42a0f7f81615ebefa..327f80a6f82c0819e24b630e4b64fb2900eb3b24 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the video capture/playback device drivers.
 #
index 6936ac467609f09441156ea2fef87e20af9c1e89..e6cef966dcbf7f530f2acca68b27871b1a7307b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_ISC_REGS_H
 #define __ATMEL_ISC_REGS_H
 
index f20666a4aa89b0e4e7626952b8a172df747f0d1a..ca671e315ad059d9af17f704f24ab90ce5a6c4ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM coda
 
index d74d9eeb0e9eb5e305ff9c4bddbd028f32b1e38b..05c45bf371aaeb1612a9a5e0e99f3421bfd24249 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the davinci video device drivers.
 #
index eed1b185d813e22fa343f2893548a52118282a63..a5ab01c73b950f6192b6ac774ddc377140d6da2f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 s5p-fimc-objs := fimc-core.o fimc-reg.o fimc-m2m.o fimc-capture.o media-dev.o
 exynos-fimc-lite-objs += fimc-lite-reg.o fimc-lite.o
 s5p-csis-objs := mipi-csis.o
index b07a251e8857b93773daec7ab8415f02e84409bb..7b7250b1cff86660cd53eccee69d9d8915fba08a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * The Marvell camera core.  This device appears in a number of settings,
  * so it needs platform-specific support outside of the core.
index beb339f5561f0b9eafa62a34ce3b3fd785861aad..ad8955f9f0a17b77482eab47dd4641fe4069d075 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Marvell camera core structures.
  *
index f8025699af992e2063109a731e38650ec4d1fb70..5982d65c9971bc7296e028cd84ae5c369fb00bb7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 mtk-mdp-y += mtk_mdp_core.o
 mtk-mdp-y += mtk_mdp_comp.o
 mtk-mdp-y += mtk_mdp_m2m.o
index 852d9697ccfae9e659b1dc49a902dfc149e69228..37b94b555fa10437129929e820b0b11a8ed0bfb7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
                                       mtk-vcodec-enc.o \
index 254975a9174ebdf73d253e3bb5e8d8abce46e2c9..56e99b4f7d23cfb8ff5af8bdda1b692ed6c63ec4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for OMAP3 ISP driver
 
 ccflags-$(CONFIG_VIDEO_OMAP3_DEBUG) += -DDEBUG
index b21b3c2dc77f2bb12f617f198a928a58cc17b592..b22d2dfcd3c29ec85c474948f67d0805571db3ab 100644 (file)
@@ -2660,7 +2660,7 @@ static int vfe_get_selection(struct v4l2_subdev *sd,
  *
  * Return -EINVAL or zero on success
  */
-int vfe_set_selection(struct v4l2_subdev *sd,
+static int vfe_set_selection(struct v4l2_subdev *sd,
                             struct v4l2_subdev_pad_config *cfg,
                             struct v4l2_subdev_selection *sel)
 {
index 0fe9afb83697333a79c70e620707b90f17242445..bfd4edf7c83f448b8c40d6dd986e5f5b07f45f92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for Qualcomm Venus driver
 
 venus-core-objs += core.o helpers.o firmware.o \
index 68933d20806338629a89bdde9a5b05219ef2f5ac..9b2a401a4891c49e1388783cbf4111bf6df26af6 100644 (file)
@@ -682,6 +682,7 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q)
                        hfi_session_abort(inst);
 
                load_scale_clocks(core);
+               INIT_LIST_HEAD(&inst->registeredbufs);
        }
 
        venus_helper_buffers_done(inst, VB2_BUF_STATE_ERROR);
index 1edf667d562a4df64a4806e947f192aa2a24357f..146ae6f25cdbb1eee53837aa1ea28c503163ed28 100644 (file)
@@ -172,7 +172,8 @@ u32 s5p_cec_get_status(struct s5p_cec_dev *cec)
 {
        u32 status = 0;
 
-       status = readb(cec->reg + S5P_CEC_STATUS_0);
+       status = readb(cec->reg + S5P_CEC_STATUS_0) & 0xf;
+       status |= (readb(cec->reg + S5P_CEC_TX_STAT1) & 0xf) << 4;
        status |= readb(cec->reg + S5P_CEC_STATUS_1) << 8;
        status |= readb(cec->reg + S5P_CEC_STATUS_2) << 16;
        status |= readb(cec->reg + S5P_CEC_STATUS_3) << 24;
index 58d200e7c8382de8edc841b17b1022a2c15ddb85..8837e2678bdeb3507e4ebce501e5ee58216334ad 100644 (file)
@@ -92,7 +92,10 @@ static irqreturn_t s5p_cec_irq_handler(int irq, void *priv)
        dev_dbg(cec->dev, "irq received\n");
 
        if (status & CEC_STATUS_TX_DONE) {
-               if (status & CEC_STATUS_TX_ERROR) {
+               if (status & CEC_STATUS_TX_NACK) {
+                       dev_dbg(cec->dev, "CEC_STATUS_TX_NACK set\n");
+                       cec->tx = STATE_NACK;
+               } else if (status & CEC_STATUS_TX_ERROR) {
                        dev_dbg(cec->dev, "CEC_STATUS_TX_ERROR set\n");
                        cec->tx = STATE_ERROR;
                } else {
@@ -135,6 +138,12 @@ static irqreturn_t s5p_cec_irq_handler_thread(int irq, void *priv)
                cec_transmit_done(cec->adap, CEC_TX_STATUS_OK, 0, 0, 0, 0);
                cec->tx = STATE_IDLE;
                break;
+       case STATE_NACK:
+               cec_transmit_done(cec->adap,
+                       CEC_TX_STATUS_MAX_RETRIES | CEC_TX_STATUS_NACK,
+                       0, 1, 0, 0);
+               cec->tx = STATE_IDLE;
+               break;
        case STATE_ERROR:
                cec_transmit_done(cec->adap,
                        CEC_TX_STATUS_MAX_RETRIES | CEC_TX_STATUS_ERROR,
index 8bcd8dc1aeb9fb299d5b821511c9b1eba02d3c6a..86ded522ef27319a27fb72bd9f5285be6ac1ad8f 100644 (file)
@@ -35,6 +35,7 @@
 #define CEC_STATUS_TX_TRANSFERRING     (1 << 1)
 #define CEC_STATUS_TX_DONE             (1 << 2)
 #define CEC_STATUS_TX_ERROR            (1 << 3)
+#define CEC_STATUS_TX_NACK             (1 << 4)
 #define CEC_STATUS_TX_BYTES            (0xFF << 8)
 #define CEC_STATUS_RX_RUNNING          (1 << 16)
 #define CEC_STATUS_RX_RECEIVING                (1 << 17)
@@ -55,6 +56,7 @@ enum cec_state {
        STATE_IDLE,
        STATE_BUSY,
        STATE_DONE,
+       STATE_NACK,
        STATE_ERROR
 };
 
index 15f59b324fefc396c9de24f5ae8be2694303ea7a..0b324af2ab0005a97f6ad767d5ea194798735750 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc.o
 s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o
 s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o
index b578c7cb4c3449915542ca19d89a2298e34f4dfc..b642b4fd504550eeced15592d73111198995cae5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 c8sectpfe-y += c8sectpfe-core.o c8sectpfe-common.o c8sectpfe-dvb.o \
                c8sectpfe-debugfs.o
 
index 32504b724b5df212ba06abcb4ae5adcff8bd1d9d..886ac5ec073f04ac055aa6dc0e3a7102f6b36a1b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIDEO_TI_VPE) += ti-vpe.o
 obj-$(CONFIG_VIDEO_TI_VPDMA) += ti-vpdma.o
 obj-$(CONFIG_VIDEO_TI_SC) += ti-sc.o
index b12a4b3d616ff32a3177194b8ae97a3e73266eed..2d67f8ce258d7196e584faa655694e985250be4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * VIA Camera register definitions.
  */
index 68c5d9804c11303359460e8c09907c3a6584c9df..4b2e3de7856e3261a6fee61418f4145b7444ee39 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vimc-objs := vimc-core.o
 vimc_capture-objs := vimc-capture.o
 vimc_common-objs := vimc-common.o
index 29738810e3eea572c3cf0c0ccf08d807ac522eaa..2f5762e3309ac57bce6946ec808de29511868586 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vivid-objs := vivid-core.o vivid-ctrls.o vivid-vid-common.o vivid-vbi-gen.o \
                vivid-vid-cap.o vivid-vid-out.o vivid-kthread-cap.o vivid-kthread-out.o \
                vivid-radio-rx.o vivid-radio-tx.o vivid-radio-common.o \
index a33afc385a48c194429803fa1d666a2a43cb22f4..f5cd6f0491cbb1c4a5c88409ccaf34680f288905 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vsp1-y                                 := vsp1_drv.o vsp1_entity.o vsp1_pipe.o
 vsp1-y                                 += vsp1_dl.o vsp1_drm.o vsp1_video.o
 vsp1-y                                 += vsp1_rpf.o vsp1_rwpf.o vsp1_wpf.o
index 120e791199b2211e097bd6a2dba1b5f2f50d4b33..37e6e8255b57fe943b12323b34156a7232683fb5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel character device drivers.
 #
index 139cd6b68824838378921bbbca03810a1e073e8e..adb21796562087c26fe37c45cc74fbccdc14dc5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LM7000_H
 #define __LM7000_H
 
index 9bc6a3980ed01875d8bb088817c8099df9fc64c8..ab3d5a135453b4bd0b7f099aaa61b4ba3589153a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rc-core-objs   := rc-main.o rc-ir-raw.o
 
 obj-y += keymaps/
index 8e6d458e66ad8537c0e5bc9ad1d445d4f925f047..741fedc5dceb26a3cd5c6492fd0facac0b3d42c1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 img-ir-y                       := img-ir-core.o
 img-ir-$(CONFIG_IR_IMG_RAW)    += img-ir-raw.o
 img-ir-$(CONFIG_IR_IMG_HW)     += img-ir-hw.o
index ed43a4212479ff22c7e3347f95e48a811e287925..129b558acc9214abda6ce249eb3d8e2095591196 100644 (file)
@@ -245,5 +245,5 @@ module_init(ir_sharp_decode_init);
 module_exit(ir_sharp_decode_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("James Hogan <james.hogan@imgtec.com>");
+MODULE_AUTHOR("James Hogan <jhogan@kernel.org>");
 MODULE_DESCRIPTION("Sharp IR protocol decoder");
index af6496d709fb287b89396af40c2b70b0d1715bca..2d0b26bf2051ee5ee082abef46a4cc609157d217 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
                        rc-alink-dtu-m.o \
                        rc-anysee.o \
index 06a9ab65e5fa79ea61479841820900020ac5031c..7be96511532dd569e27b3f9eee92ea598034a150 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for common V4L/DVB tuners
 #
index 438cf897acd1fc14b9e23fe6239a59d58dec6009..a36871c44c8cef8cc732a98e4aacc9b982b960d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_FC0011_H_
 #define LINUX_FC0011_H_
 
index 2e487f9a2cc3fb678aa173b93a9bb141cc23ba69..4983eeb39f369c961cfdf86b69a870d98727e736 100644 (file)
@@ -38,41 +38,74 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
 static int mt2060_readreg(struct mt2060_priv *priv, u8 reg, u8 *val)
 {
        struct i2c_msg msg[2] = {
-               { .addr = priv->cfg->i2c_address, .flags = 0,        .buf = &reg, .len = 1 },
-               { .addr = priv->cfg->i2c_address, .flags = I2C_M_RD, .buf = val,  .len = 1 },
+               { .addr = priv->cfg->i2c_address, .flags = 0, .len = 1 },
+               { .addr = priv->cfg->i2c_address, .flags = I2C_M_RD, .len = 1 },
        };
+       int rc = 0;
+       u8 *b;
+
+       b = kmalloc(2, GFP_KERNEL);
+       if (!b)
+               return -ENOMEM;
+
+       b[0] = reg;
+       b[1] = 0;
+
+       msg[0].buf = b;
+       msg[1].buf = b + 1;
 
        if (i2c_transfer(priv->i2c, msg, 2) != 2) {
                printk(KERN_WARNING "mt2060 I2C read failed\n");
-               return -EREMOTEIO;
+               rc = -EREMOTEIO;
        }
-       return 0;
+       *val = b[1];
+       kfree(b);
+
+       return rc;
 }
 
 // Writes a single register
 static int mt2060_writereg(struct mt2060_priv *priv, u8 reg, u8 val)
 {
-       u8 buf[2] = { reg, val };
        struct i2c_msg msg = {
-               .addr = priv->cfg->i2c_address, .flags = 0, .buf = buf, .len = 2
+               .addr = priv->cfg->i2c_address, .flags = 0, .len = 2
        };
+       u8 *buf;
+       int rc = 0;
+
+       buf = kmalloc(2, GFP_KERNEL);
+       if (!buf)
+               return -ENOMEM;
+
+       buf[0] = reg;
+       buf[1] = val;
+
+       msg.buf = buf;
 
        if (i2c_transfer(priv->i2c, &msg, 1) != 1) {
                printk(KERN_WARNING "mt2060 I2C write failed\n");
-               return -EREMOTEIO;
+               rc = -EREMOTEIO;
        }
-       return 0;
+       kfree(buf);
+       return rc;
 }
 
 // Writes a set of consecutive registers
 static int mt2060_writeregs(struct mt2060_priv *priv,u8 *buf, u8 len)
 {
        int rem, val_len;
-       u8 xfer_buf[16];
+       u8 *xfer_buf;
+       int rc = 0;
        struct i2c_msg msg = {
-               .addr = priv->cfg->i2c_address, .flags = 0, .buf = xfer_buf
+               .addr = priv->cfg->i2c_address, .flags = 0
        };
 
+       xfer_buf = kmalloc(16, GFP_KERNEL);
+       if (!xfer_buf)
+               return -ENOMEM;
+
+       msg.buf = xfer_buf;
+
        for (rem = len - 1; rem > 0; rem -= priv->i2c_max_regs) {
                val_len = min_t(int, rem, priv->i2c_max_regs);
                msg.len = 1 + val_len;
@@ -81,11 +114,13 @@ static int mt2060_writeregs(struct mt2060_priv *priv,u8 *buf, u8 len)
 
                if (i2c_transfer(priv->i2c, &msg, 1) != 1) {
                        printk(KERN_WARNING "mt2060 I2C write failed (len=%i)\n", val_len);
-                       return -EREMOTEIO;
+                       rc = -EREMOTEIO;
+                       break;
                }
        }
 
-       return 0;
+       kfree(xfer_buf);
+       return rc;
 }
 
 // Initialisation sequences
index e55e0a6dd1be403d3859a54e45210b4d4f2e06c7..0e3e3b0525bb12ae19a7638537ba11855236b64a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MT2063_H__
 #define __MT2063_H__
 
index 738b993ec8b09a5d0ab0f46c23f870fb4242fb1d..21e46b10caa5290a61d9c9429c5535c885fcc6f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the USB media device drivers
 #
index 22f43eee4a3bc5fa55fe7fc2675e9062a2b6fec2..56bd2d00b9200587926718a93cb863550e447c1d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dvb-as102-objs := as102_drv.o as102_fw.o as10x_cmd.o as10x_cmd_stream.o \
                  as102_usb_drv.o as10x_cmd_cfg.o
 
index 3dc7539a5c4eda975394ffdda038f6616c35d312..c06ef6601f2daefca07916a5a835ca787f477ad7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 au0828-objs    := au0828-core.o au0828-i2c.o au0828-cards.o au0828-dvb.o
 
 ifeq ($(CONFIG_VIDEO_AU0828_V4L2),y)
index 25ad43166e78c759226c603e66fa6e6b81a361f8..e86faa0e06ca649b03daf41f848121a756e71111 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
  * flexcop-usb.h - header file for the USB part
index 52cf76935e69b02a666d5535d6f3fc23d5b759df..19e8c35d6a7786bd8381fd463108144ae5d5f544 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cx231xx-y += cx231xx-video.o cx231xx-i2c.o cx231xx-cards.o cx231xx-core.o
 cx231xx-y += cx231xx-avcore.o cx231xx-417.o cx231xx-pcb-cfg.o cx231xx-vbi.o
 cx231xx-$(CONFIG_VIDEO_CX231XX_RC) += cx231xx-input.o
index 969f68e55265e1a20331f11ebfe35755a11ef5a9..bed44601f3245b3c084beff545cdfcc8118ae6ae 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dvb_usb_v2-objs := dvb_usb_core.o dvb_usb_urb.o usb_urb.o
 obj-$(CONFIG_DVB_USB_V2) += dvb_usb_v2.o
 
index b0b80d87bb7e36f98a6e413d6f7c0e6cc63b77e0..b651b857e03408f3cedf9e281e5563355de02fe7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_GL861_H_
 #define _DVB_USB_GL861_H_
 
index 55136cde38f57c8841974b5f734054ee178adbdf..dce2b97efce4ea9c4c80b8be51c6c68c15c6a5bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* usb-urb.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 3b3f32b426d192af84b874c0c329ce52bb8baec7..16de1e4f36a44457a724ee3ab69778a6c00937ee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 dvb-usb-objs += dvb-usb-firmware.o dvb-usb-init.o dvb-usb-urb.o dvb-usb-i2c.o
 dvb-usb-objs += dvb-usb-dvb.o dvb-usb-remote.o usb-urb.o
 obj-$(CONFIG_DVB_USB) += dvb-usb.o
index 4d69045426ddd3e7c394f3486849ab1c6c8e9543..870cb59cd904f30b6759fc69ccb77dc87536c916 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
 File automatically generated by createinit.py using data
 extracted from AF05BDA.sys (windows driver):
index f3afe17f3f3da756f002d6fa3b8274a8dea4d39e..95b056b360305161510c5adee3a6eeca749101dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_VP6027_H_
 #define _DVB_USB_VP6027_H_
 
index 66429d7f69b5a4c348f609fad59e65ad1cba9483..88f9b9804b256d0c922151cc2b54aedc0839aae0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_CXUSB_H_
 #define _DVB_USB_CXUSB_H_
 
index 7e62c1018520a132bc8809a407b27a890db2a4a4..2e67f794fe3792a94fb9b6e933b2f7b410a8b052 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DIB07X0_H_
 #define _DIB07X0_H_
 
index 581e09c25491bfe54a683fbfd094a890c0351c4a..2af9fedfad70b2ad09a7dd06c038ef47eca31692 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_DIGITV_H_
 #define _DVB_USB_DIGITV_H_
 
index 7e619d638809b12fce6c5fe9c7d744e0b56ef87a..8c51ac4493dde1fab53377a45975361c527f76dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* dvb-usb-common.h is part of the DVB USB library.
  *
  * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de)
index e5675da286cb2afca37edb62f5ba28d636ae6f44..3a66e732e0d86520f2486ee8d83a9b5249d2fba6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* dvb-usb-dvb.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 04033efe7ad5394d4fd9493ce6b790de1404666b..15c153e49382d0c878e76d53cdd35789672ccdd3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* dvb-usb-firmware.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 4f0b0adce7f5dfe18d47af28968b9d2d307fb3ff..ca0b734e009b16c7732420984f08eee20224b25b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* dvb-usb-i2c.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 0b03f9bd9c2673891980b8bbf2abe0b333e9c31e..701c10835482c90f46e121af081f496ecdf53989 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* dvb-usb-remote.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 95f9097498cb86259f0209013ab499894ab39839..c1b4e94a37f8d774291c546d62073f91cd21b2e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* dvb-usb-urb.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 72468fdffa18497e2234d71f21ca463560a27320..6c7c4637530fd253ee541499347f7018cb6e21fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* dvb-usb.h is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 5cd0b0eb6ce148dc0b0be35bcd0f6a2570c9f1fc..f64cf79b793477a6ee7db5392a6583355e156b5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DW2102_H_
 #define _DW2102_H_
 
index 3c061518ffc160b8c45ac20c9a95dcbdbd3bf9c6..bab3c6ac70840bb6d70c0225c390e1318584336a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_M920X_H_
 #define _DVB_USB_M920X_H_
 
index 89173603be6754e1e8e30c68a06affcfa89482fe..2804d2d0e83af50ef86e87cf967e75acf9015c4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* usb-urb.c is part of the DVB USB library.
  *
  * Copyright (C) 2004-6 Patrick Boettcher (patrick.boettcher@posteo.de)
index 20b90055e7ac501db08d8f99ede56ab9f269b1bd..18ad7ced2045d2d4108360a5e95c96b11b771a75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DVB_USB_VP7021_H_
 #define _DVB_USB_VP7021_H_
 
index 3f850d5063d0e2b6145dc7e389747b330bbf30ed..86bfc35e2ed4066171cd35fd0b593d0f9bc7f9f5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 em28xx-y +=    em28xx-core.o em28xx-i2c.o em28xx-cards.o em28xx-camera.o
 
 em28xx-v4l-objs := em28xx-video.o em28xx-vbi.o
index 747525ca7ed530a1c67576b746641f017826f117..9e5cdfb25a7380644c28ec98d425b0bec3d9d86b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define EM_GPIO_0  (1 << 0)
 #define EM_GPIO_1  (1 << 1)
 #define EM_GPIO_2  (1 << 2)
index e99287c3b82847345aa4683c2247ba53f6189d95..3d95bbc4192cb799c6eee69f591abc8efd1ca043 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIDEO_GO7007) += go7007.o
 obj-$(CONFIG_VIDEO_GO7007_USB) += go7007-usb.o
 obj-$(CONFIG_VIDEO_GO7007_LOADER) += go7007-loader.o
index 9f5ccecb9c8a3e17bf235633f4104b263b2871be..3e3ecbffdf9f73dba0039a30911a8df202e5d3f0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_GSPCA)          += gspca_main.o
 obj-$(CONFIG_USB_GSPCA_BENQ)     += gspca_benq.o
 obj-$(CONFIG_USB_GSPCA_CONEX)    += gspca_conex.o
index cf6397415aad6bc0534aa2510b80b3b8d8ccb603..7bcfa36f12ac31a0c5d95fc3ffca7a4306f59aea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_GL860) += gspca_gl860.o
 
 gspca_gl860-objs := gl860.o \
index d39adf90303b9a4371fd3ed878705ae7754535d8..9e0cf711642b97d32ba187853378dad4f9237f14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GSPCAV2_H
 #define GSPCAV2_H
 
index 8e1fb5a1d2a1ef6b024d7500379abc9a69fcfce5..95c9db6dc59c9596f464773c3d3ea22404f22e29 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_M5602) += gspca_m5602.o
 
 gspca_m5602-objs := m5602_core.o \
index 3a4b2f899049de856579231782aa8e809af59384..c4d7206e0c929b9d86c3c013ebad61bdb9c60e08 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_STV06XX) += gspca_stv06xx.o
 
 gspca_stv06xx-objs := stv06xx.o \
index ad705547bdcedb7c448effb65cf35732317c4d3e..0d84064036b2a054855efdafa3224904fc1779af 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-pvrusb2-sysfs-$(CONFIG_VIDEO_PVRUSB2_SYSFS) := pvrusb2-sysfs.o
 obj-pvrusb2-debugifc-$(CONFIG_VIDEO_PVRUSB2_DEBUGIFC) := pvrusb2-debugifc.o
 obj-pvrusb2-dvb-$(CONFIG_VIDEO_PVRUSB2_DVB) := pvrusb2-dvb.o
index 884ff916a352cce11c0e7e48e9afdb1f1fbb942b..b500c86d41789988298de459da7121f54155ea27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PVRUSB2_DVB_H__
 #define __PVRUSB2_DVB_H__
 
index 168c73ef75d866c067c19c21b514a03bdb1c7c17..0fe9d473f4e9d62d58b6e94f565fc7ab3a9cd945 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
    /* SQCIF */
    {
       {0, 0, {0x04, 0x01, 0x03}},
index 42d05463b353d5b2b1e3f66dc88bbaa2b00ab0a8..613471528749eee67825df453fea81146a108a26 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 stk1160-y :=   stk1160-core.o \
                stk1160-v4l.o \
                stk1160-video.o \
index f2644933b8d1afc8709e137a1207f856dcbf964b..05322a72e862db700d3252b3951671396f32fb6e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 tm6000-y := tm6000-cards.o \
                   tm6000-core.o  \
                   tm6000-i2c.o   \
index a51cc1185cce24bc53f7314448fafa60bffd207a..07ec835127439b1cede44ce4707e45bc29b40ade 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define XANBOO                                   0
 #define BELKIN_VIDEOBUS_II                       1
 #define BELKIN_VIDEOBUS                          2
index c26d12fdb8f4ef12d67222c40d99675cc0a045c5..a4fe5b5d533fd6b8a2d3c107159942e9baf446a5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 uvcvideo-objs  := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o \
                  uvc_status.o uvc_isight.o uvc_debugfs.o
 ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
index 34c7ee6cc9e5f5db57d104d9d0b5ffc7587c9454..05398784d1c898a25fddaf85197f5222f7310dc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _USB_VIDEO_H_
 #define _USB_VIDEO_H_
 
index 098ad5fd5231b027b420013da1c77c41fa80938e..77303286aef79c1118c1e2fb42b6bde4a9e7ea7d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the V4L2 core
 #
index 7416010542c138cbcdb3cac27ee0c076ea69c65c..95f3b02e1f849afc597eedde490c0d2666c28608 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <media/v4l2-common.h>
 #include <media/v4l2-fh.h>
 #include <media/videobuf2-v4l2.h>
index 61e74f5936b3c7dac352ba6ee70fbef2301fff5a..4c0f39d271f0afd6dc069c7a024f5d2a9493b69b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <media/videobuf2-core.h>
 
 #define CREATE_TRACE_POINTS
index e88097fbc08561d82027164643e5e9e6a454dc8e..470b93e3858d7b5847b7f0702b63a13985fb2da8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for memory devices
 #
index c2cb671ffc4ac453c6decfa159f68547b8c255b8..b44e8627a5e0870bcb6eb381dcd787852831d462 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 tegra-mc-y := mc.o
 
 tegra-mc-$(CONFIG_ARCH_TEGRA_3x_SOC)  += tegra30.o
index 491c9557441ddfa7a3135dd037ed8085c09d4fd4..1abaa03ee68c414a5b91b54e1a6ac1211aa70546 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for MemoryStick host controller drivers
 #
index d182a24b31955cbf1c9b3fe0c4353d7f962ad968..e2d98b5c6f98db197c1a44d9e2d2f8d88c1fe97b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Fusion MPT drivers; recognized debug defines...
 
 # enable verbose logging
index 11c0f461320eb71390026dfaaae1ceb40b42d86a..a575545d681f294c13150c25a11bd8fbf7b1e3e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index d9bcfba6b049c2970af1bddb035d8e24c4990f6c..4e9c0ce94f2713f2b4cb88e6bfb774bbef47985f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 7d663ce76f8c90fdeaa193f88381e7afb37cf602..bdea95e0cde220904f0f7589d13fab9368903387 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 4295d062caa747b3822aac1a07807bc9266d0292..bc6326ff2f220771191e17fbdad8e96862a9aaba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 19fb21b8f0ce68c06cc01ce1d2eb811bef303edd..c249f2994fc11231b3ea1b53686a31896624ab29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index f41fcb69b359912e6d0e39e0aabffa0999e2a608..d06f9928684a915075778538bb8cabae4fa27639 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 03be8b217709df7aaba73c3354affea36ea75591..f1e75dd5dd5856ef8b7eab440de50cce65814b24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation. All rights reserved.
  *
index f62960b5d527c1ac96d0e982311ace4c5d5d9f7e..27fe17a75eaad0993c5c63f5ef4f769a490970d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /***************************************************************************
  *                                                                         *
  *  Copyright (c) 2000-2008 LSI Corporation.  All rights reserved.         *
index add60cc85be136148f7f2649e198026cf415d336..36688a921ef2013cb76c340283a657a2e5e8c573 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2001-2008 LSI Corporation.
  *
index ab410036bbfccc9514fad1a58b3437d26a89afb0..56013f288aaab91ee8de9e4e19efb5c1d876a3a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2004-2008 LSI Corporation.
  *
index c3dea7f6909d8d9053cb8251fbcdef5554b65ad1..97e6eead6cb4bc2177892ff64fd7c975933ad14b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 53cd715aa7e4c4933f1dc8d63e30ee4fc41b4311..b11456fb827752f89aad5573ef96c305dd2bede3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2001-2008 LSI Corporation.
  *
index 888b26dbc41345dd08fd461c13b80b96f8dd7a52..073e637cfdb41e571eb27d03f76f5154380a2f70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (c) 2000-2008 LSI Corporation.
  *
index 28e4788792848d4854618ce9d0c8f2146399a998..2205dcab0adb4eacd89f91e4dec02fcdacb9acd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/drivers/message/fusion/mptdebug.h
  *      For use with LSI PCI chip/adapter(s)
index c3d0a1b39bb6512505814882c4fedbd04687e057..8703ff17998e9119d006978dd5ee8c1aeebf5541 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for multifunction miscellaneous devices
 #
index 6ff99dce714f1665e7021b5c266e68cb8e857851..6f96c2009a9f491f485e9752b647575bb9f42b37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TWL_CORE_H__
 #define __TWL_CORE_H__
 
index d84819dc2468c556228e486e2166005dccb731a5..ad0e64fdba3484445921b8140d4c994f880970d1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for misc devices that really don't fit anywhere else.
 #
index 0b5fd749d96d8663438f9995409fa9ef5d3b8074..502d41fc9ea5a90df3da43543e9c1e74dc6242e2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y                      := $(call cc-disable-warning, unused-const-variable)
 ccflags-$(CONFIG_PPC_WERROR)   += -Werror
 
index 5dba23ca2e5fe955cd8101909b2b2e20bbdf2e68..dc9bc1807fdfa52aede0748308d16f5c36c6c95f 100644 (file)
@@ -219,8 +219,17 @@ int cxllib_handle_fault(struct mm_struct *mm, u64 addr, u64 size, u64 flags)
 
        down_read(&mm->mmap_sem);
 
-       for (dar = addr; dar < addr + size; dar += page_size) {
-               if (!vma || dar < vma->vm_start || dar > vma->vm_end) {
+       vma = find_vma(mm, addr);
+       if (!vma) {
+               pr_err("Can't find vma for addr %016llx\n", addr);
+               rc = -EFAULT;
+               goto out;
+       }
+       /* get the size of the pages allocated */
+       page_size = vma_kernel_pagesize(vma);
+
+       for (dar = (addr & ~(page_size - 1)); dar < (addr + size); dar += page_size) {
+               if (dar < vma->vm_start || dar >= vma->vm_end) {
                        vma = find_vma(mm, addr);
                        if (!vma) {
                                pr_err("Can't find vma for addr %016llx\n", addr);
index 3aa216bf0939ff015c0b6ae121f6f1e7f69bd33d..43917898fb9a86faad439758a2ba9640adc2b3c9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/semaphore.h>
index 90a52624ddeb0c093a7f66e6b8a2b2c6b10e4f55..2aab60ef3e3e61df4737cde41d66c162e4bd171f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_EEPROM_AT24)      += at24.o
 obj-$(CONFIG_EEPROM_AT25)      += at25.o
 obj-$(CONFIG_EEPROM_LEGACY)    += eeprom.o
index 9e63ade5ffd68a691a6ba4c23ac03102873b6435..1b9dd0f44411d77edc255401903eadba7a5597f4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_IBM_ASM) := ibmasm.o
 
index bfb6c45b6130bddbafec71aa235f2ab04a4f725c..687a0dbbe19986560359948221001f5140531061 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LKDTM_H
 #define __LKDTM_H
 
index 9e0b4f9599870581428f89ac115e7c7c778bf892..b0f7af872bb56c40759201c363a0b3812c30b04b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is for all the tests related to logic bugs (e.g. bad dereferences,
  * bad alignment, bad loops, bad locking, bad scheduling, deep stacks, and
index ffb6aeac07b3ec56ed7febf153f222b13f8a8d38..f5494a6d4be5eee7c6eafa04789a09c0cf6e3667 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is for all the tests relating directly to heap memory, including
  * page allocation and slab allocations.
index c7635a79341fb3e52d527135db2a1c958cc7e087..53b85c9d16b89247d0fa66d0dce5192d71f9c63e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is for all the tests related to validating kernel memory
  * permissions: non-executable regions, non-writable regions, and
index 3564477b8c2dad4cde23eda8fc8bb3b938d6bc86..58d180af72cf0e3afd3f1a9459aef892cbc85eb3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This includes functions that are meant to live entirely in .rodata
  * (via objcopy tricks), to validate the non-executability of .rodata.
index df6ac985fbb5867b37596b2ee4c80b8687ed3acc..a64372cc148dbd67951a2cf94611cc39081b3a2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is for all the tests related to copy_to_user() and copy_from_user()
  * hardening.
index 12cceb011a23de50a1e9a6dbddc12dacfe8cc1a7..cd6825afa8e1b028e70ef93613e6070255c3d3ec 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel Management Engine Interface (Intel MEI) Linux driver
 # Copyright (c) 2010-2014, Intel Corporation.
index c8307e8b4c163977f7b4ebf8ed2e8991fc2393d7..0ccccbaf530d258a08acf633d34d9861c630ba64 100644 (file)
 #define MEI_DEV_ID_BXT_M      0x1A9A  /* Broxton M */
 #define MEI_DEV_ID_APL_I      0x5A9A  /* Apollo Lake I */
 
+#define MEI_DEV_ID_GLK        0x319A  /* Gemini Lake */
+
 #define MEI_DEV_ID_KBP        0xA2BA  /* Kaby Point */
 #define MEI_DEV_ID_KBP_2      0xA2BB  /* Kaby Point 2 */
 
index 4ff40d3196765a444ead85dabf8730fa2777a622..78b3172c8e6e298fa8f74c93db2850c4f96b95a8 100644 (file)
@@ -93,6 +93,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
        {MEI_PCI_DEVICE(MEI_DEV_ID_BXT_M, MEI_ME_PCH8_CFG)},
        {MEI_PCI_DEVICE(MEI_DEV_ID_APL_I, MEI_ME_PCH8_CFG)},
 
+       {MEI_PCI_DEVICE(MEI_DEV_ID_GLK, MEI_ME_PCH8_CFG)},
+
        {MEI_PCI_DEVICE(MEI_DEV_ID_KBP, MEI_ME_PCH8_CFG)},
        {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, MEI_ME_PCH8_CFG)},
 
@@ -226,12 +228,15 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
 
        /*
-       * For not wake-able HW runtime pm framework
-       * can't be used on pci device level.
-       * Use domain runtime pm callbacks instead.
-       */
-       if (!pci_dev_run_wake(pdev))
-               mei_me_set_pm_domain(dev);
+        * ME maps runtime suspend/resume to D0i states,
+        * hence we need to go around native PCI runtime service which
+        * eventually brings the device into D3cold/hot state,
+        * but the mei device cannot wake up from D3 unlike from D0i3.
+        * To get around the PCI device native runtime pm,
+        * ME uses runtime pm domain handlers which take precedence
+        * over the driver's pm handlers.
+        */
+       mei_me_set_pm_domain(dev);
 
        if (mei_pg_is_enabled(dev))
                pm_runtime_put_noidle(&pdev->dev);
@@ -271,8 +276,7 @@ static void mei_me_shutdown(struct pci_dev *pdev)
        dev_dbg(&pdev->dev, "shutdown\n");
        mei_stop(dev);
 
-       if (!pci_dev_run_wake(pdev))
-               mei_me_unset_pm_domain(dev);
+       mei_me_unset_pm_domain(dev);
 
        mei_disable_interrupts(dev);
        free_irq(pdev->irq, dev);
@@ -300,8 +304,7 @@ static void mei_me_remove(struct pci_dev *pdev)
        dev_dbg(&pdev->dev, "stop\n");
        mei_stop(dev);
 
-       if (!pci_dev_run_wake(pdev))
-               mei_me_unset_pm_domain(dev);
+       mei_me_unset_pm_domain(dev);
 
        mei_disable_interrupts(dev);
 
index e38a5f144373451fc87007ffc1cf4292059c5408..0566f9bfa7de6c68c44d245e7e1deec84c345f71 100644 (file)
@@ -144,12 +144,14 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
 
        /*
-       * For not wake-able HW runtime pm framework
-       * can't be used on pci device level.
-       * Use domain runtime pm callbacks instead.
-       */
-       if (!pci_dev_run_wake(pdev))
-               mei_txe_set_pm_domain(dev);
+        * TXE maps runtime suspend/resume to own power gating states,
+        * hence we need to go around native PCI runtime service which
+        * eventually brings the device into D3cold/hot state.
+        * But the TXE device cannot wake up from D3 unlike from own
+        * power gating. To get around PCI device native runtime pm,
+        * TXE uses runtime pm domain handlers which take precedence.
+        */
+       mei_txe_set_pm_domain(dev);
 
        pm_runtime_put_noidle(&pdev->dev);
 
@@ -186,8 +188,7 @@ static void mei_txe_shutdown(struct pci_dev *pdev)
        dev_dbg(&pdev->dev, "shutdown\n");
        mei_stop(dev);
 
-       if (!pci_dev_run_wake(pdev))
-               mei_txe_unset_pm_domain(dev);
+       mei_txe_unset_pm_domain(dev);
 
        mei_disable_interrupts(dev);
        free_irq(pdev->irq, dev);
@@ -215,8 +216,7 @@ static void mei_txe_remove(struct pci_dev *pdev)
 
        mei_stop(dev);
 
-       if (!pci_dev_run_wake(pdev))
-               mei_txe_unset_pm_domain(dev);
+       mei_txe_unset_pm_domain(dev);
 
        mei_disable_interrupts(dev);
        free_irq(pdev->irq, dev);
@@ -318,15 +318,7 @@ static int mei_txe_pm_runtime_suspend(struct device *device)
        else
                ret = -EAGAIN;
 
-       /*
-        * If everything is okay we're about to enter PCI low
-        * power state (D3) therefor we need to disable the
-        * interrupts towards host.
-        * However if device is not wakeable we do not enter
-        * D-low state and we need to keep the interrupt kicking
-        */
-       if (!ret && pci_dev_run_wake(pdev))
-               mei_disable_interrupts(dev);
+       /* keep irq on we are staying in D0 */
 
        dev_dbg(&pdev->dev, "rpm: txe: runtime suspend ret=%d\n", ret);
 
index f2b1323ff96c3e2de07c2180cfbdda3aa3513f3d..1a43622b183f8dbc2d0abdbb41747cae2ae07461 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel MIC Linux driver.
 # Copyright(c) 2013, Intel Corporation.
index 6e9675e12a09033223855bea05273b18b1b9083b..921a7e7e0fbd6b5caf946c36e0a72952181c00d5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel MIC Linux driver.
 # Copyright(c) 2013, Intel Corporation.
index b85d4d49df466ed5c7034ec2354bf1dac2165826..97d74cb120307e5baba802a19b84d4c6eec3098a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel MIC Coprocessor State Management (COSM) Driver
 # Copyright(c) 2015, Intel Corporation.
index f3b502333deda3718e8da3a31fae774772fa2541..25f153367980bc63e8da2421cd982b38def9a96b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - Intel MIC Linux driver.
 # Copyright(c) 2013, Intel Corporation.
index 29cfc3e51ac9bc5bb7b4531d904e9987ea3c7db3..ff372555d118f22ed68474a4ebc17c5c63c08061 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile - SCIF driver.
 # Copyright(c) 2014, Intel Corporation.
index 4fc40d8e1bcc57104fb31f24513204e6330f8bf7..bbb622c19c06822b2524012426452a7bc73ef557 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for SGI's XP devices.
 #
index 7e3ed1aeada2b59d6e3db2b9189d985d9a2cc958..abba078f7f4903eac35671aa3db54823362e86fb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel mmc core.
 #
index 29fc1e662891d7bc2157ff55740bd2f110f4e14d..2ad7b5c691569e37cd366425c62c6ae0514f3857 100644 (file)
@@ -1634,8 +1634,6 @@ static void mmc_blk_data_prep(struct mmc_queue *mq, struct mmc_queue_req *mqrq,
        }
 
        mqrq->areq.mrq = &brq->mrq;
-
-       mmc_queue_bounce_pre(mqrq);
 }
 
 static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
@@ -1829,7 +1827,6 @@ static void mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *new_req)
                brq = &mq_rq->brq;
                old_req = mmc_queue_req_to_req(mq_rq);
                type = rq_data_dir(old_req) == READ ? MMC_BLK_READ : MMC_BLK_WRITE;
-               mmc_queue_bounce_post(mq_rq);
 
                switch (status) {
                case MMC_BLK_SUCCESS:
index 860ca7c8df8602cefd3daeeaa39026f5644b511a..5946636101ef297e57240f879c138f5ea361eb5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MMC_CORE_BLOCK_H
 #define _MMC_CORE_BLOCK_H
 
index a7eb623f8daa3e610891ffb30157dd5e4dd4e103..36217ad5e9b1fbddb4c5dedf6dd711374fc27497 100644 (file)
@@ -1286,6 +1286,23 @@ out_err:
        return err;
 }
 
+static void mmc_select_driver_type(struct mmc_card *card)
+{
+       int card_drv_type, drive_strength, drv_type;
+
+       card_drv_type = card->ext_csd.raw_driver_strength |
+                       mmc_driver_type_mask(0);
+
+       drive_strength = mmc_select_drive_strength(card,
+                                                  card->ext_csd.hs200_max_dtr,
+                                                  card_drv_type, &drv_type);
+
+       card->drive_strength = drive_strength;
+
+       if (drv_type)
+               mmc_set_driver_type(card->host, drv_type);
+}
+
 static int mmc_select_hs400es(struct mmc_card *card)
 {
        struct mmc_host *host = card->host;
@@ -1341,6 +1358,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
                goto out_err;
        }
 
+       mmc_select_driver_type(card);
+
        /* Switch card to HS400 */
        val = EXT_CSD_TIMING_HS400 |
              card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
@@ -1374,23 +1393,6 @@ out_err:
        return err;
 }
 
-static void mmc_select_driver_type(struct mmc_card *card)
-{
-       int card_drv_type, drive_strength, drv_type;
-
-       card_drv_type = card->ext_csd.raw_driver_strength |
-                       mmc_driver_type_mask(0);
-
-       drive_strength = mmc_select_drive_strength(card,
-                                                  card->ext_csd.hs200_max_dtr,
-                                                  card_drv_type, &drv_type);
-
-       card->drive_strength = drive_strength;
-
-       if (drv_type)
-               mmc_set_driver_type(card->host, drv_type);
-}
-
 /*
  * For device supporting HS200 mode, the following sequence
  * should be done before executing the tuning process.
index affa7370ba827917a78cff55c4e503220ab1ebaa..0a4e77a5ba33fe7e0009ab1f7f97078a38e1559c 100644 (file)
@@ -23,8 +23,6 @@
 #include "core.h"
 #include "card.h"
 
-#define MMC_QUEUE_BOUNCESZ     65536
-
 /*
  * Prepare a MMC request. This just filters out odd stuff.
  */
@@ -150,26 +148,6 @@ static void mmc_queue_setup_discard(struct request_queue *q,
                queue_flag_set_unlocked(QUEUE_FLAG_SECERASE, q);
 }
 
-static unsigned int mmc_queue_calc_bouncesz(struct mmc_host *host)
-{
-       unsigned int bouncesz = MMC_QUEUE_BOUNCESZ;
-
-       if (host->max_segs != 1 || (host->caps & MMC_CAP_NO_BOUNCE_BUFF))
-               return 0;
-
-       if (bouncesz > host->max_req_size)
-               bouncesz = host->max_req_size;
-       if (bouncesz > host->max_seg_size)
-               bouncesz = host->max_seg_size;
-       if (bouncesz > host->max_blk_count * 512)
-               bouncesz = host->max_blk_count * 512;
-
-       if (bouncesz <= 512)
-               return 0;
-
-       return bouncesz;
-}
-
 /**
  * mmc_init_request() - initialize the MMC-specific per-request data
  * @q: the request queue
@@ -184,26 +162,9 @@ static int mmc_init_request(struct request_queue *q, struct request *req,
        struct mmc_card *card = mq->card;
        struct mmc_host *host = card->host;
 
-       if (card->bouncesz) {
-               mq_rq->bounce_buf = kmalloc(card->bouncesz, gfp);
-               if (!mq_rq->bounce_buf)
-                       return -ENOMEM;
-               if (card->bouncesz > 512) {
-                       mq_rq->sg = mmc_alloc_sg(1, gfp);
-                       if (!mq_rq->sg)
-                               return -ENOMEM;
-                       mq_rq->bounce_sg = mmc_alloc_sg(card->bouncesz / 512,
-                                                       gfp);
-                       if (!mq_rq->bounce_sg)
-                               return -ENOMEM;
-               }
-       } else {
-               mq_rq->bounce_buf = NULL;
-               mq_rq->bounce_sg = NULL;
-               mq_rq->sg = mmc_alloc_sg(host->max_segs, gfp);
-               if (!mq_rq->sg)
-                       return -ENOMEM;
-       }
+       mq_rq->sg = mmc_alloc_sg(host->max_segs, gfp);
+       if (!mq_rq->sg)
+               return -ENOMEM;
 
        return 0;
 }
@@ -212,13 +173,6 @@ static void mmc_exit_request(struct request_queue *q, struct request *req)
 {
        struct mmc_queue_req *mq_rq = req_to_mmc_queue_req(req);
 
-       /* It is OK to kfree(NULL) so this will be smooth */
-       kfree(mq_rq->bounce_sg);
-       mq_rq->bounce_sg = NULL;
-
-       kfree(mq_rq->bounce_buf);
-       mq_rq->bounce_buf = NULL;
-
        kfree(mq_rq->sg);
        mq_rq->sg = NULL;
 }
@@ -265,18 +219,11 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
        if (mmc_can_erase(card))
                mmc_queue_setup_discard(mq->queue, card);
 
-       card->bouncesz = mmc_queue_calc_bouncesz(host);
-       if (card->bouncesz) {
-               blk_queue_max_hw_sectors(mq->queue, card->bouncesz / 512);
-               blk_queue_max_segments(mq->queue, card->bouncesz / 512);
-               blk_queue_max_segment_size(mq->queue, card->bouncesz);
-       } else {
-               blk_queue_bounce_limit(mq->queue, limit);
-               blk_queue_max_hw_sectors(mq->queue,
-                       min(host->max_blk_count, host->max_req_size / 512));
-               blk_queue_max_segments(mq->queue, host->max_segs);
-               blk_queue_max_segment_size(mq->queue, host->max_seg_size);
-       }
+       blk_queue_bounce_limit(mq->queue, limit);
+       blk_queue_max_hw_sectors(mq->queue,
+               min(host->max_blk_count, host->max_req_size / 512));
+       blk_queue_max_segments(mq->queue, host->max_segs);
+       blk_queue_max_segment_size(mq->queue, host->max_seg_size);
 
        sema_init(&mq->thread_sem, 1);
 
@@ -365,56 +312,7 @@ void mmc_queue_resume(struct mmc_queue *mq)
  */
 unsigned int mmc_queue_map_sg(struct mmc_queue *mq, struct mmc_queue_req *mqrq)
 {
-       unsigned int sg_len;
-       size_t buflen;
-       struct scatterlist *sg;
        struct request *req = mmc_queue_req_to_req(mqrq);
-       int i;
-
-       if (!mqrq->bounce_buf)
-               return blk_rq_map_sg(mq->queue, req, mqrq->sg);
-
-       sg_len = blk_rq_map_sg(mq->queue, req, mqrq->bounce_sg);
-
-       mqrq->bounce_sg_len = sg_len;
-
-       buflen = 0;
-       for_each_sg(mqrq->bounce_sg, sg, sg_len, i)
-               buflen += sg->length;
-
-       sg_init_one(mqrq->sg, mqrq->bounce_buf, buflen);
-
-       return 1;
-}
-
-/*
- * If writing, bounce the data to the buffer before the request
- * is sent to the host driver
- */
-void mmc_queue_bounce_pre(struct mmc_queue_req *mqrq)
-{
-       if (!mqrq->bounce_buf)
-               return;
-
-       if (rq_data_dir(mmc_queue_req_to_req(mqrq)) != WRITE)
-               return;
-
-       sg_copy_to_buffer(mqrq->bounce_sg, mqrq->bounce_sg_len,
-               mqrq->bounce_buf, mqrq->sg[0].length);
-}
-
-/*
- * If reading, bounce the data from the buffer after the request
- * has been handled by the host driver
- */
-void mmc_queue_bounce_post(struct mmc_queue_req *mqrq)
-{
-       if (!mqrq->bounce_buf)
-               return;
-
-       if (rq_data_dir(mmc_queue_req_to_req(mqrq)) != READ)
-               return;
 
-       sg_copy_from_buffer(mqrq->bounce_sg, mqrq->bounce_sg_len,
-               mqrq->bounce_buf, mqrq->sg[0].length);
+       return blk_rq_map_sg(mq->queue, req, mqrq->sg);
 }
index 04fc89360a7a1a5669d7d3a027edc2fd6fdbc1f6..6bfba32ffa66d94e4848e00f9e1e848fdcabe1a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MMC_QUEUE_H
 #define MMC_QUEUE_H
 
@@ -49,9 +50,6 @@ enum mmc_drv_op {
 struct mmc_queue_req {
        struct mmc_blk_request  brq;
        struct scatterlist      *sg;
-       char                    *bounce_buf;
-       struct scatterlist      *bounce_sg;
-       unsigned int            bounce_sg_len;
        struct mmc_async_req    areq;
        enum mmc_drv_op         drv_op;
        int                     drv_op_result;
@@ -81,11 +79,8 @@ extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
 extern void mmc_cleanup_queue(struct mmc_queue *);
 extern void mmc_queue_suspend(struct mmc_queue *);
 extern void mmc_queue_resume(struct mmc_queue *);
-
 extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
                                     struct mmc_queue_req *);
-extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
-extern void mmc_queue_bounce_post(struct mmc_queue_req *);
 
 extern int mmc_access_rpmb(struct mmc_queue *);
 
index fb725934fa21cee1b98fd7bc08227bf6d0317549..f664e9cbc9f8b66aa9f4f3c8fdd55882d99c8c79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  This file contains work-arounds for many known SD/MMC
  *  and SDIO hardware bugs.
index 1ada9808c3296921c4b3dff5424482a3ad86327d..497c026a5c5a4443e176347d8e552db6f5d4832f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MMC_CORE_SD_H
 #define _MMC_CORE_SD_H
 
index 02179ed2a40d7a87d0d1ae7ed43e95388ef36a72..8c15637178ff3cec73b637633710f84e4dd93a00 100644 (file)
@@ -5,7 +5,7 @@
 comment "MMC/SD/SDIO Host Controller Drivers"
 
 config MMC_DEBUG
-       bool "MMC host drivers debugginG"
+       bool "MMC host drivers debugging"
        depends on MMC != n
        help
          This is an option for use by developers; most people should
index 303f5cd46cd9092171117639fcb2da5733dde146..7c7b29ff591a1cac0fbc1a5832569377c0dbc01c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for MMC/SD host controller drivers
 #
index b9cc9599879978972b4c8c96f9dbddc26caebb2f..eee08d81b24214c3ea0c5555fa1f1f419249f9d6 100644 (file)
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 2016 Cavium Inc.
  */
+#include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/interrupt.h>
 #include <linux/mmc/mmc.h>
@@ -149,8 +150,11 @@ error:
        for (i = 0; i < CAVIUM_MAX_MMC; i++) {
                if (host->slot[i])
                        cvm_mmc_of_slot_remove(host->slot[i]);
-               if (host->slot_pdev[i])
+               if (host->slot_pdev[i]) {
+                       get_device(&host->slot_pdev[i]->dev);
                        of_platform_device_destroy(&host->slot_pdev[i]->dev, NULL);
+                       put_device(&host->slot_pdev[i]->dev);
+               }
        }
        clk_disable_unprepare(host->clk);
        return ret;
index 27fb625cbcf3ff459a62668a93c80a30883fbe21..fbd29f00fca05e5dc46e09d1aa10c9f619283097 100644 (file)
@@ -1038,7 +1038,7 @@ int cvm_mmc_of_slot_probe(struct device *dev, struct cvm_mmc_host *host)
         */
        mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
                     MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_POWER_OFF_CARD |
-                    MMC_CAP_3_3V_DDR | MMC_CAP_NO_BOUNCE_BUFF;
+                    MMC_CAP_3_3V_DDR;
 
        if (host->use_sg)
                mmc->max_segs = 16;
index f369997a39ec4fde89cf5f44bf4be06ac6291e8b..09ac52766f144eb38d046df778efd30e4db437a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DW_MMC_ZX_H_
 #define _DW_MMC_ZX_H_
 
index 860313bd952abb2bee3b87f28acaca27bb041a54..4f2806720c5c355aad0f7c87a3c28ff641c25a4e 100644 (file)
@@ -401,16 +401,37 @@ static u32 dw_mci_prep_stop_abort(struct dw_mci *host, struct mmc_command *cmd)
 static inline void dw_mci_set_cto(struct dw_mci *host)
 {
        unsigned int cto_clks;
+       unsigned int cto_div;
        unsigned int cto_ms;
+       unsigned long irqflags;
 
        cto_clks = mci_readl(host, TMOUT) & 0xff;
-       cto_ms = DIV_ROUND_UP(cto_clks, host->bus_hz / 1000);
+       cto_div = (mci_readl(host, CLKDIV) & 0xff) * 2;
+       if (cto_div == 0)
+               cto_div = 1;
+       cto_ms = DIV_ROUND_UP(MSEC_PER_SEC * cto_clks * cto_div, host->bus_hz);
 
        /* add a bit spare time */
        cto_ms += 10;
 
-       mod_timer(&host->cto_timer,
-                 jiffies + msecs_to_jiffies(cto_ms) + 1);
+       /*
+        * The durations we're working with are fairly short so we have to be
+        * extra careful about synchronization here.  Specifically in hardware a
+        * command timeout is _at most_ 5.1 ms, so that means we expect an
+        * interrupt (either command done or timeout) to come rather quickly
+        * after the mci_writel.  ...but just in case we have a long interrupt
+        * latency let's add a bit of paranoia.
+        *
+        * In general we'll assume that at least an interrupt will be asserted
+        * in hardware by the time the cto_timer runs.  ...and if it hasn't
+        * been asserted in hardware by that time then we'll assume it'll never
+        * come.
+        */
+       spin_lock_irqsave(&host->irq_lock, irqflags);
+       if (!test_bit(EVENT_CMD_COMPLETE, &host->pending_events))
+               mod_timer(&host->cto_timer,
+                       jiffies + msecs_to_jiffies(cto_ms) + 1);
+       spin_unlock_irqrestore(&host->irq_lock, irqflags);
 }
 
 static void dw_mci_start_command(struct dw_mci *host,
@@ -425,11 +446,11 @@ static void dw_mci_start_command(struct dw_mci *host,
        wmb(); /* drain writebuffer */
        dw_mci_wait_while_busy(host, cmd_flags);
 
+       mci_writel(host, CMD, cmd_flags | SDMMC_CMD_START);
+
        /* response expected command only */
        if (cmd_flags & SDMMC_CMD_RESP_EXP)
                dw_mci_set_cto(host);
-
-       mci_writel(host, CMD, cmd_flags | SDMMC_CMD_START);
 }
 
 static inline void send_stop_abort(struct dw_mci *host, struct mmc_data *data)
@@ -1915,10 +1936,15 @@ static int dw_mci_data_complete(struct dw_mci *host, struct mmc_data *data)
 static void dw_mci_set_drto(struct dw_mci *host)
 {
        unsigned int drto_clks;
+       unsigned int drto_div;
        unsigned int drto_ms;
 
        drto_clks = mci_readl(host, TMOUT) >> 8;
-       drto_ms = DIV_ROUND_UP(drto_clks, host->bus_hz / 1000);
+       drto_div = (mci_readl(host, CLKDIV) & 0xff) * 2;
+       if (drto_div == 0)
+               drto_div = 1;
+       drto_ms = DIV_ROUND_UP(MSEC_PER_SEC * drto_clks * drto_div,
+                              host->bus_hz);
 
        /* add a bit spare time */
        drto_ms += 10;
@@ -1926,6 +1952,24 @@ static void dw_mci_set_drto(struct dw_mci *host)
        mod_timer(&host->dto_timer, jiffies + msecs_to_jiffies(drto_ms));
 }
 
+static bool dw_mci_clear_pending_cmd_complete(struct dw_mci *host)
+{
+       if (!test_bit(EVENT_CMD_COMPLETE, &host->pending_events))
+               return false;
+
+       /*
+        * Really be certain that the timer has stopped.  This is a bit of
+        * paranoia and could only really happen if we had really bad
+        * interrupt latency and the interrupt routine and timeout were
+        * running concurrently so that the del_timer() in the interrupt
+        * handler couldn't run.
+        */
+       WARN_ON(del_timer_sync(&host->cto_timer));
+       clear_bit(EVENT_CMD_COMPLETE, &host->pending_events);
+
+       return true;
+}
+
 static void dw_mci_tasklet_func(unsigned long priv)
 {
        struct dw_mci *host = (struct dw_mci *)priv;
@@ -1952,8 +1996,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
 
                case STATE_SENDING_CMD11:
                case STATE_SENDING_CMD:
-                       if (!test_and_clear_bit(EVENT_CMD_COMPLETE,
-                                               &host->pending_events))
+                       if (!dw_mci_clear_pending_cmd_complete(host))
                                break;
 
                        cmd = host->cmd;
@@ -2122,8 +2165,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
                        /* fall through */
 
                case STATE_SENDING_STOP:
-                       if (!test_and_clear_bit(EVENT_CMD_COMPLETE,
-                                               &host->pending_events))
+                       if (!dw_mci_clear_pending_cmd_complete(host))
                                break;
 
                        /* CMD error in data command */
@@ -2570,6 +2612,8 @@ done:
 
 static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status)
 {
+       del_timer(&host->cto_timer);
+
        if (!host->cmd_status)
                host->cmd_status = status;
 
@@ -2594,6 +2638,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
        struct dw_mci *host = dev_id;
        u32 pending;
        struct dw_mci_slot *slot = host->slot;
+       unsigned long irqflags;
 
        pending = mci_readl(host, MINTSTS); /* read-only mask reg */
 
@@ -2601,8 +2646,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
                /* Check volt switch first, since it can look like an error */
                if ((host->state == STATE_SENDING_CMD11) &&
                    (pending & SDMMC_INT_VOLT_SWITCH)) {
-                       unsigned long irqflags;
-
                        mci_writel(host, RINTSTS, SDMMC_INT_VOLT_SWITCH);
                        pending &= ~SDMMC_INT_VOLT_SWITCH;
 
@@ -2618,11 +2661,15 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
                }
 
                if (pending & DW_MCI_CMD_ERROR_FLAGS) {
+                       spin_lock_irqsave(&host->irq_lock, irqflags);
+
                        del_timer(&host->cto_timer);
                        mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
                        host->cmd_status = pending;
                        smp_wmb(); /* drain writebuffer */
                        set_bit(EVENT_CMD_COMPLETE, &host->pending_events);
+
+                       spin_unlock_irqrestore(&host->irq_lock, irqflags);
                }
 
                if (pending & DW_MCI_DATA_ERROR_FLAGS) {
@@ -2662,9 +2709,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
                }
 
                if (pending & SDMMC_INT_CMD_DONE) {
-                       del_timer(&host->cto_timer);
+                       spin_lock_irqsave(&host->irq_lock, irqflags);
+
                        mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE);
                        dw_mci_cmd_interrupt(host, pending);
+
+                       spin_unlock_irqrestore(&host->irq_lock, irqflags);
                }
 
                if (pending & SDMMC_INT_CD) {
@@ -2938,7 +2988,35 @@ static void dw_mci_cmd11_timer(unsigned long arg)
 static void dw_mci_cto_timer(unsigned long arg)
 {
        struct dw_mci *host = (struct dw_mci *)arg;
+       unsigned long irqflags;
+       u32 pending;
 
+       spin_lock_irqsave(&host->irq_lock, irqflags);
+
+       /*
+        * If somehow we have very bad interrupt latency it's remotely possible
+        * that the timer could fire while the interrupt is still pending or
+        * while the interrupt is midway through running.  Let's be paranoid
+        * and detect those two cases.  Note that this is paranoia is somewhat
+        * justified because in this function we don't actually cancel the
+        * pending command in the controller--we just assume it will never come.
+        */
+       pending = mci_readl(host, MINTSTS); /* read-only mask reg */
+       if (pending & (DW_MCI_CMD_ERROR_FLAGS | SDMMC_INT_CMD_DONE)) {
+               /* The interrupt should fire; no need to act but we can warn */
+               dev_warn(host->dev, "Unexpected interrupt latency\n");
+               goto exit;
+       }
+       if (test_bit(EVENT_CMD_COMPLETE, &host->pending_events)) {
+               /* Presumably interrupt handler couldn't delete the timer */
+               dev_warn(host->dev, "CTO timeout when already completed\n");
+               goto exit;
+       }
+
+       /*
+        * Continued paranoia to make sure we're in the state we expect.
+        * This paranoia isn't really justified but it seems good to be safe.
+        */
        switch (host->state) {
        case STATE_SENDING_CMD11:
        case STATE_SENDING_CMD:
@@ -2957,6 +3035,9 @@ static void dw_mci_cto_timer(unsigned long arg)
                         host->state);
                break;
        }
+
+exit:
+       spin_unlock_irqrestore(&host->irq_lock, irqflags);
 }
 
 static void dw_mci_dto_timer(unsigned long arg)
index c885c2d4b90418a93519ab05a989a7d5c77efd76..85745ef179e22b2e49e4b23e15df311891f192dc 100644 (file)
@@ -531,8 +531,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
        div->shift = __ffs(CLK_DIV_MASK);
        div->width = __builtin_popcountl(CLK_DIV_MASK);
        div->hw.init = &init;
-       div->flags = (CLK_DIVIDER_ONE_BASED |
-                     CLK_DIVIDER_ROUND_CLOSEST);
+       div->flags = CLK_DIVIDER_ONE_BASED;
 
        clk = devm_clk_register(host->dev, &div->hw);
        if (WARN_ON(IS_ERR(clk)))
@@ -717,6 +716,22 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode,
 static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
 {
        struct meson_host *host = mmc_priv(mmc);
+       int ret;
+
+       /*
+        * If this is the initial tuning, try to get a sane Rx starting
+        * phase before doing the actual tuning.
+        */
+       if (!mmc->doing_retune) {
+               ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
+
+               if (ret)
+                       return ret;
+       }
+
+       ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->tx_clk);
+       if (ret)
+               return ret;
 
        return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk);
 }
@@ -746,6 +761,11 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        case MMC_POWER_UP:
                if (!IS_ERR(mmc->supply.vmmc))
                        mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
+
+               /* Reset phases */
+               clk_set_phase(host->rx_clk, 0);
+               clk_set_phase(host->tx_clk, 270);
+
                break;
 
        case MMC_POWER_ON:
@@ -759,8 +779,6 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                                host->vqmmc_enabled = true;
                }
 
-               /* Reset rx phase */
-               clk_set_phase(host->rx_clk, 0);
                break;
        }
 
index 59ab194cb0099b19dcaa247977bc9ccc7c8175e1..c763b404510f3a29d3864290297b22f596701cc3 100644 (file)
@@ -702,11 +702,7 @@ static int pxamci_probe(struct platform_device *pdev)
 
        pxamci_init_ocr(host);
 
-       /*
-        * This architecture used to disable bounce buffers through its
-        * defconfig, now it is done at runtime as a host property.
-        */
-       mmc->caps = MMC_CAP_NO_BOUNCE_BUFF;
+       mmc->caps = 0;
        host->cmdat = 0;
        if (!cpu_is_pxa25x()) {
                mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
index f6c2e2fcce370adbb533d14dc5017ee28443bc5d..d301ca18c5d4c329c1fc600b77b32297cb1a3de9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define MMC_STRPCL     0x0000
 #define STOP_CLOCK             (1 << 0)
 #define START_CLOCK            (2 << 0)
index f905f2361d12fa5ee1757b38ddb46eb4e653066b..8bae88a150fd45b3284b594d2d090d4f78fe1fc7 100644 (file)
@@ -146,11 +146,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
        WARN_ON(host->sg_len > 1);
 
        /* This DMAC cannot handle if buffer is not 8-bytes alignment */
-       if (!IS_ALIGNED(sg->offset, 8)) {
-               host->force_pio = true;
-               renesas_sdhi_internal_dmac_enable_dma(host, false);
-               return;
-       }
+       if (!IS_ALIGNED(sg->offset, 8))
+               goto force_pio;
 
        if (data->flags & MMC_DATA_READ) {
                dtran_mode |= DTRAN_MODE_CH_NUM_CH1;
@@ -163,8 +160,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
        }
 
        ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, dir);
-       if (ret < 0)
-               return;
+       if (ret == 0)
+               goto force_pio;
 
        renesas_sdhi_internal_dmac_enable_dma(host, true);
 
@@ -176,6 +173,12 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
                                            dtran_mode);
        renesas_sdhi_internal_dmac_dm_write(host, DM_DTRAN_ADDR,
                                            sg->dma_address);
+
+       return;
+
+force_pio:
+       host->force_pio = true;
+       renesas_sdhi_internal_dmac_enable_dma(host, false);
 }
 
 static void renesas_sdhi_internal_dmac_issue_tasklet_fn(unsigned long arg)
index bbaddf18a1b3c4022592f631878441ad19a1fca2..67d787fa330651738ce8c2bf4e58fd8eebcf6e2a 100644 (file)
@@ -392,6 +392,7 @@ static const struct sdhci_pci_fixes sdhci_intel_pch_sdio = {
 
 enum {
        INTEL_DSM_FNS           =  0,
+       INTEL_DSM_V18_SWITCH    =  3,
        INTEL_DSM_DRV_STRENGTH  =  9,
        INTEL_DSM_D3_RETUNE     = 10,
 };
@@ -447,6 +448,8 @@ static void intel_dsm_init(struct intel_host *intel_host, struct device *dev,
        int err;
        u32 val;
 
+       intel_host->d3_retune = true;
+
        err = __intel_dsm(intel_host, dev, INTEL_DSM_FNS, &intel_host->dsm_fns);
        if (err) {
                pr_debug("%s: DSM not supported, error %d\n",
@@ -557,6 +560,19 @@ static void intel_hs400_enhanced_strobe(struct mmc_host *mmc,
        sdhci_writel(host, val, INTEL_HS400_ES_REG);
 }
 
+static void sdhci_intel_voltage_switch(struct sdhci_host *host)
+{
+       struct sdhci_pci_slot *slot = sdhci_priv(host);
+       struct intel_host *intel_host = sdhci_pci_priv(slot);
+       struct device *dev = &slot->chip->pdev->dev;
+       u32 result = 0;
+       int err;
+
+       err = intel_dsm(intel_host, dev, INTEL_DSM_V18_SWITCH, &result);
+       pr_debug("%s: %s DSM error %d result %u\n",
+                mmc_hostname(host->mmc), __func__, err, result);
+}
+
 static const struct sdhci_ops sdhci_intel_byt_ops = {
        .set_clock              = sdhci_set_clock,
        .set_power              = sdhci_intel_set_power,
@@ -565,6 +581,7 @@ static const struct sdhci_ops sdhci_intel_byt_ops = {
        .reset                  = sdhci_reset,
        .set_uhs_signaling      = sdhci_set_uhs_signaling,
        .hw_reset               = sdhci_pci_hw_reset,
+       .voltage_switch         = sdhci_intel_voltage_switch,
 };
 
 static void byt_read_dsm(struct sdhci_pci_slot *slot)
index 75196a2b5289c7d682b9536002507ee5b20a0fa9..3e8ea3e566f6ba41855ed4b89b5939972acc52d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SDHCI_PCI_H
 #define __SDHCI_PCI_H
 
index 2eec2e652c53da9c1f0b9c6156dcdc9778d82d68..0842bbc2d7ad340011a70f43409d2503cf662ff7 100644 (file)
@@ -466,6 +466,7 @@ static int xenon_probe(struct platform_device *pdev)
 {
        struct sdhci_pltfm_host *pltfm_host;
        struct sdhci_host *host;
+       struct xenon_priv *priv;
        int err;
 
        host = sdhci_pltfm_init(pdev, &sdhci_xenon_pdata,
@@ -474,6 +475,7 @@ static int xenon_probe(struct platform_device *pdev)
                return PTR_ERR(host);
 
        pltfm_host = sdhci_priv(host);
+       priv = sdhci_pltfm_priv(pltfm_host);
 
        /*
         * Link Xenon specific mmc_host_ops function,
@@ -491,9 +493,20 @@ static int xenon_probe(struct platform_device *pdev)
        if (err)
                goto free_pltfm;
 
+       priv->axi_clk = devm_clk_get(&pdev->dev, "axi");
+       if (IS_ERR(priv->axi_clk)) {
+               err = PTR_ERR(priv->axi_clk);
+               if (err == -EPROBE_DEFER)
+                       goto err_clk;
+       } else {
+               err = clk_prepare_enable(priv->axi_clk);
+               if (err)
+                       goto err_clk;
+       }
+
        err = mmc_of_parse(host->mmc);
        if (err)
-               goto err_clk;
+               goto err_clk_axi;
 
        sdhci_get_of_property(pdev);
 
@@ -502,11 +515,11 @@ static int xenon_probe(struct platform_device *pdev)
        /* Xenon specific dt parse */
        err = xenon_probe_dt(pdev);
        if (err)
-               goto err_clk;
+               goto err_clk_axi;
 
        err = xenon_sdhc_prepare(host);
        if (err)
-               goto err_clk;
+               goto err_clk_axi;
 
        pm_runtime_get_noresume(&pdev->dev);
        pm_runtime_set_active(&pdev->dev);
@@ -527,6 +540,8 @@ remove_sdhc:
        pm_runtime_disable(&pdev->dev);
        pm_runtime_put_noidle(&pdev->dev);
        xenon_sdhc_unprepare(host);
+err_clk_axi:
+       clk_disable_unprepare(priv->axi_clk);
 err_clk:
        clk_disable_unprepare(pltfm_host->clk);
 free_pltfm:
@@ -538,6 +553,7 @@ static int xenon_remove(struct platform_device *pdev)
 {
        struct sdhci_host *host = platform_get_drvdata(pdev);
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+       struct xenon_priv *priv = sdhci_pltfm_priv(pltfm_host);
 
        pm_runtime_get_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
@@ -546,7 +562,7 @@ static int xenon_remove(struct platform_device *pdev)
        sdhci_remove_host(host, 0);
 
        xenon_sdhc_unprepare(host);
-
+       clk_disable_unprepare(priv->axi_clk);
        clk_disable_unprepare(pltfm_host->clk);
 
        sdhci_pltfm_free(pdev);
index 2bc0510c07696a11015c8e3bcee8c3497bd67384..9994995c7c56867bd24835d86bd1343e8fa3b770 100644 (file)
@@ -83,6 +83,7 @@ struct xenon_priv {
        unsigned char   bus_width;
        unsigned char   timing;
        unsigned int    clock;
+       struct clk      *axi_clk;
 
        int             phy_type;
        /*
index 12cf8288d6635eafef4677630d669c1a60238b45..9c4e6199b854d38c585ae1464d9056a754e4de33 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/mmc/sdio.h>
 #include <linux/scatterlist.h>
 #include <linux/spinlock.h>
+#include <linux/swiotlb.h>
 #include <linux/workqueue.h>
 
 #include "tmio_mmc.h"
@@ -129,50 +130,6 @@ static int tmio_mmc_next_sg(struct tmio_mmc_host *host)
 
 #define CMDREQ_TIMEOUT 5000
 
-#ifdef CONFIG_MMC_DEBUG
-
-#define STATUS_TO_TEXT(a, status, i) \
-       do { \
-               if ((status) & TMIO_STAT_##a) { \
-                       if ((i)++) \
-                               printk(KERN_DEBUG " | "); \
-                       printk(KERN_DEBUG #a); \
-               } \
-       } while (0)
-
-static void pr_debug_status(u32 status)
-{
-       int i = 0;
-
-       pr_debug("status: %08x = ", status);
-       STATUS_TO_TEXT(CARD_REMOVE, status, i);
-       STATUS_TO_TEXT(CARD_INSERT, status, i);
-       STATUS_TO_TEXT(SIGSTATE, status, i);
-       STATUS_TO_TEXT(WRPROTECT, status, i);
-       STATUS_TO_TEXT(CARD_REMOVE_A, status, i);
-       STATUS_TO_TEXT(CARD_INSERT_A, status, i);
-       STATUS_TO_TEXT(SIGSTATE_A, status, i);
-       STATUS_TO_TEXT(CMD_IDX_ERR, status, i);
-       STATUS_TO_TEXT(STOPBIT_ERR, status, i);
-       STATUS_TO_TEXT(ILL_FUNC, status, i);
-       STATUS_TO_TEXT(CMD_BUSY, status, i);
-       STATUS_TO_TEXT(CMDRESPEND, status, i);
-       STATUS_TO_TEXT(DATAEND, status, i);
-       STATUS_TO_TEXT(CRCFAIL, status, i);
-       STATUS_TO_TEXT(DATATIMEOUT, status, i);
-       STATUS_TO_TEXT(CMDTIMEOUT, status, i);
-       STATUS_TO_TEXT(RXOVERFLOW, status, i);
-       STATUS_TO_TEXT(TXUNDERRUN, status, i);
-       STATUS_TO_TEXT(RXRDY, status, i);
-       STATUS_TO_TEXT(TXRQ, status, i);
-       STATUS_TO_TEXT(ILL_ACCESS, status, i);
-       printk("\n");
-}
-
-#else
-#define pr_debug_status(s)  do { } while (0)
-#endif
-
 static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 {
        struct tmio_mmc_host *host = mmc_priv(mmc);
@@ -762,9 +719,6 @@ irqreturn_t tmio_mmc_irq(int irq, void *devid)
        status = sd_ctrl_read16_and_16_as_32(host, CTL_STATUS);
        ireg = status & TMIO_MASK_IRQ & ~host->sdcard_irq_mask;
 
-       pr_debug_status(status);
-       pr_debug_status(ireg);
-
        /* Clear the status except the interrupt status */
        sd_ctrl_write32_as_16_and_16(host, CTL_STATUS, TMIO_MASK_IRQ);
 
@@ -1262,6 +1216,18 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
        mmc->max_blk_count = pdata->max_blk_count ? :
                (PAGE_SIZE / mmc->max_blk_size) * mmc->max_segs;
        mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
+       /*
+        * Since swiotlb has memory size limitation, this will calculate
+        * the maximum size locally (because we don't have any APIs for it now)
+        * and check the current max_req_size. And then, this will update
+        * the max_req_size if needed as a workaround.
+        */
+       if (swiotlb_max_segment()) {
+               unsigned int max_size = (1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
+
+               if (mmc->max_req_size > max_size)
+                       mmc->max_req_size = max_size;
+       }
        mmc->max_seg_size = mmc->max_req_size;
 
        _host->native_hotplug = !(pdata->flags & TMIO_MMC_USE_GPIO_CD ||
index 151d60df303acdbab6db611440be753ab4987b2a..d6f8f625e1ff2806ee9284da58c863598219ed7c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the memory technology device drivers.
 #
index 36582412ccdaeb2c2aea2c0752f8b62e51554154..1f4e84f1cd88bf13e7bf655c170ae9f21a1ab5b3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/drivers/chips/Makefile
 #
index 800b0e853e868479b66b5dd917c602c428e0b3d7..53e6b2d5932bb9e431c4a6b4b42865ecfca48cfc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FWH_LOCK_H
 #define FWH_LOCK_H
 
index f0f767624cc68d987e968e826b1c8d16d820e078..94895eab3066cd5c19b4366938cfab3f0d6ce0d0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/drivers/mtd/devices/Makefile
 #
index b2d7b38f75fdf6acb177c1e5ddde6126cbe80c57..fef0d5e42e2aa0351197ef000505c52dd9442ef4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM47XXSFLASH_H
 #define __BCM47XXSFLASH_H
 
index 5a09a72ab112fd608802657462bb4ebb8c992aee..b849aaf85c347fa0c6e9f89124a78c525422e303 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/drivers/maps/Makefile
 #
index 4ed1a6bb4d3cc146d36b9b10d555ee3f95059a25..830b1b7e702bc7433425bc37c21422d0fb3276a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Cortina Systems Gemini OF physmap add-on
  * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
index c675025288ddf901bc422f3105e4a45514cced9f..60e13a689d6a11a7a16f4ff85ea3998be0b57319 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/of.h>
 #include <linux/mtd/map.h>
 
index 5b86f6dc6b3d40eb37e93fb7b82a5ba4bc6645a8..0302502c9462c660c3e9570c1619999d622404ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/of.h>
 #include <linux/mtd/map.h>
 
index da2cdb5fd6db98862dba7a0fe7c84ca6abd563af..9fc1f727aa766aed96cf74020fff3beef50e0b19 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * tsunami_flash.c
  *
index 55fdb8e1fd2a8c40106d6bc3a0a6f29eda453304..37accfd0400e5ca5e38ee2bac1ec333ad34a320f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * These are exported solely for the purpose of mtd_blkdevs.c and mtdchar.c.
  * You should not use them for _anything_ else.
index 5736b0c90b339b6bc3e8e1ae3189341910b958f2..a308e707392d595902b77a03e2078ffe8da97d9e 100644 (file)
@@ -581,6 +581,14 @@ static struct mtd_part *allocate_partition(struct mtd_info *parent,
                slave->mtd.erasesize = parent->erasesize;
        }
 
+       /*
+        * Slave erasesize might differ from the master one if the master
+        * exposes several regions with different erasesize. Adjust
+        * wr_alignment accordingly.
+        */
+       if (!(slave->mtd.flags & MTD_NO_ERASE))
+               wr_alignment = slave->mtd.erasesize;
+
        tmp = slave->offset;
        remainder = do_div(tmp, wr_alignment);
        if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
index ade5fc4c3819a79ffd575119ed6bbf5607bd8b7f..6e2db700d923ddd14bdd6b0ae9cc5b554cf0ef1e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # linux/drivers/nand/Makefile
 #
index 146af82183145d9d5164665aeaccdf789c4cca98..8268636675efc8b3d81959f0f1911a145c42fcc1 100644 (file)
@@ -363,7 +363,7 @@ atmel_pmecc_create_user(struct atmel_pmecc *pmecc,
        size += (req->ecc.strength + 1) * sizeof(u16);
        /* Reserve space for mu, dmu and delta. */
        size = ALIGN(size, sizeof(s32));
-       size += (req->ecc.strength + 1) * sizeof(s32);
+       size += (req->ecc.strength + 1) * sizeof(s32) * 3;
 
        user = kzalloc(size, GFP_KERNEL);
        if (!user)
index c8834767ab6dcae49667c8b6ac453d2626609b8f..201b9baa52a00642ca8823f6f8cf511d06a5923d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BCM47XXNFLASH_H
 #define __BCM47XXNFLASH_H
 
index b28ffb59eb432273641a0c57b682fb3b8c7dc892..195b845e48b800343a647e5e8c7abd6efd26c6d5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # link order matters; don't link the more generic brcmstb_nand.o before the
 # more specific iproc_nand.o, for instance
 obj-$(CONFIG_MTD_NAND_BRCMNAND)                += iproc_nand.o
index c3bb358ef01eee5b7c7dc0b0ad72b9a3e47f5220..5796468db653450494876bcf6c5da772f7f6bd3e 100644 (file)
@@ -707,7 +707,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
        }
        res = clk_prepare_enable(host->clk);
        if (res)
-               goto err_exit1;
+               goto err_put_clk;
 
        nand_chip->cmd_ctrl = lpc32xx_nand_cmd_ctrl;
        nand_chip->dev_ready = lpc32xx_nand_device_ready;
@@ -814,6 +814,7 @@ err_exit3:
                dma_release_channel(host->dma_chan);
 err_exit2:
        clk_disable_unprepare(host->clk);
+err_put_clk:
        clk_put(host->clk);
 err_exit1:
        lpc32xx_wp_enable(host);
index bcc8cef1c615c5b0336f5310f56ee29a9c44e88a..12edaae17d81f2228eefcc50b9d5de7433119987 100644 (file)
@@ -2668,7 +2668,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len,
 static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
                             struct mtd_oob_ops *ops)
 {
-       int chipnr, realpage, page, blockmask, column;
+       int chipnr, realpage, page, column;
        struct nand_chip *chip = mtd_to_nand(mtd);
        uint32_t writelen = ops->len;
 
@@ -2704,7 +2704,6 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
 
        realpage = (int)(to >> chip->page_shift);
        page = realpage & chip->pagemask;
-       blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1;
 
        /* Invalidate the page cache, when we write to the cached page */
        if (to <= ((loff_t)chip->pagebuf << chip->page_shift) &&
index 9d6540e8b3d22ae0fe3d04422c62cdbf2f2b54d1..f8b624aca9cc7e2a7975af56bf74917e55ecd02d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the OneNAND MTD
 #
index 680188a881301ee195af0320694324da9ca2caeb..420260c25ca05432fd80fb927be9d43bc7f520e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/drivers/mtd/onenand/onenand_bbt.c
  *
index 7d84c5108e1783ef64361c8773219ff01f7ef112..f4c61d282abd5c29538d3e208615f799fcaad251 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MTD_SPI_NOR)      += spi-nor.o
 obj-$(CONFIG_SPI_ASPEED_SMC)   += aspeed-smc.o
 obj-$(CONFIG_SPI_ATMEL_QUADSPI)        += atmel-quadspi.o
index cf1d4a15e10a63394b0410f4349e711f602c6c5d..19c000722cbc86f3246c0b84055eca92db331424 100644 (file)
@@ -1784,7 +1784,7 @@ spi_nor_set_pp_settings(struct spi_nor_pp_command *pp,
  * @nor:       pointer to a 'struct spi_nor'
  * @addr:      offset in the SFDP area to start reading data from
  * @len:       number of bytes to read
- * @buf:       buffer where the SFDP data are copied into
+ * @buf:       buffer where the SFDP data are copied into (dma-safe memory)
  *
  * Whatever the actual numbers of bytes for address and dummy cycles are
  * for (Fast) Read commands, the Read SFDP (5Ah) instruction is always
@@ -1829,6 +1829,36 @@ read_err:
        return ret;
 }
 
+/**
+ * spi_nor_read_sfdp_dma_unsafe() - read Serial Flash Discoverable Parameters.
+ * @nor:       pointer to a 'struct spi_nor'
+ * @addr:      offset in the SFDP area to start reading data from
+ * @len:       number of bytes to read
+ * @buf:       buffer where the SFDP data are copied into
+ *
+ * Wrap spi_nor_read_sfdp() using a kmalloc'ed bounce buffer as @buf is now not
+ * guaranteed to be dma-safe.
+ *
+ * Return: -ENOMEM if kmalloc() fails, the return code of spi_nor_read_sfdp()
+ *          otherwise.
+ */
+static int spi_nor_read_sfdp_dma_unsafe(struct spi_nor *nor, u32 addr,
+                                       size_t len, void *buf)
+{
+       void *dma_safe_buf;
+       int ret;
+
+       dma_safe_buf = kmalloc(len, GFP_KERNEL);
+       if (!dma_safe_buf)
+               return -ENOMEM;
+
+       ret = spi_nor_read_sfdp(nor, addr, len, dma_safe_buf);
+       memcpy(buf, dma_safe_buf, len);
+       kfree(dma_safe_buf);
+
+       return ret;
+}
+
 struct sfdp_parameter_header {
        u8              id_lsb;
        u8              minor;
@@ -2101,7 +2131,7 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
                    bfpt_header->length * sizeof(u32));
        addr = SFDP_PARAM_HEADER_PTP(bfpt_header);
        memset(&bfpt, 0, sizeof(bfpt));
-       err = spi_nor_read_sfdp(nor,  addr, len, &bfpt);
+       err = spi_nor_read_sfdp_dma_unsafe(nor,  addr, len, &bfpt);
        if (err < 0)
                return err;
 
@@ -2127,6 +2157,15 @@ static int spi_nor_parse_bfpt(struct spi_nor *nor,
        params->size = bfpt.dwords[BFPT_DWORD(2)];
        if (params->size & BIT(31)) {
                params->size &= ~BIT(31);
+
+               /*
+                * Prevent overflows on params->size. Anyway, a NOR of 2^64
+                * bits is unlikely to exist so this error probably means
+                * the BFPT we are reading is corrupted/wrong.
+                */
+               if (params->size > 63)
+                       return -EINVAL;
+
                params->size = 1ULL << params->size;
        } else {
                params->size++;
@@ -2243,7 +2282,7 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
        int i, err;
 
        /* Get the SFDP header. */
-       err = spi_nor_read_sfdp(nor, 0, sizeof(header), &header);
+       err = spi_nor_read_sfdp_dma_unsafe(nor, 0, sizeof(header), &header);
        if (err < 0)
                return err;
 
index 937a829bb70111c4e44ad110b9d9dc029f0b8d94..5de0378f90dbdca3179686f0b6a080f036fcd6ef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o
 obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o
 obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o
index 34736bbcc07be0f622e836f5872d1f830df96cb4..3d0b8b5c1a53edaab79627c058da564e5a2e6d69 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) "mtd_test: " fmt
 
 #include <linux/module.h>
index 04afd0e7074f125e5e9d0a1ffc29296d1719dee4..5a6e3bbe0474e95d3307af6d2828bd2f85b8f303 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/mtd/mtd.h>
 #include <linux/sched/signal.h>
 
index 4e3c3d70d8c3f1983f277388d28756e68f2c1e9c..543673605ca7298c4804874b82a3907397499f4e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MTD_UBI) += ubi.o
 
 ubi-y += vtbl.o vmt.o upd.o build.o cdev.o kapi.o eba.o io.o wl.o attach.o
index bd1f07e5ce9a7fbcc0869987f2c25089c6fa9e0e..2aaa3f7f2ba982034c321f22f925859b4f76d4d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef UBI_WL_H
 #define UBI_WL_H
 #ifdef CONFIG_MTD_UBI_FASTMAP
index 8dff900085d6e5e132eb9f13ff0dd543dc20c344..676a75f4182a90525e3abe59f33a4ee0dedf81a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux network device drivers.
 #
index fd2750b269c87c3fe711a1abfaf89ff9d30dd723..7a0bfb351929f870f9cdf47b94321f639de3610d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*      cops.h: LocalTalk driver for Linux.
  *
  *      Authors:
index 531519da99a324c618f8aaf898c0fee0cdf3ba43..9a8e45a46925900bf37839c1bda21a0b1ed53f5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     ipddp.h: Header for IP-over-DDP driver for Linux.
  */
index cd30544a3729743d918f05271919e0ca1f989523..58cf945732a42da1dcadd199086a7c4db4bd87ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /***   ltpc.h
  *
  *
index 5ce8ee63e43594c17159a28db6b1e49686274752..53525e8ea1304d5b5d4ba48ad9dd523093456042 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for linux/drivers/net/arcnet
 #
 
index efcaf6707214ca9dc740d334c1b0dc0c2c50145f..6adbc18711e0ebcfd25239160dfb9620d2152cf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __COM9026_H
 #define __COM9026_H
 
index e52e25a977fa203d82d4d35260584c1b1ef644a9..3868e1a5126d3eee6a0588212073b60715e8daf0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/device.h>
index d8d4ada034b7d6cbddbdf8f227cfe44fa15b4b27..f7799321dffbba9d5c2a86e94f95ae54e8fab29a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/proc_fs.h>
 #include <linux/export.h>
 #include <net/net_namespace.h>
index 9bbd45391f6cd00ea52772260c666bdcb579109c..54ae1165d60ac547e45bc7b7694c0ca9a65c905a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_CAIF_DEBUG) := -DDEBUG
 
 # Serial interface
index 4aabbee133b898a6f30aec7626f6580c12e24054..02b8ed7945647d364e55a21817aaa47df8c056bf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #  Makefile for the Linux Controller Area Network drivers.
 #
index 13f0f219d8aa83ab0ce52823f6ddb697d58c316b..a13a4896a8bddad19ae48f8c58bbaf2f3c8dce84 100644 (file)
 /* FLEXCAN hardware feature flags
  *
  * Below is some version info we got:
- *    SOC   Version   IP-Version  Glitch- [TR]WRN_INT Memory err RTR re-
- *                                Filter? connected?  detection  ception in MB
- *   MX25  FlexCAN2  03.00.00.00     no        no         no        no
- *   MX28  FlexCAN2  03.00.04.00    yes       yes         no        no
- *   MX35  FlexCAN2  03.00.00.00     no        no         no        no
- *   MX53  FlexCAN2  03.00.00.00    yes        no         no        no
- *   MX6s  FlexCAN3  10.00.12.00    yes       yes         no       yes
- *   VF610 FlexCAN3  ?               no       yes        yes       yes?
+ *    SOC   Version   IP-Version  Glitch- [TR]WRN_INT IRQ Err Memory err RTR re-
+ *                                Filter? connected?  Passive detection  ception in MB
+ *   MX25  FlexCAN2  03.00.00.00     no        no         ?       no        no
+ *   MX28  FlexCAN2  03.00.04.00    yes       yes        no       no        no
+ *   MX35  FlexCAN2  03.00.00.00     no        no         ?       no        no
+ *   MX53  FlexCAN2  03.00.00.00    yes        no        no       no        no
+ *   MX6s  FlexCAN3  10.00.12.00    yes       yes        no       no       yes
+ *   VF610 FlexCAN3  ?               no       yes         ?      yes       yes?
  *
  * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
  */
-#define FLEXCAN_QUIRK_BROKEN_ERR_STATE BIT(1) /* [TR]WRN_INT not connected */
+#define FLEXCAN_QUIRK_BROKEN_WERR_STATE        BIT(1) /* [TR]WRN_INT not connected */
 #define FLEXCAN_QUIRK_DISABLE_RXFG     BIT(2) /* Disable RX FIFO Global mask */
 #define FLEXCAN_QUIRK_ENABLE_EACEN_RRS BIT(3) /* Enable EACEN and RRS bit in ctrl2 */
 #define FLEXCAN_QUIRK_DISABLE_MECR     BIT(4) /* Disable Memory error detection */
 #define FLEXCAN_QUIRK_USE_OFF_TIMESTAMP        BIT(5) /* Use timestamp based offloading */
+#define FLEXCAN_QUIRK_BROKEN_PERR_STATE        BIT(6) /* No interrupt for error passive */
 
 /* Structure of the message buffer */
 struct flexcan_mb {
@@ -281,14 +282,17 @@ struct flexcan_priv {
 };
 
 static const struct flexcan_devtype_data fsl_p1010_devtype_data = {
-       .quirks = FLEXCAN_QUIRK_BROKEN_ERR_STATE,
+       .quirks = FLEXCAN_QUIRK_BROKEN_WERR_STATE |
+               FLEXCAN_QUIRK_BROKEN_PERR_STATE,
 };
 
-static const struct flexcan_devtype_data fsl_imx28_devtype_data;
+static const struct flexcan_devtype_data fsl_imx28_devtype_data = {
+       .quirks = FLEXCAN_QUIRK_BROKEN_PERR_STATE,
+};
 
 static const struct flexcan_devtype_data fsl_imx6q_devtype_data = {
        .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
-               FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
+               FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_BROKEN_PERR_STATE,
 };
 
 static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
@@ -335,6 +339,22 @@ static inline void flexcan_write(u32 val, void __iomem *addr)
 }
 #endif
 
+static inline void flexcan_error_irq_enable(const struct flexcan_priv *priv)
+{
+       struct flexcan_regs __iomem *regs = priv->regs;
+       u32 reg_ctrl = (priv->reg_ctrl_default | FLEXCAN_CTRL_ERR_MSK);
+
+       flexcan_write(reg_ctrl, &regs->ctrl);
+}
+
+static inline void flexcan_error_irq_disable(const struct flexcan_priv *priv)
+{
+       struct flexcan_regs __iomem *regs = priv->regs;
+       u32 reg_ctrl = (priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_MSK);
+
+       flexcan_write(reg_ctrl, &regs->ctrl);
+}
+
 static inline int flexcan_transceiver_enable(const struct flexcan_priv *priv)
 {
        if (!priv->reg_xceiver)
@@ -713,6 +733,7 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
        struct flexcan_regs __iomem *regs = priv->regs;
        irqreturn_t handled = IRQ_NONE;
        u32 reg_iflag1, reg_esr;
+       enum can_state last_state = priv->can.state;
 
        reg_iflag1 = flexcan_read(&regs->iflag1);
 
@@ -765,8 +786,10 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
                flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, &regs->esr);
        }
 
-       /* state change interrupt */
-       if (reg_esr & FLEXCAN_ESR_ERR_STATE)
+       /* state change interrupt or broken error state quirk fix is enabled */
+       if ((reg_esr & FLEXCAN_ESR_ERR_STATE) ||
+           (priv->devtype_data->quirks & (FLEXCAN_QUIRK_BROKEN_WERR_STATE |
+                                          FLEXCAN_QUIRK_BROKEN_PERR_STATE)))
                flexcan_irq_state(dev, reg_esr);
 
        /* bus error IRQ - handle if bus error reporting is activated */
@@ -774,6 +797,44 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
            (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING))
                flexcan_irq_bus_err(dev, reg_esr);
 
+       /* availability of error interrupt among state transitions in case
+        * bus error reporting is de-activated and
+        * FLEXCAN_QUIRK_BROKEN_PERR_STATE is enabled:
+        *  +--------------------------------------------------------------+
+        *  | +----------------------------------------------+ [stopped /  |
+        *  | |                                              |  sleeping] -+
+        *  +-+-> active <-> warning <-> passive -> bus off -+
+        *        ___________^^^^^^^^^^^^_______________________________
+        *        disabled(1)  enabled             disabled
+        *
+        * (1): enabled if FLEXCAN_QUIRK_BROKEN_WERR_STATE is enabled
+        */
+       if ((last_state != priv->can.state) &&
+           (priv->devtype_data->quirks & FLEXCAN_QUIRK_BROKEN_PERR_STATE) &&
+           !(priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)) {
+               switch (priv->can.state) {
+               case CAN_STATE_ERROR_ACTIVE:
+                       if (priv->devtype_data->quirks &
+                           FLEXCAN_QUIRK_BROKEN_WERR_STATE)
+                               flexcan_error_irq_enable(priv);
+                       else
+                               flexcan_error_irq_disable(priv);
+                       break;
+
+               case CAN_STATE_ERROR_WARNING:
+                       flexcan_error_irq_enable(priv);
+                       break;
+
+               case CAN_STATE_ERROR_PASSIVE:
+               case CAN_STATE_BUS_OFF:
+                       flexcan_error_irq_disable(priv);
+                       break;
+
+               default:
+                       break;
+               }
+       }
+
        return handled;
 }
 
@@ -887,7 +948,7 @@ static int flexcan_chip_start(struct net_device *dev)
         * on most Flexcan cores, too. Otherwise we don't get
         * any error warning or passive interrupts.
         */
-       if (priv->devtype_data->quirks & FLEXCAN_QUIRK_BROKEN_ERR_STATE ||
+       if (priv->devtype_data->quirks & FLEXCAN_QUIRK_BROKEN_WERR_STATE ||
            priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
                reg_ctrl |= FLEXCAN_CTRL_ERR_MSK;
        else
index be11ddd11b87447c8e2b348bdeb7b57cca1b5d25..9253aaf9e739297d77e99625b518448682cb7327 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #  Makefile for the SJA1000 CAN controller drivers.
 #
index 35f062282dbdc278fbc9b040395f14935b7a1ac5..2893007ea05e1750adf60296f5f2b88c54c6574c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * softing common interfaces
  *
index ebbf6981562394afb324218438798d0b4177d5d8..68a161547644e76d2f383502266591785916570f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <linux/platform_device.h>
 
index 68ef0a4cd82153cd65699ab0a4d80a5a201393e6..b0c80859f7467ef32a2683a506757c41ad13cb28 100644 (file)
@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev)
 
        /* enter the selected mode */
        mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
-       if (priv->can.ctrlmode & CAN_CTRLMODE_PRESUME_ACK)
+       if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
                mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
        else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
                mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev)
        priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
                                       CAN_CTRLMODE_LISTENONLY |
                                       CAN_CTRLMODE_LOOPBACK |
-                                      CAN_CTRLMODE_PRESUME_ACK |
                                       CAN_CTRLMODE_3_SAMPLES;
        priv->base = addr;
        priv->clk = clk;
index 164453fd55d0acba62c334856baa7fa016f13145..49ac7b99ba32ef8aecd47c2750a2f39df66851b5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #  Makefile for the Linux Controller Area Network USB drivers.
 #
index be928ce62d32e01c9d6ad9ac1fbcb46916f492ec..9fdb0f0bfa06a00a2ade5e74daef15798ab7d4a1 100644 (file)
@@ -333,7 +333,7 @@ static void esd_usb2_rx_can_msg(struct esd_usb2_net_priv *priv,
                }
 
                cf->can_id = id & ESD_IDMASK;
-               cf->can_dlc = get_can_dlc(msg->msg.rx.dlc);
+               cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR);
 
                if (id & ESD_EXTID)
                        cf->can_id |= CAN_EFF_FLAG;
index afcc1312dbaf8f67bce640e17dbc20c06592dc45..68ac3e88a8cecbe5b4a58da8491756ad5c26039a 100644 (file)
@@ -375,6 +375,8 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
 
                gs_free_tx_context(txc);
 
+               atomic_dec(&dev->active_tx_urbs);
+
                netif_wake_queue(netdev);
        }
 
@@ -463,14 +465,6 @@ static void gs_usb_xmit_callback(struct urb *urb)
                          urb->transfer_buffer_length,
                          urb->transfer_buffer,
                          urb->transfer_dma);
-
-       atomic_dec(&dev->active_tx_urbs);
-
-       if (!netif_device_present(netdev))
-               return;
-
-       if (netif_queue_stopped(netdev))
-               netif_wake_queue(netdev);
 }
 
 static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
index 18cc529fb807a4ad88fc06a201b18456040c5859..9b18d96ef52633ab34bb5ff39f4f643023dc308a 100644 (file)
@@ -137,6 +137,7 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id)
 #define CMD_RESET_ERROR_COUNTER                49
 #define CMD_TX_ACKNOWLEDGE             50
 #define CMD_CAN_ERROR_EVENT            51
+#define CMD_FLUSH_QUEUE_REPLY          68
 
 #define CMD_LEAF_USB_THROTTLE          77
 #define CMD_LEAF_LOG_MESSAGE           106
@@ -1301,6 +1302,11 @@ static void kvaser_usb_handle_message(const struct kvaser_usb *dev,
                        goto warn;
                break;
 
+       case CMD_FLUSH_QUEUE_REPLY:
+               if (dev->family != KVASER_LEAF)
+                       goto warn;
+               break;
+
        default:
 warn:          dev_warn(dev->udev->dev.parent,
                         "Unhandled message (%d)\n", msg->id);
@@ -1609,7 +1615,8 @@ static int kvaser_usb_close(struct net_device *netdev)
        if (err)
                netdev_warn(netdev, "Cannot flush queue, error %d\n", err);
 
-       if (kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel))
+       err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel);
+       if (err)
                netdev_warn(netdev, "Cannot reset card, error %d\n", err);
 
        err = kvaser_usb_stop_chip(priv);
index 017f48cdcab9d96f12f74a03507b27913c49df2e..1cbca8e5741ed420f1b7e7f76a7056f93a706e18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * e100net.c: A network driver for the ETRAX 100LX network controller.
  *
index 4a5b5bd297ee2af8bd58702256ba80444f48187c..d040aeb45172662320bf63c75b094cde35b9b294 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NET_DSA_BCM_SF2)  += bcm-sf2.o
 bcm-sf2-objs                   := bcm_sf2.o bcm_sf2_cfp.o
 obj-$(CONFIG_NET_DSA_LOOP)     += dsa_loop.o dsa_loop_bdinfo.o
index 7e6f9a8bfd753c4d89eddb30b669d16d6689392a..4256fb42a4dde9016d9092fd623be0a2ede7c16c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_B53)              += b53_common.o
 
 obj-$(CONFIG_B53_SPI_DRIVER)   += b53_spi.o
index dc396877fc954e9850cef21faa0a70f80565e206..93e5c15d0efdd52bbd7ed1b2327e99a7d09a9cdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DSA_LOOP_H
 #define __DSA_LOOP_H
 
index 4d8be555ff4dfefd200d8d60ae3b572ec6e5a1db..7df2ac77fc8fd1f696f57e5b4247e1ac66fe8381 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/regmap.h>
 #include <linux/device.h>
 #include <net/dsa.h>
index dce7fa57eb553a477faadd3f15d6f0e1dcf394af..f123ed57630d59815156c46b750d987bb0171966 100644 (file)
@@ -214,8 +214,14 @@ static int mv88e6060_setup(struct dsa_switch *ds)
 
 static int mv88e6060_set_addr(struct dsa_switch *ds, u8 *addr)
 {
-       /* Use the same MAC Address as FD Pause frames for all ports */
-       REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, (addr[0] << 9) | addr[1]);
+       u16 val = addr[0] << 8 | addr[1];
+
+       /* The multicast bit is always transmitted as a zero, so the switch uses
+        * bit 8 for "DiffAddr", where 0 means all ports transmit the same SA.
+        */
+       val &= 0xfeff;
+
+       REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, val);
        REG_WRITE(REG_GLOBAL, GLOBAL_MAC_23, (addr[2] << 8) | addr[3]);
        REG_WRITE(REG_GLOBAL, GLOBAL_MAC_45, (addr[4] << 8) | addr[5]);
 
index 5cd5551461e3c4b6a8b0bbb135c804214cdb0b37..58a4a0014e59de7c47c960f98a94568df3a0e8c0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
 mv88e6xxx-objs := chip.o
 mv88e6xxx-objs += global1.o
index c6678aa9b4ef0716890f8ace36cda4cf609de045..d74c7335c512df11d75dbfc8c89e030c51ad1ee8 100644 (file)
@@ -1100,6 +1100,10 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
        };
        int i, err;
 
+       /* DSA and CPU ports have to be members of multiple vlans */
+       if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+               return 0;
+
        if (!vid_begin)
                return -EOPNOTSUPP;
 
@@ -3947,7 +3951,9 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
        if (chip->irq > 0) {
                if (chip->info->g2_irqs > 0)
                        mv88e6xxx_g2_irq_free(chip);
+               mutex_lock(&chip->reg_lock);
                mv88e6xxx_g1_irq_free(chip);
+               mutex_unlock(&chip->reg_lock);
        }
 }
 
index 74046afab99319b3784a8c1afd3dbe6397ae1724..f8b73babc5101438d264b43a11386ee5db472973 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 3Com Ethernet device drivers
 #
index ff3b31894188261bb4ec865cd289a34e1583b970..f975c2fc88a374c7d493eabf6a05de75a13841ee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 8390 network device drivers.
 #
index a0a03d4d939a37bd08b6c0167e630f1e9f896be6..39f6273358edfe44083d5e6f25d0d95a4aaa7124 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux network Ethernet device drivers.
 #
index 9c07140a5d8df18d8dc774db6ec512c9c40d5fc0..a1e04c9e932e28b4ada70cbb754fcbefe4c1aa61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GRETH_H
 #define GRETH_H
 
index 08931b4afc96c1beb5b69a599017b508e8bf8bb2..d0c388cfd52f6f91d5a9cb080a8fcd107afa63db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _SLIC_H
 #define _SLIC_H
index 51c486cfbb8cdec978f7e40083819b0acff624f1..c670067b154128303281f211ee32940740420bdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ACENIC_H_
 #define _ACENIC_H_
 #include <linux/interrupt.h>
index b1212debc2e1c993f662ee35dcbbf6b5e5e3ac54..967020fb26ee17a6995a7ae11df668e8ab4fe9f0 100644 (file)
@@ -742,8 +742,8 @@ static void ena_get_channels(struct net_device *netdev,
 {
        struct ena_adapter *adapter = netdev_priv(netdev);
 
-       channels->max_rx = ENA_MAX_NUM_IO_QUEUES;
-       channels->max_tx = ENA_MAX_NUM_IO_QUEUES;
+       channels->max_rx = adapter->num_queues;
+       channels->max_tx = adapter->num_queues;
        channels->max_other = 0;
        channels->max_combined = 0;
        channels->rx_count = adapter->num_queues;
index f7dc22f65d9f64ac50cd641d30e4d83f88fe5bba..c6bd5e24005d02a6c7098cdaf492e5152eac2c08 100644 (file)
@@ -966,7 +966,7 @@ static inline void ena_rx_checksum(struct ena_ring *rx_ring,
                u64_stats_update_begin(&rx_ring->syncp);
                rx_ring->rx_stats.bad_csum++;
                u64_stats_update_end(&rx_ring->syncp);
-               netif_err(rx_ring->adapter, rx_err, rx_ring->netdev,
+               netif_dbg(rx_ring->adapter, rx_err, rx_ring->netdev,
                          "RX IPv4 header checksum error\n");
                return;
        }
@@ -979,7 +979,7 @@ static inline void ena_rx_checksum(struct ena_ring *rx_ring,
                        u64_stats_update_begin(&rx_ring->syncp);
                        rx_ring->rx_stats.bad_csum++;
                        u64_stats_update_end(&rx_ring->syncp);
-                       netif_err(rx_ring->adapter, rx_err, rx_ring->netdev,
+                       netif_dbg(rx_ring->adapter, rx_err, rx_ring->netdev,
                                  "RX L4 checksum error\n");
                        skb->ip_summed = CHECKSUM_NONE;
                        return;
@@ -3064,7 +3064,8 @@ static void ena_release_bars(struct ena_com_dev *ena_dev, struct pci_dev *pdev)
        if (ena_dev->mem_bar)
                devm_iounmap(&pdev->dev, ena_dev->mem_bar);
 
-       devm_iounmap(&pdev->dev, ena_dev->reg_bar);
+       if (ena_dev->reg_bar)
+               devm_iounmap(&pdev->dev, ena_dev->reg_bar);
 
        release_bars = pci_select_bars(pdev, IORESOURCE_MEM) & ENA_BAR_MASK;
        pci_release_selected_regions(pdev, release_bars);
index e9e0be3138049d59f544d027cca11076cd8db3db..741cdc392c6bb5adf0325e5c3976e8dc653d95b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * 7990.h -- LANCE ethernet IC generic routines.
  * This is an attempt to separate out the bits of various ethernet
index a38a2dce3eb329ecceabe2b0d560160d009e527c..45f86822a5f734364820555697134c3b4ca59066 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the AMD network device drivers.
 #
index 04aee9e0376a24ec1d43815343b08f2508b14679..bc845a2c60c185369d46acb21f3bf358adc602b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Random defines and structures for the HP Lance driver.
  * Copyright (C) 05/1998 Peter Maydell <pmaydell@chiark.greenend.org.uk>
  * Based on the Sun Lance driver and the NetBSD HP Lance driver
index 0dea8f5da899d2480015c82ed571c812f9548828..620785ffbd51946d82addf34f8769d7965d214a7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_AMD_XGBE) += amd-xgbe.o
 
 amd-xgbe-objs := xgbe-main.o xgbe-drv.o xgbe-dev.o \
index 214986436ece5a103e6452218cf34719d223b820..57e796870595bb9a305a7579154b0dbd1cbeec60 100644 (file)
 
 #define AQ_CFG_FORCE_LEGACY_INT 0U
 
-#define AQ_CFG_IS_INTERRUPT_MODERATION_DEF   1U
-#define AQ_CFG_INTERRUPT_MODERATION_RATE_DEF 0xFFFFU
+#define AQ_CFG_INTERRUPT_MODERATION_OFF                0
+#define AQ_CFG_INTERRUPT_MODERATION_ON         1
+#define AQ_CFG_INTERRUPT_MODERATION_AUTO       0xFFFFU
+
+#define AQ_CFG_INTERRUPT_MODERATION_USEC_MAX (0x1FF * 2)
+
 #define AQ_CFG_IRQ_MASK                      0x1FFU
 
 #define AQ_CFG_VECS_MAX   8U
 
 #define AQ_CFG_SKB_FRAGS_MAX   32U
 
+/* Number of descriptors available in one ring to resume this ring queue
+ */
+#define AQ_CFG_RESTART_DESC_THRES   (AQ_CFG_SKB_FRAGS_MAX * 2)
+
 #define AQ_CFG_NAPI_WEIGHT     64U
 
 #define AQ_CFG_MULTICAST_ADDRESS_MAX     32U
index a761e91471dfd264f3aba944e5324f86d4cd9e12..d5e99b46887061a216652ca150897bba49f16223 100644 (file)
@@ -56,10 +56,6 @@ aq_ethtool_set_link_ksettings(struct net_device *ndev,
        return aq_nic_set_link_ksettings(aq_nic, cmd);
 }
 
-/* there "5U" is number of queue[#] stats lines (InPackets+...+InErrors) */
-static const unsigned int aq_ethtool_stat_queue_lines = 5U;
-static const unsigned int aq_ethtool_stat_queue_chars =
-       5U * ETH_GSTRING_LEN;
 static const char aq_ethtool_stat_names[][ETH_GSTRING_LEN] = {
        "InPackets",
        "InUCast",
@@ -83,56 +79,26 @@ static const char aq_ethtool_stat_names[][ETH_GSTRING_LEN] = {
        "InOctetsDma",
        "OutOctetsDma",
        "InDroppedDma",
-       "Queue[0] InPackets",
-       "Queue[0] OutPackets",
-       "Queue[0] InJumboPackets",
-       "Queue[0] InLroPackets",
-       "Queue[0] InErrors",
-       "Queue[1] InPackets",
-       "Queue[1] OutPackets",
-       "Queue[1] InJumboPackets",
-       "Queue[1] InLroPackets",
-       "Queue[1] InErrors",
-       "Queue[2] InPackets",
-       "Queue[2] OutPackets",
-       "Queue[2] InJumboPackets",
-       "Queue[2] InLroPackets",
-       "Queue[2] InErrors",
-       "Queue[3] InPackets",
-       "Queue[3] OutPackets",
-       "Queue[3] InJumboPackets",
-       "Queue[3] InLroPackets",
-       "Queue[3] InErrors",
-       "Queue[4] InPackets",
-       "Queue[4] OutPackets",
-       "Queue[4] InJumboPackets",
-       "Queue[4] InLroPackets",
-       "Queue[4] InErrors",
-       "Queue[5] InPackets",
-       "Queue[5] OutPackets",
-       "Queue[5] InJumboPackets",
-       "Queue[5] InLroPackets",
-       "Queue[5] InErrors",
-       "Queue[6] InPackets",
-       "Queue[6] OutPackets",
-       "Queue[6] InJumboPackets",
-       "Queue[6] InLroPackets",
-       "Queue[6] InErrors",
-       "Queue[7] InPackets",
-       "Queue[7] OutPackets",
-       "Queue[7] InJumboPackets",
-       "Queue[7] InLroPackets",
-       "Queue[7] InErrors",
+};
+
+static const char aq_ethtool_queue_stat_names[][ETH_GSTRING_LEN] = {
+       "Queue[%d] InPackets",
+       "Queue[%d] OutPackets",
+       "Queue[%d] Restarts",
+       "Queue[%d] InJumboPackets",
+       "Queue[%d] InLroPackets",
+       "Queue[%d] InErrors",
 };
 
 static void aq_ethtool_stats(struct net_device *ndev,
                             struct ethtool_stats *stats, u64 *data)
 {
        struct aq_nic_s *aq_nic = netdev_priv(ndev);
+       struct aq_nic_cfg_s *cfg = aq_nic_get_cfg(aq_nic);
 
-/* ASSERT: Need add lines to aq_ethtool_stat_names if AQ_CFG_VECS_MAX > 8 */
-       BUILD_BUG_ON(AQ_CFG_VECS_MAX > 8);
-       memset(data, 0, ARRAY_SIZE(aq_ethtool_stat_names) * sizeof(u64));
+       memset(data, 0, (ARRAY_SIZE(aq_ethtool_stat_names) +
+                               ARRAY_SIZE(aq_ethtool_queue_stat_names) *
+                               cfg->vecs) * sizeof(u64));
        aq_nic_get_stats(aq_nic, data);
 }
 
@@ -154,8 +120,8 @@ static void aq_ethtool_get_drvinfo(struct net_device *ndev,
 
        strlcpy(drvinfo->bus_info, pdev ? pci_name(pdev) : "",
                sizeof(drvinfo->bus_info));
-       drvinfo->n_stats = ARRAY_SIZE(aq_ethtool_stat_names) -
-               (AQ_CFG_VECS_MAX - cfg->vecs) * aq_ethtool_stat_queue_lines;
+       drvinfo->n_stats = ARRAY_SIZE(aq_ethtool_stat_names) +
+               cfg->vecs * ARRAY_SIZE(aq_ethtool_queue_stat_names);
        drvinfo->testinfo_len = 0;
        drvinfo->regdump_len = regs_count;
        drvinfo->eedump_len = 0;
@@ -164,14 +130,25 @@ static void aq_ethtool_get_drvinfo(struct net_device *ndev,
 static void aq_ethtool_get_strings(struct net_device *ndev,
                                   u32 stringset, u8 *data)
 {
+       int i, si;
        struct aq_nic_s *aq_nic = netdev_priv(ndev);
        struct aq_nic_cfg_s *cfg = aq_nic_get_cfg(aq_nic);
-
-       if (stringset == ETH_SS_STATS)
-               memcpy(data, *aq_ethtool_stat_names,
-                      sizeof(aq_ethtool_stat_names) -
-                      (AQ_CFG_VECS_MAX - cfg->vecs) *
-                      aq_ethtool_stat_queue_chars);
+       u8 *p = data;
+
+       if (stringset == ETH_SS_STATS) {
+               memcpy(p, *aq_ethtool_stat_names,
+                      sizeof(aq_ethtool_stat_names));
+               p = p + sizeof(aq_ethtool_stat_names);
+               for (i = 0; i < cfg->vecs; i++) {
+                       for (si = 0;
+                               si < ARRAY_SIZE(aq_ethtool_queue_stat_names);
+                               si++) {
+                               snprintf(p, ETH_GSTRING_LEN,
+                                        aq_ethtool_queue_stat_names[si], i);
+                               p += ETH_GSTRING_LEN;
+                       }
+               }
+       }
 }
 
 static int aq_ethtool_get_sset_count(struct net_device *ndev, int stringset)
@@ -182,9 +159,8 @@ static int aq_ethtool_get_sset_count(struct net_device *ndev, int stringset)
 
        switch (stringset) {
        case ETH_SS_STATS:
-               ret = ARRAY_SIZE(aq_ethtool_stat_names) -
-                       (AQ_CFG_VECS_MAX - cfg->vecs) *
-                       aq_ethtool_stat_queue_lines;
+               ret = ARRAY_SIZE(aq_ethtool_stat_names) +
+                       cfg->vecs * ARRAY_SIZE(aq_ethtool_queue_stat_names);
                break;
        default:
                ret = -EOPNOTSUPP;
@@ -245,6 +221,69 @@ static int aq_ethtool_get_rxnfc(struct net_device *ndev,
        return err;
 }
 
+int aq_ethtool_get_coalesce(struct net_device *ndev,
+                           struct ethtool_coalesce *coal)
+{
+       struct aq_nic_s *aq_nic = netdev_priv(ndev);
+       struct aq_nic_cfg_s *cfg = aq_nic_get_cfg(aq_nic);
+
+       if (cfg->itr == AQ_CFG_INTERRUPT_MODERATION_ON ||
+           cfg->itr == AQ_CFG_INTERRUPT_MODERATION_AUTO) {
+               coal->rx_coalesce_usecs = cfg->rx_itr;
+               coal->tx_coalesce_usecs = cfg->tx_itr;
+               coal->rx_max_coalesced_frames = 0;
+               coal->tx_max_coalesced_frames = 0;
+       } else {
+               coal->rx_coalesce_usecs = 0;
+               coal->tx_coalesce_usecs = 0;
+               coal->rx_max_coalesced_frames = 1;
+               coal->tx_max_coalesced_frames = 1;
+       }
+       return 0;
+}
+
+int aq_ethtool_set_coalesce(struct net_device *ndev,
+                           struct ethtool_coalesce *coal)
+{
+       struct aq_nic_s *aq_nic = netdev_priv(ndev);
+       struct aq_nic_cfg_s *cfg = aq_nic_get_cfg(aq_nic);
+
+       /* This is not yet supported
+        */
+       if (coal->use_adaptive_rx_coalesce || coal->use_adaptive_tx_coalesce)
+               return -EOPNOTSUPP;
+
+       /* Atlantic only supports timing based coalescing
+        */
+       if (coal->rx_max_coalesced_frames > 1 ||
+           coal->rx_coalesce_usecs_irq ||
+           coal->rx_max_coalesced_frames_irq)
+               return -EOPNOTSUPP;
+
+       if (coal->tx_max_coalesced_frames > 1 ||
+           coal->tx_coalesce_usecs_irq ||
+           coal->tx_max_coalesced_frames_irq)
+               return -EOPNOTSUPP;
+
+       /* We do not support frame counting. Check this
+        */
+       if (!(coal->rx_max_coalesced_frames == !coal->rx_coalesce_usecs))
+               return -EOPNOTSUPP;
+       if (!(coal->tx_max_coalesced_frames == !coal->tx_coalesce_usecs))
+               return -EOPNOTSUPP;
+
+       if (coal->rx_coalesce_usecs > AQ_CFG_INTERRUPT_MODERATION_USEC_MAX ||
+           coal->tx_coalesce_usecs > AQ_CFG_INTERRUPT_MODERATION_USEC_MAX)
+               return -EINVAL;
+
+       cfg->itr = AQ_CFG_INTERRUPT_MODERATION_ON;
+
+       cfg->rx_itr = coal->rx_coalesce_usecs;
+       cfg->tx_itr = coal->tx_coalesce_usecs;
+
+       return aq_nic_update_interrupt_moderation_settings(aq_nic);
+}
+
 const struct ethtool_ops aq_ethtool_ops = {
        .get_link            = aq_ethtool_get_link,
        .get_regs_len        = aq_ethtool_get_regs_len,
@@ -259,4 +298,6 @@ const struct ethtool_ops aq_ethtool_ops = {
        .get_ethtool_stats   = aq_ethtool_stats,
        .get_link_ksettings  = aq_ethtool_get_link_ksettings,
        .set_link_ksettings  = aq_ethtool_set_link_ksettings,
+       .get_coalesce        = aq_ethtool_get_coalesce,
+       .set_coalesce        = aq_ethtool_set_coalesce,
 };
index bf9b3f020e106cb07fd7630073f146d7f54ccfa9..0207927dc8a6ab4ac76c46fb17669b7e50e7ae1e 100644 (file)
@@ -151,8 +151,7 @@ struct aq_hw_ops {
                                     [ETH_ALEN],
                                     u32 count);
 
-       int (*hw_interrupt_moderation_set)(struct aq_hw_s *self,
-                                          bool itr_enabled);
+       int (*hw_interrupt_moderation_set)(struct aq_hw_s *self);
 
        int (*hw_rss_set)(struct aq_hw_s *self,
                          struct aq_rss_parameters *rss_params);
@@ -163,6 +162,8 @@ struct aq_hw_ops {
        int (*hw_get_regs)(struct aq_hw_s *self,
                           struct aq_hw_caps_s *aq_hw_caps, u32 *regs_buff);
 
+       int (*hw_update_stats)(struct aq_hw_s *self);
+
        int (*hw_get_hw_stats)(struct aq_hw_s *self, u64 *data,
                               unsigned int *p_count);
 
index 6ac9e2602d6d8ea1fefd0de613ee633b905cbd8b..483e97691eeae2de4604e49cdb8fd8d60fb0dda4 100644 (file)
@@ -16,6 +16,7 @@
 #include "aq_pci_func.h"
 #include "aq_nic_internal.h"
 
+#include <linux/moduleparam.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/timer.h>
 #include <linux/tcp.h>
 #include <net/ip.h>
 
+static unsigned int aq_itr = AQ_CFG_INTERRUPT_MODERATION_AUTO;
+module_param_named(aq_itr, aq_itr, uint, 0644);
+MODULE_PARM_DESC(aq_itr, "Interrupt throttling mode");
+
+static unsigned int aq_itr_tx;
+module_param_named(aq_itr_tx, aq_itr_tx, uint, 0644);
+MODULE_PARM_DESC(aq_itr_tx, "TX interrupt throttle rate");
+
+static unsigned int aq_itr_rx;
+module_param_named(aq_itr_rx, aq_itr_rx, uint, 0644);
+MODULE_PARM_DESC(aq_itr_rx, "RX interrupt throttle rate");
+
 static void aq_nic_rss_init(struct aq_nic_s *self, unsigned int num_rss_queues)
 {
        struct aq_nic_cfg_s *cfg = &self->aq_nic_cfg;
@@ -61,9 +74,9 @@ static void aq_nic_cfg_init_defaults(struct aq_nic_s *self)
 
        cfg->is_polling = AQ_CFG_IS_POLLING_DEF;
 
-       cfg->is_interrupt_moderation = AQ_CFG_IS_INTERRUPT_MODERATION_DEF;
-       cfg->itr = cfg->is_interrupt_moderation ?
-               AQ_CFG_INTERRUPT_MODERATION_RATE_DEF : 0U;
+       cfg->itr = aq_itr;
+       cfg->tx_itr = aq_itr_tx;
+       cfg->rx_itr = aq_itr_rx;
 
        cfg->is_rss = AQ_CFG_IS_RSS_DEF;
        cfg->num_rss_queues = AQ_CFG_NUM_RSS_QUEUES_DEF;
@@ -119,6 +132,37 @@ int aq_nic_cfg_start(struct aq_nic_s *self)
        return 0;
 }
 
+static int aq_nic_update_link_status(struct aq_nic_s *self)
+{
+       int err = self->aq_hw_ops.hw_get_link_status(self->aq_hw);
+
+       if (err)
+               return err;
+
+       if (self->link_status.mbps != self->aq_hw->aq_link_status.mbps) {
+               pr_info("%s: link change old %d new %d\n",
+                       AQ_CFG_DRV_NAME, self->link_status.mbps,
+                       self->aq_hw->aq_link_status.mbps);
+               aq_nic_update_interrupt_moderation_settings(self);
+       }
+
+       self->link_status = self->aq_hw->aq_link_status;
+       if (!netif_carrier_ok(self->ndev) && self->link_status.mbps) {
+               aq_utils_obj_set(&self->header.flags,
+                                AQ_NIC_FLAG_STARTED);
+               aq_utils_obj_clear(&self->header.flags,
+                                  AQ_NIC_LINK_DOWN);
+               netif_carrier_on(self->ndev);
+               netif_tx_wake_all_queues(self->ndev);
+       }
+       if (netif_carrier_ok(self->ndev) && !self->link_status.mbps) {
+               netif_carrier_off(self->ndev);
+               netif_tx_disable(self->ndev);
+               aq_utils_obj_set(&self->header.flags, AQ_NIC_LINK_DOWN);
+       }
+       return 0;
+}
+
 static void aq_nic_service_timer_cb(unsigned long param)
 {
        struct aq_nic_s *self = (struct aq_nic_s *)param;
@@ -131,25 +175,12 @@ static void aq_nic_service_timer_cb(unsigned long param)
        if (aq_utils_obj_test(&self->header.flags, AQ_NIC_FLAGS_IS_NOT_READY))
                goto err_exit;
 
-       err = self->aq_hw_ops.hw_get_link_status(self->aq_hw);
-       if (err < 0)
+       err = aq_nic_update_link_status(self);
+       if (err)
                goto err_exit;
 
-       self->link_status = self->aq_hw->aq_link_status;
-
-       self->aq_hw_ops.hw_interrupt_moderation_set(self->aq_hw,
-                   self->aq_nic_cfg.is_interrupt_moderation);
-
-       if (self->link_status.mbps) {
-               aq_utils_obj_set(&self->header.flags,
-                                AQ_NIC_FLAG_STARTED);
-               aq_utils_obj_clear(&self->header.flags,
-                                  AQ_NIC_LINK_DOWN);
-               netif_carrier_on(self->ndev);
-       } else {
-               netif_carrier_off(self->ndev);
-               aq_utils_obj_set(&self->header.flags, AQ_NIC_LINK_DOWN);
-       }
+       if (self->aq_hw_ops.hw_update_stats)
+               self->aq_hw_ops.hw_update_stats(self->aq_hw);
 
        memset(&stats_rx, 0U, sizeof(struct aq_ring_stats_rx_s));
        memset(&stats_tx, 0U, sizeof(struct aq_ring_stats_tx_s));
@@ -214,7 +245,6 @@ struct aq_nic_s *aq_nic_alloc_cold(const struct net_device_ops *ndev_ops,
        SET_NETDEV_DEV(ndev, dev);
 
        ndev->if_port = port;
-       ndev->min_mtu = ETH_MIN_MTU;
        self->ndev = ndev;
 
        self->aq_pci_func = aq_pci_func;
@@ -241,7 +271,6 @@ err_exit:
 int aq_nic_ndev_register(struct aq_nic_s *self)
 {
        int err = 0;
-       unsigned int i = 0U;
 
        if (!self->ndev) {
                err = -EINVAL;
@@ -263,8 +292,7 @@ int aq_nic_ndev_register(struct aq_nic_s *self)
 
        netif_carrier_off(self->ndev);
 
-       for (i = AQ_CFG_VECS_MAX; i--;)
-               aq_nic_ndev_queue_stop(self, i);
+       netif_tx_disable(self->ndev);
 
        err = register_netdev(self->ndev);
        if (err < 0)
@@ -283,6 +311,7 @@ int aq_nic_ndev_init(struct aq_nic_s *self)
        self->ndev->features = aq_hw_caps->hw_features;
        self->ndev->priv_flags = aq_hw_caps->hw_priv_flags;
        self->ndev->mtu = aq_nic_cfg->mtu - ETH_HLEN;
+       self->ndev->max_mtu = self->aq_hw_caps.mtu - ETH_FCS_LEN - ETH_HLEN;
 
        return 0;
 }
@@ -318,12 +347,9 @@ struct aq_nic_s *aq_nic_alloc_hot(struct net_device *ndev)
                err = -EINVAL;
                goto err_exit;
        }
-       if (netif_running(ndev)) {
-               unsigned int i;
-
-               for (i = AQ_CFG_VECS_MAX; i--;)
-                       netif_stop_subqueue(ndev, i);
-       }
+       if (netif_running(ndev))
+               netif_tx_disable(ndev);
+       netif_carrier_off(self->ndev);
 
        for (self->aq_vecs = 0; self->aq_vecs < self->aq_nic_cfg.vecs;
                self->aq_vecs++) {
@@ -383,16 +409,6 @@ err_exit:
        return err;
 }
 
-void aq_nic_ndev_queue_start(struct aq_nic_s *self, unsigned int idx)
-{
-       netif_start_subqueue(self->ndev, idx);
-}
-
-void aq_nic_ndev_queue_stop(struct aq_nic_s *self, unsigned int idx)
-{
-       netif_stop_subqueue(self->ndev, idx);
-}
-
 int aq_nic_start(struct aq_nic_s *self)
 {
        struct aq_vec_s *aq_vec = NULL;
@@ -421,9 +437,8 @@ int aq_nic_start(struct aq_nic_s *self)
        if (err < 0)
                goto err_exit;
 
-       err = self->aq_hw_ops.hw_interrupt_moderation_set(self->aq_hw,
-                           self->aq_nic_cfg.is_interrupt_moderation);
-       if (err < 0)
+       err = aq_nic_update_interrupt_moderation_settings(self);
+       if (err)
                goto err_exit;
        setup_timer(&self->service_timer, &aq_nic_service_timer_cb,
                    (unsigned long)self);
@@ -451,10 +466,6 @@ int aq_nic_start(struct aq_nic_s *self)
                        goto err_exit;
        }
 
-       for (i = 0U, aq_vec = self->aq_vec[0];
-               self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
-               aq_nic_ndev_queue_start(self, i);
-
        err = netif_set_real_num_tx_queues(self->ndev, self->aq_vecs);
        if (err < 0)
                goto err_exit;
@@ -463,6 +474,8 @@ int aq_nic_start(struct aq_nic_s *self)
        if (err < 0)
                goto err_exit;
 
+       netif_tx_start_all_queues(self->ndev);
+
 err_exit:
        return err;
 }
@@ -475,6 +488,7 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
        unsigned int nr_frags = skb_shinfo(skb)->nr_frags;
        unsigned int frag_count = 0U;
        unsigned int dx = ring->sw_tail;
+       struct aq_ring_buff_s *first = NULL;
        struct aq_ring_buff_s *dx_buff = &ring->buff_ring[dx];
 
        if (unlikely(skb_is_gso(skb))) {
@@ -485,6 +499,7 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
                dx_buff->len_l4 = tcp_hdrlen(skb);
                dx_buff->mss = skb_shinfo(skb)->gso_size;
                dx_buff->is_txc = 1U;
+               dx_buff->eop_index = 0xffffU;
 
                dx_buff->is_ipv6 =
                        (ip_hdr(skb)->version == 6) ? 1U : 0U;
@@ -504,6 +519,7 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
        if (unlikely(dma_mapping_error(aq_nic_get_dev(self), dx_buff->pa)))
                goto exit;
 
+       first = dx_buff;
        dx_buff->len_pkt = skb->len;
        dx_buff->is_sop = 1U;
        dx_buff->is_mapped = 1U;
@@ -532,40 +548,46 @@ static unsigned int aq_nic_map_skb(struct aq_nic_s *self,
 
        for (; nr_frags--; ++frag_count) {
                unsigned int frag_len = 0U;
+               unsigned int buff_offset = 0U;
+               unsigned int buff_size = 0U;
                dma_addr_t frag_pa;
                skb_frag_t *frag = &skb_shinfo(skb)->frags[frag_count];
 
                frag_len = skb_frag_size(frag);
-               frag_pa = skb_frag_dma_map(aq_nic_get_dev(self), frag, 0,
-                                          frag_len, DMA_TO_DEVICE);
 
-               if (unlikely(dma_mapping_error(aq_nic_get_dev(self), frag_pa)))
-                       goto mapping_error;
+               while (frag_len) {
+                       if (frag_len > AQ_CFG_TX_FRAME_MAX)
+                               buff_size = AQ_CFG_TX_FRAME_MAX;
+                       else
+                               buff_size = frag_len;
+
+                       frag_pa = skb_frag_dma_map(aq_nic_get_dev(self),
+                                                  frag,
+                                                  buff_offset,
+                                                  buff_size,
+                                                  DMA_TO_DEVICE);
+
+                       if (unlikely(dma_mapping_error(aq_nic_get_dev(self),
+                                                      frag_pa)))
+                               goto mapping_error;
 
-               while (frag_len > AQ_CFG_TX_FRAME_MAX) {
                        dx = aq_ring_next_dx(ring, dx);
                        dx_buff = &ring->buff_ring[dx];
 
                        dx_buff->flags = 0U;
-                       dx_buff->len = AQ_CFG_TX_FRAME_MAX;
+                       dx_buff->len = buff_size;
                        dx_buff->pa = frag_pa;
                        dx_buff->is_mapped = 1U;
+                       dx_buff->eop_index = 0xffffU;
+
+                       frag_len -= buff_size;
+                       buff_offset += buff_size;
 
-                       frag_len -= AQ_CFG_TX_FRAME_MAX;
-                       frag_pa += AQ_CFG_TX_FRAME_MAX;
                        ++ret;
                }
-
-               dx = aq_ring_next_dx(ring, dx);
-               dx_buff = &ring->buff_ring[dx];
-
-               dx_buff->flags = 0U;
-               dx_buff->len = frag_len;
-               dx_buff->pa = frag_pa;
-               dx_buff->is_mapped = 1U;
-               ++ret;
        }
 
+       first->eop_index = dx;
        dx_buff->is_eop = 1U;
        dx_buff->skb = skb;
        goto exit;
@@ -602,7 +624,6 @@ int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb)
        unsigned int vec = skb->queue_mapping % self->aq_nic_cfg.vecs;
        unsigned int tc = 0U;
        int err = NETDEV_TX_OK;
-       bool is_nic_in_bad_state;
 
        frags = skb_shinfo(skb)->nr_frags + 1;
 
@@ -613,13 +634,10 @@ int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb)
                goto err_exit;
        }
 
-       is_nic_in_bad_state = aq_utils_obj_test(&self->header.flags,
-                                               AQ_NIC_FLAGS_IS_NOT_TX_READY) ||
-                                               (aq_ring_avail_dx(ring) <
-                                               AQ_CFG_SKB_FRAGS_MAX);
+       aq_ring_update_queue_state(ring);
 
-       if (is_nic_in_bad_state) {
-               aq_nic_ndev_queue_stop(self, ring->idx);
+       /* Above status update may stop the queue. Check this. */
+       if (__netif_subqueue_stopped(self->ndev, ring->idx)) {
                err = NETDEV_TX_BUSY;
                goto err_exit;
        }
@@ -631,9 +649,6 @@ int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb)
                                                      ring,
                                                      frags);
                if (err >= 0) {
-                       if (aq_ring_avail_dx(ring) < AQ_CFG_SKB_FRAGS_MAX + 1)
-                               aq_nic_ndev_queue_stop(self, ring->idx);
-
                        ++ring->stats.tx.packets;
                        ring->stats.tx.bytes += skb->len;
                }
@@ -645,6 +660,11 @@ err_exit:
        return err;
 }
 
+int aq_nic_update_interrupt_moderation_settings(struct aq_nic_s *self)
+{
+       return self->aq_hw_ops.hw_interrupt_moderation_set(self->aq_hw);
+}
+
 int aq_nic_set_packet_filter(struct aq_nic_s *self, unsigned int flags)
 {
        int err = 0;
@@ -693,16 +713,9 @@ int aq_nic_set_multicast_list(struct aq_nic_s *self, struct net_device *ndev)
 
 int aq_nic_set_mtu(struct aq_nic_s *self, int new_mtu)
 {
-       int err = 0;
-
-       if (new_mtu > self->aq_hw_caps.mtu) {
-               err = -EINVAL;
-               goto err_exit;
-       }
        self->aq_nic_cfg.mtu = new_mtu;
 
-err_exit:
-       return err;
+       return 0;
 }
 
 int aq_nic_set_mac(struct aq_nic_s *self, struct net_device *ndev)
@@ -905,9 +918,8 @@ int aq_nic_stop(struct aq_nic_s *self)
        struct aq_vec_s *aq_vec = NULL;
        unsigned int i = 0U;
 
-       for (i = 0U, aq_vec = self->aq_vec[0];
-               self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
-               aq_nic_ndev_queue_stop(self, i);
+       netif_tx_disable(self->ndev);
+       netif_carrier_off(self->ndev);
 
        del_timer_sync(&self->service_timer);
 
index 7fc2a5ecb2b7a01f594388e929c7affcb299af6f..4309983acdd6f7502fa05869f79336fd459dc2fe 100644 (file)
@@ -40,6 +40,8 @@ struct aq_nic_cfg_s {
        u32 vecs;               /* vecs==allocated irqs */
        u32 irq_type;
        u32 itr;
+       u16 rx_itr;
+       u16 tx_itr;
        u32 num_rss_queues;
        u32 mtu;
        u32 ucp_0x364;
@@ -49,7 +51,6 @@ struct aq_nic_cfg_s {
        u16 is_mc_list_enabled;
        u16 mc_list_count;
        bool is_autoneg;
-       bool is_interrupt_moderation;
        bool is_polling;
        bool is_rss;
        bool is_lro;
@@ -83,8 +84,6 @@ struct net_device *aq_nic_get_ndev(struct aq_nic_s *self);
 int aq_nic_init(struct aq_nic_s *self);
 int aq_nic_cfg_start(struct aq_nic_s *self);
 int aq_nic_ndev_register(struct aq_nic_s *self);
-void aq_nic_ndev_queue_start(struct aq_nic_s *self, unsigned int idx);
-void aq_nic_ndev_queue_stop(struct aq_nic_s *self, unsigned int idx);
 void aq_nic_ndev_free(struct aq_nic_s *self);
 int aq_nic_start(struct aq_nic_s *self);
 int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb);
@@ -106,5 +105,6 @@ int aq_nic_set_link_ksettings(struct aq_nic_s *self,
 struct aq_nic_cfg_s *aq_nic_get_cfg(struct aq_nic_s *self);
 u32 aq_nic_get_fw_version(struct aq_nic_s *self);
 int aq_nic_change_pm_state(struct aq_nic_s *self, pm_message_t *pm_msg);
+int aq_nic_update_interrupt_moderation_settings(struct aq_nic_s *self);
 
 #endif /* AQ_NIC_H */
index 4c6c882c6a1c424238473ea40ecf9f0ebf7cee28..cadaa646c89f4b741382b4beee72c6ec3e3bfc18 100644 (file)
@@ -85,6 +85,7 @@ int aq_pci_func_init(struct aq_pci_func_s *self)
        int err = 0;
        unsigned int bar = 0U;
        unsigned int port = 0U;
+       unsigned int numvecs = 0U;
 
        err = pci_enable_device(self->pdev);
        if (err < 0)
@@ -142,10 +143,12 @@ int aq_pci_func_init(struct aq_pci_func_s *self)
                }
        }
 
-       /*enable interrupts */
+       numvecs = min((u8)AQ_CFG_VECS_DEF, self->aq_hw_caps.msix_irqs);
+       numvecs = min(numvecs, num_online_cpus());
+
+       /* enable interrupts */
 #if !AQ_CFG_FORCE_LEGACY_INT
-       err = pci_alloc_irq_vectors(self->pdev, self->aq_hw_caps.msix_irqs,
-                             self->aq_hw_caps.msix_irqs, PCI_IRQ_MSIX);
+       err = pci_alloc_irq_vectors(self->pdev, numvecs, numvecs, PCI_IRQ_MSIX);
 
        if (err < 0) {
                err = pci_alloc_irq_vectors(self->pdev, 1, 1,
@@ -153,7 +156,7 @@ int aq_pci_func_init(struct aq_pci_func_s *self)
                if (err < 0)
                        goto err_exit;
        }
-#endif
+#endif /* AQ_CFG_FORCE_LEGACY_INT */
 
        /* net device init */
        for (port = 0; port < self->ports; ++port) {
@@ -265,6 +268,9 @@ void aq_pci_func_free(struct aq_pci_func_s *self)
                aq_nic_ndev_free(self->port[port]);
        }
 
+       if (self->mmio)
+               iounmap(self->mmio);
+
        kfree(self);
 
 err_exit:;
index 4eee1996a8259e561c15a17b9a3792ef79f280e2..0654e0c76bc27cfb8d2e7d5fd809c0f427a4e4bf 100644 (file)
@@ -104,6 +104,38 @@ int aq_ring_init(struct aq_ring_s *self)
        return 0;
 }
 
+static inline bool aq_ring_dx_in_range(unsigned int h, unsigned int i,
+                                      unsigned int t)
+{
+       return (h < t) ? ((h < i) && (i < t)) : ((h < i) || (i < t));
+}
+
+void aq_ring_update_queue_state(struct aq_ring_s *ring)
+{
+       if (aq_ring_avail_dx(ring) <= AQ_CFG_SKB_FRAGS_MAX)
+               aq_ring_queue_stop(ring);
+       else if (aq_ring_avail_dx(ring) > AQ_CFG_RESTART_DESC_THRES)
+               aq_ring_queue_wake(ring);
+}
+
+void aq_ring_queue_wake(struct aq_ring_s *ring)
+{
+       struct net_device *ndev = aq_nic_get_ndev(ring->aq_nic);
+
+       if (__netif_subqueue_stopped(ndev, ring->idx)) {
+               netif_wake_subqueue(ndev, ring->idx);
+               ring->stats.tx.queue_restarts++;
+       }
+}
+
+void aq_ring_queue_stop(struct aq_ring_s *ring)
+{
+       struct net_device *ndev = aq_nic_get_ndev(ring->aq_nic);
+
+       if (!__netif_subqueue_stopped(ndev, ring->idx))
+               netif_stop_subqueue(ndev, ring->idx);
+}
+
 void aq_ring_tx_clean(struct aq_ring_s *self)
 {
        struct device *dev = aq_nic_get_dev(self->aq_nic);
@@ -113,23 +145,28 @@ void aq_ring_tx_clean(struct aq_ring_s *self)
                struct aq_ring_buff_s *buff = &self->buff_ring[self->sw_head];
 
                if (likely(buff->is_mapped)) {
-                       if (unlikely(buff->is_sop))
+                       if (unlikely(buff->is_sop)) {
+                               if (!buff->is_eop &&
+                                   buff->eop_index != 0xffffU &&
+                                   (!aq_ring_dx_in_range(self->sw_head,
+                                               buff->eop_index,
+                                               self->hw_head)))
+                                       break;
+
                                dma_unmap_single(dev, buff->pa, buff->len,
                                                 DMA_TO_DEVICE);
-                       else
+                       } else {
                                dma_unmap_page(dev, buff->pa, buff->len,
                                               DMA_TO_DEVICE);
+                       }
                }
 
                if (unlikely(buff->is_eop))
                        dev_kfree_skb_any(buff->skb);
-       }
-}
 
-static inline unsigned int aq_ring_dx_in_range(unsigned int h, unsigned int i,
-                                              unsigned int t)
-{
-       return (h < t) ? ((h < i) && (i < t)) : ((h < i) || (i < t));
+               buff->pa = 0U;
+               buff->eop_index = 0xffffU;
+       }
 }
 
 #define AQ_SKB_ALIGN SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
index 782176c5f4f800f090353ee3184a98918dd1d0a3..5844078764bd90463c632d94ba5d1c45e8a22c3d 100644 (file)
@@ -65,7 +65,7 @@ struct __packed aq_ring_buff_s {
        };
        union {
                struct {
-                       u32 len:16;
+                       u16 len;
                        u32 is_ip_cso:1;
                        u32 is_udp_cso:1;
                        u32 is_tcp_cso:1;
@@ -77,8 +77,10 @@ struct __packed aq_ring_buff_s {
                        u32 is_cleaned:1;
                        u32 is_error:1;
                        u32 rsvd3:6;
+                       u16 eop_index;
+                       u16 rsvd4;
                };
-               u32 flags;
+               u64 flags;
        };
 };
 
@@ -94,6 +96,7 @@ struct aq_ring_stats_tx_s {
        u64 errors;
        u64 packets;
        u64 bytes;
+       u64 queue_restarts;
 };
 
 union aq_ring_stats_s {
@@ -147,6 +150,9 @@ struct aq_ring_s *aq_ring_rx_alloc(struct aq_ring_s *self,
 int aq_ring_init(struct aq_ring_s *self);
 void aq_ring_rx_deinit(struct aq_ring_s *self);
 void aq_ring_free(struct aq_ring_s *self);
+void aq_ring_update_queue_state(struct aq_ring_s *ring);
+void aq_ring_queue_wake(struct aq_ring_s *ring);
+void aq_ring_queue_stop(struct aq_ring_s *ring);
 void aq_ring_tx_clean(struct aq_ring_s *self);
 int aq_ring_rx_clean(struct aq_ring_s *self,
                     struct napi_struct *napi,
index ebf588004c4677140934b152eeab13d4d3aecbf7..5fecc9a099ef7fd34d3a36b9ee1eb9c01a3f9fcd 100644 (file)
@@ -59,12 +59,7 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
                        if (ring[AQ_VEC_TX_ID].sw_head !=
                            ring[AQ_VEC_TX_ID].hw_head) {
                                aq_ring_tx_clean(&ring[AQ_VEC_TX_ID]);
-
-                               if (aq_ring_avail_dx(&ring[AQ_VEC_TX_ID]) >
-                                   AQ_CFG_SKB_FRAGS_MAX) {
-                                       aq_nic_ndev_queue_start(self->aq_nic,
-                                               ring[AQ_VEC_TX_ID].idx);
-                               }
+                               aq_ring_update_queue_state(&ring[AQ_VEC_TX_ID]);
                                was_tx_cleaned = true;
                        }
 
@@ -364,6 +359,7 @@ void aq_vec_add_stats(struct aq_vec_s *self,
                stats_tx->packets += tx->packets;
                stats_tx->bytes += tx->bytes;
                stats_tx->errors += tx->errors;
+               stats_tx->queue_restarts += tx->queue_restarts;
        }
 }
 
@@ -377,8 +373,11 @@ int aq_vec_get_sw_stats(struct aq_vec_s *self, u64 *data, unsigned int *p_count)
        memset(&stats_tx, 0U, sizeof(struct aq_ring_stats_tx_s));
        aq_vec_add_stats(self, &stats_rx, &stats_tx);
 
+       /* This data should mimic aq_ethtool_queue_stat_names structure
+        */
        data[count] += stats_rx.packets;
        data[++count] += stats_tx.packets;
+       data[++count] += stats_tx.queue_restarts;
        data[++count] += stats_rx.jumbo_packets;
        data[++count] += stats_rx.lro_packets;
        data[++count] += stats_rx.errors;
index c5a02df7a48b719a65b169938746d777f3f0b5a0..07b3c49a16a4266b4fb312bb79198f9ba0c60f04 100644 (file)
@@ -765,24 +765,23 @@ err_exit:
        return err;
 }
 
-static int hw_atl_a0_hw_interrupt_moderation_set(struct aq_hw_s *self,
-                                                bool itr_enabled)
+static int hw_atl_a0_hw_interrupt_moderation_set(struct aq_hw_s *self)
 {
        unsigned int i = 0U;
+       u32 itr_rx;
 
-       if (itr_enabled && self->aq_nic_cfg->itr) {
-               if (self->aq_nic_cfg->itr != 0xFFFFU) {
+       if (self->aq_nic_cfg->itr) {
+               if (self->aq_nic_cfg->itr != AQ_CFG_INTERRUPT_MODERATION_AUTO) {
                        u32 itr_ = (self->aq_nic_cfg->itr >> 1);
 
                        itr_ = min(AQ_CFG_IRQ_MASK, itr_);
 
-                       PHAL_ATLANTIC_A0->itr_rx = 0x80000000U |
-                                       (itr_ << 0x10);
+                       itr_rx = 0x80000000U | (itr_ << 0x10);
                } else  {
                        u32 n = 0xFFFFU & aq_hw_read_reg(self, 0x00002A00U);
 
                        if (n < self->aq_link_status.mbps) {
-                               PHAL_ATLANTIC_A0->itr_rx = 0U;
+                               itr_rx = 0U;
                        } else {
                                static unsigned int hw_timers_tbl_[] = {
                                        0x01CU, /* 10Gbit */
@@ -797,8 +796,7 @@ static int hw_atl_a0_hw_interrupt_moderation_set(struct aq_hw_s *self,
                                        hw_atl_utils_mbps_2_speed_index(
                                                self->aq_link_status.mbps);
 
-                               PHAL_ATLANTIC_A0->itr_rx =
-                                       0x80000000U |
+                               itr_rx = 0x80000000U |
                                        (hw_timers_tbl_[speed_index] << 0x10U);
                        }
 
@@ -806,11 +804,11 @@ static int hw_atl_a0_hw_interrupt_moderation_set(struct aq_hw_s *self,
                        aq_hw_write_reg(self, 0x00002A00U, 0x8D000000U);
                }
        } else {
-               PHAL_ATLANTIC_A0->itr_rx = 0U;
+               itr_rx = 0U;
        }
 
        for (i = HW_ATL_A0_RINGS_MAX; i--;)
-               reg_irq_thr_set(self, PHAL_ATLANTIC_A0->itr_rx, i);
+               reg_irq_thr_set(self, itr_rx, i);
 
        return aq_hw_err_from_flags(self);
 }
@@ -885,6 +883,7 @@ static struct aq_hw_ops hw_atl_ops_ = {
        .hw_rss_set                  = hw_atl_a0_hw_rss_set,
        .hw_rss_hash_set             = hw_atl_a0_hw_rss_hash_set,
        .hw_get_regs                 = hw_atl_utils_hw_get_regs,
+       .hw_update_stats             = hw_atl_utils_update_stats,
        .hw_get_hw_stats             = hw_atl_utils_get_hw_stats,
        .hw_get_fw_version           = hw_atl_utils_get_fw_version,
 };
index 21784cc39dabdb9005a0c4bff26c64b0ac7a5286..ec68c20efcbdb6079b9dba4b8200ad8f1f450233 100644 (file)
@@ -788,39 +788,45 @@ err_exit:
        return err;
 }
 
-static int hw_atl_b0_hw_interrupt_moderation_set(struct aq_hw_s *self,
-                                                bool itr_enabled)
+static int hw_atl_b0_hw_interrupt_moderation_set(struct aq_hw_s *self)
 {
        unsigned int i = 0U;
+       u32 itr_tx = 2U;
+       u32 itr_rx = 2U;
 
-       if (itr_enabled && self->aq_nic_cfg->itr) {
+       switch (self->aq_nic_cfg->itr) {
+       case  AQ_CFG_INTERRUPT_MODERATION_ON:
+       case  AQ_CFG_INTERRUPT_MODERATION_AUTO:
                tdm_tx_desc_wr_wb_irq_en_set(self, 0U);
                tdm_tdm_intr_moder_en_set(self, 1U);
                rdm_rx_desc_wr_wb_irq_en_set(self, 0U);
                rdm_rdm_intr_moder_en_set(self, 1U);
 
-               PHAL_ATLANTIC_B0->itr_tx = 2U;
-               PHAL_ATLANTIC_B0->itr_rx = 2U;
+               if (self->aq_nic_cfg->itr == AQ_CFG_INTERRUPT_MODERATION_ON) {
+                       /* HW timers are in 2us units */
+                       int tx_max_timer = self->aq_nic_cfg->tx_itr / 2;
+                       int tx_min_timer = tx_max_timer / 2;
 
-               if (self->aq_nic_cfg->itr != 0xFFFFU) {
-                       unsigned int max_timer = self->aq_nic_cfg->itr / 2U;
-                       unsigned int min_timer = self->aq_nic_cfg->itr / 32U;
+                       int rx_max_timer = self->aq_nic_cfg->rx_itr / 2;
+                       int rx_min_timer = rx_max_timer / 2;
 
-                       max_timer = min(0x1FFU, max_timer);
-                       min_timer = min(0xFFU, min_timer);
+                       tx_max_timer = min(HW_ATL_INTR_MODER_MAX, tx_max_timer);
+                       tx_min_timer = min(HW_ATL_INTR_MODER_MIN, tx_min_timer);
+                       rx_max_timer = min(HW_ATL_INTR_MODER_MAX, rx_max_timer);
+                       rx_min_timer = min(HW_ATL_INTR_MODER_MIN, rx_min_timer);
 
-                       PHAL_ATLANTIC_B0->itr_tx |= min_timer << 0x8U;
-                       PHAL_ATLANTIC_B0->itr_tx |= max_timer << 0x10U;
-                       PHAL_ATLANTIC_B0->itr_rx |= min_timer << 0x8U;
-                       PHAL_ATLANTIC_B0->itr_rx |= max_timer << 0x10U;
+                       itr_tx |= tx_min_timer << 0x8U;
+                       itr_tx |= tx_max_timer << 0x10U;
+                       itr_rx |= rx_min_timer << 0x8U;
+                       itr_rx |= rx_max_timer << 0x10U;
                } else {
                        static unsigned int hw_atl_b0_timers_table_tx_[][2] = {
-                               {0xffU, 0xffU}, /* 10Gbit */
-                               {0xffU, 0x1ffU}, /* 5Gbit */
-                               {0xffU, 0x1ffU}, /* 5Gbit 5GS */
-                               {0xffU, 0x1ffU}, /* 2.5Gbit */
-                               {0xffU, 0x1ffU}, /* 1Gbit */
-                               {0xffU, 0x1ffU}, /* 100Mbit */
+                               {0xfU, 0xffU}, /* 10Gbit */
+                               {0xfU, 0x1ffU}, /* 5Gbit */
+                               {0xfU, 0x1ffU}, /* 5Gbit 5GS */
+                               {0xfU, 0x1ffU}, /* 2.5Gbit */
+                               {0xfU, 0x1ffU}, /* 1Gbit */
+                               {0xfU, 0x1ffU}, /* 100Mbit */
                        };
 
                        static unsigned int hw_atl_b0_timers_table_rx_[][2] = {
@@ -836,34 +842,36 @@ static int hw_atl_b0_hw_interrupt_moderation_set(struct aq_hw_s *self,
                                        hw_atl_utils_mbps_2_speed_index(
                                                self->aq_link_status.mbps);
 
-                       PHAL_ATLANTIC_B0->itr_tx |=
-                               hw_atl_b0_timers_table_tx_[speed_index]
-                               [0] << 0x8U; /* set min timer value */
-                       PHAL_ATLANTIC_B0->itr_tx |=
-                               hw_atl_b0_timers_table_tx_[speed_index]
-                               [1] << 0x10U; /* set max timer value */
-
-                       PHAL_ATLANTIC_B0->itr_rx |=
-                               hw_atl_b0_timers_table_rx_[speed_index]
-                               [0] << 0x8U; /* set min timer value */
-                       PHAL_ATLANTIC_B0->itr_rx |=
-                               hw_atl_b0_timers_table_rx_[speed_index]
-                               [1] << 0x10U; /* set max timer value */
+                       /* Update user visible ITR settings */
+                       self->aq_nic_cfg->tx_itr = hw_atl_b0_timers_table_tx_
+                                                       [speed_index][1] * 2;
+                       self->aq_nic_cfg->rx_itr = hw_atl_b0_timers_table_rx_
+                                                       [speed_index][1] * 2;
+
+                       itr_tx |= hw_atl_b0_timers_table_tx_
+                                               [speed_index][0] << 0x8U;
+                       itr_tx |= hw_atl_b0_timers_table_tx_
+                                               [speed_index][1] << 0x10U;
+
+                       itr_rx |= hw_atl_b0_timers_table_rx_
+                                               [speed_index][0] << 0x8U;
+                       itr_rx |= hw_atl_b0_timers_table_rx_
+                                               [speed_index][1] << 0x10U;
                }
-       } else {
+               break;
+       case AQ_CFG_INTERRUPT_MODERATION_OFF:
                tdm_tx_desc_wr_wb_irq_en_set(self, 1U);
                tdm_tdm_intr_moder_en_set(self, 0U);
                rdm_rx_desc_wr_wb_irq_en_set(self, 1U);
                rdm_rdm_intr_moder_en_set(self, 0U);
-               PHAL_ATLANTIC_B0->itr_tx = 0U;
-               PHAL_ATLANTIC_B0->itr_rx = 0U;
+               itr_tx = 0U;
+               itr_rx = 0U;
+               break;
        }
 
        for (i = HW_ATL_B0_RINGS_MAX; i--;) {
-               reg_tx_intr_moder_ctrl_set(self,
-                                          PHAL_ATLANTIC_B0->itr_tx, i);
-               reg_rx_intr_moder_ctrl_set(self,
-                                          PHAL_ATLANTIC_B0->itr_rx, i);
+               reg_tx_intr_moder_ctrl_set(self, itr_tx, i);
+               reg_rx_intr_moder_ctrl_set(self, itr_rx, i);
        }
 
        return aq_hw_err_from_flags(self);
@@ -939,6 +947,7 @@ static struct aq_hw_ops hw_atl_ops_ = {
        .hw_rss_set                  = hw_atl_b0_hw_rss_set,
        .hw_rss_hash_set             = hw_atl_b0_hw_rss_hash_set,
        .hw_get_regs                 = hw_atl_utils_hw_get_regs,
+       .hw_update_stats             = hw_atl_utils_update_stats,
        .hw_get_hw_stats             = hw_atl_utils_get_hw_stats,
        .hw_get_fw_version           = hw_atl_utils_get_fw_version,
 };
index f3957e9303405c3f26c9f7f7d6507009d5804534..9aa2c6edfca23276335cd9c4bf23c8528f9305e1 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "../aq_common.h"
 
-#define HW_ATL_B0_MTU_JUMBO (16000U)
+#define HW_ATL_B0_MTU_JUMBO  16352U
 #define HW_ATL_B0_MTU        1514U
 
 #define HW_ATL_B0_TX_RINGS 4U
 
 #define HW_ATL_B0_FW_VER_EXPECTED 0x01050006U
 
+#define HW_ATL_INTR_MODER_MAX  0x1FF
+#define HW_ATL_INTR_MODER_MIN  0xFF
+
 /* Hardware tx descriptor */
 struct __packed hw_atl_txd_s {
        u64 buf_addr;
index 4f5ec9a0fbfb82b7bcf25fb234c5d6c3180c544a..1fe016fc4bc704361ca68ee39f3e443715505e8c 100644 (file)
@@ -255,6 +255,15 @@ err_exit:
        return err;
 }
 
+int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
+                              struct hw_aq_atl_utils_mbox_header *pmbox)
+{
+       return hw_atl_utils_fw_downld_dwords(self,
+                                     PHAL_ATLANTIC->mbox_addr,
+                                     (u32 *)(void *)pmbox,
+                                     sizeof(*pmbox) / sizeof(u32));
+}
+
 void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
                                 struct hw_aq_atl_utils_mbox *pmbox)
 {
@@ -267,9 +276,6 @@ void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
        if (err < 0)
                goto err_exit;
 
-       if (pmbox != &PHAL_ATLANTIC->mbox)
-               memcpy(pmbox, &PHAL_ATLANTIC->mbox, sizeof(*pmbox));
-
        if (IS_CHIP_FEATURE(REVISION_A0)) {
                unsigned int mtu = self->aq_nic_cfg ?
                                        self->aq_nic_cfg->mtu : 1514U;
@@ -299,17 +305,17 @@ void hw_atl_utils_mpi_set(struct aq_hw_s *self,
 {
        int err = 0;
        u32 transaction_id = 0;
+       struct hw_aq_atl_utils_mbox_header mbox;
 
        if (state == MPI_RESET) {
-               hw_atl_utils_mpi_read_stats(self, &PHAL_ATLANTIC->mbox);
+               hw_atl_utils_mpi_read_mbox(self, &mbox);
 
-               transaction_id = PHAL_ATLANTIC->mbox.transaction_id;
+               transaction_id = mbox.transaction_id;
 
                AQ_HW_WAIT_FOR(transaction_id !=
-                               (hw_atl_utils_mpi_read_stats
-                                       (self, &PHAL_ATLANTIC->mbox),
-                                       PHAL_ATLANTIC->mbox.transaction_id),
-                                       1000U, 100U);
+                               (hw_atl_utils_mpi_read_mbox(self, &mbox),
+                                mbox.transaction_id),
+                              1000U, 100U);
                if (err < 0)
                        goto err_exit;
        }
@@ -351,8 +357,7 @@ int hw_atl_utils_mpi_get_link_status(struct aq_hw_s *self)
                        break;
 
                default:
-                       link_status->mbps = 0U;
-                       break;
+                       return -EBUSY;
                }
        }
 
@@ -493,16 +498,51 @@ int hw_atl_utils_hw_set_power(struct aq_hw_s *self,
        return 0;
 }
 
+int hw_atl_utils_update_stats(struct aq_hw_s *self)
+{
+       struct hw_atl_s *hw_self = PHAL_ATLANTIC;
+       struct hw_aq_atl_utils_mbox mbox;
+
+       if (!self->aq_link_status.mbps)
+               return 0;
+
+       hw_atl_utils_mpi_read_stats(self, &mbox);
+
+#define AQ_SDELTA(_N_) (hw_self->curr_stats._N_ += \
+                       mbox.stats._N_ - hw_self->last_stats._N_)
+
+       AQ_SDELTA(uprc);
+       AQ_SDELTA(mprc);
+       AQ_SDELTA(bprc);
+       AQ_SDELTA(erpt);
+
+       AQ_SDELTA(uptc);
+       AQ_SDELTA(mptc);
+       AQ_SDELTA(bptc);
+       AQ_SDELTA(erpr);
+
+       AQ_SDELTA(ubrc);
+       AQ_SDELTA(ubtc);
+       AQ_SDELTA(mbrc);
+       AQ_SDELTA(mbtc);
+       AQ_SDELTA(bbrc);
+       AQ_SDELTA(bbtc);
+       AQ_SDELTA(dpc);
+
+#undef AQ_SDELTA
+
+       memcpy(&hw_self->last_stats, &mbox.stats, sizeof(mbox.stats));
+
+       return 0;
+}
+
 int hw_atl_utils_get_hw_stats(struct aq_hw_s *self,
                              u64 *data, unsigned int *p_count)
 {
-       struct hw_atl_stats_s *stats = NULL;
+       struct hw_atl_s *hw_self = PHAL_ATLANTIC;
+       struct hw_atl_stats_s *stats = &hw_self->curr_stats;
        int i = 0;
 
-       hw_atl_utils_mpi_read_stats(self, &PHAL_ATLANTIC->mbox);
-
-       stats = &PHAL_ATLANTIC->mbox.stats;
-
        data[i] = stats->uprc + stats->mprc + stats->bprc;
        data[++i] = stats->uprc;
        data[++i] = stats->mprc;
index e0360a6b2202ef5b4ac683a44edcde9bf20ebedc..c99cc690e425bb72907df675e04a196819cfec02 100644 (file)
@@ -115,19 +115,22 @@ struct __packed hw_aq_atl_utils_fw_rpc {
        };
 };
 
-struct __packed hw_aq_atl_utils_mbox {
+struct __packed hw_aq_atl_utils_mbox_header {
        u32 version;
        u32 transaction_id;
-       int error;
+       u32 error;
+};
+
+struct __packed hw_aq_atl_utils_mbox {
+       struct hw_aq_atl_utils_mbox_header header;
        struct hw_atl_stats_s stats;
 };
 
 struct __packed hw_atl_s {
        struct aq_hw_s base;
-       struct hw_aq_atl_utils_mbox mbox;
+       struct hw_atl_stats_s last_stats;
+       struct hw_atl_stats_s curr_stats;
        u64 speed;
-       u32 itr_tx;
-       u32 itr_rx;
        unsigned int chip_features;
        u32 fw_ver_actual;
        atomic_t dpc;
@@ -170,6 +173,9 @@ enum hal_atl_utils_fw_state_e {
 
 void hw_atl_utils_hw_chip_features_init(struct aq_hw_s *self, u32 *p);
 
+int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
+                              struct hw_aq_atl_utils_mbox_header *pmbox);
+
 void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
                                 struct hw_aq_atl_utils_mbox *pmbox);
 
@@ -199,6 +205,8 @@ int hw_atl_utils_hw_deinit(struct aq_hw_s *self);
 
 int hw_atl_utils_get_fw_version(struct aq_hw_s *self, u32 *fw_version);
 
+int hw_atl_utils_update_stats(struct aq_hw_s *self);
+
 int hw_atl_utils_get_hw_stats(struct aq_hw_s *self,
                              u64 *data,
                              unsigned int *p_count);
index e4feb712d4f246ab78f6f7519c239cf53a63713a..3c63b16d485f4bb3a7587e9e6d36dd0e121668d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2004-2013 Synopsys, Inc. (www.synopsys.com)
  *
index a22403c688c951903af375a21b5c40815fb602f2..0187dbf3b87dfcdaa2dc1bf39f37a4d4bf47c7a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2004-2013 Synopsys, Inc. (www.synopsys.com)
  *
index 5cf1c65bbce9877ca243a115aff1c2ee57257b4c..aa3d394b87e6174952dc33f1c8e05dbbd16bb293 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Atheros network device drivers.
 #
index 6ec4a956e1e54858cad21599656da374c5d327d8..aacc3cce2cc02325820d9fdf7469b5fbaba25ee4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NB8800_H_
 #define _NB8800_H_
 
index 79f2372c66ec9e7e69a374bc96ce9e8193406472..7046ad6d3d0e3f7c8d8bf7df573f22e495474b2e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Broadcom network device drivers.
 #
index 89d2cf341163bbd3394a2e40e2d11aca48ca0bde..b3e36ca0fd191da1ad24d0720adc8f6688a086a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _B44_H
 #define _B44_H
 
index 0a1b7b2e55bde5818a9cb49296a54e2554abce6b..c6f6f14e87ca00d441055a859a389238554ef94a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_ENET_H_
 #define BCM63XX_ENET_H_
 
index c3c53f6cd9e62cb6551533153f455a2cd7285954..eb441e5e2cd8053b58d51e265e676d638d84bbb4 100644 (file)
@@ -432,6 +432,27 @@ static void bcm_sysport_update_mib_counters(struct bcm_sysport_priv *priv)
        netif_dbg(priv, hw, priv->netdev, "updated MIB counters\n");
 }
 
+static void bcm_sysport_update_tx_stats(struct bcm_sysport_priv *priv,
+                                       u64 *tx_bytes, u64 *tx_packets)
+{
+       struct bcm_sysport_tx_ring *ring;
+       u64 bytes = 0, packets = 0;
+       unsigned int start;
+       unsigned int q;
+
+       for (q = 0; q < priv->netdev->num_tx_queues; q++) {
+               ring = &priv->tx_rings[q];
+               do {
+                       start = u64_stats_fetch_begin_irq(&priv->syncp);
+                       bytes = ring->bytes;
+                       packets = ring->packets;
+               } while (u64_stats_fetch_retry_irq(&priv->syncp, start));
+
+               *tx_bytes += bytes;
+               *tx_packets += packets;
+       }
+}
+
 static void bcm_sysport_get_stats(struct net_device *dev,
                                  struct ethtool_stats *stats, u64 *data)
 {
@@ -439,11 +460,16 @@ static void bcm_sysport_get_stats(struct net_device *dev,
        struct bcm_sysport_stats64 *stats64 = &priv->stats64;
        struct u64_stats_sync *syncp = &priv->syncp;
        struct bcm_sysport_tx_ring *ring;
+       u64 tx_bytes = 0, tx_packets = 0;
        unsigned int start;
        int i, j;
 
-       if (netif_running(dev))
+       if (netif_running(dev)) {
                bcm_sysport_update_mib_counters(priv);
+               bcm_sysport_update_tx_stats(priv, &tx_bytes, &tx_packets);
+               stats64->tx_bytes = tx_bytes;
+               stats64->tx_packets = tx_packets;
+       }
 
        for (i =  0, j = 0; i < BCM_SYSPORT_STATS_LEN; i++) {
                const struct bcm_sysport_stats *s;
@@ -461,12 +487,13 @@ static void bcm_sysport_get_stats(struct net_device *dev,
                        continue;
                p += s->stat_offset;
 
-               if (s->stat_sizeof == sizeof(u64))
+               if (s->stat_sizeof == sizeof(u64) &&
+                   s->type == BCM_SYSPORT_STAT_NETDEV64) {
                        do {
                                start = u64_stats_fetch_begin_irq(syncp);
                                data[i] = *(u64 *)p;
                        } while (u64_stats_fetch_retry_irq(syncp, start));
-               else
+               else
                        data[i] = *(u32 *)p;
                j++;
        }
@@ -1716,27 +1743,12 @@ static void bcm_sysport_get_stats64(struct net_device *dev,
 {
        struct bcm_sysport_priv *priv = netdev_priv(dev);
        struct bcm_sysport_stats64 *stats64 = &priv->stats64;
-       struct bcm_sysport_tx_ring *ring;
-       u64 tx_packets = 0, tx_bytes = 0;
        unsigned int start;
-       unsigned int q;
 
        netdev_stats_to_stats64(stats, &dev->stats);
 
-       for (q = 0; q < dev->num_tx_queues; q++) {
-               ring = &priv->tx_rings[q];
-               do {
-                       start = u64_stats_fetch_begin_irq(&priv->syncp);
-                       tx_bytes = ring->bytes;
-                       tx_packets = ring->packets;
-               } while (u64_stats_fetch_retry_irq(&priv->syncp, start));
-
-               stats->tx_bytes += tx_bytes;
-               stats->tx_packets += tx_packets;
-       }
-
-       stats64->tx_bytes = stats->tx_bytes;
-       stats64->tx_packets = stats->tx_packets;
+       bcm_sysport_update_tx_stats(priv, &stats->tx_bytes,
+                                   &stats->tx_packets);
 
        do {
                start = u64_stats_fetch_begin_irq(&priv->syncp);
@@ -1797,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv)
 
 static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv)
 {
-       u32 __maybe_unused reg;
+       u32 reg;
 
-       /* Include Broadcom tag in pad extension */
+       reg = gib_readl(priv, GIB_CONTROL);
+       /* Include Broadcom tag in pad extension and fix up IPG_LENGTH */
        if (netdev_uses_dsa(priv->netdev)) {
-               reg = gib_readl(priv, GIB_CONTROL);
                reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT);
                reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT;
-               gib_writel(priv, reg, GIB_CONTROL);
        }
+       reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT);
+       reg |= 12 << GIB_IPG_LEN_SHIFT;
+       gib_writel(priv, reg, GIB_CONTROL);
 }
 
 static int bcm_sysport_open(struct net_device *dev)
index 443d57b1026417b4feccbc79f562cc5462e90652..4040d846da8e9028d640b75520f821878c6eba91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BGMAC_H
 #define _BGMAC_H
 
index aacec8bc19d5fbf6fe0f007d8a6a59fe2df23c8d..dc5de275352a7f589b0d410b6127bee4ea4b815c 100644 (file)
@@ -214,6 +214,8 @@ static const u16 bnxt_async_events_arr[] = {
        ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE,
 };
 
+static struct workqueue_struct *bnxt_pf_wq;
+
 static bool bnxt_vf_pciid(enum board_idx idx)
 {
        return (idx == NETXTREME_C_VF || idx == NETXTREME_E_VF);
@@ -1024,12 +1026,28 @@ static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_napi *bnapi,
        return 0;
 }
 
+static void bnxt_queue_sp_work(struct bnxt *bp)
+{
+       if (BNXT_PF(bp))
+               queue_work(bnxt_pf_wq, &bp->sp_task);
+       else
+               schedule_work(&bp->sp_task);
+}
+
+static void bnxt_cancel_sp_work(struct bnxt *bp)
+{
+       if (BNXT_PF(bp))
+               flush_workqueue(bnxt_pf_wq);
+       else
+               cancel_work_sync(&bp->sp_task);
+}
+
 static void bnxt_sched_reset(struct bnxt *bp, struct bnxt_rx_ring_info *rxr)
 {
        if (!rxr->bnapi->in_reset) {
                rxr->bnapi->in_reset = true;
                set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event);
-               schedule_work(&bp->sp_task);
+               bnxt_queue_sp_work(bp);
        }
        rxr->rx_next_cons = 0xffff;
 }
@@ -1717,7 +1735,7 @@ static int bnxt_async_event_process(struct bnxt *bp,
        default:
                goto async_event_process_exit;
        }
-       schedule_work(&bp->sp_task);
+       bnxt_queue_sp_work(bp);
 async_event_process_exit:
        bnxt_ulp_async_events(bp, cmpl);
        return 0;
@@ -1751,7 +1769,7 @@ static int bnxt_hwrm_handler(struct bnxt *bp, struct tx_cmp *txcmp)
 
                set_bit(vf_id - bp->pf.first_vf_id, bp->pf.vf_event_bmap);
                set_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event);
-               schedule_work(&bp->sp_task);
+               bnxt_queue_sp_work(bp);
                break;
 
        case CMPL_BASE_TYPE_HWRM_ASYNC_EVENT:
@@ -3448,6 +3466,12 @@ int _hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout)
        return bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, false);
 }
 
+int _hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len,
+                             int timeout)
+{
+       return bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, true);
+}
+
 int hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout)
 {
        int rc;
@@ -6327,7 +6351,9 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
        }
 
        if (link_re_init) {
+               mutex_lock(&bp->link_lock);
                rc = bnxt_update_phy_setting(bp);
+               mutex_unlock(&bp->link_lock);
                if (rc)
                        netdev_warn(bp->dev, "failed to update phy settings\n");
        }
@@ -6647,7 +6673,7 @@ static void bnxt_set_rx_mode(struct net_device *dev)
                vnic->rx_mask = mask;
 
                set_bit(BNXT_RX_MASK_SP_EVENT, &bp->sp_event);
-               schedule_work(&bp->sp_task);
+               bnxt_queue_sp_work(bp);
        }
 }
 
@@ -6920,7 +6946,7 @@ static void bnxt_tx_timeout(struct net_device *dev)
 
        netdev_err(bp->dev,  "TX timeout detected, starting reset task!\n");
        set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event);
-       schedule_work(&bp->sp_task);
+       bnxt_queue_sp_work(bp);
 }
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
@@ -6952,7 +6978,7 @@ static void bnxt_timer(unsigned long data)
        if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS) &&
            bp->stats_coal_ticks) {
                set_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event);
-               schedule_work(&bp->sp_task);
+               bnxt_queue_sp_work(bp);
        }
 bnxt_restart_timer:
        mod_timer(&bp->timer, jiffies + bp->current_interval);
@@ -7025,30 +7051,28 @@ static void bnxt_sp_task(struct work_struct *work)
        if (test_and_clear_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event))
                bnxt_hwrm_port_qstats(bp);
 
-       /* These functions below will clear BNXT_STATE_IN_SP_TASK.  They
-        * must be the last functions to be called before exiting.
-        */
        if (test_and_clear_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event)) {
-               int rc = 0;
+               int rc;
 
+               mutex_lock(&bp->link_lock);
                if (test_and_clear_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT,
                                       &bp->sp_event))
                        bnxt_hwrm_phy_qcaps(bp);
 
-               bnxt_rtnl_lock_sp(bp);
-               if (test_bit(BNXT_STATE_OPEN, &bp->state))
-                       rc = bnxt_update_link(bp, true);
-               bnxt_rtnl_unlock_sp(bp);
+               rc = bnxt_update_link(bp, true);
+               mutex_unlock(&bp->link_lock);
                if (rc)
                        netdev_err(bp->dev, "SP task can't update link (rc: %x)\n",
                                   rc);
        }
        if (test_and_clear_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event)) {
-               bnxt_rtnl_lock_sp(bp);
-               if (test_bit(BNXT_STATE_OPEN, &bp->state))
-                       bnxt_get_port_module_status(bp);
-               bnxt_rtnl_unlock_sp(bp);
+               mutex_lock(&bp->link_lock);
+               bnxt_get_port_module_status(bp);
+               mutex_unlock(&bp->link_lock);
        }
+       /* These functions below will clear BNXT_STATE_IN_SP_TASK.  They
+        * must be the last functions to be called before exiting.
+        */
        if (test_and_clear_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event))
                bnxt_reset(bp, false);
 
@@ -7433,7 +7457,7 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
        spin_unlock_bh(&bp->ntp_fltr_lock);
 
        set_bit(BNXT_RX_NTP_FLTR_SP_EVENT, &bp->sp_event);
-       schedule_work(&bp->sp_task);
+       bnxt_queue_sp_work(bp);
 
        return new_fltr->sw_id;
 
@@ -7516,7 +7540,7 @@ static void bnxt_udp_tunnel_add(struct net_device *dev,
                if (bp->vxlan_port_cnt == 1) {
                        bp->vxlan_port = ti->port;
                        set_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event);
-                       schedule_work(&bp->sp_task);
+                       bnxt_queue_sp_work(bp);
                }
                break;
        case UDP_TUNNEL_TYPE_GENEVE:
@@ -7533,7 +7557,7 @@ static void bnxt_udp_tunnel_add(struct net_device *dev,
                return;
        }
 
-       schedule_work(&bp->sp_task);
+       bnxt_queue_sp_work(bp);
 }
 
 static void bnxt_udp_tunnel_del(struct net_device *dev,
@@ -7572,7 +7596,7 @@ static void bnxt_udp_tunnel_del(struct net_device *dev,
                return;
        }
 
-       schedule_work(&bp->sp_task);
+       bnxt_queue_sp_work(bp);
 }
 
 static int bnxt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
@@ -7720,7 +7744,7 @@ static void bnxt_remove_one(struct pci_dev *pdev)
        pci_disable_pcie_error_reporting(pdev);
        unregister_netdev(dev);
        bnxt_shutdown_tc(bp);
-       cancel_work_sync(&bp->sp_task);
+       bnxt_cancel_sp_work(bp);
        bp->sp_event = 0;
 
        bnxt_clear_int_mode(bp);
@@ -7748,6 +7772,7 @@ static int bnxt_probe_phy(struct bnxt *bp)
                           rc);
                return rc;
        }
+       mutex_init(&bp->link_lock);
 
        rc = bnxt_update_link(bp, false);
        if (rc) {
@@ -7946,7 +7971,7 @@ static void bnxt_parse_log_pcie_link(struct bnxt *bp)
        enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
        enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
 
-       if (pcie_get_minimum_link(bp->pdev, &speed, &width) ||
+       if (pcie_get_minimum_link(pci_physfn(bp->pdev), &speed, &width) ||
            speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN)
                netdev_info(bp->dev, "Failed to determine PCIe Link Info\n");
        else
@@ -8138,8 +8163,17 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        else
                device_set_wakeup_capable(&pdev->dev, false);
 
-       if (BNXT_PF(bp))
+       if (BNXT_PF(bp)) {
+               if (!bnxt_pf_wq) {
+                       bnxt_pf_wq =
+                               create_singlethread_workqueue("bnxt_pf_wq");
+                       if (!bnxt_pf_wq) {
+                               dev_err(&pdev->dev, "Unable to create workqueue.\n");
+                               goto init_err_pci_clean;
+                       }
+               }
                bnxt_init_tc(bp);
+       }
 
        rc = register_netdev(dev);
        if (rc)
@@ -8375,4 +8409,17 @@ static struct pci_driver bnxt_pci_driver = {
 #endif
 };
 
-module_pci_driver(bnxt_pci_driver);
+static int __init bnxt_init(void)
+{
+       return pci_register_driver(&bnxt_pci_driver);
+}
+
+static void __exit bnxt_exit(void)
+{
+       pci_unregister_driver(&bnxt_pci_driver);
+       if (bnxt_pf_wq)
+               destroy_workqueue(bnxt_pf_wq);
+}
+
+module_init(bnxt_init);
+module_exit(bnxt_exit);
index 7b888d4b2b552a406b8157b3f037a299dc7645a4..c911e69ff25f67d0402b1f06e48de7245cea8a88 100644 (file)
@@ -1290,6 +1290,10 @@ struct bnxt {
        unsigned long           *ntp_fltr_bmap;
        int                     ntp_fltr_count;
 
+       /* To protect link related settings during link changes and
+        * ethtool settings changes.
+        */
+       struct mutex            link_lock;
        struct bnxt_link_info   link_info;
        struct ethtool_eee      eee;
        u32                     lpi_tmr_lo;
@@ -1358,6 +1362,7 @@ void bnxt_set_ring_params(struct bnxt *);
 int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode);
 void bnxt_hwrm_cmd_hdr_init(struct bnxt *, void *, u16, u16, u16);
 int _hwrm_send_message(struct bnxt *, void *, u32, int);
+int _hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 len, int timeout);
 int hwrm_send_message(struct bnxt *, void *, u32, int);
 int hwrm_send_message_silent(struct bnxt *, void *, u32, int);
 int bnxt_hwrm_func_rgtr_async_events(struct bnxt *bp, unsigned long *bmap,
index aa1f3a2c7a7865cce7970e2e7b75f74b218d5df7..fed37cd9ae1d464af02335c072b4b3676b024e0b 100644 (file)
@@ -50,7 +50,9 @@ static int bnxt_hwrm_queue_pri2cos_qcfg(struct bnxt *bp, struct ieee_ets *ets)
 
        bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PRI2COS_QCFG, -1, -1);
        req.flags = cpu_to_le32(QUEUE_PRI2COS_QCFG_REQ_FLAGS_IVLAN);
-       rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+
+       mutex_lock(&bp->hwrm_cmd_lock);
+       rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
        if (!rc) {
                u8 *pri2cos = &resp->pri0_cos_queue_id;
                int i, j;
@@ -66,6 +68,7 @@ static int bnxt_hwrm_queue_pri2cos_qcfg(struct bnxt *bp, struct ieee_ets *ets)
                        }
                }
        }
+       mutex_unlock(&bp->hwrm_cmd_lock);
        return rc;
 }
 
@@ -119,9 +122,13 @@ static int bnxt_hwrm_queue_cos2bw_qcfg(struct bnxt *bp, struct ieee_ets *ets)
        int rc, i;
 
        bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_COS2BW_QCFG, -1, -1);
-       rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
-       if (rc)
+
+       mutex_lock(&bp->hwrm_cmd_lock);
+       rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+       if (rc) {
+               mutex_unlock(&bp->hwrm_cmd_lock);
                return rc;
+       }
 
        data = &resp->queue_id0 + offsetof(struct bnxt_cos2bw_cfg, queue_id);
        for (i = 0; i < bp->max_tc; i++, data += sizeof(cos2bw) - 4) {
@@ -143,6 +150,7 @@ static int bnxt_hwrm_queue_cos2bw_qcfg(struct bnxt *bp, struct ieee_ets *ets)
                        }
                }
        }
+       mutex_unlock(&bp->hwrm_cmd_lock);
        return 0;
 }
 
@@ -240,12 +248,17 @@ static int bnxt_hwrm_queue_pfc_qcfg(struct bnxt *bp, struct ieee_pfc *pfc)
        int rc;
 
        bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PFCENABLE_QCFG, -1, -1);
-       rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
-       if (rc)
+
+       mutex_lock(&bp->hwrm_cmd_lock);
+       rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+       if (rc) {
+               mutex_unlock(&bp->hwrm_cmd_lock);
                return rc;
+       }
 
        pri_mask = le32_to_cpu(resp->flags);
        pfc->pfc_en = pri_mask;
+       mutex_unlock(&bp->hwrm_cmd_lock);
        return 0;
 }
 
index 8eff05a3e0e4b748c3a0d35661ce7b1901ddef61..3cbe771b335296ce526122e892349e741ddb43b9 100644 (file)
@@ -1052,6 +1052,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev,
        u32 ethtool_speed;
 
        ethtool_link_ksettings_zero_link_mode(lk_ksettings, supported);
+       mutex_lock(&bp->link_lock);
        bnxt_fw_to_ethtool_support_spds(link_info, lk_ksettings);
 
        ethtool_link_ksettings_zero_link_mode(lk_ksettings, advertising);
@@ -1099,6 +1100,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev,
                        base->port = PORT_FIBRE;
        }
        base->phy_address = link_info->phy_addr;
+       mutex_unlock(&bp->link_lock);
 
        return 0;
 }
@@ -1190,6 +1192,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev,
        if (!BNXT_SINGLE_PF(bp))
                return -EOPNOTSUPP;
 
+       mutex_lock(&bp->link_lock);
        if (base->autoneg == AUTONEG_ENABLE) {
                BNXT_ETHTOOL_TO_FW_SPDS(fw_advertising, lk_ksettings,
                                        advertising);
@@ -1234,6 +1237,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev,
                rc = bnxt_hwrm_set_link_setting(bp, set_pause, false);
 
 set_setting_exit:
+       mutex_unlock(&bp->link_lock);
        return rc;
 }
 
@@ -1805,7 +1809,8 @@ static int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
        req.dir_ordinal = cpu_to_le16(ordinal);
        req.dir_ext = cpu_to_le16(ext);
        req.opt_ordinal = NVM_FIND_DIR_ENTRY_REQ_OPT_ORDINAL_EQ;
-       rc = hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
+       mutex_lock(&bp->hwrm_cmd_lock);
+       rc = _hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
        if (rc == 0) {
                if (index)
                        *index = le16_to_cpu(output->dir_idx);
@@ -1814,6 +1819,7 @@ static int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
                if (data_length)
                        *data_length = le32_to_cpu(output->dir_data_length);
        }
+       mutex_unlock(&bp->hwrm_cmd_lock);
        return rc;
 }
 
index d37925a8a65b6d79d96063d0eabcac9bae8dadd9..5ee18660bc33a2572320ac3210029e883841b044 100644 (file)
@@ -502,6 +502,7 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
        int rc = 0, vfs_supported;
        int min_rx_rings, min_tx_rings, min_rss_ctxs;
        int tx_ok = 0, rx_ok = 0, rss_ok = 0;
+       int avail_cp, avail_stat;
 
        /* Check if we can enable requested num of vf's. At a mininum
         * we require 1 RX 1 TX rings for each VF. In this minimum conf
@@ -509,6 +510,10 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
         */
        vfs_supported = *num_vfs;
 
+       avail_cp = bp->pf.max_cp_rings - bp->cp_nr_rings;
+       avail_stat = bp->pf.max_stat_ctxs - bp->num_stat_ctxs;
+       avail_cp = min_t(int, avail_cp, avail_stat);
+
        while (vfs_supported) {
                min_rx_rings = vfs_supported;
                min_tx_rings = vfs_supported;
@@ -523,10 +528,12 @@ static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs)
                            min_rx_rings)
                                rx_ok = 1;
                }
-               if (bp->pf.max_vnics - bp->nr_vnics < min_rx_rings)
+               if (bp->pf.max_vnics - bp->nr_vnics < min_rx_rings ||
+                   avail_cp < min_rx_rings)
                        rx_ok = 0;
 
-               if (bp->pf.max_tx_rings - bp->tx_nr_rings >= min_tx_rings)
+               if (bp->pf.max_tx_rings - bp->tx_nr_rings >= min_tx_rings &&
+                   avail_cp >= min_tx_rings)
                        tx_ok = 1;
 
                if (bp->pf.max_rsscos_ctxs - bp->rsscos_nr_ctxs >= min_rss_ctxs)
index ccd699fb2d706ec51252998f7957ae875cd812ea..7dd3d131043a76ba4b83b43f755d2b782c07139e 100644 (file)
@@ -750,6 +750,10 @@ int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid,
 {
        int rc = 0;
 
+       if (!is_classid_clsact_ingress(cls_flower->common.classid) ||
+           cls_flower->common.chain_index)
+               return -EOPNOTSUPP;
+
        switch (cls_flower->command) {
        case TC_CLSFLOWER_REPLACE:
                rc = bnxt_tc_add_flow(bp, src_fid, cls_flower);
index cec94bbb2ea5ad17a7bec44a76d34c0d8f9cd128..8bc126a156e80a1d18366a4b6cc3bd8cd2764954 100644 (file)
@@ -1278,7 +1278,7 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
 
        ret = cnic_alloc_dma(dev, kwq_16_dma, pages, 0);
        if (ret)
-               return -ENOMEM;
+               goto error;
 
        n = CNIC_PAGE_SIZE / CNIC_KWQ16_DATA_SIZE;
        for (i = 0, j = 0; i < cp->max_cid_space; i++) {
index 3b5e98ecba00bb21ad4a9592aad8ef1d10f5c4ef..c2d02d02d1e6f4558365fe53f152e13e045e0277 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: tg3.h,v 1.37.2.32 2002/03/11 12:18:18 davem Exp $
  * tg3.h: Definitions for Broadcom Tigon3 ethernet driver.
  *
index 1d66ddb6896977511e58922b0b1adaaeefbdb01e..1f33cdca9a3c09824ba8a0707923fdd7f3eb2659 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Atmel network device drivers.
 #
index c4d411d1aa287a76ff8d8a446fa56a4c352d694a..b802896bb2e0ce4526f7fde3efef6c7bb65b99a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Cavium Liquidio ethernet device driver
 #
index e7f54948173f7e6764b57ba5b99636ba206ba323..5b19826a7e16c731799a4b1cfc4c66d78d91f72d 100644 (file)
@@ -1847,7 +1847,7 @@ static int liquidio_ptp_settime(struct ptp_clock_info *ptp,
        struct lio *lio = container_of(ptp, struct lio, ptp_info);
        struct octeon_device *oct = (struct octeon_device *)lio->oct_dev;
 
-       ns = timespec_to_ns(ts);
+       ns = timespec64_to_ns(ts);
 
        spin_lock_irqsave(&lio->ptp_lock, flags);
        lio_pci_writeq(oct, ns, CN6XXX_MIO_PTP_CLOCK_HI);
index 6b4d4add7353fa320cde9405bc92acc8412ebaea..2fc6142d16344befb5eb6b6d1d2682d984a5e66f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Cavium's Thunder ethernet device
 #
index 49b80da51ba7307eb0d7fff8116203723b30cc9b..805ab45e9b5ac85b9b09037d89364bb9ac789809 100644 (file)
@@ -565,8 +565,10 @@ static inline bool nicvf_xdp_rx(struct nicvf *nic, struct bpf_prog *prog,
                return true;
        default:
                bpf_warn_invalid_xdp_action(action);
+               /* fall through */
        case XDP_ABORTED:
                trace_xdp_exception(nic->netdev, prog, action);
+               /* fall through */
        case XDP_DROP:
                /* Check if it's a recycled page, if not
                 * unmap the DMA mapping.
index b6a5eec6ed8e34de26b0b9af0857b813298fd53c..c0f978d2e8a7779230b4aed1a0ad33d071e2bf4a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Chelsio network device drivers.
 #
index ccdb2bc9ae9824e63b9f774edb063ef117fbdfda..e9c65d812c4ef9a9d601e66e27e80307c9f4456c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Date: 2005/03/07 23:59:05 $ $RCSfile: fpga_defs.h,v $ $Revision: 1.4 $ */
 
 /*
index 76ce6e538326c829883851b5ee1436c6144ec678..30b003484fc1198f853c555dbf3bff392a0e3a87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Date: 2005/10/24 23:18:13 $ $RCSfile: mv88e1xxx.c,v $ $Revision: 1.49 $ */
 #include "common.h"
 #include "mv88e1xxx.h"
index 967cc4286359667a41a8debfd3cadeeb4adbcc4a..11bf0f7c2f905f3304eab92c04b017ff000cfffb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Date: 2005/03/07 23:59:05 $ $RCSfile: mv88e1xxx.h,v $ $Revision: 1.13 $ */
 #ifndef CHELSIO_MV8E1XXX_H
 #define CHELSIO_MV8E1XXX_H
index d546f46c8ef79dff9d68409a109e041bab2cd389..20c09cc4b3237a91ea634b20344f8f1b84a4438b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Date: 2005/11/12 02:13:49 $ $RCSfile: my3126.c,v $ $Revision: 1.15 $ */
 #include "cphy.h"
 #include "elmer0.h"
index b146acabf982005db2ed2128540f8d99810f3d87..4337cee0763eb27962e20a5527666c76c3b8796d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Date: 2006/02/07 04:21:54 $ $RCSfile: tp.c,v $ $Revision: 1.73 $ */
 #include "common.h"
 #include "regs.h"
index dfd8ce25106aa4dff89ea819d9503fc084f4eca8..ba15675d56dffaae63123980c0822bf80573baf3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Date: 2005/03/07 23:59:05 $ $RCSfile: tp.h,v $ $Revision: 1.20 $ */
 #ifndef CHELSIO_TP_H
 #define CHELSIO_TP_H
index bdc895bd2a4606900cb1c078a06ddc2864e912dc..873c1c7b4ca0f53908990260a5e87dd687855138 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* $Date: 2006/04/28 19:20:06 $ $RCSfile: vsc7326.c,v $ $Revision: 1.19 $ */
 
 /* Driver for Vitesse VSC7326 (Schaumburg) MAC */
index 479edbcabe689dc57c38985a5837ad24c9c3e697..04503857c6a948acf5aee38bc4fe680fba9cd8cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Date: 2006/04/28 19:20:17 $ $RCSfile: vsc7326_reg.h,v $ $Revision: 1.5 $ */
 #ifndef _VSC7321_REG_H_
 #define _VSC7321_REG_H_
index 81029b872bdd432a0d95f00048fa8f61143ceaa7..174eb45100a4b701206f0cee5aae04d62fcf8bcd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define A_SG_CONTROL 0x0
 
 #define S_CONGMODE    29
index 29b6c800b23840732756986bf12e92c71c979ee2..c31ce8dc95fb9115e5051378757486d21180b99f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is automatically generated --- any changes will be lost.
  */
index 817212702f0a1067fcba2863a204301c159c9e5f..24143c8abfdbc23062dca535c6501ea750a3c09b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Chelsio T4 driver
 #
index 3c677ed3c29e722d6e375afae0ee928e2e10838a..8dc21c9f97168e1a0a12bcf2c0d6b9ea224fa42f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_link.h>
index 6aa9f89d073b177c8927140ba15afb37f3e0b858..d3c4a1cb0610e3173856ebcd5f777d9b47fdee12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ENIC_CLSF_H_
 #define _ENIC_CLSF_H_
 
index 9ce058adababcf28c83f644819b0b501079ef898..581b35ad44eff4bcf33a4d2af0504212eb4c9f45 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dm9000 Ethernet
  */
index 5e8be38b45bbff442b6130f7b95d67bcf954c208..8aab37564d5d0cce9f3cdd3008f167b64d4708f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux "Tulip" family network device drivers.
 #
index c46df5c82af5fde96d5342939ebee79cb0fdf9ad..ed8ad0fefbda3e80dda95dfada9ffee80021278e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Freescale network device drivers.
 #
index 7db50bccb137234c2dc09ca82cad4419ce8f2861..4f23e79232fa4437b32b2ec96d06b6b62f698c45 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Freescale DPAA Ethernet controllers
 #
index 38c7b21e5d63faaeae25ad45715aecb5a3469578..44720f83af273f299d25d7ba437a2ed4604b0788 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /****************************************************************************/
 
 /*
@@ -374,8 +375,8 @@ struct bufdesc_ex {
 #define FEC_ENET_TS_AVAIL       ((uint)0x00010000)
 #define FEC_ENET_TS_TIMER       ((uint)0x00008000)
 
-#define FEC_DEFAULT_IMASK (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII | FEC_ENET_TS_TIMER)
-#define FEC_NAPI_IMASK (FEC_ENET_MII | FEC_ENET_TS_TIMER)
+#define FEC_DEFAULT_IMASK (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII)
+#define FEC_NAPI_IMASK FEC_ENET_MII
 #define FEC_RX_DISABLED_IMASK (FEC_DEFAULT_IMASK & (~FEC_ENET_RXF))
 
 /* ENET interrupt coalescing macro define */
index 56f56d6ada9cfdfa6f719eb6d9793efb3a614ccd..3dc2d771a222147c89a3814a34d736e0bcf0d5c4 100644 (file)
@@ -1559,14 +1559,14 @@ fec_enet_collect_events(struct fec_enet_private *fep, uint int_events)
        if (int_events == 0)
                return false;
 
-       if (int_events & FEC_ENET_RXF)
+       if (int_events & FEC_ENET_RXF_0)
                fep->work_rx |= (1 << 2);
        if (int_events & FEC_ENET_RXF_1)
                fep->work_rx |= (1 << 0);
        if (int_events & FEC_ENET_RXF_2)
                fep->work_rx |= (1 << 1);
 
-       if (int_events & FEC_ENET_TXF)
+       if (int_events & FEC_ENET_TXF_0)
                fep->work_tx |= (1 << 2);
        if (int_events & FEC_ENET_TXF_1)
                fep->work_tx |= (1 << 0);
@@ -1604,8 +1604,8 @@ fec_enet_interrupt(int irq, void *dev_id)
        }
 
        if (fep->ptp_clock)
-               fec_ptp_check_pps_event(fep);
-
+               if (fec_ptp_check_pps_event(fep))
+                       ret = IRQ_HANDLED;
        return ret;
 }
 
index 2c38119b172c2cdae665fa31b3d3ef99076cd3a0..f83a3653b63bc95bd359dfe82b7e56c2fe8f6d34 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y +=  -I$(srctree)/drivers/net/ethernet/freescale/fman
 
 obj-$(CONFIG_FSL_FMAN) += fsl_fman.o
index d4a305ee3455e145e4ae2b5f8144cd8db08ee522..1821f94ef619d0027ef381e15098d74d5876ccd5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Freescale Ethernet controllers
 #
index b9fe5bde432a773e696e1287e5d8a683e2596a07..7832db71dcb95c68449ae5918a0f81ec7b2bb2a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_ENET_FEC_H
 #define FS_ENET_FEC_H
 
index 5ce516c8a62a135e9819a435d49a2f2ed26242a8..168e10ea487f62447cd9eef773eb16f59690cadd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_ENET_H
 #define FS_ENET_H
 
index 3828c435c18f29c7008821099adb660b5d6c725b..7f76d412047ae7df4c128b19d3945dbd091552f7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the HISILICON network device drivers.
 #
index 6010c83e38d80f5d96c717c49bfd7a740bfaa033..7aa623b9c82af172432ebeb9248334dbd8a0dc5e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the HISILICON network device drivers.
 #
index 36520634c96ae127aea4c2994bd6c86ff42e3376..e77192683dbad9a1fca22816e411abf4c3c25d8c 100644 (file)
@@ -2369,8 +2369,8 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
                        priv->enet_ver = AE_VERSION_2;
 
                ae_node = of_parse_phandle(dev->of_node, "ae-handle", 0);
-               if (IS_ERR_OR_NULL(ae_node)) {
-                       ret = PTR_ERR(ae_node);
+               if (!ae_node) {
+                       ret = -ENODEV;
                        dev_err(dev, "not find ae-handle\n");
                        goto out_read_prop_fail;
                }
index 59efbd605416fd5eed5f7987e163b8cf92e6889a..5bcb2238acb2b11368635ee70042130b02f0d7ae 100644 (file)
@@ -37,20 +37,15 @@ static bool hnae3_client_match(enum hnae3_client_type client_type,
 }
 
 static int hnae3_match_n_instantiate(struct hnae3_client *client,
-                                    struct hnae3_ae_dev *ae_dev,
-                                    bool is_reg, bool *matched)
+                                    struct hnae3_ae_dev *ae_dev, bool is_reg)
 {
        int ret;
 
-       *matched = false;
-
        /* check if this client matches the type of ae_dev */
        if (!(hnae3_client_match(client->type, ae_dev->dev_type) &&
              hnae_get_bit(ae_dev->flag, HNAE3_DEV_INITED_B))) {
                return 0;
        }
-       /* there is a match of client and dev */
-       *matched = true;
 
        /* now, (un-)instantiate client by calling lower layer */
        if (is_reg) {
@@ -69,7 +64,6 @@ int hnae3_register_client(struct hnae3_client *client)
 {
        struct hnae3_client *client_tmp;
        struct hnae3_ae_dev *ae_dev;
-       bool matched;
        int ret = 0;
 
        mutex_lock(&hnae3_common_lock);
@@ -86,7 +80,7 @@ int hnae3_register_client(struct hnae3_client *client)
                /* if the client could not be initialized on current port, for
                 * any error reasons, move on to next available port
                 */
-               ret = hnae3_match_n_instantiate(client, ae_dev, true, &matched);
+               ret = hnae3_match_n_instantiate(client, ae_dev, true);
                if (ret)
                        dev_err(&ae_dev->pdev->dev,
                                "match and instantiation failed for port\n");
@@ -102,12 +96,11 @@ EXPORT_SYMBOL(hnae3_register_client);
 void hnae3_unregister_client(struct hnae3_client *client)
 {
        struct hnae3_ae_dev *ae_dev;
-       bool matched;
 
        mutex_lock(&hnae3_common_lock);
        /* un-initialize the client on every matched port */
        list_for_each_entry(ae_dev, &hnae3_ae_dev_list, node) {
-               hnae3_match_n_instantiate(client, ae_dev, false, &matched);
+               hnae3_match_n_instantiate(client, ae_dev, false);
        }
 
        list_del(&client->node);
@@ -124,7 +117,6 @@ int hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo)
        const struct pci_device_id *id;
        struct hnae3_ae_dev *ae_dev;
        struct hnae3_client *client;
-       bool matched;
        int ret = 0;
 
        mutex_lock(&hnae3_common_lock);
@@ -151,13 +143,10 @@ int hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo)
                 * initialize the figure out client instance
                 */
                list_for_each_entry(client, &hnae3_client_list, node) {
-                       ret = hnae3_match_n_instantiate(client, ae_dev, true,
-                                                       &matched);
+                       ret = hnae3_match_n_instantiate(client, ae_dev, true);
                        if (ret)
                                dev_err(&ae_dev->pdev->dev,
                                        "match and instantiation failed\n");
-                       if (matched)
-                               break;
                }
        }
 
@@ -175,7 +164,6 @@ void hnae3_unregister_ae_algo(struct hnae3_ae_algo *ae_algo)
        const struct pci_device_id *id;
        struct hnae3_ae_dev *ae_dev;
        struct hnae3_client *client;
-       bool matched;
 
        mutex_lock(&hnae3_common_lock);
        /* Check if there are matched ae_dev */
@@ -187,12 +175,8 @@ void hnae3_unregister_ae_algo(struct hnae3_ae_algo *ae_algo)
                /* check the client list for the match with this ae_dev type and
                 * un-initialize the figure out client instance
                 */
-               list_for_each_entry(client, &hnae3_client_list, node) {
-                       hnae3_match_n_instantiate(client, ae_dev, false,
-                                                 &matched);
-                       if (matched)
-                               break;
-               }
+               list_for_each_entry(client, &hnae3_client_list, node)
+                       hnae3_match_n_instantiate(client, ae_dev, false);
 
                ae_algo->ops->uninit_ae_dev(ae_dev);
                hnae_set_bit(ae_dev->flag, HNAE3_DEV_INITED_B, 0);
@@ -212,7 +196,6 @@ int hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
        const struct pci_device_id *id;
        struct hnae3_ae_algo *ae_algo;
        struct hnae3_client *client;
-       bool matched;
        int ret = 0;
 
        mutex_lock(&hnae3_common_lock);
@@ -246,13 +229,10 @@ int hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
         * initialize the figure out client instance
         */
        list_for_each_entry(client, &hnae3_client_list, node) {
-               ret = hnae3_match_n_instantiate(client, ae_dev, true,
-                                               &matched);
+               ret = hnae3_match_n_instantiate(client, ae_dev, true);
                if (ret)
                        dev_err(&ae_dev->pdev->dev,
                                "match and instantiation failed\n");
-               if (matched)
-                       break;
        }
 
 out_err:
@@ -270,7 +250,6 @@ void hnae3_unregister_ae_dev(struct hnae3_ae_dev *ae_dev)
        const struct pci_device_id *id;
        struct hnae3_ae_algo *ae_algo;
        struct hnae3_client *client;
-       bool matched;
 
        mutex_lock(&hnae3_common_lock);
        /* Check if there are matched ae_algo */
@@ -279,12 +258,8 @@ void hnae3_unregister_ae_dev(struct hnae3_ae_dev *ae_dev)
                if (!id)
                        continue;
 
-               list_for_each_entry(client, &hnae3_client_list, node) {
-                       hnae3_match_n_instantiate(client, ae_dev, false,
-                                                 &matched);
-                       if (matched)
-                               break;
-               }
+               list_for_each_entry(client, &hnae3_client_list, node)
+                       hnae3_match_n_instantiate(client, ae_dev, false);
 
                ae_algo->ops->uninit_ae_dev(ae_dev);
                hnae_set_bit(ae_dev->flag, HNAE3_DEV_INITED_B, 0);
index b2f28ae81273d71a6e31e3a70575570c0aae9ea2..1a01cadfe5f3035d21b35602ccf8c1c016854574 100644 (file)
 #define HNAE3_CLASS_NAME_SIZE 16
 
 #define HNAE3_DEV_INITED_B                     0x0
-#define HNAE_DEV_SUPPORT_ROCE_B                        0x1
+#define HNAE3_DEV_SUPPORT_ROCE_B               0x1
+#define HNAE3_DEV_SUPPORT_DCB_B                        0x2
+
+#define HNAE3_DEV_SUPPORT_ROCE_DCB_BITS (BIT(HNAE3_DEV_SUPPORT_DCB_B) |\
+               BIT(HNAE3_DEV_SUPPORT_ROCE_B))
+
+#define hnae3_dev_roce_supported(hdev) \
+       hnae_get_bit(hdev->ae_dev->flag, HNAE3_DEV_SUPPORT_ROCE_B)
+
+#define hnae3_dev_dcb_supported(hdev) \
+       hnae_get_bit(hdev->ae_dev->flag, HNAE3_DEV_SUPPORT_DCB_B)
 
 #define ring_ptr_move_fw(ring, p) \
        ((ring)->p = ((ring)->p + 1) % (ring)->desc_num)
@@ -366,12 +376,12 @@ struct hnae3_ae_algo {
 struct hnae3_tc_info {
        u16     tqp_offset;     /* TQP offset from base TQP */
        u16     tqp_count;      /* Total TQPs */
-       u8      up;             /* user priority */
        u8      tc;             /* TC index */
        bool    enable;         /* If this TC is enable or not */
 };
 
 #define HNAE3_MAX_TC           8
+#define HNAE3_MAX_USER_PRIO    8
 struct hnae3_knic_private_info {
        struct net_device *netdev; /* Set by KNIC client when init instance */
        u16 rss_size;              /* Allocated RSS queues */
@@ -379,6 +389,7 @@ struct hnae3_knic_private_info {
        u16 num_desc;
 
        u8 num_tc;                 /* Total number of enabled TCs */
+       u8 prio_tc[HNAE3_MAX_USER_PRIO];  /* TC indexed by prio */
        struct hnae3_tc_info tc_info[HNAE3_MAX_TC]; /* Idx of array is HW TC */
 
        u16 num_tqps;             /* total number of TQPs in this handle */
index 91ae0135ee503848ec1ed8d3d691632485ad2170..758cf394813126450ce190b24d16af5e41f7b92b 100644 (file)
@@ -238,7 +238,7 @@ struct hclge_tqp_map {
        u8 rsv[18];
 };
 
-#define HCLGE_VECTOR_ELEMENTS_PER_CMD  11
+#define HCLGE_VECTOR_ELEMENTS_PER_CMD  10
 
 enum hclge_int_type {
        HCLGE_INT_TX,
@@ -252,8 +252,12 @@ struct hclge_ctrl_vector_chain {
 #define HCLGE_INT_TYPE_S       0
 #define HCLGE_INT_TYPE_M       0x3
 #define HCLGE_TQP_ID_S         2
-#define HCLGE_TQP_ID_M         (0x3fff << HCLGE_TQP_ID_S)
+#define HCLGE_TQP_ID_M         (0x7ff << HCLGE_TQP_ID_S)
+#define HCLGE_INT_GL_IDX_S     13
+#define HCLGE_INT_GL_IDX_M     (0x3 << HCLGE_INT_GL_IDX_S)
        __le16 tqp_type_and_id[HCLGE_VECTOR_ELEMENTS_PER_CMD];
+       u8 vfid;
+       u8 rsv;
 };
 
 #define HCLGE_TC_NUM           8
@@ -266,7 +270,8 @@ struct hclge_tx_buff_alloc {
 
 struct hclge_rx_priv_buff {
        __le16 buf_num[HCLGE_TC_NUM];
-       u8 rsv[8];
+       __le16 shared_buf;
+       u8 rsv[6];
 };
 
 struct hclge_query_version {
@@ -684,6 +689,7 @@ struct hclge_reset_tqp_queue {
 #define HCLGE_DEFAULT_TX_BUF           0x4000   /* 16k  bytes */
 #define HCLGE_TOTAL_PKT_BUF            0x108000 /* 1.03125M bytes */
 #define HCLGE_DEFAULT_DV               0xA000   /* 40k byte */
+#define HCLGE_DEFAULT_NON_DCB_DV       0x7800  /* 30K byte */
 
 #define HCLGE_TYPE_CRQ                 0
 #define HCLGE_TYPE_CSQ                 1
index bb45365fb817eb648dcaa160e2173257e027ad2a..c1cdbfd83bdba9bcef1ab3f46729f9a8bffb09c8 100644 (file)
@@ -46,17 +46,7 @@ static const struct pci_device_id ae_algo_pci_tbl[] = {
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA), 0},
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC), 0},
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC), 0},
-       /* Required last entry */
-       {0, }
-};
-
-static const struct pci_device_id roce_pci_tbl[] = {
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC), 0},
-       /* Required last entry */
+       /* required last entry */
        {0, }
 };
 
@@ -894,7 +884,7 @@ static int hclge_query_pf_resource(struct hclge_dev *hdev)
        hdev->num_tqps = __le16_to_cpu(req->tqp_num);
        hdev->pkt_buf_size = __le16_to_cpu(req->buf_size) << HCLGE_BUF_UNIT_S;
 
-       if (hnae_get_bit(hdev->ae_dev->flag, HNAE_DEV_SUPPORT_ROCE_B)) {
+       if (hnae3_dev_roce_supported(hdev)) {
                hdev->num_roce_msix =
                hnae_get_field(__le16_to_cpu(req->pf_intr_vector_number),
                               HCLGE_PF_VEC_NUM_M, HCLGE_PF_VEC_NUM_S);
@@ -1063,9 +1053,9 @@ static int hclge_configure(struct hclge_dev *hdev)
        hdev->base_tqp_pid = 0;
        hdev->rss_size_max = 1;
        hdev->rx_buf_len = cfg.rx_buf_len;
-       for (i = 0; i < ETH_ALEN; i++)
-               hdev->hw.mac.mac_addr[i] = cfg.mac_addr[i];
+       ether_addr_copy(hdev->hw.mac.mac_addr, cfg.mac_addr);
        hdev->hw.mac.media_type = cfg.media_type;
+       hdev->hw.mac.phy_addr = cfg.phy_addr;
        hdev->num_desc = cfg.tqp_desc_num;
        hdev->tm_info.num_pg = 1;
        hdev->tm_info.num_tc = cfg.tc_num;
@@ -1454,7 +1444,11 @@ static bool  hclge_is_rx_buf_ok(struct hclge_dev *hdev, u32 rx_all)
        tc_num = hclge_get_tc_num(hdev);
        pfc_enable_num = hclge_get_pfc_enalbe_num(hdev);
 
-       shared_buf_min = 2 * hdev->mps + HCLGE_DEFAULT_DV;
+       if (hnae3_dev_dcb_supported(hdev))
+               shared_buf_min = 2 * hdev->mps + HCLGE_DEFAULT_DV;
+       else
+               shared_buf_min = 2 * hdev->mps + HCLGE_DEFAULT_NON_DCB_DV;
+
        shared_buf_tc = pfc_enable_num * hdev->mps +
                        (tc_num - pfc_enable_num) * hdev->mps / 2 +
                        hdev->mps;
@@ -1495,6 +1489,16 @@ int hclge_rx_buffer_calc(struct hclge_dev *hdev, u32 tx_size)
        struct hclge_priv_buf *priv;
        int i;
 
+       /* When DCB is not supported, rx private
+        * buffer is not allocated.
+        */
+       if (!hnae3_dev_dcb_supported(hdev)) {
+               if (!hclge_is_rx_buf_ok(hdev, rx_all))
+                       return -ENOMEM;
+
+               return 0;
+       }
+
        /* step 1, try to alloc private buffer for all enabled tc */
        for (i = 0; i < HCLGE_MAX_TC_NUM; i++) {
                priv = &hdev->priv_buf[i];
@@ -1510,6 +1514,11 @@ int hclge_rx_buffer_calc(struct hclge_dev *hdev, u32 tx_size)
                                priv->wl.high = 2 * hdev->mps;
                                priv->buf_size = priv->wl.high;
                        }
+               } else {
+                       priv->enable = 0;
+                       priv->wl.low = 0;
+                       priv->wl.high = 0;
+                       priv->buf_size = 0;
                }
        }
 
@@ -1522,8 +1531,15 @@ int hclge_rx_buffer_calc(struct hclge_dev *hdev, u32 tx_size)
        for (i = 0; i < HCLGE_MAX_TC_NUM; i++) {
                priv = &hdev->priv_buf[i];
 
-               if (hdev->hw_tc_map & BIT(i))
-                       priv->enable = 1;
+               priv->enable = 0;
+               priv->wl.low = 0;
+               priv->wl.high = 0;
+               priv->buf_size = 0;
+
+               if (!(hdev->hw_tc_map & BIT(i)))
+                       continue;
+
+               priv->enable = 1;
 
                if (hdev->tm_info.hw_pfc_map & BIT(i)) {
                        priv->wl.low = 128;
@@ -1616,6 +1632,10 @@ static int hclge_rx_priv_buf_alloc(struct hclge_dev *hdev)
                        cpu_to_le16(true << HCLGE_TC0_PRI_BUF_EN_B);
        }
 
+       req->shared_buf =
+               cpu_to_le16((hdev->s_buf.buf_size >> HCLGE_BUF_UNIT_S) |
+                           (1 << HCLGE_TC0_PRI_BUF_EN_B));
+
        ret = hclge_cmd_send(&hdev->hw, &desc, 1);
        if (ret) {
                dev_err(&hdev->pdev->dev,
@@ -1782,18 +1802,22 @@ int hclge_buffer_alloc(struct hclge_dev *hdev)
                return ret;
        }
 
-       ret = hclge_rx_priv_wl_config(hdev);
-       if (ret) {
-               dev_err(&hdev->pdev->dev,
-                       "could not configure rx private waterline %d\n", ret);
-               return ret;
-       }
+       if (hnae3_dev_dcb_supported(hdev)) {
+               ret = hclge_rx_priv_wl_config(hdev);
+               if (ret) {
+                       dev_err(&hdev->pdev->dev,
+                               "could not configure rx private waterline %d\n",
+                               ret);
+                       return ret;
+               }
 
-       ret = hclge_common_thrd_config(hdev);
-       if (ret) {
-               dev_err(&hdev->pdev->dev,
-                       "could not configure common threshold %d\n", ret);
-               return ret;
+               ret = hclge_common_thrd_config(hdev);
+               if (ret) {
+                       dev_err(&hdev->pdev->dev,
+                               "could not configure common threshold %d\n",
+                               ret);
+                       return ret;
+               }
        }
 
        ret = hclge_common_wl_config(hdev);
@@ -2582,6 +2606,7 @@ static int hclge_rss_init_hw(struct hclge_dev *hdev)
        u16 tc_valid[HCLGE_MAX_TC_NUM];
        u16 tc_size[HCLGE_MAX_TC_NUM];
        u32 *rss_indir = NULL;
+       u16 rss_size = 0, roundup_size;
        const u8 *key;
        int i, ret, j;
 
@@ -2596,7 +2621,13 @@ static int hclge_rss_init_hw(struct hclge_dev *hdev)
        for (j = 0; j < hdev->num_vmdq_vport + 1; j++) {
                for (i = 0; i < HCLGE_RSS_IND_TBL_SIZE; i++) {
                        vport[j].rss_indirection_tbl[i] =
-                               i % hdev->rss_size_max;
+                               i % vport[j].alloc_rss_size;
+
+                       /* vport 0 is for PF */
+                       if (j != 0)
+                               continue;
+
+                       rss_size = vport[j].alloc_rss_size;
                        rss_indir[i] = vport[j].rss_indirection_tbl[i];
                }
        }
@@ -2613,42 +2644,32 @@ static int hclge_rss_init_hw(struct hclge_dev *hdev)
        if (ret)
                goto err;
 
+       /* Each TC have the same queue size, and tc_size set to hardware is
+        * the log2 of roundup power of two of rss_size, the acutal queue
+        * size is limited by indirection table.
+        */
+       if (rss_size > HCLGE_RSS_TC_SIZE_7 || rss_size == 0) {
+               dev_err(&hdev->pdev->dev,
+                       "Configure rss tc size failed, invalid TC_SIZE = %d\n",
+                       rss_size);
+               ret = -EINVAL;
+               goto err;
+       }
+
+       roundup_size = roundup_pow_of_two(rss_size);
+       roundup_size = ilog2(roundup_size);
+
        for (i = 0; i < HCLGE_MAX_TC_NUM; i++) {
-               if (hdev->hw_tc_map & BIT(i))
-                       tc_valid[i] = 1;
-               else
-                       tc_valid[i] = 0;
+               tc_valid[i] = 0;
 
-               switch (hdev->rss_size_max) {
-               case HCLGE_RSS_TC_SIZE_0:
-                       tc_size[i] = 0;
-                       break;
-               case HCLGE_RSS_TC_SIZE_1:
-                       tc_size[i] = 1;
-                       break;
-               case HCLGE_RSS_TC_SIZE_2:
-                       tc_size[i] = 2;
-                       break;
-               case HCLGE_RSS_TC_SIZE_3:
-                       tc_size[i] = 3;
-                       break;
-               case HCLGE_RSS_TC_SIZE_4:
-                       tc_size[i] = 4;
-                       break;
-               case HCLGE_RSS_TC_SIZE_5:
-                       tc_size[i] = 5;
-                       break;
-               case HCLGE_RSS_TC_SIZE_6:
-                       tc_size[i] = 6;
-                       break;
-               case HCLGE_RSS_TC_SIZE_7:
-                       tc_size[i] = 7;
-                       break;
-               default:
-                       break;
-               }
-               tc_offset[i] = hdev->rss_size_max * i;
+               if (!(hdev->hw_tc_map & BIT(i)))
+                       continue;
+
+               tc_valid[i] = 1;
+               tc_size[i] = roundup_size;
+               tc_offset[i] = rss_size * i;
        }
+
        ret = hclge_set_rss_tc_mode(hdev, tc_valid, tc_size, tc_offset);
 
 err:
@@ -2679,7 +2700,11 @@ int hclge_map_vport_ring_to_vector(struct hclge_vport *vport, int vector_id,
                               hnae_get_bit(node->flag, HNAE3_RING_TYPE_B));
                hnae_set_field(req->tqp_type_and_id[i], HCLGE_TQP_ID_M,
                               HCLGE_TQP_ID_S,  node->tqp_index);
+               hnae_set_field(req->tqp_type_and_id[i], HCLGE_INT_GL_IDX_M,
+                              HCLGE_INT_GL_IDX_S,
+                              hnae_get_bit(node->flag, HNAE3_RING_TYPE_B));
                req->tqp_type_and_id[i] = cpu_to_le16(req->tqp_type_and_id[i]);
+               req->vfid = vport->vport_id;
 
                if (++i >= HCLGE_VECTOR_ELEMENTS_PER_CMD) {
                        req->int_cause_num = HCLGE_VECTOR_ELEMENTS_PER_CMD;
@@ -2763,8 +2788,12 @@ static int hclge_unmap_ring_from_vector(
                               hnae_get_bit(node->flag, HNAE3_RING_TYPE_B));
                hnae_set_field(req->tqp_type_and_id[i], HCLGE_TQP_ID_M,
                               HCLGE_TQP_ID_S,  node->tqp_index);
+               hnae_set_field(req->tqp_type_and_id[i], HCLGE_INT_GL_IDX_M,
+                              HCLGE_INT_GL_IDX_S,
+                              hnae_get_bit(node->flag, HNAE3_RING_TYPE_B));
 
                req->tqp_type_and_id[i] = cpu_to_le16(req->tqp_type_and_id[i]);
+               req->vfid = vport->vport_id;
 
                if (++i >= HCLGE_VECTOR_ELEMENTS_PER_CMD) {
                        req->int_cause_num = HCLGE_VECTOR_ELEMENTS_PER_CMD;
@@ -2778,7 +2807,7 @@ static int hclge_unmap_ring_from_vector(
                        }
                        i = 0;
                        hclge_cmd_setup_basic_desc(&desc,
-                                                  HCLGE_OPC_ADD_RING_TO_VECTOR,
+                                                  HCLGE_OPC_DEL_RING_TO_VECTOR,
                                                   false);
                        req->int_vector_id = vector_id;
                }
@@ -3665,6 +3694,7 @@ static int hclge_init_vlan_config(struct hclge_dev *hdev)
 {
 #define HCLGE_VLAN_TYPE_VF_TABLE   0
 #define HCLGE_VLAN_TYPE_PORT_TABLE 1
+       struct hnae3_handle *handle;
        int ret;
 
        ret = hclge_set_vlan_filter_ctrl(hdev, HCLGE_VLAN_TYPE_VF_TABLE,
@@ -3674,8 +3704,11 @@ static int hclge_init_vlan_config(struct hclge_dev *hdev)
 
        ret = hclge_set_vlan_filter_ctrl(hdev, HCLGE_VLAN_TYPE_PORT_TABLE,
                                         true);
+       if (ret)
+               return ret;
 
-       return ret;
+       handle = &hdev->vport[0].nic;
+       return hclge_set_port_vlan_filter(handle, htons(ETH_P_8021Q), 0, false);
 }
 
 static int hclge_set_mtu(struct hnae3_handle *handle, int new_mtu)
@@ -3920,8 +3953,7 @@ static int hclge_init_client_instance(struct hnae3_client *client,
                                goto err;
 
                        if (hdev->roce_client &&
-                           hnae_get_bit(hdev->ae_dev->flag,
-                                        HNAE_DEV_SUPPORT_ROCE_B)) {
+                           hnae3_dev_roce_supported(hdev)) {
                                struct hnae3_client *rc = hdev->roce_client;
 
                                ret = hclge_init_roce_base_info(vport);
@@ -3944,8 +3976,7 @@ static int hclge_init_client_instance(struct hnae3_client *client,
 
                        break;
                case HNAE3_CLIENT_ROCE:
-                       if (hnae_get_bit(hdev->ae_dev->flag,
-                                        HNAE_DEV_SUPPORT_ROCE_B)) {
+                       if (hnae3_dev_roce_supported(hdev)) {
                                hdev->roce_client = client;
                                vport->roce.client = client;
                        }
@@ -4057,7 +4088,6 @@ static void hclge_pci_uninit(struct hclge_dev *hdev)
 static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
 {
        struct pci_dev *pdev = ae_dev->pdev;
-       const struct pci_device_id *id;
        struct hclge_dev *hdev;
        int ret;
 
@@ -4072,10 +4102,6 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
        hdev->ae_dev = ae_dev;
        ae_dev->priv = hdev;
 
-       id = pci_match_id(roce_pci_tbl, ae_dev->pdev);
-       if (id)
-               hnae_set_bit(ae_dev->flag, HNAE_DEV_SUPPORT_ROCE_B, 1);
-
        ret = hclge_pci_init(hdev);
        if (ret) {
                dev_err(&pdev->dev, "PCI init failed\n");
@@ -4138,12 +4164,6 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
                return ret;
        }
 
-       ret = hclge_rss_init_hw(hdev);
-       if (ret) {
-               dev_err(&pdev->dev, "Rss init fail, ret =%d\n", ret);
-               return  ret;
-       }
-
        ret = hclge_init_vlan_config(hdev);
        if (ret) {
                dev_err(&pdev->dev, "VLAN init fail, ret =%d\n", ret);
@@ -4156,6 +4176,12 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
                return ret;
        }
 
+       ret = hclge_rss_init_hw(hdev);
+       if (ret) {
+               dev_err(&pdev->dev, "Rss init fail, ret =%d\n", ret);
+               return ret;
+       }
+
        setup_timer(&hdev->service_timer, hclge_service_timer,
                    (unsigned long)hdev);
        INIT_WORK(&hdev->service_task, hclge_service_task);
index edb10ad075eb2520a3f671d8062f043ddb1c8280..9fcfd9395424538870f4b837ad9ade21476867ae 100644 (file)
@@ -176,7 +176,6 @@ struct hclge_pg_info {
 struct hclge_tc_info {
        u8 tc_id;
        u8 tc_sch_mode;         /* 0: sp; 1: dwrr */
-       u8 up;
        u8 pgid;
        u32 bw_limit;
 };
@@ -197,6 +196,7 @@ struct hclge_tm_info {
        u8 num_tc;
        u8 num_pg;      /* It must be 1 if vNET-Base schd */
        u8 pg_dwrr[HCLGE_PG_NUM];
+       u8 prio_tc[HNAE3_MAX_USER_PRIO];
        struct hclge_pg_info pg_info[HCLGE_PG_NUM];
        struct hclge_tc_info tc_info[HNAE3_MAX_TC];
        enum hclge_fc_mode fc_mode;
@@ -477,6 +477,7 @@ struct hclge_vport {
        u8  rss_hash_key[HCLGE_RSS_KEY_SIZE]; /* User configured hash keys */
        /* User configured lookup table entries */
        u8  rss_indirection_tbl[HCLGE_RSS_IND_TBL_SIZE];
+       u16 alloc_rss_size;
 
        u16 qs_offset;
        u16 bw_limit;           /* VSI BW Limit (0 = disabled) */
index 1c577d268f008b4d39b35164b9205ba35eaefdaa..73a75d7cc5517819b8135324dbc481a0aa993423 100644 (file)
@@ -128,9 +128,7 @@ static int hclge_fill_pri_array(struct hclge_dev *hdev, u8 *pri, u8 pri_id)
 {
        u8 tc;
 
-       for (tc = 0; tc < hdev->tm_info.num_tc; tc++)
-               if (hdev->tm_info.tc_info[tc].up == pri_id)
-                       break;
+       tc = hdev->tm_info.prio_tc[pri_id];
 
        if (tc >= hdev->tm_info.num_tc)
                return -EINVAL;
@@ -158,7 +156,7 @@ static int hclge_up_to_tc_map(struct hclge_dev *hdev)
 
        hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_PRI_TO_TC_MAPPING, false);
 
-       for (pri_id = 0; pri_id < hdev->tm_info.num_tc; pri_id++) {
+       for (pri_id = 0; pri_id < HNAE3_MAX_USER_PRIO; pri_id++) {
                ret = hclge_fill_pri_array(hdev, pri, pri_id);
                if (ret)
                        return ret;
@@ -280,11 +278,11 @@ static int hclge_tm_pg_shapping_cfg(struct hclge_dev *hdev,
 
        shap_cfg_cmd->pg_id = pg_id;
 
-       hclge_tm_set_feild(shap_cfg_cmd->pg_shapping_para, IR_B, ir_b);
-       hclge_tm_set_feild(shap_cfg_cmd->pg_shapping_para, IR_U, ir_u);
-       hclge_tm_set_feild(shap_cfg_cmd->pg_shapping_para, IR_S, ir_s);
-       hclge_tm_set_feild(shap_cfg_cmd->pg_shapping_para, BS_B, bs_b);
-       hclge_tm_set_feild(shap_cfg_cmd->pg_shapping_para, BS_S, bs_s);
+       hclge_tm_set_field(shap_cfg_cmd->pg_shapping_para, IR_B, ir_b);
+       hclge_tm_set_field(shap_cfg_cmd->pg_shapping_para, IR_U, ir_u);
+       hclge_tm_set_field(shap_cfg_cmd->pg_shapping_para, IR_S, ir_s);
+       hclge_tm_set_field(shap_cfg_cmd->pg_shapping_para, BS_B, bs_b);
+       hclge_tm_set_field(shap_cfg_cmd->pg_shapping_para, BS_S, bs_s);
 
        return hclge_cmd_send(&hdev->hw, &desc, 1);
 }
@@ -307,11 +305,11 @@ static int hclge_tm_pri_shapping_cfg(struct hclge_dev *hdev,
 
        shap_cfg_cmd->pri_id = pri_id;
 
-       hclge_tm_set_feild(shap_cfg_cmd->pri_shapping_para, IR_B, ir_b);
-       hclge_tm_set_feild(shap_cfg_cmd->pri_shapping_para, IR_U, ir_u);
-       hclge_tm_set_feild(shap_cfg_cmd->pri_shapping_para, IR_S, ir_s);
-       hclge_tm_set_feild(shap_cfg_cmd->pri_shapping_para, BS_B, bs_b);
-       hclge_tm_set_feild(shap_cfg_cmd->pri_shapping_para, BS_S, bs_s);
+       hclge_tm_set_field(shap_cfg_cmd->pri_shapping_para, IR_B, ir_b);
+       hclge_tm_set_field(shap_cfg_cmd->pri_shapping_para, IR_U, ir_u);
+       hclge_tm_set_field(shap_cfg_cmd->pri_shapping_para, IR_S, ir_s);
+       hclge_tm_set_field(shap_cfg_cmd->pri_shapping_para, BS_B, bs_b);
+       hclge_tm_set_field(shap_cfg_cmd->pri_shapping_para, BS_S, bs_s);
 
        return hclge_cmd_send(&hdev->hw, &desc, 1);
 }
@@ -397,6 +395,7 @@ static void hclge_tm_vport_tc_info_update(struct hclge_vport *vport)
                        kinfo->num_tqps / kinfo->num_tc);
        vport->qs_offset = hdev->tm_info.num_tc * vport->vport_id;
        vport->dwrr = 100;  /* 100 percent as init */
+       vport->alloc_rss_size = kinfo->rss_size;
 
        for (i = 0; i < kinfo->num_tc; i++) {
                if (hdev->hw_tc_map & BIT(i)) {
@@ -404,16 +403,17 @@ static void hclge_tm_vport_tc_info_update(struct hclge_vport *vport)
                        kinfo->tc_info[i].tqp_offset = i * kinfo->rss_size;
                        kinfo->tc_info[i].tqp_count = kinfo->rss_size;
                        kinfo->tc_info[i].tc = i;
-                       kinfo->tc_info[i].up = hdev->tm_info.tc_info[i].up;
                } else {
                        /* Set to default queue if TC is disable */
                        kinfo->tc_info[i].enable = false;
                        kinfo->tc_info[i].tqp_offset = 0;
                        kinfo->tc_info[i].tqp_count = 1;
                        kinfo->tc_info[i].tc = 0;
-                       kinfo->tc_info[i].up = 0;
                }
        }
+
+       memcpy(kinfo->prio_tc, hdev->tm_info.prio_tc,
+              FIELD_SIZEOF(struct hnae3_knic_private_info, prio_tc));
 }
 
 static void hclge_tm_vport_info_update(struct hclge_dev *hdev)
@@ -435,12 +435,15 @@ static void hclge_tm_tc_info_init(struct hclge_dev *hdev)
        for (i = 0; i < hdev->tm_info.num_tc; i++) {
                hdev->tm_info.tc_info[i].tc_id = i;
                hdev->tm_info.tc_info[i].tc_sch_mode = HCLGE_SCH_MODE_DWRR;
-               hdev->tm_info.tc_info[i].up = i;
                hdev->tm_info.tc_info[i].pgid = 0;
                hdev->tm_info.tc_info[i].bw_limit =
                        hdev->tm_info.pg_info[0].bw_limit;
        }
 
+       for (i = 0; i < HNAE3_MAX_USER_PRIO; i++)
+               hdev->tm_info.prio_tc[i] =
+                       (i >= hdev->tm_info.num_tc) ? 0 : i;
+
        hdev->flag &= ~HCLGE_FLAG_DCB_ENABLE;
 }
 
@@ -976,6 +979,10 @@ int hclge_pause_setup_hw(struct hclge_dev *hdev)
        if (ret)
                return ret;
 
+       /* Only DCB-supported dev supports qset back pressure setting */
+       if (!hnae3_dev_dcb_supported(hdev))
+               return 0;
+
        for (i = 0; i < hdev->tm_info.num_tc; i++) {
                ret = hclge_tm_qs_bp_cfg(hdev, i);
                if (ret)
index 7e67337dfaf2c36e8c0ecc79f68aaa3f7bc7a32c..85158b0d73fe395ffa90de916c789e5afca5d15a 100644 (file)
@@ -94,10 +94,10 @@ struct hclge_bp_to_qs_map_cmd {
        u32 rsvd1;
 };
 
-#define hclge_tm_set_feild(dest, string, val) \
+#define hclge_tm_set_field(dest, string, val) \
                        hnae_set_field((dest), (HCLGE_TM_SHAP_##string##_MSK), \
                                       (HCLGE_TM_SHAP_##string##_LSH), val)
-#define hclge_tm_get_feild(src, string) \
+#define hclge_tm_get_field(src, string) \
                        hnae_get_field((src), (HCLGE_TM_SHAP_##string##_MSK), \
                                       (HCLGE_TM_SHAP_##string##_LSH))
 
index 1c3e29447891644f48214aee3edceb9efd0ba1ef..35369e1c8036f3abbade76b63eed2a103170b4c7 100644 (file)
@@ -41,11 +41,16 @@ static struct hnae3_client client;
 static const struct pci_device_id hns3_pci_tbl[] = {
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_GE), 0},
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC), 0},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_25GE_RDMA_MACSEC),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_50GE_RDMA_MACSEC),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_MACSEC),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
        /* required last entry */
        {0, }
 };
@@ -1348,6 +1353,7 @@ static int hns3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        ae_dev->pdev = pdev;
+       ae_dev->flag = ent->driver_data;
        ae_dev->dev_type = HNAE3_DEV_KNIC;
        pci_set_drvdata(pdev, ae_dev);
 
@@ -2705,10 +2711,11 @@ static void hns3_init_mac_addr(struct net_device *netdev)
                eth_hw_addr_random(netdev);
                dev_warn(priv->dev, "using random MAC address %pM\n",
                         netdev->dev_addr);
-               /* Also copy this new MAC address into hdev */
-               if (h->ae_algo->ops->set_mac_addr)
-                       h->ae_algo->ops->set_mac_addr(h, netdev->dev_addr);
        }
+
+       if (h->ae_algo->ops->set_mac_addr)
+               h->ae_algo->ops->set_mac_addr(h, netdev->dev_addr);
+
 }
 
 static void hns3_nic_set_priv_ops(struct net_device *netdev)
index 8c8dcd29c40d45e86f6f2a73bebf2c417aadceb2..422a19a5d94f62c3046bab440f361e742ca388d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Intel 82586/82593/82596 chipset device drivers.
 #
index 98768ba0955a1b3b45518b020f9eb6fda0770b5b..ddf1ce3c8cca763724c9a7562f6ce5aa77312d3a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PowerPC 4xx on-chip ethernet driver
 #
index 2c74baa2398a016fb9468f8a1b4b3aa5d0dc2a05..fff09dcf9e3463f8b10800d2754a4631770d2d63 100644 (file)
@@ -402,7 +402,7 @@ static int mal_poll(struct napi_struct *napi, int budget)
        unsigned long flags;
 
        MAL_DBG2(mal, "poll(%d)" NL, budget);
- again:
+
        /* Process TX skbs */
        list_for_each(l, &mal->poll_list) {
                struct mal_commac *mc =
@@ -451,7 +451,6 @@ static int mal_poll(struct napi_struct *napi, int budget)
                        spin_lock_irqsave(&mal->lock, flags);
                        mal_disable_eob_irq(mal);
                        spin_unlock_irqrestore(&mal->lock, flags);
-                       goto again;
                }
                mc->ops->poll_tx(mc->dev);
        }
index cb8182f4fdfa1725f8d4024741e00219376d7326..c66abd476023a401b14c53abf7026e3147f13f62 100644 (file)
@@ -1093,11 +1093,12 @@ static int build_hdr_data(u8 hdr_field, struct sk_buff *skb,
  * places them in a descriptor array, scrq_arr
  */
 
-static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
-                            union sub_crq *scrq_arr)
+static int create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
+                           union sub_crq *scrq_arr)
 {
        union sub_crq hdr_desc;
        int tmp_len = len;
+       int num_descs = 0;
        u8 *data, *cur;
        int tmp;
 
@@ -1126,7 +1127,10 @@ static void create_hdr_descs(u8 hdr_field, u8 *hdr_data, int len, int *hdr_len,
                tmp_len -= tmp;
                *scrq_arr = hdr_desc;
                scrq_arr++;
+               num_descs++;
        }
+
+       return num_descs;
 }
 
 /**
@@ -1144,16 +1148,12 @@ static void build_hdr_descs_arr(struct ibmvnic_tx_buff *txbuff,
                                int *num_entries, u8 hdr_field)
 {
        int hdr_len[3] = {0, 0, 0};
-       int tot_len, len;
+       int tot_len;
        u8 *hdr_data = txbuff->hdr_data;
 
        tot_len = build_hdr_data(hdr_field, txbuff->skb, hdr_len,
                                 txbuff->hdr_data);
-       len = tot_len;
-       len -= 24;
-       if (len > 0)
-               num_entries += len % 29 ? len / 29 + 1 : len / 29;
-       create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
+       *num_entries += create_hdr_descs(hdr_field, hdr_data, tot_len, hdr_len,
                         txbuff->indir_arr + 1);
 }
 
index 5ea764d85ec341570350c35d39f42ee2139931ed..90af7757a885416ce9776a6b800bbbd158730699 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Intel network device drivers.
 #
index ec8aa4562cc90a90dff844872278722b24daec3c..3b3983a1ffbba1d6795ead832c5aceb801023969 100644 (file)
@@ -1824,11 +1824,12 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
        int i;
-       char *p = NULL;
        const struct e1000_stats *stat = e1000_gstrings_stats;
 
        e1000_update_stats(adapter);
-       for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) {
+       for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++, stat++) {
+               char *p;
+
                switch (stat->type) {
                case NETDEV_STATS:
                        p = (char *)netdev + stat->stat_offset;
@@ -1839,15 +1840,13 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
                default:
                        WARN_ONCE(1, "Invalid E1000 stat type: %u index %d\n",
                                  stat->type, i);
-                       break;
+                       continue;
                }
 
                if (stat->sizeof_stat == sizeof(u64))
                        data[i] = *(u64 *)p;
                else
                        data[i] = *(u32 *)p;
-
-               stat++;
        }
 /* BUG_ON(i != E1000_STATS_LEN); */
 }
index 98375e1e1185e7b8136515d0d3e2a90464495ccd..1982f7917a8d5d68776b2e052ac1df809f11c065 100644 (file)
@@ -520,8 +520,6 @@ void e1000_down(struct e1000_adapter *adapter)
        struct net_device *netdev = adapter->netdev;
        u32 rctl, tctl;
 
-       netif_carrier_off(netdev);
-
        /* disable receives in the hardware */
        rctl = er32(RCTL);
        ew32(RCTL, rctl & ~E1000_RCTL_EN);
@@ -537,6 +535,15 @@ void e1000_down(struct e1000_adapter *adapter)
        E1000_WRITE_FLUSH();
        msleep(10);
 
+       /* Set the carrier off after transmits have been disabled in the
+        * hardware, to avoid race conditions with e1000_watchdog() (which
+        * may be running concurrently to us, checking for the carrier
+        * bit to decide whether it should enable transmits again). Such
+        * a race condition would result into transmission being disabled
+        * in the hardware until the next IFF_DOWN+IFF_UP cycle.
+        */
+       netif_carrier_off(netdev);
+
        napi_disable(&adapter->napi);
 
        e1000_irq_disable(adapter);
index 57505b1df98dfb65e5033808c05c4cf9954600de..d591b3e6bd7c511d974c20e2a2e27e44816fa84f 100644 (file)
@@ -298,7 +298,7 @@ static i40e_status i40e_read_nvm_word_aq(struct i40e_hw *hw, u16 offset,
 }
 
 /**
- * __i40e_read_nvm_word - Reads nvm word, assumes called does the locking
+ * __i40e_read_nvm_word - Reads nvm word, assumes caller does the locking
  * @hw: pointer to the HW structure
  * @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
  * @data: word read from the Shadow RAM
index 1519dfb851d01a3628c3ad8411be96e3c2e0643e..120c68f78951dd1ae7a2218b4b64c049aee40340 100644 (file)
@@ -1037,6 +1037,32 @@ reset_latency:
        return false;
 }
 
+/**
+ * i40e_reuse_rx_page - page flip buffer and store it back on the ring
+ * @rx_ring: rx descriptor ring to store buffers on
+ * @old_buff: donor buffer to have page reused
+ *
+ * Synchronizes page for reuse by the adapter
+ **/
+static void i40e_reuse_rx_page(struct i40e_ring *rx_ring,
+                              struct i40e_rx_buffer *old_buff)
+{
+       struct i40e_rx_buffer *new_buff;
+       u16 nta = rx_ring->next_to_alloc;
+
+       new_buff = &rx_ring->rx_bi[nta];
+
+       /* update, and store next to alloc */
+       nta++;
+       rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta : 0;
+
+       /* transfer page from old buffer to new buffer */
+       new_buff->dma           = old_buff->dma;
+       new_buff->page          = old_buff->page;
+       new_buff->page_offset   = old_buff->page_offset;
+       new_buff->pagecnt_bias  = old_buff->pagecnt_bias;
+}
+
 /**
  * i40e_rx_is_programming_status - check for programming status descriptor
  * @qw: qword representing status_error_len in CPU ordering
@@ -1071,15 +1097,24 @@ static void i40e_clean_programming_status(struct i40e_ring *rx_ring,
                                          union i40e_rx_desc *rx_desc,
                                          u64 qw)
 {
-       u32 ntc = rx_ring->next_to_clean + 1;
+       struct i40e_rx_buffer *rx_buffer;
+       u32 ntc = rx_ring->next_to_clean;
        u8 id;
 
        /* fetch, update, and store next to clean */
+       rx_buffer = &rx_ring->rx_bi[ntc++];
        ntc = (ntc < rx_ring->count) ? ntc : 0;
        rx_ring->next_to_clean = ntc;
 
        prefetch(I40E_RX_DESC(rx_ring, ntc));
 
+       /* place unused page back on the ring */
+       i40e_reuse_rx_page(rx_ring, rx_buffer);
+       rx_ring->rx_stats.page_reuse_count++;
+
+       /* clear contents of buffer_info */
+       rx_buffer->page = NULL;
+
        id = (qw & I40E_RX_PROG_STATUS_DESC_QW1_PROGID_MASK) >>
                  I40E_RX_PROG_STATUS_DESC_QW1_PROGID_SHIFT;
 
@@ -1638,32 +1673,6 @@ static bool i40e_cleanup_headers(struct i40e_ring *rx_ring, struct sk_buff *skb,
        return false;
 }
 
-/**
- * i40e_reuse_rx_page - page flip buffer and store it back on the ring
- * @rx_ring: rx descriptor ring to store buffers on
- * @old_buff: donor buffer to have page reused
- *
- * Synchronizes page for reuse by the adapter
- **/
-static void i40e_reuse_rx_page(struct i40e_ring *rx_ring,
-                              struct i40e_rx_buffer *old_buff)
-{
-       struct i40e_rx_buffer *new_buff;
-       u16 nta = rx_ring->next_to_alloc;
-
-       new_buff = &rx_ring->rx_bi[nta];
-
-       /* update, and store next to alloc */
-       nta++;
-       rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta : 0;
-
-       /* transfer page from old buffer to new buffer */
-       new_buff->dma           = old_buff->dma;
-       new_buff->page          = old_buff->page;
-       new_buff->page_offset   = old_buff->page_offset;
-       new_buff->pagecnt_bias  = old_buff->pagecnt_bias;
-}
-
 /**
  * i40e_page_is_reusable - check if any reuse is possible
  * @page: page struct to check
@@ -2093,6 +2102,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
 
                if (unlikely(i40e_rx_is_programming_status(qword))) {
                        i40e_clean_programming_status(rx_ring, rx_desc, qword);
+                       cleaned_count++;
                        continue;
                }
                size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>
@@ -2260,7 +2270,7 @@ static inline void i40e_update_enable_itr(struct i40e_vsi *vsi,
                goto enable_int;
        }
 
-       if (ITR_IS_DYNAMIC(tx_itr_setting)) {
+       if (ITR_IS_DYNAMIC(rx_itr_setting)) {
                rx = i40e_set_new_dynamic_itr(&q_vector->rx);
                rxval = i40e_buildreg_itr(I40E_RX_ITR, q_vector->rx.itr);
        }
index 93cf5fd17d91b7c997c531277f76bd7c5e903c55..d8131139565ea0ae48c628d1b7219d35bacd3a7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/list.h>
 #include <linux/errno.h>
 
index 7d283c7506a595b870bc1045586c5384a98e834d..15a10da5bd4aea957f28a97aa542cb8619d8d0e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _I40E_CLIENT_H_
 #define _I40E_CLIENT_H_
 
index fd4a46b03cc8317f44f0c4d3ee5141dd05858244..ea69af267d63522ae7f545c2cbb8a7a6e601adbc 100644 (file)
@@ -5326,7 +5326,7 @@ dma_error:
                                       DMA_TO_DEVICE);
                dma_unmap_len_set(tx_buffer, len, 0);
 
-               if (i--)
+               if (i-- == 0)
                        i += tx_ring->count;
                tx_buffer = &tx_ring->tx_buffer_info[i];
        }
index 523f9d05a810f175582e5b1474f4d398bfa0aea2..8a32eb7d47b9ba88f97ad25be9374e68020bfb29 100644 (file)
@@ -175,31 +175,9 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)
  **/
 static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw)
 {
-#ifndef CONFIG_SPARC
-       u32 regval;
-       u32 i;
-#endif
        s32 ret_val;
 
        ret_val = ixgbe_start_hw_generic(hw);
-
-#ifndef CONFIG_SPARC
-       /* Disable relaxed ordering */
-       for (i = 0; ((i < hw->mac.max_tx_queues) &&
-            (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
-               regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i));
-               regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
-               IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval);
-       }
-
-       for (i = 0; ((i < hw->mac.max_rx_queues) &&
-            (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
-               regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
-               regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
-                           IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
-               IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
-       }
-#endif
        if (ret_val)
                return ret_val;
 
index 2c19070d2a0b08dee8b47a3d98bf54971741cb78..6e6ab6f6875ebc188fc11a6d9f8b1b21dea3fb59 100644 (file)
@@ -366,25 +366,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
        }
        IXGBE_WRITE_FLUSH(hw);
 
-#ifndef CONFIG_ARCH_WANT_RELAX_ORDER
-       /* Disable relaxed ordering */
-       for (i = 0; i < hw->mac.max_tx_queues; i++) {
-               u32 regval;
-
-               regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i));
-               regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
-               IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval);
-       }
-
-       for (i = 0; i < hw->mac.max_rx_queues; i++) {
-               u32 regval;
-
-               regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
-               regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
-                           IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
-               IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
-       }
-#endif
        return 0;
 }
 
index 72c565712a5f83106fe92ee7aa6e2f674e89efa2..c3e7a8191128dea542db9208a8076b4cf190e60e 100644 (file)
@@ -1048,7 +1048,7 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
 {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
        struct ixgbe_ring *temp_ring;
-       int i, err = 0;
+       int i, j, err = 0;
        u32 new_rx_count, new_tx_count;
 
        if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
@@ -1085,8 +1085,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
        }
 
        /* allocate temporary buffer to store rings in */
-       i = max_t(int, adapter->num_tx_queues, adapter->num_rx_queues);
-       i = max_t(int, i, adapter->num_xdp_queues);
+       i = max_t(int, adapter->num_tx_queues + adapter->num_xdp_queues,
+                 adapter->num_rx_queues);
        temp_ring = vmalloc(i * sizeof(struct ixgbe_ring));
 
        if (!temp_ring) {
@@ -1118,8 +1118,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
                        }
                }
 
-               for (i = 0; i < adapter->num_xdp_queues; i++) {
-                       memcpy(&temp_ring[i], adapter->xdp_ring[i],
+               for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
+                       memcpy(&temp_ring[i], adapter->xdp_ring[j],
                               sizeof(struct ixgbe_ring));
 
                        temp_ring[i].count = new_tx_count;
@@ -1139,10 +1139,10 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
                        memcpy(adapter->tx_ring[i], &temp_ring[i],
                               sizeof(struct ixgbe_ring));
                }
-               for (i = 0; i < adapter->num_xdp_queues; i++) {
-                       ixgbe_free_tx_resources(adapter->xdp_ring[i]);
+               for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
+                       ixgbe_free_tx_resources(adapter->xdp_ring[j]);
 
-                       memcpy(adapter->xdp_ring[i], &temp_ring[i],
+                       memcpy(adapter->xdp_ring[j], &temp_ring[i],
                               sizeof(struct ixgbe_ring));
                }
 
index d962368d08d0ff4c25032e3d0b3b2f51963a39d7..6d5f31e943583df77f5fa1e6aa3e2703fff33518 100644 (file)
@@ -4881,7 +4881,7 @@ static void ixgbe_clear_udp_tunnel_port(struct ixgbe_adapter *adapter, u32 mask)
                                IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)))
                return;
 
-       vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) && ~mask;
+       vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) & ~mask;
        IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, vxlanctrl);
 
        if (mask & IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK)
@@ -8020,29 +8020,23 @@ static int ixgbe_tx_map(struct ixgbe_ring *tx_ring,
        return 0;
 dma_error:
        dev_err(tx_ring->dev, "TX DMA map failed\n");
-       tx_buffer = &tx_ring->tx_buffer_info[i];
 
        /* clear dma mappings for failed tx_buffer_info map */
-       while (tx_buffer != first) {
+       for (;;) {
+               tx_buffer = &tx_ring->tx_buffer_info[i];
                if (dma_unmap_len(tx_buffer, len))
                        dma_unmap_page(tx_ring->dev,
                                       dma_unmap_addr(tx_buffer, dma),
                                       dma_unmap_len(tx_buffer, len),
                                       DMA_TO_DEVICE);
                dma_unmap_len_set(tx_buffer, len, 0);
-
-               if (i--)
+               if (tx_buffer == first)
+                       break;
+               if (i == 0)
                        i += tx_ring->count;
-               tx_buffer = &tx_ring->tx_buffer_info[i];
+               i--;
        }
 
-       if (dma_unmap_len(tx_buffer, len))
-               dma_unmap_single(tx_ring->dev,
-                                dma_unmap_addr(tx_buffer, dma),
-                                dma_unmap_len(tx_buffer, len),
-                                DMA_TO_DEVICE);
-       dma_unmap_len_set(tx_buffer, len, 0);
-
        dev_kfree_skb_any(first->skb);
        first->skb = NULL;
 
@@ -8529,6 +8523,10 @@ static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
                return ixgbe_ptp_set_ts_config(adapter, req);
        case SIOCGHWTSTAMP:
                return ixgbe_ptp_get_ts_config(adapter, req);
+       case SIOCGMIIPHY:
+               if (!adapter->hw.phy.ops.read_reg)
+                       return -EOPNOTSUPP;
+               /* fall through */
        default:
                return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd);
        }
index ff1bffa74803e009a07baef0bd885572f4f6dd82..9498ed26dbe5f8d3c68a8bea8a9711b3a6b9a652 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Marvell device drivers.
 #
index dd0ee2691c863edab216c24e1e227bdb9dc84306..a37af5813f33758d1ed8debf6bcd77590363f349 100644 (file)
 #define     MVPP2_GMAC_INBAND_AN_MASK          BIT(0)
 #define     MVPP2_GMAC_FLOW_CTRL_MASK          GENMASK(2, 1)
 #define     MVPP2_GMAC_PCS_ENABLE_MASK         BIT(3)
-#define     MVPP2_GMAC_PORT_RGMII_MASK         BIT(4)
+#define     MVPP2_GMAC_INTERNAL_CLK_MASK       BIT(4)
 #define     MVPP2_GMAC_DISABLE_PADDING         BIT(5)
 #define     MVPP2_GMAC_PORT_RESET_MASK         BIT(6)
 #define MVPP2_GMAC_AUTONEG_CONFIG              0xc
@@ -676,6 +676,7 @@ enum mvpp2_tag_type {
 #define MVPP2_PRS_RI_L3_MCAST                  BIT(15)
 #define MVPP2_PRS_RI_L3_BCAST                  (BIT(15) | BIT(16))
 #define MVPP2_PRS_RI_IP_FRAG_MASK              0x20000
+#define MVPP2_PRS_RI_IP_FRAG_TRUE              BIT(17)
 #define MVPP2_PRS_RI_UDF3_MASK                 0x300000
 #define MVPP2_PRS_RI_UDF3_RX_SPECIAL           BIT(21)
 #define MVPP2_PRS_RI_L4_PROTO_MASK             0x1c00000
@@ -792,6 +793,7 @@ struct mvpp2 {
        struct clk *pp_clk;
        struct clk *gop_clk;
        struct clk *mg_clk;
+       struct clk *axi_clk;
 
        /* List of pointers to port structures */
        struct mvpp2_port **port_list;
@@ -1165,6 +1167,11 @@ struct mvpp2_bm_pool {
        u32 port_map;
 };
 
+#define IS_TSO_HEADER(txq_pcpu, addr) \
+       ((addr) >= (txq_pcpu)->tso_headers_dma && \
+        (addr) < (txq_pcpu)->tso_headers_dma + \
+        (txq_pcpu)->size * TSO_HEADER_SIZE)
+
 /* Queue modes */
 #define MVPP2_QDIST_SINGLE_MODE        0
 #define MVPP2_QDIST_MULTI_MODE 1
@@ -1532,7 +1539,7 @@ static bool mvpp2_prs_tcam_data_cmp(struct mvpp2_prs_entry *pe, int offs,
        int off = MVPP2_PRS_TCAM_DATA_BYTE(offs);
        u16 tcam_data;
 
-       tcam_data = (8 << pe->tcam.byte[off + 1]) | pe->tcam.byte[off];
+       tcam_data = (pe->tcam.byte[off + 1] << 8) | pe->tcam.byte[off];
        if (tcam_data != data)
                return false;
        return true;
@@ -2315,7 +2322,7 @@ static int mvpp2_prs_ip4_proto(struct mvpp2 *priv, unsigned short proto,
            (proto != IPPROTO_IGMP))
                return -EINVAL;
 
-       /* Fragmented packet */
+       /* Not fragmented packet */
        tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID,
                                        MVPP2_PE_LAST_FREE_TID);
        if (tid < 0)
@@ -2334,8 +2341,12 @@ static int mvpp2_prs_ip4_proto(struct mvpp2 *priv, unsigned short proto,
                                  MVPP2_PRS_SRAM_OP_SEL_UDF_ADD);
        mvpp2_prs_sram_ai_update(&pe, MVPP2_PRS_IPV4_DIP_AI_BIT,
                                 MVPP2_PRS_IPV4_DIP_AI_BIT);
-       mvpp2_prs_sram_ri_update(&pe, ri | MVPP2_PRS_RI_IP_FRAG_MASK,
-                                ri_mask | MVPP2_PRS_RI_IP_FRAG_MASK);
+       mvpp2_prs_sram_ri_update(&pe, ri, ri_mask | MVPP2_PRS_RI_IP_FRAG_MASK);
+
+       mvpp2_prs_tcam_data_byte_set(&pe, 2, 0x00,
+                                    MVPP2_PRS_TCAM_PROTO_MASK_L);
+       mvpp2_prs_tcam_data_byte_set(&pe, 3, 0x00,
+                                    MVPP2_PRS_TCAM_PROTO_MASK);
 
        mvpp2_prs_tcam_data_byte_set(&pe, 5, proto, MVPP2_PRS_TCAM_PROTO_MASK);
        mvpp2_prs_tcam_ai_update(&pe, 0, MVPP2_PRS_IPV4_DIP_AI_BIT);
@@ -2346,7 +2357,7 @@ static int mvpp2_prs_ip4_proto(struct mvpp2 *priv, unsigned short proto,
        mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_IP4);
        mvpp2_prs_hw_write(priv, &pe);
 
-       /* Not fragmented packet */
+       /* Fragmented packet */
        tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID,
                                        MVPP2_PE_LAST_FREE_TID);
        if (tid < 0)
@@ -2358,8 +2369,11 @@ static int mvpp2_prs_ip4_proto(struct mvpp2 *priv, unsigned short proto,
        pe.sram.word[MVPP2_PRS_SRAM_RI_CTRL_WORD] = 0x0;
        mvpp2_prs_sram_ri_update(&pe, ri, ri_mask);
 
-       mvpp2_prs_tcam_data_byte_set(&pe, 2, 0x00, MVPP2_PRS_TCAM_PROTO_MASK_L);
-       mvpp2_prs_tcam_data_byte_set(&pe, 3, 0x00, MVPP2_PRS_TCAM_PROTO_MASK);
+       mvpp2_prs_sram_ri_update(&pe, ri | MVPP2_PRS_RI_IP_FRAG_TRUE,
+                                ri_mask | MVPP2_PRS_RI_IP_FRAG_MASK);
+
+       mvpp2_prs_tcam_data_byte_set(&pe, 2, 0x00, 0x0);
+       mvpp2_prs_tcam_data_byte_set(&pe, 3, 0x00, 0x0);
 
        /* Update shadow table and hw entry */
        mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_IP4);
@@ -2600,8 +2614,8 @@ static void mvpp2_prs_mac_init(struct mvpp2 *priv)
        /* place holders only - no ports */
        mvpp2_prs_mac_drop_all_set(priv, 0, false);
        mvpp2_prs_mac_promisc_set(priv, 0, false);
-       mvpp2_prs_mac_multi_set(priv, MVPP2_PE_MAC_MC_ALL, 0, false);
-       mvpp2_prs_mac_multi_set(priv, MVPP2_PE_MAC_MC_IP6, 0, false);
+       mvpp2_prs_mac_multi_set(priv, 0, MVPP2_PE_MAC_MC_ALL, false);
+       mvpp2_prs_mac_multi_set(priv, 0, MVPP2_PE_MAC_MC_IP6, false);
 }
 
 /* Set default entries for various types of dsa packets */
@@ -3382,7 +3396,7 @@ mvpp2_prs_mac_da_range_find(struct mvpp2 *priv, int pmap, const u8 *da,
        struct mvpp2_prs_entry *pe;
        int tid;
 
-       pe = kzalloc(sizeof(*pe), GFP_KERNEL);
+       pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
        if (!pe)
                return NULL;
        mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
@@ -3444,7 +3458,7 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2 *priv, int port,
                if (tid < 0)
                        return tid;
 
-               pe = kzalloc(sizeof(*pe), GFP_KERNEL);
+               pe = kzalloc(sizeof(*pe), GFP_ATOMIC);
                if (!pe)
                        return -ENOMEM;
                mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC);
@@ -4591,7 +4605,6 @@ static void mvpp2_port_mii_gmac_configure(struct mvpp2_port *port)
                val |= MVPP2_GMAC_INBAND_AN_MASK | MVPP2_GMAC_PCS_ENABLE_MASK;
        } else if (phy_interface_mode_is_rgmii(port->phy_interface)) {
                val &= ~MVPP2_GMAC_PCS_ENABLE_MASK;
-               val |= MVPP2_GMAC_PORT_RGMII_MASK;
        }
        writel(val, port->base + MVPP2_GMAC_CTRL_2_REG);
 
@@ -5313,8 +5326,9 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,
                struct mvpp2_txq_pcpu_buf *tx_buf =
                        txq_pcpu->buffs + txq_pcpu->txq_get_index;
 
-               dma_unmap_single(port->dev->dev.parent, tx_buf->dma,
-                                tx_buf->size, DMA_TO_DEVICE);
+               if (!IS_TSO_HEADER(txq_pcpu, tx_buf->dma))
+                       dma_unmap_single(port->dev->dev.parent, tx_buf->dma,
+                                        tx_buf->size, DMA_TO_DEVICE);
                if (tx_buf->skb)
                        dev_kfree_skb_any(tx_buf->skb);
 
@@ -5601,7 +5615,7 @@ static int mvpp2_txq_init(struct mvpp2_port *port,
 
                txq_pcpu->tso_headers =
                        dma_alloc_coherent(port->dev->dev.parent,
-                                          MVPP2_AGGR_TXQ_SIZE * TSO_HEADER_SIZE,
+                                          txq_pcpu->size * TSO_HEADER_SIZE,
                                           &txq_pcpu->tso_headers_dma,
                                           GFP_KERNEL);
                if (!txq_pcpu->tso_headers)
@@ -5615,7 +5629,7 @@ cleanup:
                kfree(txq_pcpu->buffs);
 
                dma_free_coherent(port->dev->dev.parent,
-                                 MVPP2_AGGR_TXQ_SIZE * MVPP2_DESC_ALIGNED_SIZE,
+                                 txq_pcpu->size * TSO_HEADER_SIZE,
                                  txq_pcpu->tso_headers,
                                  txq_pcpu->tso_headers_dma);
        }
@@ -5639,7 +5653,7 @@ static void mvpp2_txq_deinit(struct mvpp2_port *port,
                kfree(txq_pcpu->buffs);
 
                dma_free_coherent(port->dev->dev.parent,
-                                 MVPP2_AGGR_TXQ_SIZE * MVPP2_DESC_ALIGNED_SIZE,
+                                 txq_pcpu->size * TSO_HEADER_SIZE,
                                  txq_pcpu->tso_headers,
                                  txq_pcpu->tso_headers_dma);
        }
@@ -6204,12 +6218,15 @@ static inline void
 tx_desc_unmap_put(struct mvpp2_port *port, struct mvpp2_tx_queue *txq,
                  struct mvpp2_tx_desc *desc)
 {
+       struct mvpp2_txq_pcpu *txq_pcpu = this_cpu_ptr(txq->pcpu);
+
        dma_addr_t buf_dma_addr =
                mvpp2_txdesc_dma_addr_get(port, desc);
        size_t buf_sz =
                mvpp2_txdesc_size_get(port, desc);
-       dma_unmap_single(port->dev->dev.parent, buf_dma_addr,
-                        buf_sz, DMA_TO_DEVICE);
+       if (!IS_TSO_HEADER(txq_pcpu, buf_dma_addr))
+               dma_unmap_single(port->dev->dev.parent, buf_dma_addr,
+                                buf_sz, DMA_TO_DEVICE);
        mvpp2_txq_desc_put(txq);
 }
 
@@ -6482,7 +6499,7 @@ out:
        }
 
        /* Finalize TX processing */
-       if (txq_pcpu->count >= txq->done_pkts_coal)
+       if (!port->has_tx_irqs && txq_pcpu->count >= txq->done_pkts_coal)
                mvpp2_txq_done(port, txq, txq_pcpu);
 
        /* Set the timer in case not all frags were processed */
@@ -7496,7 +7513,7 @@ static void mvpp2_port_copy_mac_addr(struct net_device *dev, struct mvpp2 *priv,
 /* Ports initialization */
 static int mvpp2_port_probe(struct platform_device *pdev,
                            struct device_node *port_node,
-                           struct mvpp2 *priv)
+                           struct mvpp2 *priv, int index)
 {
        struct device_node *phy_node;
        struct phy *comphy;
@@ -7670,7 +7687,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
        }
        netdev_info(dev, "Using %s mac address %pM\n", mac_from, dev->dev_addr);
 
-       priv->port_list[id] = port;
+       priv->port_list[index] = port;
        return 0;
 
 err_free_port_pcpu:
@@ -7963,6 +7980,18 @@ static int mvpp2_probe(struct platform_device *pdev)
                err = clk_prepare_enable(priv->mg_clk);
                if (err < 0)
                        goto err_gop_clk;
+
+               priv->axi_clk = devm_clk_get(&pdev->dev, "axi_clk");
+               if (IS_ERR(priv->axi_clk)) {
+                       err = PTR_ERR(priv->axi_clk);
+                       if (err == -EPROBE_DEFER)
+                               goto err_gop_clk;
+                       priv->axi_clk = NULL;
+               } else {
+                       err = clk_prepare_enable(priv->axi_clk);
+                       if (err < 0)
+                               goto err_gop_clk;
+               }
        }
 
        /* Get system's tclk rate */
@@ -8005,16 +8034,19 @@ static int mvpp2_probe(struct platform_device *pdev)
        }
 
        /* Initialize ports */
+       i = 0;
        for_each_available_child_of_node(dn, port_node) {
-               err = mvpp2_port_probe(pdev, port_node, priv);
+               err = mvpp2_port_probe(pdev, port_node, priv, i);
                if (err < 0)
                        goto err_mg_clk;
+               i++;
        }
 
        platform_set_drvdata(pdev, priv);
        return 0;
 
 err_mg_clk:
+       clk_disable_unprepare(priv->axi_clk);
        if (priv->hw_version == MVPP22)
                clk_disable_unprepare(priv->mg_clk);
 err_gop_clk:
@@ -8052,6 +8084,7 @@ static int mvpp2_remove(struct platform_device *pdev)
                                  aggr_txq->descs_dma);
        }
 
+       clk_disable_unprepare(priv->axi_clk);
        clk_disable_unprepare(priv->mg_clk);
        clk_disable_unprepare(priv->pp_clk);
        clk_disable_unprepare(priv->gop_clk);
index 3ea151ff9c432ef9b693e26056c40ce083bca5ea..6fa7b6a34c083e81b4ffba009946650111ed805b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for the new Marvell Yukon / SysKonnect driver.
  */
index 0fe1607968428db0b759dfb0c1be1c82afa1382d..b02b6523083ce988f743bac543c595d776fe908e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for the new Marvell Yukon 2 driver.
  */
index c82217e0d22d557d6ae3da0907e3b2cd5a08cf36..16b10d01fcf4bc826fc5d8c7d522cb32c38ab8d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MLX4_CORE)                += mlx4_core.o
 
 mlx4_core-y := alloc.o catas.o cmd.o cq.o eq.o fw.o fw_qos.o icm.o intf.o \
index 926f3c3f3665c5d28fe5d35c41afaa0e5917c007..aab28eb27a30dc75714eedb58e86c16f7a501ea2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MLX4_STATS_
 #define _MLX4_STATS_
 
index 87a3099808f3d4ebc5d684e847359d1827379e25..714dd0dc5eeff1a3e5ed1dc81639964a4514f1be 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MLX5_CORE)                += mlx5_core.o
 subdir-ccflags-y += -I$(src)
 
index ff60cf7342ca5a4170a477ad7fff0ead65cf5df8..fc281712869b2e1c5c3321b46d1e8c5c562fcb74 100644 (file)
@@ -77,35 +77,41 @@ static void add_delayed_event(struct mlx5_priv *priv,
        list_add_tail(&delayed_event->list, &priv->waiting_events_list);
 }
 
-static void fire_delayed_event_locked(struct mlx5_device_context *dev_ctx,
-                                     struct mlx5_core_dev *dev,
-                                     struct mlx5_priv *priv)
+static void delayed_event_release(struct mlx5_device_context *dev_ctx,
+                                 struct mlx5_priv *priv)
 {
+       struct mlx5_core_dev *dev = container_of(priv, struct mlx5_core_dev, priv);
        struct mlx5_delayed_event *de;
        struct mlx5_delayed_event *n;
+       struct list_head temp;
 
-       /* stop delaying events */
-       priv->is_accum_events = false;
+       INIT_LIST_HEAD(&temp);
+
+       spin_lock_irq(&priv->ctx_lock);
 
-       /* fire all accumulated events before new event comes */
-       list_for_each_entry_safe(de, n, &priv->waiting_events_list, list) {
+       priv->is_accum_events = false;
+       list_splice_init(&priv->waiting_events_list, &temp);
+       if (!dev_ctx->context)
+               goto out;
+       list_for_each_entry_safe(de, n, &priv->waiting_events_list, list)
                dev_ctx->intf->event(dev, dev_ctx->context, de->event, de->param);
+
+out:
+       spin_unlock_irq(&priv->ctx_lock);
+
+       list_for_each_entry_safe(de, n, &temp, list) {
                list_del(&de->list);
                kfree(de);
        }
 }
 
-static void cleanup_delayed_evets(struct mlx5_priv *priv)
+/* accumulating events that can come after mlx5_ib calls to
+ * ib_register_device, till adding that interface to the events list.
+ */
+static void delayed_event_start(struct mlx5_priv *priv)
 {
-       struct mlx5_delayed_event *de;
-       struct mlx5_delayed_event *n;
-
        spin_lock_irq(&priv->ctx_lock);
-       priv->is_accum_events = false;
-       list_for_each_entry_safe(de, n, &priv->waiting_events_list, list) {
-               list_del(&de->list);
-               kfree(de);
-       }
+       priv->is_accum_events = true;
        spin_unlock_irq(&priv->ctx_lock);
 }
 
@@ -122,11 +128,8 @@ void mlx5_add_device(struct mlx5_interface *intf, struct mlx5_priv *priv)
                return;
 
        dev_ctx->intf = intf;
-       /* accumulating events that can come after mlx5_ib calls to
-        * ib_register_device, till adding that interface to the events list.
-        */
 
-       priv->is_accum_events = true;
+       delayed_event_start(priv);
 
        dev_ctx->context = intf->add(dev);
        set_bit(MLX5_INTERFACE_ADDED, &dev_ctx->state);
@@ -137,8 +140,6 @@ void mlx5_add_device(struct mlx5_interface *intf, struct mlx5_priv *priv)
                spin_lock_irq(&priv->ctx_lock);
                list_add_tail(&dev_ctx->list, &priv->ctx_list);
 
-               fire_delayed_event_locked(dev_ctx, dev, priv);
-
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
                if (dev_ctx->intf->pfault) {
                        if (priv->pfault) {
@@ -150,11 +151,12 @@ void mlx5_add_device(struct mlx5_interface *intf, struct mlx5_priv *priv)
                }
 #endif
                spin_unlock_irq(&priv->ctx_lock);
-       } else {
-               kfree(dev_ctx);
-                /* delete all accumulated events */
-               cleanup_delayed_evets(priv);
        }
+
+       delayed_event_release(dev_ctx, priv);
+
+       if (!dev_ctx->context)
+               kfree(dev_ctx);
 }
 
 static struct mlx5_device_context *mlx5_get_device(struct mlx5_interface *intf,
@@ -205,17 +207,21 @@ static void mlx5_attach_interface(struct mlx5_interface *intf, struct mlx5_priv
        if (!dev_ctx)
                return;
 
+       delayed_event_start(priv);
        if (intf->attach) {
                if (test_bit(MLX5_INTERFACE_ATTACHED, &dev_ctx->state))
-                       return;
+                       goto out;
                intf->attach(dev, dev_ctx->context);
                set_bit(MLX5_INTERFACE_ATTACHED, &dev_ctx->state);
        } else {
                if (test_bit(MLX5_INTERFACE_ADDED, &dev_ctx->state))
-                       return;
+                       goto out;
                dev_ctx->context = intf->add(dev);
                set_bit(MLX5_INTERFACE_ADDED, &dev_ctx->state);
        }
+
+out:
+       delayed_event_release(dev_ctx, priv);
 }
 
 void mlx5_attach_device(struct mlx5_core_dev *dev)
@@ -414,8 +420,14 @@ void mlx5_core_event(struct mlx5_core_dev *dev, enum mlx5_dev_event event,
        if (priv->is_accum_events)
                add_delayed_event(priv, dev, event, param);
 
+       /* After mlx5_detach_device, the dev_ctx->intf is still set and dev_ctx is
+        * still in priv->ctx_list. In this case, only notify the dev_ctx if its
+        * ADDED or ATTACHED bit are set.
+        */
        list_for_each_entry(dev_ctx, &priv->ctx_list, list)
-               if (dev_ctx->intf->event)
+               if (dev_ctx->intf->event &&
+                   (test_bit(MLX5_INTERFACE_ADDED, &dev_ctx->state) ||
+                    test_bit(MLX5_INTERFACE_ATTACHED, &dev_ctx->state)))
                        dev_ctx->intf->event(dev, dev_ctx->context, event, param);
 
        spin_unlock_irqrestore(&priv->ctx_lock, flags);
index 1e3a6c3e41323d02bf787bb559741bc2a16a678a..80eef4163f52e61d7f511cdd1aaba9dd6898fcd8 100644 (file)
@@ -139,7 +139,7 @@ TRACE_EVENT(mlx5_fs_del_fg,
        {MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO, "NEXT_PRIO"}
 
 TRACE_EVENT(mlx5_fs_set_fte,
-           TP_PROTO(const struct fs_fte *fte, bool new_fte),
+           TP_PROTO(const struct fs_fte *fte, int new_fte),
            TP_ARGS(fte, new_fte),
            TP_STRUCT__entry(
                __field(const struct fs_fte *, fte)
@@ -149,7 +149,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
                __field(u32, action)
                __field(u32, flow_tag)
                __field(u8,  mask_enable)
-               __field(bool, new_fte)
+               __field(int, new_fte)
                __array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
                __array(u32, mask_inner, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
                __array(u32, mask_misc, MLX5_ST_SZ_DW(fte_match_set_misc))
index c1d384fca4dc1195a1d0b76677176b7dfcbad538..51c4cc00a186589734121efc796f2606c0e2c3fe 100644 (file)
 #define MLX5E_CEE_STATE_UP    1
 #define MLX5E_CEE_STATE_DOWN  0
 
+enum {
+       MLX5E_VENDOR_TC_GROUP_NUM = 7,
+       MLX5E_LOWEST_PRIO_GROUP   = 0,
+};
+
 /* If dcbx mode is non-host set the dcbx mode to host.
  */
 static int mlx5e_dcbnl_set_dcbx_mode(struct mlx5e_priv *priv,
@@ -85,6 +90,9 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
 {
        struct mlx5e_priv *priv = netdev_priv(netdev);
        struct mlx5_core_dev *mdev = priv->mdev;
+       u8 tc_group[IEEE_8021QAZ_MAX_TCS];
+       bool is_tc_group_6_exist = false;
+       bool is_zero_bw_ets_tc = false;
        int err = 0;
        int i;
 
@@ -96,37 +104,64 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
                err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
                if (err)
                        return err;
-       }
 
-       for (i = 0; i < ets->ets_cap; i++) {
+               err = mlx5_query_port_tc_group(mdev, i, &tc_group[i]);
+               if (err)
+                       return err;
+
                err = mlx5_query_port_tc_bw_alloc(mdev, i, &ets->tc_tx_bw[i]);
                if (err)
                        return err;
+
+               if (ets->tc_tx_bw[i] < MLX5E_MAX_BW_ALLOC &&
+                   tc_group[i] == (MLX5E_LOWEST_PRIO_GROUP + 1))
+                       is_zero_bw_ets_tc = true;
+
+               if (tc_group[i] == (MLX5E_VENDOR_TC_GROUP_NUM - 1))
+                       is_tc_group_6_exist = true;
+       }
+
+       /* Report 0% ets tc if exits*/
+       if (is_zero_bw_ets_tc) {
+               for (i = 0; i < ets->ets_cap; i++)
+                       if (tc_group[i] == MLX5E_LOWEST_PRIO_GROUP)
+                               ets->tc_tx_bw[i] = 0;
+       }
+
+       /* Update tc_tsa based on fw setting*/
+       for (i = 0; i < ets->ets_cap; i++) {
                if (ets->tc_tx_bw[i] < MLX5E_MAX_BW_ALLOC)
                        priv->dcbx.tc_tsa[i] = IEEE_8021QAZ_TSA_ETS;
+               else if (tc_group[i] == MLX5E_VENDOR_TC_GROUP_NUM &&
+                        !is_tc_group_6_exist)
+                       priv->dcbx.tc_tsa[i] = IEEE_8021QAZ_TSA_VENDOR;
        }
-
        memcpy(ets->tc_tsa, priv->dcbx.tc_tsa, sizeof(ets->tc_tsa));
 
        return err;
 }
 
-enum {
-       MLX5E_VENDOR_TC_GROUP_NUM = 7,
-       MLX5E_ETS_TC_GROUP_NUM    = 0,
-};
-
 static void mlx5e_build_tc_group(struct ieee_ets *ets, u8 *tc_group, int max_tc)
 {
        bool any_tc_mapped_to_ets = false;
+       bool ets_zero_bw = false;
        int strict_group;
        int i;
 
-       for (i = 0; i <= max_tc; i++)
-               if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS)
+       for (i = 0; i <= max_tc; i++) {
+               if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
                        any_tc_mapped_to_ets = true;
+                       if (!ets->tc_tx_bw[i])
+                               ets_zero_bw = true;
+               }
+       }
 
-       strict_group = any_tc_mapped_to_ets ? 1 : 0;
+       /* strict group has higher priority than ets group */
+       strict_group = MLX5E_LOWEST_PRIO_GROUP;
+       if (any_tc_mapped_to_ets)
+               strict_group++;
+       if (ets_zero_bw)
+               strict_group++;
 
        for (i = 0; i <= max_tc; i++) {
                switch (ets->tc_tsa[i]) {
@@ -137,7 +172,9 @@ static void mlx5e_build_tc_group(struct ieee_ets *ets, u8 *tc_group, int max_tc)
                        tc_group[i] = strict_group++;
                        break;
                case IEEE_8021QAZ_TSA_ETS:
-                       tc_group[i] = MLX5E_ETS_TC_GROUP_NUM;
+                       tc_group[i] = MLX5E_LOWEST_PRIO_GROUP;
+                       if (ets->tc_tx_bw[i] && ets_zero_bw)
+                               tc_group[i] = MLX5E_LOWEST_PRIO_GROUP + 1;
                        break;
                }
        }
@@ -146,8 +183,22 @@ static void mlx5e_build_tc_group(struct ieee_ets *ets, u8 *tc_group, int max_tc)
 static void mlx5e_build_tc_tx_bw(struct ieee_ets *ets, u8 *tc_tx_bw,
                                 u8 *tc_group, int max_tc)
 {
+       int bw_for_ets_zero_bw_tc = 0;
+       int last_ets_zero_bw_tc = -1;
+       int num_ets_zero_bw = 0;
        int i;
 
+       for (i = 0; i <= max_tc; i++) {
+               if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS &&
+                   !ets->tc_tx_bw[i]) {
+                       num_ets_zero_bw++;
+                       last_ets_zero_bw_tc = i;
+               }
+       }
+
+       if (num_ets_zero_bw)
+               bw_for_ets_zero_bw_tc = MLX5E_MAX_BW_ALLOC / num_ets_zero_bw;
+
        for (i = 0; i <= max_tc; i++) {
                switch (ets->tc_tsa[i]) {
                case IEEE_8021QAZ_TSA_VENDOR:
@@ -157,12 +208,26 @@ static void mlx5e_build_tc_tx_bw(struct ieee_ets *ets, u8 *tc_tx_bw,
                        tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
                        break;
                case IEEE_8021QAZ_TSA_ETS:
-                       tc_tx_bw[i] = ets->tc_tx_bw[i];
+                       tc_tx_bw[i] = ets->tc_tx_bw[i] ?
+                                     ets->tc_tx_bw[i] :
+                                     bw_for_ets_zero_bw_tc;
                        break;
                }
        }
+
+       /* Make sure the total bw for ets zero bw group is 100% */
+       if (last_ets_zero_bw_tc != -1)
+               tc_tx_bw[last_ets_zero_bw_tc] +=
+                       MLX5E_MAX_BW_ALLOC % num_ets_zero_bw;
 }
 
+/* If there are ETS BW 0,
+ *   Set ETS group # to 1 for all ETS non zero BW tcs. Their sum must be 100%.
+ *   Set group #0 to all the ETS BW 0 tcs and
+ *     equally splits the 100% BW between them
+ *   Report both group #0 and #1 as ETS type.
+ *     All the tcs in group #0 will be reported with 0% BW.
+ */
 int mlx5e_dcbnl_ieee_setets_core(struct mlx5e_priv *priv, struct ieee_ets *ets)
 {
        struct mlx5_core_dev *mdev = priv->mdev;
@@ -188,7 +253,6 @@ int mlx5e_dcbnl_ieee_setets_core(struct mlx5e_priv *priv, struct ieee_ets *ets)
                return err;
 
        memcpy(priv->dcbx.tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa));
-
        return err;
 }
 
@@ -209,17 +273,9 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
        }
 
        /* Validate Bandwidth Sum */
-       for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
-               if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
-                       if (!ets->tc_tx_bw[i]) {
-                               netdev_err(netdev,
-                                          "Failed to validate ETS: BW 0 is illegal\n");
-                               return -EINVAL;
-                       }
-
+       for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++)
+               if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS)
                        bw_sum += ets->tc_tx_bw[i];
-               }
-       }
 
        if (bw_sum != 0 && bw_sum != 100) {
                netdev_err(netdev,
@@ -533,8 +589,7 @@ static void mlx5e_dcbnl_getpgtccfgtx(struct net_device *netdev,
 static void mlx5e_dcbnl_getpgbwgcfgtx(struct net_device *netdev,
                                      int pgid, u8 *bw_pct)
 {
-       struct mlx5e_priv *priv = netdev_priv(netdev);
-       struct mlx5_core_dev *mdev = priv->mdev;
+       struct ieee_ets ets;
 
        if (pgid >= CEE_DCBX_MAX_PGS) {
                netdev_err(netdev,
@@ -542,8 +597,8 @@ static void mlx5e_dcbnl_getpgbwgcfgtx(struct net_device *netdev,
                return;
        }
 
-       if (mlx5_query_port_tc_bw_alloc(mdev, pgid, bw_pct))
-               *bw_pct = 0;
+       mlx5e_dcbnl_ieee_getets(netdev, &ets);
+       *bw_pct = ets.tc_tx_bw[pgid];
 }
 
 static void mlx5e_dcbnl_setpfccfg(struct net_device *netdev,
@@ -739,8 +794,6 @@ static void mlx5e_ets_init(struct mlx5e_priv *priv)
                ets.prio_tc[i] = i;
        }
 
-       memcpy(priv->dcbx.tc_tsa, ets.tc_tsa, sizeof(ets.tc_tsa));
-
        /* tclass[prio=0]=1, tclass[prio=1]=0, tclass[prio=i]=i (for i>1) */
        ets.prio_tc[0] = 1;
        ets.prio_tc[1] = 0;
index f11fd07ac4dd17e7c916b12736a6b9823284f062..850cdc980ab5a5e9d21b85d50c6386def3c173bb 100644 (file)
@@ -291,7 +291,7 @@ void mlx5e_enable_vlan_filter(struct mlx5e_priv *priv)
        priv->fs.vlan.filter_disabled = false;
        if (priv->netdev->flags & IFF_PROMISC)
                return;
-       mlx5e_del_any_vid_rules(priv);
+       mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0);
 }
 
 void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv)
@@ -302,7 +302,7 @@ void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv)
        priv->fs.vlan.filter_disabled = true;
        if (priv->netdev->flags & IFF_PROMISC)
                return;
-       mlx5e_add_any_vid_rules(priv);
+       mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0);
 }
 
 int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto,
index dfc29720ab77475ef421067a44bb679ef94e24f3..cc11bbbd0309d465819abe501859da971239cb0f 100644 (file)
@@ -184,7 +184,6 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
        struct mlx5e_sw_stats temp, *s = &temp;
        struct mlx5e_rq_stats *rq_stats;
        struct mlx5e_sq_stats *sq_stats;
-       u64 tx_offload_none = 0;
        int i, j;
 
        memset(s, 0, sizeof(*s));
@@ -199,6 +198,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
                s->rx_lro_bytes += rq_stats->lro_bytes;
                s->rx_csum_none += rq_stats->csum_none;
                s->rx_csum_complete += rq_stats->csum_complete;
+               s->rx_csum_unnecessary += rq_stats->csum_unnecessary;
                s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner;
                s->rx_xdp_drop += rq_stats->xdp_drop;
                s->rx_xdp_tx += rq_stats->xdp_tx;
@@ -229,14 +229,11 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
                        s->tx_queue_dropped     += sq_stats->dropped;
                        s->tx_xmit_more         += sq_stats->xmit_more;
                        s->tx_csum_partial_inner += sq_stats->csum_partial_inner;
-                       tx_offload_none         += sq_stats->csum_none;
+                       s->tx_csum_none         += sq_stats->csum_none;
+                       s->tx_csum_partial      += sq_stats->csum_partial;
                }
        }
 
-       /* Update calculated offload counters */
-       s->tx_csum_partial = s->tx_packets - tx_offload_none - s->tx_csum_partial_inner;
-       s->rx_csum_unnecessary = s->rx_packets - s->rx_csum_none - s->rx_csum_complete;
-
        s->link_down_events_phy = MLX5_GET(ppcnt_reg,
                                priv->stats.pport.phy_counters,
                                counter_set.phys_layer_cntrs.link_down_events);
@@ -3333,8 +3330,8 @@ static int mlx5e_handle_feature(struct net_device *netdev,
 
        err = feature_handler(netdev, enable);
        if (err) {
-               netdev_err(netdev, "%s feature 0x%llx failed err %d\n",
-                          enable ? "Enable" : "Disable", feature, err);
+               netdev_err(netdev, "%s feature %pNF failed, err %d\n",
+                          enable ? "Enable" : "Disable", &feature, err);
                return err;
        }
 
index f1dd638384d38348d10fc02eacf6ea188038f381..15a1687483cc5f6ed9b2943152ae1f54f9283617 100644 (file)
@@ -627,6 +627,7 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
 
        if (lro) {
                skb->ip_summed = CHECKSUM_UNNECESSARY;
+               rq->stats.csum_unnecessary++;
                return;
        }
 
@@ -644,7 +645,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
                        skb->csum_level = 1;
                        skb->encapsulation = 1;
                        rq->stats.csum_unnecessary_inner++;
+                       return;
                }
+               rq->stats.csum_unnecessary++;
                return;
        }
 csum_none:
index 6d199ffb1c0b54802542d8ee92ddaa066ecf209c..f8637213afc0f78b826c67b3fc7608c7079da4c7 100644 (file)
@@ -68,6 +68,7 @@ struct mlx5e_sw_stats {
        u64 rx_xdp_drop;
        u64 rx_xdp_tx;
        u64 rx_xdp_tx_full;
+       u64 tx_csum_none;
        u64 tx_csum_partial;
        u64 tx_csum_partial_inner;
        u64 tx_queue_stopped;
@@ -108,6 +109,7 @@ static const struct counter_desc sw_stats_desc[] = {
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx_full) },
+       { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_none) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial_inner) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_queue_stopped) },
@@ -339,6 +341,7 @@ struct mlx5e_rq_stats {
        u64 packets;
        u64 bytes;
        u64 csum_complete;
+       u64 csum_unnecessary;
        u64 csum_unnecessary_inner;
        u64 csum_none;
        u64 lro_packets;
@@ -363,6 +366,7 @@ static const struct counter_desc rq_stats_desc[] = {
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, packets) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, bytes) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete) },
+       { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary_inner) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_none) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_drop) },
@@ -392,6 +396,7 @@ struct mlx5e_sq_stats {
        u64 tso_bytes;
        u64 tso_inner_packets;
        u64 tso_inner_bytes;
+       u64 csum_partial;
        u64 csum_partial_inner;
        u64 nop;
        /* less likely accessed in data path */
@@ -408,6 +413,7 @@ static const struct counter_desc sq_stats_desc[] = {
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_bytes) },
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_packets) },
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_bytes) },
+       { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial) },
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial_inner) },
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, nop) },
        { MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_none) },
index da503e6411da07374f3250d450fd131c64c63c88..9ba1f72060aae4c57a55c9d7a4c049e1a6f8a69b 100644 (file)
@@ -78,9 +78,11 @@ struct mlx5e_tc_flow {
 };
 
 struct mlx5e_tc_flow_parse_attr {
+       struct ip_tunnel_info tun_info;
        struct mlx5_flow_spec spec;
        int num_mod_hdr_actions;
        void *mod_hdr_actions;
+       int mirred_ifindex;
 };
 
 enum {
@@ -322,6 +324,12 @@ static void mlx5e_tc_del_nic_flow(struct mlx5e_priv *priv,
 static void mlx5e_detach_encap(struct mlx5e_priv *priv,
                               struct mlx5e_tc_flow *flow);
 
+static int mlx5e_attach_encap(struct mlx5e_priv *priv,
+                             struct ip_tunnel_info *tun_info,
+                             struct net_device *mirred_dev,
+                             struct net_device **encap_dev,
+                             struct mlx5e_tc_flow *flow);
+
 static struct mlx5_flow_handle *
 mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
                      struct mlx5e_tc_flow_parse_attr *parse_attr,
@@ -329,9 +337,27 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
 {
        struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
        struct mlx5_esw_flow_attr *attr = flow->esw_attr;
-       struct mlx5_flow_handle *rule;
+       struct net_device *out_dev, *encap_dev = NULL;
+       struct mlx5_flow_handle *rule = NULL;
+       struct mlx5e_rep_priv *rpriv;
+       struct mlx5e_priv *out_priv;
        int err;
 
+       if (attr->action & MLX5_FLOW_CONTEXT_ACTION_ENCAP) {
+               out_dev = __dev_get_by_index(dev_net(priv->netdev),
+                                            attr->parse_attr->mirred_ifindex);
+               err = mlx5e_attach_encap(priv, &parse_attr->tun_info,
+                                        out_dev, &encap_dev, flow);
+               if (err) {
+                       rule = ERR_PTR(err);
+                       if (err != -EAGAIN)
+                               goto err_attach_encap;
+               }
+               out_priv = netdev_priv(encap_dev);
+               rpriv = out_priv->ppriv;
+               attr->out_rep = rpriv->rep;
+       }
+
        err = mlx5_eswitch_add_vlan_action(esw, attr);
        if (err) {
                rule = ERR_PTR(err);
@@ -347,10 +373,14 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
                }
        }
 
-       rule = mlx5_eswitch_add_offloaded_rule(esw, &parse_attr->spec, attr);
-       if (IS_ERR(rule))
-               goto err_add_rule;
-
+       /* we get here if (1) there's no error (rule being null) or when
+        * (2) there's an encap action and we're on -EAGAIN (no valid neigh)
+        */
+       if (rule != ERR_PTR(-EAGAIN)) {
+               rule = mlx5_eswitch_add_offloaded_rule(esw, &parse_attr->spec, attr);
+               if (IS_ERR(rule))
+                       goto err_add_rule;
+       }
        return rule;
 
 err_add_rule:
@@ -361,6 +391,7 @@ err_mod_hdr:
 err_add_vlan:
        if (attr->action & MLX5_FLOW_CONTEXT_ACTION_ENCAP)
                mlx5e_detach_encap(priv, flow);
+err_attach_encap:
        return rule;
 }
 
@@ -389,6 +420,8 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv,
 void mlx5e_tc_encap_flows_add(struct mlx5e_priv *priv,
                              struct mlx5e_encap_entry *e)
 {
+       struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
+       struct mlx5_esw_flow_attr *esw_attr;
        struct mlx5e_tc_flow *flow;
        int err;
 
@@ -404,10 +437,9 @@ void mlx5e_tc_encap_flows_add(struct mlx5e_priv *priv,
        mlx5e_rep_queue_neigh_stats_work(priv);
 
        list_for_each_entry(flow, &e->flows, encap) {
-               flow->esw_attr->encap_id = e->encap_id;
-               flow->rule = mlx5e_tc_add_fdb_flow(priv,
-                                                  flow->esw_attr->parse_attr,
-                                                  flow);
+               esw_attr = flow->esw_attr;
+               esw_attr->encap_id = e->encap_id;
+               flow->rule = mlx5_eswitch_add_offloaded_rule(esw, &esw_attr->parse_attr->spec, esw_attr);
                if (IS_ERR(flow->rule)) {
                        err = PTR_ERR(flow->rule);
                        mlx5_core_warn(priv->mdev, "Failed to update cached encapsulation flow, %d\n",
@@ -421,15 +453,13 @@ void mlx5e_tc_encap_flows_add(struct mlx5e_priv *priv,
 void mlx5e_tc_encap_flows_del(struct mlx5e_priv *priv,
                              struct mlx5e_encap_entry *e)
 {
+       struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
        struct mlx5e_tc_flow *flow;
-       struct mlx5_fc *counter;
 
        list_for_each_entry(flow, &e->flows, encap) {
                if (flow->flags & MLX5E_TC_FLOW_OFFLOADED) {
                        flow->flags &= ~MLX5E_TC_FLOW_OFFLOADED;
-                       counter = mlx5_flow_rule_counter(flow->rule);
-                       mlx5_del_flow_rules(flow->rule);
-                       mlx5_fc_destroy(priv->mdev, counter);
+                       mlx5_eswitch_del_offloaded_rule(esw, flow->rule, flow->esw_attr);
                }
        }
 
@@ -1317,6 +1347,69 @@ static bool csum_offload_supported(struct mlx5e_priv *priv, u32 action, u32 upda
        return true;
 }
 
+static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
+                                         struct tcf_exts *exts)
+{
+       const struct tc_action *a;
+       bool modify_ip_header;
+       LIST_HEAD(actions);
+       u8 htype, ip_proto;
+       void *headers_v;
+       u16 ethertype;
+       int nkeys, i;
+
+       headers_v = MLX5_ADDR_OF(fte_match_param, spec->match_value, outer_headers);
+       ethertype = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ethertype);
+
+       /* for non-IP we only re-write MACs, so we're okay */
+       if (ethertype != ETH_P_IP && ethertype != ETH_P_IPV6)
+               goto out_ok;
+
+       modify_ip_header = false;
+       tcf_exts_to_list(exts, &actions);
+       list_for_each_entry(a, &actions, list) {
+               if (!is_tcf_pedit(a))
+                       continue;
+
+               nkeys = tcf_pedit_nkeys(a);
+               for (i = 0; i < nkeys; i++) {
+                       htype = tcf_pedit_htype(a, i);
+                       if (htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 ||
+                           htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP6) {
+                               modify_ip_header = true;
+                               break;
+                       }
+               }
+       }
+
+       ip_proto = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ip_protocol);
+       if (modify_ip_header && ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) {
+               pr_info("can't offload re-write of ip proto %d\n", ip_proto);
+               return false;
+       }
+
+out_ok:
+       return true;
+}
+
+static bool actions_match_supported(struct mlx5e_priv *priv,
+                                   struct tcf_exts *exts,
+                                   struct mlx5e_tc_flow_parse_attr *parse_attr,
+                                   struct mlx5e_tc_flow *flow)
+{
+       u32 actions;
+
+       if (flow->flags & MLX5E_TC_FLOW_ESWITCH)
+               actions = flow->esw_attr->action;
+       else
+               actions = flow->nic_attr->action;
+
+       if (actions & MLX5_FLOW_CONTEXT_ACTION_MOD_HDR)
+               return modify_header_match_supported(&parse_attr->spec, exts);
+
+       return true;
+}
+
 static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
                                struct mlx5e_tc_flow_parse_attr *parse_attr,
                                struct mlx5e_tc_flow *flow)
@@ -1378,6 +1471,9 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
                return -EINVAL;
        }
 
+       if (!actions_match_supported(priv, exts, parse_attr, flow))
+               return -EOPNOTSUPP;
+
        return 0;
 }
 
@@ -1564,7 +1660,7 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
                break;
        default:
                err = -EOPNOTSUPP;
-               goto out;
+               goto free_encap;
        }
        fl4.flowi4_tos = tun_key->tos;
        fl4.daddr = tun_key->u.ipv4.dst;
@@ -1573,7 +1669,7 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
        err = mlx5e_route_lookup_ipv4(priv, mirred_dev, &out_dev,
                                      &fl4, &n, &ttl);
        if (err)
-               goto out;
+               goto free_encap;
 
        /* used by mlx5e_detach_encap to lookup a neigh hash table
         * entry in the neigh hash table when a user deletes a rule
@@ -1590,7 +1686,7 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
         */
        err = mlx5e_rep_encap_entry_attach(netdev_priv(out_dev), e);
        if (err)
-               goto out;
+               goto free_encap;
 
        read_lock_bh(&n->lock);
        nud_state = n->nud_state;
@@ -1630,8 +1726,9 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
 
 destroy_neigh_entry:
        mlx5e_rep_encap_entry_detach(netdev_priv(e->out_dev), e);
-out:
+free_encap:
        kfree(encap_header);
+out:
        if (n)
                neigh_release(n);
        return err;
@@ -1668,7 +1765,7 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
                break;
        default:
                err = -EOPNOTSUPP;
-               goto out;
+               goto free_encap;
        }
 
        fl6.flowlabel = ip6_make_flowinfo(RT_TOS(tun_key->tos), tun_key->label);
@@ -1678,7 +1775,7 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
        err = mlx5e_route_lookup_ipv6(priv, mirred_dev, &out_dev,
                                      &fl6, &n, &ttl);
        if (err)
-               goto out;
+               goto free_encap;
 
        /* used by mlx5e_detach_encap to lookup a neigh hash table
         * entry in the neigh hash table when a user deletes a rule
@@ -1695,7 +1792,7 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
         */
        err = mlx5e_rep_encap_entry_attach(netdev_priv(out_dev), e);
        if (err)
-               goto out;
+               goto free_encap;
 
        read_lock_bh(&n->lock);
        nud_state = n->nud_state;
@@ -1736,8 +1833,9 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
 
 destroy_neigh_entry:
        mlx5e_rep_encap_entry_detach(netdev_priv(e->out_dev), e);
-out:
+free_encap:
        kfree(encap_header);
+out:
        if (n)
                neigh_release(n);
        return err;
@@ -1791,6 +1889,7 @@ vxlan_encap_offload_err:
                }
        }
 
+       /* must verify if encap is valid or not */
        if (found)
                goto attach_flow;
 
@@ -1817,6 +1916,8 @@ attach_flow:
        *encap_dev = e->out_dev;
        if (e->flags & MLX5_ENCAP_ENTRY_VALID)
                attr->encap_id = e->encap_id;
+       else
+               err = -EAGAIN;
 
        return err;
 
@@ -1871,7 +1972,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
 
                if (is_tcf_mirred_egress_redirect(a)) {
                        int ifindex = tcf_mirred_ifindex(a);
-                       struct net_device *out_dev, *encap_dev = NULL;
+                       struct net_device *out_dev;
                        struct mlx5e_priv *out_priv;
 
                        out_dev = __dev_get_by_index(dev_net(priv->netdev), ifindex);
@@ -1884,17 +1985,13 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
                                rpriv = out_priv->ppriv;
                                attr->out_rep = rpriv->rep;
                        } else if (encap) {
-                               err = mlx5e_attach_encap(priv, info,
-                                                        out_dev, &encap_dev, flow);
-                               if (err && err != -EAGAIN)
-                                       return err;
+                               parse_attr->mirred_ifindex = ifindex;
+                               parse_attr->tun_info = *info;
+                               attr->parse_attr = parse_attr;
                                attr->action |= MLX5_FLOW_CONTEXT_ACTION_ENCAP |
                                        MLX5_FLOW_CONTEXT_ACTION_FWD_DEST |
                                        MLX5_FLOW_CONTEXT_ACTION_COUNT;
-                               out_priv = netdev_priv(encap_dev);
-                               rpriv = out_priv->ppriv;
-                               attr->out_rep = rpriv->rep;
-                               attr->parse_attr = parse_attr;
+                               /* attr->out_rep is resolved when we handle encap */
                        } else {
                                pr_err("devices %s %s not on same switch HW, can't offload forwarding\n",
                                       priv->netdev->name, out_dev->name);
@@ -1934,6 +2031,10 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
 
                return -EINVAL;
        }
+
+       if (!actions_match_supported(priv, exts, parse_attr, flow))
+               return -EOPNOTSUPP;
+
        return err;
 }
 
@@ -1972,7 +2073,7 @@ int mlx5e_configure_flower(struct mlx5e_priv *priv,
        if (flow->flags & MLX5E_TC_FLOW_ESWITCH) {
                err = parse_tc_fdb_actions(priv, f->exts, parse_attr, flow);
                if (err < 0)
-                       goto err_handle_encap_flow;
+                       goto err_free;
                flow->rule = mlx5e_tc_add_fdb_flow(priv, parse_attr, flow);
        } else {
                err = parse_tc_nic_actions(priv, f->exts, parse_attr, flow);
@@ -1983,10 +2084,13 @@ int mlx5e_configure_flower(struct mlx5e_priv *priv,
 
        if (IS_ERR(flow->rule)) {
                err = PTR_ERR(flow->rule);
-               goto err_free;
+               if (err != -EAGAIN)
+                       goto err_free;
        }
 
-       flow->flags |= MLX5E_TC_FLOW_OFFLOADED;
+       if (err != -EAGAIN)
+               flow->flags |= MLX5E_TC_FLOW_OFFLOADED;
+
        err = rhashtable_insert_fast(&tc->ht, &flow->node,
                                     tc->ht_params);
        if (err)
@@ -2000,16 +2104,6 @@ int mlx5e_configure_flower(struct mlx5e_priv *priv,
 err_del_rule:
        mlx5e_tc_del_flow(priv, flow);
 
-err_handle_encap_flow:
-       if (err == -EAGAIN) {
-               err = rhashtable_insert_fast(&tc->ht, &flow->node,
-                                            tc->ht_params);
-               if (err)
-                       mlx5e_tc_del_flow(priv, flow);
-               else
-                       return 0;
-       }
-
 err_free:
        kvfree(parse_attr);
        kfree(flow);
index fee43e40fa16a105de58981a40be26b320332090..1d6925d4369afd39df702da0c77177aa3888a6f3 100644 (file)
@@ -193,6 +193,7 @@ mlx5e_txwqe_build_eseg_csum(struct mlx5e_txqsq *sq, struct sk_buff *skb, struct
                        sq->stats.csum_partial_inner++;
                } else {
                        eseg->cs_flags |= MLX5_ETH_WQE_L4_CSUM;
+                       sq->stats.csum_partial++;
                }
        } else
                sq->stats.csum_none++;
index e37453d838dbb669c76c9506fb3afd3723788a85..c0fd2212e89087df103c30afd1cea321dca1cef3 100644 (file)
@@ -71,11 +71,11 @@ int mlx5_fpga_access_reg(struct mlx5_core_dev *dev, u8 size, u64 addr,
        return 0;
 }
 
-int mlx5_fpga_caps(struct mlx5_core_dev *dev, u32 *caps)
+int mlx5_fpga_caps(struct mlx5_core_dev *dev)
 {
        u32 in[MLX5_ST_SZ_DW(fpga_cap)] = {0};
 
-       return mlx5_core_access_reg(dev, in, sizeof(in), caps,
+       return mlx5_core_access_reg(dev, in, sizeof(in), dev->caps.fpga,
                                    MLX5_ST_SZ_BYTES(fpga_cap),
                                    MLX5_REG_FPGA_CAP, 0, 0);
 }
index 94bdfd47c3f094a167edc185468a3f8d10c1a1c0..d05233c9b4f6c0ecfccf3868de233165c043ef58 100644 (file)
@@ -65,7 +65,7 @@ struct mlx5_fpga_qp_counters {
        u64 rx_total_drop;
 };
 
-int mlx5_fpga_caps(struct mlx5_core_dev *dev, u32 *caps);
+int mlx5_fpga_caps(struct mlx5_core_dev *dev);
 int mlx5_fpga_query(struct mlx5_core_dev *dev, struct mlx5_fpga_query *query);
 int mlx5_fpga_ctrl_op(struct mlx5_core_dev *dev, u8 op);
 int mlx5_fpga_access_reg(struct mlx5_core_dev *dev, u8 size, u64 addr,
index 9034e9960a761fa7245cbfab9dd66cf0c434a522..dc8970346521d24c32e082fdff43b7e12937202f 100644 (file)
@@ -139,8 +139,7 @@ int mlx5_fpga_device_start(struct mlx5_core_dev *mdev)
        if (err)
                goto out;
 
-       err = mlx5_fpga_caps(fdev->mdev,
-                            fdev->mdev->caps.hca_cur[MLX5_CAP_FPGA]);
+       err = mlx5_fpga_caps(fdev->mdev);
        if (err)
                goto out;
 
index e0d0efd903bc9c4b4fe87f617e2bcd32ab54099c..36ecc2b2e1873a065a376d98a699b99ede01b062 100644 (file)
@@ -293,6 +293,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
        }
 
        if (fte->action & MLX5_FLOW_CONTEXT_ACTION_COUNT) {
+               int max_list_size = BIT(MLX5_CAP_FLOWTABLE_TYPE(dev,
+                                       log_max_flow_counter,
+                                       ft->type));
                int list_size = 0;
 
                list_for_each_entry(dst, &fte->node.children, node.list) {
@@ -305,12 +308,17 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
                        in_dests += MLX5_ST_SZ_BYTES(dest_format_struct);
                        list_size++;
                }
+               if (list_size > max_list_size) {
+                       err = -EINVAL;
+                       goto err_out;
+               }
 
                MLX5_SET(flow_context, in_flow_context, flow_counter_list_size,
                         list_size);
        }
 
        err = mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
+err_out:
        kvfree(in);
        return err;
 }
index 5509a752f98e7bebecb8fb870df59afda17d9a5a..48dd78975062c1c3db8d75e560a1a482931f6e3a 100644 (file)
@@ -52,6 +52,7 @@ enum fs_flow_table_type {
        FS_FT_FDB             = 0X4,
        FS_FT_SNIFFER_RX        = 0X5,
        FS_FT_SNIFFER_TX        = 0X6,
+       FS_FT_MAX_TYPE = FS_FT_SNIFFER_TX,
 };
 
 enum fs_flow_table_op_mod {
@@ -260,4 +261,14 @@ void mlx5_cleanup_fs(struct mlx5_core_dev *dev);
 #define fs_for_each_dst(pos, fte)                      \
        fs_list_for_each_entry(pos, &(fte)->node.children)
 
+#define MLX5_CAP_FLOWTABLE_TYPE(mdev, cap, type) (             \
+       (type == FS_FT_NIC_RX) ? MLX5_CAP_FLOWTABLE_NIC_RX(mdev, cap) :         \
+       (type == FS_FT_ESW_EGRESS_ACL) ? MLX5_CAP_ESW_EGRESS_ACL(mdev, cap) :           \
+       (type == FS_FT_ESW_INGRESS_ACL) ? MLX5_CAP_ESW_INGRESS_ACL(mdev, cap) :         \
+       (type == FS_FT_FDB) ? MLX5_CAP_ESW_FLOWTABLE_FDB(mdev, cap) :           \
+       (type == FS_FT_SNIFFER_RX) ? MLX5_CAP_FLOWTABLE_SNIFFER_RX(mdev, cap) :         \
+       (type == FS_FT_SNIFFER_TX) ? MLX5_CAP_FLOWTABLE_SNIFFER_TX(mdev, cap) :         \
+       (BUILD_BUG_ON_ZERO(FS_FT_SNIFFER_TX != FS_FT_MAX_TYPE))\
+       )
+
 #endif
index 8aea0a065e5636badb85c5a5f8d33c73bdac2502..db86e1506c8b67fa8849940c4adc958fb783ac92 100644 (file)
@@ -356,10 +356,11 @@ void mlx5_drain_health_wq(struct mlx5_core_dev *dev)
 void mlx5_drain_health_recovery(struct mlx5_core_dev *dev)
 {
        struct mlx5_core_health *health = &dev->priv.health;
+       unsigned long flags;
 
-       spin_lock(&health->wq_lock);
+       spin_lock_irqsave(&health->wq_lock, flags);
        set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags);
-       spin_unlock(&health->wq_lock);
+       spin_unlock_irqrestore(&health->wq_lock, flags);
        cancel_delayed_work_sync(&dev->priv.health.recover_work);
 }
 
index 85298051a3e4fcf74767196dcc6660114222b4cf..145e392ab84973b0fa632c8c09895069ab49865a 100644 (file)
@@ -572,12 +572,13 @@ void mlx5_rdma_netdev_free(struct net_device *netdev)
 {
        struct mlx5e_priv          *priv    = mlx5i_epriv(netdev);
        const struct mlx5e_profile *profile = priv->profile;
+       struct mlx5_core_dev       *mdev    = priv->mdev;
 
        mlx5e_detach_netdev(priv);
        profile->cleanup(priv);
        destroy_workqueue(priv->wq);
        free_netdev(netdev);
 
-       mlx5e_destroy_mdev_resources(priv->mdev);
+       mlx5e_destroy_mdev_resources(mdev);
 }
 EXPORT_SYMBOL(mlx5_rdma_netdev_free);
index 1975d4388d4f77d2380209ad6bd6bfd9733e402e..e07061f565d6432d1c6c88b78468e038f20572cc 100644 (file)
@@ -677,6 +677,27 @@ int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, u8 *tc_group)
 }
 EXPORT_SYMBOL_GPL(mlx5_set_port_tc_group);
 
+int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev,
+                            u8 tc, u8 *tc_group)
+{
+       u32 out[MLX5_ST_SZ_DW(qetc_reg)];
+       void *ets_tcn_conf;
+       int err;
+
+       err = mlx5_query_port_qetcr_reg(mdev, out, sizeof(out));
+       if (err)
+               return err;
+
+       ets_tcn_conf = MLX5_ADDR_OF(qetc_reg, out,
+                                   tc_configuration[tc]);
+
+       *tc_group = MLX5_GET(ets_tcn_config_reg, ets_tcn_conf,
+                            group);
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(mlx5_query_port_tc_group);
+
 int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *tc_bw)
 {
        u32 in[MLX5_ST_SZ_DW(qetc_reg)] = {0};
index 6c48e9959b65478759d3e50243ed5d90c3180076..2a8b529ce6dd176cbc29b9bb4b74cd1d1c48f671 100644 (file)
@@ -109,7 +109,7 @@ static int mlx5_device_enable_sriov(struct mlx5_core_dev *dev, int num_vfs)
                                mlx5_core_warn(dev,
                                               "failed to restore VF %d settings, err %d\n",
                                               vf, err);
-                       continue;
+                               continue;
                        }
                }
                mlx5_core_dbg(dev, "successfully enabled VF* %d\n", vf);
index 891ff418bb5edcf79996365e37a2d6757be52c46..9a5a1cc877b6d0d720e8c82203475be981db9075 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MLXSW_CORE)       += mlxsw_core.o
 mlxsw_core-objs                        := core.o core_acl_flex_keys.o \
                                   core_acl_flex_actions.o
index 9d5e7cf288bef2b1eb603843c7b57945918aeb72..f3315bc874adf8228f6277936c961d7afca95353 100644 (file)
@@ -96,6 +96,7 @@ struct mlxsw_core {
        const struct mlxsw_bus *bus;
        void *bus_priv;
        const struct mlxsw_bus_info *bus_info;
+       struct workqueue_struct *emad_wq;
        struct list_head rx_listener_list;
        struct list_head event_listener_list;
        struct {
@@ -465,7 +466,7 @@ static void mlxsw_emad_trans_timeout_schedule(struct mlxsw_reg_trans *trans)
 {
        unsigned long timeout = msecs_to_jiffies(MLXSW_EMAD_TIMEOUT_MS);
 
-       mlxsw_core_schedule_dw(&trans->timeout_dw, timeout);
+       queue_delayed_work(trans->core->emad_wq, &trans->timeout_dw, timeout);
 }
 
 static int mlxsw_emad_transmit(struct mlxsw_core *mlxsw_core,
@@ -587,12 +588,18 @@ static const struct mlxsw_listener mlxsw_emad_rx_listener =
 
 static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
 {
+       struct workqueue_struct *emad_wq;
        u64 tid;
        int err;
 
        if (!(mlxsw_core->bus->features & MLXSW_BUS_F_TXRX))
                return 0;
 
+       emad_wq = alloc_workqueue("mlxsw_core_emad", WQ_MEM_RECLAIM, 0);
+       if (!emad_wq)
+               return -ENOMEM;
+       mlxsw_core->emad_wq = emad_wq;
+
        /* Set the upper 32 bits of the transaction ID field to a random
         * number. This allows us to discard EMADs addressed to other
         * devices.
@@ -619,6 +626,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
 err_emad_trap_set:
        mlxsw_core_trap_unregister(mlxsw_core, &mlxsw_emad_rx_listener,
                                   mlxsw_core);
+       destroy_workqueue(mlxsw_core->emad_wq);
        return err;
 }
 
@@ -631,6 +639,7 @@ static void mlxsw_emad_fini(struct mlxsw_core *mlxsw_core)
        mlxsw_core->emad.use_emad = false;
        mlxsw_core_trap_unregister(mlxsw_core, &mlxsw_emad_rx_listener,
                                   mlxsw_core);
+       destroy_workqueue(mlxsw_core->emad_wq);
 }
 
 static struct sk_buff *mlxsw_emad_alloc(const struct mlxsw_core *mlxsw_core,
index 12c3a44491203824ef4eaa51acdee5b91dfdb194..c0dcfa05b0771589631e1c20fa68801622abb6c4 100644 (file)
@@ -294,7 +294,7 @@ mlxsw_i2c_write(struct device *dev, size_t in_mbox_size, u8 *in_mbox, int num,
                write_tran.len = MLXSW_I2C_ADDR_WIDTH + chunk_size;
                mlxsw_i2c_set_slave_addr(tran_buf, off);
                memcpy(&tran_buf[MLXSW_I2C_ADDR_BUF_SIZE], in_mbox +
-                      chunk_size * i, chunk_size);
+                      MLXSW_I2C_BLK_MAX * i, chunk_size);
 
                j = 0;
                end = jiffies + timeout;
index cc27c5de5a1dd83060508910a9e99b8353a7c2be..5acfbe5b8b9d2f51f49a403e04f9e75314e1df49 100644 (file)
@@ -5827,6 +5827,29 @@ MLXSW_ITEM32(reg, mtmp, mtr, 0x08, 30, 1);
  */
 MLXSW_ITEM32(reg, mtmp, max_temperature, 0x08, 0, 16);
 
+/* reg_mtmp_tee
+ * Temperature Event Enable.
+ * 0 - Do not generate event
+ * 1 - Generate event
+ * 2 - Generate single event
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, mtmp, tee, 0x0C, 30, 2);
+
+#define MLXSW_REG_MTMP_THRESH_HI 0x348 /* 105 Celsius */
+
+/* reg_mtmp_temperature_threshold_hi
+ * High threshold for Temperature Warning Event. In 0.125 Celsius.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, mtmp, temperature_threshold_hi, 0x0C, 0, 16);
+
+/* reg_mtmp_temperature_threshold_lo
+ * Low threshold for Temperature Warning Event. In 0.125 Celsius.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, mtmp, temperature_threshold_lo, 0x10, 0, 16);
+
 #define MLXSW_REG_MTMP_SENSOR_NAME_SIZE 8
 
 /* reg_mtmp_sensor_name
@@ -5843,6 +5866,8 @@ static inline void mlxsw_reg_mtmp_pack(char *payload, u8 sensor_index,
        mlxsw_reg_mtmp_sensor_index_set(payload, sensor_index);
        mlxsw_reg_mtmp_mte_set(payload, max_temp_enable);
        mlxsw_reg_mtmp_mtr_set(payload, max_temp_reset);
+       mlxsw_reg_mtmp_temperature_threshold_hi_set(payload,
+                                                   MLXSW_REG_MTMP_THRESH_HI);
 }
 
 static inline void mlxsw_reg_mtmp_unpack(char *payload, unsigned int *p_temp,
@@ -6401,6 +6426,36 @@ static inline void mlxsw_reg_mgpc_pack(char *payload, u32 counter_index,
        mlxsw_reg_mgpc_opcode_set(payload, opcode);
 }
 
+/* TIGCR - Tunneling IPinIP General Configuration Register
+ * -------------------------------------------------------
+ * The TIGCR register is used for setting up the IPinIP Tunnel configuration.
+ */
+#define MLXSW_REG_TIGCR_ID 0xA801
+#define MLXSW_REG_TIGCR_LEN 0x10
+
+MLXSW_REG_DEFINE(tigcr, MLXSW_REG_TIGCR_ID, MLXSW_REG_TIGCR_LEN);
+
+/* reg_tigcr_ipip_ttlc
+ * For IPinIP Tunnel encapsulation: whether to copy the ttl from the packet
+ * header.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, tigcr, ttlc, 0x04, 8, 1);
+
+/* reg_tigcr_ipip_ttl_uc
+ * The TTL for IPinIP Tunnel encapsulation of unicast packets if
+ * reg_tigcr_ipip_ttlc is unset.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, tigcr, ttl_uc, 0x04, 0, 8);
+
+static inline void mlxsw_reg_tigcr_pack(char *payload, bool ttlc, u8 ttl_uc)
+{
+       MLXSW_REG_ZERO(tigcr, payload);
+       mlxsw_reg_tigcr_ttlc_set(payload, ttlc);
+       mlxsw_reg_tigcr_ttl_uc_set(payload, ttl_uc);
+}
+
 /* SBPR - Shared Buffer Pools Register
  * -----------------------------------
  * The SBPR configures and retrieves the shared buffer pools and configuration.
@@ -6881,6 +6936,7 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
        MLXSW_REG(mcc),
        MLXSW_REG(mcda),
        MLXSW_REG(mgpc),
+       MLXSW_REG(tigcr),
        MLXSW_REG(sbpr),
        MLXSW_REG(sbcm),
        MLXSW_REG(sbpm),
index 2cfb3f5d092dbf80acaea7481248ecf11ebdd7bc..5189022a1c8c335c42901b5d288bbdf830512f46 100644 (file)
@@ -2723,6 +2723,7 @@ static void mlxsw_sp_nexthop_type_fini(struct mlxsw_sp *mlxsw_sp,
                mlxsw_sp_nexthop_rif_fini(nh);
                break;
        case MLXSW_SP_NEXTHOP_TYPE_IPIP:
+               mlxsw_sp_nexthop_rif_fini(nh);
                mlxsw_sp_nexthop_ipip_fini(mlxsw_sp, nh);
                break;
        }
@@ -2742,7 +2743,11 @@ static int mlxsw_sp_nexthop4_type_init(struct mlxsw_sp *mlxsw_sp,
            router->ipip_ops_arr[ipipt]->can_offload(mlxsw_sp, dev,
                                                     MLXSW_SP_L3_PROTO_IPV4)) {
                nh->type = MLXSW_SP_NEXTHOP_TYPE_IPIP;
-               return mlxsw_sp_nexthop_ipip_init(mlxsw_sp, ipipt, nh, dev);
+               err = mlxsw_sp_nexthop_ipip_init(mlxsw_sp, ipipt, nh, dev);
+               if (err)
+                       return err;
+               mlxsw_sp_nexthop_rif_init(nh, &nh->ipip_entry->ol_lb->common);
+               return 0;
        }
 
        nh->type = MLXSW_SP_NEXTHOP_TYPE_ETH;
@@ -3500,20 +3505,6 @@ static int mlxsw_sp_fib_lpm_tree_link(struct mlxsw_sp *mlxsw_sp,
 static void mlxsw_sp_fib_lpm_tree_unlink(struct mlxsw_sp *mlxsw_sp,
                                         struct mlxsw_sp_fib *fib)
 {
-       struct mlxsw_sp_prefix_usage req_prefix_usage = {{ 0 } };
-       struct mlxsw_sp_lpm_tree *lpm_tree;
-
-       /* Aggregate prefix lengths across all virtual routers to make
-        * sure we only have used prefix lengths in the LPM tree.
-        */
-       mlxsw_sp_vrs_prefixes(mlxsw_sp, fib->proto, &req_prefix_usage);
-       lpm_tree = mlxsw_sp_lpm_tree_get(mlxsw_sp, &req_prefix_usage,
-                                        fib->proto);
-       if (IS_ERR(lpm_tree))
-               goto err_tree_get;
-       mlxsw_sp_vrs_lpm_tree_replace(mlxsw_sp, fib, lpm_tree);
-
-err_tree_get:
        if (!mlxsw_sp_prefix_usage_none(&fib->prefix_usage))
                return;
        mlxsw_sp_vr_lpm_tree_unbind(mlxsw_sp, fib);
@@ -4009,7 +4000,11 @@ static int mlxsw_sp_nexthop6_type_init(struct mlxsw_sp *mlxsw_sp,
            router->ipip_ops_arr[ipipt]->can_offload(mlxsw_sp, dev,
                                                     MLXSW_SP_L3_PROTO_IPV6)) {
                nh->type = MLXSW_SP_NEXTHOP_TYPE_IPIP;
-               return mlxsw_sp_nexthop_ipip_init(mlxsw_sp, ipipt, nh, dev);
+               err = mlxsw_sp_nexthop_ipip_init(mlxsw_sp, ipipt, nh, dev);
+               if (err)
+                       return err;
+               mlxsw_sp_nexthop_rif_init(nh, &nh->ipip_entry->ol_lb->common);
+               return 0;
        }
 
        nh->type = MLXSW_SP_NEXTHOP_TYPE_ETH;
@@ -5068,6 +5063,7 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
        vr = mlxsw_sp_vr_get(mlxsw_sp, tb_id ? : RT_TABLE_MAIN);
        if (IS_ERR(vr))
                return ERR_CAST(vr);
+       vr->rif_count++;
 
        err = mlxsw_sp_rif_index_alloc(mlxsw_sp, &rif_index);
        if (err)
@@ -5099,7 +5095,6 @@ mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp,
 
        mlxsw_sp_rif_counters_alloc(rif);
        mlxsw_sp->router->rifs[rif_index] = rif;
-       vr->rif_count++;
 
        return rif;
 
@@ -5110,6 +5105,7 @@ err_fid_get:
        kfree(rif);
 err_rif_alloc:
 err_rif_index_alloc:
+       vr->rif_count--;
        mlxsw_sp_vr_put(vr);
        return ERR_PTR(err);
 }
@@ -5124,7 +5120,6 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)
        mlxsw_sp_router_rif_gone_sync(mlxsw_sp, rif);
        vr = &mlxsw_sp->router->vrs[rif->vr_id];
 
-       vr->rif_count--;
        mlxsw_sp->router->rifs[rif->rif_index] = NULL;
        mlxsw_sp_rif_counters_free(rif);
        ops->deconfigure(rif);
@@ -5132,6 +5127,7 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)
                /* Loopback RIFs are not associated with a FID. */
                mlxsw_sp_fid_put(fid);
        kfree(rif);
+       vr->rif_count--;
        mlxsw_sp_vr_put(vr);
 }
 
@@ -5900,11 +5896,20 @@ static void mlxsw_sp_rifs_fini(struct mlxsw_sp *mlxsw_sp)
        kfree(mlxsw_sp->router->rifs);
 }
 
+static int
+mlxsw_sp_ipip_config_tigcr(struct mlxsw_sp *mlxsw_sp)
+{
+       char tigcr_pl[MLXSW_REG_TIGCR_LEN];
+
+       mlxsw_reg_tigcr_pack(tigcr_pl, true, 0);
+       return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(tigcr), tigcr_pl);
+}
+
 static int mlxsw_sp_ipips_init(struct mlxsw_sp *mlxsw_sp)
 {
        mlxsw_sp->router->ipip_ops_arr = mlxsw_sp_ipip_ops_arr;
        INIT_LIST_HEAD(&mlxsw_sp->router->ipip_list);
-       return 0;
+       return mlxsw_sp_ipip_config_tigcr(mlxsw_sp);
 }
 
 static void mlxsw_sp_ipips_fini(struct mlxsw_sp *mlxsw_sp)
index c83e4bc50c73fcced65a4f3f0ce83835d23442dd..848fc1c5a5dc0e6adc5443619cca3858e0e82410 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Micrel network device drivers.
 #
index 80eff6ea51631a88097f86a0e71413e9e8ff012d..b18fad4ad5fda81dec45d545b1cd667dc6744c1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Micrel KS8695 (Centaur) Ethernet.
  *
index 25b41de49f0eef9050ed640f79dbd9798e93588a..da4ab172527d4201f58e260cb71ef289e42181a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * enc28j60_hw.h: EDTP FrameThrower style enc28j60 registers
  *
index 4be73d5553f89d5464c469686a2d410d75a5df51..f604a260ede798b93d9235087cb850250f40de2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * encx24j600_hw.h: Register definitions
  *
index b7fc26c4f73892fe177ab4f6527d349ca0afc06d..cf73810608a2b1fed006b4c54743976e7c1decc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MYRI10GE_MCP_H__
 #define __MYRI10GE_MCP_H__
 
index 75ec5e7cf50d454f7868142d9f7c6233da0b8461..95a0095a4a75772440c6dcd3eb53946ff75085a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MYRI10GE_MCP_GEN_HEADER_H__
 #define __MYRI10GE_MCP_GEN_HEADER_H__
 
index 764c532a96d1847c18362f9ac9a72892071cdab6..cc664977596e2426de92453285d028bebd868ddf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the National Semi-conductor Sonic devices.
 #
index a6caeb567c0d45735decbde7d7ebe8c8f8ebdedc..d5b28884e21eb10f742935df7d10ce3d4793dcab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * jazzsonic.c
  *
index 3ca6ae7caf55625d5e51d884f7c7acc7fb77726c..a42433fb6949d16d97b01c746e292821d45083fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * macsonic.c
  *
index 7b0a8db57af93b8d06feec622ff94c36e9183d54..421b1a283fedae971e0a487f75adfd7881ba4796 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Header file for sonic.c
  *
index 9ee0f69a83c05cd6876013305350758bf1368f7e..1817deea98a44716e78b441d81affc37f0e7e3af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xtsonic.c
  *
index 96e579a15cbe12ba150d94b309e3b7beb1ef19ac..3cafa3d1508263bee41e9a5deede387de8ffc77e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NFP)      += nfp.o
 
 nfp-objs := \
index db9750695dc7f63cf8d9861026995098aa9cbcf0..8ea9320014ee78141f71f883452bb81926e208c6 100644 (file)
@@ -110,6 +110,8 @@ nfp_fl_output(struct nfp_fl_output *output, const struct tc_action *action,
         */
        if (!switchdev_port_same_parent_id(in_dev, out_dev))
                return -EOPNOTSUPP;
+       if (!nfp_netdev_is_nfp_repr(out_dev))
+               return -EOPNOTSUPP;
 
        output->port = cpu_to_be32(nfp_repr_get_port_id(out_dev));
        if (!output->port)
index 1c0187f0af51f87b070c21a825b00e4a48887428..e118b5f2399669f172aaf6f80be6f6c221a235d0 100644 (file)
@@ -1180,10 +1180,14 @@ static void *nfp_net_rx_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr)
 {
        void *frag;
 
-       if (!dp->xdp_prog)
+       if (!dp->xdp_prog) {
                frag = netdev_alloc_frag(dp->fl_bufsz);
-       else
-               frag = page_address(alloc_page(GFP_KERNEL | __GFP_COLD));
+       } else {
+               struct page *page;
+
+               page = alloc_page(GFP_KERNEL | __GFP_COLD);
+               frag = page ? page_address(page) : NULL;
+       }
        if (!frag) {
                nn_dp_warn(dp, "Failed to alloc receive page frag\n");
                return NULL;
@@ -1203,10 +1207,14 @@ static void *nfp_net_napi_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr)
 {
        void *frag;
 
-       if (!dp->xdp_prog)
+       if (!dp->xdp_prog) {
                frag = napi_alloc_frag(dp->fl_bufsz);
-       else
-               frag = page_address(alloc_page(GFP_ATOMIC | __GFP_COLD));
+       } else {
+               struct page *page;
+
+               page = alloc_page(GFP_ATOMIC | __GFP_COLD);
+               frag = page ? page_address(page) : NULL;
+       }
        if (!frag) {
                nn_dp_warn(dp, "Failed to alloc receive page frag\n");
                return NULL;
index 07969f06df102706ebae26ff052fae4ffa132d80..dc016dfec64d653946d0f5be3314d597b189f9ff 100644 (file)
@@ -464,7 +464,7 @@ static u64 *nfp_vnic_get_sw_stats(struct net_device *netdev, u64 *data)
 
                do {
                        start = u64_stats_fetch_begin(&nn->r_vecs[i].rx_sync);
-                       *data++ = nn->r_vecs[i].rx_pkts;
+                       data[0] = nn->r_vecs[i].rx_pkts;
                        tmp[0] = nn->r_vecs[i].hw_csum_rx_ok;
                        tmp[1] = nn->r_vecs[i].hw_csum_rx_inner_ok;
                        tmp[2] = nn->r_vecs[i].hw_csum_rx_error;
@@ -472,14 +472,16 @@ static u64 *nfp_vnic_get_sw_stats(struct net_device *netdev, u64 *data)
 
                do {
                        start = u64_stats_fetch_begin(&nn->r_vecs[i].tx_sync);
-                       *data++ = nn->r_vecs[i].tx_pkts;
-                       *data++ = nn->r_vecs[i].tx_busy;
+                       data[1] = nn->r_vecs[i].tx_pkts;
+                       data[2] = nn->r_vecs[i].tx_busy;
                        tmp[3] = nn->r_vecs[i].hw_csum_tx;
                        tmp[4] = nn->r_vecs[i].hw_csum_tx_inner;
                        tmp[5] = nn->r_vecs[i].tx_gather;
                        tmp[6] = nn->r_vecs[i].tx_lso;
                } while (u64_stats_fetch_retry(&nn->r_vecs[i].tx_sync, start));
 
+               data += 3;
+
                for (j = 0; j < NN_ET_RVEC_GATHER_STATS; j++)
                        gathered_stats[j] += tmp[j];
        }
index cee90e05beb8fec1ee856787833802cb996a9916..6cd2e333a5fc19930627331a7c2d83afd6bee543 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the QLogic network device drivers.
 #
index 82dd47068e1861bdbc368eeb625294f036b8b651..82a0b90185df07a594a1c6fe405b80ce6ffa8969 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_QED) := qed.o
 
 qed-y := qed_cxt.o qed_dev.o qed_hw.o qed_init_fw_funcs.o qed_init_ops.o \
index 739ddb73096794e5ede557723aefe19f72646491..ad00d082fec885ba7e12ed54ba40db893f8b81dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _QED_SELFTEST_API_H
 #define _QED_SELFTEST_API_H
 #include <linux/types.h>
index 3c2c2c7c155925f4dbf147a43dbbbee3f7dc12b5..dbaeab344667d17179e055c7146435b895bc440b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Qlogic 1G/10G Ethernet Driver for CNA devices
 #
index fe2599b83d09066353ecd98d8f33c0f5ae75756b..31389ab8bdf74a2b4845abab2b51ea19a077e25d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/slab.h>
index 31f40148fa5cbab05d03a178593a667ce517c5e0..5edbd532127d479f80165d252747676ed8010d3a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/module.h>
index 7ad146080c3649585e5c4611c6ba79883bda6293..384c8bc874f390007c4b25d1e971f22c718b2e6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "qlge.h"
 
 int ql_unpause_mpi_risc(struct ql_adapter *qdev)
index 1847350f48a7407a9d62fbda1792e2713712f2b0..9250976dd8845ca73a1b42df86ac35ad0784ef83 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Qualcomm network device drivers.
 #
index bbe24639aa5a6a85d2c96130eb89bf9a599be635..c8c6231b87f3305ae570d6c5277d91415ff696e8 100644 (file)
@@ -88,6 +88,8 @@ static void emac_set_msglevel(struct net_device *netdev, u32 data)
 static int emac_get_sset_count(struct net_device *netdev, int sset)
 {
        switch (sset) {
+       case ETH_SS_PRIV_FLAGS:
+               return 1;
        case ETH_SS_STATS:
                return EMAC_STATS_LEN;
        default:
@@ -100,6 +102,10 @@ static void emac_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
        unsigned int i;
 
        switch (stringset) {
+       case ETH_SS_PRIV_FLAGS:
+               strcpy(data, "single-pause-mode");
+               break;
+
        case ETH_SS_STATS:
                for (i = 0; i < EMAC_STATS_LEN; i++) {
                        strlcpy(data, emac_ethtool_stat_strings[i],
@@ -230,6 +236,27 @@ static int emac_get_regs_len(struct net_device *netdev)
        return EMAC_MAX_REG_SIZE * sizeof(u32);
 }
 
+#define EMAC_PRIV_ENABLE_SINGLE_PAUSE  BIT(0)
+
+static int emac_set_priv_flags(struct net_device *netdev, u32 flags)
+{
+       struct emac_adapter *adpt = netdev_priv(netdev);
+
+       adpt->single_pause_mode = !!(flags & EMAC_PRIV_ENABLE_SINGLE_PAUSE);
+
+       if (netif_running(netdev))
+               return emac_reinit_locked(adpt);
+
+       return 0;
+}
+
+static u32 emac_get_priv_flags(struct net_device *netdev)
+{
+       struct emac_adapter *adpt = netdev_priv(netdev);
+
+       return adpt->single_pause_mode ? EMAC_PRIV_ENABLE_SINGLE_PAUSE : 0;
+}
+
 static const struct ethtool_ops emac_ethtool_ops = {
        .get_link_ksettings = phy_ethtool_get_link_ksettings,
        .set_link_ksettings = phy_ethtool_set_link_ksettings,
@@ -253,6 +280,9 @@ static const struct ethtool_ops emac_ethtool_ops = {
 
        .get_regs_len    = emac_get_regs_len,
        .get_regs        = emac_get_regs,
+
+       .set_priv_flags = emac_set_priv_flags,
+       .get_priv_flags = emac_get_priv_flags,
 };
 
 void emac_set_ethtool_ops(struct net_device *netdev)
index bcd4708b374574fb06faf28d9b0a6cc90bc9c56d..3ed9033e56dbe9231583b8063128eb775abc9671 100644 (file)
@@ -551,6 +551,28 @@ static void emac_mac_start(struct emac_adapter *adpt)
        mac &= ~(HUGEN | VLAN_STRIP | TPAUSE | SIMR | HUGE | MULTI_ALL |
                 DEBUG_MODE | SINGLE_PAUSE_MODE);
 
+       /* Enable single-pause-frame mode if requested.
+        *
+        * If enabled, the EMAC will send a single pause frame when the RX
+        * queue is full.  This normally leads to packet loss because
+        * the pause frame disables the remote MAC only for 33ms (the quanta),
+        * and then the remote MAC continues sending packets even though
+        * the RX queue is still full.
+        *
+        * If disabled, the EMAC sends a pause frame every 31ms until the RX
+        * queue is no longer full.  Normally, this is the preferred
+        * method of operation.  However, when the system is hung (e.g.
+        * cores are halted), the EMAC interrupt handler is never called
+        * and so the RX queue fills up quickly and stays full.  The resuling
+        * non-stop "flood" of pause frames sometimes has the effect of
+        * disabling nearby switches.  In some cases, other nearby switches
+        * are also affected, shutting down the entire network.
+        *
+        * The user can enable or disable single-pause-frame mode
+        * via ethtool.
+        */
+       mac |= adpt->single_pause_mode ? SINGLE_PAUSE_MODE : 0;
+
        writel_relaxed(csr1, adpt->csr + EMAC_EMAC_WRAPPER_CSR1);
 
        writel_relaxed(mac, adpt->base + EMAC_MAC_CTRL);
@@ -876,7 +898,8 @@ static void emac_mac_rx_descs_refill(struct emac_adapter *adpt,
 
                curr_rxbuf->dma_addr =
                        dma_map_single(adpt->netdev->dev.parent, skb->data,
-                                      curr_rxbuf->length, DMA_FROM_DEVICE);
+                                      adpt->rxbuf_size, DMA_FROM_DEVICE);
+
                ret = dma_mapping_error(adpt->netdev->dev.parent,
                                        curr_rxbuf->dma_addr);
                if (ret) {
index 60850bfa3d32e5d574bddacda871cb75da2076fd..759543512117cbfcc628697a54dd7af4ab600c61 100644 (file)
@@ -443,6 +443,9 @@ static void emac_init_adapter(struct emac_adapter *adpt)
 
        /* default to automatic flow control */
        adpt->automatic = true;
+
+       /* Disable single-pause-frame mode by default */
+       adpt->single_pause_mode = false;
 }
 
 /* Get the clock */
index 8ee4ec6aef2e4379060f0726a75ab8fd8ad1690c..d7c9f44209d499cbd4f7ee7be32ca692f580b12c 100644 (file)
@@ -363,6 +363,9 @@ struct emac_adapter {
        bool                            tx_flow_control;
        bool                            rx_flow_control;
 
+       /* True == use single-pause-frame mode. */
+       bool                            single_pause_mode;
+
        /* Ring parameter */
        u8                              tpd_burst;
        u8                              rfd_burst;
index 98f22551eb455a686fcdb8baada068fcfb6e89ae..1e33aea59f505db5afd9fe19a018225c6ee34792 100644 (file)
@@ -51,10 +51,7 @@ struct rmnet_walk_data {
 
 static int rmnet_is_real_dev_registered(const struct net_device *real_dev)
 {
-       rx_handler_func_t *rx_handler;
-
-       rx_handler = rcu_dereference(real_dev->rx_handler);
-       return (rx_handler == rmnet_rx_handler);
+       return rcu_access_pointer(real_dev->rx_handler) == rmnet_rx_handler;
 }
 
 /* Needs rtnl lock */
index ca22f2898664617656f7fa6e4e98df1e7aa3bc26..d24b47b8e0b27e0f44243f5a1011779c0ebd09f9 100644 (file)
@@ -2135,11 +2135,12 @@ static int rtl8139_poll(struct napi_struct *napi, int budget)
        if (likely(RTL_R16(IntrStatus) & RxAckBits))
                work_done += rtl8139_rx(dev, tp, budget);
 
-       if (work_done < budget && napi_complete_done(napi, work_done)) {
+       if (work_done < budget) {
                unsigned long flags;
 
                spin_lock_irqsave(&tp->lock, flags);
-               RTL_W16_F(IntrMask, rtl8139_intr_mask);
+               if (napi_complete_done(napi, work_done))
+                       RTL_W16_F(IntrMask, rtl8139_intr_mask);
                spin_unlock_irqrestore(&tp->lock, flags);
        }
        spin_unlock(&tp->rx_lock);
index 32497f0e537cdfcfd321be4b6405f85e1ab4beb7..63f0d2d0e87b98e0ae2b2b7db992f0bfe7decc19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Linux header file for the ATP pocket ethernet adapter. */
 /* v1.09 8/9/2000 becker@scyld.com. */
 
index e03fcf914690c9a9e8fae548c4702f402d698f47..a3c949ea7d1a24bd8d04bf4ff75805359d838f0e 100644 (file)
@@ -8491,8 +8491,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                rtl8168_driver_start(tp);
        }
 
-       device_set_wakeup_enable(&pdev->dev, tp->features & RTL_FEATURE_WOL);
-
        if (pci_dev_run_wake(pdev))
                pm_runtime_put_noidle(&pdev->dev);
 
index a63ef82e7c72d079bb831ab433c2c43af173d2c0..dfae3c9d57c6d49d9de53635180a73e6521199fc 100644 (file)
@@ -139,40 +139,52 @@ rocker_tlv_start(struct rocker_desc_info *desc_info)
 int rocker_tlv_put(struct rocker_desc_info *desc_info,
                   int attrtype, int attrlen, const void *data);
 
-static inline int rocker_tlv_put_u8(struct rocker_desc_info *desc_info,
-                                   int attrtype, u8 value)
+static inline int
+rocker_tlv_put_u8(struct rocker_desc_info *desc_info, int attrtype, u8 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(u8), &value);
+       u8 tmp = value; /* work around GCC PR81715 */
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(u8), &tmp);
 }
 
-static inline int rocker_tlv_put_u16(struct rocker_desc_info *desc_info,
-                                    int attrtype, u16 value)
+static inline int
+rocker_tlv_put_u16(struct rocker_desc_info *desc_info, int attrtype, u16 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(u16), &value);
+       u16 tmp = value;
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(u16), &tmp);
 }
 
-static inline int rocker_tlv_put_be16(struct rocker_desc_info *desc_info,
-                                     int attrtype, __be16 value)
+static inline int
+rocker_tlv_put_be16(struct rocker_desc_info *desc_info, int attrtype, __be16 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(__be16), &value);
+       __be16 tmp = value;
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(__be16), &tmp);
 }
 
-static inline int rocker_tlv_put_u32(struct rocker_desc_info *desc_info,
-                                    int attrtype, u32 value)
+static inline int
+rocker_tlv_put_u32(struct rocker_desc_info *desc_info, int attrtype, u32 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(u32), &value);
+       u32 tmp = value;
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(u32), &tmp);
 }
 
-static inline int rocker_tlv_put_be32(struct rocker_desc_info *desc_info,
-                                     int attrtype, __be32 value)
+static inline int
+rocker_tlv_put_be32(struct rocker_desc_info *desc_info, int attrtype, __be32 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(__be32), &value);
+       __be32 tmp = value;
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(__be32), &tmp);
 }
 
-static inline int rocker_tlv_put_u64(struct rocker_desc_info *desc_info,
-                                    int attrtype, u64 value)
+static inline int
+rocker_tlv_put_u64(struct rocker_desc_info *desc_info, int attrtype, u64 value)
 {
-       return rocker_tlv_put(desc_info, attrtype, sizeof(u64), &value);
+       u64 tmp = value;
+
+       return rocker_tlv_put(desc_info, attrtype, sizeof(u64), &tmp);
 }
 
 static inline struct rocker_tlv *
index 2211e2987a8dc5465c96d0ea913c9609ad45c221..2f65c55608dfe80483c76f44aaccdad75d3fd98a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sgiseeq.h: Defines for the Seeq8003 ethernet controller.
  *
index 520cfcc17785348ce5198e55031af0755d9e1f3d..3bac58d0f88b20f8982295a2efa09c9096d98822 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 sfc-y                  += efx.o nic.o farch.o siena.o ef10.o tx.o rx.o \
                           selftest.o ethtool.o ptp.o tx_tso.o \
                           mcdi.o mcdi_port.o mcdi_mon.o
index aa1b45979ca4abce6a7193bf0b82920acde152eb..39448e5b7f1e2df1808af4507ea9c7a49ce57ed3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 sfc-falcon-y           += efx.o nic.o farch.o falcon.o tx.o rx.o selftest.o \
                           ethtool.o qt202x_phy.o mdio_10g.o tenxpress.o \
                           txc43128_phy.o falcon_boards.o
index f0da3dc52c01efbbe6c8e4c571ca48376417d6e1..66e4bf38770fc2fc6b0338f19d6af8fa74348ff4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sis900.h Definitions for SiS ethernet controllers including 7014/7016 and 900
  * Copyright 1999 Silicon Integrated System Corporation
  * References:
index f3438dec9d90e9ca92d5db5249f0ad598998761e..4105912b16294cfc8d28add29f0992158e36853a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the SMSC network device drivers.
 #
index 238307fadcdbc104701fa878b2fcce7c6e843421..ff3f83b86d102573726ca970f158fc1c8ed75eb4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_STMMAC_ETH) += stmmac.o
 stmmac-objs:= stmmac_main.o stmmac_ethtool.o stmmac_mdio.o ring_mode.o \
              chain_mode.o dwmac_lib.o dwmac1000_core.o dwmac1000_dma.o \
index dd6a2f9791cc11a390d71bcb5a1b071cd1bca068..3256e5cbad2717c0d3928109cbb677c095e3247c 100644 (file)
@@ -74,7 +74,7 @@ static int dwc_eth_dwmac_config_dt(struct platform_device *pdev,
                plat_dat->axi->axi_wr_osr_lmt--;
        }
 
-       if (of_property_read_u32(np, "read,read-requests",
+       if (of_property_read_u32(np, "snps,read-requests",
                                 &plat_dat->axi->axi_rd_osr_lmt)) {
                /**
                 * Since the register has a reset value of 1, if property
@@ -511,6 +511,7 @@ static struct platform_driver dwc_eth_dwmac_driver = {
        .remove = dwc_eth_dwmac_remove,
        .driver = {
                .name           = "dwc-eth-dwmac",
+               .pm             = &stmmac_pltfr_pm_ops,
                .of_match_table = dwc_eth_dwmac_match,
        },
 };
index 99823f54696a1887ba4ef5f36e5863b12806bc8f..13133b30b575e74a081f35158e360d7eee8b28ab 100644 (file)
@@ -83,6 +83,117 @@ struct rk_priv_data {
        (((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE : soc##_GMAC_TXCLK_DLY_DISABLE) | \
         ((rx) ? soc##_GMAC_RXCLK_DLY_ENABLE : soc##_GMAC_RXCLK_DLY_DISABLE))
 
+#define RK3128_GRF_MAC_CON0    0x0168
+#define RK3128_GRF_MAC_CON1    0x016c
+
+/* RK3128_GRF_MAC_CON0 */
+#define RK3128_GMAC_TXCLK_DLY_ENABLE   GRF_BIT(14)
+#define RK3128_GMAC_TXCLK_DLY_DISABLE  GRF_CLR_BIT(14)
+#define RK3128_GMAC_RXCLK_DLY_ENABLE   GRF_BIT(15)
+#define RK3128_GMAC_RXCLK_DLY_DISABLE  GRF_CLR_BIT(15)
+#define RK3128_GMAC_CLK_RX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 7)
+#define RK3128_GMAC_CLK_TX_DL_CFG(val) HIWORD_UPDATE(val, 0x7F, 0)
+
+/* RK3128_GRF_MAC_CON1 */
+#define RK3128_GMAC_PHY_INTF_SEL_RGMII \
+               (GRF_BIT(6) | GRF_CLR_BIT(7) | GRF_CLR_BIT(8))
+#define RK3128_GMAC_PHY_INTF_SEL_RMII  \
+               (GRF_CLR_BIT(6) | GRF_CLR_BIT(7) | GRF_BIT(8))
+#define RK3128_GMAC_FLOW_CTRL          GRF_BIT(9)
+#define RK3128_GMAC_FLOW_CTRL_CLR      GRF_CLR_BIT(9)
+#define RK3128_GMAC_SPEED_10M          GRF_CLR_BIT(10)
+#define RK3128_GMAC_SPEED_100M         GRF_BIT(10)
+#define RK3128_GMAC_RMII_CLK_25M       GRF_BIT(11)
+#define RK3128_GMAC_RMII_CLK_2_5M      GRF_CLR_BIT(11)
+#define RK3128_GMAC_CLK_125M           (GRF_CLR_BIT(12) | GRF_CLR_BIT(13))
+#define RK3128_GMAC_CLK_25M            (GRF_BIT(12) | GRF_BIT(13))
+#define RK3128_GMAC_CLK_2_5M           (GRF_CLR_BIT(12) | GRF_BIT(13))
+#define RK3128_GMAC_RMII_MODE          GRF_BIT(14)
+#define RK3128_GMAC_RMII_MODE_CLR      GRF_CLR_BIT(14)
+
+static void rk3128_set_to_rgmii(struct rk_priv_data *bsp_priv,
+                               int tx_delay, int rx_delay)
+{
+       struct device *dev = &bsp_priv->pdev->dev;
+
+       if (IS_ERR(bsp_priv->grf)) {
+               dev_err(dev, "Missing rockchip,grf property\n");
+               return;
+       }
+
+       regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                    RK3128_GMAC_PHY_INTF_SEL_RGMII |
+                    RK3128_GMAC_RMII_MODE_CLR);
+       regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON0,
+                    DELAY_ENABLE(RK3128, tx_delay, rx_delay) |
+                    RK3128_GMAC_CLK_RX_DL_CFG(rx_delay) |
+                    RK3128_GMAC_CLK_TX_DL_CFG(tx_delay));
+}
+
+static void rk3128_set_to_rmii(struct rk_priv_data *bsp_priv)
+{
+       struct device *dev = &bsp_priv->pdev->dev;
+
+       if (IS_ERR(bsp_priv->grf)) {
+               dev_err(dev, "Missing rockchip,grf property\n");
+               return;
+       }
+
+       regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                    RK3128_GMAC_PHY_INTF_SEL_RMII | RK3128_GMAC_RMII_MODE);
+}
+
+static void rk3128_set_rgmii_speed(struct rk_priv_data *bsp_priv, int speed)
+{
+       struct device *dev = &bsp_priv->pdev->dev;
+
+       if (IS_ERR(bsp_priv->grf)) {
+               dev_err(dev, "Missing rockchip,grf property\n");
+               return;
+       }
+
+       if (speed == 10)
+               regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                            RK3128_GMAC_CLK_2_5M);
+       else if (speed == 100)
+               regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                            RK3128_GMAC_CLK_25M);
+       else if (speed == 1000)
+               regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                            RK3128_GMAC_CLK_125M);
+       else
+               dev_err(dev, "unknown speed value for RGMII! speed=%d", speed);
+}
+
+static void rk3128_set_rmii_speed(struct rk_priv_data *bsp_priv, int speed)
+{
+       struct device *dev = &bsp_priv->pdev->dev;
+
+       if (IS_ERR(bsp_priv->grf)) {
+               dev_err(dev, "Missing rockchip,grf property\n");
+               return;
+       }
+
+       if (speed == 10) {
+               regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                            RK3128_GMAC_RMII_CLK_2_5M |
+                            RK3128_GMAC_SPEED_10M);
+       } else if (speed == 100) {
+               regmap_write(bsp_priv->grf, RK3128_GRF_MAC_CON1,
+                            RK3128_GMAC_RMII_CLK_25M |
+                            RK3128_GMAC_SPEED_100M);
+       } else {
+               dev_err(dev, "unknown speed value for RMII! speed=%d", speed);
+       }
+}
+
+static const struct rk_gmac_ops rk3128_ops = {
+       .set_to_rgmii = rk3128_set_to_rgmii,
+       .set_to_rmii = rk3128_set_to_rmii,
+       .set_rgmii_speed = rk3128_set_rgmii_speed,
+       .set_rmii_speed = rk3128_set_rmii_speed,
+};
+
 #define RK3228_GRF_MAC_CON0    0x0900
 #define RK3228_GRF_MAC_CON1    0x0904
 
@@ -1313,6 +1424,7 @@ static int rk_gmac_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(rk_gmac_pm_ops, rk_gmac_suspend, rk_gmac_resume);
 
 static const struct of_device_id rk_gmac_dwmac_match[] = {
+       { .compatible = "rockchip,rk3128-gmac", .data = &rk3128_ops },
        { .compatible = "rockchip,rk3228-gmac", .data = &rk3228_ops },
        { .compatible = "rockchip,rk3288-gmac", .data = &rk3288_ops },
        { .compatible = "rockchip,rk3328-gmac", .data = &rk3328_ops },
index c4407e8e39a35a523bda481a9cc1787ab24bc608..2f7d7ec59962a7050a278d53e2241024566bb66d 100644 (file)
@@ -296,6 +296,7 @@ static void dwmac4_pmt(struct mac_device_info *hw, unsigned long mode)
 {
        void __iomem *ioaddr = hw->pcsr;
        unsigned int pmt = 0;
+       u32 config;
 
        if (mode & WAKE_MAGIC) {
                pr_debug("GMAC: WOL Magic frame\n");
@@ -306,6 +307,12 @@ static void dwmac4_pmt(struct mac_device_info *hw, unsigned long mode)
                pmt |= power_down | global_unicast | wake_up_frame_en;
        }
 
+       if (pmt) {
+               /* The receiver must be enabled for WOL before powering down */
+               config = readl(ioaddr + GMAC_CONFIG);
+               config |= GMAC_CONFIG_RE;
+               writel(config, ioaddr + GMAC_CONFIG);
+       }
        writel(pmt, ioaddr + GMAC_PMT);
 }
 
index e0ef02f9503bae027268b1b058f9875b6c1365a7..4b286e27c4ca5cdbbb7c457e31bef1b2e9e7bd94 100644 (file)
@@ -275,7 +275,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, u32 ats)
                                        goto exit;
                                i++;
 
-                       } while ((ret == 1) || (i < 10));
+                       } while ((ret == 1) && (i < 10));
 
                        if (i == 10)
                                ret = -EBUSY;
index 67af0bdd7f10f01ecd3adf87b59105cdd07ab40e..7516ca210855b49b30378fb0200e32949ca58e49 100644 (file)
@@ -34,7 +34,7 @@ int dwmac_dma_reset(void __iomem *ioaddr)
 
        err = readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
                                 !(value & DMA_BUS_MODE_SFT_RESET),
-                                100000, 10000);
+                                10000, 100000);
        if (err)
                return -EBUSY;
 
index 1763e48c84e2090678f4ffc1b55cf1d7a62382e4..16bd509290844b7854437ecb97507126b6153413 100644 (file)
@@ -473,19 +473,18 @@ static void stmmac_get_rx_hwtstamp(struct stmmac_priv *priv, struct dma_desc *p,
                                   struct dma_desc *np, struct sk_buff *skb)
 {
        struct skb_shared_hwtstamps *shhwtstamp = NULL;
+       struct dma_desc *desc = p;
        u64 ns;
 
        if (!priv->hwts_rx_en)
                return;
+       /* For GMAC4, the valid timestamp is from CTX next desc. */
+       if (priv->plat->has_gmac4)
+               desc = np;
 
        /* Check if timestamp is available */
-       if (priv->hw->desc->get_rx_timestamp_status(p, priv->adv_ts)) {
-               /* For GMAC4, the valid timestamp is from CTX next desc. */
-               if (priv->plat->has_gmac4)
-                       ns = priv->hw->desc->get_timestamp(np, priv->adv_ts);
-               else
-                       ns = priv->hw->desc->get_timestamp(p, priv->adv_ts);
-
+       if (priv->hw->desc->get_rx_timestamp_status(desc, priv->adv_ts)) {
+               ns = priv->hw->desc->get_timestamp(desc, priv->adv_ts);
                netdev_dbg(priv->dev, "get valid RX hw timestamp %llu\n", ns);
                shhwtstamp = skb_hwtstamps(skb);
                memset(shhwtstamp, 0, sizeof(struct skb_shared_hwtstamps));
@@ -1800,12 +1799,13 @@ static void stmmac_tx_clean(struct stmmac_priv *priv, u32 queue)
 {
        struct stmmac_tx_queue *tx_q = &priv->tx_queue[queue];
        unsigned int bytes_compl = 0, pkts_compl = 0;
-       unsigned int entry = tx_q->dirty_tx;
+       unsigned int entry;
 
        netif_tx_lock(priv->dev);
 
        priv->xstats.tx_clean++;
 
+       entry = tx_q->dirty_tx;
        while (entry != tx_q->cur_tx) {
                struct sk_buff *skb = tx_q->tx_skbuff[entry];
                struct dma_desc *p;
@@ -3333,6 +3333,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
                                 * them in stmmac_rx_refill() function so that
                                 * device can reuse it.
                                 */
+                               dev_kfree_skb_any(rx_q->rx_skbuff[entry]);
                                rx_q->rx_skbuff[entry] = NULL;
                                dma_unmap_single(priv->device,
                                                 rx_q->rx_skbuff_dma[entry],
index a366b3747eeb58aebf730fde9c44c0a94af70491..195eb7e71473d318ef63332cbbdc98515f7af697 100644 (file)
@@ -150,6 +150,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
        plat->rx_queues_to_use = 1;
        plat->tx_queues_to_use = 1;
 
+       /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB = 1 we need
+        * to always set this, otherwise Queue will be classified as AVB
+        * (because MTL_QUEUE_AVB = 0).
+        */
+       plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB;
+       plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB;
+
        rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0);
        if (!rx_node)
                return;
@@ -161,8 +168,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
        }
 
        /* Processing RX queues common config */
-       if (of_property_read_u8(rx_node, "snps,rx-queues-to-use",
-                               &plat->rx_queues_to_use))
+       if (of_property_read_u32(rx_node, "snps,rx-queues-to-use",
+                                &plat->rx_queues_to_use))
                plat->rx_queues_to_use = 1;
 
        if (of_property_read_bool(rx_node, "snps,rx-sched-sp"))
@@ -184,8 +191,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
                else
                        plat->rx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB;
 
-               if (of_property_read_u8(q_node, "snps,map-to-dma-channel",
-                                       &plat->rx_queues_cfg[queue].chan))
+               if (of_property_read_u32(q_node, "snps,map-to-dma-channel",
+                                        &plat->rx_queues_cfg[queue].chan))
                        plat->rx_queues_cfg[queue].chan = queue;
                /* TODO: Dynamic mapping to be included in the future */
 
@@ -215,8 +222,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
        }
 
        /* Processing TX queues common config */
-       if (of_property_read_u8(tx_node, "snps,tx-queues-to-use",
-                               &plat->tx_queues_to_use))
+       if (of_property_read_u32(tx_node, "snps,tx-queues-to-use",
+                                &plat->tx_queues_to_use))
                plat->tx_queues_to_use = 1;
 
        if (of_property_read_bool(tx_node, "snps,tx-sched-wrr"))
@@ -237,8 +244,8 @@ static void stmmac_mtl_setup(struct platform_device *pdev,
                if (queue >= plat->tx_queues_to_use)
                        break;
 
-               if (of_property_read_u8(q_node, "snps,weight",
-                                       &plat->tx_queues_cfg[queue].weight))
+               if (of_property_read_u32(q_node, "snps,weight",
+                                        &plat->tx_queues_cfg[queue].weight))
                        plat->tx_queues_cfg[queue].weight = 0x10 + queue;
 
                if (of_property_read_bool(q_node, "snps,dcb-algorithm")) {
@@ -315,6 +322,7 @@ static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
                { .compatible = "allwinner,sun8i-h3-emac" },
                { .compatible = "allwinner,sun8i-v3s-emac" },
                { .compatible = "allwinner,sun50i-a64-emac" },
+               {},
        };
 
        /* If phy-handle property is passed from DT, use it as the PHY */
index 37855438b3cbe30b92f8fb8c0b2a04389ee82813..9a5249dee56e9b9c42d1e53c6489bd68eea5bbac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Sun network device drivers.
 #
index 51e177e1860d94a1fa6a0f497463278fac0cd78a..04c215f91fc08e004c4781feb646d7cd4b1e8f83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* niu.h: Definitions for Neptune ethernet driver.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index ee56930475a8e5941c468b09d84da8dbf5314a94..d379bd407eca7ac798bf831daf7b3a67a1b8aa26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: sunbmac.h,v 1.7 2000/07/11 22:35:22 davem Exp $
  * sunbmac.h: Defines for the Sun "Big MAC" 100baseT ethernet cards.
  *
index 835ce1b3cb9fc964a632f127b2cb5e51a80bcbd1..626302a9bc89042b45dfb769e1b0fbb32b4563ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: sungem.h,v 1.10.2.4 2002/03/11 08:54:48 davem Exp $
  * sungem.h: Definitions for Sun GEM ethernet driver.
  *
index fca1bca7f69d1c4c1307c1cc7e2a11f80d6ec866..9118c60c94267b7262db67dbc0fcb9130c2c8b0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: sunhme.h,v 1.33 2001/08/03 06:23:04 davem Exp $
  * sunhme.h: Definitions for Sparc HME/BigMac 10/100baseT ethernet driver.
  *           Also known as the "Happy Meal".
index ae190b77431b14b8f63b465155e9762727ccad77..0daed05b7c83d015d6a98605dbf514f330267e09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: sunqe.h,v 1.13 2000/02/09 11:15:42 davem Exp $
  * sunqe.h: Definitions for the Sun QuadEthernet driver.
  *
index b20d6fa7ef25b798401e24a59398c893a026c462..6a4dd1fb19bf69684e6f6db7d85524f1cd1de5fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SUNVNETCOMMON_H
 #define _SUNVNETCOMMON_H
 
index 0ad01916f11e4c60ec1fc88a16ecd241eb119c17..7a46393abf2688649242c1d8b13896a7b6e67a28 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Synopsys network device drivers.
 #
index 10e6b0ce51baf3115b8c72d40e933f10873186f0..0be551de821c884f54c4bdb254d75456664b0a4f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the TI network device drivers.
 #
index 0ef9eefd32110560be6a51c141154aed71e758cc..3d0ae1f07fc97c597d9cf6b4f1b2e84566d8170c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the TILE on-chip networking support.
 #
index a5069008435b630ccc8799e269286dfc1afe781a..f434fd0f429e9a425748fa6c52362c2f3304bf7a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Toshiba network device drivers.
 #
index 214205e975e3e83019ccbc455769ce71db523ebd..7d7dc1771423e8a40e78c43dbc5184d3bcf267c7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Xilink network device drivers.
 #
index 7d06e3e1abac7a4a7ff57e1266312302e17fcc60..107575225383297349666ce944667275a65af5e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef XILINX_LL_TEMAC_H
 #define XILINX_LL_TEMAC_H
index 7714aff78b7d83c86c6e40ad37e03d40475378cb..f5e83ac6f7e2fa6bb1bcde1f24e5a4e549c92522 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MDIO bus driver for the Xilinx TEMAC device
  *
index 5ef626331f85ce954a0e0cad2126d53c7a9ec93d..c337400485dad83ee0fd13a1a32c5dd89ac7b64f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for Xilinx Axi Ethernet device driver.
  *
index 63307ea9784666c3082528670861143761d47a59..16c3bfbe19928dfb56b2719490d0b401fae2ee5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * MDIO bus driver for the Xilinx Axi Ethernet device
  *
index a957a1c7e5babd91b5fa824afa266956a7e8d4fc..875eac8a76f351b4b4e9bb72e97967dc90ef05c9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the SysKonnect FDDI PCI adapter driver
 #
index f6404074b7b053e2af682c7e25ad36cec21ebe3b..ed51018a813e7ba6354d296e0d6c9fba3a1f76a1 100644 (file)
@@ -113,13 +113,7 @@ static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni)
 
 static bool eq_tun_id_and_vni(u8 *tun_id, u8 *vni)
 {
-#ifdef __BIG_ENDIAN
-       return (vni[0] == tun_id[2]) &&
-              (vni[1] == tun_id[1]) &&
-              (vni[2] == tun_id[0]);
-#else
        return !memcmp(vni, &tun_id[5], 3);
-#endif
 }
 
 static sa_family_t geneve_get_sk_family(struct geneve_sock *gs)
index 104096070026fe3b65184b5f3ccd7a14df5c4a53..7a1518d763e38c80f10da5cf4be0fc7d04b46bfd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux AX.25 and HFMODEM device drivers.
 #
index 8bef548572aa460241149fc7abda64eaf0d5f351..1655901d713b1babc74bb1f86d2b3c52f99935b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* 8530 Serial Communications Controller Register definitions */
 #define        FLAG    0x7e
index 28169043ae49cab2441e5251069a98ba4d2a9aa7..87533784604f4d3756d4e778f2aa8cf79f72d547 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RRUNNER_H_
 #define _RRUNNER_H_
 
index d98cdfb1536b5600c0b2e962a2e5e003496ad129..5176be76ca7d57771d82829f8bd08b64dbdc7773 100644 (file)
@@ -150,6 +150,8 @@ struct netvsc_device_info {
        u32  num_chn;
        u32  send_sections;
        u32  recv_sections;
+       u32  send_section_size;
+       u32  recv_section_size;
 };
 
 enum rndis_device_state {
index a5511b7326af646618658060c8d289b60fb4883b..8d5077fb04929cb362e7266b45b04c1369ed1284 100644 (file)
@@ -76,9 +76,6 @@ static struct netvsc_device *alloc_net_device(void)
        net_device->max_pkt = RNDIS_MAX_PKT_DEFAULT;
        net_device->pkt_align = RNDIS_PKT_ALIGN_DEFAULT;
 
-       net_device->recv_section_size = NETVSC_RECV_SECTION_SIZE;
-       net_device->send_section_size = NETVSC_SEND_SECTION_SIZE;
-
        init_completion(&net_device->channel_init_wait);
        init_waitqueue_head(&net_device->subchan_open);
        INIT_WORK(&net_device->subchan_work, rndis_set_subchannel);
@@ -262,7 +259,7 @@ static int netvsc_init_buf(struct hv_device *device,
        int ret = 0;
 
        /* Get receive buffer area. */
-       buf_size = device_info->recv_sections * net_device->recv_section_size;
+       buf_size = device_info->recv_sections * device_info->recv_section_size;
        buf_size = roundup(buf_size, PAGE_SIZE);
 
        net_device->recv_buf = vzalloc(buf_size);
@@ -344,7 +341,7 @@ static int netvsc_init_buf(struct hv_device *device,
                goto cleanup;
 
        /* Now setup the send buffer. */
-       buf_size = device_info->send_sections * net_device->send_section_size;
+       buf_size = device_info->send_sections * device_info->send_section_size;
        buf_size = round_up(buf_size, PAGE_SIZE);
 
        net_device->send_buf = vzalloc(buf_size);
index d4902ee5f260f2df2fa03d680c3c7ea0d79e5dc8..a32ae02e1b6cb6fc2975b0e124aacb42370c0c5d 100644 (file)
@@ -848,7 +848,9 @@ static int netvsc_set_channels(struct net_device *net,
        device_info.num_chn = count;
        device_info.ring_size = ring_size;
        device_info.send_sections = nvdev->send_section_cnt;
+       device_info.send_section_size = nvdev->send_section_size;
        device_info.recv_sections = nvdev->recv_section_cnt;
+       device_info.recv_section_size = nvdev->recv_section_size;
 
        rndis_filter_device_remove(dev, nvdev);
 
@@ -963,7 +965,9 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
        device_info.ring_size = ring_size;
        device_info.num_chn = nvdev->num_chn;
        device_info.send_sections = nvdev->send_section_cnt;
+       device_info.send_section_size = nvdev->send_section_size;
        device_info.recv_sections = nvdev->recv_section_cnt;
+       device_info.recv_section_size = nvdev->recv_section_size;
 
        rndis_filter_device_remove(hdev, nvdev);
 
@@ -1485,7 +1489,9 @@ static int netvsc_set_ringparam(struct net_device *ndev,
        device_info.num_chn = nvdev->num_chn;
        device_info.ring_size = ring_size;
        device_info.send_sections = new_tx;
+       device_info.send_section_size = nvdev->send_section_size;
        device_info.recv_sections = new_rx;
+       device_info.recv_section_size = nvdev->recv_section_size;
 
        netif_device_detach(ndev);
        was_opened = rndis_filter_opened(nvdev);
@@ -1934,7 +1940,9 @@ static int netvsc_probe(struct hv_device *dev,
        device_info.ring_size = ring_size;
        device_info.num_chn = VRSS_CHANNEL_DEFAULT;
        device_info.send_sections = NETVSC_DEFAULT_TX;
+       device_info.send_section_size = NETVSC_SEND_SECTION_SIZE;
        device_info.recv_sections = NETVSC_DEFAULT_RX;
+       device_info.recv_section_size = NETVSC_RECV_SECTION_SIZE;
 
        nvdev = rndis_filter_device_add(dev, &device_info);
        if (IS_ERR(nvdev)) {
index 8374bb44a145be7014dabf7470645cb20183733a..bea1de5e726c7fed4088d0ab7b4ba27ef62da69f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IEEE802154_FAKELB) += fakelb.o
 obj-$(CONFIG_IEEE802154_AT86RF230) += at86rf230.o
 obj-$(CONFIG_IEEE802154_MRF24J40) += mrf24j40.o
index 5dea2063dbc878d1f45a56c7cfea470f820ec601..0bcc07f346c3ecb26e5d8354adb1fcd547733e84 100644 (file)
@@ -197,8 +197,8 @@ static int ipvtap_init(void)
 {
        int err;
 
-       err = tap_create_cdev(&ipvtap_cdev, &ipvtap_major, "ipvtap");
-
+       err = tap_create_cdev(&ipvtap_cdev, &ipvtap_major, "ipvtap",
+                             THIS_MODULE);
        if (err)
                goto out1;
 
index 98e4deaa3a6a1c2f89d55e8f2db54b6fc93380be..5ab1b8849c30496966be05115f752bfcf3385950 100644 (file)
@@ -742,6 +742,7 @@ static struct sk_buff *macsec_encrypt(struct sk_buff *skb,
        sg_init_table(sg, ret);
        ret = skb_to_sgvec(skb, sg, 0, skb->len);
        if (unlikely(ret < 0)) {
+               aead_request_free(req);
                macsec_txsa_put(tx_sa);
                kfree_skb(skb);
                return ERR_PTR(ret);
@@ -954,6 +955,7 @@ static struct sk_buff *macsec_decrypt(struct sk_buff *skb,
        sg_init_table(sg, ret);
        ret = skb_to_sgvec(skb, sg, 0, skb->len);
        if (unlikely(ret < 0)) {
+               aead_request_free(req);
                kfree_skb(skb);
                return ERR_PTR(ret);
        }
index c2d0ea2fb01933d46e43b84fbf255901f18e5b91..cba5cb3b849a78c7073d5545bd1f8067f6e1db5f 100644 (file)
@@ -204,8 +204,8 @@ static int macvtap_init(void)
 {
        int err;
 
-       err = tap_create_cdev(&macvtap_cdev, &macvtap_major, "macvtap");
-
+       err = tap_create_cdev(&macvtap_cdev, &macvtap_major, "macvtap",
+                             THIS_MODULE);
        if (err)
                goto out1;
 
index a9d16a3af514ead8f96a34db3d05478785cdf6d6..cd931cf9dcc262d3a1ccb4d03b5022b2180f1266 100644 (file)
@@ -160,15 +160,6 @@ config MDIO_XGENE
 
 endif
 
-menuconfig PHYLIB
-       tristate "PHY Device support and infrastructure"
-       depends on NETDEVICES
-       select MDIO_DEVICE
-       help
-         Ethernet controllers are usually attached to PHY
-         devices.  This option provides infrastructure for
-         managing PHY devices.
-
 config PHYLINK
        tristate
        depends on NETDEVICES
@@ -179,6 +170,15 @@ config PHYLINK
          configuration links, PHYs, and Serdes links with MAC level
          autonegotiation modes.
 
+menuconfig PHYLIB
+       tristate "PHY Device support and infrastructure"
+       depends on NETDEVICES
+       select MDIO_DEVICE
+       help
+         Ethernet controllers are usually attached to PHY
+         devices.  This option provides infrastructure for
+         managing PHY devices.
+
 if PHYLIB
 
 config SWPHY
index 416df92fbf4f6b3b49493d7b6dfb58117c1fbcb1..00f097e18c68a1a3c076e99b74cf135338ca849a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for Linux PHY drivers and MDIO bus drivers
 
 libphy-y                       := phy.o phy-c45.o phy-core.o phy_device.o
index e7fe411170034673759b2bcce92ac2919812e746..21aa24c741b9671222e1baa63c92177b0ffa72d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* dp83640_reg.h
  * Generated by regen.tcl on Thu Feb 17 10:02:48 AM CET 2011
  */
index 15cbcdba618a81363765a78217f4d875518386cc..4d02b27df0445e7c1ad6f0774e44a5b7013bb05e 100644 (file)
@@ -681,9 +681,11 @@ static int m88e1116r_config_init(struct phy_device *phydev)
        if (err < 0)
                return err;
 
-       err = m88e1121_config_aneg_rgmii_delays(phydev);
-       if (err < 0)
-               return err;
+       if (phy_interface_is_rgmii(phydev)) {
+               err = m88e1121_config_aneg_rgmii_delays(phydev);
+               if (err < 0)
+                       return err;
+       }
 
        err = genphy_soft_reset(phydev);
        if (err < 0)
index 3a7f143904e8c5948f94b1f570b9310368855ac8..773bb51399be9a934417359e6ccda42d6cfeebce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mdio-boardinfo.h - board info interface internal to the mdio_bus
  * component
index e842d2cd1ee750f8930028370c1c7fac5a52dc77..2b1e67bc1e736ceb33f7afa8462f5a4858b522df 100644 (file)
@@ -373,7 +373,8 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
                cmd->base.port = PORT_BNC;
        else
                cmd->base.port = PORT_MII;
-
+       cmd->base.transceiver = phy_is_internal(phydev) ?
+                               XCVR_INTERNAL : XCVR_EXTERNAL;
        cmd->base.phy_address = phydev->mdio.addr;
        cmd->base.autoneg = phydev->autoneg;
        cmd->base.eth_tp_mdix_ctrl = phydev->mdix_ctrl;
index 8cf0c5901f95870fc613edba0289594a5d40640a..67f25ac29025c53903cc724fac62efdd94828510 100644 (file)
@@ -879,7 +879,7 @@ void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
 {
        const char *drv_name = phydev->drv ? phydev->drv->name : "unbound";
        char *irq_str;
-       char irq_num[4];
+       char irq_num[8];
 
        switch(phydev->irq) {
        case PHY_POLL:
index 2f09ac324e18ea3a9832a9bdc129b890a275a6a5..3668ab8c901a77dc88728e51624f5bb8c18d7595 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SWPHY_H
 #define SWPHY_H
 
index d15dd3938ba82624fd693b5a6f77301bb6d26bde..2e5150b0b8d52c5dd784a3df1818962d64972898 100644 (file)
@@ -44,7 +44,7 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev)
        priv->phy_drv->read_status(phydev);
 
        val = mdiobus_read(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG);
-       val &= XILINX_GMII2RGMII_SPEED_MASK;
+       val &= ~XILINX_GMII2RGMII_SPEED_MASK;
 
        if (phydev->speed == SPEED_1000)
                val |= BMCR_SPEED1000;
index a6b6297b00669a3f1e0852f83780550a295e3216..16c457d6b3244cd579897074d91749421b449f42 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux PPP network device drivers.
 #
index a404552555d488c832e7758293d7d4c1e229e679..e365866600ba048f31664dddafccf314d640385f 100644 (file)
@@ -120,7 +120,7 @@ struct ppp {
        int             n_channels;     /* how many channels are attached 54 */
        spinlock_t      rlock;          /* lock for receive side 58 */
        spinlock_t      wlock;          /* lock for transmit side 5c */
-       int             *xmit_recursion __percpu; /* xmit recursion detect */
+       int __percpu    *xmit_recursion; /* xmit recursion detect */
        int             mru;            /* max receive unit 60 */
        unsigned int    flags;          /* control bits 64 */
        unsigned int    xstate;         /* transmit state bits 68 */
@@ -1339,7 +1339,17 @@ ppp_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats64)
 
 static int ppp_dev_init(struct net_device *dev)
 {
+       struct ppp *ppp;
+
        netdev_lockdep_set_classes(dev);
+
+       ppp = netdev_priv(dev);
+       /* Let the netdevice take a reference on the ppp file. This ensures
+        * that ppp_destroy_interface() won't run before the device gets
+        * unregistered.
+        */
+       atomic_inc(&ppp->file.refcnt);
+
        return 0;
 }
 
@@ -1362,6 +1372,15 @@ static void ppp_dev_uninit(struct net_device *dev)
        wake_up_interruptible(&ppp->file.rwait);
 }
 
+static void ppp_dev_priv_destructor(struct net_device *dev)
+{
+       struct ppp *ppp;
+
+       ppp = netdev_priv(dev);
+       if (atomic_dec_and_test(&ppp->file.refcnt))
+               ppp_destroy_interface(ppp);
+}
+
 static const struct net_device_ops ppp_netdev_ops = {
        .ndo_init        = ppp_dev_init,
        .ndo_uninit      = ppp_dev_uninit,
@@ -1387,6 +1406,7 @@ static void ppp_setup(struct net_device *dev)
        dev->tx_queue_len = 3;
        dev->type = ARPHRD_PPP;
        dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
+       dev->priv_destructor = ppp_dev_priv_destructor;
        netif_keep_dst(dev);
 }
 
index 7a14e058c6684487425a80774a69df056c39a5aa..677b3b3f7425f6457574e2f852d6abb33d28e8e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define MPPE_PAD                4      /* MPPE growth per frame */
 #define MPPE_MAX_KEY_LEN       16      /* largest key length (128-bit) */
 
index cf32aadf508f15045eedd83fce0a8f254f77d6e4..c420e59485221d31126ba97b23814c6ac0fa268e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * slip.h      Define the SLIP device driver interface and constants.
  *
index 21b71ae947fdbc2e3bbf7d5ef7c17d17aa560ba2..6c0c84c33e1fb62f259881de910934470b6a8929 100644 (file)
@@ -517,6 +517,10 @@ static int tap_open(struct inode *inode, struct file *file)
                                             &tap_proto, 0);
        if (!q)
                goto err;
+       if (skb_array_init(&q->skb_array, tap->dev->tx_queue_len, GFP_KERNEL)) {
+               sk_free(&q->sk);
+               goto err;
+       }
 
        RCU_INIT_POINTER(q->sock.wq, &q->wq);
        init_waitqueue_head(&q->wq.wait);
@@ -540,22 +544,18 @@ static int tap_open(struct inode *inode, struct file *file)
        if ((tap->dev->features & NETIF_F_HIGHDMA) && (tap->dev->features & NETIF_F_SG))
                sock_set_flag(&q->sk, SOCK_ZEROCOPY);
 
-       err = -ENOMEM;
-       if (skb_array_init(&q->skb_array, tap->dev->tx_queue_len, GFP_KERNEL))
-               goto err_array;
-
        err = tap_set_queue(tap, file, q);
-       if (err)
-               goto err_queue;
+       if (err) {
+               /* tap_sock_destruct() will take care of freeing skb_array */
+               goto err_put;
+       }
 
        dev_put(tap->dev);
 
        rtnl_unlock();
        return err;
 
-err_queue:
-       skb_array_cleanup(&q->skb_array);
-err_array:
+err_put:
        sock_put(&q->sk);
 err:
        if (tap)
@@ -1032,6 +1032,8 @@ static long tap_ioctl(struct file *file, unsigned int cmd,
        case TUNSETSNDBUF:
                if (get_user(s, sp))
                        return -EFAULT;
+               if (s <= 0)
+                       return -EINVAL;
 
                q->sk.sk_sndbuf = s;
                return 0;
@@ -1249,8 +1251,8 @@ static int tap_list_add(dev_t major, const char *device_name)
        return 0;
 }
 
-int tap_create_cdev(struct cdev *tap_cdev,
-                   dev_t *tap_major, const char *device_name)
+int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major,
+                   const char *device_name, struct module *module)
 {
        int err;
 
@@ -1259,6 +1261,7 @@ int tap_create_cdev(struct cdev *tap_cdev,
                goto out1;
 
        cdev_init(tap_cdev, &tap_fops);
+       tap_cdev->owner = module;
        err = cdev_add(tap_cdev, *tap_major, TAP_NUM_DEVS);
        if (err)
                goto out2;
index c57e85889751d06964ea0d9b13c651c8861620a7..f582d81a5091196f310aa59ca51fac2a5a596cac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the network team driver
 #
index 3c9985f299503ea65dad7eb3b47e2ab3bef87800..42bb820a56c92e812d93e66ae2e87a9e0648f001 100644 (file)
@@ -1286,6 +1286,7 @@ static struct sk_buff *tun_build_skb(struct tun_struct *tun,
        buflen += SKB_DATA_ALIGN(len + pad);
        rcu_read_unlock();
 
+       alloc_frag->offset = ALIGN((u64)alloc_frag->offset, SMP_CACHE_BYTES);
        if (unlikely(!skb_page_frag_refill(buflen, alloc_frag, GFP_KERNEL)))
                return ERR_PTR(-ENOMEM);
 
@@ -1496,11 +1497,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
        switch (tun->flags & TUN_TYPE_MASK) {
        case IFF_TUN:
                if (tun->flags & IFF_NO_PI) {
-                       switch (skb->data[0] & 0xf0) {
-                       case 0x40:
+                       u8 ip_version = skb->len ? (skb->data[0] >> 4) : 0;
+
+                       switch (ip_version) {
+                       case 4:
                                pi.proto = htons(ETH_P_IP);
                                break;
-                       case 0x60:
+                       case 6:
                                pi.proto = htons(ETH_P_IPV6);
                                break;
                        default:
@@ -2025,6 +2028,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
 
                if (!dev)
                        return -ENOMEM;
+               err = dev_get_valid_name(net, dev, name);
+               if (err < 0)
+                       goto err_free_dev;
 
                dev_net_set(dev, net);
                dev->rtnl_link_ops = &tun_link_ops;
@@ -2423,6 +2429,10 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
                        ret = -EFAULT;
                        break;
                }
+               if (sndbuf <= 0) {
+                       ret = -EINVAL;
+                       break;
+               }
 
                tun->sndbuf = sndbuf;
                tun_set_sndbuf(tun);
index 37fb46aee341a77bf734ea55999fd70c9b8eac3a..27307a4ab0034f08a142c3e48e693516d9422b8e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for USB Network drivers
 #
index 8ab281b478f23bd98d71b896a0c00c4fdba7dacc..3e7a3ac3a36236054b897bc7beda770a765a95e5 100644 (file)
@@ -54,11 +54,19 @@ static int is_wireless_rndis(struct usb_interface_descriptor *desc)
                desc->bInterfaceProtocol == 3);
 }
 
+static int is_novatel_rndis(struct usb_interface_descriptor *desc)
+{
+       return (desc->bInterfaceClass == USB_CLASS_MISC &&
+               desc->bInterfaceSubClass == 4 &&
+               desc->bInterfaceProtocol == 1);
+}
+
 #else
 
 #define is_rndis(desc)         0
 #define is_activesync(desc)    0
 #define is_wireless_rndis(desc)        0
+#define is_novatel_rndis(desc) 0
 
 #endif
 
@@ -150,7 +158,8 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
         */
        rndis = (is_rndis(&intf->cur_altsetting->desc) ||
                 is_activesync(&intf->cur_altsetting->desc) ||
-                is_wireless_rndis(&intf->cur_altsetting->desc));
+                is_wireless_rndis(&intf->cur_altsetting->desc) ||
+                is_novatel_rndis(&intf->cur_altsetting->desc));
 
        memset(info, 0, sizeof(*info));
        info->control = intf;
@@ -547,9 +556,12 @@ static const struct driver_info wwan_info = {
 #define REALTEK_VENDOR_ID      0x0bda
 #define SAMSUNG_VENDOR_ID      0x04e8
 #define LENOVO_VENDOR_ID       0x17ef
+#define LINKSYS_VENDOR_ID      0x13b1
 #define NVIDIA_VENDOR_ID       0x0955
 #define HP_VENDOR_ID           0x03f0
 #define MICROSOFT_VENDOR_ID    0x045e
+#define UBLOX_VENDOR_ID                0x1546
+#define TPLINK_VENDOR_ID       0x2357
 
 static const struct usb_device_id      products[] = {
 /* BLACKLIST !!
@@ -737,6 +749,15 @@ static const struct usb_device_id  products[] = {
        .driver_info = 0,
 },
 
+#if IS_ENABLED(CONFIG_USB_RTL8152)
+/* Linksys USB3GIGV1 Ethernet Adapter */
+{
+       USB_DEVICE_AND_INTERFACE_INFO(LINKSYS_VENDOR_ID, 0x0041, USB_CLASS_COMM,
+                       USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+       .driver_info = 0,
+},
+#endif
+
 /* ThinkPad USB-C Dock (based on Realtek RTL8153) */
 {
        USB_DEVICE_AND_INTERFACE_INFO(LENOVO_VENDOR_ID, 0x3062, USB_CLASS_COMM,
@@ -793,6 +814,13 @@ static const struct usb_device_id  products[] = {
        .driver_info = 0,
 },
 
+       /* TP-LINK UE300 USB 3.0 Ethernet Adapters (based on Realtek RTL8153) */
+{
+       USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, 0x0601, USB_CLASS_COMM,
+                       USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
+       .driver_info = 0,
+},
+
 /* WHITELIST!!!
  *
  * CDC Ether uses two interfaces, not necessarily consecutive.
@@ -843,12 +871,30 @@ static const struct usb_device_id products[] = {
        USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, 0x81ba, USB_CLASS_COMM,
                        USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
        .driver_info = (kernel_ulong_t)&wwan_info,
+}, {
+       /* Huawei ME906 and ME909 */
+       USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, USB_CLASS_COMM,
+                                     USB_CDC_SUBCLASS_ETHERNET,
+                                     USB_CDC_PROTO_NONE),
+       .driver_info = (unsigned long)&wwan_info,
 }, {
        /* ZTE modules */
        USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, USB_CLASS_COMM,
                                      USB_CDC_SUBCLASS_ETHERNET,
                                      USB_CDC_PROTO_NONE),
        .driver_info = (unsigned long)&zte_cdc_info,
+}, {
+       /* U-blox TOBY-L2 */
+       USB_DEVICE_AND_INTERFACE_INFO(UBLOX_VENDOR_ID, 0x1143, USB_CLASS_COMM,
+                                     USB_CDC_SUBCLASS_ETHERNET,
+                                     USB_CDC_PROTO_NONE),
+       .driver_info = (unsigned long)&wwan_info,
+}, {
+       /* U-blox SARA-U2 */
+       USB_DEVICE_AND_INTERFACE_INFO(UBLOX_VENDOR_ID, 0x1104, USB_CLASS_COMM,
+                                     USB_CDC_SUBCLASS_ETHERNET,
+                                     USB_CDC_PROTO_NONE),
+       .driver_info = (unsigned long)&wwan_info,
 }, {
        USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET,
                        USB_CDC_PROTO_NONE),
index b99a7fb09f8e31827a725151b415967699cdfa27..0161f77641fac8eafc1284a5457a7ccb273efc39 100644 (file)
@@ -1265,30 +1265,45 @@ static int lan78xx_ethtool_get_eeprom(struct net_device *netdev,
                                      struct ethtool_eeprom *ee, u8 *data)
 {
        struct lan78xx_net *dev = netdev_priv(netdev);
+       int ret;
+
+       ret = usb_autopm_get_interface(dev->intf);
+       if (ret)
+               return ret;
 
        ee->magic = LAN78XX_EEPROM_MAGIC;
 
-       return lan78xx_read_raw_eeprom(dev, ee->offset, ee->len, data);
+       ret = lan78xx_read_raw_eeprom(dev, ee->offset, ee->len, data);
+
+       usb_autopm_put_interface(dev->intf);
+
+       return ret;
 }
 
 static int lan78xx_ethtool_set_eeprom(struct net_device *netdev,
                                      struct ethtool_eeprom *ee, u8 *data)
 {
        struct lan78xx_net *dev = netdev_priv(netdev);
+       int ret;
+
+       ret = usb_autopm_get_interface(dev->intf);
+       if (ret)
+               return ret;
 
-       /* Allow entire eeprom update only */
-       if ((ee->magic == LAN78XX_EEPROM_MAGIC) &&
-           (ee->offset == 0) &&
-           (ee->len == 512) &&
-           (data[0] == EEPROM_INDICATOR))
-               return lan78xx_write_raw_eeprom(dev, ee->offset, ee->len, data);
+       /* Invalid EEPROM_INDICATOR at offset zero will result in a failure
+        * to load data from EEPROM
+        */
+       if (ee->magic == LAN78XX_EEPROM_MAGIC)
+               ret = lan78xx_write_raw_eeprom(dev, ee->offset, ee->len, data);
        else if ((ee->magic == LAN78XX_OTP_MAGIC) &&
                 (ee->offset == 0) &&
                 (ee->len == 512) &&
                 (data[0] == OTP_INDICATOR_1))
-               return lan78xx_write_raw_otp(dev, ee->offset, ee->len, data);
+               ret = lan78xx_write_raw_otp(dev, ee->offset, ee->len, data);
+
+       usb_autopm_put_interface(dev->intf);
 
-       return -EINVAL;
+       return ret;
 }
 
 static void lan78xx_get_strings(struct net_device *netdev, u32 stringset,
@@ -2434,7 +2449,6 @@ static int lan78xx_reset(struct lan78xx_net *dev)
        /* LAN7801 only has RGMII mode */
        if (dev->chipid == ID_REV_CHIP_ID_7801_)
                buf &= ~MAC_CR_GMII_EN_;
-       buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
        ret = lan78xx_write_reg(dev, MAC_CR, buf);
 
        ret = lan78xx_read_reg(dev, MAC_TX, &buf);
index ceb78e2ea4f0898ea2d4fbaeb4e8bc7e3439a077..d51d9abf7986b203350167d6a2fcdcfcddf8b972 100644 (file)
@@ -613,7 +613,9 @@ enum rtl8152_flags {
 #define VENDOR_ID_MICROSOFT            0x045e
 #define VENDOR_ID_SAMSUNG              0x04e8
 #define VENDOR_ID_LENOVO               0x17ef
+#define VENDOR_ID_LINKSYS              0x13b1
 #define VENDOR_ID_NVIDIA               0x0955
+#define VENDOR_ID_TPLINK               0x2357
 
 #define MCU_TYPE_PLA                   0x0100
 #define MCU_TYPE_USB                   0x0000
@@ -5316,7 +5318,9 @@ static const struct usb_device_id rtl8152_table[] = {
        {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x7205)},
        {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x720c)},
        {REALTEK_USB_DEVICE(VENDOR_ID_LENOVO,  0x7214)},
+       {REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041)},
        {REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA,  0x09ff)},
+       {REALTEK_USB_DEVICE(VENDOR_ID_TPLINK,  0x0601)},
        {}
 };
 
index a151f267aebb9c47312f724729e4c2755cb7512b..b807c91abe1da94fc16c7eca39c0de3a1e2070a3 100644 (file)
@@ -632,6 +632,10 @@ static const struct usb_device_id  products [] = {
        /* RNDIS for tethering */
        USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3),
        .driver_info = (unsigned long) &rndis_info,
+}, {
+       /* Novatel Verizon USB730L */
+       USB_INTERFACE_INFO(USB_CLASS_MISC, 4, 1),
+       .driver_info = (unsigned long) &rndis_info,
 },
        { },            // END
 };
index 9b243e6f3008bb5319844412cd49db1cd7bce594..7dc3bcac350666396cf943fdcb583e0d97c6bf8e 100644 (file)
@@ -1165,7 +1165,7 @@ static int vrf_fib_rule(const struct net_device *dev, __u8 family, bool add_it)
        frh->family = family;
        frh->action = FR_ACT_TO_TBL;
 
-       if (nla_put_u32(skb, FRA_L3MDEV, 1))
+       if (nla_put_u8(skb, FRA_L3MDEV, 1))
                goto nla_put_failure;
 
        if (nla_put_u32(skb, FRA_PRIORITY, FIB_RULE_PREF))
index 73c2326603fcc96393c5809020ed21c87c11724d..9532e69fda8781eb5a18dfd181703b9d399d7a85 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux network (wan) device drivers.
 #
index 10963e8f4b393faf42fdbe4de420cf9309453e6f..24529996c8721cb59d465c64ef3a8f974731d98b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HD64570_H
 #define __HD64570_H
 
index 63f749078a1f1051f3f46bec13f1f60c7c64ea5f..0e3f8ed84660e9363552cbf52fc31bff004a08c3 100644 (file)
@@ -346,7 +346,6 @@ out:
 fail:
        dev_put(dev);
        free_netdev(ndev);
-       kfree(lapbeth);
        goto out;
 }
 
index 4ced7ac16c2c643ea32e578ff35bfc4557c70065..38961793adad69cae411999831afec41c85d80ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LMC_H_
 #define _LMC_H_
 
index 15049d711f470c5d44abde9cc300d9510b7eccb5..f999db788506ea35677bab60eb20c5f8838fe8e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/netdevice.h>
 #include <linux/interrupt.h>
index 2d46f121549fd6b9ac2a9e482ef8ba2923e3a436..820adcae5d6705551fbc4bb6fab1037c55f33fb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LMC_DEBUG_H_
 #define _LMC_DEBUG_H_
 
index 662148c54644a93ff32a420c93ea87cfa22d2475..bb098e443776376fffd0a0da9f6be9c4fa76aa86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LMC_PROTO_H_
 #define _LMC_PROTO_H_
 
index f57ee67836aea02fc58ff782e38a1b8e3302c94d..eb4a4216ee94e972dd13f0edd19eb4cc677fb453 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_X25_ASY_H
 #define _LINUX_X25_ASY_H
 
index 2416a9d60bd69e4781efcede38e93af611264e00..32ae710d4f40de11d8e4e1542fc523da1565a7cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Description of Z8530 Z85C30 and Z85230 communications chips
  *
index f6d19c348082ecc9801955aa19ac13a16c0e7187..b1db1eff0648430619cc7c923111d5284b7f0e96 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_WIMAX_I2400M) += i2400m.o
 obj-$(CONFIG_WIMAX_I2400M_USB) += i2400m-usb.o
index c9c711dcd0e6bb9d7ce988f42bc7e6dd7877a37b..a89b5685e68b36d5735bc9591f97f621440cb424 100644 (file)
@@ -652,7 +652,7 @@ static int i2400m_download_chunk(struct i2400m *i2400m, const void *chunk,
        struct device *dev = i2400m_dev(i2400m);
        struct {
                struct i2400m_bootrom_header cmd;
-               u8 cmd_payload[chunk_len];
+               u8 cmd_payload[];
        } __packed *buf;
        struct i2400m_bootrom_header ack;
 
index 54b41ac5f9c88288460c10e929c1c72250a0c15e..7fc96306712ac745258f5b5eef63b81b0a24c0a3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Wireless network device drivers.
 #
index bbc10b1cde876e2752ae3b2f7b6770997844fcda..2c55c629de283f7c2a2482afed467ab9a0eeea1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ADM8211_H
 #define ADM8211_H
 
index 4cdebc7659dd894220bf10bc6e2204ce5c37a257..e4e460b5498e1e457353e022e1715134a5e07dab 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ATH5K)            += ath5k/
 obj-$(CONFIG_ATH9K_HW)         += ath9k/
 obj-$(CONFIG_CARL9170)         += carl9170/
index 899b9b79f4ceb0e6d265d0be148e597978b9b46f..9492177e906332c621dd2aee95b2e28a808ffc54 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ATH10K) += ath10k_core.o
 ath10k_core-y += mac.o \
                 debug.o \
index a3f5dc78353fb2fdddbdb6806457b2bc2ece2ac8..0aeeb233af780469fcc907ba5ee0bb53086d606a 100644 (file)
@@ -550,6 +550,11 @@ static int ath10k_htt_rx_crypto_param_len(struct ath10k *ar,
                return IEEE80211_TKIP_IV_LEN;
        case HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2:
                return IEEE80211_CCMP_HDR_LEN;
+       case HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2:
+               return IEEE80211_CCMP_256_HDR_LEN;
+       case HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2:
+       case HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2:
+               return IEEE80211_GCMP_HDR_LEN;
        case HTT_RX_MPDU_ENCRYPT_WEP128:
        case HTT_RX_MPDU_ENCRYPT_WAPI:
                break;
@@ -575,6 +580,11 @@ static int ath10k_htt_rx_crypto_tail_len(struct ath10k *ar,
                return IEEE80211_TKIP_ICV_LEN;
        case HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2:
                return IEEE80211_CCMP_MIC_LEN;
+       case HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2:
+               return IEEE80211_CCMP_256_MIC_LEN;
+       case HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2:
+       case HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2:
+               return IEEE80211_GCMP_MIC_LEN;
        case HTT_RX_MPDU_ENCRYPT_WEP128:
        case HTT_RX_MPDU_ENCRYPT_WAPI:
                break;
@@ -1051,9 +1061,21 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar,
        hdr = (void *)msdu->data;
 
        /* Tail */
-       if (status->flag & RX_FLAG_IV_STRIPPED)
+       if (status->flag & RX_FLAG_IV_STRIPPED) {
                skb_trim(msdu, msdu->len -
                         ath10k_htt_rx_crypto_tail_len(ar, enctype));
+       } else {
+               /* MIC */
+               if ((status->flag & RX_FLAG_MIC_STRIPPED) &&
+                   enctype == HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2)
+                       skb_trim(msdu, msdu->len - 8);
+
+               /* ICV */
+               if (status->flag & RX_FLAG_ICV_STRIPPED &&
+                   enctype != HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2)
+                       skb_trim(msdu, msdu->len -
+                                ath10k_htt_rx_crypto_tail_len(ar, enctype));
+       }
 
        /* MMIC */
        if ((status->flag & RX_FLAG_MMIC_STRIPPED) &&
@@ -1075,7 +1097,8 @@ static void ath10k_htt_rx_h_undecap_raw(struct ath10k *ar,
 static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar,
                                          struct sk_buff *msdu,
                                          struct ieee80211_rx_status *status,
-                                         const u8 first_hdr[64])
+                                         const u8 first_hdr[64],
+                                         enum htt_rx_mpdu_encrypt_type enctype)
 {
        struct ieee80211_hdr *hdr;
        struct htt_rx_desc *rxd;
@@ -1083,6 +1106,7 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar,
        u8 da[ETH_ALEN];
        u8 sa[ETH_ALEN];
        int l3_pad_bytes;
+       int bytes_aligned = ar->hw_params.decap_align_bytes;
 
        /* Delivered decapped frame:
         * [nwifi 802.11 header] <-- replaced with 802.11 hdr
@@ -1111,6 +1135,14 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar,
        /* push original 802.11 header */
        hdr = (struct ieee80211_hdr *)first_hdr;
        hdr_len = ieee80211_hdrlen(hdr->frame_control);
+
+       if (!(status->flag & RX_FLAG_IV_STRIPPED)) {
+               memcpy(skb_push(msdu,
+                               ath10k_htt_rx_crypto_param_len(ar, enctype)),
+                      (void *)hdr + round_up(hdr_len, bytes_aligned),
+                       ath10k_htt_rx_crypto_param_len(ar, enctype));
+       }
+
        memcpy(skb_push(msdu, hdr_len), hdr, hdr_len);
 
        /* original 802.11 header has a different DA and in
@@ -1171,6 +1203,7 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar,
        u8 sa[ETH_ALEN];
        int l3_pad_bytes;
        struct htt_rx_desc *rxd;
+       int bytes_aligned = ar->hw_params.decap_align_bytes;
 
        /* Delivered decapped frame:
         * [eth header] <-- replaced with 802.11 hdr & rfc1042/llc
@@ -1199,6 +1232,14 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar,
        /* push original 802.11 header */
        hdr = (struct ieee80211_hdr *)first_hdr;
        hdr_len = ieee80211_hdrlen(hdr->frame_control);
+
+       if (!(status->flag & RX_FLAG_IV_STRIPPED)) {
+               memcpy(skb_push(msdu,
+                               ath10k_htt_rx_crypto_param_len(ar, enctype)),
+                      (void *)hdr + round_up(hdr_len, bytes_aligned),
+                       ath10k_htt_rx_crypto_param_len(ar, enctype));
+       }
+
        memcpy(skb_push(msdu, hdr_len), hdr, hdr_len);
 
        /* original 802.11 header has a different DA and in
@@ -1212,12 +1253,14 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar,
 static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar,
                                         struct sk_buff *msdu,
                                         struct ieee80211_rx_status *status,
-                                        const u8 first_hdr[64])
+                                        const u8 first_hdr[64],
+                                        enum htt_rx_mpdu_encrypt_type enctype)
 {
        struct ieee80211_hdr *hdr;
        size_t hdr_len;
        int l3_pad_bytes;
        struct htt_rx_desc *rxd;
+       int bytes_aligned = ar->hw_params.decap_align_bytes;
 
        /* Delivered decapped frame:
         * [amsdu header] <-- replaced with 802.11 hdr
@@ -1233,6 +1276,14 @@ static void ath10k_htt_rx_h_undecap_snap(struct ath10k *ar,
 
        hdr = (struct ieee80211_hdr *)first_hdr;
        hdr_len = ieee80211_hdrlen(hdr->frame_control);
+
+       if (!(status->flag & RX_FLAG_IV_STRIPPED)) {
+               memcpy(skb_push(msdu,
+                               ath10k_htt_rx_crypto_param_len(ar, enctype)),
+                      (void *)hdr + round_up(hdr_len, bytes_aligned),
+                       ath10k_htt_rx_crypto_param_len(ar, enctype));
+       }
+
        memcpy(skb_push(msdu, hdr_len), hdr, hdr_len);
 }
 
@@ -1267,13 +1318,15 @@ static void ath10k_htt_rx_h_undecap(struct ath10k *ar,
                                            is_decrypted);
                break;
        case RX_MSDU_DECAP_NATIVE_WIFI:
-               ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr);
+               ath10k_htt_rx_h_undecap_nwifi(ar, msdu, status, first_hdr,
+                                             enctype);
                break;
        case RX_MSDU_DECAP_ETHERNET2_DIX:
                ath10k_htt_rx_h_undecap_eth(ar, msdu, status, first_hdr, enctype);
                break;
        case RX_MSDU_DECAP_8023_SNAP_LLC:
-               ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr);
+               ath10k_htt_rx_h_undecap_snap(ar, msdu, status, first_hdr,
+                                            enctype);
                break;
        }
 }
@@ -1316,7 +1369,8 @@ static void ath10k_htt_rx_h_csum_offload(struct sk_buff *msdu)
 
 static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
                                 struct sk_buff_head *amsdu,
-                                struct ieee80211_rx_status *status)
+                                struct ieee80211_rx_status *status,
+                                bool fill_crypt_header)
 {
        struct sk_buff *first;
        struct sk_buff *last;
@@ -1326,7 +1380,6 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
        enum htt_rx_mpdu_encrypt_type enctype;
        u8 first_hdr[64];
        u8 *qos;
-       size_t hdr_len;
        bool has_fcs_err;
        bool has_crypto_err;
        bool has_tkip_err;
@@ -1351,15 +1404,17 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
         * decapped header. It'll be used for undecapping of each MSDU.
         */
        hdr = (void *)rxd->rx_hdr_status;
-       hdr_len = ieee80211_hdrlen(hdr->frame_control);
-       memcpy(first_hdr, hdr, hdr_len);
+       memcpy(first_hdr, hdr, RX_HTT_HDR_STATUS_LEN);
 
        /* Each A-MSDU subframe will use the original header as the base and be
         * reported as a separate MSDU so strip the A-MSDU bit from QoS Ctl.
         */
        hdr = (void *)first_hdr;
-       qos = ieee80211_get_qos_ctl(hdr);
-       qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
+
+       if (ieee80211_is_data_qos(hdr->frame_control)) {
+               qos = ieee80211_get_qos_ctl(hdr);
+               qos[0] &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT;
+       }
 
        /* Some attention flags are valid only in the last MSDU. */
        last = skb_peek_tail(amsdu);
@@ -1406,9 +1461,14 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
                status->flag |= RX_FLAG_DECRYPTED;
 
                if (likely(!is_mgmt))
-                       status->flag |= RX_FLAG_IV_STRIPPED |
-                                       RX_FLAG_MMIC_STRIPPED;
-}
+                       status->flag |= RX_FLAG_MMIC_STRIPPED;
+
+               if (fill_crypt_header)
+                       status->flag |= RX_FLAG_MIC_STRIPPED |
+                                       RX_FLAG_ICV_STRIPPED;
+               else
+                       status->flag |= RX_FLAG_IV_STRIPPED;
+       }
 
        skb_queue_walk(amsdu, msdu) {
                ath10k_htt_rx_h_csum_offload(msdu);
@@ -1424,6 +1484,9 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
                if (is_mgmt)
                        continue;
 
+               if (fill_crypt_header)
+                       continue;
+
                hdr = (void *)msdu->data;
                hdr->frame_control &= ~__cpu_to_le16(IEEE80211_FCTL_PROTECTED);
        }
@@ -1434,6 +1497,9 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar,
                                    struct ieee80211_rx_status *status)
 {
        struct sk_buff *msdu;
+       struct sk_buff *first_subframe;
+
+       first_subframe = skb_peek(amsdu);
 
        while ((msdu = __skb_dequeue(amsdu))) {
                /* Setup per-MSDU flags */
@@ -1442,6 +1508,13 @@ static void ath10k_htt_rx_h_deliver(struct ath10k *ar,
                else
                        status->flag |= RX_FLAG_AMSDU_MORE;
 
+               if (msdu == first_subframe) {
+                       first_subframe = NULL;
+                       status->flag &= ~RX_FLAG_ALLOW_SAME_PN;
+               } else {
+                       status->flag |= RX_FLAG_ALLOW_SAME_PN;
+               }
+
                ath10k_process_rx(ar, status, msdu);
        }
 }
@@ -1584,7 +1657,7 @@ static int ath10k_htt_rx_handle_amsdu(struct ath10k_htt *htt)
                ath10k_htt_rx_h_unchain(ar, &amsdu);
 
        ath10k_htt_rx_h_filter(ar, &amsdu, rx_status);
-       ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status);
+       ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status, true);
        ath10k_htt_rx_h_deliver(ar, &amsdu, rx_status);
 
        return num_msdus;
@@ -1745,8 +1818,7 @@ static void ath10k_htt_rx_delba(struct ath10k *ar, struct htt_resp *resp)
 }
 
 static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list,
-                                      struct sk_buff_head *amsdu,
-                                      int budget_left)
+                                      struct sk_buff_head *amsdu)
 {
        struct sk_buff *msdu;
        struct htt_rx_desc *rxd;
@@ -1757,9 +1829,8 @@ static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list,
        if (WARN_ON(!skb_queue_empty(amsdu)))
                return -EINVAL;
 
-       while ((msdu = __skb_dequeue(list)) && budget_left) {
+       while ((msdu = __skb_dequeue(list))) {
                __skb_queue_tail(amsdu, msdu);
-               budget_left--;
 
                rxd = (void *)msdu->data - sizeof(*rxd);
                if (rxd->msdu_end.common.info0 &
@@ -1850,8 +1921,7 @@ static int ath10k_htt_rx_h_rx_offload(struct ath10k *ar,
        return num_msdu;
 }
 
-static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb,
-                                   int budget_left)
+static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
 {
        struct ath10k_htt *htt = &ar->htt;
        struct htt_resp *resp = (void *)skb->data;
@@ -1908,9 +1978,9 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb,
        if (offload)
                num_msdus = ath10k_htt_rx_h_rx_offload(ar, &list);
 
-       while (!skb_queue_empty(&list) && budget_left) {
+       while (!skb_queue_empty(&list)) {
                __skb_queue_head_init(&amsdu);
-               ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu, budget_left);
+               ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu);
                switch (ret) {
                case 0:
                        /* Note: The in-order indication may report interleaved
@@ -1920,10 +1990,9 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb,
                         * should still give an idea about rx rate to the user.
                         */
                        num_msdus += skb_queue_len(&amsdu);
-                       budget_left -= skb_queue_len(&amsdu);
                        ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id);
                        ath10k_htt_rx_h_filter(ar, &amsdu, status);
-                       ath10k_htt_rx_h_mpdu(ar, &amsdu, status);
+                       ath10k_htt_rx_h_mpdu(ar, &amsdu, status, false);
                        ath10k_htt_rx_h_deliver(ar, &amsdu, status);
                        break;
                case -EAGAIN:
@@ -2563,8 +2632,7 @@ int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget)
                }
 
                spin_lock_bh(&htt->rx_ring.lock);
-               num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb,
-                                                       (budget - quota));
+               num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb);
                spin_unlock_bh(&htt->rx_ring.lock);
                if (num_rx_msdus < 0) {
                        resched_napi = true;
index bc1633945a564e850152a415ce04b3f4500bd51d..195dafb98131443a7b678e2fb82aa81c55f6591f 100644 (file)
@@ -3396,9 +3396,7 @@ static void ath10k_pci_remove(struct pci_dev *pdev)
 
 MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table);
 
-#ifdef CONFIG_PM
-
-static int ath10k_pci_pm_suspend(struct device *dev)
+static __maybe_unused int ath10k_pci_pm_suspend(struct device *dev)
 {
        struct ath10k *ar = dev_get_drvdata(dev);
        int ret;
@@ -3414,7 +3412,7 @@ static int ath10k_pci_pm_suspend(struct device *dev)
        return ret;
 }
 
-static int ath10k_pci_pm_resume(struct device *dev)
+static __maybe_unused int ath10k_pci_pm_resume(struct device *dev)
 {
        struct ath10k *ar = dev_get_drvdata(dev);
        int ret;
@@ -3433,7 +3431,6 @@ static int ath10k_pci_pm_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(ath10k_pci_pm_ops,
                         ath10k_pci_pm_suspend,
                         ath10k_pci_pm_resume);
-#endif
 
 static struct pci_driver ath10k_pci_driver = {
        .name = "ath10k_pci",
index c1022a1cf8555b97b91af020185b810a05899bf8..28da143989518f625498d25d4614165712fe0121 100644 (file)
@@ -239,6 +239,9 @@ enum htt_rx_mpdu_encrypt_type {
        HTT_RX_MPDU_ENCRYPT_WAPI             = 5,
        HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2     = 6,
        HTT_RX_MPDU_ENCRYPT_NONE             = 7,
+       HTT_RX_MPDU_ENCRYPT_AES_CCM256_WPA2  = 8,
+       HTT_RX_MPDU_ENCRYPT_AES_GCMP_WPA2    = 9,
+       HTT_RX_MPDU_ENCRYPT_AES_GCMP256_WPA2 = 10,
 };
 
 #define RX_MPDU_START_INFO0_PEER_IDX_MASK     0x000007ff
index 1b3a34f7f224d03c3bf0fbe53f9b85ae6f680252..a8724eee21f8a26d04ed88d637c6cbf6cad62490 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ath5k-y                                += caps.o
 ath5k-y                                += initvals.o
 ath5k-y                                += eeprom.o
index 04cf0ca726108629784e67d1bf4901f357f4c6dd..25978c732fe13f2dbcb12a77ccf37e675491bf4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/device.h>
index c6eef519bb61a888714bddd148c8f73b9766d570..a41e3bf42dfc877894376ba7034d650654708f3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(__TRACE_ATH5K_H) || defined(TRACE_HEADER_MULTI_READ)
 #define __TRACE_ATH5K_H
 
index 1a1ea7881b4dce8ef78b5302f154921829a3ce2a..91e735cfdef7322dcfaf71c7704c6c5f28c2d381 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_ATH6KL_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 
 #include <net/cfg80211.h>
index 36a40ffdce151d107c11b1bd78f964a9ca20062a..d804ce7391a0ee88cd544cb1eeb2dc7f128b0d3b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ath9k-y +=     beacon.o \
                gpio.o \
                init.o \
index a0410fe8c03a1f93758273cd36845701f1daf292..9a44d004c206ae42d1d86d142cd8845b20771ca8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CARL9170_SHARED_VERSION_H
 #define __CARL9170_SHARED_VERSION_H
 #define CARL9170FW_VERSION_YEAR 16
index 50c43b4382bacd91c9ff8380a1af0eaaafea5ba1..3b09435104eb4771791625abe58bd2317bdced04 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_WCN36XX) := wcn36xx.o
 wcn36xx-y +=   main.o \
                dxe.o \
index 35bd50bcbbd51e2615c7b63108fbff8d78ced466..b83f01d6e3ddd842e115a19266cb79d4dfcc6421 100644 (file)
@@ -812,7 +812,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
                        if (!sta) {
                                wcn36xx_err("sta %pM is not found\n",
                                              bss_conf->bssid);
-                               rcu_read_unlock();
                                goto out;
                        }
                        sta_priv = wcn36xx_sta_to_priv(sta);
index d27efe83748be1b299a8018b44a834e88da5ca2a..398edd2a7f2b4b2957e83ce1e19d13e7b75eecdd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_WIL6210) += wil6210.o
 
 wil6210-y := main.o
index 27fab958e3d59e5288624472d955dac67bafc169..54f92ce49bb81f7b42ce984696a75df4c3507869 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 b43-y                          += main.o
 b43-y                          += bus.o
 b43-$(CONFIG_B43_PHY_G)                += phy_g.o tables.o lo.o wa.o
index d7d42f0b80c3d2f3d73ab6affd2a4ebebb9f1f1f..b77d1a904f7e68f29fc73f34ef8defdf4fb71c56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_H_
 #define B43_H_
 
index 256c2c17939afe7720a643bae1c32187a9850bc5..2a695f9e528b296bbaf0b60c8d4a47dc64b974ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_BUS_H_
 #define B43_BUS_H_
 
index d05377745011de094734dcd453e74d792d5d429c..0bf437c86c67ea214712015f968b7800063e6447 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_DEBUGFS_H_
 #define B43_DEBUGFS_H_
 
index df8c8cdcbdb53d614766f7f5a7aa8239bd269271..c2a357219d4b87774e1e9fbbb705de9f5b4ed082 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_DMA_H_
 #define B43_DMA_H_
 
index 32b66d53cdac4579100af72cf8a92b784545b37b..5ebd1b2b174991cb6b27e323f7abe3bd3dbde601 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_LEDS_H_
 #define B43_LEDS_H_
 
index 7b4df3883bc24ed4f98ef7e8ca755c2304d3a1ad..66e07ab79c51cdd7162b97a65c8ba76e1df2d1ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_LO_H_
 #define B43_LO_H_
 
index 0a92d01c21f98a6f83d23ad72dde9bb69f658581..b1cbfc02beb649856fbc6342553294862e7e1643 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_B43_PHY_A_H_
 #define LINUX_B43_PHY_A_H_
 
index d1ca79e0eb24a344bf3258f087304814925c879e..02eb6c08670df1f9a093211346d60b34aebb8472 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_PHY_AC_H_
 #define B43_PHY_AC_H_
 
index ced054a9850c84601416c871baec7b3cede2405d..57a1ad8afa08734a22f61a6092bd5e0e544faa60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_B43_PHY_COMMON_H_
 #define LINUX_B43_PHY_COMMON_H_
 
index 5413c906a3e7dba5c6ea81663e94ae303bcfc048..a27b8603c75fcd9f5db92ed2e6eac61509095087 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_B43_PHY_G_H_
 #define LINUX_B43_PHY_G_H_
 
index c086f56ce4785e9c1758995375ea400b23795ac3..0467538574932de82953b7035e62afafd7a279ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_PHY_HT_H_
 #define B43_PHY_HT_H_
 
index 6a7092e13fff95244bbc9c11ff688f9d5686f38f..0b1cfaf6394c75687b8ff625e7195830da209507 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_PHY_LCN_H_
 #define B43_PHY_LCN_H_
 
index 62737f700cbcac4926912c36d0e376eb5fa8ec1b..50bef2ea6e5238a4a8522df1ace4c99d0177878f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_B43_PHY_LP_H_
 #define LINUX_B43_PHY_LP_H_
 
index a6da2c31a99cf7c2dcc646b674eb2b35d6133ef8..b96ded0ef5394cf2d5d851eca1839142bdbf6e7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_NPHY_H_
 #define B43_NPHY_H_
 
index 1e516147424ff2e22e510643312a9ac9ab66ae51..ffbfec622f82cae882efdd49f23f9dd2cc771418 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_PIO_H_
 #define B43_PIO_H_
 
index 24d7447e9f01e51e4ad69c935f5c58cc28567851..094389f9f4775dd1a465e2a2685897341a2ecf74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_B43_PPR_H_
 #define LINUX_B43_PPR_H_
 
index 67f96122f8d85a9805ccfff6ae57cd5c85555ea4..ad7271cde0015124c11cc946bc33a8bb0a47b169 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_RADIO_2055_H_
 #define B43_RADIO_2055_H_
 
index 5b86673459faa16adbc42105717df7f73d7371e9..59297fdce5e3848646145ba9c338f62a205354cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_RADIO_2056_H_
 #define B43_RADIO_2056_H_
 
index 220d080238ff8805816eef0b127d990045fa1082..d7959da77b51e3bb58f423adde832d3350c84ff5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_RADIO_2057_H_
 #define B43_RADIO_2057_H_
 
index 9e22fb60588b2204f58cf3506498cc80342eb43d..32c0025bce9d4fe815b402c53cc9305fce3efbad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_RADIO_2059_H_
 #define B43_RADIO_2059_H_
 
index f046c3ca0519bde676955a74b4074c26e8a39caf..8682ac5b828a645944ff234458faf866a6190f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_RFKILL_H_
 #define B43_RFKILL_H_
 
index 1e93926f388f3a65fa6ef412b1a9fb042869f874..aa5693b123ad12a0b4babf936ed8782fe2324fad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_SDIO_H_
 #define B43_SDIO_H_
 
index 12bda9ef1a85cad8bcafb6c2e1318eccbb91daac..e70e6cff3c53402ce8852df2206817b625569742 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_SYSFS_H_
 #define B43_SYSFS_H_
 
index 80e73c7cbac5695c4b1620a9f729d4ca652dad37..3b0777f15f3e44434acf80e58230d826470c511c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_TABLES_H_
 #define B43_TABLES_H_
 
index 84f1d265f657c27b57c62a1ac72e4c6f6b7cd310..62002098bbdac920d5c5a4b0c06a8e6cb94d6171 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_TABLES_LPPHY_H_
 #define B43_TABLES_LPPHY_H_
 
index b51f386db02fa8faf40a98481110b251d2295fe7..3876786d26925b7762a6f8cff300d5d5abe6fa2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_TABLES_NPHY_H_
 #define B43_TABLES_NPHY_H_
 
index 1b5ef2bc770c2b19e50e908c0fbc8992ec8e8964..7ed057118ae310bd202d29440bef69403d618e95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_TABLES_PHY_HT_H_
 #define B43_TABLES_PHY_HT_H_
 
index caff9db6831fb39e82570c90e87cf8cb96d2f151..5ea6c15e851e749b58530b0728276a7e68cf0ce4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_TABLES_PHY_LCN_H_
 #define B43_TABLES_PHY_LCN_H_
 
index e163c5e56e81c7e7695e851327da458b91bc853d..f3459b99d83b33ac3b1eefa5abc2ead50b879ec1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_WA_H_
 #define B43_WA_H_
 
index ba611530806812f9359beabd2149a9ff10ea8f22..6524a75bb73b91d425ff526c90c070aa28f8d9ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43_XMIT_H_
 #define B43_XMIT_H_
 
index 227a77e8436215944948079bb631311cfe5c41be..f8b392f09009cf44372ba7536521d73d391fac3b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # b43legacy core
 b43legacy-y                            += main.o
 b43legacy-y                            += ilt.o
index 482476fdb1f39299062d5a8bb3857ccafe45dc1a..6b0cec467938fc555f23f0d464086afec69181d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_H_
 #define B43legacy_H_
 
index 9ee32158b947332fc24227e45fadc7a706578287..7a37764406b1b661397e81a6679e6c10f8c48bce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_DEBUGFS_H_
 #define B43legacy_DEBUGFS_H_
 
index c3282f906bc7bd2c108a15e9c3d985efd0eb3668..b5c1a51db2a469e01fa73323c389d28980f9b382 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_DMA_H_
 #define B43legacy_DMA_H_
 
index 48bcf37eccb8080a66e619a085757874a7163627..ce7a61e2efb11223eeb3870b2329685ed84b5616 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_ILT_H_
 #define B43legacy_ILT_H_
 
index 9ff6750dc57fda719a425772ccf920447bf6c20d..389ae06a2d103904fc801b3d02f0d1d164cc961e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_LEDS_H_
 #define B43legacy_LEDS_H_
 
index 8e6773ea6e754d922c482449563dc8d164d1bd1d..1cd1b9ca5e9c4cc3fe656c7b2f31bb43d0808de5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_PIO_H_
 #define B43legacy_PIO_H_
 
index 75585571c544872a3f476222aa16161879ad206d..7f314eb815d4b96a484ef843681accb12082ed8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_RFKILL_H_
 #define B43legacy_RFKILL_H_
 
index 417d509803c708623fe91db1f54d6953daccd914..ea9d783e6796b746f32bb68d680b35bec27f7caf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_SYSFS_H_
 #define B43legacy_SYSFS_H_
 
index 289db00a4a7b17e3f72b67db58c0eda6d7318390..e4ef869f0b8c8a124121b0ae1643b98dc21d00c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef B43legacy_XMIT_H_
 #define B43legacy_XMIT_H_
 
index aaed4ab503ad16c6f4de0e3ccec5b83c3f85c6a1..4157c90ad9736b9b20ab086585eca22ff80a60c9 100644 (file)
@@ -980,7 +980,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
 
        eth_broadcast_addr(params_le->bssid);
        params_le->bss_type = DOT11_BSSTYPE_ANY;
-       params_le->scan_type = 0;
+       params_le->scan_type = BRCMF_SCANTYPE_ACTIVE;
        params_le->channel_num = 0;
        params_le->nprobes = cpu_to_le32(-1);
        params_le->active_time = cpu_to_le32(-1);
@@ -988,12 +988,9 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
        params_le->home_time = cpu_to_le32(-1);
        memset(&params_le->ssid_le, 0, sizeof(params_le->ssid_le));
 
-       /* if request is null exit so it will be all channel broadcast scan */
-       if (!request)
-               return;
-
        n_ssids = request->n_ssids;
        n_channels = request->n_channels;
+
        /* Copy channel array if applicable */
        brcmf_dbg(SCAN, "### List of channelspecs to scan ### %d\n",
                  n_channels);
@@ -1030,16 +1027,8 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
                        ptr += sizeof(ssid_le);
                }
        } else {
-               brcmf_dbg(SCAN, "Broadcast scan %p\n", request->ssids);
-               if ((request->ssids) && request->ssids->ssid_len) {
-                       brcmf_dbg(SCAN, "SSID %s len=%d\n",
-                                 params_le->ssid_le.SSID,
-                                 request->ssids->ssid_len);
-                       params_le->ssid_le.SSID_len =
-                               cpu_to_le32(request->ssids->ssid_len);
-                       memcpy(&params_le->ssid_le.SSID, request->ssids->ssid,
-                               request->ssids->ssid_len);
-               }
+               brcmf_dbg(SCAN, "Performing passive scan\n");
+               params_le->scan_type = BRCMF_SCANTYPE_PASSIVE;
        }
        /* Adding mask to channel numbers */
        params_le->channel_num =
@@ -3162,6 +3151,7 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
        struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
        s32 status;
        struct brcmf_escan_result_le *escan_result_le;
+       u32 escan_buflen;
        struct brcmf_bss_info_le *bss_info_le;
        struct brcmf_bss_info_le *bss = NULL;
        u32 bi_length;
@@ -3181,11 +3171,23 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
 
        if (status == BRCMF_E_STATUS_PARTIAL) {
                brcmf_dbg(SCAN, "ESCAN Partial result\n");
+               if (e->datalen < sizeof(*escan_result_le)) {
+                       brcmf_err("invalid event data length\n");
+                       goto exit;
+               }
                escan_result_le = (struct brcmf_escan_result_le *) data;
                if (!escan_result_le) {
                        brcmf_err("Invalid escan result (NULL pointer)\n");
                        goto exit;
                }
+               escan_buflen = le32_to_cpu(escan_result_le->buflen);
+               if (escan_buflen > BRCMF_ESCAN_BUF_SIZE ||
+                   escan_buflen > e->datalen ||
+                   escan_buflen < sizeof(*escan_result_le)) {
+                       brcmf_err("Invalid escan buffer length: %d\n",
+                                 escan_buflen);
+                       goto exit;
+               }
                if (le16_to_cpu(escan_result_le->bss_count) != 1) {
                        brcmf_err("Invalid bss_count %d: ignoring\n",
                                  escan_result_le->bss_count);
@@ -3202,9 +3204,8 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
                }
 
                bi_length = le32_to_cpu(bss_info_le->length);
-               if (bi_length != (le32_to_cpu(escan_result_le->buflen) -
-                                       WL_ESCAN_RESULTS_FIXED_SIZE)) {
-                       brcmf_err("Invalid bss_info length %d: ignoring\n",
+               if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) {
+                       brcmf_err("Ignoring invalid bss_info length: %d\n",
                                  bi_length);
                        goto exit;
                }
index 4eb1e1ce9aceccc9214657fa6081ba5327c021ca..ef72baf6dd969c2478a2138ea57b9f691fdf12d8 100644 (file)
@@ -429,7 +429,8 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr,
        if (code != BRCMF_E_IF && !fweh->evt_handler[code])
                return;
 
-       if (datalen > BRCMF_DCMD_MAXLEN)
+       if (datalen > BRCMF_DCMD_MAXLEN ||
+           datalen + sizeof(*event_packet) > packet_len)
                return;
 
        if (in_interrupt())
index 8391989b188297b2736b1c1a2375a97f84e0dd4a..e0d22fedb2b45932f04a35458f44408804b23d90 100644 (file)
 #define BRCMF_SCAN_PARAMS_COUNT_MASK   0x0000ffff
 #define BRCMF_SCAN_PARAMS_NSSID_SHIFT  16
 
+/* scan type definitions */
+#define BRCMF_SCANTYPE_DEFAULT         0xFF
+#define BRCMF_SCANTYPE_ACTIVE          0
+#define BRCMF_SCANTYPE_PASSIVE         1
+
 #define BRCMF_WSEC_MAX_PSK_LEN         32
 #define        BRCMF_WSEC_PASSPHRASE           BIT(0)
 
index 74b17cecb189145c05f3ea746bf6a689908f7d73..c0a5449ed72ccb1831449dbd66d67858bae01153 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <net/mac80211.h>
 #include <linux/bcma/bcma_driver_chipcommon.h>
 #include <linux/gpio.h>
index b3aab2fe96eb79f751d46c0f309f33eb6042d025..ef685465f80ad6f7ae84b0763ca8afd4d8f1ea73 100644 (file)
@@ -14764,8 +14764,8 @@ static void wlc_phy_ipa_restore_tx_digi_filts_nphy(struct brcms_phy *pi)
 }
 
 static void
-wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, u8 *events, u8 *dlys,
-                      u8 len)
+wlc_phy_set_rfseq_nphy(struct brcms_phy *pi, u8 cmd, const u8 *events,
+                      const u8 *dlys, u8 len)
 {
        u32 t1_offset, t2_offset;
        u8 ctr;
@@ -15240,16 +15240,16 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev5(struct brcms_phy *pi)
 static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi)
 {
        u16 currband;
-       s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 };
-       s8 *lna1_gain_db = NULL;
-       s8 *lna1_gain_db_2 = NULL;
-       s8 *lna2_gain_db = NULL;
-       s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 };
-       s8 *tia_gain_db;
-       s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 };
-       s8 *tia_gainbits;
-       u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f };
-       u16 *rfseq_init_gain;
+       static const s8 lna1G_gain_db_rev7[] = { 9, 14, 19, 24 };
+       const s8 *lna1_gain_db = NULL;
+       const s8 *lna1_gain_db_2 = NULL;
+       const s8 *lna2_gain_db = NULL;
+       static const s8 tiaA_gain_db_rev7[] = { -9, -6, -3, 0, 3, 3, 3, 3, 3, 3 };
+       const s8 *tia_gain_db;
+       static const s8 tiaA_gainbits_rev7[] = { 0, 1, 2, 3, 4, 4, 4, 4, 4, 4 };
+       const s8 *tia_gainbits;
+       static const u16 rfseqA_init_gain_rev7[] = { 0x624f, 0x624f };
+       const u16 *rfseq_init_gain;
        u16 init_gaincode;
        u16 clip1hi_gaincode;
        u16 clip1md_gaincode = 0;
@@ -15310,10 +15310,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi)
 
                        if ((freq <= 5080) || (freq == 5825)) {
 
-                               s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 };
-                               s8 lna1A_gain_db_2_rev7[] = {
-                                       11, 17, 22, 25};
-                               s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 };
+                               static const s8 lna1A_gain_db_rev7[] = { 11, 16, 20, 24 };
+                               static const s8 lna1A_gain_db_2_rev7[] = { 11, 17, 22, 25};
+                               static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 };
 
                                crsminu_th = 0x3e;
                                lna1_gain_db = lna1A_gain_db_rev7;
@@ -15321,10 +15320,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi)
                                lna2_gain_db = lna2A_gain_db_rev7;
                        } else if ((freq >= 5500) && (freq <= 5700)) {
 
-                               s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 };
-                               s8 lna1A_gain_db_2_rev7[] = {
-                                       12, 18, 22, 26};
-                               s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 };
+                               static const s8 lna1A_gain_db_rev7[] = { 11, 17, 21, 25 };
+                               static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26};
+                               static const s8 lna2A_gain_db_rev7[] = { 1, 8, 12, 16 };
 
                                crsminu_th = 0x45;
                                clip1md_gaincode_B = 0x14;
@@ -15335,10 +15333,9 @@ static void wlc_phy_workarounds_nphy_gainctrl_2057_rev6(struct brcms_phy *pi)
                                lna2_gain_db = lna2A_gain_db_rev7;
                        } else {
 
-                               s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 };
-                               s8 lna1A_gain_db_2_rev7[] = {
-                                       12, 18, 22, 26};
-                               s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 };
+                               static const s8 lna1A_gain_db_rev7[] = { 12, 18, 22, 26 };
+                               static const s8 lna1A_gain_db_2_rev7[] = { 12, 18, 22, 26};
+                               static const s8 lna2A_gain_db_rev7[] = { -1, 6, 10, 14 };
 
                                crsminu_th = 0x41;
                                lna1_gain_db = lna1A_gain_db_rev7;
@@ -15450,65 +15447,65 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi)
                NPHY_RFSEQ_CMD_CLR_HIQ_DIS,
                NPHY_RFSEQ_CMD_SET_HPF_BW
        };
-       u8 rfseq_updategainu_dlys[] = { 10, 30, 1 };
-       s8 lna1G_gain_db[] = { 7, 11, 16, 23 };
-       s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 };
-       s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 };
-       s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 };
-       s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 };
-       s8 lna1A_gain_db[] = { 7, 11, 17, 23 };
-       s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 };
-       s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 };
-       s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 };
-       s8 *lna1_gain_db = NULL;
-       s8 lna2G_gain_db[] = { -5, 6, 10, 14 };
-       s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 };
-       s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 };
-       s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 };
-       s8 lna2A_gain_db[] = { -6, 2, 6, 10 };
-       s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 };
-       s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 };
-       s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 };
-       s8 *lna2_gain_db = NULL;
-       s8 tiaG_gain_db[] = {
+       static const u8 rfseq_updategainu_dlys[] = { 10, 30, 1 };
+       static const s8 lna1G_gain_db[] = { 7, 11, 16, 23 };
+       static const s8 lna1G_gain_db_rev4[] = { 8, 12, 17, 25 };
+       static const s8 lna1G_gain_db_rev5[] = { 9, 13, 18, 26 };
+       static const s8 lna1G_gain_db_rev6[] = { 8, 13, 18, 25 };
+       static const s8 lna1G_gain_db_rev6_224B0[] = { 10, 14, 19, 27 };
+       static const s8 lna1A_gain_db[] = { 7, 11, 17, 23 };
+       static const s8 lna1A_gain_db_rev4[] = { 8, 12, 18, 23 };
+       static const s8 lna1A_gain_db_rev5[] = { 6, 10, 16, 21 };
+       static const s8 lna1A_gain_db_rev6[] = { 6, 10, 16, 21 };
+       const s8 *lna1_gain_db = NULL;
+       static const s8 lna2G_gain_db[] = { -5, 6, 10, 14 };
+       static const s8 lna2G_gain_db_rev5[] = { -3, 7, 11, 16 };
+       static const s8 lna2G_gain_db_rev6[] = { -5, 6, 10, 14 };
+       static const s8 lna2G_gain_db_rev6_224B0[] = { -5, 6, 10, 15 };
+       static const s8 lna2A_gain_db[] = { -6, 2, 6, 10 };
+       static const s8 lna2A_gain_db_rev4[] = { -5, 2, 6, 10 };
+       static const s8 lna2A_gain_db_rev5[] = { -7, 0, 4, 8 };
+       static const s8 lna2A_gain_db_rev6[] = { -7, 0, 4, 8 };
+       const s8 *lna2_gain_db = NULL;
+       static const s8 tiaG_gain_db[] = {
                0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A };
-       s8 tiaA_gain_db[] = {
+       static const s8 tiaA_gain_db[] = {
                0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 };
-       s8 tiaA_gain_db_rev4[] = {
+       static const s8 tiaA_gain_db_rev4[] = {
                0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d };
-       s8 tiaA_gain_db_rev5[] = {
+       static const s8 tiaA_gain_db_rev5[] = {
                0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d };
-       s8 tiaA_gain_db_rev6[] = {
+       static const s8 tiaA_gain_db_rev6[] = {
                0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d };
-       s8 *tia_gain_db;
-       s8 tiaG_gainbits[] = {
+       const s8 *tia_gain_db;
+       static const s8 tiaG_gainbits[] = {
                0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03 };
-       s8 tiaA_gainbits[] = {
+       static const s8 tiaA_gainbits[] = {
                0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06 };
-       s8 tiaA_gainbits_rev4[] = {
+       static const s8 tiaA_gainbits_rev4[] = {
                0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 };
-       s8 tiaA_gainbits_rev5[] = {
+       static const s8 tiaA_gainbits_rev5[] = {
                0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 };
-       s8 tiaA_gainbits_rev6[] = {
+       static const s8 tiaA_gainbits_rev6[] = {
                0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 };
-       s8 *tia_gainbits;
-       s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 };
-       s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 };
-       u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f };
-       u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f };
-       u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f };
-       u16 rfseqG_init_gain_rev5_elna[] = {
+       const s8 *tia_gainbits;
+       static const s8 lpf_gain_db[] = { 0x00, 0x06, 0x0c, 0x12, 0x12, 0x12 };
+       static const s8 lpf_gainbits[] = { 0x00, 0x01, 0x02, 0x03, 0x03, 0x03 };
+       static const u16 rfseqG_init_gain[] = { 0x613f, 0x613f, 0x613f, 0x613f };
+       static const u16 rfseqG_init_gain_rev4[] = { 0x513f, 0x513f, 0x513f, 0x513f };
+       static const u16 rfseqG_init_gain_rev5[] = { 0x413f, 0x413f, 0x413f, 0x413f };
+       static const u16 rfseqG_init_gain_rev5_elna[] = {
                0x013f, 0x013f, 0x013f, 0x013f };
-       u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f };
-       u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f };
-       u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f };
-       u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f };
-       u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f };
-       u16 rfseqA_init_gain_rev4_elna[] = {
+       static const u16 rfseqG_init_gain_rev6[] = { 0x513f, 0x513f };
+       static const u16 rfseqG_init_gain_rev6_224B0[] = { 0x413f, 0x413f };
+       static const u16 rfseqG_init_gain_rev6_elna[] = { 0x113f, 0x113f };
+       static const u16 rfseqA_init_gain[] = { 0x516f, 0x516f, 0x516f, 0x516f };
+       static const u16 rfseqA_init_gain_rev4[] = { 0x614f, 0x614f, 0x614f, 0x614f };
+       static const u16 rfseqA_init_gain_rev4_elna[] = {
                0x314f, 0x314f, 0x314f, 0x314f };
-       u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f };
-       u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f };
-       u16 *rfseq_init_gain;
+       static const u16 rfseqA_init_gain_rev5[] = { 0x714f, 0x714f, 0x714f, 0x714f };
+       static const u16 rfseqA_init_gain_rev6[] = { 0x714f, 0x714f };
+       const u16 *rfseq_init_gain;
        u16 initG_gaincode = 0x627e;
        u16 initG_gaincode_rev4 = 0x527e;
        u16 initG_gaincode_rev5 = 0x427e;
@@ -15538,10 +15535,10 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi)
        u16 clip1mdA_gaincode_rev6 = 0x2084;
        u16 clip1md_gaincode = 0;
        u16 clip1loG_gaincode = 0x0074;
-       u16 clip1loG_gaincode_rev5[] = {
+       static const u16 clip1loG_gaincode_rev5[] = {
                0x0062, 0x0064, 0x006a, 0x106a, 0x106c, 0x1074, 0x107c, 0x207c
        };
-       u16 clip1loG_gaincode_rev6[] = {
+       static const u16 clip1loG_gaincode_rev6[] = {
                0x106a, 0x106c, 0x1074, 0x107c, 0x007e, 0x107e, 0x207e, 0x307e
        };
        u16 clip1loG_gaincode_rev6_224B0 = 0x1074;
@@ -16066,7 +16063,7 @@ static void wlc_phy_workarounds_nphy_gainctrl(struct brcms_phy *pi)
 
 static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
 {
-       u8 rfseq_rx2tx_events[] = {
+       static const u8 rfseq_rx2tx_events[] = {
                NPHY_RFSEQ_CMD_NOP,
                NPHY_RFSEQ_CMD_RXG_FBW,
                NPHY_RFSEQ_CMD_TR_SWITCH,
@@ -16076,7 +16073,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
                NPHY_RFSEQ_CMD_EXT_PA
        };
        u8 rfseq_rx2tx_dlys[] = { 8, 6, 6, 2, 4, 60, 1 };
-       u8 rfseq_tx2rx_events[] = {
+       static const u8 rfseq_tx2rx_events[] = {
                NPHY_RFSEQ_CMD_NOP,
                NPHY_RFSEQ_CMD_EXT_PA,
                NPHY_RFSEQ_CMD_TX_GAIN,
@@ -16085,8 +16082,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
                NPHY_RFSEQ_CMD_RXG_FBW,
                NPHY_RFSEQ_CMD_CLR_HIQ_DIS
        };
-       u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 };
-       u8 rfseq_tx2rx_events_rev3[] = {
+       static const u8 rfseq_tx2rx_dlys[] = { 8, 6, 2, 4, 4, 6, 1 };
+       static const u8 rfseq_tx2rx_events_rev3[] = {
                NPHY_REV3_RFSEQ_CMD_EXT_PA,
                NPHY_REV3_RFSEQ_CMD_INT_PA_PU,
                NPHY_REV3_RFSEQ_CMD_TX_GAIN,
@@ -16096,7 +16093,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
                NPHY_REV3_RFSEQ_CMD_CLR_HIQ_DIS,
                NPHY_REV3_RFSEQ_CMD_END
        };
-       u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 };
+       static const u8 rfseq_tx2rx_dlys_rev3[] = { 8, 4, 2, 2, 4, 4, 6, 1 };
        u8 rfseq_rx2tx_events_rev3[] = {
                NPHY_REV3_RFSEQ_CMD_NOP,
                NPHY_REV3_RFSEQ_CMD_RXG_FBW,
@@ -16110,7 +16107,7 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
        };
        u8 rfseq_rx2tx_dlys_rev3[] = { 8, 6, 6, 4, 4, 18, 42, 1, 1 };
 
-       u8 rfseq_rx2tx_events_rev3_ipa[] = {
+       static const u8 rfseq_rx2tx_events_rev3_ipa[] = {
                NPHY_REV3_RFSEQ_CMD_NOP,
                NPHY_REV3_RFSEQ_CMD_RXG_FBW,
                NPHY_REV3_RFSEQ_CMD_TR_SWITCH,
@@ -16121,15 +16118,15 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
                NPHY_REV3_RFSEQ_CMD_INT_PA_PU,
                NPHY_REV3_RFSEQ_CMD_END
        };
-       u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 };
-       u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f };
+       static const u8 rfseq_rx2tx_dlys_rev3_ipa[] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 };
+       static const u16 rfseq_rx2tx_dacbufpu_rev7[] = { 0x10f, 0x10f };
 
        s16 alpha0, alpha1, alpha2;
        s16 beta0, beta1, beta2;
        u32 leg_data_weights, ht_data_weights, nss1_data_weights,
            stbc_data_weights;
        u8 chan_freq_range = 0;
-       u16 dac_control = 0x0002;
+       static const u16 dac_control = 0x0002;
        u16 aux_adc_vmid_rev7_core0[] = { 0x8e, 0x96, 0x96, 0x96 };
        u16 aux_adc_vmid_rev7_core1[] = { 0x8f, 0x9f, 0x9f, 0x96 };
        u16 aux_adc_vmid_rev4[] = { 0xa2, 0xb4, 0xb4, 0x89 };
@@ -16139,8 +16136,8 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
        u16 aux_adc_gain_rev4[] = { 0x02, 0x02, 0x02, 0x00 };
        u16 aux_adc_gain_rev3[] = { 0x02, 0x02, 0x02, 0x00 };
        u16 *aux_adc_gain;
-       u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 };
-       u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 };
+       static const u16 sk_adc_vmid[] = { 0xb4, 0xb4, 0xb4, 0x24 };
+       static const u16 sk_adc_gain[] = { 0x02, 0x02, 0x02, 0x02 };
        s32 min_nvar_val = 0x18d;
        s32 min_nvar_offset_6mbps = 20;
        u8 pdetrange;
@@ -16151,9 +16148,9 @@ static void wlc_phy_workarounds_nphy(struct brcms_phy *pi)
        u16 rfseq_rx2tx_lpf_h_hpc_rev7 = 0x77;
        u16 rfseq_tx2rx_lpf_h_hpc_rev7 = 0x77;
        u16 rfseq_pktgn_lpf_h_hpc_rev7 = 0x77;
-       u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 };
-       u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 };
-       u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 };
+       static const u16 rfseq_htpktgn_lpf_hpc_rev7[] = { 0x77, 0x11, 0x11 };
+       static const u16 rfseq_pktgn_lpf_hpc_rev7[] = { 0x11, 0x11 };
+       static const u16 rfseq_cckpktgn_lpf_hpc_rev7[] = { 0x11, 0x11 };
        u16 ipalvlshift_3p3_war_en = 0;
        u16 rccal_bcap_val, rccal_scap_val;
        u16 rccal_tx20_11b_bcap = 0;
@@ -24291,13 +24288,13 @@ static void wlc_phy_update_txcal_ladder_nphy(struct brcms_phy *pi, u16 core)
        u16 bbmult;
        u16 tblentry;
 
-       struct nphy_txiqcal_ladder ladder_lo[] = {
+       static const struct nphy_txiqcal_ladder ladder_lo[] = {
                {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0},
                {25, 0}, {25, 1}, {25, 2}, {25, 3}, {25, 4}, {25, 5},
                {25, 6}, {25, 7}, {35, 7}, {50, 7}, {71, 7}, {100, 7}
        };
 
-       struct nphy_txiqcal_ladder ladder_iq[] = {
+       static const struct nphy_txiqcal_ladder ladder_iq[] = {
                {3, 0}, {4, 0}, {6, 0}, {9, 0}, {13, 0}, {18, 0},
                {25, 0}, {35, 0}, {50, 0}, {71, 0}, {100, 0}, {100, 1},
                {100, 2}, {100, 3}, {100, 4}, {100, 5}, {100, 6}, {100, 7}
@@ -25773,67 +25770,67 @@ wlc_phy_cal_txiqlo_nphy(struct brcms_phy *pi, struct nphy_txgains target_gain,
        u16 cal_gain[2];
        struct nphy_iqcal_params cal_params[2];
        u32 tbl_len;
-       void *tbl_ptr;
+       const void *tbl_ptr;
        bool ladder_updated[2];
        u8 mphase_cal_lastphase = 0;
        int bcmerror = 0;
        bool phyhang_avoid_state = false;
 
-       u16 tbl_tx_iqlo_cal_loft_ladder_20[] = {
+       static const u16 tbl_tx_iqlo_cal_loft_ladder_20[] = {
                0x0300, 0x0500, 0x0700, 0x0900, 0x0d00, 0x1100, 0x1900, 0x1901,
                0x1902,
                0x1903, 0x1904, 0x1905, 0x1906, 0x1907, 0x2407, 0x3207, 0x4607,
                0x6407
        };
 
-       u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = {
+       static const u16 tbl_tx_iqlo_cal_iqimb_ladder_20[] = {
                0x0200, 0x0300, 0x0600, 0x0900, 0x0d00, 0x1100, 0x1900, 0x2400,
                0x3200,
                0x4600, 0x6400, 0x6401, 0x6402, 0x6403, 0x6404, 0x6405, 0x6406,
                0x6407
        };
 
-       u16 tbl_tx_iqlo_cal_loft_ladder_40[] = {
+       static const u16 tbl_tx_iqlo_cal_loft_ladder_40[] = {
                0x0200, 0x0300, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1201,
                0x1202,
                0x1203, 0x1204, 0x1205, 0x1206, 0x1207, 0x1907, 0x2307, 0x3207,
                0x4707
        };
 
-       u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = {
+       static const u16 tbl_tx_iqlo_cal_iqimb_ladder_40[] = {
                0x0100, 0x0200, 0x0400, 0x0700, 0x0900, 0x0c00, 0x1200, 0x1900,
                0x2300,
                0x3200, 0x4700, 0x4701, 0x4702, 0x4703, 0x4704, 0x4705, 0x4706,
                0x4707
        };
 
-       u16 tbl_tx_iqlo_cal_startcoefs[] = {
+       static const u16 tbl_tx_iqlo_cal_startcoefs[] = {
                0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
                0x0000
        };
 
-       u16 tbl_tx_iqlo_cal_cmds_fullcal[] = {
+       static const u16 tbl_tx_iqlo_cal_cmds_fullcal[] = {
                0x8123, 0x8264, 0x8086, 0x8245, 0x8056,
                0x9123, 0x9264, 0x9086, 0x9245, 0x9056
        };
 
-       u16 tbl_tx_iqlo_cal_cmds_recal[] = {
+       static const u16 tbl_tx_iqlo_cal_cmds_recal[] = {
                0x8101, 0x8253, 0x8053, 0x8234, 0x8034,
                0x9101, 0x9253, 0x9053, 0x9234, 0x9034
        };
 
-       u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = {
+       static const u16 tbl_tx_iqlo_cal_startcoefs_nphyrev3[] = {
                0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
                0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
                0x0000
        };
 
-       u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = {
+       static const u16 tbl_tx_iqlo_cal_cmds_fullcal_nphyrev3[] = {
                0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234,
                0x9434, 0x9334, 0x9084, 0x9267, 0x9056, 0x9234
        };
 
-       u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = {
+       static const u16 tbl_tx_iqlo_cal_cmds_recal_nphyrev3[] = {
                0x8423, 0x8323, 0x8073, 0x8256, 0x8045, 0x8223,
                0x9423, 0x9323, 0x9073, 0x9256, 0x9045, 0x9223
        };
index e480adf86be6525a6caac9236ad99fd672dee60e..8a02977a2e2baffdc1285b9173e9bd288c659730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AIRO_H_
 #define _AIRO_H_
 
index aecd2cff462bda30f0419aeff80f8b31c4e5a517..e1ec50359dffc8a1651572c292d02666d4661569 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Intel Centrino wireless drivers
 #
index c826a6b985bb86dab5e675c5a35cf79e708f669e..c5ad0453b3341f80ab034b633123ba6a6c6818a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IWLEGACY) += iwlegacy.o
 iwlegacy-objs          := common.o
 iwlegacy-$(CONFIG_IWLEGACY_DEBUGFS) += debug.o
index 35a32a3ec882a5603f2cac6a2319015435c1f72e..595b26b66bfcc5936beb44eba6b62fba5bdd6c2e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # common
 obj-$(CONFIG_IWLWIFI)  += iwlwifi.o
 iwlwifi-objs           += iwl-io.o
index 45e2efc70d19e5f44c7a5e2a1cde2cf9a7448f91..ce741beec1fcf7c779cc993c4f6b240151257028 100644 (file)
@@ -309,6 +309,7 @@ const struct iwl_cfg iwl3168_2ac_cfg = {
        .nvm_calib_ver = IWL3168_TX_POWER_VERSION,
        .pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
        .dccm_len = IWL7265_DCCM_LEN,
+       .nvm_type = IWL_NVM_SDP,
 };
 
 const struct iwl_cfg iwl7265_2ac_cfg = {
index 2e6c52664ceedddfcba3ad1a20954328348d121b..c2a5936ccede26dbbd10512a21ef5da162e4b2d7 100644 (file)
@@ -164,7 +164,7 @@ static const struct iwl_tt_params iwl8000_tt_params = {
        .default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C,       \
        .thermal_params = &iwl8000_tt_params,                           \
        .apmg_not_supported = true,                                     \
-       .ext_nvm = true,                                                \
+       .nvm_type = IWL_NVM_EXT,                                        \
        .dbgc_supported = true
 
 #define IWL_DEVICE_8000                                                        \
index 2babe0a1f18bcfb675fa21e089dff3b97f873b50..e8b5ff42f5a8f3711d0d27bcf64790d895384368 100644 (file)
@@ -148,7 +148,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
        .vht_mu_mimo_supported = true,                                  \
        .mac_addr_from_csr = true,                                      \
        .rf_id = true,                                                  \
-       .ext_nvm = true,                                                \
+       .nvm_type = IWL_NVM_EXT,                                        \
        .dbgc_supported = true
 
 const struct iwl_cfg iwl9160_2ac_cfg = {
index 76ba1f8bc72feb51e96ac060fe8d5afaf1bab4f2..a440140ed8dda3d889629238af0d1aff4af725b4 100644 (file)
@@ -133,7 +133,7 @@ static const struct iwl_ht_params iwl_a000_ht_params = {
        .use_tfh = true,                                                \
        .rf_id = true,                                                  \
        .gen2 = true,                                                   \
-       .ext_nvm = true,                                                \
+       .nvm_type = IWL_NVM_EXT,                                        \
        .dbgc_supported = true
 
 const struct iwl_cfg iwla000_2ac_cfg_hr = {
index b256a354953ae5499fd815a6a677f074adedacaf..702d42b2d4525b540f8a38618a63a68be15ffb17 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # DVM
 obj-$(CONFIG_IWLDVM)   += iwldvm.o
 iwldvm-objs            += main.o rs.o mac80211.o ucode.o tx.o
index 00bc7a25dece29bd80392383eef7186aa8b961c0..3fd07bc80f54dd77410f4911e991b9460ca7ebb0 100644 (file)
@@ -108,6 +108,7 @@ enum iwl_nvm_access_target {
  * @NVM_SECTION_TYPE_REGULATORY: regulatory section
  * @NVM_SECTION_TYPE_CALIBRATION: calibration section
  * @NVM_SECTION_TYPE_PRODUCTION: production section
+ * @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series
  * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section
  * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section
  * @NVM_MAX_NUM_SECTIONS: number of sections
@@ -117,6 +118,7 @@ enum iwl_nvm_section_type {
        NVM_SECTION_TYPE_REGULATORY = 3,
        NVM_SECTION_TYPE_CALIBRATION = 4,
        NVM_SECTION_TYPE_PRODUCTION = 5,
+       NVM_SECTION_TYPE_REGULATORY_SDP = 8,
        NVM_SECTION_TYPE_MAC_OVERRIDE = 11,
        NVM_SECTION_TYPE_PHY_SKU = 12,
        NVM_MAX_NUM_SECTIONS = 13,
index 6afc7a799892f424c64934f67b949d4c9beaa48d..f5dd7d83cd0a8eb8da5fc150ebb3d035c2c03a97 100644 (file)
@@ -1086,7 +1086,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
 
        if (fwrt->trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
                /* stop recording */
-               iwl_set_bits_prph(fwrt->trans, MON_BUFF_SAMPLE_CTL, 0x100);
+               iwl_fw_dbg_stop_recording(fwrt);
 
                iwl_fw_error_dump(fwrt);
 
@@ -1104,10 +1104,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
                u32 in_sample = iwl_read_prph(fwrt->trans, DBGC_IN_SAMPLE);
                u32 out_ctrl = iwl_read_prph(fwrt->trans, DBGC_OUT_CTRL);
 
-               /* stop recording */
-               iwl_write_prph(fwrt->trans, DBGC_IN_SAMPLE, 0);
-               udelay(100);
-               iwl_write_prph(fwrt->trans, DBGC_OUT_CTRL, 0);
+               iwl_fw_dbg_stop_recording(fwrt);
                /* wait before we collect the data till the DBGC stop */
                udelay(500);
 
index 0f810ea89d31fa6394e80b90bac0dab38754aaae..9c889a32fe2424941d9bceb89b8cd1f593e4f3ab 100644 (file)
@@ -68,6 +68,8 @@
 #include <linux/workqueue.h>
 #include <net/cfg80211.h>
 #include "runtime.h"
+#include "iwl-prph.h"
+#include "iwl-io.h"
 #include "file.h"
 #include "error-dump.h"
 
@@ -194,8 +196,21 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt,
                                        iwl_fw_dbg_get_trigger((fwrt)->fw,\
                                                               (trig)))
 
+static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt)
+{
+       if (fwrt->trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
+               iwl_set_bits_prph(fwrt->trans, MON_BUFF_SAMPLE_CTL, 0x100);
+       } else {
+               iwl_write_prph(fwrt->trans, DBGC_IN_SAMPLE, 0);
+               udelay(100);
+               iwl_write_prph(fwrt->trans, DBGC_OUT_CTRL, 0);
+       }
+}
+
 static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt)
 {
+       iwl_fw_dbg_stop_recording(fwrt);
+
        fwrt->dump.conf = FW_DBG_INVALID;
 }
 
index 3e057b539d5b76dede3bf18de696003e041ace7a..71cb1ecde0f72b4b73d236d3028d5dde8bda4457 100644 (file)
@@ -108,6 +108,18 @@ enum iwl_led_mode {
        IWL_LED_DISABLE,
 };
 
+/**
+ * enum iwl_nvm_type - nvm formats
+ * @IWL_NVM: the regular format
+ * @IWL_NVM_EXT: extended NVM format
+ * @IWL_NVM_SDP: NVM format used by 3168 series
+ */
+enum iwl_nvm_type {
+       IWL_NVM,
+       IWL_NVM_EXT,
+       IWL_NVM_SDP,
+};
+
 /*
  * This is the threshold value of plcp error rate per 100mSecs.  It is
  * used to set and check for the validity of plcp_delta.
@@ -320,7 +332,7 @@ struct iwl_pwr_tx_backoff {
  * @integrated: discrete or integrated
  * @gen2: a000 and on transport operation
  * @cdb: CDB support
- * @ext_nvm: extended NVM format
+ * @nvm_type: see &enum iwl_nvm_type
  *
  * We enable the driver to be backward compatible wrt. hardware features.
  * API differences in uCode shouldn't be handled here but through TLVs
@@ -342,6 +354,7 @@ struct iwl_cfg {
        const struct iwl_tt_params *thermal_params;
        enum iwl_device_family device_family;
        enum iwl_led_mode led_mode;
+       enum iwl_nvm_type nvm_type;
        u32 max_data_size;
        u32 max_inst_size;
        netdev_features_t features;
@@ -369,7 +382,6 @@ struct iwl_cfg {
            use_tfh:1,
            gen2:1,
            cdb:1,
-           ext_nvm:1,
            dbgc_supported:1;
        u8 valid_tx_ant;
        u8 valid_rx_ant;
index 3014beef48730dbd077c55b453e8e14c4bfb4c22..c3a5d8ccc95e942443dbf74e2ac6e21b2f09dfcb 100644 (file)
@@ -77,7 +77,7 @@
 #include "iwl-csr.h"
 
 /* NVM offsets (in words) definitions */
-enum wkp_nvm_offsets {
+enum nvm_offsets {
        /* NVM HW-Section offset (in words) definitions */
        SUBSYSTEM_ID = 0x0A,
        HW_ADDR = 0x15,
@@ -92,7 +92,10 @@ enum wkp_nvm_offsets {
 
        /* NVM calibration section offset (in words) definitions */
        NVM_CALIB_SECTION = 0x2B8,
-       XTAL_CALIB = 0x316 - NVM_CALIB_SECTION
+       XTAL_CALIB = 0x316 - NVM_CALIB_SECTION,
+
+       /* NVM REGULATORY -Section offset (in words) definitions */
+       NVM_CHANNELS_SDP = 0,
 };
 
 enum ext_nvm_offsets {
@@ -206,8 +209,36 @@ enum iwl_nvm_channel_flags {
        NVM_CHANNEL_DC_HIGH             = BIT(12),
 };
 
+static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level,
+                                              int chan, u16 flags)
+{
 #define CHECK_AND_PRINT_I(x)   \
-       ((ch_flags & NVM_CHANNEL_##x) ? # x " " : "")
+       ((flags & NVM_CHANNEL_##x) ? " " #x : "")
+
+       if (!(flags & NVM_CHANNEL_VALID)) {
+               IWL_DEBUG_DEV(dev, level, "Ch. %d: 0x%x: No traffic\n",
+                             chan, flags);
+               return;
+       }
+
+       /* Note: already can print up to 101 characters, 110 is the limit! */
+       IWL_DEBUG_DEV(dev, level,
+                     "Ch. %d: 0x%x:%s%s%s%s%s%s%s%s%s%s%s%s\n",
+                     chan, flags,
+                     CHECK_AND_PRINT_I(VALID),
+                     CHECK_AND_PRINT_I(IBSS),
+                     CHECK_AND_PRINT_I(ACTIVE),
+                     CHECK_AND_PRINT_I(RADAR),
+                     CHECK_AND_PRINT_I(INDOOR_ONLY),
+                     CHECK_AND_PRINT_I(GO_CONCURRENT),
+                     CHECK_AND_PRINT_I(UNIFORM),
+                     CHECK_AND_PRINT_I(20MHZ),
+                     CHECK_AND_PRINT_I(40MHZ),
+                     CHECK_AND_PRINT_I(80MHZ),
+                     CHECK_AND_PRINT_I(160MHZ),
+                     CHECK_AND_PRINT_I(DC_HIGH));
+#undef CHECK_AND_PRINT_I
+}
 
 static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, bool is_5ghz,
                                 u16 nvm_flags, const struct iwl_cfg *cfg)
@@ -215,7 +246,7 @@ static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, bool is_5ghz,
        u32 flags = IEEE80211_CHAN_NO_HT40;
        u32 last_5ghz_ht = LAST_5GHZ_HT;
 
-       if (cfg->ext_nvm)
+       if (cfg->nvm_type == IWL_NVM_EXT)
                last_5ghz_ht = LAST_5GHZ_HT_FAMILY_8000;
 
        if (!is_5ghz && (nvm_flags & NVM_CHANNEL_40MHZ)) {
@@ -268,7 +299,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
        int num_of_ch, num_2ghz_channels;
        const u8 *nvm_chan;
 
-       if (!cfg->ext_nvm) {
+       if (cfg->nvm_type != IWL_NVM_EXT) {
                num_of_ch = IWL_NUM_CHANNELS;
                nvm_chan = &iwl_nvm_channels[0];
                num_2ghz_channels = NUM_2GHZ_CHANNELS;
@@ -302,12 +333,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
                         * supported, hence we still want to add them to
                         * the list of supported channels to cfg80211.
                         */
-                       IWL_DEBUG_EEPROM(dev,
-                                        "Ch. %d Flags %x [%sGHz] - No traffic\n",
-                                        nvm_chan[ch_idx],
-                                        ch_flags,
-                                        (ch_idx >= num_2ghz_channels) ?
-                                        "5.2" : "2.4");
+                       iwl_nvm_print_channel_flags(dev, IWL_DL_EEPROM,
+                                                   nvm_chan[ch_idx], ch_flags);
                        continue;
                }
 
@@ -337,27 +364,10 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
                else
                        channel->flags = 0;
 
-               IWL_DEBUG_EEPROM(dev,
-                                "Ch. %d [%sGHz] flags 0x%x %s%s%s%s%s%s%s%s%s%s%s%s(%ddBm): Ad-Hoc %ssupported\n",
-                                channel->hw_value,
-                                is_5ghz ? "5.2" : "2.4",
-                                ch_flags,
-                                CHECK_AND_PRINT_I(VALID),
-                                CHECK_AND_PRINT_I(IBSS),
-                                CHECK_AND_PRINT_I(ACTIVE),
-                                CHECK_AND_PRINT_I(RADAR),
-                                CHECK_AND_PRINT_I(INDOOR_ONLY),
-                                CHECK_AND_PRINT_I(GO_CONCURRENT),
-                                CHECK_AND_PRINT_I(UNIFORM),
-                                CHECK_AND_PRINT_I(20MHZ),
-                                CHECK_AND_PRINT_I(40MHZ),
-                                CHECK_AND_PRINT_I(80MHZ),
-                                CHECK_AND_PRINT_I(160MHZ),
-                                CHECK_AND_PRINT_I(DC_HIGH),
-                                channel->max_power,
-                                ((ch_flags & NVM_CHANNEL_IBSS) &&
-                                 !(ch_flags & NVM_CHANNEL_RADAR))
-                                       ? "" : "not ");
+               iwl_nvm_print_channel_flags(dev, IWL_DL_EEPROM,
+                                           channel->hw_value, ch_flags);
+               IWL_DEBUG_EEPROM(dev, "Ch. %d: %ddBm\n",
+                                channel->hw_value, channel->max_power);
        }
 
        return n_channels;
@@ -484,7 +494,7 @@ IWL_EXPORT_SYMBOL(iwl_init_sbands);
 static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
                       const __le16 *phy_sku)
 {
-       if (!cfg->ext_nvm)
+       if (cfg->nvm_type != IWL_NVM_EXT)
                return le16_to_cpup(nvm_sw + SKU);
 
        return le32_to_cpup((__le32 *)(phy_sku + SKU_FAMILY_8000));
@@ -492,7 +502,7 @@ static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
 
 static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
 {
-       if (!cfg->ext_nvm)
+       if (cfg->nvm_type != IWL_NVM_EXT)
                return le16_to_cpup(nvm_sw + NVM_VERSION);
        else
                return le32_to_cpup((__le32 *)(nvm_sw +
@@ -502,7 +512,7 @@ static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
 static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
                             const __le16 *phy_sku)
 {
-       if (!cfg->ext_nvm)
+       if (cfg->nvm_type != IWL_NVM_EXT)
                return le16_to_cpup(nvm_sw + RADIO_CFG);
 
        return le32_to_cpup((__le32 *)(phy_sku + RADIO_CFG_FAMILY_EXT_NVM));
@@ -513,7 +523,7 @@ static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
 {
        int n_hw_addr;
 
-       if (!cfg->ext_nvm)
+       if (cfg->nvm_type != IWL_NVM_EXT)
                return le16_to_cpup(nvm_sw + N_HW_ADDRS);
 
        n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw + N_HW_ADDRS_FAMILY_8000));
@@ -525,7 +535,7 @@ static void iwl_set_radio_cfg(const struct iwl_cfg *cfg,
                              struct iwl_nvm_data *data,
                              u32 radio_cfg)
 {
-       if (!cfg->ext_nvm) {
+       if (cfg->nvm_type != IWL_NVM_EXT) {
                data->radio_cfg_type = NVM_RF_CFG_TYPE_MSK(radio_cfg);
                data->radio_cfg_step = NVM_RF_CFG_STEP_MSK(radio_cfg);
                data->radio_cfg_dash = NVM_RF_CFG_DASH_MSK(radio_cfg);
@@ -634,7 +644,7 @@ static int iwl_set_hw_address(struct iwl_trans *trans,
 {
        if (cfg->mac_addr_from_csr) {
                iwl_set_hw_address_from_csr(trans, data);
-       } else if (!cfg->ext_nvm) {
+       } else if (cfg->nvm_type != IWL_NVM_EXT) {
                const u8 *hw_addr = (const u8 *)(nvm_hw + HW_ADDR);
 
                /* The byte order is little endian 16 bit, meaning 214365 */
@@ -706,7 +716,7 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        u16 lar_config;
        const __le16 *ch_section;
 
-       if (!cfg->ext_nvm)
+       if (cfg->nvm_type != IWL_NVM_EXT)
                data = kzalloc(sizeof(*data) +
                               sizeof(struct ieee80211_channel) *
                               IWL_NUM_CHANNELS,
@@ -740,7 +750,7 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 
        data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw);
 
-       if (!cfg->ext_nvm) {
+       if (cfg->nvm_type != IWL_NVM_EXT) {
                /* Checking for required sections */
                if (!nvm_calib) {
                        IWL_ERR(trans,
@@ -748,11 +758,15 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
                        kfree(data);
                        return NULL;
                }
+
+               ch_section = cfg->nvm_type == IWL_NVM_SDP ?
+                            &regulatory[NVM_CHANNELS_SDP] :
+                            &nvm_sw[NVM_CHANNELS];
+
                /* in family 8000 Xtal calibration values moved to OTP */
                data->xtal_calib[0] = *(nvm_calib + XTAL_CALIB);
                data->xtal_calib[1] = *(nvm_calib + XTAL_CALIB + 1);
                lar_enabled = true;
-               ch_section = &nvm_sw[NVM_CHANNELS];
        } else {
                u16 lar_offset = data->nvm_version < 0xE39 ?
                                 NVM_LAR_OFFSET_OLD :
@@ -786,7 +800,7 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u8 *nvm_chan,
        u32 flags = NL80211_RRF_NO_HT40;
        u32 last_5ghz_ht = LAST_5GHZ_HT;
 
-       if (cfg->ext_nvm)
+       if (cfg->nvm_type == IWL_NVM_EXT)
                last_5ghz_ht = LAST_5GHZ_HT_FAMILY_8000;
 
        if (ch_idx < NUM_2GHZ_CHANNELS &&
@@ -834,7 +848,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
        int ch_idx;
        u16 ch_flags;
        u32 reg_rule_flags, prev_reg_rule_flags = 0;
-       const u8 *nvm_chan = cfg->ext_nvm ?
+       const u8 *nvm_chan = cfg->nvm_type == IWL_NVM_EXT ?
                             iwl_ext_nvm_channels : iwl_nvm_channels;
        struct ieee80211_regdomain *regd;
        int size_of_regd;
@@ -843,7 +857,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
        int center_freq, prev_center_freq = 0;
        int valid_rules = 0;
        bool new_rule;
-       int max_num_ch = cfg->ext_nvm ?
+       int max_num_ch = cfg->nvm_type == IWL_NVM_EXT ?
                         IWL_NUM_CHANNELS_EXT : IWL_NUM_CHANNELS;
 
        if (WARN_ON_ONCE(num_of_ch > NL80211_MAX_SUPP_REG_RULES))
@@ -873,12 +887,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
                new_rule = false;
 
                if (!(ch_flags & NVM_CHANNEL_VALID)) {
-                       IWL_DEBUG_DEV(dev, IWL_DL_LAR,
-                                     "Ch. %d Flags %x [%sGHz] - No traffic\n",
-                                     nvm_chan[ch_idx],
-                                     ch_flags,
-                                     (ch_idx >= NUM_2GHZ_CHANNELS) ?
-                                     "5.2" : "2.4");
+                       iwl_nvm_print_channel_flags(dev, IWL_DL_LAR,
+                                                   nvm_chan[ch_idx], ch_flags);
                        continue;
                }
 
@@ -914,31 +924,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
                prev_center_freq = center_freq;
                prev_reg_rule_flags = reg_rule_flags;
 
-               IWL_DEBUG_DEV(dev, IWL_DL_LAR,
-                             "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s%s%s%s(0x%02x)\n",
-                             center_freq,
-                             band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
-                             CHECK_AND_PRINT_I(VALID),
-                             CHECK_AND_PRINT_I(IBSS),
-                             CHECK_AND_PRINT_I(ACTIVE),
-                             CHECK_AND_PRINT_I(RADAR),
-                             CHECK_AND_PRINT_I(INDOOR_ONLY),
-                             CHECK_AND_PRINT_I(GO_CONCURRENT),
-                             CHECK_AND_PRINT_I(UNIFORM),
-                             CHECK_AND_PRINT_I(20MHZ),
-                             CHECK_AND_PRINT_I(40MHZ),
-                             CHECK_AND_PRINT_I(80MHZ),
-                             CHECK_AND_PRINT_I(160MHZ),
-                             CHECK_AND_PRINT_I(DC_HIGH),
-                             ch_flags);
-               IWL_DEBUG_DEV(dev, IWL_DL_LAR,
-                             "Ch. %d [%sGHz] reg_flags 0x%x: %s\n",
-                             center_freq,
-                             band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
-                             reg_rule_flags,
-                             ((ch_flags & NVM_CHANNEL_ACTIVE) &&
-                              !(ch_flags & NVM_CHANNEL_RADAR))
-                                        ? "Ad-Hoc" : "");
+               iwl_nvm_print_channel_flags(dev, IWL_DL_LAR,
+                                           nvm_chan[ch_idx], ch_flags);
        }
 
        regd->n_reg_rules = valid_rules;
index 00e6737dda72df1ea615d0b988b2e7613fbca58d..a47635c32c11175af17e0fba1087afcda5aab796 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IWLMVM)   += iwlmvm.o
 iwlmvm-y += fw.o mac80211.o nvm.o ops.o phy-ctxt.o mac-ctxt.o
 iwlmvm-y += utils.o rx.o rxmq.o tx.o binding.o quota.o sta.o sf.o
index 5de19ea1057571f0395c4cc6b4296d60aca7c204..b205a7bfb828dc075c9019d92d0cd2b4fa16bc45 100644 (file)
@@ -2167,7 +2167,7 @@ out:
         * 1. We are not using a unified image
         * 2. We are using a unified image but had an error while exiting D3
         */
-       set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
+       set_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status);
        set_bit(IWL_MVM_STATUS_D3_RECONFIG, &mvm->status);
        /*
         * When switching images we return 1, which causes mac80211
index 15f2d826bb4b20cd561bb6674a2590790fa47afe..a9ac872226fdf79d87d6bc8b9643d9d6d86cd793 100644 (file)
@@ -1077,6 +1077,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
        mvm->vif_count = 0;
        mvm->rx_ba_sessions = 0;
        mvm->fwrt.dump.conf = FW_DBG_INVALID;
+       mvm->monitor_on = false;
 
        /* keep statistics ticking */
        iwl_mvm_accu_radio_stats(mvm);
@@ -1437,6 +1438,9 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
                mvm->p2p_device_vif = vif;
        }
 
+       if (vif->type == NL80211_IFTYPE_MONITOR)
+               mvm->monitor_on = true;
+
        iwl_mvm_vif_dbgfs_register(mvm, vif);
        goto out_unlock;
 
@@ -1526,6 +1530,9 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw,
        iwl_mvm_power_update_mac(mvm);
        iwl_mvm_mac_ctxt_remove(mvm, vif);
 
+       if (vif->type == NL80211_IFTYPE_MONITOR)
+               mvm->monitor_on = false;
+
 out_release:
        mutex_unlock(&mvm->mutex);
 }
@@ -1546,6 +1553,11 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
        struct iwl_mvm_mc_iter_data *data = _data;
        struct iwl_mvm *mvm = data->mvm;
        struct iwl_mcast_filter_cmd *cmd = mvm->mcast_filter_cmd;
+       struct iwl_host_cmd hcmd = {
+               .id = MCAST_FILTER_CMD,
+               .flags = CMD_ASYNC,
+               .dataflags[0] = IWL_HCMD_DFL_NOCOPY,
+       };
        int ret, len;
 
        /* if we don't have free ports, mcast frames will be dropped */
@@ -1560,7 +1572,10 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac,
        memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN);
        len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4);
 
-       ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd);
+       hcmd.len[0] = len;
+       hcmd.data[0] = cmd;
+
+       ret = iwl_mvm_send_cmd(mvm, &hcmd);
        if (ret)
                IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret);
 }
@@ -1635,6 +1650,12 @@ static void iwl_mvm_configure_filter(struct ieee80211_hw *hw,
        if (!cmd)
                goto out;
 
+       if (changed_flags & FIF_ALLMULTI)
+               cmd->pass_all = !!(*total_flags & FIF_ALLMULTI);
+
+       if (cmd->pass_all)
+               cmd->count = 0;
+
        iwl_mvm_recalc_multicast(mvm);
 out:
        mutex_unlock(&mvm->mutex);
@@ -2563,7 +2584,7 @@ static void iwl_mvm_purge_deferred_tx_frames(struct iwl_mvm *mvm,
                         * queues, so we should never get a second deferred
                         * frame for the RA/TID.
                         */
-                       iwl_mvm_start_mac_queues(mvm, info->hw_queue);
+                       iwl_mvm_start_mac_queues(mvm, BIT(info->hw_queue));
                        ieee80211_free_txskb(mvm->hw, skb);
                }
        }
@@ -3975,6 +3996,43 @@ out_unlock:
        return ret;
 }
 
+static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
+{
+       if (drop) {
+               if (iwl_mvm_has_new_tx_api(mvm))
+                       /* TODO new tx api */
+                       WARN_ONCE(1,
+                                 "Need to implement flush TX queue\n");
+               else
+                       iwl_mvm_flush_tx_path(mvm,
+                               iwl_mvm_flushable_queues(mvm) & queues,
+                               0);
+       } else {
+               if (iwl_mvm_has_new_tx_api(mvm)) {
+                       struct ieee80211_sta *sta;
+                       int i;
+
+                       mutex_lock(&mvm->mutex);
+
+                       for (i = 0; i < ARRAY_SIZE(mvm->fw_id_to_mac_id); i++) {
+                               sta = rcu_dereference_protected(
+                                               mvm->fw_id_to_mac_id[i],
+                                               lockdep_is_held(&mvm->mutex));
+                               if (IS_ERR_OR_NULL(sta))
+                                       continue;
+
+                               iwl_mvm_wait_sta_queues_empty(mvm,
+                                               iwl_mvm_sta_from_mac80211(sta));
+                       }
+
+                       mutex_unlock(&mvm->mutex);
+               } else {
+                       iwl_trans_wait_tx_queues_empty(mvm->trans,
+                                                      queues);
+               }
+       }
+}
+
 static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
                              struct ieee80211_vif *vif, u32 queues, bool drop)
 {
@@ -3985,7 +4043,12 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
        int i;
        u32 msk = 0;
 
-       if (!vif || vif->type != NL80211_IFTYPE_STATION)
+       if (!vif) {
+               iwl_mvm_flush_no_vif(mvm, queues, drop);
+               return;
+       }
+
+       if (vif->type != NL80211_IFTYPE_STATION)
                return;
 
        /* Make sure we're done with the deferred traffic before flushing */
index 83303bac0e4babf6b1d3d41d1f0fc167b80c871e..949e6341829908a8e8cc684ac616121dfd267428 100644 (file)
@@ -1015,6 +1015,9 @@ struct iwl_mvm {
        bool drop_bcn_ap_mode;
 
        struct delayed_work cs_tx_unblock_dwork;
+
+       /* does a monitor vif exist (only one can exist hence bool) */
+       bool monitor_on;
 #ifdef CONFIG_ACPI
        struct iwl_mvm_sar_profile sar_profiles[IWL_MVM_SAR_PROFILE_NUM];
        struct iwl_mvm_geo_profile geo_profiles[IWL_NUM_GEO_PROFILES];
@@ -1159,7 +1162,7 @@ static inline bool iwl_mvm_is_lar_supported(struct iwl_mvm *mvm)
         * Enable LAR only if it is supported by the FW (TLV) &&
         * enabled in the NVM
         */
-       if (mvm->cfg->ext_nvm)
+       if (mvm->cfg->nvm_type == IWL_NVM_EXT)
                return nvm_lar && tlv_lar;
        else
                return tlv_lar;
index 422aa6be99328b2f7dfe66db69c724bbe3824291..fb25b6f29323888b46789374077b4d4c1895ba05 100644 (file)
@@ -295,18 +295,24 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm)
        const __be16 *hw;
        const __le16 *sw, *calib, *regulatory, *mac_override, *phy_sku;
        bool lar_enabled;
+       int regulatory_type;
 
        /* Checking for required sections */
-       if (!mvm->trans->cfg->ext_nvm) {
+       if (mvm->trans->cfg->nvm_type != IWL_NVM_EXT) {
                if (!mvm->nvm_sections[NVM_SECTION_TYPE_SW].data ||
                    !mvm->nvm_sections[mvm->cfg->nvm_hw_section_num].data) {
                        IWL_ERR(mvm, "Can't parse empty OTP/NVM sections\n");
                        return NULL;
                }
        } else {
+               if (mvm->trans->cfg->nvm_type == IWL_NVM_SDP)
+                       regulatory_type = NVM_SECTION_TYPE_REGULATORY_SDP;
+               else
+                       regulatory_type = NVM_SECTION_TYPE_REGULATORY;
+
                /* SW and REGULATORY sections are mandatory */
                if (!mvm->nvm_sections[NVM_SECTION_TYPE_SW].data ||
-                   !mvm->nvm_sections[NVM_SECTION_TYPE_REGULATORY].data) {
+                   !mvm->nvm_sections[regulatory_type].data) {
                        IWL_ERR(mvm,
                                "Can't parse empty family 8000 OTP/NVM sections\n");
                        return NULL;
@@ -330,11 +336,14 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm)
        hw = (const __be16 *)sections[mvm->cfg->nvm_hw_section_num].data;
        sw = (const __le16 *)sections[NVM_SECTION_TYPE_SW].data;
        calib = (const __le16 *)sections[NVM_SECTION_TYPE_CALIBRATION].data;
-       regulatory = (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data;
        mac_override =
                (const __le16 *)sections[NVM_SECTION_TYPE_MAC_OVERRIDE].data;
        phy_sku = (const __le16 *)sections[NVM_SECTION_TYPE_PHY_SKU].data;
 
+       regulatory = mvm->trans->cfg->nvm_type == IWL_NVM_SDP ?
+               (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY_SDP].data :
+               (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data;
+
        lar_enabled = !iwlwifi_mod_params.lar_disable &&
                      fw_has_capa(&mvm->fw->ucode_capa,
                                  IWL_UCODE_TLV_CAPA_LAR_SUPPORT);
@@ -394,7 +403,7 @@ int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm)
        IWL_DEBUG_EEPROM(mvm->trans->dev, "Read from external NVM\n");
 
        /* Maximal size depends on NVM version */
-       if (!mvm->trans->cfg->ext_nvm)
+       if (mvm->trans->cfg->nvm_type != IWL_NVM_EXT)
                max_section_size = IWL_MAX_NVM_SECTION_SIZE;
        else
                max_section_size = IWL_MAX_EXT_NVM_SECTION_SIZE;
@@ -465,7 +474,7 @@ int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm)
                        break;
                }
 
-               if (!mvm->trans->cfg->ext_nvm) {
+               if (mvm->trans->cfg->nvm_type != IWL_NVM_EXT) {
                        section_size =
                                2 * NVM_WORD1_LEN(le16_to_cpu(file_sec->word1));
                        section_id = NVM_WORD2_ID(le16_to_cpu(file_sec->word2));
@@ -740,7 +749,7 @@ int iwl_mvm_init_mcc(struct iwl_mvm *mvm)
        struct ieee80211_regdomain *regd;
        char mcc[3];
 
-       if (mvm->cfg->ext_nvm) {
+       if (mvm->cfg->nvm_type == IWL_NVM_EXT) {
                tlv_lar = fw_has_capa(&mvm->fw->ucode_capa,
                                      IWL_UCODE_TLV_CAPA_LAR_SUPPORT);
                nvm_lar = mvm->nvm_data->lar_enabled;
index ba7bd049d3d4e0238c0dd81e598ce097972d762e..0fe723ca844eeeadeef04f453124b51b23a784b1 100644 (file)
@@ -661,7 +661,8 @@ static void rs_tl_turn_on_agg(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
            (lq_sta->tx_agg_tid_en & BIT(tid)) &&
            (tid_data->tx_count_last >= IWL_MVM_RS_AGG_START_THRESHOLD)) {
                IWL_DEBUG_RATE(mvm, "try to aggregate tid %d\n", tid);
-               rs_tl_turn_on_agg_for_tid(mvm, lq_sta, tid, sta);
+               if (rs_tl_turn_on_agg_for_tid(mvm, lq_sta, tid, sta) == 0)
+                       tid_data->state = IWL_AGG_QUEUED;
        }
 }
 
index 184c749766f29455bc57bf71ecb84b905a6354a7..2d14a58cbdd7e1cc2e7eaeb20eebc7242e0e5993 100644 (file)
@@ -244,7 +244,9 @@ static u32 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm,
                return 0;
 
        default:
-               IWL_ERR(mvm, "Unhandled alg: 0x%x\n", rx_pkt_status);
+               /* Expected in monitor (not having the keys) */
+               if (!mvm->monitor_on)
+                       IWL_ERR(mvm, "Unhandled alg: 0x%x\n", rx_pkt_status);
        }
 
        return 0;
index 67ffd9774712b26c4a25d921a043959e12cfd113..248699c2c4bff0981a680eb4e161ffd5da261795 100644 (file)
@@ -277,7 +277,9 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
                stats->flag |= RX_FLAG_DECRYPTED;
                return 0;
        default:
-               IWL_ERR(mvm, "Unhandled alg: 0x%x\n", status);
+               /* Expected in monitor (not having the keys) */
+               if (!mvm->monitor_on)
+                       IWL_ERR(mvm, "Unhandled alg: 0x%x\n", status);
        }
 
        return 0;
@@ -672,11 +674,12 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
         * If there was a significant jump in the nssn - adjust.
         * If the SN is smaller than the NSSN it might need to first go into
         * the reorder buffer, in which case we just release up to it and the
-        * rest of the function will take of storing it and releasing up to the
-        * nssn
+        * rest of the function will take care of storing it and releasing up to
+        * the nssn
         */
        if (!iwl_mvm_is_sn_less(nssn, buffer->head_sn + buffer->buf_size,
-                               buffer->buf_size)) {
+                               buffer->buf_size) ||
+           !ieee80211_sn_less(sn, buffer->head_sn + buffer->buf_size)) {
                u16 min_sn = ieee80211_sn_less(sn, nssn) ? sn : nssn;
 
                iwl_mvm_release_frames(mvm, sta, napi, buffer, min_sn);
index 50983615dce673c6a96365a34ddc3fe9ae3cfa70..774122fed454fbb4d1d109a18a53634baf6f83e2 100644 (file)
@@ -555,7 +555,7 @@ static int iwl_mvm_lmac_scan_abort(struct iwl_mvm *mvm)
        struct iwl_host_cmd cmd = {
                .id = SCAN_OFFLOAD_ABORT_CMD,
        };
-       u32 status;
+       u32 status = CAN_ABORT_STATUS;
 
        ret = iwl_mvm_send_cmd_status(mvm, &cmd, &status);
        if (ret)
index 411a2055dc451d2ce18421bd4c520b9068bba942..c4a343534c5ead89793b6375660cb9238aeb86ed 100644 (file)
@@ -1285,7 +1285,7 @@ static int iwl_mvm_add_int_sta_common(struct iwl_mvm *mvm,
 {
        struct iwl_mvm_add_sta_cmd cmd;
        int ret;
-       u32 status;
+       u32 status = ADD_STA_SUCCESS;
 
        lockdep_assert_held(&mvm->mutex);
 
@@ -2385,8 +2385,10 @@ int iwl_mvm_sta_tx_agg_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        if (WARN_ON_ONCE(tid >= IWL_MAX_TID_COUNT))
                return -EINVAL;
 
-       if (mvmsta->tid_data[tid].state != IWL_AGG_OFF) {
-               IWL_ERR(mvm, "Start AGG when state is not IWL_AGG_OFF %d!\n",
+       if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED &&
+           mvmsta->tid_data[tid].state != IWL_AGG_OFF) {
+               IWL_ERR(mvm,
+                       "Start AGG when state is not IWL_AGG_QUEUED or IWL_AGG_OFF %d!\n",
                        mvmsta->tid_data[tid].state);
                return -ENXIO;
        }
index d138938065136fc0dbaff623a005c4e529e5be94..aedabe101cf0f09681a7c61cfa6d6eb326b033a6 100644 (file)
@@ -281,6 +281,7 @@ struct iwl_mvm_vif;
  * These states relate to a specific RA / TID.
  *
  * @IWL_AGG_OFF: aggregation is not used
+ * @IWL_AGG_QUEUED: aggregation start work has been queued
  * @IWL_AGG_STARTING: aggregation are starting (between start and oper)
  * @IWL_AGG_ON: aggregation session is up
  * @IWL_EMPTYING_HW_QUEUE_ADDBA: establishing a BA session - waiting for the
@@ -290,6 +291,7 @@ struct iwl_mvm_vif;
  */
 enum iwl_mvm_agg_state {
        IWL_AGG_OFF = 0,
+       IWL_AGG_QUEUED,
        IWL_AGG_STARTING,
        IWL_AGG_ON,
        IWL_EMPTYING_HW_QUEUE_ADDBA,
index 8876c2abc440ea9fd5e698f1ac6cc45e0d05848f..1232f63278eb64167263e55255cb95b54c27258d 100644 (file)
@@ -529,6 +529,7 @@ int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
 
        lockdep_assert_held(&mvm->mutex);
 
+       status = 0;
        ret = iwl_mvm_send_cmd_pdu_status(mvm, WIDE_ID(PHY_OPS_GROUP,
                                                       CTDP_CONFIG_CMD),
                                          sizeof(cmd), &cmd, &status);
@@ -630,7 +631,7 @@ static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
 
        if (!iwl_mvm_firmware_running(mvm) ||
            mvm->fwrt.cur_fw_img != IWL_UCODE_REGULAR) {
-               ret = -EIO;
+               ret = -ENODATA;
                goto out;
        }
 
index 172b5e63d3fbebaaa63e7d6968c212b1f32f1a22..6f2e2af23219a27f856b9bb0bd3ce7cf0647856d 100644 (file)
@@ -564,8 +564,8 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
        case NL80211_IFTYPE_AP:
        case NL80211_IFTYPE_ADHOC:
                /*
-                * Handle legacy hostapd as well, where station will be added
-                * only just before sending the association response.
+                * Non-bufferable frames use the broadcast station, thus they
+                * use the probe queue.
                 * Also take care of the case where we send a deauth to a
                 * station that we don't have, or similarly an association
                 * response (with non-success status) for a station we can't
@@ -573,9 +573,9 @@ static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
                 * Also, disassociate frames might happen, particular with
                 * reason 7 ("Class 3 frame received from nonassociated STA").
                 */
-               if (ieee80211_is_probe_resp(fc) || ieee80211_is_auth(fc) ||
-                   ieee80211_is_deauth(fc) || ieee80211_is_assoc_resp(fc) ||
-                   ieee80211_is_disassoc(fc))
+               if (ieee80211_is_mgmt(fc) &&
+                   (!ieee80211_is_bufferable_mmpdu(fc) ||
+                    ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
                        return mvm->probe_queue;
                if (info->hw_queue == info->control.vif->cab_queue)
                        return mvmvif->cab_queue;
index b8e41a702c00ba5619edd864dbe35a9f5651ceb0..ae3bb73b2d99d2edc278821ffd2382ae31dd4fbb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 hostap-y := hostap_80211_rx.o hostap_80211_tx.o hostap_ap.o hostap_info.o \
             hostap_ioctl.o hostap_main.o hostap_proc.o 
 obj-$(CONFIG_HOSTAP) += hostap.o
index ce8721fbc10eec99689fddfde74074ef515f3e26..8130d29c7989cfe3baf557403ee62123dc1ff507 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_H
 #define HOSTAP_H
 
index ed98ce7c8f6508e47a22cc9ed4cbc583fc7b7d7f..1452cf6ecb07e48d347f1d0681be6a61bfb27ee0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_80211_H
 #define HOSTAP_80211_H
 
index 6d8b64ca1a63a4459d01411b1abb5242a48424c2..61be822f90b51cca04a8151e6ba2a3d8c7a8da36 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/export.h>
index c1b10d5117ad33bf33e931398b8a8eacfc992781..c47da06945c26955e253d0cecb88a17e33060183 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/export.h>
 #include <linux/etherdevice.h>
index eb9cd6fa9c4d8199cd496f6291b19802ce4463d2..1a8d8db80b05405de0a2f1a7160c56cb2fd0fdc3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Intersil Prism2 driver with Host AP (software access point) support
  * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
index 334e2d0b8e1196617901cf5edd1f774b5f7cdad4..b7ac9e2f1a394ae511932733c64f1443b81c223c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_AP_H
 #define HOSTAP_AP_H
 
index 4230102ac9e431720e7aa0c4f3aaf153a26cfd8f..22543538239b52beb74a66e8d5a961af0e8c5997 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_COMMON_H
 #define HOSTAP_COMMON_H
 
index 2c8f71f0ed456e5718e322350339ff8b55556d0a..3ebd55847fad3ef243063195732b77c8754b82fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_CONFIG_H
 #define HOSTAP_CONFIG_H
 
index 705fe668b969819761584dbd25276eed403f756d..4507614a7c5a0385591e79dd5c498c2c450e4b80 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static int prism2_enable_aux_port(struct net_device *dev, int enable)
 {
        u16 val, reg;
index 7635ac4f6679625962d3003b6996c93c481b070f..de8a099a938636f77f0b47105e4903fe89ec0c5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Host AP driver Info Frame processing (part of hostap.o module) */
 
 #include <linux/if_arp.h>
index ff153ce295399ed0fff8e1fc7ed1f0308d1fe426..c1bc0a6ef300fd4ab73e5971fe66e582e47a0a89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */
 
 #include <linux/slab.h>
index dd84557cf957e37d5a07ebce0b985f5e27d0d3a8..d234231bf532f560e7e58ec4c7531a14516ab2ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* /proc routines for Host AP driver */
 
 #include <linux/types.h>
index 5352adb94d5026d10c7fc5f2535c7418a3add721..a8c4c1a8b29d079139df9b6537e8a44b417b885f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOSTAP_WLAN_H
 #define HOSTAP_WLAN_H
 
index b7ecef820f7614a8e4694fbbfb5181a8c3cc0b52..0c29c56c88d6d281f5545717c7146f927ec2120d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the orinoco wireless device drivers.
 #
index b542e68f1781fc5a300db200e0be9f2590f355ab..d71651ff904ee4d2c5cbe0d8ce99d3b657108731 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 p54common-objs                 := eeprom.o fwio.o txrx.o main.o
 p54common-$(CONFIG_P54_LEDS)   += led.o
 
index eac72f7bd341f7463f1f3d9e7cc28f201c76f714..41b9b440a5422140143d47ccfb6c5376ee99d959 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 libertas-y += cfg.o
 libertas-y += cmd.o
 libertas-y += cmdresp.o
index 71ba2c8d09b50b834837cb606024927dd221f8e1..9f3a7b512673596d10457e05ef69eb705c8c5f22 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement cfg80211 ("iw") support.
  *
index acccc29224016456f40e152dbe2cae340b9f73e3..0e48dc6d81d1ca7b3982589ccf80532f40be0649 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LBS_CFG80211_H__
 #define __LBS_CFG80211_H__
 
index 0c5444b02c64110d6f814983dd1bc8984ed442da..80878561cb900896862b8b7c55303b58932ab4e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2007, Red Hat, Inc. */
 
 #ifndef _LBS_CMD_H_
index aaf01619de59e2033cc7d3428807f4ece87f413a..b73d083813985a36d9858106e9d690d52177fa4c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains the handling of command
  * responses as well as events generated by firmware.
index faed1823c58ec2dfe0125038ff694bbb18842e5c..c83f44f9ddf113a13cc9ebc909c80d80caac09f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/dcache.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
index f2b9c7ffe0fd28d5dc6bee79dd1838d38b97280e..6efd1a66dad75e5deeb925f4c6c8ff8bc03cba06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LBS_DEBUGFS_H_
 #define _LBS_DEBUGFS_H_
 
index 84a3aa7ac5705c300e11fad5df4cccde1405101d..5d1e30e0c5db747733afd744195c59e2a52fe994 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  *  This file contains declaration referring to
index d3221444e51c3f8dda0132a52235717968a5e630..58e2ead7b0cc09fcfd7c37f60f827f4606a18865 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header file contains global constant/enum definitions,
  * global variable declaration.
index edf710bc5e77dedcfcc03fd77054ccd93b88bf90..dd1ee1f0af48968046c4ca605e90ae53754fba89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file contains definitions and data structures specific
  * to Marvell 802.11 NIC. It contains the Device Information
index 693868f16921da0c0fd7421e63e4d7f4bf39fb18..1bb8746a0b23bc51ea033e249ddb9361f2012e05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/hardirq.h>
 #include <linux/netdevice.h>
 #include <linux/ethtool.h>
index 96726f79a1dd9f8d90ff0d1f06ff5b587d93042e..a4fc3f79bb17a6b65a756c37ef00511b0d92699f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file function prototypes, data structure
  * and  definitions for all the host/station commands
index 6e42eac331deb502bbb4a9fd943c0cac82ef6870..8dc14bec3e161b2941b882fa11ec4ce16850e9a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LBS_IF_USB_H
 #define _LBS_IF_USB_H
 
index 37ace5cb309d1a1b1a762c19757a0a1569a5b32b..b0cb16ef8d1d0a003ac19a1bacf774c09769ef98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/delay.h>
index 6603f341c8746f0b6ed66078ac4d8d02b2ce4f53..dfe22c91aade03122db5bcc4d09dd8ce56089e94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Contains all definitions needed for the Libertas' MESH implementation.
  */
index b3c8ea6d610e4e7983507ce19d3ca7f12cdeb944..1ed5608d353ff5fcb82ab8ff811bb63af13129e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <net/ieee80211_radiotap.h>
 
 struct tx_radiotap_hdr {
index cf1d9b047ee6121c6c429039892ad6967dc9b93f..cd4ceb6f885d00d30fe58335e7983b5234659084 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header file contains definition for global types
  */
index 4bd3dc5adf7c70da919d5658a7b1ee9cfebefaa3..37a98e228b46eb804508189bf2226c727a1f0ba8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
   * This header file contains global constant/enum definitions,
   * global variable declaration.
index f236b7dc2be36973a8dcea8423349d2a21e03f65..97f760a3d59901fb18a0e24e8a1b91a01428ecd4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (c) 2015-2016 Quantenna Communications, Inc.
 # All rights reserved.
index 856fa6e8327ed4d6d2a3b9148c9aa3445ffb775c..a450bc6bc77453b368aecef35b19971241e8994b 100644 (file)
@@ -115,6 +115,8 @@ int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
 
        vif = qtnf_netdev_get_priv(wdev->netdev);
 
+       qtnf_scan_done(vif->mac, true);
+
        if (qtnf_cmd_send_del_intf(vif))
                pr_err("VIF%u.%u: failed to delete VIF\n", vif->mac->macid,
                       vif->vifid);
@@ -335,6 +337,8 @@ static int qtnf_stop_ap(struct wiphy *wiphy, struct net_device *dev)
        struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
        int ret;
 
+       qtnf_scan_done(vif->mac, true);
+
        ret = qtnf_cmd_send_stop_ap(vif);
        if (ret) {
                pr_err("VIF%u.%u: failed to stop AP operation in FW\n",
@@ -570,8 +574,6 @@ qtnf_del_station(struct wiphy *wiphy, struct net_device *dev,
            !qtnf_sta_list_lookup(&vif->sta_list, params->mac))
                return 0;
 
-       qtnf_scan_done(vif->mac, true);
-
        ret = qtnf_cmd_send_del_sta(vif, params);
        if (ret)
                pr_err("VIF%u.%u: failed to delete STA %pM\n",
@@ -1134,8 +1136,9 @@ void qtnf_virtual_intf_cleanup(struct net_device *ndev)
                }
 
                vif->sta_state = QTNF_STA_DISCONNECTED;
-               qtnf_scan_done(mac, true);
        }
+
+       qtnf_scan_done(mac, true);
 }
 
 void qtnf_cfg80211_vif_reset(struct qtnf_vif *vif)
index 6a4af52522b8d526e0f4cfad6dcfeb0cede83efc..66db26613b1fb16b065f2dc43739fcb2e1230e65 100644 (file)
@@ -34,6 +34,9 @@ static inline void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted)
                .aborted = aborted,
        };
 
+       if (timer_pending(&mac->scan_timeout))
+               del_timer_sync(&mac->scan_timeout);
+
        mutex_lock(&mac->mac_lock);
 
        if (mac->scan_req) {
index 0fc2814eafad255dfa7ee1074f084fd4016840e5..43d2e7fd6e0211766d4140841a2450f74c1a0788 100644 (file)
@@ -345,8 +345,6 @@ qtnf_event_handle_scan_complete(struct qtnf_wmac *mac,
                return -EINVAL;
        }
 
-       if (timer_pending(&mac->scan_timeout))
-               del_timer_sync(&mac->scan_timeout);
        qtnf_scan_done(mac, le32_to_cpu(status->flags) & QLINK_SCAN_ABORTED);
 
        return 0;
index 502e72b7cdcc1d9410bd3694c55799d306d0a1a3..69131965a298fd784420830d2c0a782874b1633d 100644 (file)
@@ -661,14 +661,18 @@ static int qtnf_pcie_data_tx(struct qtnf_bus *bus, struct sk_buff *skb)
        struct qtnf_pcie_bus_priv *priv = (void *)get_bus_priv(bus);
        dma_addr_t txbd_paddr, skb_paddr;
        struct qtnf_tx_bd *txbd;
+       unsigned long flags;
        int len, i;
        u32 info;
        int ret = 0;
 
+       spin_lock_irqsave(&priv->tx0_lock, flags);
+
        if (!qtnf_tx_queue_ready(priv)) {
                if (skb->dev)
                        netif_stop_queue(skb->dev);
 
+               spin_unlock_irqrestore(&priv->tx0_lock, flags);
                return NETDEV_TX_BUSY;
        }
 
@@ -717,8 +721,10 @@ tx_done:
                dev_kfree_skb_any(skb);
        }
 
-       qtnf_pcie_data_tx_reclaim(priv);
        priv->tx_done_count++;
+       spin_unlock_irqrestore(&priv->tx0_lock, flags);
+
+       qtnf_pcie_data_tx_reclaim(priv);
 
        return NETDEV_TX_OK;
 }
@@ -1247,6 +1253,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        strcpy(bus->fwname, QTN_PCI_PEARL_FW_NAME);
        init_completion(&bus->request_firmware_complete);
        mutex_init(&bus->bus_lock);
+       spin_lock_init(&pcie_priv->tx0_lock);
        spin_lock_init(&pcie_priv->irq_lock);
        spin_lock_init(&pcie_priv->tx_reclaim_lock);
 
index e76a23716ee019a4f49d38d81d2daa25b59adcb0..86ac1ccedb52fa1fa98620b25345f729bb244c69 100644 (file)
@@ -34,6 +34,8 @@ struct qtnf_pcie_bus_priv {
 
        /* lock for tx reclaim operations */
        spinlock_t tx_reclaim_lock;
+       /* lock for tx0 operations */
+       spinlock_t tx0_lock;
        u8 msi_enabled;
        int mps;
 
index 24a66015a4959f6fd6d44a18e6bd8d0aed7d1c1c..de030ebcdf6e4fa6536d62cedb5163ab610a95ed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rt2x00lib-y                            += rt2x00dev.o
 rt2x00lib-y                            += rt2x00mac.o
 rt2x00lib-y                            += rt2x00config.o
index 524c2f02dd821196a843c961687e73096ea02d65..0609d8625019263c597f56679785d3242d3251b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Raytheon wireless LAN PCMCIA card driver for Linux 
    A  PCMCIA client driver for the Raylink wireless network card
    Written by Corey Thomas
index b21ed64e15df1e3842ae1b48e89fc3ffc918d6c7..668444f6bf073c54ccfdc6e10b1765e5d8f4eefc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RAYCTL_H_
 #define _RAYCTL_H_
 
index e8243a44d6b6074136921154d498bbf63facc0c9..7948a2da195a7dc70a0bd087702980469b83cbc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RTL8180_H
 #define RTL8180_H
 
index 310013a2d72626f19226e966ea0c64721491e369..de7727b74631d3b37fbe2a49b45c42696ab91764 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RTL8180_RTL8225_H
 #define RTL8180_RTL8225_H
 
index e12575e96d1195063f1261104e10d0cb46bbce8e..c493e59eede919b9b7ef572d5039247b9010b8a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef RTL8187_RFKILL_H
 #define RTL8187_RFKILL_H
 
index 84c2e826fa1d48724a7a28e4c3f1ffd2225ca2a9..09c30e4283757d492886bf8a1a53c958fb6f9645 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RTLWIFI)          += rtlwifi.o
 rtlwifi-objs   :=              \
                base.o          \
index 20582df0465cf7689e54b12a3aa50018a8071d01..d15c58737388c8ef466a14d9c8523fa5d9578e79 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 btcoexist-objs :=      halbtc8192e2ant.o       \
                        halbtc8723b1ant.o       \
                        halbtc8723b2ant.o       \
index dae4f0f19cd3198b6cf5e4136b4c4ddb4c96b5a6..5ea368e8e64b0542ea76b644d766a72eb8979f38 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8188ee-objs :=              \
                dm.o            \
                fw.o            \
index 0546b755625950acea7fab0c08106d50e2d2850c..40f075527fc8b074185901b82609b6a05a4e0063 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192c-common-objs :=                \
                main.o          \
                dm_common.o     \
index 577c7adbc3225d7e9298523aee07ca4ca34455d4..bc307ccc5e83a08abd66ca85f0d28d2b1db41d4c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192ce-objs :=              \
                dm.o            \
                hw.o            \
index 97437dadc287f4344c91eafc83329411d009a2ae..8b3921fd2cb600820e62f6391b1d8f946f90ffeb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192cu-objs :=              \
                dm.o            \
                hw.o            \
index d0703f20d30c1edc904c5b138a0e7094f6ca454e..6482d823a57adce0b78f7a7e5eef2dc0cf7c6a44 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192de-objs :=              \
                dm.o            \
                fw.o            \
index f254b9f64326284027a2e9255f80e1aa9d4392f5..12dfbeb1f3ca8037ebdff21c41dc8990e972ca40 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192ee-objs :=              \
                dm.o            \
                fw.o            \
index dfa9dbbe2cdff5c84dc089a82fb3991efda2dff8..e577235f528675a9ab4c6c5db6fc5ed8c9909fd9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8192se-objs :=              \
                dm.o            \
                fw.o            \
index e7607d2cb2ef280ea13d90857005362f371d8214..d1238707291f14aa6e742917862e57a65702c8fd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8723ae-objs :=              \
                dm.o            \
                fw.o            \
index a841cbd55d8e11004786f4eb47748a8bd3d59270..d3ed44d80011c512285cec79f9d2b4b5c08ee858 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8723be-objs :=              \
                dm.o            \
                fw.o            \
index 73da75526e2a6feed668dbc9f2fd2013141bfa96..3451198b670cb592ecf626c23bce069c04695e5b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8723-common-objs :=         \
                main.o          \
                dm_common.o     \
index 8ca406b95f0298e5bd408ff465cad1ce9d4471fb..81dbf4ca6bc69588619aab46d86f2a29d6758f70 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtl8821ae-objs :=              \
                dm.o            \
                fw.o            \
index 4f73012978e945869c6310d59996a2f7fc02b511..1d431d4bf6d26197516941d3de54ea1fffc9218b 100644 (file)
@@ -1122,7 +1122,7 @@ static u8 _rtl8821ae_dbi_read(struct rtl_priv *rtlpriv, u16 addr)
        }
        if (0 == tmp) {
                read_addr = REG_DBI_RDATA + addr % 4;
-               ret = rtl_read_byte(rtlpriv, read_addr);
+               ret = rtl_read_word(rtlpriv, read_addr);
        }
        return ret;
 }
index ebb89965997a6e96cb8d4538b4af49f80495a0fc..47c45908d8941251819da15045f0b024d4d5e52f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rsi_91x-y                      += rsi_91x_main.o
 rsi_91x-y                      += rsi_91x_core.o
 rsi_91x-y                      += rsi_91x_mac80211.o
index b086aac6547af81a0727a5a67619267a91525cb5..386a484e0707b5750c455ac644e2adcc8fec1c46 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 cw1200_core-y := \
                fwio.o \
                txrx.o \
index af14231aeedeffc6e7d8c87dcfbe8c84cfee7de2..0530dd744275c5d523effb5ade9c85a7a3992adf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_WLCORE)                   += wlcore/
 obj-$(CONFIG_WL12XX)                   += wl12xx/
 obj-$(CONFIG_WL1251)                   += wl1251/
index 58b4f935a3f634f89157e32389e90cbf29898310..38da9f8e5f82271d5172e30004d8a60851a87bab 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 wl1251-objs            = main.o event.o tx.o rx.o ps.o cmd.o \
                          acx.o boot.o init.o debugfs.o io.o
 wl1251_spi-objs                += spi.o
index d6fbdda2cba39bfbacd90fa193ce3aafd8738f9c..f78fc3880423a32215f33b3b29330f32a08dbcbc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "acx.h"
 
 #include <linux/module.h>
index ede31f048ef98d28b96756f912edbdd2b4df8eb5..9547aea01b0fbd3be677a7b524d287f444af826f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "cmd.h"
 
 #include <linux/module.h>
index 04ed514957728540031024893a07bc2e3ecb3fb0..7fabe702c4cc3f19a96b3422c84cf327c852c6b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WL12XX_80211_H__
 #define __WL12XX_80211_H__
 
index e286713b3c189c7579ea60db51963fceff656ae3..7d418c57bcb55559aff887f9e9ca760c39c94346 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 wlcore-objs            = main.o cmd.o io.o event.o tx.o rx.o ps.o acx.o \
                          boot.o init.o debugfs.o scan.o sysfs.o vendor_cmd.o
 
index 22b0bc98d7b5baeb05aec26a180dc060f9712a6d..181be725eff88e2dc9ba5678d1bdbe002efcb284 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WL12XX_80211_H__
 #define __WL12XX_80211_H__
 
index 3fbfd19818f1a9eaee1e85b26aed04e224b0980b..efdce9ae36ea76afccd8dff733ad16dc9cdadfa3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WL3501_H__
 #define __WL3501_H__
 
index 5728a918e508ba9bf9636ac98f615b25fcd48c28..1647a449ce1a73d4c618494c732d33b3d37bd2cf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ZD1211RW) += zd1211rw.o
 
 zd1211rw-objs := zd_chip.o zd_mac.o \
index ee8ed9da00ade809a70ac80800f9006edd8f535c..4491ca5aee906c1b29342bc12c692e175d857505 100644 (file)
@@ -486,7 +486,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
 
        dev->tx_queue_len = XENVIF_QUEUE_LENGTH;
 
-       dev->min_mtu = 0;
+       dev->min_mtu = ETH_MIN_MTU;
        dev->max_mtu = ETH_MAX_MTU - VLAN_ETH_HLEN;
 
        /*
index 523387e71a8021b81beb46407132def2638fdb48..8b8689c6d8877863dddad9f9c10215d311f5fa6f 100644 (file)
@@ -1316,7 +1316,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
        netdev->features |= netdev->hw_features;
 
        netdev->ethtool_ops = &xennet_ethtool_ops;
-       netdev->min_mtu = 0;
+       netdev->min_mtu = ETH_MIN_MTU;
        netdev->max_mtu = XEN_NETIF_MAX_TX_SIZE;
        SET_NETDEV_DEV(netdev, &dev->dev);
 
index 640b7274371cfbdc3d67cde889d2b5b10c83b418..5393ba59b17d98f4b687fb4fb9cc8173d155a85b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for nfc devices
 #
index acd3a1fc69e6dbcfaa187a3f6ceaa49dd436a396..51bd44f5f3b80d94c265314d1d77ada6c939bd96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LOCAL_MEI_PHY_H_
 #define __LOCAL_MEI_PHY_H_
 
index 755c24cba253bc08c6f5c6021948515975e0a183..2f7dda265f8f7f1b23a680aaa626df2b0ef5df74 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Microread HCI based NFC driver
 #
index fa07c7806492ff8284e103a130b8df94fcbfb6bf..e74de0cb3bb0642b25588257321ce5d6d2da9ccb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for NFCMRVL NCI based NFC driver
 #
index 439b2fa8654ae73deb2b98ea7e198fc1b25df978..e0310743fed1554cc92aaa6d386df3c7d63c5fe0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ST_NCI NCI based NFC driver
 #
index df431e8a063197c744c3018d71b1a5afc1198100..8ce69c83336239dc40f076b3ec3e06f6603fdb64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Macintosh Nubus Interface Code
  *
index e8f68f5732f11de4dacd10487df30a7f768506df..004a122ac0ff21cfc6a05781e7510554f3e33cf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* drivers/nubus/proc.c: Proc FS interface for NuBus.
 
    By David Huggins-Daines <dhd@debian.org>
index 909554c3f95571ddd3d804c7dae04a2514855c50..447e0e14f3b65b86d945f4c2d6186f595da3dbc0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
 obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
 obj-$(CONFIG_ND_BTT) += nd_btt.o
index 1427a386a033e72f1f8ec7b4fe02471e9d5d92fb..3e4d1e7998dacb13df8638763eb4fa0181e73357 100644 (file)
@@ -1417,6 +1417,15 @@ static int btt_claim_class(struct device *dev)
                struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
                struct nd_namespace_index *nsindex;
 
+               /*
+                * If any of the DIMMs do not support labels the only
+                * possible BTT format is v1.
+                */
+               if (!ndd) {
+                       loop_bitmask = 0;
+                       break;
+               }
+
                nsindex = to_namespace_index(ndd, ndd->ns_current);
                if (nsindex == NULL)
                        loop_bitmask |= 1;
index c5917f040fa7ba56a8229a45c4134ae9a79535ea..6a3cd2a10db699db2069568d8094d9f1bf8bc319 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NVDIMM_PMEM_H__
 #define __NVDIMM_PMEM_H__
 #include <linux/badblocks.h>
index cc0aacb4c8b47858c0b546da5288cb82d7739c42..7b96e4588a128bd71953be919bd3df7585220805 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NVME_CORE)                        += nvme-core.o
 obj-$(CONFIG_BLK_DEV_NVME)             += nvme.o
 obj-$(CONFIG_NVME_FABRICS)             += nvme-fabrics.o
index acc816b67582f30524ad19f66843b071dfcef6ae..37f9039bb9cab29892f783ddb45a459809c3805c 100644 (file)
@@ -134,8 +134,6 @@ static inline bool nvme_req_needs_retry(struct request *req)
                return false;
        if (nvme_req(req)->status & NVME_SC_DNR)
                return false;
-       if (jiffies - req->start_time >= req->timeout)
-               return false;
        if (nvme_req(req)->retries >= nvme_max_retries)
                return false;
        return true;
@@ -1251,6 +1249,7 @@ static int nvme_revalidate_disk(struct gendisk *disk)
                goto out;
        }
 
+       __nvme_revalidate_disk(disk, id);
        nvme_report_ns_ids(ctrl, ns->ns_id, id, eui64, nguid, &uuid);
        if (!uuid_equal(&ns->uuid, &uuid) ||
            memcmp(&ns->nguid, &nguid, sizeof(ns->nguid)) ||
@@ -2138,7 +2137,7 @@ static umode_t nvme_ns_attrs_are_visible(struct kobject *kobj,
        struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
 
        if (a == &dev_attr_uuid.attr) {
-               if (uuid_is_null(&ns->uuid) ||
+               if (uuid_is_null(&ns->uuid) &&
                    !memchr_inv(ns->nguid, 0, sizeof(ns->nguid)))
                        return 0;
        }
@@ -2590,7 +2589,7 @@ static void nvme_async_event_work(struct work_struct *work)
                container_of(work, struct nvme_ctrl, async_event_work);
 
        spin_lock_irq(&ctrl->lock);
-       while (ctrl->event_limit > 0) {
+       while (ctrl->state == NVME_CTRL_LIVE && ctrl->event_limit > 0) {
                int aer_idx = --ctrl->event_limit;
 
                spin_unlock_irq(&ctrl->lock);
@@ -2677,7 +2676,8 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
                /*FALLTHRU*/
        case NVME_SC_ABORT_REQ:
                ++ctrl->event_limit;
-               queue_work(nvme_wq, &ctrl->async_event_work);
+               if (ctrl->state == NVME_CTRL_LIVE)
+                       queue_work(nvme_wq, &ctrl->async_event_work);
                break;
        default:
                break;
@@ -2692,7 +2692,7 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
                nvme_queue_scan(ctrl);
                break;
        case NVME_AER_NOTICE_FW_ACT_STARTING:
-               schedule_work(&ctrl->fw_act_work);
+               queue_work(nvme_wq, &ctrl->fw_act_work);
                break;
        default:
                dev_warn(ctrl->device, "async event result %08x\n", result);
index 47307752dc65d3b9e78f7ab736cfc33831c6522b..555c976cc2ee7aae729c6465003b5cdffa11d594 100644 (file)
@@ -565,6 +565,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
        opts->queue_size = NVMF_DEF_QUEUE_SIZE;
        opts->nr_io_queues = num_online_cpus();
        opts->reconnect_delay = NVMF_DEF_RECONNECT_DELAY;
+       opts->kato = NVME_DEFAULT_KATO;
 
        options = o = kstrdup(buf, GFP_KERNEL);
        if (!options)
@@ -655,21 +656,22 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
                                goto out;
                        }
 
-                       if (opts->discovery_nqn) {
-                               pr_err("Discovery controllers cannot accept keep_alive_tmo != 0\n");
-                               ret = -EINVAL;
-                               goto out;
-                       }
-
                        if (token < 0) {
                                pr_err("Invalid keep_alive_tmo %d\n", token);
                                ret = -EINVAL;
                                goto out;
-                       } else if (token == 0) {
+                       } else if (token == 0 && !opts->discovery_nqn) {
                                /* Allowed for debug */
                                pr_warn("keep_alive_tmo 0 won't execute keep alives!!!\n");
                        }
                        opts->kato = token;
+
+                       if (opts->discovery_nqn && opts->kato) {
+                               pr_err("Discovery controllers cannot accept KATO != 0\n");
+                               ret = -EINVAL;
+                               goto out;
+                       }
+
                        break;
                case NVMF_OPT_CTRL_LOSS_TMO:
                        if (match_int(args, &token)) {
@@ -762,8 +764,6 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
        uuid_copy(&opts->host->id, &hostid);
 
 out:
-       if (!opts->discovery_nqn && !opts->kato)
-               opts->kato = NVME_DEFAULT_KATO;
        kfree(options);
        return ret;
 }
index d2e882c0f4968e40eb256a3b0f08c8c200611810..be49d0f793816cae0a9629665230acf248ab85ec 100644 (file)
@@ -1376,7 +1376,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
        if (atomic_read(&op->state) == FCPOP_STATE_ABORTED)
                status = cpu_to_le16((NVME_SC_ABORT_REQ | NVME_SC_DNR) << 1);
        else if (freq->status)
-               status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1);
+               status = cpu_to_le16(NVME_SC_INTERNAL << 1);
 
        /*
         * For the linux implementation, if we have an unsuccesful
@@ -1404,7 +1404,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
                 */
                if (freq->transferred_length !=
                        be32_to_cpu(op->cmd_iu.data_len)) {
-                       status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1);
+                       status = cpu_to_le16(NVME_SC_INTERNAL << 1);
                        goto done;
                }
                result.u64 = 0;
@@ -1421,7 +1421,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
                                        freq->transferred_length ||
                             op->rsp_iu.status_code ||
                             sqe->common.command_id != cqe->command_id)) {
-                       status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1);
+                       status = cpu_to_le16(NVME_SC_INTERNAL << 1);
                        goto done;
                }
                result = cqe->result;
@@ -1429,7 +1429,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
                break;
 
        default:
-               status = cpu_to_le16(NVME_SC_FC_TRANSPORT_ERROR << 1);
+               status = cpu_to_le16(NVME_SC_INTERNAL << 1);
                goto done;
        }
 
@@ -1989,16 +1989,17 @@ nvme_fc_start_fcp_op(struct nvme_fc_ctrl *ctrl, struct nvme_fc_queue *queue,
         * as well as those by FC-NVME spec.
         */
        WARN_ON_ONCE(sqe->common.metadata);
-       WARN_ON_ONCE(sqe->common.dptr.prp1);
-       WARN_ON_ONCE(sqe->common.dptr.prp2);
        sqe->common.flags |= NVME_CMD_SGL_METABUF;
 
        /*
-        * format SQE DPTR field per FC-NVME rules
-        *    type=data block descr; subtype=offset;
-        *    offset is currently 0.
+        * format SQE DPTR field per FC-NVME rules:
+        *    type=0x5     Transport SGL Data Block Descriptor
+        *    subtype=0xA  Transport-specific value
+        *    address=0
+        *    length=length of the data series
         */
-       sqe->rw.dptr.sgl.type = NVME_SGL_FMT_OFFSET;
+       sqe->rw.dptr.sgl.type = (NVME_TRANSPORT_SGL_DATA_DESC << 4) |
+                                       NVME_SGL_FMT_TRANSPORT_A;
        sqe->rw.dptr.sgl.length = cpu_to_le32(data_len);
        sqe->rw.dptr.sgl.addr = 0;
 
@@ -2544,10 +2545,10 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl)
        nvme_fc_abort_aen_ops(ctrl);
 
        /* wait for all io that had to be aborted */
-       spin_lock_irqsave(&ctrl->lock, flags);
+       spin_lock_irq(&ctrl->lock);
        wait_event_lock_irq(ctrl->ioabort_wait, ctrl->iocnt == 0, ctrl->lock);
        ctrl->flags &= ~FCCTRL_TERMIO;
-       spin_unlock_irqrestore(&ctrl->lock, flags);
+       spin_unlock_irq(&ctrl->lock);
 
        nvme_fc_term_aen_ops(ctrl);
 
@@ -2733,7 +2734,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
 {
        struct nvme_fc_ctrl *ctrl;
        unsigned long flags;
-       int ret, idx;
+       int ret, idx, retry;
 
        if (!(rport->remoteport.port_role &
            (FC_PORT_ROLE_NVME_DISCOVERY | FC_PORT_ROLE_NVME_TARGET))) {
@@ -2759,6 +2760,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
        ctrl->rport = rport;
        ctrl->dev = lport->dev;
        ctrl->cnum = idx;
+       init_waitqueue_head(&ctrl->ioabort_wait);
 
        get_device(ctrl->dev);
        kref_init(&ctrl->ref);
@@ -2824,9 +2826,37 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
        list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
        spin_unlock_irqrestore(&rport->lock, flags);
 
-       ret = nvme_fc_create_association(ctrl);
+       /*
+        * It's possible that transactions used to create the association
+        * may fail. Examples: CreateAssociation LS or CreateIOConnection
+        * LS gets dropped/corrupted/fails; or a frame gets dropped or a
+        * command times out for one of the actions to init the controller
+        * (Connect, Get/Set_Property, Set_Features, etc). Many of these
+        * transport errors (frame drop, LS failure) inherently must kill
+        * the association. The transport is coded so that any command used
+        * to create the association (prior to a LIVE state transition
+        * while NEW or RECONNECTING) will fail if it completes in error or
+        * times out.
+        *
+        * As such: as the connect request was mostly likely due to a
+        * udev event that discovered the remote port, meaning there is
+        * not an admin or script there to restart if the connect
+        * request fails, retry the initial connection creation up to
+        * three times before giving up and declaring failure.
+        */
+       for (retry = 0; retry < 3; retry++) {
+               ret = nvme_fc_create_association(ctrl);
+               if (!ret)
+                       break;
+       }
+
        if (ret) {
+               /* couldn't schedule retry - fail out */
+               dev_err(ctrl->ctrl.device,
+                       "NVME-FC{%d}: Connect retry failed\n", ctrl->cnum);
+
                ctrl->ctrl.opts = NULL;
+
                /* initiate nvme ctrl ref counting teardown */
                nvme_uninit_ctrl(&ctrl->ctrl);
                nvme_put_ctrl(&ctrl->ctrl);
index 4a2121335f48a0b4af31b413e04af8f9a6a52a2e..3f5a04c586cefdc8096469ba38d325004963b42d 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/once.h>
 #include <linux/pci.h>
 #include <linux/poison.h>
 #include <linux/t10-pi.h>
@@ -93,7 +94,7 @@ struct nvme_dev {
        struct mutex shutdown_lock;
        bool subsystem;
        void __iomem *cmb;
-       dma_addr_t cmb_dma_addr;
+       pci_bus_addr_t cmb_bus_addr;
        u64 cmb_size;
        u32 cmbsz;
        u32 cmbloc;
@@ -540,6 +541,20 @@ static void nvme_dif_complete(u32 p, u32 v, struct t10_pi_tuple *pi)
 }
 #endif
 
+static void nvme_print_sgl(struct scatterlist *sgl, int nents)
+{
+       int i;
+       struct scatterlist *sg;
+
+       for_each_sg(sgl, sg, nents, i) {
+               dma_addr_t phys = sg_phys(sg);
+               pr_warn("sg[%d] phys_addr:%pad offset:%d length:%d "
+                       "dma_address:%pad dma_length:%d\n",
+                       i, &phys, sg->offset, sg->length, &sg_dma_address(sg),
+                       sg_dma_len(sg));
+       }
+}
+
 static blk_status_t nvme_setup_prps(struct nvme_dev *dev, struct request *req)
 {
        struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
@@ -622,19 +637,10 @@ static blk_status_t nvme_setup_prps(struct nvme_dev *dev, struct request *req)
        return BLK_STS_OK;
 
  bad_sgl:
-       if (WARN_ONCE(1, "Invalid SGL for payload:%d nents:%d\n",
-                               blk_rq_payload_bytes(req), iod->nents)) {
-               for_each_sg(iod->sg, sg, iod->nents, i) {
-                       dma_addr_t phys = sg_phys(sg);
-                       pr_warn("sg[%d] phys_addr:%pad offset:%d length:%d "
-                              "dma_address:%pad dma_length:%d\n", i, &phys,
-                                       sg->offset, sg->length,
-                                       &sg_dma_address(sg),
-                                       sg_dma_len(sg));
-               }
-       }
+       WARN(DO_ONCE(nvme_print_sgl, iod->sg, iod->nents),
+                       "Invalid SGL for payload:%d nents:%d\n",
+                       blk_rq_payload_bytes(req), iod->nents);
        return BLK_STS_IOERR;
-
 }
 
 static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req,
@@ -1220,7 +1226,7 @@ static int nvme_alloc_sq_cmds(struct nvme_dev *dev, struct nvme_queue *nvmeq,
        if (qid && dev->cmb && use_cmb_sqes && NVME_CMB_SQS(dev->cmbsz)) {
                unsigned offset = (qid - 1) * roundup(SQ_SIZE(depth),
                                                      dev->ctrl.page_size);
-               nvmeq->sq_dma_addr = dev->cmb_dma_addr + offset;
+               nvmeq->sq_dma_addr = dev->cmb_bus_addr + offset;
                nvmeq->sq_cmds_io = dev->cmb + offset;
        } else {
                nvmeq->sq_cmds = dma_alloc_coherent(dev->dev, SQ_SIZE(depth),
@@ -1313,11 +1319,11 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid)
        if (result < 0)
                goto release_cq;
 
+       nvme_init_queue(nvmeq, qid);
        result = queue_request_irq(nvmeq);
        if (result < 0)
                goto release_sq;
 
-       nvme_init_queue(nvmeq, qid);
        return result;
 
  release_sq:
@@ -1464,6 +1470,7 @@ static int nvme_pci_configure_admin_queue(struct nvme_dev *dev)
                return result;
 
        nvmeq->cq_vector = 0;
+       nvme_init_queue(nvmeq, 0);
        result = queue_request_irq(nvmeq);
        if (result) {
                nvmeq->cq_vector = -1;
@@ -1520,7 +1527,7 @@ static void __iomem *nvme_map_cmb(struct nvme_dev *dev)
        resource_size_t bar_size;
        struct pci_dev *pdev = to_pci_dev(dev->dev);
        void __iomem *cmb;
-       dma_addr_t dma_addr;
+       int bar;
 
        dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ);
        if (!(NVME_CMB_SZ(dev->cmbsz)))
@@ -1533,7 +1540,8 @@ static void __iomem *nvme_map_cmb(struct nvme_dev *dev)
        szu = (u64)1 << (12 + 4 * NVME_CMB_SZU(dev->cmbsz));
        size = szu * NVME_CMB_SZ(dev->cmbsz);
        offset = szu * NVME_CMB_OFST(dev->cmbloc);
-       bar_size = pci_resource_len(pdev, NVME_CMB_BIR(dev->cmbloc));
+       bar = NVME_CMB_BIR(dev->cmbloc);
+       bar_size = pci_resource_len(pdev, bar);
 
        if (offset > bar_size)
                return NULL;
@@ -1546,12 +1554,11 @@ static void __iomem *nvme_map_cmb(struct nvme_dev *dev)
        if (size > bar_size - offset)
                size = bar_size - offset;
 
-       dma_addr = pci_resource_start(pdev, NVME_CMB_BIR(dev->cmbloc)) + offset;
-       cmb = ioremap_wc(dma_addr, size);
+       cmb = ioremap_wc(pci_resource_start(pdev, bar) + offset, size);
        if (!cmb)
                return NULL;
 
-       dev->cmb_dma_addr = dma_addr;
+       dev->cmb_bus_addr = pci_bus_address(pdev, bar) + offset;
        dev->cmb_size = size;
        return cmb;
 }
@@ -2156,7 +2163,6 @@ static void nvme_reset_work(struct work_struct *work)
        if (result)
                goto out;
 
-       nvme_init_queue(dev->queues[0], 0);
        result = nvme_alloc_admin_tags(dev);
        if (result)
                goto out;
index 58983000964be4c2ce3280ca9f4dda768979ed76..0ebb539f3bd3a7d7a6e18753bc4fefa402a1b626 100644 (file)
@@ -571,6 +571,12 @@ static void nvme_rdma_free_queue(struct nvme_rdma_queue *queue)
        if (test_and_set_bit(NVME_RDMA_Q_DELETING, &queue->flags))
                return;
 
+       if (nvme_rdma_queue_idx(queue) == 0) {
+               nvme_rdma_free_qe(queue->device->dev,
+                       &queue->ctrl->async_event_sqe,
+                       sizeof(struct nvme_command), DMA_TO_DEVICE);
+       }
+
        nvme_rdma_destroy_queue_ib(queue);
        rdma_destroy_id(queue->cm_id);
 }
@@ -739,8 +745,6 @@ out:
 static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl,
                bool remove)
 {
-       nvme_rdma_free_qe(ctrl->queues[0].device->dev, &ctrl->async_event_sqe,
-                       sizeof(struct nvme_command), DMA_TO_DEVICE);
        nvme_rdma_stop_queue(&ctrl->queues[0]);
        if (remove) {
                blk_cleanup_queue(ctrl->ctrl.admin_q);
@@ -765,8 +769,10 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl,
 
        if (new) {
                ctrl->ctrl.admin_tagset = nvme_rdma_alloc_tagset(&ctrl->ctrl, true);
-               if (IS_ERR(ctrl->ctrl.admin_tagset))
+               if (IS_ERR(ctrl->ctrl.admin_tagset)) {
+                       error = PTR_ERR(ctrl->ctrl.admin_tagset);
                        goto out_free_queue;
+               }
 
                ctrl->ctrl.admin_q = blk_mq_init_queue(&ctrl->admin_tag_set);
                if (IS_ERR(ctrl->ctrl.admin_q)) {
@@ -846,8 +852,10 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
 
        if (new) {
                ctrl->ctrl.tagset = nvme_rdma_alloc_tagset(&ctrl->ctrl, false);
-               if (IS_ERR(ctrl->ctrl.tagset))
+               if (IS_ERR(ctrl->ctrl.tagset)) {
+                       ret = PTR_ERR(ctrl->ctrl.tagset);
                        goto out_free_io_queues;
+               }
 
                ctrl->ctrl.connect_q = blk_mq_init_queue(&ctrl->tag_set);
                if (IS_ERR(ctrl->ctrl.connect_q)) {
@@ -942,7 +950,12 @@ static void nvme_rdma_reconnect_ctrl_work(struct work_struct *work)
        }
 
        changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
-       WARN_ON_ONCE(!changed);
+       if (!changed) {
+               /* state change failure is ok if we're in DELETING state */
+               WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING);
+               return;
+       }
+
        ctrl->ctrl.nr_reconnects = 0;
 
        nvme_start_ctrl(&ctrl->ctrl);
@@ -962,7 +975,7 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)
        struct nvme_rdma_ctrl *ctrl = container_of(work,
                        struct nvme_rdma_ctrl, err_work);
 
-       nvme_stop_ctrl(&ctrl->ctrl);
+       nvme_stop_keep_alive(&ctrl->ctrl);
 
        if (ctrl->ctrl.queue_count > 1) {
                nvme_stop_queues(&ctrl->ctrl);
@@ -1601,12 +1614,15 @@ nvme_rdma_queue_is_ready(struct nvme_rdma_queue *queue, struct request *rq)
                        /*
                         * reconnecting state means transport disruption, which
                         * can take a long time and even might fail permanently,
-                        * so we can't let incoming I/O be requeued forever.
-                        * fail it fast to allow upper layers a chance to
-                        * failover.
+                        * fail fast to give upper layers a chance to failover.
+                        * deleting state means that the ctrl will never accept
+                        * commands again, fail it permanently.
                         */
-                       if (queue->ctrl->ctrl.state == NVME_CTRL_RECONNECTING)
+                       if (queue->ctrl->ctrl.state == NVME_CTRL_RECONNECTING ||
+                           queue->ctrl->ctrl.state == NVME_CTRL_DELETING) {
+                               nvme_req(rq)->status = NVME_SC_ABORT_REQ;
                                return BLK_STS_IOERR;
+                       }
                        return BLK_STS_RESOURCE; /* try again later */
                }
        }
index fecc14f535b23e6e66ed63acf2e9b5d73a11e12a..488250189c992d1d7e8e7442b746010934606726 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_NVME_TARGET)              += nvmet.o
 obj-$(CONFIG_NVME_TARGET_LOOP)         += nvme-loop.o
index 7c23eaf8e5639c14b5824fad26bdd4d6642e45b1..645ba7eee35db7a66a0249d39c7adba514173229 100644 (file)
@@ -387,13 +387,22 @@ struct nvmet_ns *nvmet_ns_alloc(struct nvmet_subsys *subsys, u32 nsid)
 
 static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
 {
+       u32 old_sqhd, new_sqhd;
+       u16 sqhd;
+
        if (status)
                nvmet_set_status(req, status);
 
-       /* XXX: need to fill in something useful for sq_head */
-       req->rsp->sq_head = 0;
-       if (likely(req->sq)) /* may happen during early failure */
-               req->rsp->sq_id = cpu_to_le16(req->sq->qid);
+       if (req->sq->size) {
+               do {
+                       old_sqhd = req->sq->sqhd;
+                       new_sqhd = (old_sqhd + 1) % req->sq->size;
+               } while (cmpxchg(&req->sq->sqhd, old_sqhd, new_sqhd) !=
+                                       old_sqhd);
+       }
+       sqhd = req->sq->sqhd & 0x0000FFFF;
+       req->rsp->sq_head = cpu_to_le16(sqhd);
+       req->rsp->sq_id = cpu_to_le16(req->sq->qid);
        req->rsp->command_id = req->cmd->common.command_id;
 
        if (req->ns)
@@ -420,6 +429,7 @@ void nvmet_cq_setup(struct nvmet_ctrl *ctrl, struct nvmet_cq *cq,
 void nvmet_sq_setup(struct nvmet_ctrl *ctrl, struct nvmet_sq *sq,
                u16 qid, u16 size)
 {
+       sq->sqhd = 0;
        sq->qid = qid;
        sq->size = size;
 
index 859a66725291d62bbf6f12a06b8486a9c5edbcc2..db3bf6b8bf9ee63581661310aa98820a7341445b 100644 (file)
@@ -109,9 +109,14 @@ static u16 nvmet_install_queue(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
                pr_warn("queue already connected!\n");
                return NVME_SC_CONNECT_CTRL_BUSY | NVME_SC_DNR;
        }
+       if (!sqsize) {
+               pr_warn("queue size zero!\n");
+               return NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;
+       }
 
-       nvmet_cq_setup(ctrl, req->cq, qid, sqsize);
-       nvmet_sq_setup(ctrl, req->sq, qid, sqsize);
+       /* note: convert queue size from 0's-based value to 1's-based value */
+       nvmet_cq_setup(ctrl, req->cq, qid, sqsize + 1);
+       nvmet_sq_setup(ctrl, req->sq, qid, sqsize + 1);
        return 0;
 }
 
index 421e43bf1dd78f5d15f1ffb7cf88d36575ec3503..58e010bdda3ea5c155da5c268f542a6939e5c786 100644 (file)
@@ -148,7 +148,7 @@ struct nvmet_fc_tgt_assoc {
        u32                             a_id;
        struct nvmet_fc_tgtport         *tgtport;
        struct list_head                a_list;
-       struct nvmet_fc_tgt_queue       *queues[NVMET_NR_QUEUES];
+       struct nvmet_fc_tgt_queue       *queues[NVMET_NR_QUEUES + 1];
        struct kref                     ref;
 };
 
@@ -608,7 +608,7 @@ nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc,
        unsigned long flags;
        int ret;
 
-       if (qid >= NVMET_NR_QUEUES)
+       if (qid > NVMET_NR_QUEUES)
                return NULL;
 
        queue = kzalloc((sizeof(*queue) +
@@ -783,6 +783,9 @@ nvmet_fc_find_target_queue(struct nvmet_fc_tgtport *tgtport,
        u16 qid = nvmet_fc_getqueueid(connection_id);
        unsigned long flags;
 
+       if (qid > NVMET_NR_QUEUES)
+               return NULL;
+
        spin_lock_irqsave(&tgtport->lock, flags);
        list_for_each_entry(assoc, &tgtport->assoc_list, a_list) {
                if (association_id == assoc->association_id) {
@@ -888,7 +891,7 @@ nvmet_fc_delete_target_assoc(struct nvmet_fc_tgt_assoc *assoc)
        int i;
 
        spin_lock_irqsave(&tgtport->lock, flags);
-       for (i = NVMET_NR_QUEUES - 1; i >= 0; i--) {
+       for (i = NVMET_NR_QUEUES; i >= 0; i--) {
                queue = assoc->queues[i];
                if (queue) {
                        if (!nvmet_fc_tgt_q_get(queue))
@@ -1910,8 +1913,7 @@ nvmet_fc_transfer_fcp_data(struct nvmet_fc_tgtport *tgtport,
                        spin_lock_irqsave(&fod->flock, flags);
                        fod->writedataactive = false;
                        spin_unlock_irqrestore(&fod->flock, flags);
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                } else /* NVMET_FCOP_READDATA or NVMET_FCOP_READDATA_RSP */ {
                        fcpreq->fcp_error = ret;
                        fcpreq->transferred_length = 0;
@@ -1929,8 +1931,7 @@ __nvmet_fc_fod_op_abort(struct nvmet_fc_fcp_iod *fod, bool abort)
        /* if in the middle of an io and we need to tear down */
        if (abort) {
                if (fcpreq->op == NVMET_FCOP_WRITEDATA) {
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                        return true;
                }
 
@@ -1968,8 +1969,7 @@ nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod)
                        fod->abort = true;
                        spin_unlock(&fod->flock);
 
-                       nvmet_req_complete(&fod->req,
-                                       NVME_SC_FC_TRANSPORT_ERROR);
+                       nvmet_req_complete(&fod->req, NVME_SC_INTERNAL);
                        return;
                }
 
@@ -2533,13 +2533,17 @@ nvmet_fc_remove_port(struct nvmet_port *port)
 {
        struct nvmet_fc_tgtport *tgtport = port->priv;
        unsigned long flags;
+       bool matched = false;
 
        spin_lock_irqsave(&nvmet_fc_tgtlock, flags);
        if (tgtport->port == port) {
-               nvmet_fc_tgtport_put(tgtport);
+               matched = true;
                tgtport->port = NULL;
        }
        spin_unlock_irqrestore(&nvmet_fc_tgtlock, flags);
+
+       if (matched)
+               nvmet_fc_tgtport_put(tgtport);
 }
 
 static struct nvmet_fabrics_ops nvmet_fc_tgt_fcp_ops = {
index 1cb9847ec261182dd5fdc6da836d14fa1503ad9b..7b75d9de55ab0d33939bf314a81ee01e26a6d1b1 100644 (file)
@@ -224,8 +224,6 @@ struct fcloop_nport {
        struct fcloop_lport *lport;
        struct list_head nport_list;
        struct kref ref;
-       struct completion rport_unreg_done;
-       struct completion tport_unreg_done;
        u64 node_name;
        u64 port_name;
        u32 port_role;
@@ -576,7 +574,7 @@ fcloop_tgt_fcp_abort(struct nvmet_fc_target_port *tgtport,
        tfcp_req->aborted = true;
        spin_unlock(&tfcp_req->reqlock);
 
-       tfcp_req->status = NVME_SC_FC_TRANSPORT_ABORTED;
+       tfcp_req->status = NVME_SC_INTERNAL;
 
        /*
         * nothing more to do. If io wasn't active, the transport should
@@ -630,6 +628,32 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
        schedule_work(&inireq->iniwork);
 }
 
+static void
+fcloop_nport_free(struct kref *ref)
+{
+       struct fcloop_nport *nport =
+               container_of(ref, struct fcloop_nport, ref);
+       unsigned long flags;
+
+       spin_lock_irqsave(&fcloop_lock, flags);
+       list_del(&nport->nport_list);
+       spin_unlock_irqrestore(&fcloop_lock, flags);
+
+       kfree(nport);
+}
+
+static void
+fcloop_nport_put(struct fcloop_nport *nport)
+{
+       kref_put(&nport->ref, fcloop_nport_free);
+}
+
+static int
+fcloop_nport_get(struct fcloop_nport *nport)
+{
+       return kref_get_unless_zero(&nport->ref);
+}
+
 static void
 fcloop_localport_delete(struct nvme_fc_local_port *localport)
 {
@@ -644,8 +668,7 @@ fcloop_remoteport_delete(struct nvme_fc_remote_port *remoteport)
 {
        struct fcloop_rport *rport = remoteport->private;
 
-       /* release any threads waiting for the unreg to complete */
-       complete(&rport->nport->rport_unreg_done);
+       fcloop_nport_put(rport->nport);
 }
 
 static void
@@ -653,8 +676,7 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
 {
        struct fcloop_tport *tport = targetport->private;
 
-       /* release any threads waiting for the unreg to complete */
-       complete(&tport->nport->tport_unreg_done);
+       fcloop_nport_put(tport->nport);
 }
 
 #define        FCLOOP_HW_QUEUES                4
@@ -722,6 +744,7 @@ fcloop_create_local_port(struct device *dev, struct device_attribute *attr,
                goto out_free_opts;
        }
 
+       memset(&pinfo, 0, sizeof(pinfo));
        pinfo.node_name = opts->wwnn;
        pinfo.port_name = opts->wwpn;
        pinfo.port_role = opts->roles;
@@ -804,32 +827,6 @@ fcloop_delete_local_port(struct device *dev, struct device_attribute *attr,
        return ret ? ret : count;
 }
 
-static void
-fcloop_nport_free(struct kref *ref)
-{
-       struct fcloop_nport *nport =
-               container_of(ref, struct fcloop_nport, ref);
-       unsigned long flags;
-
-       spin_lock_irqsave(&fcloop_lock, flags);
-       list_del(&nport->nport_list);
-       spin_unlock_irqrestore(&fcloop_lock, flags);
-
-       kfree(nport);
-}
-
-static void
-fcloop_nport_put(struct fcloop_nport *nport)
-{
-       kref_put(&nport->ref, fcloop_nport_free);
-}
-
-static int
-fcloop_nport_get(struct fcloop_nport *nport)
-{
-       return kref_get_unless_zero(&nport->ref);
-}
-
 static struct fcloop_nport *
 fcloop_alloc_nport(const char *buf, size_t count, bool remoteport)
 {
@@ -938,6 +935,7 @@ fcloop_create_remote_port(struct device *dev, struct device_attribute *attr,
        if (!nport)
                return -EIO;
 
+       memset(&pinfo, 0, sizeof(pinfo));
        pinfo.node_name = nport->node_name;
        pinfo.port_name = nport->port_name;
        pinfo.port_role = nport->port_role;
@@ -979,24 +977,12 @@ __unlink_remote_port(struct fcloop_nport *nport)
 }
 
 static int
-__wait_remoteport_unreg(struct fcloop_nport *nport, struct fcloop_rport *rport)
+__remoteport_unreg(struct fcloop_nport *nport, struct fcloop_rport *rport)
 {
-       int ret;
-
        if (!rport)
                return -EALREADY;
 
-       init_completion(&nport->rport_unreg_done);
-
-       ret = nvme_fc_unregister_remoteport(rport->remoteport);
-       if (ret)
-               return ret;
-
-       wait_for_completion(&nport->rport_unreg_done);
-
-       fcloop_nport_put(nport);
-
-       return ret;
+       return nvme_fc_unregister_remoteport(rport->remoteport);
 }
 
 static ssize_t
@@ -1029,7 +1015,7 @@ fcloop_delete_remote_port(struct device *dev, struct device_attribute *attr,
        if (!nport)
                return -ENOENT;
 
-       ret = __wait_remoteport_unreg(nport, rport);
+       ret = __remoteport_unreg(nport, rport);
 
        return ret ? ret : count;
 }
@@ -1086,24 +1072,12 @@ __unlink_target_port(struct fcloop_nport *nport)
 }
 
 static int
-__wait_targetport_unreg(struct fcloop_nport *nport, struct fcloop_tport *tport)
+__targetport_unreg(struct fcloop_nport *nport, struct fcloop_tport *tport)
 {
-       int ret;
-
        if (!tport)
                return -EALREADY;
 
-       init_completion(&nport->tport_unreg_done);
-
-       ret = nvmet_fc_unregister_targetport(tport->targetport);
-       if (ret)
-               return ret;
-
-       wait_for_completion(&nport->tport_unreg_done);
-
-       fcloop_nport_put(nport);
-
-       return ret;
+       return nvmet_fc_unregister_targetport(tport->targetport);
 }
 
 static ssize_t
@@ -1136,7 +1110,7 @@ fcloop_delete_target_port(struct device *dev, struct device_attribute *attr,
        if (!nport)
                return -ENOENT;
 
-       ret = __wait_targetport_unreg(nport, tport);
+       ret = __targetport_unreg(nport, tport);
 
        return ret ? ret : count;
 }
@@ -1223,11 +1197,11 @@ static void __exit fcloop_exit(void)
 
                spin_unlock_irqrestore(&fcloop_lock, flags);
 
-               ret = __wait_targetport_unreg(nport, tport);
+               ret = __targetport_unreg(nport, tport);
                if (ret)
                        pr_warn("%s: Failed deleting target port\n", __func__);
 
-               ret = __wait_remoteport_unreg(nport, rport);
+               ret = __remoteport_unreg(nport, rport);
                if (ret)
                        pr_warn("%s: Failed deleting remote port\n", __func__);
 
index 7d261ab894f47b56addb93fe95beee8fda37b8d3..87e429bfcd8a0c918f2aae018c247bb0014d3d0b 100644 (file)
@@ -74,6 +74,7 @@ struct nvmet_sq {
        struct percpu_ref       ref;
        u16                     qid;
        u16                     size;
+       u32                     sqhd;
        struct completion       free_done;
        struct completion       confirm_done;
 };
index 1731406586933739b137e0c6a8d48d3e29a1fa9b..6f7a77fb3ee75f2fd9254fad1c62c977a7e83bdb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for nvmem drivers.
 #
index de54c7f5048af4005dbfc51c04579813e9635455..d12e5de78e700018dc58965157b21ff2639f34c5 100644 (file)
@@ -135,7 +135,7 @@ static ssize_t bin_attr_nvmem_write(struct file *filp, struct kobject *kobj,
 
        /* Stop the user from writing */
        if (pos >= nvmem->size)
-               return 0;
+               return -EFBIG;
 
        if (count < nvmem->word_size)
                return -EINVAL;
@@ -789,6 +789,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
                return ERR_PTR(-EINVAL);
 
        nvmem = __nvmem_device_get(nvmem_np, NULL, NULL);
+       of_node_put(nvmem_np);
        if (IS_ERR(nvmem))
                return ERR_CAST(nvmem);
 
index 97dc01c814383d632766d49594391c0b1200b61c..8f19d342eed8e0646d0019f872eb3d24d066d08c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y = base.o device.o platform.o property.o
 obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
 obj-$(CONFIG_OF_FLATTREE) += fdt.o
index 260d33c0f26c9b290ec2c7f2d03237ebbad7da02..63897531cd75e66b2a62a2e872e74232e6b0b1ac 100644 (file)
@@ -1781,8 +1781,12 @@ bool of_console_check(struct device_node *dn, char *name, int index)
 {
        if (!dn || dn != of_stdout || console_set_on_cmdline)
                return false;
-       return !add_preferred_console(name, index,
-                                     kstrdup(of_stdout_options, GFP_KERNEL));
+
+       /*
+        * XXX: cast `options' to char pointer to suppress complication
+        * warnings: printk, UART and console drivers expect char pointer.
+        */
+       return !add_preferred_console(name, index, (char *)of_stdout_options);
 }
 EXPORT_SYMBOL_GPL(of_console_check);
 
index d94dd8b77abd5140d52c6dfbdff249409225cbec..98258583abb0b40529056767c91401296e0013d4 100644 (file)
@@ -44,7 +44,7 @@ static int of_get_phy_id(struct device_node *device, u32 *phy_id)
        return -EINVAL;
 }
 
-static void of_mdiobus_register_phy(struct mii_bus *mdio,
+static int of_mdiobus_register_phy(struct mii_bus *mdio,
                                    struct device_node *child, u32 addr)
 {
        struct phy_device *phy;
@@ -60,9 +60,13 @@ static void of_mdiobus_register_phy(struct mii_bus *mdio,
        else
                phy = get_phy_device(mdio, addr, is_c45);
        if (IS_ERR(phy))
-               return;
+               return PTR_ERR(phy);
 
-       rc = irq_of_parse_and_map(child, 0);
+       rc = of_irq_get(child, 0);
+       if (rc == -EPROBE_DEFER) {
+               phy_device_free(phy);
+               return rc;
+       }
        if (rc > 0) {
                phy->irq = rc;
                mdio->irq[addr] = rc;
@@ -84,22 +88,23 @@ static void of_mdiobus_register_phy(struct mii_bus *mdio,
        if (rc) {
                phy_device_free(phy);
                of_node_put(child);
-               return;
+               return rc;
        }
 
        dev_dbg(&mdio->dev, "registered phy %s at address %i\n",
                child->name, addr);
+       return 0;
 }
 
-static void of_mdiobus_register_device(struct mii_bus *mdio,
-                                      struct device_node *child, u32 addr)
+static int of_mdiobus_register_device(struct mii_bus *mdio,
+                                     struct device_node *child, u32 addr)
 {
        struct mdio_device *mdiodev;
        int rc;
 
        mdiodev = mdio_device_create(mdio, addr);
        if (IS_ERR(mdiodev))
-               return;
+               return PTR_ERR(mdiodev);
 
        /* Associate the OF node with the device structure so it
         * can be looked up later.
@@ -112,11 +117,12 @@ static void of_mdiobus_register_device(struct mii_bus *mdio,
        if (rc) {
                mdio_device_free(mdiodev);
                of_node_put(child);
-               return;
+               return rc;
        }
 
        dev_dbg(&mdio->dev, "registered mdio device %s at address %i\n",
                child->name, addr);
+       return 0;
 }
 
 /* The following is a list of PHY compatible strings which appear in
@@ -219,9 +225,11 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                }
 
                if (of_mdiobus_child_is_phy(child))
-                       of_mdiobus_register_phy(mdio, child, addr);
+                       rc = of_mdiobus_register_phy(mdio, child, addr);
                else
-                       of_mdiobus_register_device(mdio, child, addr);
+                       rc = of_mdiobus_register_device(mdio, child, addr);
+               if (rc)
+                       goto unregister;
        }
 
        if (!scanphys)
@@ -242,12 +250,19 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                        dev_info(&mdio->dev, "scan phy %s at address %i\n",
                                 child->name, addr);
 
-                       if (of_mdiobus_child_is_phy(child))
-                               of_mdiobus_register_phy(mdio, child, addr);
+                       if (of_mdiobus_child_is_phy(child)) {
+                               rc = of_mdiobus_register_phy(mdio, child, addr);
+                               if (rc)
+                                       goto unregister;
+                       }
                }
        }
 
        return 0;
+
+unregister:
+       mdiobus_unregister(mdio);
+       return rc;
 }
 EXPORT_SYMBOL(of_mdiobus_register);
 
index d507c3569a88acac9e796f1f172f412e5386347f..32771c2ced7bbc1df6f05a9f252e7a3682bd443c 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/sort.h>
 #include <linux/slab.h>
 
-#define MAX_RESERVED_REGIONS   16
+#define MAX_RESERVED_REGIONS   32
 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
 static int reserved_mem_count;
 
index fbb72116e9d456b8a08672391de9e2cc144ed171..264c355ba1ffc5f9474dd5a1bcf9696fa9cf7d4b 100644 (file)
@@ -954,7 +954,7 @@ of_fwnode_graph_get_port_parent(struct fwnode_handle *fwnode)
        struct device_node *np;
 
        /* Get the parent of the port */
-       np = of_get_next_parent(to_of_node(fwnode));
+       np = of_get_parent(to_of_node(fwnode));
        if (!np)
                return NULL;
 
index 2d135fba94c16191fb70eb8146dc4d188e9a4add..3031fc2f18f6fd6b8bb5ae8bd17b9c72ed733b4f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += testcases.dtb.o
 
 targets += testcases.dtb testcases.dtb.S
index 9e791fcf05ddb1f4a173f5a2054d321136085068..ab5e89b5e27e10cef2137073ecaa42fe838b9268 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /plugin/;
 
index 270ee885a623fd3f372ec5e7c74f4ae88baba4c3..4d5b99723bad03fdd8ad464c7514ef0aed70c2fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /plugin/;
 
index 453d0bd83320bc4c6a2fde500273349807b009c8..820b79ca378a932683bc6c62e3121f8dd22b61e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 /plugin/;
 
index 12f7c3d649c884411effd84665a0e64a831c202f..ce49463d9d32b69bd6374ac3ebecdfe08c75b020 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 / {
        testcase-data {
index da4695f60351ad4c7c24aecf791a5a6c2b71edfc..ec175e800725a4832827ac5c0b98e0822a4fff9e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        testcase-data {
index c9e5411295343e418a8be9a984ae69ab50572550..1fd3b21313f524cf6cbc4c1a01ab3aa7695e4353 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        testcase-data {
index 02ba56c20fe1247b7ec435eb34d7a6a2b84eca38..7b8001ab9f3a7318895bede385787ca136c1258c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        testcase-data {
index 5b1527e8a7fb3ae471a359aed37daa81bd44c0ce..3c2f09e56b612eacc2bff9059f895cb63ab15c6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        aliases {
index a0c93822aee3af4f2653b322ba5323373268a12c..fa39611071b32f44fcc9bd3b4916006bfab57828 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 / {
        testcase-data {
index 29a35cb1da64c070ff1b6a96a76ad54d7c4cb636..168ef0bbabde1d6b1874d97e63ee474f7ec00e62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Self tests for device tree subsystem
  */
index e65a576e4032d90d270bba28403fa546727c7c0d..f343bd96609a17869b8cfa7fb55da30696aadba7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**
  * @file nmi_timer_int.c
  *
index d5b2732b1b818ede3e815ed5f5d3d30030b16544..4b150a754890887a4f2c5751e90d7842a12d6a7a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2010 ARM Ltd.
  * Copyright 2012 Advanced Micro Devices, Inc., Robert Richter
index f95cab57133afcdbdb49fac21b1e3372a9cd4810..3cd5e6cb8478857f4111a5d5e01c900a547cf655 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for most of the non-PCI devices in PA-RISC machines
 #
index e56f1569f6c396f8c29448e9adb26214e26ba9fc..0905be256de087d016759f85f4df55046bf882ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/prefetch.h>
 
 /**
index 696b8d4ca8878031d8d3825671e74cacb21d8d68..6fa41f8173b63e74acfc1426ab6ce171dee0b669 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel Parallel port device drivers.
 #
index a959224d011bce601a98bc6d525f97aebdb2125a..5d41dda6da4e7bdc7028264b7ddd96a6356e9fb3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* IEEE-1284 operations for parport.
  *
  * This file is for generic IEEE 1284 operations.  The idea is that
index 56769dd5d31568cda679062b8b86fda380610747..6513a44b9ca756b367d4b6eddd97664b5a1a36c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MULTIFACE_H_
 #define _MULTIFACE_H_
 
index 4d1d6eaf333ddb64362ed7b9a7bca613c0c763d1..e035174ba205d12dbc6e529c6ec85c8bda9e5d21 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Parallel port device probing code
  *
index 8ee44a104ac47939f7693370143c78135c3735c6..48804049d6972631f3179659b31bf3db3966c149 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Sysctl interface for parport devices.
  * 
  * Authors: David Campbell
index 66a21acad95288be33076a9386359546e094dc20..80adbdbceccee274e9bdcef65f25328f237f5286 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the PCI bus specific drivers.
 #
index c61be9738ccecedfc99bf708fad9a62265e3c93b..e73661182da0e65e7030e7acb8ce052789a612d1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PCIE_DW) += pcie-designware.o
 obj-$(CONFIG_PCIE_DW_HOST) += pcie-designware-host.o
 obj-$(CONFIG_PCIE_DW_EP) += pcie-designware-ep.o
index 4ddc6e8f9fe7431ae24b7a2068ca2eb8a90e0b0e..f9308c2f22e6754d0b50fc627c11a96cf44af8f4 100644 (file)
@@ -251,9 +251,8 @@ err:
        return ret;
 }
 
-static void pci_epf_test_raise_irq(struct pci_epf_test *epf_test)
+static void pci_epf_test_raise_irq(struct pci_epf_test *epf_test, u8 irq)
 {
-       u8 irq;
        u8 msi_count;
        struct pci_epf *epf = epf_test->epf;
        struct pci_epc *epc = epf->epc;
@@ -262,7 +261,6 @@ static void pci_epf_test_raise_irq(struct pci_epf_test *epf_test)
 
        reg->status |= STATUS_IRQ_RAISED;
        msi_count = pci_epc_get_msi(epc);
-       irq = (reg->command & MSI_NUMBER_MASK) >> MSI_NUMBER_SHIFT;
        if (irq > msi_count || msi_count <= 0)
                pci_epc_raise_irq(epc, PCI_EPC_IRQ_LEGACY, 0);
        else
@@ -289,6 +287,8 @@ static void pci_epf_test_cmd_handler(struct work_struct *work)
        reg->command = 0;
        reg->status = 0;
 
+       irq = (command & MSI_NUMBER_MASK) >> MSI_NUMBER_SHIFT;
+
        if (command & COMMAND_RAISE_LEGACY_IRQ) {
                reg->status = STATUS_IRQ_RAISED;
                pci_epc_raise_irq(epc, PCI_EPC_IRQ_LEGACY, 0);
@@ -301,7 +301,7 @@ static void pci_epf_test_cmd_handler(struct work_struct *work)
                        reg->status |= STATUS_WRITE_FAIL;
                else
                        reg->status |= STATUS_WRITE_SUCCESS;
-               pci_epf_test_raise_irq(epf_test);
+               pci_epf_test_raise_irq(epf_test, irq);
                goto reset_handler;
        }
 
@@ -311,7 +311,7 @@ static void pci_epf_test_cmd_handler(struct work_struct *work)
                        reg->status |= STATUS_READ_SUCCESS;
                else
                        reg->status |= STATUS_READ_FAIL;
-               pci_epf_test_raise_irq(epf_test);
+               pci_epf_test_raise_irq(epf_test, irq);
                goto reset_handler;
        }
 
@@ -321,13 +321,12 @@ static void pci_epf_test_cmd_handler(struct work_struct *work)
                        reg->status |= STATUS_COPY_SUCCESS;
                else
                        reg->status |= STATUS_COPY_FAIL;
-               pci_epf_test_raise_irq(epf_test);
+               pci_epf_test_raise_irq(epf_test, irq);
                goto reset_handler;
        }
 
        if (command & COMMAND_RAISE_MSI_IRQ) {
                msi_count = pci_epc_get_msi(epc);
-               irq = (command & MSI_NUMBER_MASK) >> MSI_NUMBER_SHIFT;
                if (irq > msi_count || msi_count <= 0)
                        goto reset_handler;
                reg->status = STATUS_IRQ_RAISED;
index 12382785e02a652637b64599e1b51c6a7b78206d..95f5b80ca52a2cf1fa39b1439161923c01497c0c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PCI_FTPCI100) += pci-ftpci100.o
 obj-$(CONFIG_PCI_HYPERV) += pci-hyperv.o
 obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
index 89f4e3d072d7c10e14c3b8332408babf5a30f3d3..26ed0c08f20972e6d1d6ef09b4daf140dc17a193 100644 (file)
@@ -935,6 +935,8 @@ static int advk_pcie_probe(struct platform_device *pdev)
        bridge->sysdata = pcie;
        bridge->busnr = 0;
        bridge->ops = &advk_pcie_ops;
+       bridge->map_irq = of_irq_parse_and_map_pci;
+       bridge->swizzle_irq = pci_common_swizzle;
 
        ret = pci_scan_root_bus_bridge(bridge);
        if (ret < 0) {
index 96028f01bc90142e50ef3b8ce5d85e6775f1e619..4ea7d2ebcc5cd4ed4e3702947152c72054a06efe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Support for Faraday Technology FTPC100 PCI Controller
  *
index 9c40da54f88a10aab4dde9ba705b187912101909..1987fec1f126f1ecc84c1a0f4c6bc21b2f639c6c 100644 (file)
@@ -233,6 +233,7 @@ struct tegra_msi {
        struct msi_controller chip;
        DECLARE_BITMAP(used, INT_PCI_MSI_NR);
        struct irq_domain *domain;
+       unsigned long pages;
        struct mutex lock;
        u64 phys;
        int irq;
@@ -1529,22 +1530,9 @@ static int tegra_pcie_enable_msi(struct tegra_pcie *pcie)
                goto err;
        }
 
-       /*
-        * The PCI host bridge on Tegra contains some logic that intercepts
-        * MSI writes, which means that the MSI target address doesn't have
-        * to point to actual physical memory. Rather than allocating one 4
-        * KiB page of system memory that's never used, we can simply pick
-        * an arbitrary address within an area reserved for system memory
-        * in the FPCI address map.
-        *
-        * However, in order to avoid confusion, we pick an address that
-        * doesn't map to physical memory. The FPCI address map reserves a
-        * 1012 GiB region for system memory and memory-mapped I/O. Since
-        * none of the Tegra SoCs that contain this PCI host bridge can
-        * address more than 16 GiB of system memory, the last 4 KiB of
-        * these 1012 GiB is a good candidate.
-        */
-       msi->phys = 0xfcfffff000;
+       /* setup AFI/FPCI range */
+       msi->pages = __get_free_pages(GFP_KERNEL, 0);
+       msi->phys = virt_to_phys((void *)msi->pages);
 
        afi_writel(pcie, msi->phys >> soc->msi_base_shift, AFI_MSI_FPCI_BAR_ST);
        afi_writel(pcie, msi->phys, AFI_MSI_AXI_BAR_ST);
@@ -1596,6 +1584,8 @@ static int tegra_pcie_disable_msi(struct tegra_pcie *pcie)
        afi_writel(pcie, 0, AFI_MSI_EN_VEC6);
        afi_writel(pcie, 0, AFI_MSI_EN_VEC7);
 
+       free_pages(msi->pages, 0);
+
        if (msi->irq > 0)
                free_irq(msi->irq, pcie);
 
index 6bbb81f06a53c33bcd6acaee3cbb1bd92ecf7823..95049de4131cc46dc7e59e1c6b5dd2020b34f567 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/pci-ecam.h>
 #include <linux/delay.h>
 #include <linux/of.h>
index e33cdda45a4dc34ca7944ee368a828baf34aaeb8..7e333160371457032fb92e53b928a40c6c94f7e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux kernel pci hotplug controller drivers.
 #
index 7eb4109a3df4eb6941f6c4c8ee435e7bb98f7747..bb88c26f5144d2288c46448115101299570184ba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File:       htirq.c
  * Purpose:    Hypertransport Interrupt Capability
index 83d30953ce195d46ad4e5f11f740084593b23a88..10929cd43d5dcee5dc0410610752e83070005c3f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI IRQ handling code
  *
index 7e9e79575d9393a3e9bb2a403c8e75a3d0f9d01d..a961a71d950fb604133f0f877ab60cce7aff110b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Purpose: Export the firmware instance and label associated with
  * a pci device to sysfs
index 1eecfa301f7fb2efbfd025f70d39b7d159a42dde..00fa4278c1f49c22d97451759ff0708016523830 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pci/pci-sysfs.c
  *
@@ -686,7 +687,7 @@ static ssize_t driver_override_store(struct device *dev,
                                     const char *buf, size_t count)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
-       char *driver_override, *old = pdev->driver_override, *cp;
+       char *driver_override, *old, *cp;
 
        /* We need to keep extra room for a newline */
        if (count >= (PAGE_SIZE - 1))
@@ -700,12 +701,15 @@ static ssize_t driver_override_store(struct device *dev,
        if (cp)
                *cp = '\0';
 
+       device_lock(dev);
+       old = pdev->driver_override;
        if (strlen(driver_override)) {
                pdev->driver_override = driver_override;
        } else {
                kfree(driver_override);
                pdev->driver_override = NULL;
        }
+       device_unlock(dev);
 
        kfree(old);
 
@@ -716,8 +720,12 @@ static ssize_t driver_override_show(struct device *dev,
                                    struct device_attribute *attr, char *buf)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
+       ssize_t len;
 
-       return snprintf(buf, PAGE_SIZE, "%s\n", pdev->driver_override);
+       device_lock(dev);
+       len = snprintf(buf, PAGE_SIZE, "%s\n", pdev->driver_override);
+       device_unlock(dev);
+       return len;
 }
 static DEVICE_ATTR_RW(driver_override);
 
index a6560c9baa52acb766ade748a0473cf74af6cd77..fdb02c1f94bbf2d39d355d5cca1ecac266f7e95e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DRIVERS_PCI_H
 #define DRIVERS_PCI_H
 
index 36e35ea8fde7198ccc69b831eb6004131de50709..223e4c34c29a5b2f048becd0fdd6ab7346e04a62 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for PCI-Express PORT Driver
 #
index 2cba67510dc862a00979cd9cb9e669105221ff5c..09bd890875a3a0064e288834a8ac07b371c9f516 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for PCI-Express Root Port Advanced Error Reporting Driver
 #
index d51e4a57b190095c0e1641f44d4f7a530c457db7..5449e5ce139db62e52c3ed45ef3f0d428c1d1724 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Intel Corp.
  *     Tom Long Nguyen (tom.l.nguyen@intel.com)
index 01906576ab9113e1a85cb6c596967dbe6bdba7b0..b2019440e8827788bf3af7684df28519e419704d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Access ACPI _OSC method
  *
index 1dfa10cc566bebed005c2fe11a72c85a37036c32..83e4a892b14be796700f3c3a81733470ec425704 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File:       drivers/pci/pcie/aspm.c
  * Enabling PCIe link L0s/L1 state and Clock Power Management
index 4334fd5d7de9e7d9984d91addab3d1bfe4cab741..a854bc56911740684cd0df2b25a64ca32164beb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       portdrv.h
  * Purpose:    PCI Express Port Bus Driver's Internal Data Structures
index 313a21df1692fa62f2330e55121aa0788e48ce29..ebc9d45bd731fa4afd9cc32e99dc558b608fd7f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File:       portdrv_core.c
  * Purpose:    PCI Express Port Bus Driver's Core Functions
index 083276e03c38d924886a9e1d386deaee5b9e06e5..68c389c7b975faa963282d6509995459aa0e082e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File:       portdrv_pci.c
  * Purpose:    PCI Express Port Bus Driver
index 098360d7ff81639c90e6ec9bcc0fe56a2a01fd7d..58a662e3c4a667ee62fbba934cdc84d0ed72fa84 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Procfs interface for the PCI bus.
  *
index a4d33619a7bb67157f128f0009a58f9d21c7c727..911b3b65c8b2de1f0caa59c7527c85088a79b740 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This file contains work-arounds for many known PCI hardware
  *  bugs.  Devices present only on certain architectures (host
index e576e1a8d9782627642ace274b456a86772732a9..c039149cacb03c26ae4ef04d3ce327d40011b29b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     drivers/pci/setup-res.c
  *
index 9bf993e1f71e837faebe8227accb6a7225a3d7cc..83efa001c2e78fd7b8c30855ac5f48273ebcd505 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     pci_syscall.c
  *
index 27e94b30cf9625b8da99d67b74308651b8077dc6..e7dae16b9a43e8341e11b98b043a4102c88e291c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel pcmcia subsystem (c/o David Hinds)
 #
index ed957399d863b8107ef0c081dd28657a820b3f28..2122c59a1c4afd54783f42e2294b4d0d1982f3a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BCM63XX_PCMCIA_H_
 #define BCM63XX_PCMCIA_H_
 
index 8836d393ad020ce58894745b490b2d6b1199e68c..fabe08c3e33d9d0f23564bdde2291c0aa1dfcd02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_GUARD_i82092aa_H_
 #define _INCLUDE_GUARD_i82092aa_H_
 
index f558e1adf9546341450503f50502e98f108ff764..05fec98617d060269f01da9aaacc2cf38c2da30d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2001 by Hiroyuki Kondo
  */
index f95c58563bc8f648e3027ecccbca5b47ed6de400..d99ad3864ff3dd880be6e9e7c0b92f921abb5fe9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2001 by Hiroyuki Kondo
  */
index c8e84bdece386c501e4039fce9f983f1f6b246fa..605cc2ccf9c58d194be099ce97c5e941ad1dfb93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_GUARD_PD6729_H_
 #define _INCLUDE_GUARD_PD6729_H_
 
index 71ace6910d7ec2ac20968221ef2d18a0f9149d90..78ad2bba76db0fbb766f9ccdd3a6e897ea0589c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_assabet.c
  *
index c3f67363f6a138433da4270f8bd39dec3f24910d..2a54081d161d4a64769ddfa429dc04e95c9070f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_cerf.c
  *
index adb08dbc723f63384e2924cdf5213e3f2855c054..a5f1f1dd63cbbab0b77467fd1dbfeaba7737b7db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "soc_common.h"
 #include "sa11xx_base.h"
 
index 431d8b07cbafd97b21f0d6df780474aced6d7502..aebf9a66fddea777dd8b8be8c679ed4ed829e326 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_h3600.c
  *
index b07a2dc3296e1cd2c2b855b0c26b0e9ed329cc06..0e52a575986e0be6e8acf9a228717dbe4026787a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_shannon.c
  *
index 73fd37968b6a941cae1eb8f5382596d88c8f5a1f..7ce65bb23a8ee67d082dbeef1679a84f022253a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_simpad.c
  *
index e74ecfdc1b26980a835a48bbf62df14328fecff7..c01571d46982df2e2af65feef8c44e7d39749d58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "soc_common.h"
 #include "sa11xx_base.h"
 
index 480a3ede27c8b59b5cb573d30c5cead55d5ca481..3d4ca87ca76cd58871f4aa33ab72134843baa143 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/pcmcia/sa1100_jornada720.c
  *
index 019c395eb4bf8cd44b4127b0efeed797e48b0ab5..0ccf05a28a4b96686d76e908b54b949c298715cb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/drivers/pcmcia/sa1100_neponset.c
  *
index 3f3625805353e074e0d7cbc745d38b6f76b2eb45..b7f993f1bbd0f6851a7479463a2be2706562bf95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/drivers/pcmcia/soc_common.h
  *
index 4e75e9e258cd1419e105439ae7b995f79e2cff68..efeed19e28c7583c5090e154c47b316fe1e2f6a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __YENTA_H
 #define __YENTA_H
 
index 6420bd4394d5e43f5e4ea9e5c327bc50b5582fd4..9402dc8ff22c6704be251beb7665513d6916ffdd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o
 obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
 obj-$(CONFIG_QCOM_L2_PMU)      += qcom_l2_pmu.o
index 0a9b78705ee810c9e18c6fa1f46551fc27374287..3303dd8d8eb5718f96de5326949ba89a60e9f32e 100644 (file)
@@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
                ret = armpmu_register(pmu);
                if (ret) {
                        pr_warn("Failed to register PMU for CPU%d\n", cpu);
+                       kfree(pmu->name);
                        return ret;
                }
        }
index 4eafa7a42e52102f2d02be5c8dac277861995dee..4428852e1da17ec93788f9a275debf65e97f7cb3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * platform_device probing code for ARM performance counters.
  *
index 3a52dcb09566822dfeea95988b4811a8d79c9982..84e3bd9c5665e36d390ec96eaddf7432ca73a7a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the phy drivers.
 #
index 4eb82ec8d49145c4193a3d7773d842ac19d5daac..fdd9ec8fd70b369151021852d4f7d1b871a6bb5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_CYGNUS_PCIE)          += phy-bcm-cygnus-pcie.o
 obj-$(CONFIG_BCM_KONA_USB2_PHY)                += phy-bcm-kona-usb2.o
 obj-$(CONFIG_PHY_BCM_NS_USB2)          += phy-bcm-ns-usb2.o
index 0cf6a7cbaf9f90a7d716787473a3957fbec57e0a..5c3ec5d10e0da84e2ff72687add5c00050f1eb3c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY) += phy-armada375-usb2.o
 obj-$(CONFIG_PHY_BERLIN_SATA)          += phy-berlin-sata.o
 obj-$(CONFIG_PHY_BERLIN_USB)           += phy-berlin-usb.o
index 73ebad6634a79955340de255fb846b6acc815922..89c887ea5557bcd0b7917b2d772bb7eabe0f91ff 100644 (file)
 #define     MVEBU_COMPHY_CONF6_40B             BIT(18)
 #define MVEBU_COMPHY_SELECTOR                  0x1140
 #define     MVEBU_COMPHY_SELECTOR_PHY(n)       ((n) * 0x4)
+#define MVEBU_COMPHY_PIPE_SELECTOR             0x1144
+#define     MVEBU_COMPHY_PIPE_SELECTOR_PIPE(n) ((n) * 0x4)
 
 #define MVEBU_COMPHY_LANES     6
 #define MVEBU_COMPHY_PORTS     3
@@ -468,13 +470,17 @@ static int mvebu_comphy_power_on(struct phy *phy)
 {
        struct mvebu_comphy_lane *lane = phy_get_drvdata(phy);
        struct mvebu_comphy_priv *priv = lane->priv;
-       int ret;
-       u32 mux, val;
+       int ret, mux;
+       u32 val;
 
        mux = mvebu_comphy_get_mux(lane->id, lane->port, lane->mode);
        if (mux < 0)
                return -ENOTSUPP;
 
+       regmap_read(priv->regmap, MVEBU_COMPHY_PIPE_SELECTOR, &val);
+       val &= ~(0xf << MVEBU_COMPHY_PIPE_SELECTOR_PIPE(lane->id));
+       regmap_write(priv->regmap, MVEBU_COMPHY_PIPE_SELECTOR, val);
+
        regmap_read(priv->regmap, MVEBU_COMPHY_SELECTOR, &val);
        val &= ~(0xf << MVEBU_COMPHY_SELECTOR_PHY(lane->id));
        val |= mux << MVEBU_COMPHY_SELECTOR_PHY(lane->id);
@@ -526,6 +532,10 @@ static int mvebu_comphy_power_off(struct phy *phy)
        val &= ~(0xf << MVEBU_COMPHY_SELECTOR_PHY(lane->id));
        regmap_write(priv->regmap, MVEBU_COMPHY_SELECTOR, val);
 
+       regmap_read(priv->regmap, MVEBU_COMPHY_PIPE_SELECTOR, &val);
+       val &= ~(0xf << MVEBU_COMPHY_PIPE_SELECTOR_PIPE(lane->id));
+       regmap_write(priv->regmap, MVEBU_COMPHY_PIPE_SELECTOR, val);
+
        return 0;
 }
 
@@ -576,8 +586,8 @@ static int mvebu_comphy_probe(struct platform_device *pdev)
                return PTR_ERR(priv->regmap);
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->base = devm_ioremap_resource(&pdev->dev, res);
-       if (!priv->base)
-               return -ENOMEM;
+       if (IS_ERR(priv->base))
+               return PTR_ERR(priv->base);
 
        for_each_available_child_of_node(pdev->dev.of_node, child) {
                struct mvebu_comphy_lane *lane;
index e3baad78521fbde8bf9d4e2fa657e7bab5c5a7dc..721a2a1c97ef43299c3e143744297764943b4b92 100644 (file)
@@ -27,6 +27,7 @@
 /* banks shared by multiple phys */
 #define SSUSB_SIFSLV_V1_SPLLC          0x000   /* shared by u3 phys */
 #define SSUSB_SIFSLV_V1_U2FREQ         0x100   /* shared by u2 phys */
+#define SSUSB_SIFSLV_V1_CHIP           0x300   /* shared by u3 phys */
 /* u2 phy bank */
 #define SSUSB_SIFSLV_V1_U2PHY_COM      0x000
 /* u3/pcie/sata phy banks */
@@ -762,7 +763,7 @@ static void phy_v1_banks_init(struct mtk_tphy *tphy,
        case PHY_TYPE_USB3:
        case PHY_TYPE_PCIE:
                u3_banks->spllc = tphy->sif_base + SSUSB_SIFSLV_V1_SPLLC;
-               u3_banks->chip = NULL;
+               u3_banks->chip = tphy->sif_base + SSUSB_SIFSLV_V1_CHIP;
                u3_banks->phyd = instance->port_base + SSUSB_SIFSLV_V1_U3PHYD;
                u3_banks->phya = instance->port_base + SSUSB_SIFSLV_V1_U3PHYA;
                break;
index 2e183d7695fd403f731cce20a3bc40c5936f12af..9abb7899762ae5d50eab1cfe74dec5975cb959c1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_QCOM_APQ8064_SATA)    += phy-qcom-apq8064-sata.o
 obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA)    += phy-qcom-ipq806x-sata.o
 obj-$(CONFIG_PHY_QCOM_QMP)             += phy-qcom-qmp.o
index bd0acdf38e0f7a15c0f92436b78c24f9de2f7900..7f149d989046627a675ea522d4a4d6786615e649 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_ROCKCHIP_DP)          += phy-rockchip-dp.o
 obj-$(CONFIG_PHY_ROCKCHIP_EMMC)                += phy-rockchip-emmc.o
 obj-$(CONFIG_PHY_ROCKCHIP_INNO_USB2)   += phy-rockchip-inno-usb2.o
index 4d2c57f21d7682bb6b08f31a1dab0ba74ab0e4e2..a958c9bced019d2da7520977a26f5c10a81cdea4 100644 (file)
@@ -443,14 +443,34 @@ static inline int property_enable(struct rockchip_typec_phy *tcphy,
        return regmap_write(tcphy->grf_regs, reg->offset, val | mask);
 }
 
+static void tcphy_dp_aux_set_flip(struct rockchip_typec_phy *tcphy)
+{
+       u16 tx_ana_ctrl_reg_1;
+
+       /*
+        * Select the polarity of the xcvr:
+        * 1, Reverses the polarity (If TYPEC, Pulls ups aux_p and pull
+        * down aux_m)
+        * 0, Normal polarity (if TYPEC, pulls up aux_m and pulls down
+        * aux_p)
+        */
+       tx_ana_ctrl_reg_1 = readl(tcphy->base + TX_ANA_CTRL_REG_1);
+       if (!tcphy->flip)
+               tx_ana_ctrl_reg_1 |= BIT(12);
+       else
+               tx_ana_ctrl_reg_1 &= ~BIT(12);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
+}
+
 static void tcphy_dp_aux_calibration(struct rockchip_typec_phy *tcphy)
 {
+       u16 tx_ana_ctrl_reg_1;
        u16 rdata, rdata2, val;
 
        /* disable txda_cal_latch_en for rewrite the calibration values */
-       rdata = readl(tcphy->base + TX_ANA_CTRL_REG_1);
-       val = rdata & 0xdfff;
-       writel(val, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 = readl(tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 &= ~BIT(13);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
 
        /*
         * read a resistor calibration code from CMN_TXPUCAL_CTRL[6:0] and
@@ -472,9 +492,8 @@ static void tcphy_dp_aux_calibration(struct rockchip_typec_phy *tcphy)
         * Activate this signal for 1 clock cycle to sample new calibration
         * values.
         */
-       rdata = readl(tcphy->base + TX_ANA_CTRL_REG_1);
-       val = rdata | 0x2000;
-       writel(val, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |= BIT(13);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
        usleep_range(150, 200);
 
        /* set TX Voltage Level and TX Deemphasis to 0 */
@@ -482,8 +501,10 @@ static void tcphy_dp_aux_calibration(struct rockchip_typec_phy *tcphy)
        /* re-enable decap */
        writel(0x100, tcphy->base + TX_ANA_CTRL_REG_2);
        writel(0x300, tcphy->base + TX_ANA_CTRL_REG_2);
-       writel(0x2008, tcphy->base + TX_ANA_CTRL_REG_1);
-       writel(0x2018, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |= BIT(3);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |= BIT(4);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
 
        writel(0, tcphy->base + TX_ANA_CTRL_REG_5);
 
@@ -494,8 +515,10 @@ static void tcphy_dp_aux_calibration(struct rockchip_typec_phy *tcphy)
        writel(0x1001, tcphy->base + TX_ANA_CTRL_REG_4);
 
        /* re-enables Bandgap reference for LDO */
-       writel(0x2098, tcphy->base + TX_ANA_CTRL_REG_1);
-       writel(0x2198, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |= BIT(7);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |= BIT(8);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
 
        /*
         * re-enables the transmitter pre-driver, driver data selection MUX,
@@ -505,27 +528,26 @@ static void tcphy_dp_aux_calibration(struct rockchip_typec_phy *tcphy)
        writel(0x303, tcphy->base + TX_ANA_CTRL_REG_2);
 
        /*
-        * BIT 12: Controls auxda_polarity, which selects the polarity of the
-        * xcvr:
-        * 1, Reverses the polarity (If TYPEC, Pulls ups aux_p and pull
-        * down aux_m)
-        * 0, Normal polarity (if TYPE_C, pulls up aux_m and pulls down
-        * aux_p)
+        * Do some magic undocumented stuff, some of which appears to
+        * undo the "re-enables Bandgap reference for LDO" above.
         */
-       val = 0xa078;
-       if (!tcphy->flip)
-               val |= BIT(12);
-       writel(val, tcphy->base + TX_ANA_CTRL_REG_1);
+       tx_ana_ctrl_reg_1 |=  BIT(15);
+       tx_ana_ctrl_reg_1 &= ~BIT(8);
+       tx_ana_ctrl_reg_1 &= ~BIT(7);
+       tx_ana_ctrl_reg_1 |=  BIT(6);
+       tx_ana_ctrl_reg_1 |=  BIT(5);
+       writel(tx_ana_ctrl_reg_1, tcphy->base + TX_ANA_CTRL_REG_1);
 
        writel(0, tcphy->base + TX_ANA_CTRL_REG_3);
        writel(0, tcphy->base + TX_ANA_CTRL_REG_4);
        writel(0, tcphy->base + TX_ANA_CTRL_REG_5);
 
        /*
-        * Controls low_power_swing_en, set the voltage swing of the driver
-        * to 400mv. The values below are peak to peak (differential) values.
+        * Controls low_power_swing_en, don't set the voltage swing of the
+        * driver to 400mv. The values below are peak to peak (differential)
+        * values.
         */
-       writel(4, tcphy->base + TXDA_COEFF_CALC_CTRL);
+       writel(0, tcphy->base + TXDA_COEFF_CALC_CTRL);
        writel(0, tcphy->base + TXDA_CYA_AUXDA_CYA);
 
        /* Controls tx_high_z_tm_en */
@@ -555,6 +577,7 @@ static int tcphy_phy_init(struct rockchip_typec_phy *tcphy, u8 mode)
        reset_control_deassert(tcphy->tcphy_rst);
 
        property_enable(tcphy, &cfg->typec_conn_dir, tcphy->flip);
+       tcphy_dp_aux_set_flip(tcphy);
 
        tcphy_cfg_24m(tcphy);
 
@@ -685,8 +708,11 @@ static int rockchip_usb3_phy_power_on(struct phy *phy)
        if (tcphy->mode == new_mode)
                goto unlock_ret;
 
-       if (tcphy->mode == MODE_DISCONNECT)
-               tcphy_phy_init(tcphy, new_mode);
+       if (tcphy->mode == MODE_DISCONNECT) {
+               ret = tcphy_phy_init(tcphy, new_mode);
+               if (ret)
+                       goto unlock_ret;
+       }
 
        /* wait TCPHY for pipe ready */
        for (timeout = 0; timeout < 100; timeout++) {
@@ -760,10 +786,12 @@ static int rockchip_dp_phy_power_on(struct phy *phy)
         */
        if (new_mode == MODE_DFP_DP && tcphy->mode != MODE_DISCONNECT) {
                tcphy_phy_deinit(tcphy);
-               tcphy_phy_init(tcphy, new_mode);
+               ret = tcphy_phy_init(tcphy, new_mode);
        } else if (tcphy->mode == MODE_DISCONNECT) {
-               tcphy_phy_init(tcphy, new_mode);
+               ret = tcphy_phy_init(tcphy, new_mode);
        }
+       if (ret)
+               goto unlock_ret;
 
        ret = readx_poll_timeout(readl, tcphy->base + DP_MODE_CTL,
                                 val, val & DP_MODE_A2, 1000,
index 20d7f242477236cb9897fdd34a042f7581503113..db9b1aa0de6e7aeafe1bd304230d68d5e318e4e7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO)      += phy-exynos-dp-video.o
 obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO)    += phy-exynos-mipi-video.o
 obj-$(CONFIG_PHY_EXYNOS_PCIE)          += phy-exynos-pcie.o
index 3cbcb2537657623444c65ab59aa6300b7b66526f..4307bf0013e186cd859b779aaaf4c61ddd662a6c 100644 (file)
@@ -454,6 +454,8 @@ tegra_xusb_find_port_node(struct tegra_xusb_padctl *padctl, const char *type,
                char *name;
 
                name = kasprintf(GFP_KERNEL, "%s-%u", type, index);
+               if (!name)
+                       return ERR_PTR(-ENOMEM);
                np = of_find_node_by_name(np, name);
                kfree(name);
        }
index 0cc3a1a557a3ab434b74d1a3d90ae51d2ce5113b..9f361756eaf20737de6bb05dcd6b98e79e6c98f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_DA8XX_USB)            += phy-da8xx-usb.o
 obj-$(CONFIG_PHY_DM816X_USB)           += phy-dm816x-usb.o
 obj-$(CONFIG_OMAP_CONTROL_PHY)         += phy-omap-control.o
index 1778cf4f81c7853638b46139204d3ee71e3b396d..82cd8b08d71f5247c0595d1ba2be199e4fe6ecec 100644 (file)
@@ -100,6 +100,7 @@ config PINCTRL_AMD
        tristate "AMD GPIO pin control"
        depends on GPIOLIB
        select GPIOLIB_IRQCHIP
+       select PINMUX
        select PINCONF
        select GENERIC_PINCONF
        help
index c16e27900dbb7e00fe17f2a94dd1f5a87cb0a111..d0d4844f80221689d5378cdde1ba0797d9429d6b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # generic pinmux support
 
 subdir-ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG
index 2a65111f3c7098c2f4e8d91bd6e1e9784e5c0573..80ceb9dae944247fdd4f9b97f930aa799c595e63 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Broadcom pinctrl support
 
 obj-$(CONFIG_PINCTRL_BCM281XX)         += pinctrl-bcm281xx.o
index 0944310225db92a8ee2c5011c7fb394044ccfd22..ff782445dfb75d1a8af9eed775b8e8f7b275fee3 100644 (file)
@@ -373,16 +373,12 @@ static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc,
        unsigned long events;
        unsigned offset;
        unsigned gpio;
-       unsigned int type;
 
        events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4);
        events &= mask;
        events &= pc->enabled_irq_map[bank];
        for_each_set_bit(offset, &events, 32) {
                gpio = (32 * bank) + offset;
-               /* FIXME: no clue why the code looks up the type here */
-               type = pc->irq_type[gpio];
-
                generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain,
                                                     gpio));
        }
index 525a5ff5dcb4f940f72f76534765df5a9441c4ff..19bb9a55a567ec9fc40a3eaa85daab56f048ae37 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Freescale pin control drivers
 obj-$(CONFIG_PINCTRL_IMX)      += pinctrl-imx.o
 obj-$(CONFIG_PINCTRL_IMX1_CORE)        += pinctrl-imx1-core.o
index c12874da59920b9a9ce6cf36e1cd2cd9572b94c1..624d367caa09d0caa77bf873246f8fbcb2795bd9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Intel pin control drivers
 
 obj-$(CONFIG_PINCTRL_BAYTRAIL)         += pinctrl-baytrail.o
index 04e929fd0ffee494cc744cf495e5acd9e437ea6b..fadbca907c7c7ea552ffb2b401a6fc154a4d1a2d 100644 (file)
@@ -1577,6 +1577,7 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
        struct gpio_chip *chip = &pctrl->chip;
        bool need_valid_mask = !dmi_check_system(chv_no_valid_mask);
        int ret, i, offset;
+       int irq_base;
 
        *chip = chv_gpio_chip;
 
@@ -1622,7 +1623,18 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
        /* Clear all interrupts */
        chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
 
-       ret = gpiochip_irqchip_add(chip, &chv_gpio_irqchip, 0,
+       if (!need_valid_mask) {
+               irq_base = devm_irq_alloc_descs(pctrl->dev, -1, 0,
+                                               chip->ngpio, NUMA_NO_NODE);
+               if (irq_base < 0) {
+                       dev_err(pctrl->dev, "Failed to allocate IRQ numbers\n");
+                       return irq_base;
+               }
+       } else {
+               irq_base = 0;
+       }
+
+       ret = gpiochip_irqchip_add(chip, &chv_gpio_irqchip, irq_base,
                                   handle_bad_irq, IRQ_TYPE_NONE);
        if (ret) {
                dev_err(pctrl->dev, "failed to add IRQ chip\n");
index e59c613d4ddd94d87f7e010337a8292c95936b07..10d90140a38a780d69e3f07d79e81c192e11a1cc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Core
 obj-y                          += pinctrl-mtk-common.o
 
index 4eb98ddb40a41f678d389248a4655128e113b0e4..17df4cfbde4e943e0482c5bf5403a74829c675fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PINCTRL_MTK_MT6397_H
 #define __PINCTRL_MTK_MT6397_H
 
index 212559c147f8b1c684dd5be04e889fb1699f04d9..850483d7d9be9b8487036e4c5dea0b4ac5ff24f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PINCTRL_MTK_MT8127_H
 #define __PINCTRL_MTK_MT8127_H
 
index 5b03fd55e28d5f81ad62b0b07aef0717269c1a29..cd082dca44828974ebef40dfadace954b5c11b98 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PINCTRL_MVEBU)    += pinctrl-mvebu.o
 obj-$(CONFIG_PINCTRL_DOVE)     += pinctrl-dove.o
 obj-$(CONFIG_PINCTRL_KIRKWOOD) += pinctrl-kirkwood.o
index 30b27f18cd52594bfa121d1653ab712aa431a5a2..bf8b7517ee4af6674b77c8c6a3d3e07a12203411 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Nomadik family pin control drivers
 obj-$(CONFIG_PINCTRL_ABX500)   += pinctrl-abx500.o
 obj-$(CONFIG_PINCTRL_AB8500)   += pinctrl-ab8500.o
index 2beef3bfe9ca93f3857361a879e76e38ee7161ac..43f9b718a8ef757e1c0f8cdf2a2a7c7e7ce759cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PINCTRL_PINCTRL_ABx500_H
 #define PINCTRL_PINCTRL_ABx500_H
 
index af4814479eb02deaf703c90e6b317a378d55563a..726c0b5501fa08c6ed5f9afcafc767218f09732e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/pinctrl/pinctrl.h>
 #include "pinctrl-nomadik.h"
index 2860eafd1b42005794a840da26518f948d16b149..ae3ac7b799a621b3bddc6c806d99ffc73b72aa2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/pinctrl/pinctrl.h>
 #include "pinctrl-nomadik.h"
index e852048c4c04117c777f11fd17778f330f573d7d..7e814764da7d4196000ccde99c9810c8c197dab2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/pinctrl/pinctrl.h>
 #include "pinctrl-nomadik.h"
index 30bba2a75a58aae7a8bab771b7cd3f344c1f4ee6..ae0bac06639fe7ca621ea1c47523fcaaff4de328 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PINCTRL_PINCTRL_NOMADIK_H
 #define PINCTRL_PINCTRL_NOMADIK_H
 
index 3f6b34febbf11249cf2a30e400647038f4a66f33..433af328d9817a028f4bccce07492fbc6ac27a68 100644 (file)
@@ -534,8 +534,16 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
                                continue;
                        irq = irq_find_mapping(gc->irqdomain, irqnr + i);
                        generic_handle_irq(irq);
-                       /* Clear interrupt */
+
+                       /* Clear interrupt.
+                        * We must read the pin register again, in case the
+                        * value was changed while executing
+                        * generic_handle_irq() above.
+                        */
+                       raw_spin_lock_irqsave(&gpio_dev->lock, flags);
+                       regval = readl(regs + i);
                        writel(regval, regs + i);
+                       raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
                        ret = IRQ_HANDLED;
                }
        }
index 87294222583ea0d54b6d88831346ccc78f150421..ba2678665168d757be198a39111677969cdefe51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 int u300_gpio_config_get(struct gpio_chip *chip,
                         unsigned offset,
                         unsigned long *config);
index 3e40d4245512e286166ac1b838567f6c55a881a0..9c950bbf07bab62cf72dcb74cbed6fa20b04598b 100644 (file)
@@ -407,10 +407,10 @@ static int mcp23s08_get(struct gpio_chip *chip, unsigned offset)
        ret = mcp_read(mcp, MCP_GPIO, &status);
        if (ret < 0)
                status = 0;
-       else
+       else {
+               mcp->cached_gpio = status;
                status = !!(status & (1 << offset));
-
-       mcp->cached_gpio = status;
+       }
 
        mutex_unlock(&mcp->lock);
        return status;
index 06c8b2ace05fadf4cadbda079fec3cf5f73a3fa2..a1db345ded1c0c334e0a6e18676efcd57194219b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Qualcomm pin control drivers
 obj-$(CONFIG_PINCTRL_MSM)      += pinctrl-msm.o
 obj-$(CONFIG_PINCTRL_APQ8064)  += pinctrl-apq8064.o
index 595995851ea558ed966ea628c1a05578965bcc6d..df426561d067c6d1468e6ca2a0367184461ef46c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Samsung pin control drivers
 
 obj-$(CONFIG_PINCTRL_SAMSUNG)  += pinctrl-samsung.o
index 1d4f05a96bd49536f141b93609b1442bb53d295a..a7903904b64eb1d13865ecece8ba9298886b391f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PINCTRL_SH_PFC)   += core.o pinctrl.o
 obj-$(CONFIG_PINCTRL_SH_PFC_GPIO)      += gpio.o
 obj-$(CONFIG_PINCTRL_PFC_EMEV2)        += pfc-emev2.o
index 29c69133b0ef88d0e217941cfb0ff12be43ecb91..0e733bffdb38ef93a8b704fbda7876064153eb9f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/gpio.h>
index 37b8412ac8a3ce9eb4d0c5ea9b6f8f20fa059f55..da52d17550a355f3918aadda365f6ec2e02e83d0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # SPEAr pinmux support
 
 obj-$(CONFIG_PINCTRL_SPEAR_PLGPIO)     += pinctrl-plgpio.o
index 5f379f5153f1bf839b0d2fbb3e374e68cea6a8b2..d13ca35734863514a54fd0c5c50902bfa6ea4129 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Core
 obj-$(CONFIG_PINCTRL_STM32) += pinctrl-stm32.o
 
index dc6c9619e41ca7ddb7538943b358bde2b97c7df5..12a752e836ef1252db1308769ba24483aa999c81 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Core
 obj-y                                  += pinctrl-sunxi.o
 
index d9ea2be69cc4a3a682045c345e0ce88800717a58..bbcb043c34a207618b130a17687a6e299dd58998 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PINCTRL_TEGRA)            += pinctrl-tegra.o
 obj-$(CONFIG_PINCTRL_TEGRA20)          += pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)          += pinctrl-tegra30.o
index d592ff77d60ff4e2d3bc6ee63199ac5492546f29..ec66c86e276e18153bbc0e8c8c165650f4878305 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                                  += pinctrl-uniphier-core.o
 
 obj-$(CONFIG_PINCTRL_UNIPHIER_LD4)     += pinctrl-uniphier-ld4.o
index 24ec45dd0d80d01dcb2c68b298d1da46bfba3cf9..c6a5c3b14e9eabce6ef8067f43ab7c43ae4a476b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # VIA/Wondermedia pinctrl support
 
 obj-$(CONFIG_PINCTRL_WMT)      += pinctrl-wmt.o
index ca2692510733df7bc6fa9ffc281598376cb2f960..d3a6630266a07b10629953d8d06cbf7ba920923b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for linux/drivers/platform
 #
index 66c345ca35fcc7bdd43acabdced8a4e12998388f..a077b1f0211d838bf3f4c26f3de4fba4f7f57fdc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_CHROMEOS_LAPTOP)          += chromeos_laptop.o
 obj-$(CONFIG_CHROMEOS_PSTORE)          += chromeos_pstore.o
index 91cec1751461189ab37618f8c9da6981a7bf872f..f9e3ae683bbe3729757d36f19e02df3c2c5ea8f9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for linux/drivers/platform/x86
 # x86 Platform-Specific Drivers
index 85de30f93a9cc45c1fe0d634c7f687947e1a39bb..56a8195096a229c6975d3f78746ecbc4c6169660 100644 (file)
@@ -254,10 +254,12 @@ static int bl_update_status(struct backlight_device *b)
 {
        struct acpi_device *device = bl_get_data(b);
 
-       if (b->props.power == FB_BLANK_POWERDOWN)
-               call_fext_func(fext, FUNC_BACKLIGHT, 0x1, 0x4, 0x3);
-       else
-               call_fext_func(fext, FUNC_BACKLIGHT, 0x1, 0x4, 0x0);
+       if (fext) {
+               if (b->props.power == FB_BLANK_POWERDOWN)
+                       call_fext_func(fext, FUNC_BACKLIGHT, 0x1, 0x4, 0x3);
+               else
+                       call_fext_func(fext, FUNC_BACKLIGHT, 0x1, 0x4, 0x0);
+       }
 
        return set_lcd_level(device, b->props.brightness);
 }
index bb792a52248b63d1c16a4fefc67a32de0e58101b..e03fa31446ca83b107c220e438db53db38c44e80 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/suspend.h>
 #include <linux/acpi.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
+#include <linux/spinlock.h>
 
 #include <asm/intel_pmc_ipc.h>
 
@@ -131,6 +132,7 @@ static struct intel_pmc_ipc_dev {
        /* gcr */
        void __iomem *gcr_mem_base;
        bool has_gcr_regs;
+       spinlock_t gcr_lock;
 
        /* punit */
        struct platform_device *punit_dev;
@@ -225,17 +227,17 @@ int intel_pmc_gcr_read(u32 offset, u32 *data)
 {
        int ret;
 
-       mutex_lock(&ipclock);
+       spin_lock(&ipcdev.gcr_lock);
 
        ret = is_gcr_valid(offset);
        if (ret < 0) {
-               mutex_unlock(&ipclock);
+               spin_unlock(&ipcdev.gcr_lock);
                return ret;
        }
 
        *data = readl(ipcdev.gcr_mem_base + offset);
 
-       mutex_unlock(&ipclock);
+       spin_unlock(&ipcdev.gcr_lock);
 
        return 0;
 }
@@ -255,17 +257,17 @@ int intel_pmc_gcr_write(u32 offset, u32 data)
 {
        int ret;
 
-       mutex_lock(&ipclock);
+       spin_lock(&ipcdev.gcr_lock);
 
        ret = is_gcr_valid(offset);
        if (ret < 0) {
-               mutex_unlock(&ipclock);
+               spin_unlock(&ipcdev.gcr_lock);
                return ret;
        }
 
        writel(data, ipcdev.gcr_mem_base + offset);
 
-       mutex_unlock(&ipclock);
+       spin_unlock(&ipcdev.gcr_lock);
 
        return 0;
 }
@@ -287,7 +289,7 @@ int intel_pmc_gcr_update(u32 offset, u32 mask, u32 val)
        u32 new_val;
        int ret = 0;
 
-       mutex_lock(&ipclock);
+       spin_lock(&ipcdev.gcr_lock);
 
        ret = is_gcr_valid(offset);
        if (ret < 0)
@@ -309,7 +311,7 @@ int intel_pmc_gcr_update(u32 offset, u32 mask, u32 val)
        }
 
 gcr_ipc_unlock:
-       mutex_unlock(&ipclock);
+       spin_unlock(&ipcdev.gcr_lock);
        return ret;
 }
 EXPORT_SYMBOL_GPL(intel_pmc_gcr_update);
@@ -480,52 +482,41 @@ static irqreturn_t ioc(int irq, void *dev_id)
 
 static int ipc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       resource_size_t pci_resource;
+       struct intel_pmc_ipc_dev *pmc = &ipcdev;
        int ret;
-       int len;
 
-       ipcdev.dev = &pci_dev_get(pdev)->dev;
-       ipcdev.irq_mode = IPC_TRIGGER_MODE_IRQ;
+       /* Only one PMC is supported */
+       if (pmc->dev)
+               return -EBUSY;
 
-       ret = pci_enable_device(pdev);
+       pmc->irq_mode = IPC_TRIGGER_MODE_IRQ;
+
+       spin_lock_init(&ipcdev.gcr_lock);
+
+       ret = pcim_enable_device(pdev);
        if (ret)
                return ret;
 
-       ret = pci_request_regions(pdev, "intel_pmc_ipc");
+       ret = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev));
        if (ret)
                return ret;
 
-       pci_resource = pci_resource_start(pdev, 0);
-       len = pci_resource_len(pdev, 0);
-       if (!pci_resource || !len) {
-               dev_err(&pdev->dev, "Failed to get resource\n");
-               return -ENOMEM;
-       }
+       init_completion(&pmc->cmd_complete);
 
-       init_completion(&ipcdev.cmd_complete);
+       pmc->ipc_base = pcim_iomap_table(pdev)[0];
 
-       if (request_irq(pdev->irq, ioc, 0, "intel_pmc_ipc", &ipcdev)) {
+       ret = devm_request_irq(&pdev->dev, pdev->irq, ioc, 0, "intel_pmc_ipc",
+                               pmc);
+       if (ret) {
                dev_err(&pdev->dev, "Failed to request irq\n");
-               return -EBUSY;
+               return ret;
        }
 
-       ipcdev.ipc_base = ioremap_nocache(pci_resource, len);
-       if (!ipcdev.ipc_base) {
-               dev_err(&pdev->dev, "Failed to ioremap ipc base\n");
-               free_irq(pdev->irq, &ipcdev);
-               ret = -ENOMEM;
-       }
+       pmc->dev = &pdev->dev;
 
-       return ret;
-}
+       pci_set_drvdata(pdev, pmc);
 
-static void ipc_pci_remove(struct pci_dev *pdev)
-{
-       free_irq(pdev->irq, &ipcdev);
-       pci_release_regions(pdev);
-       pci_dev_put(pdev);
-       iounmap(ipcdev.ipc_base);
-       ipcdev.dev = NULL;
+       return 0;
 }
 
 static const struct pci_device_id ipc_pci_ids[] = {
@@ -540,7 +531,6 @@ static struct pci_driver ipc_pci_driver = {
        .name = "intel_pmc_ipc",
        .id_table = ipc_pci_ids,
        .probe = ipc_pci_probe,
-       .remove = ipc_pci_remove,
 };
 
 static ssize_t intel_pmc_ipc_simple_cmd_store(struct device *dev,
@@ -850,17 +840,12 @@ static int ipc_plat_get_res(struct platform_device *pdev)
                return -ENXIO;
        }
        size = PLAT_RESOURCE_IPC_SIZE + PLAT_RESOURCE_GCR_SIZE;
+       res->end = res->start + size - 1;
+
+       addr = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(addr))
+               return PTR_ERR(addr);
 
-       if (!request_mem_region(res->start, size, pdev->name)) {
-               dev_err(&pdev->dev, "Failed to request ipc resource\n");
-               return -EBUSY;
-       }
-       addr = ioremap_nocache(res->start, size);
-       if (!addr) {
-               dev_err(&pdev->dev, "I/O memory remapping failed\n");
-               release_mem_region(res->start, size);
-               return -ENOMEM;
-       }
        ipcdev.ipc_base = addr;
 
        ipcdev.gcr_mem_base = addr + PLAT_RESOURCE_GCR_OFFSET;
@@ -917,12 +902,12 @@ MODULE_DEVICE_TABLE(acpi, ipc_acpi_ids);
 
 static int ipc_plat_probe(struct platform_device *pdev)
 {
-       struct resource *res;
        int ret;
 
        ipcdev.dev = &pdev->dev;
        ipcdev.irq_mode = IPC_TRIGGER_MODE_IRQ;
        init_completion(&ipcdev.cmd_complete);
+       spin_lock_init(&ipcdev.gcr_lock);
 
        ipcdev.irq = platform_get_irq(pdev, 0);
        if (ipcdev.irq < 0) {
@@ -939,11 +924,11 @@ static int ipc_plat_probe(struct platform_device *pdev)
        ret = ipc_create_pmc_devices();
        if (ret) {
                dev_err(&pdev->dev, "Failed to create pmc devices\n");
-               goto err_device;
+               return ret;
        }
 
-       if (request_irq(ipcdev.irq, ioc, IRQF_NO_SUSPEND,
-                       "intel_pmc_ipc", &ipcdev)) {
+       if (devm_request_irq(&pdev->dev, ipcdev.irq, ioc, IRQF_NO_SUSPEND,
+                            "intel_pmc_ipc", &ipcdev)) {
                dev_err(&pdev->dev, "Failed to request irq\n");
                ret = -EBUSY;
                goto err_irq;
@@ -960,40 +945,22 @@ static int ipc_plat_probe(struct platform_device *pdev)
 
        return 0;
 err_sys:
-       free_irq(ipcdev.irq, &ipcdev);
+       devm_free_irq(&pdev->dev, ipcdev.irq, &ipcdev);
 err_irq:
        platform_device_unregister(ipcdev.tco_dev);
        platform_device_unregister(ipcdev.punit_dev);
        platform_device_unregister(ipcdev.telemetry_dev);
-err_device:
-       iounmap(ipcdev.ipc_base);
-       res = platform_get_resource(pdev, IORESOURCE_MEM,
-                                   PLAT_RESOURCE_IPC_INDEX);
-       if (res) {
-               release_mem_region(res->start,
-                                  PLAT_RESOURCE_IPC_SIZE +
-                                  PLAT_RESOURCE_GCR_SIZE);
-       }
+
        return ret;
 }
 
 static int ipc_plat_remove(struct platform_device *pdev)
 {
-       struct resource *res;
-
        sysfs_remove_group(&pdev->dev.kobj, &intel_ipc_group);
-       free_irq(ipcdev.irq, &ipcdev);
+       devm_free_irq(&pdev->dev, ipcdev.irq, &ipcdev);
        platform_device_unregister(ipcdev.tco_dev);
        platform_device_unregister(ipcdev.punit_dev);
        platform_device_unregister(ipcdev.telemetry_dev);
-       iounmap(ipcdev.ipc_base);
-       res = platform_get_resource(pdev, IORESOURCE_MEM,
-                                   PLAT_RESOURCE_IPC_INDEX);
-       if (res) {
-               release_mem_region(res->start,
-                                  PLAT_RESOURCE_IPC_SIZE +
-                                  PLAT_RESOURCE_GCR_SIZE);
-       }
        ipcdev.dev = NULL;
        return 0;
 }
index bfba893cb3211d877a207fcfb7cd1a7f283adeda..71d532f182193499ab2100f52e2d085ad8977c46 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Plug-and-Play Support.
 #
index 3151fd16461497f7f6eeba816994add2b04e2e24..cdcfa39cf1673152d305f897041d9280cff988b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
  *     Bjorn Helgaas <bjorn.helgaas@hp.com>
index 31ad9fc3f701a3e8ed7b0c37c916c5f98f07248a..c2464ee08e4aca066a260b9aeaad35537754ff55 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * card.c - contains functions for managing groups of PnP devices
  *
index b54620e53830da9745ef21e1c6352be972a7189d..3bf18d7189750f2970753aded98930b03f068621 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * core.c - contains all core device and protocol registration functions
  *
index 63452f20e3e97e5f567cec533ac74a4ab100ebf8..93a30a8f88d1bb986b5e5ab5a72e3990879c32b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * driver.c - device id matching, driver model, etc.
  *
index 5c5b3d47b5f6fa52fe064ebe32f86106caafeb6c..187e4a1175b0dc328f76b5962cf6044e999751f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * interface.c - contains everything related to the user interface
  *
index 10bdcc4d4f7b48484391d841d2eb915a6f56b361..6c845b6283163da47ecf339eb73c3c06b5d8d736 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * compat.c - A series of functions to make it easier to convert drivers that use
  *            the old isapnp APIs. If possible use the new APIs instead.
index 7ad3295752ef35371953705ad6b44cb5b6e3a6e1..144055593ec81618a5f740f7ec7b3b3fb4b69d60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * manager.c - Resource Management, Conflict Resolution, Activation and Disabling of Devices
  *
index 051ef9699777519951c2c87b2e39c6dc5b69d27c..4489cd6dbc84c244e31f6250b07503a91f6f9238 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ACPI_PNP_H
 #define ACPI_PNP_H
 
index ff563db025b3eb6afa8b5f4345281573328695de..ba5cfc3dbe117a98bccfab5d41b81d54915e04c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bioscalls.c - the lowlevel layer of the PnPBIOS driver
  */
index 5ee6b2a5f8d5cce1bf0932d27ba9ff589b4dbab1..7d4aca7948dd1f95a389d4f55498fb132bd7e2e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * /proc/bus/pnp interface for Plug and Play devices
  *
index cca2f9f9f3e30e6f8a1201ac0fd03774a980a8bc..2f31b212b1a50c9c0d4f2a15847dda93ff13c867 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * rsparser.c - parses and encodes pnpbios resource data streams
  */
index d28e3ab9479c64e41fe014714c08721fc503faf3..f054cdddfef8986a466baf5e1270df3dc7b8224b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This file contains quirk handling code for PnP devices
  *  Some devices do not report all their resources, and need to have extra
index f980ff7166e98e93546f7f79657087983a5388ce..70d4ba95735a6a85c6fe81c0cfd1bac4467359ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * resource.c - Contains functions for registering and analyzing resource information
  *
index f5beb24d036a334b942b1dccaeb9494a76ffde72..e4f53d31191de35a44b3964fff4b1dcf5b486833 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * support.c - standard functions for the use of pnp protocol drivers
  *
index 49c1720df59a8550cdca31735e6ef519f6b88266..6950503741eb654d9c5626f00d42c413b27c019f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * system.c - a driver for reserving pnp system resources
  *
index 58cf5b30559f7413cd3c0e99e817bc49896e2aa3..aeb65edb17b7b359129b9584b43d900c389562f5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_POWER_RESET_AS3722) += as3722-poweroff.o
 obj-$(CONFIG_POWER_RESET_AT91_POWEROFF) += at91-poweroff.o
 obj-$(CONFIG_POWER_RESET_AT91_RESET) += at91-reset.o
index de878fd26f27a82a86cfc6f514d5ddbdd5b797dc..ff75af5abbc536c837aad62348fff3cd79e70719 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Gemini power management controller
  * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
index bacfc95783f06db0c2e11976edeefaa7fcf8c193..20ce3ff5e0391f83e8c7f04a74a319665c77aa05 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
+ * Author: Paul Burton <paul.burton@mips.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
@@ -109,5 +109,5 @@ static struct pci_driver piix4_poweroff_driver = {
 };
 
 module_pci_driver(piix4_poweroff_driver);
-MODULE_AUTHOR("Paul Burton <paul.burton@imgtec.com>");
+MODULE_AUTHOR("Paul Burton <paul.burton@mips.com>");
 MODULE_LICENSE("GPL");
index 621a19058fecf82b736790d4c2c0a4f7827303fb..aae4e4a8bbb358d588b8858789e2c003eee8a71b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-$(CONFIG_POWER_SUPPLY_DEBUG) := -DDEBUG
 
 power_supply-y                         := power_supply_core.o
index 8c49586015d01af18edee56c2f810c2fb64d42d9..4a7ed50d1dc549901596e4b0e67efa46a7ba9e7e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/power_supply.h>
 #include <linux/of.h>
index d1f2fb19c98049029c818ef9e982aa4d5c993586..fd28207f5379c885dbee968b0a47fa6545467d96 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for PTP 1588 clock support.
 #
index ebefba5f528b11912420fa25bbf8a71c2dd155a6..0258a745f30c9cf43a38d726914dd8ee494e01f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PWM)              += core.o
 obj-$(CONFIG_PWM_SYSFS)                += sysfs.o
 obj-$(CONFIG_PWM_AB8500)       += pwm-ab8500.o
index 74dcea45ad498dc30a5f946f31e3c7adb2647ad9..a34b0254ba38d3fed21b679bf4e2e45e5ec6b0be 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for RapidIO interconnect services
 #
index 315a4be8dc1e64f429fb6bd5bab9700a0d254f29..9a68914100ad6b7e12c1464779b433d337cca7ee 100644 (file)
@@ -51,6 +51,8 @@ module_param(mbox_sel, byte, S_IRUGO);
 MODULE_PARM_DESC(mbox_sel,
                 "RIO Messaging MBOX Selection Mask (default: 0x0f = all)");
 
+static DEFINE_SPINLOCK(tsi721_maint_lock);
+
 static void tsi721_omsg_handler(struct tsi721_device *priv, int ch);
 static void tsi721_imsg_handler(struct tsi721_device *priv, int ch);
 
@@ -124,12 +126,15 @@ static int tsi721_maint_dma(struct tsi721_device *priv, u32 sys_size,
        void __iomem *regs = priv->regs + TSI721_DMAC_BASE(priv->mdma.ch_id);
        struct tsi721_dma_desc *bd_ptr;
        u32 rd_count, swr_ptr, ch_stat;
+       unsigned long flags;
        int i, err = 0;
        u32 op = do_wr ? MAINT_WR : MAINT_RD;
 
        if (offset > (RIO_MAINT_SPACE_SZ - len) || (len != sizeof(u32)))
                return -EINVAL;
 
+       spin_lock_irqsave(&tsi721_maint_lock, flags);
+
        bd_ptr = priv->mdma.bd_base;
 
        rd_count = ioread32(regs + TSI721_DMAC_DRDCNT);
@@ -197,7 +202,9 @@ static int tsi721_maint_dma(struct tsi721_device *priv, u32 sys_size,
         */
        swr_ptr = ioread32(regs + TSI721_DMAC_DSWP);
        iowrite32(swr_ptr, regs + TSI721_DMAC_DSRP);
+
 err_out:
+       spin_unlock_irqrestore(&tsi721_maint_lock, flags);
 
        return err;
 }
index a3824baca2e51c920958731a9daf4ade575c1397..3ee9af83b63849d45d1412ef6247ed834c0d840e 100644 (file)
 #include <linux/rio.h>
 #include <linux/module.h>
 
-/*
- * These interrupt-safe spinlocks protect all accesses to RIO
- * configuration space and doorbell access.
- */
-static DEFINE_SPINLOCK(rio_config_lock);
-static DEFINE_SPINLOCK(rio_doorbell_lock);
-
 /*
  *  Wrappers for all RIO configuration access functions.  They just check
- *  alignment, do locking and call the low-level functions pointed to
- *  by rio_mport->ops.
+ *  alignment and call the low-level functions pointed to by rio_mport->ops.
  */
 
 #define RIO_8_BAD 0
@@ -44,13 +36,10 @@ int __rio_local_read_config_##size \
        (struct rio_mport *mport, u32 offset, type *value)              \
 {                                                                      \
        int res;                                                        \
-       unsigned long flags;                                            \
        u32 data = 0;                                                   \
        if (RIO_##size##_BAD) return RIO_BAD_SIZE;                      \
-       spin_lock_irqsave(&rio_config_lock, flags);                     \
        res = mport->ops->lcread(mport, mport->id, offset, len, &data); \
        *value = (type)data;                                            \
-       spin_unlock_irqrestore(&rio_config_lock, flags);                \
        return res;                                                     \
 }
 
@@ -67,13 +56,8 @@ int __rio_local_read_config_##size \
 int __rio_local_write_config_##size \
        (struct rio_mport *mport, u32 offset, type value)               \
 {                                                                      \
-       int res;                                                        \
-       unsigned long flags;                                            \
        if (RIO_##size##_BAD) return RIO_BAD_SIZE;                      \
-       spin_lock_irqsave(&rio_config_lock, flags);                     \
-       res = mport->ops->lcwrite(mport, mport->id, offset, len, value);\
-       spin_unlock_irqrestore(&rio_config_lock, flags);                \
-       return res;                                                     \
+       return mport->ops->lcwrite(mport, mport->id, offset, len, value);\
 }
 
 RIO_LOP_READ(8, u8, 1)
@@ -104,13 +88,10 @@ int rio_mport_read_config_##size \
        (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type *value)     \
 {                                                                      \
        int res;                                                        \
-       unsigned long flags;                                            \
        u32 data = 0;                                                   \
        if (RIO_##size##_BAD) return RIO_BAD_SIZE;                      \
-       spin_lock_irqsave(&rio_config_lock, flags);                     \
        res = mport->ops->cread(mport, mport->id, destid, hopcount, offset, len, &data); \
        *value = (type)data;                                            \
-       spin_unlock_irqrestore(&rio_config_lock, flags);                \
        return res;                                                     \
 }
 
@@ -127,13 +108,9 @@ int rio_mport_read_config_##size \
 int rio_mport_write_config_##size \
        (struct rio_mport *mport, u16 destid, u8 hopcount, u32 offset, type value)      \
 {                                                                      \
-       int res;                                                        \
-       unsigned long flags;                                            \
        if (RIO_##size##_BAD) return RIO_BAD_SIZE;                      \
-       spin_lock_irqsave(&rio_config_lock, flags);                     \
-       res = mport->ops->cwrite(mport, mport->id, destid, hopcount, offset, len, value); \
-       spin_unlock_irqrestore(&rio_config_lock, flags);                \
-       return res;                                                     \
+       return mport->ops->cwrite(mport, mport->id, destid, hopcount,   \
+                       offset, len, value);                            \
 }
 
 RIO_OP_READ(8, u8, 1)
@@ -162,14 +139,7 @@ EXPORT_SYMBOL_GPL(rio_mport_write_config_32);
  */
 int rio_mport_send_doorbell(struct rio_mport *mport, u16 destid, u16 data)
 {
-       int res;
-       unsigned long flags;
-
-       spin_lock_irqsave(&rio_doorbell_lock, flags);
-       res = mport->ops->dsend(mport, mport->id, destid, data);
-       spin_unlock_irqrestore(&rio_doorbell_lock, flags);
-
-       return res;
+       return mport->ops->dsend(mport, mport->id, destid, data);
 }
 
 EXPORT_SYMBOL_GPL(rio_mport_send_doorbell);
index 6bdd54c4e7331a15a6bece90e1feb397b9f28eae..69e7de31e41cf8cff3e27e8673a84e4b4141dbfa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for RIO switches
 #
index d0e5d6ee882c4e041d8c3db4e41392d9bc6d90ab..adbf1a9e089eec7f8292f27047137e39f777063b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/gfp.h>
 #include <linux/kernel.h>
@@ -523,7 +524,7 @@ int __init parse_cec_param(char *str)
        if (*str == '=')
                str++;
 
-       if (!strncmp(str, "cec_disable", 7))
+       if (!strcmp(str, "cec_disable"))
                ce_arr.disabled = 1;
        else
                return 0;
index db72e4513191c5a730218190ea9e63b31515781c..c07443b462ad5ebdf06c9e0967baca4890c0e19e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RAS_DEBUGFS_H__
 #define __RAS_DEBUGFS_H__
 
index 5429d37957329f83387a2da6bc687162024de1b0..3f38907320dccd963246fb22008f35f8e9f52753 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2014 Intel Corporation
  *
index cbb6e45c77b20f8b79b4fc09f31f85d0ce3f21b3..80ffc57a9ca3e3f102a33bee772574c611d5d2e5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for regulator drivers.
 #
index f18b36dd57dd44a2f1d94302f6e1492ea6e54f88..376a99b7cf5da150794cbb3b2f1c72078985166c 100644 (file)
@@ -590,7 +590,7 @@ static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id)
                case AXP803_DCDC3:
                        return !!(reg & BIT(6));
                case AXP803_DCDC6:
-                       return !!(reg & BIT(7));
+                       return !!(reg & BIT(5));
                }
                break;
 
index f9d027992aae119b466efa9ba0ac087ce8739074..777fac6fb4cb0a8adc1d7e2ea0e96c768bbda343 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/platform_device.h>
index ef2be56460fe2779765311473944c48e9bb9ba85..790a4a73ea2c8f94c3fb80c8567827d0e8b0860b 100644 (file)
@@ -29,7 +29,7 @@ static const struct regulator_ops rn5t618_reg_ops = {
 };
 
 #define REG(rid, ereg, emask, vreg, vmask, min, max, step)             \
-       [RN5T618_##rid] = {                                             \
+       {                                                               \
                .name           = #rid,                                 \
                .of_match       = of_match_ptr(#rid),                   \
                .regulators_node = of_match_ptr("regulators"),          \
index df63e44526ac42a814ee85c3286c9d1a9b45be48..bf04479456a050abb56290a71729a76f49a638b6 100644 (file)
@@ -109,6 +109,7 @@ config QCOM_Q6V5_PIL
        depends on OF && ARCH_QCOM
        depends on QCOM_SMEM
        depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
+       depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
        select MFD_SYSCON
        select QCOM_RPROC_COMMON
        select QCOM_SCM
@@ -120,6 +121,7 @@ config QCOM_WCNSS_PIL
        tristate "Qualcomm WCNSS Peripheral Image Loader"
        depends on OF && ARCH_QCOM
        depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
+       depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
        depends on QCOM_SMEM
        select QCOM_MDT_LOADER
        select QCOM_RPROC_COMMON
index 1a0b3dd44b8c578a0197a3b23d7a5f01d6fd3bba..6e16450ce11f484d53f21e40fae54a0889d113d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Generic framework for controlling remote processors
 #
index 612d914033414e3b17dea2b8bac97584cb280f1c..633268e9d550de7001999052f2692239b4754f6b 100644 (file)
@@ -264,15 +264,14 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
                if (!(att->flags & ATT_OWN))
                        continue;
 
-               if (b > IMX7D_RPROC_MEM_MAX)
+               if (b >= IMX7D_RPROC_MEM_MAX)
                        break;
 
                priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev,
                                                     att->sa, att->size);
-               if (IS_ERR(priv->mem[b].cpu_addr)) {
+               if (!priv->mem[b].cpu_addr) {
                        dev_err(dev, "devm_ioremap_resource failed\n");
-                       err = PTR_ERR(priv->mem[b].cpu_addr);
-                       return err;
+                       return -ENOMEM;
                }
                priv->mem[b].sys_addr = att->sa;
                priv->mem[b].size = att->size;
@@ -296,7 +295,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
                        return err;
                }
 
-               if (b > IMX7D_RPROC_MEM_MAX)
+               if (b >= IMX7D_RPROC_MEM_MAX)
                        break;
 
                priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res);
index 4f8bc168473c1dbec573d24519749e63ba4a977c..832e20271664e020e99182ca0247298999b4620e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RPROC_QCOM_COMMON_H__
 #define __RPROC_QCOM_COMMON_H__
 
index 25fb7f62a4576ddda9cea53247246ae26c84b9de..62c8682d0a92da35e77081747451793e83ef6b88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_WNCSS_H__
 #define __QCOM_WNCSS_H__
 
index e0c393214264adad04a08fb6e48fc34266144e54..e2baecbb9dd3a08c71e28a72b45bb504a7b5a6e1 100644 (file)
@@ -34,11 +34,12 @@ config RESET_BERLIN
        help
          This enables the reset controller driver for Marvell Berlin SoCs.
 
-config RESET_HSDK_V1
-       bool "HSDK v1 Reset Driver"
-       default n
+config RESET_HSDK
+       bool "Synopsys HSDK Reset Driver"
+       depends on HAS_IOMEM
+       depends on ARC_SOC_HSDK || COMPILE_TEST
        help
-         This enables the reset controller driver for HSDK v1.
+         This enables the reset controller driver for HSDK board.
 
 config RESET_IMX7
        bool "i.MX7 Reset Driver" if COMPILE_TEST
index d368367110e55780c5154995011cd193c709ab49..c1fd702ac57c032021621a6137137ab2ef427fe1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += core.o
 obj-y += hisilicon/
 obj-$(CONFIG_ARCH_STI) += sti/
@@ -5,7 +6,7 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/
 obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o
 obj-$(CONFIG_RESET_ATH79) += reset-ath79.o
 obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o
-obj-$(CONFIG_RESET_HSDK_V1) += reset-hsdk-v1.o
+obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o
 obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
 obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
 obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
similarity index 72%
rename from drivers/reset/reset-hsdk-v1.c
rename to drivers/reset/reset-hsdk.c
index bca13e4bf6223b799774b57545000f6c989ba097..8bce391c6943ba55edcb6292088e3d3cfc9d0ae5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2017 Synopsys.
  *
- * Synopsys HSDKv1 SDP reset driver.
+ * Synopsys HSDK Development platform reset driver.
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2. This program is licensed "as is" without any
@@ -18,9 +18,9 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 
-#define to_hsdkv1_rst(p)       container_of((p), struct hsdkv1_rst, rcdev)
+#define to_hsdk_rst(p) container_of((p), struct hsdk_rst, rcdev)
 
-struct hsdkv1_rst {
+struct hsdk_rst {
        void __iomem                    *regs_ctl;
        void __iomem                    *regs_rst;
        spinlock_t                      lock;
@@ -49,12 +49,12 @@ static const u32 rst_map[] = {
 #define CGU_IP_SW_RESET_RESET          BIT(0)
 #define SW_RESET_TIMEOUT               10000
 
-static void hsdkv1_reset_config(struct hsdkv1_rst *rst, unsigned long id)
+static void hsdk_reset_config(struct hsdk_rst *rst, unsigned long id)
 {
        writel(rst_map[id], rst->regs_ctl + CGU_SYS_RST_CTRL);
 }
 
-static int hsdkv1_reset_do(struct hsdkv1_rst *rst)
+static int hsdk_reset_do(struct hsdk_rst *rst)
 {
        u32 reg;
 
@@ -69,28 +69,28 @@ static int hsdkv1_reset_do(struct hsdkv1_rst *rst)
                !(reg & CGU_IP_SW_RESET_RESET), 5, SW_RESET_TIMEOUT);
 }
 
-static int hsdkv1_reset_reset(struct reset_controller_dev *rcdev,
+static int hsdk_reset_reset(struct reset_controller_dev *rcdev,
                              unsigned long id)
 {
-       struct hsdkv1_rst *rst = to_hsdkv1_rst(rcdev);
+       struct hsdk_rst *rst = to_hsdk_rst(rcdev);
        unsigned long flags;
        int ret;
 
        spin_lock_irqsave(&rst->lock, flags);
-       hsdkv1_reset_config(rst, id);
-       ret = hsdkv1_reset_do(rst);
+       hsdk_reset_config(rst, id);
+       ret = hsdk_reset_do(rst);
        spin_unlock_irqrestore(&rst->lock, flags);
 
        return ret;
 }
 
-static const struct reset_control_ops hsdkv1_reset_ops = {
-       .reset  = hsdkv1_reset_reset,
+static const struct reset_control_ops hsdk_reset_ops = {
+       .reset  = hsdk_reset_reset,
 };
 
-static int hsdkv1_reset_probe(struct platform_device *pdev)
+static int hsdk_reset_probe(struct platform_device *pdev)
 {
-       struct hsdkv1_rst *rst;
+       struct hsdk_rst *rst;
        struct resource *mem;
 
        rst = devm_kzalloc(&pdev->dev, sizeof(*rst), GFP_KERNEL);
@@ -110,7 +110,7 @@ static int hsdkv1_reset_probe(struct platform_device *pdev)
        spin_lock_init(&rst->lock);
 
        rst->rcdev.owner = THIS_MODULE;
-       rst->rcdev.ops = &hsdkv1_reset_ops;
+       rst->rcdev.ops = &hsdk_reset_ops;
        rst->rcdev.of_node = pdev->dev.of_node;
        rst->rcdev.nr_resets = HSDK_MAX_RESETS;
        rst->rcdev.of_reset_n_cells = 1;
@@ -118,20 +118,20 @@ static int hsdkv1_reset_probe(struct platform_device *pdev)
        return reset_controller_register(&rst->rcdev);
 }
 
-static const struct of_device_id hsdkv1_reset_dt_match[] = {
-       { .compatible = "snps,hsdk-v1.0-reset" },
+static const struct of_device_id hsdk_reset_dt_match[] = {
+       { .compatible = "snps,hsdk-reset" },
        { },
 };
 
-static struct platform_driver hsdkv1_reset_driver = {
-       .probe  = hsdkv1_reset_probe,
+static struct platform_driver hsdk_reset_driver = {
+       .probe  = hsdk_reset_probe,
        .driver = {
-               .name = "hsdk-v1.0-reset",
-               .of_match_table = hsdkv1_reset_dt_match,
+               .name = "hsdk-reset",
+               .of_match_table = hsdk_reset_dt_match,
        },
 };
-builtin_platform_driver(hsdkv1_reset_driver);
+builtin_platform_driver(hsdk_reset_driver);
 
 MODULE_AUTHOR("Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>");
-MODULE_DESCRIPTION("Synopsys HSDKv1 SDP reset driver");
+MODULE_DESCRIPTION("Synopsys HSDK SDP reset driver");
 MODULE_LICENSE("GPL v2");
index c60904ff40b830358a966b5121a9876a90d5ebe0..3907bbc9c6cf7eafd4210358c923423a8fd23a9c 100644 (file)
@@ -40,8 +40,9 @@ static int socfpga_reset_assert(struct reset_controller_dev *rcdev,
        struct socfpga_reset_data *data = container_of(rcdev,
                                                     struct socfpga_reset_data,
                                                     rcdev);
-       int bank = id / BITS_PER_LONG;
-       int offset = id % BITS_PER_LONG;
+       int reg_width = sizeof(u32);
+       int bank = id / (reg_width * BITS_PER_BYTE);
+       int offset = id % (reg_width * BITS_PER_BYTE);
        unsigned long flags;
        u32 reg;
 
@@ -61,8 +62,9 @@ static int socfpga_reset_deassert(struct reset_controller_dev *rcdev,
                                                     struct socfpga_reset_data,
                                                     rcdev);
 
-       int bank = id / BITS_PER_LONG;
-       int offset = id % BITS_PER_LONG;
+       int reg_width = sizeof(u32);
+       int bank = id / (reg_width * BITS_PER_BYTE);
+       int offset = id % (reg_width * BITS_PER_BYTE);
        unsigned long flags;
        u32 reg;
 
@@ -81,8 +83,9 @@ static int socfpga_reset_status(struct reset_controller_dev *rcdev,
 {
        struct socfpga_reset_data *data = container_of(rcdev,
                                                struct socfpga_reset_data, rcdev);
-       int bank = id / BITS_PER_LONG;
-       int offset = id % BITS_PER_LONG;
+       int reg_width = sizeof(u32);
+       int bank = id / (reg_width * BITS_PER_BYTE);
+       int offset = id % (reg_width * BITS_PER_BYTE);
        u32 reg;
 
        reg = readl(data->membase + (bank * BANK_INCREMENT));
@@ -132,7 +135,7 @@ static int socfpga_reset_probe(struct platform_device *pdev)
        spin_lock_init(&data->lock);
 
        data->rcdev.owner = THIS_MODULE;
-       data->rcdev.nr_resets = NR_BANKS * BITS_PER_LONG;
+       data->rcdev.nr_resets = NR_BANKS * (sizeof(u32) * BITS_PER_BYTE);
        data->rcdev.ops = &socfpga_reset_ops;
        data->rcdev.of_node = pdev->dev.of_node;
 
index c71f4ab1ae1707e3d305cf1380818f7459bcb9cc..9aa859502d275200edc5b3ae52ddebfb6b870107 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RPMSG)            += rpmsg_core.o
 obj-$(CONFIG_RPMSG_CHAR)       += rpmsg_char.o
 obj-$(CONFIG_RPMSG_QCOM_GLINK_RPM) += qcom_glink_rpm.o
index 5a5e927ea50f45ac307dc6ed0abfa4f8d4b3a815..5dcc9bf1c5bc5de65af2bfc5d778c4d494b20cee 100644 (file)
@@ -635,19 +635,18 @@ qcom_glink_alloc_intent(struct qcom_glink *glink,
        unsigned long flags;
 
        intent = kzalloc(sizeof(*intent), GFP_KERNEL);
-
        if (!intent)
                return NULL;
 
        intent->data = kzalloc(size, GFP_KERNEL);
        if (!intent->data)
-               return NULL;
+               goto free_intent;
 
        spin_lock_irqsave(&channel->intent_lock, flags);
        ret = idr_alloc_cyclic(&channel->liids, intent, 1, -1, GFP_ATOMIC);
        if (ret < 0) {
                spin_unlock_irqrestore(&channel->intent_lock, flags);
-               return NULL;
+               goto free_data;
        }
        spin_unlock_irqrestore(&channel->intent_lock, flags);
 
@@ -656,6 +655,12 @@ qcom_glink_alloc_intent(struct qcom_glink *glink,
        intent->reuse = reuseable;
 
        return intent;
+
+free_data:
+       kfree(intent->data);
+free_intent:
+       kfree(intent);
+       return NULL;
 }
 
 static void qcom_glink_handle_rx_done(struct qcom_glink *glink,
@@ -1197,7 +1202,7 @@ static int qcom_glink_request_intent(struct qcom_glink *glink,
 
        ret = qcom_glink_tx(glink, &cmd, sizeof(cmd), NULL, 0, true);
        if (ret)
-               return ret;
+               goto unlock;
 
        ret = wait_for_completion_timeout(&channel->intent_req_comp, 10 * HZ);
        if (!ret) {
@@ -1207,6 +1212,7 @@ static int qcom_glink_request_intent(struct qcom_glink *glink,
                ret = channel->intent_req_result ? 0 : -ECANCELED;
        }
 
+unlock:
        mutex_unlock(&channel->intent_req_lock);
        return ret;
 }
index 7230014c92afd363b1bfdccf0dd9b2860c0623fb..0bf1fc02b82c451348ba6110457bd8189b5e73e5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for RTC class/drivers.
 #
index ecab76a3207c08e2fd9ad58772bbde3104018154..513b9bedd2c823f617c769ab1581d9aa33649702 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_RTC_INTF_DEV
 
 extern void __init rtc_dev_init(void);
index 1a7f1d1bc174d656f16b5219f70fd6069b7524e3..6c037dc4e3dc4b1997b7769506f24f185f36482a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Moved from arch/ia64/kernel/time.c
  *
index 2c79c0c578228511c92f77d51f0a4f1889fee0e4..cc724f5b07bc5c7da4d0ae8331593460dc929f54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RTC_SA1100_H__
 #define __RTC_SA1100_H__
 
index b64e2b32c753d7ac58c11772822a59e1f80a9484..60c85cff556f6823aa417e44caee8690cb5b3df8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # S/390 block devices
 #
index ea19b4ff87a2f00837abd83c8e22a9e21016ff21..29f35e29d4801f83aa74b0a590bdb4412a9caa7c 100644 (file)
@@ -1644,7 +1644,9 @@ void dasd_generic_handle_state_change(struct dasd_device *device)
        dasd_schedule_device_bh(device);
        if (device->block) {
                dasd_schedule_block_bh(device->block);
-               blk_mq_run_hw_queues(device->block->request_queue, true);
+               if (device->block->request_queue)
+                       blk_mq_run_hw_queues(device->block->request_queue,
+                                            true);
        }
 }
 EXPORT_SYMBOL_GPL(dasd_generic_handle_state_change);
@@ -3759,7 +3761,9 @@ int dasd_generic_path_operational(struct dasd_device *device)
        dasd_schedule_device_bh(device);
        if (device->block) {
                dasd_schedule_block_bh(device->block);
-               blk_mq_run_hw_queues(device->block->request_queue, true);
+               if (device->block->request_queue)
+                       blk_mq_run_hw_queues(device->block->request_queue,
+                                            true);
                }
 
        if (!device->stopped)
@@ -4025,7 +4029,9 @@ int dasd_generic_restore_device(struct ccw_device *cdev)
 
        if (device->block) {
                dasd_schedule_block_bh(device->block);
-               blk_mq_run_hw_queues(device->block->request_queue, true);
+               if (device->block->request_queue)
+                       blk_mq_run_hw_queues(device->block->request_queue,
+                                            true);
        }
 
        clear_bit(DASD_FLAG_SUSPENDED, &device->flags);
index e448a0fc0c092e86d5ffbd850cbeda6aeefe8fe0..c94b606e0df8831e27a2c66a38ec19f43ad9a664 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Horst  Hummel    <Horst.Hummel@de.ibm.com>
  *                 Holger Smolinski <Holger.Smolinski@de.ibm.com>
index 0e0e622eadc3828efafd721c259aca510984c326..62f5f04d8f615e393c88824606f58d13801c5e6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PAV alias management for the DASD ECKD discipline
  *
index e84a5468d8107ed9711b340da072535b0c4536e0..405b6feed465c284f7c80ae1b3b144ce5f03123b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  * Based on.......: linux/drivers/s390/block/mdisk.h
index 34e153a6b19ca99a823da1405548d8ee49b33964..5869d2fede35f6e2753fe2ff6965005d9ced3569 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index 8713fefd794bfa7e89cfc79c07f06460236304b5..4630782b545657443950c9377fc0f0e5cf37543e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Character device driver for extended error reporting.
  *
index 6389feb2fb7aaba7b6b8a6a60cb7dfa47187aa21..ba4fa372d02dc917c783c18eace58b71672ea6df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index b5d3db0e5efb0164a05af2043f123539230fb053..b14bf1b2c69114fd7e9ac1e5159b74303bd03e6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  * Bugreports.to..: <Linux390@de.ibm.com>
index 8b1341fb2e0db757d0ce753c0ebb8fe481c04515..7036a6c6f86ff934ccdff648bb365c532befd4ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index db470bd10175dc07cf30b28c29ea21c85cb5bbaf..e94080a5196f62e2a4cbc073ce196dbd73150ec0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index ec65c1e51c2a11d1cfeecab888d6c093f925205f..7bdc6aaa0ba3622c33ad33235131a7ba0b86c580 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index 7104d676577391b66c15024546ea31c07d531d86..c33788a829c39e0c91c414dd9dec3e40dafa316c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
  *                 Horst Hummel <Horst.Hummel@de.ibm.com>
index 2e7fd966c515107714a4e612aaec5f36a57747b8..eb51893c74a4ba4053fe8d15e064fbf42bed9845 100644 (file)
@@ -249,7 +249,7 @@ static void scm_request_requeue(struct scm_request *scmrq)
 static void scm_request_finish(struct scm_request *scmrq)
 {
        struct scm_blk_dev *bdev = scmrq->bdev;
-       int *error;
+       blk_status_t *error;
        int i;
 
        for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) {
@@ -415,7 +415,7 @@ void scm_blk_irq(struct scm_device *scmdev, void *data, blk_status_t error)
 
 static void scm_blk_request_done(struct request *req)
 {
-       int *error = blk_mq_rq_to_pdu(req);
+       blk_status_t *error = blk_mq_rq_to_pdu(req);
 
        blk_mq_end_request(req, *error);
 }
@@ -450,7 +450,7 @@ int scm_blk_dev_setup(struct scm_blk_dev *bdev, struct scm_device *scmdev)
        atomic_set(&bdev->queued_reqs, 0);
 
        bdev->tag_set.ops = &scm_mq_ops;
-       bdev->tag_set.cmd_size = sizeof(int);
+       bdev->tag_set.cmd_size = sizeof(blk_status_t);
        bdev->tag_set.nr_hw_queues = nr_requests;
        bdev->tag_set.queue_depth = nr_requests_per_io * nr_requests;
        bdev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
index 71288dd9dd7f51e8ced7e4eb799096d313f51cf3..aa42c3a2c90ab2a9bdaab4d5b41687b1aef3dda6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SCM_BLK_H
 #define SCM_BLK_H
 
index c98cf52d78d19331adea46fc12cff94034f25b6b..3134fd6e058e7fe8801894b61e5ddaf04e822a6c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device driver for s390 storage class memory.
  *
index 0c443e26835d927e5e26b3d6c7ca5e634e8f5a7f..05ac6ba15a53285f41e01ab415b776366ddb5e54 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # S/390 character devices
 #
index 9ec4ae0561582544359933042769d263e7c62b4f..353f0bebcf8c55e9d7aaa4b5be1eeb93e7831598 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * 3215 line mode terminal driver.
  *
index 8522cfce5b4e421fc9a094978d596725f603c33f..be3e3c1206c242bc849b732d1ad09f1e8f9a8afc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IBM/3270 Driver - console view.
  *
index f7d92584b9931e04cdc80f5aa4e9a218b37f680f..e1686a69a68e3d9c82dd76759e6cb5a89b2457e7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Unified handling of special chars.
  *
index 59c2d6e55e55386c71e86cca3a33f59103adfed8..e52afa3b8180972a8bd447fcfda1237d5756a947 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Unified handling of special chars.
  *
index 07c7f31081bccbe629c7bcbd789bb7665e57edb3..98a5c459a1bf3a157d85c475824ec77dbd50b4ba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /* Do not edit this file! It was automatically generated by   */
 /*    loadkeys --mktable defkeymap.map > defkeymap.c          */
index a5ccbf6f0d36941e167ad86d857b508c22322bfd..6bf1058de873f1b3c0f11abba029c5a4d7243ec2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    DIAGNOSE X'2C4' instruction based HMC FTP services, useable on z/VM
  *
index 3abd2614053a9dc835c815c2d8c1c09b53caa986..5d036ba7114f1becedfa8c46314460b7265fd2ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    DIAGNOSE X'2C4' instruction based SE/HMC FTP Services, useable on z/VM
  *
index 4cda5ada143ac810eb4832085826233b739ec136..1f5bdb23786234450b757ffcbbc85e7b966e0a5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    SE/HMC Drive (Read) Cache Functions
  *
index a14b57526781f67395e61d68c8f238129037b20d..d69f9fe87faa0526a71a04532f873e9735f7fca6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    SE/HMC Drive (Read) Cache Functions
  *
index 43cee7fcd01ce7223632797ec690ee8a9ed8ef12..20e9cd542e0335b07efceb88e67b9426f7ec2b85 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    HMC Drive CD/DVD Device
  *
index cb17f07e02def40b99a31350e318016305ada29c..558eba929130b4ee0291d21e42a0f347bbb59ad2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    SE/HMC Drive FTP Device
  *
index 8cb7d8fbadd62983dbf56cebc25fb493a31a9860..0e70397d6e04b797e35ac55ffe6f930eaa62cc83 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    HMC Drive FTP Services
  *
index f3643a7b36765a58f53d0a5394dd60cc9b58c1a5..d12ca12b5ccda806419da6c0e0c2471c069cbd9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    SE/HMC Drive FTP Services
  *
index 186d05e4c767888d9b71073fe92b63800c31d8aa..5b505fdaedecbef53d964d3cfcf77a333e98059e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    ebcdic keycode functions for s390 console drivers
  *
index a31f339211d58966b83b0e7864a1db54347f8dc2..a074d97116287735a49489a99c139bc2c2d94dbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    ebcdic keycode functions for s390 console drivers
  *
index 56519cbb165c7db9da236b4246a4fba011d8df4b..114ca7cbf8897dce734e59cb283923e2c160b3bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IBM/3270 Driver
  *
index 6111c1fa2d1e4ad1173eeb42a6c3ae0c415ddd74..41d8aa96801f2922e399e8a7cc0a16059c1ea27f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * core function to access sclp interface
  *
index 53b5d1b9761a6450ab7a2ea5b98b1ef65554f3bc..f41f6e2ca06328cbd36129605852bf552ec7b14a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 1999,2012
  *
index dff8b94871f0c341389fe0e22c398e003cac1725..d7686a68c09306b9442de1356fd676a8f966aad3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2007,2012
  *
index 6037bc87e767380695a0ebe09b0fcb78ee2d69ea..d247f238faf8cf139b87ce4f50332ecb8ea91880 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCLP line mode console driver
  *
index 7003d52c219184bc65f4a6a099cc86e8f6cdaed1..194ffd5c8580401a13eefb3f85e61fdba2d5e7e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
index 90d92fbe7b9b7aee70ac30a659c946eac9518852..f60d7ea8268d106ecd2dd4aeb719b0888dd4467f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    SCLP control program identification sysfs interface
  *
index 65bb6a99c97f550f6d2cdc11f72e09afecfb7dd0..edf60d1ca633b3a34d0601468d78265ecfe09705 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    SCLP control program identification sysfs interface
  *
index 78a7e4f947218524cf6322974f484e310075fb23..a78cea0c3a09b8a6be200c80352fe89c31b28cd7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IOCTL interface for SCLP
  *
index 59c4afa5e67096f0af46f62eb1e9d68413037eed..796c5311b865def1a6dd8175b95aa23484f2f6f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2013
  *    Author(s): Ralf Hoppe (rhoppe@de.ibm.com)
index bc1fc00910b07f69103a11ee43d7d64db87fdb0d..d06bc5674e5f9527d74d528dc98fa3a9e3f4d807 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCLP early driver
  *
index 5029cc87e80f87e45c6e54875aa6cbe364644c91..edeb2597b0b8c5cb8c2b183a72d1b891407d6a64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2015
  *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 6561cc5b2d5dc31eabdc807e6bb33ed1bbc5bf35..dfdd6c8fd17edaff2630fcd5b10c32fe11076d39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    SCLP Event Type (ET) 7 - Diagnostic Test FTP Services, useable on LPAR
  *
index 98ba3183e7d92eacd6f761c338a9adeba388b95b..d64da18c194dc72da2f5fde2a4cd75e2f73bdff5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    SCLP Event Type (ET) 7 - Diagnostic Test FTP Services, useable on LPAR
  *
index f9cbb1ab047b527f55ea754c48a5800ed5bdb438..d35f10ea5b5218c2cd160bfa7fe689c1f7699517 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    SCLP OCF communication parameters sysfs interface
  *
index 4dbb3dfd4bc79cc4e22c5584ab2d8c440c5a9b36..e7c84a4e5eb5833c7a83e9c4dc8721238750f786 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI I/O adapter configuration related functions.
  *
index e4958511168a70a611a3de9720c501f8ab3cd934..76956c2131cd898d26f14ea7afc69a01b7bcc4d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     signal quiesce handler
  *
index 91b26df5227d7b69ec7f82be9bbb807d7e9770e4..44594a4925538881245aa585b54097d41c2f6721 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * driver: reading from and writing to system console on S/390 via SCLP
  *
index e3b0290995ba67d8c3d5c5374ac2e12023dc6dec..a2eb22f67393f76650d68b484a9dd3411149424f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * interface to the SCLP-read/write driver
  *
index 7cdd13dd7be15a8d7aadd8f6baa5439d404269b0..8e0b69a2f11a57506c3bb116ee9d367fa28b2bd7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCLP "store data in absolute storage"
  *
index f2431c414150b9f8fe03f8c7da07743807b86b71..bc36cf881010ed8925290f52f3d270d9dbc0a4b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SCLP "store data in absolute storage"
  *
index 236b736ae136485bd0c39a5b27d70aaea2e2aaa5..875628dab419cb8115eb72e2d06e37be33b2f113 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    SCLP line mode terminal driver.
  *
index c8773421c31fc25e8d8dc6e40e54992c818ac16a..0fa2d5971d0f8bee3ae74d884e130989857c6e4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    interface to the SCLP-read/write driver
  *
index 095481d32236e802d13ab236e72367e638f17caa..e84395d713896c0271825642b047f441452f93e0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCLP VT220 terminal driver.
  *
index ea664dd4f56d01a144dcafd93c941b0d398c59e1..997b25f6e4cc0a8cc6c935deeb58816589056fbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    tape device driver for 3480/3490E/3590 tapes.
  *
index 36b759e89d22d9aca38c7294a03983648b421a74..b398d8a3ed3c8f3fd1468d98d08281f1c1c3676b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    tape device discipline for 3590 tapes.
  *
index 46ac1164f2428e9a0d12b7fea20339bbda551a99..fc206c9d1c5693813375f04b0f61d9fbe6a7b247 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    character device frontend for tape device driver
  *
index a332c10d50ad4fb701ebcecd6472af002275679d..d25ac075b1adca690bc013014d84ceb62f060025 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2004   All Rights Reserved.
  *
index 8733b232a116350c96444414cb7b82ae949b382d..faae30476f4b8ca8767b7d7a1175313869d0214b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    tape device driver for S/390 and zSeries tapes.
  *
index 3478e19ae194567520c93838b8a1ed2316c8d061..7caba0cc8b2af14b962877e352f04c391ab3bfae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    standard tape device functions for ibm tapes.
  *
index 8c760c03683217a60e4984d04dc2902bc350e316..53ec8e2870d43d78556df0d613918b3fd9e1501d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    standard tape device functions for ibm tapes.
  *
index 11141a8f897414f63c1c0602e4b40bdc9fd5b132..52ceed6f84088caa2313341d21f0198ba7f49433 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007
  *
index 7898bbcc28fc2ff1c7325a1b4dd5b2389a50b055..17e411c575768164c43ea47184e7bdfa2162fb28 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2004, 2010
  * Interface implementation for communication with the z/VM control program
index fa320ad4593d790fb34af20f27afb9c3825e8af4..67164ba22f11db037ffa520fdf94b41efebffb24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux driver for System z and s390 unit record devices
  * (z/VM virtual punch, reader, printer)
index bdf47526038ae580f54a45575817fdabd28a7712..a070ef0efe65d0079cc10245b1ed8b79b8e8fba9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the S/390 common i/o drivers
 #
index 99b5db46909786bc1f667097970c41c041c12a7d..a45011e4529e7dabd5c6da14190bf2a6b237e905 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Support for adapter interruptions
  *
index bf7f5d4c50e130d8995d78ae5088b9212f8aacaf..2a3f874a21d548ef6a04bca6e3a8955f3668d291 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *   S/390 common I/O routines -- blacklisting of specific devices
  *
index 2782100b2c079c739f9bba8cbc4341e6ea1156ae..603268a33ea1a0f7a4b0d6963b40c7f90536a179 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Handling of internal CCW device requests.
  *
index 0d8437b7ea72eee58612c46365dbff124c4bd40f..7e80323cd261e3c189be4fe9e9fab5c6ba6c854c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007, 2010
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
index 321a3f7658104143149fe51c453cb554845ae374..dda5953534b7239292d8c456e0b04af4126179ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_CHSC_H
 #define S390_CHSC_H
 
index 589ebfad6aadae84b3529e7847db1ae39d79cef4..ff5328b0bc8af9835d0275eee5c4dc81ebd7a3f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CHSC_SCH_H
 #define _CHSC_SCH_H
 
index 939596d81b735cb30c63556d71e51e2d98b754fb..94cd813bdcfef8d2a281eceef1d9fae79be97d08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_CIO_H
 #define S390_CIO_H
 
index e64e8278c42e9979af1d35fb57c685be02327731..fa817efcec8fa5c077e26c84d2053c4d16614438 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CIO_DEBUG_H
 #define CIO_DEBUG_H
 
index 3d3cd402b37680d363589c92dfb45bcf917cc815..fc285ca4114144ca860a017781b44775f9e05ff6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *   Channel report handling code
  *
index c9f3fb39ebeb216f94a072172af6f59aa3c47974..30357cbf350afbe95fd76189af3bc2fc59810d21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CSS_H
 #define _CSS_H
 
index 489b583f263d2806db03a909b1c5d92002e7b848..e5c32f4b5287ebc4da569d403475d5624bac43ef 100644 (file)
@@ -1225,10 +1225,16 @@ static int device_is_disconnected(struct ccw_device *cdev)
 static int recovery_check(struct device *dev, void *data)
 {
        struct ccw_device *cdev = to_ccwdev(dev);
+       struct subchannel *sch;
        int *redo = data;
 
        spin_lock_irq(cdev->ccwlock);
        switch (cdev->private->state) {
+       case DEV_STATE_ONLINE:
+               sch = to_subchannel(cdev->dev.parent);
+               if ((sch->schib.pmcw.pam & sch->opm) == sch->vpm)
+                       break;
+               /* fall through */
        case DEV_STATE_DISCONNECTED:
                CIO_MSG_EVENT(3, "recovery: trigger 0.%x.%04x\n",
                              cdev->private->dev_id.ssid,
@@ -1260,7 +1266,7 @@ static void recovery_work_func(struct work_struct *unused)
                }
                spin_unlock_irq(&recovery_lock);
        } else
-               CIO_MSG_EVENT(4, "recovery: end\n");
+               CIO_MSG_EVENT(3, "recovery: end\n");
 }
 
 static DECLARE_WORK(recovery_work, recovery_work_func);
@@ -1274,11 +1280,11 @@ static void recovery_func(unsigned long data)
        schedule_work(&recovery_work);
 }
 
-static void ccw_device_schedule_recovery(void)
+void ccw_device_schedule_recovery(void)
 {
        unsigned long flags;
 
-       CIO_MSG_EVENT(4, "recovery: schedule\n");
+       CIO_MSG_EVENT(3, "recovery: schedule\n");
        spin_lock_irqsave(&recovery_lock, flags);
        if (!timer_pending(&recovery_timer) || (recovery_phase != 0)) {
                recovery_phase = 0;
index ec497af99dd8acfb74c388f990201214ee02713e..b37c22adcc7af1796fb507930f857c837690563b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_DEVICE_H
 #define S390_DEVICE_H
 
@@ -134,6 +135,7 @@ void ccw_device_set_disconnected(struct ccw_device *cdev);
 void ccw_device_set_notoper(struct ccw_device *cdev);
 
 void ccw_device_set_timeout(struct ccw_device *, int);
+void ccw_device_schedule_recovery(void);
 
 /* Channel measurement facility related */
 void retry_set_schib(struct ccw_device *cdev);
index 12016e32e5193796b471eb5430281bea5b6423f7..f98ea674c3d8054390a5486802fedd482f0dbe16 100644 (file)
@@ -476,6 +476,17 @@ static void create_fake_irb(struct irb *irb, int type)
        }
 }
 
+static void ccw_device_handle_broken_paths(struct ccw_device *cdev)
+{
+       struct subchannel *sch = to_subchannel(cdev->dev.parent);
+       u8 broken_paths = (sch->schib.pmcw.pam & sch->opm) ^ sch->vpm;
+
+       if (broken_paths && (cdev->private->path_broken_mask != broken_paths))
+               ccw_device_schedule_recovery();
+
+       cdev->private->path_broken_mask = broken_paths;
+}
+
 void ccw_device_verify_done(struct ccw_device *cdev, int err)
 {
        struct subchannel *sch;
@@ -508,6 +519,7 @@ callback:
                        memset(&cdev->private->irb, 0, sizeof(struct irb));
                }
                ccw_device_report_path_events(cdev);
+               ccw_device_handle_broken_paths(cdev);
                break;
        case -ETIME:
        case -EUSERS:
index d4fa30541a33bc48f4c318f113ca4e9a5b3d56d3..f6df83a9dfbb9a535f2196e61730d168cff101b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  CCW device SENSE ID I/O handling.
  *
index da246b67edfeb88970a1e0d4d02a4856c8d7dc9e..d30a3babf176ee5a14a8557303cf9323ec08773f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  CCW device PGID and path verification I/O handling.
  *
index 9bc3512374c903980299c014947d86ba4cefcffa..7d5c7892b2c44981f25a621f878a12bd3dee267f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2002
  *    Author(s): Cornelia Huck (cornelia.huck@de.ibm.com)
index 9664e4653f9861416a78f4193cbe57d8d3105864..390ab5a6b72fe77eeefb3485c62a3d0de0906359 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef EADM_SCH_H
 #define EADM_SCH_H
 
index ca5e9bb9d45805c7b4223d1a41b61e324292621e..99c900cc3e5b5323ee40f10733f6c95693e2c458 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Functions for assembling fcx enabled I/O control blocks.
  *
index b3e06a7b9480f385b1bbd952d30f7d525afc5436..835de44dbbccd0ad5f1fbac5a7001dad8a7cef8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2007, 2012
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
index 89a78779088848c3c4368c9697bd6f73634c798d..a3ece8d8091a186d1e2937dcec23b3fbc5ecf445 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007, 2012
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
index 220f49145b2f9bf48e29f92dc06f94ab7a9a0ef2..af571d8d6925e7a8bb4f35db7e0a7c8aff1bdbf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_IO_SCH_H
 #define S390_IO_SCH_H
 
@@ -131,6 +132,8 @@ struct ccw_device_private {
                                   not operable */
        u8 path_gone_mask;      /* mask of paths, that became unavailable */
        u8 path_new_mask;       /* mask of paths, that became available */
+       u8 path_broken_mask;    /* mask of paths, which were found to be
+                                  unusable */
        struct {
                unsigned int fast:1;    /* post with "channel end" */
                unsigned int repall:1;  /* report every interrupt status */
index 4182f60124da1a9cf114313ee69cf52ce5ac6039..4fa9ee1d09fa93c5207d87c2252bb3d0c82cbf4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Channel subsystem I/O instructions.
  */
index b31ee6bff1e48b7104a4de2dea35d938123f5fb3..35ad4ddd61e0da2f3010e7547eede9cfa961f5aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef S390_CIO_IOASM_H
 #define S390_CIO_IOASM_H
 
index 358ee16d10a2e97375df34fd84fde7b404adcc78..deaf59f93326f64228f756bdbbb72e849811b0be 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Functions for incremental construction of fcx enabled I/O control blocks.
  *
index 7a640530e7f56f8a9bd93ff34d97a4f6cb2ccc01..a2d3778b2c95928d0fd9c7ecf67573d313cb01d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Orb related data structures.
  *
index 7e70f9298cc13f5cc1dc1be0db2a98ef52e71a55..29d6b5222f1cdb6420c9632f9825597bb524f295 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2000, 2009
  * Author(s): Utz Bacher <utz.bacher@de.ibm.com>
index b6fc147f83d866107e7aa0d8b2b390f04e3d58e1..68a82f3e2e92b09951bf30a3094f20285154bdc1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright IBM Corp. 2008, 2009
  *
index 1d595d17bf11f6b529eca2caafc494721130b32c..e06496ab00368c6271d9c45a5abd68cdfd146d26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2008
  *
index c61164f4528e1230c4e980b66ba7e2af1d2e9941..a739bdf9630e70f1c905807fb27136664f7d9ce5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2000, 2009
  * Author(s): Utz Bacher <utz.bacher@de.ibm.com>
index 8e706669ac8b2720bc51138348157ee3554d201d..e331cd97e83bb519ef302178061a42dded67741a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tracepoint definitions for s390_cio
  *
index 5b807a09f21b277e16f7308f5a8c1e061ac98756..1f8d1c1e566de7749a2d3177ea24c415bba9a921 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Tracepoint header for the s390 Common I/O layer (CIO)
  *
index 5ccfdc80d0ec942d2e4dde4113830ab9eb2ba735..f20b4d66c75f7f3480b967bf3a48eae58acba12d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * channel program interfaces
  *
index 7a1996b3b36d32d5f2f6df6d706a8fd0521ae6c6..a4b74fb1aa5741e5bf65c8e3be55b85c2772d03d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * channel program interfaces
  *
index 80a0559cd7ce2b6525628a48b2f735a1a29e79aa..c30420c517b17961e1b0d94f908f557db8c8ee2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Finite state machine for vfio-ccw device handling
  *
index a66a317f3e4fedb6d7caaf2276c3fe3721391a58..41eeb57d68a3d3b5f4528c0d1a05e493142301ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Physical device callbacks for vfio_ccw
  *
index fc0f01c16ef9c832512d61b2fb5531c8116276c2..78a66d96756ba0f55059e566ae848a3126fca94e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Private stuff for vfio_ccw driver
  *
index be36f1010d75594390c550f8547c5e86311d9acb..b59af548ed1c57a3ad05c4956170146cb6f20be0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # S/390 crypto devices
 #
index cd350345b3d25885c6cce02d8f357f387bdfbcc1..6c0474c834d440d2e154d93668ca72107e9c0d32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 836efac968137aaa297b82476a96a7ee306c1f6a..8a31c9e95430b419c5538e3109afb77dd1fdaf48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 78dbff842dae8142714874f1715ab8fa55067417..6a9d77c75ec385ef14fe5d1a3d2fd4135214d5bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2016
  *  Author(s): Harald Freudenberger <freude@de.ibm.com>
index 56b96edffd5be897f8773d76944032de74a85e4d..6c8bd8ad618505a8f5b09e0446f128f1a33ff742 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2016
  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
index 719571375ccc2138ae94645878e9979cfb6ff541..748390a3799bf84ae5263cce209a96eedc97aead 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2012
  *  Author(s): Holger Dengler <hd@linux.vnet.ibm.com>
index 13e38defb6b8d954ec6587a2f6bf1d9ae418b28b..241dbb5f75bf3e7be86da772836c2af775be320e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright IBM Corp. 2016
  *  Author(s): Holger Dengler (hd@linux.vnet.ibm.com)
index c351b07603e054bf72e9802f525d48f03f42cd06..513b7ae64980ef1da15bfcfa04f2689a6723300b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # S/390 network devices
 #
index 8363f1c966ef7e5a2e55d6f2a861ae011f9601d7..f7ec51db3cd6cd5ea17648d0b90c49c2fbe21626 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Copyright IBM Corp. 2001, 2007
  *     Authors:        Peter Tiedemann (ptiedem@de.ibm.com)
index 47bf0501995e8cfa3834ff18b6e817a45d80e19a..675575ef162ef4b55bda6d064fef28d6a7cdc73c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Copyright IBM Corp. 2001, 2007
  *     Authors:        Peter Tiedemann (ptiedem@de.ibm.com)
index 570ae3b7adf678e524c0b29c80cc909825f69e8b..1b4ee570b712f272363255472caa8fd13662d2d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2001, 2007
  * Authors:    Fritz Elfert (felfert@millenux.com)
index c963d04799c0a21393bc77acc50f87f176358d2b..225737295cb472f644381cc05abf90119a0af76b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2001, 2007
  * Authors:    Fritz Elfert (felfert@millenux.com)
index 6f4417c80247272a6621dcfd60ca396441e37a2f..16bdf23ee02b1234b95805354a0cde070546e24d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Copyright IBM Corp. 2001, 2007
  *     Authors:        Fritz Elfert (felfert@millenux.com)
index f8be39634f03c81c68a8e4d102db73b2fb665f59..e02f295d38a9bf060ab2054b67a516713b90eb79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Copyright IBM Corp. 2004, 2007
  *     Authors:        Belinda Thompson (belindat@us.ibm.com)
index bd1b1cc54ffa0c7cc8fe1a8ddd5083ad58a57afb..441d7b211f0f9246e7b059cf5d41edb0b8f176a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright IBM Corp. 2007
  * Authors:    Peter Tiedemann (ptiedem@de.ibm.com)
index ddb0aa321339f19cccd4741254f9fb3ebcf1b3d1..ded1930a00b2d8f04f7dc8c1f4a2cc20b29dbf47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2007, 2007
  * Authors:    Peter Tiedemann (ptiedem@de.ibm.com)
index a4510cf590341494b28aae9c7b2df184057b5a32..16dc071a2973cbf2730e1a5fda004c7e4df42eb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FSM_H_
 #define _FSM_H_
 
index 150fcb4cebc3510e5a4e45dfb61f63728cd5ed7d..f94d8f6dd7a8e417de743234639db2c465e2812d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*lcs.h*/
 
 #include <linux/interrupt.h>
index 59e09854c4f763f0c51683a4b57c7f584ab2aa8f..47a13c5723c6a756fc2616822af3ad54c973f299 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
index 6dd7d05e5693170aa51678398a1c749a14e0cb37..dafb8c6434268193cee2a50871d49b436e8c9054 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Frank Pavlic <fpavlic@de.ibm.com>,
index 912e0107de8fccdbae906e12e478c7ee0a021240..55f3d234ea1d30c333fff709a848d6d4c7c663d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Frank Pavlic <fpavlic@de.ibm.com>,
index 0d59f9a45ea9e3c52ba4eee9cbc7b37b433dd449..d4a8293d318d44beb4c2bf2699bee2b68a495259 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2013
  *    Author(s): Eugene Crosser <eugene.crosser@ru.ibm.com>
index 9696baa49e2d4409062be4338ea383472a7d4ab0..d33d413f71507c530213545112990b47f3cd9d00 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2013
  *    Author(s): Eugene Crosser <eugene.crosser@ru.ibm.com>
index 9b5e439f18cfc1a5cf40daa792b180ce88f88f8f..194ae9b577ccaeda712fece16868115c13fc38bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
index e8bcc314cc5f9d21683170c23dd0b3880f3ee6cb..7a829ad777836c9e57bbbb6d0b7d2a3a24cd2e38 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *    Copyright IBM Corp. 2007
  *    Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
index 45bc925928ca724fd6dffbf0870fccb81694b59c..a0d6c6130c4b9b50be84a7ae9b9cca531a95103e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IUCV special message driver
  *
index 82ac331d91254e72debc5d021808a6282e93dc1b..84752152d41fd682c5ae350ddb4bd3ac80d47cde 100644 (file)
@@ -357,6 +357,8 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device)
 
        adapter->next_port_scan = jiffies;
 
+       adapter->erp_action.adapter = adapter;
+
        if (zfcp_qdio_setup(adapter))
                goto failed;
 
@@ -513,6 +515,9 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
        port->dev.groups = zfcp_port_attr_groups;
        port->dev.release = zfcp_port_release;
 
+       port->erp_action.adapter = adapter;
+       port->erp_action.port = port;
+
        if (dev_set_name(&port->dev, "0x%016llx", (unsigned long long)wwpn)) {
                kfree(port);
                goto err_out;
index 54c7b48fdb4640167ee842ab3ef0f5149e656524..49eda141ea431f8a92afe70786fc165e24b9372e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 8227076c9cbbf7de9915aa5dabad4b370f81061d..a8b831000b2d687b9608a9658ac90650c7131b8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 3508c00458f407101cda09d5ad9c047eff1f1932..e2a973cd2573e2e25c90e471bb3170cf93b07e00 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  * debug feature declarations
index b8e853e53546524bf5976e4af66345a7c25fe59a..3396a47721a7538c74295e0b46e11723b2c27490 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index 37408f5f81ce84e5f4f598069bbc417edff71469..cbb8156bf5e0c4979896b3f1edd8004c93837cfb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
@@ -193,9 +194,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
                atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE,
                                &zfcp_sdev->status);
                erp_action = &zfcp_sdev->erp_action;
-               memset(erp_action, 0, sizeof(struct zfcp_erp_action));
-               erp_action->port = port;
-               erp_action->sdev = sdev;
+               WARN_ON_ONCE(erp_action->port != port);
+               WARN_ON_ONCE(erp_action->sdev != sdev);
                if (!(atomic_read(&zfcp_sdev->status) &
                      ZFCP_STATUS_COMMON_RUNNING))
                        act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
@@ -208,8 +208,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
                zfcp_erp_action_dismiss_port(port);
                atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status);
                erp_action = &port->erp_action;
-               memset(erp_action, 0, sizeof(struct zfcp_erp_action));
-               erp_action->port = port;
+               WARN_ON_ONCE(erp_action->port != port);
+               WARN_ON_ONCE(erp_action->sdev != NULL);
                if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_RUNNING))
                        act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
                break;
@@ -219,7 +219,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
                zfcp_erp_action_dismiss_adapter(adapter);
                atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status);
                erp_action = &adapter->erp_action;
-               memset(erp_action, 0, sizeof(struct zfcp_erp_action));
+               WARN_ON_ONCE(erp_action->port != NULL);
+               WARN_ON_ONCE(erp_action->sdev != NULL);
                if (!(atomic_read(&adapter->status) &
                      ZFCP_STATUS_COMMON_RUNNING))
                        act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
@@ -229,7 +230,11 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
                return NULL;
        }
 
-       erp_action->adapter = adapter;
+       WARN_ON_ONCE(erp_action->adapter != adapter);
+       memset(&erp_action->list, 0, sizeof(erp_action->list));
+       memset(&erp_action->timer, 0, sizeof(erp_action->timer));
+       erp_action->step = ZFCP_ERP_STEP_UNINITIALIZED;
+       erp_action->fsf_req_id = 0;
        erp_action->action = need;
        erp_action->status = act_status;
 
index a9e968717dd921eb40aca7293f765f285e4ab70c..8ca2ab7deaa9e471a2ce0afb3a3ed31127974b86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index 8210645c21111265ec73a5b4f5142a408e8a2530..ca218c82321f882228b11be13aed307aee208b60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 41f22d3dc6d1bc3f4917f57fff4ce421f4243899..6a397ddaadf095f44b53928d9ef04afe9d91daa3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index 69d1dc3ec79d8be48f783baf695616674b06c4d4..00fb98f7b2cd0efa4c85a2604742e9b354e6eb6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 88feba5bfda433bf7dba59ef3ed2d09af73f596c..4baca67aba6d8db041a5ab4d02852765cd619f5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index 9e358fc04b78d2b6f7e363aa4d9d45ac8cd3d09f..4ab02e8d36f32ff4fe77a4e8fcbf74f9275ada65 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 7f647a90c750316201c81bcfe6f8928e4b15e65a..886c662cc1549812db34d6b8a1f9bac7aaed0c66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index 703fce59befef0be884449e00addad4a49981d61..59a943c0d51d0d925db1d6b505b7380ae3fd7e74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zfcp device driver
  *
index ec3ddd1d31d5f5be43fb70425dd3b8981a179f63..4d2ba5682493221bf32f0c4000021da54dc57044 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
@@ -115,10 +116,15 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)
        struct zfcp_unit *unit;
        int npiv = adapter->connection_features & FSF_FEATURE_NPIV_MODE;
 
+       zfcp_sdev->erp_action.adapter = adapter;
+       zfcp_sdev->erp_action.sdev = sdev;
+
        port = zfcp_get_port_by_wwpn(adapter, rport->port_name);
        if (!port)
                return -ENXIO;
 
+       zfcp_sdev->erp_action.port = port;
+
        unit = zfcp_unit_find(port, zfcp_scsi_dev_lun(sdev));
        if (unit)
                put_device(&unit->dev);
index 96a0be13e841def9f3ab3bd1d468d7ca700941f6..3ac823f2540f4f46e07b8e55371ef37f599c7448 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 9310a547b89fb68a5514b1c735013d02377304c7..1bf0a0984a098f083b8ff5e53fffe3710cbe6884 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * zfcp device driver
  *
index 78b6183c9866865dc57d3da287889557422fb427..ae478144c55106e0a8d9224747b3f9fb2ebead43 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel miscellaneous SPARC device drivers.
 #
index 228c782d6433257cfb143294d3f4d3b3ec37ed7e..fb5bcf6dddc1ddf97eab70f6263826c38f8e43fa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* bbc_envctrl.c: UltraSPARC-III environment control driver.
  *
  * Copyright (C) 2001, 2008 David S. Miller (davem@davemloft.net)
index 4b4531066e75a4dd68380abe28d019c2caed2b24..c2d066d3fa41d76b8f4e4fe9e3f67beac4e3c23c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BBC_I2C_H
 #define _BBC_I2C_H
 
index cd30819a0a303a5a0eb116d441f062ebf659f478..45c8318787d89db559c62a229d27081768a2d1e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: max1617.h,v 1.1 2001/04/02 09:59:08 davem Exp $ */
 #ifndef _MAX1617_H
 #define _MAX1617_H
index f34c916b95bc02f13c819f8796d71ef69e7de1bb..0c9a100af667f95fa47a4126df16d1cadcf870dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* -*- mode: c; c-basic-offset: 8 -*- */
 
 /* Driver for 53c700 and 53c700-66 chips from NCR and Symbios
index 93dbe58c47c845ddbe7faf25e540401f67d6c0ab..1639bf8b1ab667759f2310b6cc29680c6f728533 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for linux/drivers/scsi
 #
index 8a0812221d72fdb9488b33f5ff5bfe04bf137fcf..777b0222d0214441fcd3a610ad5d2b39931147de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NCR 5380 generic driver routines.  These should make it *trivial*
  * to implement 5380 SCSI drivers under Linux with a non-trantor
index d78f0957d8653535eda0f01f2af55f82a75a1a3c..31096a0b0fdd30202068b0376396eaf6b783bf29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * NCR 5380 defines
  *
index f167af6bd2af25fd848847a71c41cc2f22112b63..eb675d782ef6d296216b9e7e44dbcd196171207c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* -*- mode: c; c-basic-offset: 8 -*- */
 
 /* NCR Dual 700 MCA SCSI Driver
index 7b92090081870fe0419d3b48ea602ff83f665f53..d5f46cdb736e05263cdab4b0b27423d249873e9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* -*- mode: c; c-basic-offset: 8 -*- */
 
 /* NCR Quad 720 MCA SCSI Driver
index 794b8e65c71133a565ada330ee8622732bcd402d..8d8a4074a570389d79899dd7cafb89dbf5d2dada 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef A2091_H
 #define A2091_H
 
index 49db4a335aaba4152ea553af335014fc234b74d2..5cb3e75352819c52f0f98320ca6f386d41c5450c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef A3000_H
 #define A3000_H
 
index a64285ab0728f14c870db3d72b19190d516d44f3..af3e4d3f9735fdc3430eea0ea05cc1a78e2fa306 100644 (file)
@@ -699,13 +699,13 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
        int status;
 
        dresp = (struct aac_mount *) fib_data(fibptr);
-       if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
-           AAC_OPTION_VARIABLE_BLOCK_SIZE))
+       if (!aac_supports_2T(fibptr->dev)) {
                dresp->mnt[0].capacityhigh = 0;
-       if ((le32_to_cpu(dresp->status) != ST_OK) ||
-           (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
-               _aac_probe_container2(context, fibptr);
-               return;
+               if ((le32_to_cpu(dresp->status) == ST_OK) &&
+                       (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
+                       _aac_probe_container2(context, fibptr);
+                       return;
+               }
        }
        scsicmd = (struct scsi_cmnd *) context;
 
index 92fabf2b0c24c4c24f79ae8626d80ef09853816d..403a639574e5ea10c5c8500141204ebc513bd7c1 100644 (file)
@@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
        return 0;
 }
 
+static inline int aac_supports_2T(struct aac_dev *dev)
+{
+       return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
+}
+
 char * get_container_type(unsigned type);
 extern int numacb;
 extern char aac_driver_version[];
index 97d269f1688863a90f0263c5668441650fd2cadc..1bc623ad3fafabd7025ce759c22aed725aa3bad5 100644 (file)
@@ -302,9 +302,11 @@ int aac_send_shutdown(struct aac_dev * dev)
                return -ENOMEM;
        aac_fib_init(fibctx);
 
-       mutex_lock(&dev->ioctl_mutex);
-       dev->adapter_shutdown = 1;
-       mutex_unlock(&dev->ioctl_mutex);
+       if (!dev->adapter_shutdown) {
+               mutex_lock(&dev->ioctl_mutex);
+               dev->adapter_shutdown = 1;
+               mutex_unlock(&dev->ioctl_mutex);
+       }
 
        cmd = (struct aac_close *) fib_data(fibctx);
        cmd->command = cpu_to_le32(VM_CloseAll);
index 87cc4a93e637e6db517c12b0c01bb212eb2e8445..c9252b138c1fe0e21d217b0fb305cc45afc1545a 100644 (file)
@@ -906,12 +906,14 @@ static int aac_eh_dev_reset(struct scsi_cmnd *cmd)
 
        bus = aac_logical_to_phys(scmd_channel(cmd));
        cid = scmd_id(cmd);
-       info = &aac->hba_map[bus][cid];
-       if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS ||
-           info->devtype != AAC_DEVTYPE_NATIVE_RAW)
+
+       if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS)
                return FAILED;
 
-       if (info->reset_state > 0)
+       info = &aac->hba_map[bus][cid];
+
+       if (info->devtype != AAC_DEVTYPE_NATIVE_RAW &&
+           info->reset_state > 0)
                return FAILED;
 
        pr_err("%s: Host adapter reset request. SCSI hang ?\n",
@@ -962,12 +964,14 @@ static int aac_eh_target_reset(struct scsi_cmnd *cmd)
 
        bus = aac_logical_to_phys(scmd_channel(cmd));
        cid = scmd_id(cmd);
-       info = &aac->hba_map[bus][cid];
-       if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS ||
-           info->devtype != AAC_DEVTYPE_NATIVE_RAW)
+
+       if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS)
                return FAILED;
 
-       if (info->reset_state > 0)
+       info = &aac->hba_map[bus][cid];
+
+       if (info->devtype != AAC_DEVTYPE_NATIVE_RAW &&
+           info->reset_state > 0)
                return FAILED;
 
        pr_err("%s: Host adapter reset request. SCSI hang ?\n",
@@ -1547,8 +1551,9 @@ static void __aac_shutdown(struct aac_dev * aac)
 {
        int i;
 
+       mutex_lock(&aac->ioctl_mutex);
        aac->adapter_shutdown = 1;
-       aac_send_shutdown(aac);
+       mutex_unlock(&aac->ioctl_mutex);
 
        if (aac->aif_thread) {
                int i;
@@ -1561,7 +1566,11 @@ static void __aac_shutdown(struct aac_dev * aac)
                }
                kthread_stop(aac->thread);
        }
+
+       aac_send_shutdown(aac);
+
        aac_adapter_disable_int(aac);
+
        if (aac_is_src(aac)) {
                if (aac->max_msix > 1) {
                        for (i = 0; i < aac->max_msix; i++) {
index 48c2b2b34b7222ae656ab4f0c9113d59a0d58d24..0c9361c87ec8de8b853f6ccaa6132663a4b982bd 100644 (file)
@@ -740,6 +740,8 @@ static void aac_send_iop_reset(struct aac_dev *dev)
        aac_set_intx_mode(dev);
 
        src_writel(dev, MUnit.IDR, IOP_SRC_RESET_MASK);
+
+       msleep(5000);
 }
 
 static void aac_send_hardware_soft_reset(struct aac_dev *dev)
index ac4bfa438bf2c119939a40176c097fae3fa40932..efd01877d02bfaecc0acc62760d9d4f0ded1cdd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AHA152X_H
 #define _AHA152X_H
 
index 0fe9bae1b3d13d8aa6421aedc12324b55745c649..f5b0d210fb3cdab1c45f0b4549c192f1482fd93c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AHA1542_H_
 #define _AHA1542_H_
 
index b0c5603461ca252d254f6deff18b9e45eba8c479..dfdaa4d3ea4e0c4353100ad4acf16b2f3a3c2486 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AHA1740_H
 
 /* $Id$
index b03ba0df7a83c624c714a0b0d9a2f85b7b785784..c15be2590d1cd105ad44d23ada3efb72cac125ee 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux aic7xxx SCSI driver.
 #
index 45e2d49c1fff5e5f2c6f0c11b8e5e6874a45f514..243adb0a38d13312a133e79636c5edda39fe86d8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 PROG=  aicasm
 
 OUTDIR ?= ./
index 16c3e86a6b1b948f84ca661920bd8a4c6388a56b..b576d9276f71c863adfcb84795734ece436bc843 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for drivers/scsi/arm
 #
index 690816f3c6af9a67ff38e801a4e9c440b763f114..421fe869a11ef0cbdb8130aa7b8ebdffbc775236 100644 (file)
@@ -2725,9 +2725,9 @@ int acornscsi_abort(struct scsi_cmnd *SCpnt)
  * Params   : SCpnt  - command causing reset
  * Returns  : one of SCSI_RESET_ macros
  */
-int acornscsi_host_reset(struct Scsi_Host *shpnt)
+int acornscsi_host_reset(struct scsi_cmnd *SCpnt)
 {
-       AS_Host *host = (AS_Host *)shpnt->hostdata;
+       AS_Host *host = (AS_Host *)SCpnt->device->host->hostdata;
        struct scsi_cmnd *SCptr;
     
     host->stats.resets += 1;
@@ -2741,7 +2741,7 @@ int acornscsi_host_reset(struct Scsi_Host *shpnt)
 
        printk(KERN_WARNING "acornscsi_reset: ");
        print_sbic_status(asr, ssr, host->scsi.phase);
-       for (devidx = 0; devidx < 9; devidx ++) {
+       for (devidx = 0; devidx < 9; devidx++)
            acornscsi_dumplog(host, devidx);
     }
 #endif
index 9b839b1e895a1dd285fc7be1dbda7dcda53b275b..75c44399fc88ae8babda2980704163ae8a665f18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ATP870U_H
 #define _ATP870U_H
 
index 475cf925d5e86d0f2a029b9aa67ba8ee9a94f004..442fc3db8f1fd12620dc298f89c8dae48cfa18f0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SCSI_BFA_FC) := bfa.o
 
 bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o bfad_bsg.o
index 6dc96c8dfe75c229e522db72b587bd1af5852686..d4c2a2e4c5d4415e86fa049e36fab7a8940ea6d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ASCII values for a number of symbolic constants, printing functions,
  * etc.
index 3681a3fbd4991795edecf7d98cbf57ab645910da..d047e22eac0d32161998a20da9bb87654fed9dde 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 ## Chelsio FCoE driver
 #
index fbf35e37701ef402fce936d133c1eb5fa5cb90b6..5379a936141a556588a2726d7e96c4b533aecc9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /************************************************************************/
 /*                                                                     */
 /*     dc395x.h                                                        */
index 5016af5cf860886bdebfded4193753a935777b04..1a396c5e7f73ffe718a22f493e96e9a43fb07a97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /********************************************************
 * Header file for eata_dma.c and eata_pio.c            *
 * Linux EATA SCSI drivers                              *
index 7deeb935748b90b7b0460b7c313ddde36b4afb02..5b5e3d13670b3261a052b08871819e0a033e2c1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /********************************************************
 * Header file for eata_pio.c Linux EATA-PIO SCSI driver *
 * (c) 1993-96 Michael Neuffer                                  *
index 7e8932ae91f8ab552cb7a8777a8f529185a143c5..8163dca2071bf659da9073576c3824edd9d9c7bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* esp_scsi.h: Defines and structures for the ESP driver.
  *
  * Copyright (C) 2007 David S. Miller (davem@davemloft.net)
index d3bb16d114014f4c112fcf4d94bedb19c1cfae6a..b8bdfab51a5844dd3ec868d42da7a26ef03784c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FCOE_LIBFCOE_H_
 #define _FCOE_LIBFCOE_H_
 
index 383598fadf048aba5f4438af9b0ac25c7a356745..6214a6b2e96d21ee599cde210745a4d8d48e7ca2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FCOE_FNIC) += fnic.o
 
 fnic-y := \
index 3fd8b83ffbf9f0df05d9c202d18bb7520cd6ee89..95fc720c1b30450a3f2696f1cecebbfe8b107830 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GDTH_H
 #define _GDTH_H
 
index b004c6165887f11647244aa755308ce6ee49e3e3..4c91894ac2444dca2e94998884c4fabcf4aa8441 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GDTH_IOCTL_H
 #define _GDTH_IOCTL_H
 
index d08b2716752c9d44cb50e7ba2b63e0541e09c939..20add49cdd328450545622f90c565a4d595281b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* gdth_proc.c 
  * $Id: gdth_proc.c,v 1.43 2006/01/11 16:15:00 achim Exp $
  */
index aaa6181989727f14906468ff70e6dbd301c3c619..d7d0aa283695c18db66d54fbb56a921f37b58b6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GDTH_PROC_H
 #define _GDTH_PROC_H
 
index 852913cde5dd9a5b5bdf43722d76613ef68c12d2..61c1a35844610659cf32f3844c5d32ad56a8eae4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GVP11_H
 
 /* $Id: gvp11.h,v 1.4 1997/01/19 23:07:12 davem Exp $
index 9abe81021484dc146755d0475a51ccd26231372d..4ed3d26ffdde809f457501abcbe9dee6ce644fe7 100644 (file)
@@ -4091,7 +4091,7 @@ static int hpsa_set_local_logical_count(struct ctlr_info *h,
        memset(id_ctlr, 0, sizeof(*id_ctlr));
        rc = hpsa_bmic_id_controller(h, id_ctlr, sizeof(*id_ctlr));
        if (!rc)
-               if (id_ctlr->configured_logical_drive_count < 256)
+               if (id_ctlr->configured_logical_drive_count < 255)
                        *nlocals = id_ctlr->configured_logical_drive_count;
                else
                        *nlocals = le16_to_cpu(
index 785fb42f66502a40e005c912d1cf9022a86ddb62..2799a6b08f736052a52ae7901a06fe64fc486211 100644 (file)
@@ -3767,7 +3767,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
         */
        if ((vscsi->flags & (CLIENT_FAILED | RESPONSE_Q_DOWN))) {
                pr_err("write_pending failed since: %d\n", vscsi->flags);
-               return 0;
+               return -EIO;
        }
 
        rc = srp_transfer_data(cmd, &vio_iu(iue)->srp.cmd, ibmvscsis_rdma,
index 9fec55b363224f6b93f3f5d2e36bea29c70c4e44..832606ae2908cf1a600d357e8d8450b40a423c83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LIBSRP_H__
 #define __LIBSRP_H__
 
index 8f6f32fc61ffebd02ed30a7a8e41f9d5b67b7510..7f2bb35b1b876c6e00dbc8b96fa0dab2b593e441 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*  Driver for the Iomega MatchMaker parallel port SCSI HBA embedded in 
  * the Iomega ZIP Plus drive
index 3359e10e0d8f35d3c46ed8bdae7f718a30982c9d..da6f04cae272be688cb66b190b90f4606b890637 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SCSI_ISCI) += isci.o
 isci-objs := init.o phy.o request.o \
             remote_device.o port.o \
index 4bb23ac86a5c77fa1d524183e0e08a167692364a..65396f86c3071b36ba6966bb5594296c7b1795d6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # $Id: Makefile
 
 obj-$(CONFIG_LIBFC) += libfc.o
index 520325867e2b4c05528bd89a7eeaccea2f5c6f94..31d31aad3de1d3fd0f2ff58d2141cabddec474bf 100644 (file)
@@ -383,11 +383,11 @@ static void fc_rport_work(struct work_struct *work)
                                fc_rport_enter_flogi(rdata);
                                mutex_unlock(&rdata->rp_mutex);
                        } else {
+                               mutex_unlock(&rdata->rp_mutex);
                                FC_RPORT_DBG(rdata, "work delete\n");
                                mutex_lock(&lport->disc.disc_mutex);
                                list_del_rcu(&rdata->peers);
                                mutex_unlock(&lport->disc.disc_mutex);
-                               mutex_unlock(&rdata->rp_mutex);
                                kref_put(&rdata->kref, fc_rport_destroy);
                        }
                } else {
index bd4605a34f54d655a09471243c8d4386b9e78b3d..f8dc1601efd5f1eb51b4d776087d6ea20534d09e 100644 (file)
@@ -1728,7 +1728,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
 
        if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
                reason = FAILURE_SESSION_IN_RECOVERY;
-               sc->result = DID_REQUEUE;
+               sc->result = DID_REQUEUE << 16;
                goto fault;
        }
 
@@ -2851,9 +2851,6 @@ EXPORT_SYMBOL_GPL(iscsi_session_setup);
 /**
  * iscsi_session_teardown - destroy session, host, and cls_session
  * @cls_session: iscsi session
- *
- * The driver must have called iscsi_remove_session before
- * calling this.
  */
 void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
 {
@@ -2863,6 +2860,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
 
        iscsi_pool_free(&session->cmdpool);
 
+       iscsi_remove_session(cls_session);
+
        kfree(session->password);
        kfree(session->password_in);
        kfree(session->username);
@@ -2877,7 +2876,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
        kfree(session->portal_type);
        kfree(session->discovery_parent_type);
 
-       iscsi_destroy_session(cls_session);
+       iscsi_free_session(cls_session);
+
        iscsi_host_dec_session_cnt(shost);
        module_put(owner);
 }
index 7e7ae786121b6e8458f7a7aa8954141c77e223a5..100bc4c8798d76852adb9224edc763f70f0741ff 100644 (file)
@@ -6131,6 +6131,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
                                "Extents and RPI headers enabled.\n");
                }
                mempool_free(mboxq, phba->mbox_mem_pool);
+               rc = -EIO;
                goto out_free_bsmbx;
        }
 
index 79ba3ce063a4f847ce8187d3290ecf5a309f62b9..23bdb1ca106e459355aed0fa7627d2665a7312a3 100644 (file)
@@ -884,7 +884,7 @@ out_err:
                                         wcqe->total_data_placed);
                        nCmd->transferred_length = 0;
                        nCmd->rcv_rsplen = 0;
-                       nCmd->status = NVME_SC_FC_TRANSPORT_ERROR;
+                       nCmd->status = NVME_SC_INTERNAL;
                }
        }
 
index 1ad24e4f0a85d3626098caff6c03cbd01a0a0aa2..5df6e81f78a8f89701f89a4b190bd2ebe8f479de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mac53c94.h: definitions for the driver for the 53c94 SCSI bus adaptor
  * found on Power Macintosh computers, controlling the external SCSI chain.
index 508d65e5a5184d3259e85fadeea3d846863f492a..21eba2fd465a08bfd4498f2cffefda372b29162c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MEGARAID_H__
 #define __MEGARAID_H__
 
index 5826ed509e3e69db5ca648e9bbbcdcf3758c9042..6e74d21227a52b6ace1c90de6a42c6eb09e64894 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MEGARAID_MM)      += megaraid_mm.o
 obj-$(CONFIG_MEGARAID_MAILBOX) += megaraid_mbox.o
 obj-$(CONFIG_MEGARAID_SAS)     += megaraid_sas.o
index 4fdb81fa55e2f58964513f79eebbf8ef8a8c2382..ee53c05ace957e45ec85707a8fcc8d719b9d90ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mesh.h: definitions for the driver for the MESH SCSI bus adaptor
  * (Macintosh Enhanced SCSI Hardware) found on Power Macintosh computers.
index b7643f596c1e67ab67e0a954ab2250577de637d8..84fb3fbdb0ca10d2d32d5b0fa68b7751215b634f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # mpt3sas makefile
 obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas.o
 mpt3sas-y +=  mpt3sas_base.o     \
index a9a659fc2812a422dff8c5f1d923733e6cabf4c0..2608011cc7f1802c873a6b5a512e93728e1b881c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2015 Avago Technologies.  All rights reserved.
  *
index fa61baf7c74dd409d1733b27e3c7b1d460dcfe7f..036c9cf610322086ed2aea91dbb1f76bd25d23c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2015 Avago Technologies.  All rights reserved.
  *
index bba56b61d36cc6e2d72123501995e51d8209d171..38b2c879bf0f725dc7d5ff38c8dc466e7415133a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2015 Avago Technologies.  All rights reserved.
  *
index af4be403582e8b1dcec58b6a1dd11540f479954a..673cf05f94dc9394c64eeaafef0accd3a223fe0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2015 Avago Technologies.  All rights reserved.
  *
index 1c0eeeeb5eaf1c1b36f92d924f347e253d045fec..b9bb1c178f124e1e631b13ec162d06b75c3ece23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2014 Avago Technologies.  All rights reserved.
  *
index c10c2c02a945bb8c4104bf2b040515259e7a9926..afa17ff246b4ace7a9191348e5a7cd2c3000a8dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2015 Avago Technologies.  All rights reserved.
  *
index 5f9289a1166fea3143f31ed067c04d31c0e7def5..593765a4ddb8abac9ea0ad61afdf081743bc7d43 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2000-2014 Avago Technologies.  All rights reserved.
  *
index 92a81abc2c31a8cd9be778ea90af6cbec966f6bb..36494439a4190bf4249555cd6af8a4738f541fa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright 2000-2014 Avago Technologies.  All rights reserved.
  *
index 4f515700bdc349511cf5df90035f589b3a9e8039..e6b2b681fda3164b27f0116bfc119ac9d1f3481b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/blkdev.h>
index bfd4566ef05001e6e5f9c8d4e5b10bb0e4293202..f75ff58ddcd0104a01831e0ae418f16c3db3fb2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MVME147_H
 
 /* $Id: mvme147.h,v 1.4 1997/01/19 23:07:10 davem Exp $
index b4fea98ba276656ed6a043cfeacb6ceb1c888caf..b90ae280853daf49c92c2fe9f1288b49c557223d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     $Header: /cvsroot/osst/Driver/osst.h,v 1.16 2005/01/01 21:13:35 wriede Exp $
  */
index 21717d0e6974c410275766a6b1ea069c807aa37f..83c1d4fb11dbfc7df0747b50284a2bb2d9c5a27c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define SIGS_FROM_OSST \
        {"OnStream", "SC-", "", "osst"}, \
        {"OnStream", "DI-", "", "osst"}, \
index ff1e610946ed74b2b2e29a0af8ba19d89937cee8..a6a389b88876284548211dc6d39c580ca3eec4f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
    The compile-time configurable defaults for the Linux SCSI tape driver.
 
index 683bf148b5b7675beecb001365fa307da11dc206..44eea2d431432cca721602556cc4517863e77904 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 ccflags-y              := -Idrivers/scsi
 
index ce4cd87c7c662a6de92f71331e1e49052f4c8e4f..02b7338999cc3b26737a8db1878e02393845f316 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Kernel configuration file for the PM8001 SAS/SATA 8x6G based HBA driver
 #
index ba8021427b884ea7942d1deb8084b30b8aaeb1f1..6a1f8a2d70ebac4804d27f41b0b02128bc1a7947 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*  Driver for the PPA3 parallel port SCSI HBA embedded in 
  * the Iomega ZIP drive
  * 
index 0b767a0bb308cedd1c8980b724e3cd74acf41087..17d5bc1cc56bf29c385b247e576781499cebdd0e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \
                qla_dbg.o qla_sup.o qla_attr.o qla_mid.o qla_dfs.o qla_bsg.o \
                qla_nx.o qla_mr.o qla_nx2.o qla_target.o qla_tmpl.o qla_nvme.o
index d6ea69df7c5cf584ae21ab4c210c05a0873f1422..ffb9694be748dda6e7a0f7c9e569cf132e5355fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define QLA_MODEL_NAMES                0x5C
 
 /*
index 1f59e7a74c7b7b9dc7db660e6114420bc90ce8b7..6b33a1f24f56169a3a17803e5a6952da2e6445a6 100644 (file)
@@ -180,7 +180,7 @@ static void qla_nvme_sp_done(void *ptr, int res)
                goto rel;
 
        if (unlikely(res == QLA_FUNCTION_FAILED))
-               fd->status = NVME_SC_FC_TRANSPORT_ERROR;
+               fd->status = NVME_SC_INTERNAL;
        else
                fd->status = 0;
 
index 5b2437a5ea440a5d3a6836115bcf444595d8f7ef..dce42a416876573087e497c9cf7242e267b04b4d 100644 (file)
@@ -3061,6 +3061,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
            host->max_cmd_len, host->max_channel, host->max_lun,
            host->transportt, sht->vendor_id);
 
+       INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn);
+
        /* Set up the irqs */
        ret = qla2x00_request_irqs(ha, rsp);
        if (ret)
@@ -3210,6 +3212,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
                ql_log(ql_log_fatal, base_vha, 0x00ed,
                    "Failed to start DPC thread.\n");
                ret = PTR_ERR(ha->dpc_thread);
+               ha->dpc_thread = NULL;
                goto probe_failed;
        }
        ql_dbg(ql_dbg_init, base_vha, 0x00ee,
@@ -3223,7 +3226,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
         */
        qla2xxx_wake_dpc(base_vha);
 
-       INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn);
        INIT_WORK(&ha->board_disable, qla2x00_disable_board_on_pci_error);
 
        if (IS_QLA8031(ha) || IS_MCTP_CAPABLE(ha)) {
index 071035dfa99ae8c07d7139ac587854de330bce20..7550ba2831c36a890f26312ef1404170c3766f78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <target/target_core_base.h>
 #include <linux/btree.h>
 
index f6b1216af79f30464effab44a3c7c832cc23af4a..a971db11d293c2291dd19b8c646ede294500d66c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* to be used by qlogicfas and qlogic_cs */
 #ifndef __QLOGICFAS408_H
 #define __QLOGICFAS408_H
index 892a0b058b997e2ffad02d913347aee0d4c9f542..884ad72ade57cd02e4de27ef22accec688addb0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* qlogicpti.h: Performance Technologies QlogicISP sbus card defines.
  *
  * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
index d5a55fae60e0370f46ed4f43a89a784a7f587a30..6dcc4c685d1d902c21aabb1c84b4eec81aadb730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  scsi.h Copyright (C) 1992 Drew Eckhardt 
  *         Copyright (C) 1993, 1994, 1995, 1998, 1999 Eric Youngdale
index a75673bb82b393191fd6cbbeedeecd2f15a3a4f0..40bc616cf8abbd40cf8b6c105ffe92ac18f40795 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCSI functions used by both the initiator and the target code.
  */
index 5e9755008aed40f054a394d06031dd351ec2dece..01f08c03f2c185dc3f7e1d423c3459da95fb6cbb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/seq_file.h>
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_dbg.h>
index 28fea83ae2fea7546d5cb2d969b649110f57c52e..6bf43d94cdc0cad83ffb5a3f4737ceab891483a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/blkdev.h>
 #include <linux/init.h>
index 38942050b2656bd104abb465a79b29c4e7039d43..dab876c6547392c0ccb75047c4cb767640407834 100644 (file)
@@ -580,7 +580,8 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
                if (sshdr.asc == 0x20 || /* Invalid command operation code */
                    sshdr.asc == 0x21 || /* Logical block address out of range */
                    sshdr.asc == 0x24 || /* Invalid field in cdb */
-                   sshdr.asc == 0x26) { /* Parameter value invalid */
+                   sshdr.asc == 0x26 || /* Parameter value invalid */
+                   sshdr.asc == 0x27) { /* Write protected */
                        set_host_byte(scmd, DID_TARGET_FAILURE);
                }
                return SUCCESS;
index 9cf6a80fe29754fc93d96d41edb090db2fdd67f4..ad3ea24f08859fb167e7297c2cacef81d646fb00 100644 (file)
@@ -1379,8 +1379,6 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
 
        ret = scsi_setup_cmnd(sdev, req);
 out:
-       if (ret != BLKPREP_OK)
-               cmd->flags &= ~SCMD_INITIALIZED;
        return scsi_prep_return(q, req, ret);
 }
 
@@ -1900,7 +1898,6 @@ static int scsi_mq_prep_fn(struct request *req)
        struct scsi_device *sdev = req->q->queuedata;
        struct Scsi_Host *shost = sdev->host;
        struct scatterlist *sg;
-       int ret;
 
        scsi_init_command(sdev, cmd);
 
@@ -1934,10 +1931,7 @@ static int scsi_mq_prep_fn(struct request *req)
 
        blk_mq_start_request(req);
 
-       ret = scsi_setup_cmnd(sdev, req);
-       if (ret != BLK_STS_OK)
-               cmd->flags &= ~SCMD_INITIALIZED;
-       return ret;
+       return scsi_setup_cmnd(sdev, req);
 }
 
 static void scsi_mq_done(struct scsi_cmnd *cmd)
index 2ac3f3975f785f86843bcade103446ddc28d722a..5723915275adbab7bd3adb92b2ed0fe5717683ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SCSI library functions depending on DMA
  */
index 7fe64a847143132be478030b4fdffd7dde5418ac..6907c924df72735da73f75e5de81998dd305eb1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_LOGGING_H
 #define _SCSI_LOGGING_H
 
index 5c6d016a5ae9b8f3dab21cb49789c7ef2255c047..d7669caa98936d3d2ebe6c4b22f47024fee145b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_PRIV_H
 #define _SCSI_PRIV_H
 
index 480a597b387755d7506fc75a10f77c9d295ed596..7f0ceb65c3f39dcc89ac21a10f36de6391b5bcee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/drivers/scsi/scsi_proc.c
  *
index e659912498bdfc89bd508b7cf19c82c74c23edec..82fd548c5eee23da61a6d6968139d5d4fa9f82f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SAS_INTERNAL_H
 #define _SCSI_SAS_INTERNAL_H
 
index e7818afeda2bea560101fe023983050d0b3086b2..40124648a07bd0201cabdda4dc4bbf75c336d9be 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * scsi_scan.c
  *
@@ -956,6 +957,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
        if (*bflags & BLIST_NO_DIF)
                sdev->no_dif = 1;
 
+       if (*bflags & BLIST_UNMAP_LIMIT_WS)
+               sdev->unmap_limit_for_ws = 1;
+
        sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
        if (*bflags & BLIST_TRY_VPD_PAGES)
index bf53356f41f0639e7c0e70393d91337a2bed2880..f796bd61f3f06505069ad4e21fed202003f9df1c 100644 (file)
@@ -1376,13 +1376,19 @@ static void __scsi_remove_target(struct scsi_target *starget)
        spin_lock_irqsave(shost->host_lock, flags);
  restart:
        list_for_each_entry(sdev, &shost->__devices, siblings) {
+               /*
+                * We cannot call scsi_device_get() here, as
+                * we might've been called from rmmod() causing
+                * scsi_device_get() to fail the module_is_live()
+                * check.
+                */
                if (sdev->channel != starget->channel ||
                    sdev->id != starget->id ||
-                   scsi_device_get(sdev))
+                   !get_device(&sdev->sdev_gendev))
                        continue;
                spin_unlock_irqrestore(shost->host_lock, flags);
                scsi_remove_device(sdev);
-               scsi_device_put(sdev);
+               put_device(&sdev->sdev_gendev);
                spin_lock_irqsave(shost->host_lock, flags);
                goto restart;
        }
index 934f0e62bb5c62946e6e7d9c6024c03bc4f41400..f917766537c08b89e09dada58f33d8520e63386d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_TRANSPORT_API_H
 #define _SCSI_TRANSPORT_API_H
 
index 3c6bc0081fcbe34afcfc5c398a5637a2d31ae3ab..8c46a6d536af26a9e083bcf0a614a3eedd5374e6 100644 (file)
@@ -2739,7 +2739,8 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
 
        list_for_each_entry(rport, &fc_host->rports, peers) {
 
-               if ((rport->port_state == FC_PORTSTATE_BLOCKED) &&
+               if ((rport->port_state == FC_PORTSTATE_BLOCKED ||
+                    rport->port_state == FC_PORTSTATE_NOTPRESENT) &&
                        (rport->channel == channel)) {
 
                        switch (fc_host->tgtid_bind_type) {
@@ -2876,7 +2877,6 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
                        memcpy(&rport->port_name, &ids->port_name,
                                sizeof(rport->port_name));
                        rport->port_id = ids->port_id;
-                       rport->roles = ids->roles;
                        rport->port_state = FC_PORTSTATE_ONLINE;
                        rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT;
 
@@ -2885,15 +2885,7 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
                                                fci->f->dd_fcrport_size);
                        spin_unlock_irqrestore(shost->host_lock, flags);
 
-                       if (ids->roles & FC_PORT_ROLE_FCP_TARGET) {
-                               scsi_target_unblock(&rport->dev, SDEV_RUNNING);
-
-                               /* initiate a scan of the target */
-                               spin_lock_irqsave(shost->host_lock, flags);
-                               rport->flags |= FC_RPORT_SCAN_PENDING;
-                               scsi_queue_work(shost, &rport->scan_work);
-                               spin_unlock_irqrestore(shost->host_lock, flags);
-                       }
+                       fc_remote_port_rolechg(rport, ids->roles);
                        return rport;
                }
        }
@@ -3328,6 +3320,9 @@ int fc_block_scsi_eh(struct scsi_cmnd *cmnd)
 {
        struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
 
+       if (WARN_ON_ONCE(!rport))
+               return FAST_IO_FAIL;
+
        return fc_block_rport(rport);
 }
 EXPORT_SYMBOL(fc_block_scsi_eh);
@@ -3571,7 +3566,7 @@ fc_vport_sched_delete(struct work_struct *work)
 static enum blk_eh_timer_return
 fc_bsg_job_timeout(struct request *req)
 {
-       struct bsg_job *job = (void *) req->special;
+       struct bsg_job *job = blk_mq_rq_to_pdu(req);
        struct Scsi_Host *shost = fc_bsg_to_shost(job);
        struct fc_rport *rport = fc_bsg_to_rport(job);
        struct fc_internal *i = to_fc_internal(shost->transportt);
index 8934f19bce8ea815d696189e7bb075c43cffaa5c..7404d26895f5b7de916f65e86c549790cf444d96 100644 (file)
@@ -2210,22 +2210,6 @@ void iscsi_free_session(struct iscsi_cls_session *session)
 }
 EXPORT_SYMBOL_GPL(iscsi_free_session);
 
-/**
- * iscsi_destroy_session - destroy iscsi session
- * @session: iscsi_session
- *
- * Can be called by a LLD or iscsi_transport. There must not be
- * any running connections.
- */
-int iscsi_destroy_session(struct iscsi_cls_session *session)
-{
-       iscsi_remove_session(session);
-       ISCSI_DBG_TRANS_SESSION(session, "Completing session destruction\n");
-       iscsi_free_session(session);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(iscsi_destroy_session);
-
 /**
  * iscsi_create_conn - create iscsi class connection
  * @session: iscsi cls session
@@ -3689,7 +3673,7 @@ iscsi_if_rx(struct sk_buff *skb)
                uint32_t group;
 
                nlh = nlmsg_hdr(skb);
-               if (nlh->nlmsg_len < sizeof(*nlh) ||
+               if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
                    skb->len < nlh->nlmsg_len) {
                        break;
                }
index 31273468589c6bcebb154238c812ed5bb1517d8f..e969138051c7fc47eadbae68d1690a5d3c8abbfa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * scsicam.c - SCSI CAM support functions, use for HDIO_GETGEO, etc.
  *
index 11c1738c21000862718ec4f60a663409a11c0b6a..d175c5c5ccf87eba361aa1bad5d84b56ce64d5b0 100644 (file)
@@ -715,13 +715,21 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode)
                break;
 
        case SD_LBP_WS16:
-               max_blocks = min_not_zero(sdkp->max_ws_blocks,
-                                         (u32)SD_MAX_WS16_BLOCKS);
+               if (sdkp->device->unmap_limit_for_ws)
+                       max_blocks = sdkp->max_unmap_blocks;
+               else
+                       max_blocks = sdkp->max_ws_blocks;
+
+               max_blocks = min_not_zero(max_blocks, (u32)SD_MAX_WS16_BLOCKS);
                break;
 
        case SD_LBP_WS10:
-               max_blocks = min_not_zero(sdkp->max_ws_blocks,
-                                         (u32)SD_MAX_WS10_BLOCKS);
+               if (sdkp->device->unmap_limit_for_ws)
+                       max_blocks = sdkp->max_unmap_blocks;
+               else
+                       max_blocks = sdkp->max_ws_blocks;
+
+               max_blocks = min_not_zero(max_blocks, (u32)SD_MAX_WS10_BLOCKS);
                break;
 
        case SD_LBP_ZERO:
@@ -2915,8 +2923,6 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
                                sd_config_discard(sdkp, SD_LBP_WS16);
                        else if (sdkp->lbpws10)
                                sd_config_discard(sdkp, SD_LBP_WS10);
-                       else if (sdkp->lbpu && sdkp->max_unmap_blocks)
-                               sd_config_discard(sdkp, SD_LBP_UNMAP);
                        else
                                sd_config_discard(sdkp, SD_LBP_DISABLE);
                }
@@ -3101,8 +3107,6 @@ static int sd_revalidate_disk(struct gendisk *disk)
                sd_read_security(sdkp, buffer);
        }
 
-       sdkp->first_scan = 0;
-
        /*
         * We now have all cache related info, determine how we deal
         * with flush requests.
@@ -3117,7 +3121,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
        q->limits.max_dev_sectors = logical_to_sectors(sdp, dev_max);
 
        /*
-        * Use the device's preferred I/O size for reads and writes
+        * Determine the device's preferred I/O size for reads and writes
         * unless the reported value is unreasonably small, large, or
         * garbage.
         */
@@ -3131,8 +3135,19 @@ static int sd_revalidate_disk(struct gendisk *disk)
                rw_max = min_not_zero(logical_to_sectors(sdp, dev_max),
                                      (sector_t)BLK_DEF_MAX_SECTORS);
 
-       /* Combine with controller limits */
-       q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
+       /* Do not exceed controller limit */
+       rw_max = min(rw_max, queue_max_hw_sectors(q));
+
+       /*
+        * Only update max_sectors if previously unset or if the current value
+        * exceeds the capabilities of the hardware.
+        */
+       if (sdkp->first_scan ||
+           q->limits.max_sectors > q->limits.max_dev_sectors ||
+           q->limits.max_sectors > q->limits.max_hw_sectors)
+               q->limits.max_sectors = rw_max;
+
+       sdkp->first_scan = 0;
 
        set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
        sd_config_write_same(sdkp);
index 99c4dde9b6bf83fc2c00d0a8797f38ccaac57542..320de758323eac6cb40bbf7275e6a7c60fb6fefc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_DISK_H
 #define _SCSI_DISK_H
 
index e4e1dccd1f2f344b4a4b47b2bdb19f5c4303871b..201a536688de97e74c66636e41f9ae7382c32e6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The canonical list of T10 Additional Sense Codes is available at:
  * http://www.t10.org/lists/asc-num.txt [most recent: 20141221]
index cf0e71db9e5146068294ab46fb1db1fa69addbc9..aa28874e8fb92f5090d64c9ceb9523fce224eabe 100644 (file)
@@ -828,6 +828,39 @@ static int max_sectors_bytes(struct request_queue *q)
        return max_sectors << 9;
 }
 
+static void
+sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo)
+{
+       Sg_request *srp;
+       int val;
+       unsigned int ms;
+
+       val = 0;
+       list_for_each_entry(srp, &sfp->rq_list, entry) {
+               if (val >= SG_MAX_QUEUE)
+                       break;
+               rinfo[val].req_state = srp->done + 1;
+               rinfo[val].problem =
+                       srp->header.masked_status &
+                       srp->header.host_status &
+                       srp->header.driver_status;
+               if (srp->done)
+                       rinfo[val].duration =
+                               srp->header.duration;
+               else {
+                       ms = jiffies_to_msecs(jiffies);
+                       rinfo[val].duration =
+                               (ms > srp->header.duration) ?
+                               (ms - srp->header.duration) : 0;
+               }
+               rinfo[val].orphan = srp->orphan;
+               rinfo[val].sg_io_owned = srp->sg_io_owned;
+               rinfo[val].pack_id = srp->header.pack_id;
+               rinfo[val].usr_ptr = srp->header.usr_ptr;
+               val++;
+       }
+}
+
 static long
 sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
 {
@@ -1012,38 +1045,13 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
                        return -EFAULT;
                else {
                        sg_req_info_t *rinfo;
-                       unsigned int ms;
 
-                       rinfo = kmalloc(SZ_SG_REQ_INFO * SG_MAX_QUEUE,
-                                                               GFP_KERNEL);
+                       rinfo = kzalloc(SZ_SG_REQ_INFO * SG_MAX_QUEUE,
+                                       GFP_KERNEL);
                        if (!rinfo)
                                return -ENOMEM;
                        read_lock_irqsave(&sfp->rq_list_lock, iflags);
-                       val = 0;
-                       list_for_each_entry(srp, &sfp->rq_list, entry) {
-                               if (val >= SG_MAX_QUEUE)
-                                       break;
-                               memset(&rinfo[val], 0, SZ_SG_REQ_INFO);
-                               rinfo[val].req_state = srp->done + 1;
-                               rinfo[val].problem =
-                                       srp->header.masked_status &
-                                       srp->header.host_status &
-                                       srp->header.driver_status;
-                               if (srp->done)
-                                       rinfo[val].duration =
-                                               srp->header.duration;
-                               else {
-                                       ms = jiffies_to_msecs(jiffies);
-                                       rinfo[val].duration =
-                                               (ms > srp->header.duration) ?
-                                               (ms - srp->header.duration) : 0;
-                               }
-                               rinfo[val].orphan = srp->orphan;
-                               rinfo[val].sg_io_owned = srp->sg_io_owned;
-                               rinfo[val].pack_id = srp->header.pack_id;
-                               rinfo[val].usr_ptr = srp->header.usr_ptr;
-                               val++;
-                       }
+                       sg_fill_request_table(sfp, rinfo);
                        read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
                        result = __copy_to_user(p, rinfo,
                                                SZ_SG_REQ_INFO * SG_MAX_QUEUE);
index ef7c0dd47f4081ed9345fcfa9abb0a9e597bd778..41546e3cb701abc35540f4412cd7bdfcfa367d86 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SCSI_SNIC) += snic.o
 
 snic-y := \
index 1de33719ad8ef32c7042e2e59fd3c310973f7896..a2bb7b8bace5b72b9564cc8d07f1a389db483f5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *      sr.h by David Giller
  *      CD-ROM disk driver header file
index 4610c8c5693fd44ec3ea74d18b27af47354d4bc9..2a21f2d4859229693381e955f141beff3fa64fea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
index 11a238cb22223b8f2877fa6080c860be9ff9423d..e3b0ce25162baa10ff1447f5f488376720f4249e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* -*-linux-c-*-
 
  * vendor-specific code for SCSI CD-ROM's goes here.
index 8c732c8de0153eb1b1da0402136c7ba568ec2fb7..95d2e7a7988dea6101ac62d4dd312a3b97810ed7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _ST_H
 #define _ST_H
index d2f947935554ef4ccfda1816c68e9cca4ecc08bd..2b6cabd7b6aa4f14be912feb359cd58bf8ea3489 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
    The compile-time configurable defaults for the Linux SCSI tape driver.
 
index 6e77cb0bfee914ae02190de030e87a2aa7cc70bf..9310c6c830417ea7cf49c3b756ce469950ab9bf1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # UFSHCD makefile
 obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-g210-pci.o ufshcd-dwc.o tc-dwc-g210.o
 obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-g210-pltfrm.o ufshcd-dwc.o tc-dwc-g210.o
index 9c6dd45f95f56f26fb83b6a18a023fa73aaaa009..0455b1633ca72b5d05d260c97a209b23266f87f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _WD719X_H_
 #define _WD719X_H_
 
index 114203f32843216fcddae75fd225ea9b11284417..c53262835e85e2ea744f290973e3cb2a4ad513fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the SuperH specific drivers.
 #
index 6ce7f0d26dcf0ec914b433cec73cf0c2337fb1e8..fa73c173b56a60ffc34434c7f7fb54ae46374552 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/sh_intc.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
index 2fcaff8645846ca19202306ecc91f5b37c1bf441..36dec140ea0ded1ff76234d7c53e1da6ab0c8060 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Kernel SOC specific device drivers.
 #
index 95d77ec5c5d7b8625b034d55d88e15b85cf8d077..5abb08ffb74dca2ddc1399f0caaedf967bf34b65 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Marvell Dove PMU support
  */
index 7ae199f1664eef3a0758ca11df8a06b32c391b8c..363982b83ab5ccf21a2fe5bf8e3dfb47d2333033 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FSL_DPAA)                          += bman_ccsr.o qman_ccsr.o \
                                                   bman_portal.o qman_portal.o \
                                                   bman.o qman.o
index 2031d385bc7eaf4a7e4a4e9625138aa09be5a930..55a555304f3a540da6abb31607aca6addb853f5f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ppc-specific parts of QE
 #
index f151de41eb936344362bc371a56bbe2500563c57..fab44666b214eecbf4395677391de914efd6da29 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_QCOM_GLINK_SSR) +=        glink_ssr.o
 obj-$(CONFIG_QCOM_GSBI)        +=      qcom_gsbi.o
 obj-$(CONFIG_QCOM_MDT_LOADER)  += mdt_loader.o
index 6b6e7f16104c8dbbf8f489db35c780afe7e9aa9b..763c03d80436caecac912ccc0105acf94811f32d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Generic, must be first because of soc_device_register()
 obj-$(CONFIG_SOC_RENESAS)      += renesas-soc.o
 
index 0e52b45721ac028df536fbd44cee645fe9a7385d..482e108d28aaad0d8cf3b3545bfb8ee6ea96588a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += fuse/
 
 obj-y += common.o
index 21bc275801784b73e009fed36ca6e24ff02b1e57..ea8332cc39805e41e51282ed943be0afde083c32 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y                                  += fuse-tegra.o
 obj-y                                  += fuse-tegra30.o
 obj-y                                  += tegra-apbmisc.o
index 7d572736c86ec8507f1d80d45479d99001446202..8e205287f120a5675c0734539fb85d72df694211 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # TI Keystone SOC drivers
 #
index a3ae2b70cdc3d9ad95e8a5c705a85647215482bf..8e0cda73b324850fc6ab10971f2b9bc420929af3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for kernel SPI drivers.
 #
index 6c7d7a460689917d577973f7bb47a1e408470210..568e1c65aa82cb77a92b7df5ff066513c3d959a8 100644 (file)
 /* A3700_SPI_IF_TIME_REG */
 #define A3700_SPI_CLK_CAPT_EDGE                BIT(7)
 
-/* Flags and macros for struct a3700_spi */
-#define A3700_INSTR_CNT                        1
-#define A3700_ADDR_CNT                 3
-#define A3700_DUMMY_CNT                        1
-
 struct a3700_spi {
        struct spi_master *master;
        void __iomem *base;
@@ -117,9 +112,6 @@ struct a3700_spi {
        u8 byte_len;
        u32 wait_mask;
        struct completion done;
-       u32 addr_cnt;
-       u32 instr_cnt;
-       size_t hdr_cnt;
 };
 
 static u32 spireg_read(struct a3700_spi *a3700_spi, u32 offset)
@@ -161,7 +153,7 @@ static void a3700_spi_deactivate_cs(struct a3700_spi *a3700_spi,
 }
 
 static int a3700_spi_pin_mode_set(struct a3700_spi *a3700_spi,
-                                 unsigned int pin_mode)
+                                 unsigned int pin_mode, bool receiving)
 {
        u32 val;
 
@@ -177,6 +169,9 @@ static int a3700_spi_pin_mode_set(struct a3700_spi *a3700_spi,
                break;
        case SPI_NBITS_QUAD:
                val |= A3700_SPI_DATA_PIN1;
+               /* RX during address reception uses 4-pin */
+               if (receiving)
+                       val |= A3700_SPI_ADDR_PIN;
                break;
        default:
                dev_err(&a3700_spi->master->dev, "wrong pin mode %u", pin_mode);
@@ -392,7 +387,8 @@ static bool a3700_spi_wait_completion(struct spi_device *spi)
 
        spireg_write(a3700_spi, A3700_SPI_INT_MASK_REG, 0);
 
-       return true;
+       /* Timeout was reached */
+       return false;
 }
 
 static bool a3700_spi_transfer_wait(struct spi_device *spi,
@@ -446,59 +442,43 @@ static void a3700_spi_set_cs(struct spi_device *spi, bool enable)
 
 static void a3700_spi_header_set(struct a3700_spi *a3700_spi)
 {
-       u32 instr_cnt = 0, addr_cnt = 0, dummy_cnt = 0;
+       unsigned int addr_cnt;
        u32 val = 0;
 
        /* Clear the header registers */
        spireg_write(a3700_spi, A3700_SPI_IF_INST_REG, 0);
        spireg_write(a3700_spi, A3700_SPI_IF_ADDR_REG, 0);
        spireg_write(a3700_spi, A3700_SPI_IF_RMODE_REG, 0);
+       spireg_write(a3700_spi, A3700_SPI_IF_HDR_CNT_REG, 0);
 
        /* Set header counters */
        if (a3700_spi->tx_buf) {
-               if (a3700_spi->buf_len <= a3700_spi->instr_cnt) {
-                       instr_cnt = a3700_spi->buf_len;
-               } else if (a3700_spi->buf_len <= (a3700_spi->instr_cnt +
-                                                 a3700_spi->addr_cnt)) {
-                       instr_cnt = a3700_spi->instr_cnt;
-                       addr_cnt = a3700_spi->buf_len - instr_cnt;
-               } else if (a3700_spi->buf_len <= a3700_spi->hdr_cnt) {
-                       instr_cnt = a3700_spi->instr_cnt;
-                       addr_cnt = a3700_spi->addr_cnt;
-                       /* Need to handle the normal write case with 1 byte
-                        * data
-                        */
-                       if (!a3700_spi->tx_buf[instr_cnt + addr_cnt])
-                               dummy_cnt = a3700_spi->buf_len - instr_cnt -
-                                           addr_cnt;
+               /*
+                * when tx data is not 4 bytes aligned, there will be unexpected
+                * bytes out of SPI output register, since it always shifts out
+                * as whole 4 bytes. This might cause incorrect transaction with
+                * some devices. To avoid that, use SPI header count feature to
+                * transfer up to 3 bytes of data first, and then make the rest
+                * of data 4-byte aligned.
+                */
+               addr_cnt = a3700_spi->buf_len % 4;
+               if (addr_cnt) {
+                       val = (addr_cnt & A3700_SPI_ADDR_CNT_MASK)
+                               << A3700_SPI_ADDR_CNT_BIT;
+                       spireg_write(a3700_spi, A3700_SPI_IF_HDR_CNT_REG, val);
+
+                       /* Update the buffer length to be transferred */
+                       a3700_spi->buf_len -= addr_cnt;
+
+                       /* transfer 1~3 bytes through address count */
+                       val = 0;
+                       while (addr_cnt--) {
+                               val = (val << 8) | a3700_spi->tx_buf[0];
+                               a3700_spi->tx_buf++;
+                       }
+                       spireg_write(a3700_spi, A3700_SPI_IF_ADDR_REG, val);
                }
-               val |= ((instr_cnt & A3700_SPI_INSTR_CNT_MASK)
-                       << A3700_SPI_INSTR_CNT_BIT);
-               val |= ((addr_cnt & A3700_SPI_ADDR_CNT_MASK)
-                       << A3700_SPI_ADDR_CNT_BIT);
-               val |= ((dummy_cnt & A3700_SPI_DUMMY_CNT_MASK)
-                       << A3700_SPI_DUMMY_CNT_BIT);
        }
-       spireg_write(a3700_spi, A3700_SPI_IF_HDR_CNT_REG, val);
-
-       /* Update the buffer length to be transferred */
-       a3700_spi->buf_len -= (instr_cnt + addr_cnt + dummy_cnt);
-
-       /* Set Instruction */
-       val = 0;
-       while (instr_cnt--) {
-               val = (val << 8) | a3700_spi->tx_buf[0];
-               a3700_spi->tx_buf++;
-       }
-       spireg_write(a3700_spi, A3700_SPI_IF_INST_REG, val);
-
-       /* Set Address */
-       val = 0;
-       while (addr_cnt--) {
-               val = (val << 8) | a3700_spi->tx_buf[0];
-               a3700_spi->tx_buf++;
-       }
-       spireg_write(a3700_spi, A3700_SPI_IF_ADDR_REG, val);
 }
 
 static int a3700_is_wfifo_full(struct a3700_spi *a3700_spi)
@@ -512,35 +492,12 @@ static int a3700_is_wfifo_full(struct a3700_spi *a3700_spi)
 static int a3700_spi_fifo_write(struct a3700_spi *a3700_spi)
 {
        u32 val;
-       int i = 0;
 
        while (!a3700_is_wfifo_full(a3700_spi) && a3700_spi->buf_len) {
-               val = 0;
-               if (a3700_spi->buf_len >= 4) {
-                       val = cpu_to_le32(*(u32 *)a3700_spi->tx_buf);
-                       spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
-
-                       a3700_spi->buf_len -= 4;
-                       a3700_spi->tx_buf += 4;
-               } else {
-                       /*
-                        * If the remained buffer length is less than 4-bytes,
-                        * we should pad the write buffer with all ones. So that
-                        * it avoids overwrite the unexpected bytes following
-                        * the last one.
-                        */
-                       val = GENMASK(31, 0);
-                       while (a3700_spi->buf_len) {
-                               val &= ~(0xff << (8 * i));
-                               val |= *a3700_spi->tx_buf++ << (8 * i);
-                               i++;
-                               a3700_spi->buf_len--;
-
-                               spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG,
-                                            val);
-                       }
-                       break;
-               }
+               val = cpu_to_le32(*(u32 *)a3700_spi->tx_buf);
+               spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
+               a3700_spi->buf_len -= 4;
+               a3700_spi->tx_buf += 4;
        }
 
        return 0;
@@ -645,15 +602,18 @@ static int a3700_spi_transfer_one(struct spi_master *master,
        a3700_spi->rx_buf  = xfer->rx_buf;
        a3700_spi->buf_len = xfer->len;
 
-       /* SPI transfer headers */
-       a3700_spi_header_set(a3700_spi);
-
        if (xfer->tx_buf)
                nbits = xfer->tx_nbits;
        else if (xfer->rx_buf)
                nbits = xfer->rx_nbits;
 
-       a3700_spi_pin_mode_set(a3700_spi, nbits);
+       a3700_spi_pin_mode_set(a3700_spi, nbits, xfer->rx_buf ? true : false);
+
+       /* Flush the FIFOs */
+       a3700_spi_fifo_flush(a3700_spi);
+
+       /* Transfer first bytes of data when buffer is not 4-byte aligned */
+       a3700_spi_header_set(a3700_spi);
 
        if (xfer->rx_buf) {
                /* Set read data length */
@@ -733,16 +693,11 @@ static int a3700_spi_transfer_one(struct spi_master *master,
                                dev_err(&spi->dev, "wait wfifo empty timed out\n");
                                return -ETIMEDOUT;
                        }
-               } else {
-                       /*
-                        * If the instruction in SPI_INSTR does not require data
-                        * to be written to the SPI device, wait until SPI_RDY
-                        * is 1 for the SPI interface to be in idle.
-                        */
-                       if (!a3700_spi_transfer_wait(spi, A3700_SPI_XFER_RDY)) {
-                               dev_err(&spi->dev, "wait xfer ready timed out\n");
-                               return -ETIMEDOUT;
-                       }
+               }
+
+               if (!a3700_spi_transfer_wait(spi, A3700_SPI_XFER_RDY)) {
+                       dev_err(&spi->dev, "wait xfer ready timed out\n");
+                       return -ETIMEDOUT;
                }
 
                val = spireg_read(a3700_spi, A3700_SPI_IF_CFG_REG);
@@ -834,10 +789,6 @@ static int a3700_spi_probe(struct platform_device *pdev)
        memset(spi, 0, sizeof(struct a3700_spi));
 
        spi->master = master;
-       spi->instr_cnt = A3700_INSTR_CNT;
-       spi->addr_cnt = A3700_ADDR_CNT;
-       spi->hdr_cnt = A3700_INSTR_CNT + A3700_ADDR_CNT +
-                      A3700_DUMMY_CNT;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        spi->base = devm_ioremap_resource(dev, res);
index 6ef6c44f39f5f7e591710029814ca03128455299..a172ab299e80316ee904a1c9277a36755699e4d4 100644 (file)
@@ -1250,7 +1250,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
                        goto qspi_probe_err;
                }
        } else {
-               goto qspi_probe_err;
+               goto qspi_resource_err;
        }
 
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "bspi");
@@ -1272,7 +1272,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
                qspi->base[CHIP_SELECT]  = devm_ioremap_resource(dev, res);
                if (IS_ERR(qspi->base[CHIP_SELECT])) {
                        ret = PTR_ERR(qspi->base[CHIP_SELECT]);
-                       goto qspi_probe_err;
+                       goto qspi_resource_err;
                }
        }
 
@@ -1280,7 +1280,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
                                GFP_KERNEL);
        if (!qspi->dev_ids) {
                ret = -ENOMEM;
-               goto qspi_probe_err;
+               goto qspi_resource_err;
        }
 
        for (val = 0; val < num_irqs; val++) {
@@ -1369,8 +1369,9 @@ qspi_reg_err:
        bcm_qspi_hw_uninit(qspi);
        clk_disable_unprepare(qspi->clk);
 qspi_probe_err:
-       spi_master_put(master);
        kfree(qspi->dev_ids);
+qspi_resource_err:
+       spi_master_put(master);
        return ret;
 }
 /* probe function to be called by SoC specific platform driver probe */
index 73575dfe6916d6e2cc3a57abb708336032ab671e..03e3442086ec779f9347102b80df138120e9fc1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SPI_BCM53XX_H
 #define SPI_BCM53XX_H
 
index 47bb9b898dfdc6ab18ae5fd10349f23882200e4f..ae61d72c7d281091270b59d6c897cb95158839d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Mix this utility code with some glue code to get one of several types of
  * simple SPI master driver.  Two do polled word-at-a-time I/O:
index 1f91d61b745b75a91dbb81ec1f3463bc6b932ce4..1f3ac463a20ba8eaa6d1c9b374b277f049a5edf2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPI_CAVIUM_H
 #define __SPI_CAVIUM_H
 
index da5eab62df3477dc4ceb66bed98457373bef3fe8..5c07cf8f19e00607c0f4d17f94c4a8d419658df1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DW_SPI_HEADER_H
 #define DW_SPI_HEADER_H
 
index 680cdf549506143d6041736f43552f868e3bf6db..ba9743fa2326d11689384e47c84da4068c9fc521 100644 (file)
@@ -263,8 +263,8 @@ static int stm32_spi_prepare_mbr(struct stm32_spi *spi, u32 speed_hz)
         * no need to check it there.
         * However, we need to ensure the following calculations.
         */
-       if ((div < SPI_MBR_DIV_MIN) &&
-           (div > SPI_MBR_DIV_MAX))
+       if (div < SPI_MBR_DIV_MIN ||
+           div > SPI_MBR_DIV_MAX)
                return -EINVAL;
 
        /* Determine the first power of 2 greater than or equal to div */
index 6e65524cbfd9b8f7e1ff21a4c304908531476f21..e8b5a5e21b2e692e8af31e93ee3102b0c26872d9 100644 (file)
@@ -45,7 +45,6 @@
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/spi.h>
-#define SPI_DYN_FIRST_BUS_NUM 0
 
 static DEFINE_IDR(spi_master_idr);
 
@@ -2086,7 +2085,7 @@ int spi_register_controller(struct spi_controller *ctlr)
        struct device           *dev = ctlr->dev.parent;
        struct boardinfo        *bi;
        int                     status = -ENODEV;
-       int                     id;
+       int                     id, first_dynamic;
 
        if (!dev)
                return -ENODEV;
@@ -2116,9 +2115,15 @@ int spi_register_controller(struct spi_controller *ctlr)
                }
        }
        if (ctlr->bus_num < 0) {
+               first_dynamic = of_alias_get_highest_id("spi");
+               if (first_dynamic < 0)
+                       first_dynamic = 0;
+               else
+                       first_dynamic++;
+
                mutex_lock(&board_lock);
-               id = idr_alloc(&spi_master_idr, ctlr, SPI_DYN_FIRST_BUS_NUM, 0,
-                              GFP_KERNEL);
+               id = idr_alloc(&spi_master_idr, ctlr, first_dynamic,
+                              0, GFP_KERNEL);
                mutex_unlock(&board_lock);
                if (WARN(id < 0, "couldn't get idr"))
                        return id;
index 64a09681cee0f1a1fe8aea4c1ce963dd60590d9f..142d33df040f2871b203f219f4a7b1348510f540 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # core
 ssb-y                                  += main.o scan.o
 ssb-$(CONFIG_SSB_EMBEDDED)             += embedded.o
index c2f5d3969c8b0ffa4ec2ea8a99bd18311d14b2ec..ef9ac8efcab492ab811a9e0c7e2c13b3ef8b0098 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_PRIVATE_H_
 #define LINUX_SSB_PRIVATE_H_
 
index 8951c37d8d802311f9cd2a276f44c38f88861011..6e536020029a213fd7ea912f1a5e47de64551575 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for staging directory
 
 obj-y                          += media/
index eb7eeed6ae409be2965977b79339ff21de3160ba..bb30bf8774a07c148c2840d5b64549d233c84a8d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_ION) +=   ion.o ion-ioctl.o ion_heap.o
 obj-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
 obj-$(CONFIG_ION_CARVEOUT_HEAP) += ion_carveout_heap.o
index 42ed125132201327eec54521c68a5d4ecdda7bcf..5609daf4d8695f0294fc44a3d7da2b614acc34c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BOARD_H__
 #define __BOARD_H__
 
index 05a6d434d307fe0fbf43069028ab6d79a4699e4d..d449a837414e6934ae2d590de936e34773f78159 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Staging board support for KZM9D. Enable not-yet-DT-capable devices here. */
 
 #include <linux/kernel.h>
index 7f9dfb3923abd68a5f500f0503c1a8f59078a657..6af5da3b4315a09e8beb28ed69dcee256e221d75 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_COMEDI_DEBUG)         := -DDEBUG
 
 comedi-y                               := comedi_fops.o range.o drivers.o \
index 6246f4a78ca6c6ea81b8efaa4779485669f4f498..515f293a5d2670a269f3c68cf62388abf9a36671 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _COMEDI_INTERNAL_H
 #define _COMEDI_INTERNAL_H
 
index 0c8cfa738727ee052307bfaceae12a4892882914..736e7e55219dd2ffe1fba76fc35db311a346b4c0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for individual comedi drivers
 #
 ccflags-$(CONFIG_COMEDI_DEBUG)         := -DDEBUG
index db6d5a4e88890bbae007cd943d9b87ee52ffc2b8..2b44d3a04484a5f3cc807af28b2e76cc4374d351 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ADDI_TCW_H
 #define _ADDI_TCW_H
 
index b049cfba98139913cc8a06c7752b5cfee40ee95d..7523084a0742269a698da41aa7f7819c0b2782af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ADDI_WATCHDOG_H
 #define _ADDI_WATCHDOG_H
 
index f03e4c8c20219d7cf219457b8f5fdcc9f126f028..f738b91b2052a27668d1f4dbb2aa0b48b390c935 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Stuff for AMCC S5933 PCI Controller
  *
index 28ff0c2aa3b856e0e8af57923d82121436d53b50..acd4e5456cebff1fa0367658ea0a0ebc2c958801 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Helper types to take care of the fact that the DSP card memory
  * is 16 bits, but aligned on a 32 bit PCI boundary
index e93f79050e605d116db24b0f51db0093548cb151..f06f9353cb6cc37038b2d649d877e7b184816aec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ni_labpc ISA DMA support.
  */
index 6003e9d5fe379a7d1272288bfb68d8f3f290b21b..ace40065a25ba3d54e14be7e4057fbcdec89a46b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ni_labpc register definitions.
  */
index 47eadbf4dcc03f7ee49f6b70ea6542ef3205955e..3ef5f9e79b89d9c24b6264f72891b19bc6cba106 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Z8536 CIO Internal registers
  */
index e07ff8d2f972c5a3000db2714416c44fb62ce611..620f5741a1ed7e4c4938ed35cbd42538203cb1a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/tty.h>
 #include <linux/sched/signal.h>
 #include "dgnc_utils.h"
index d1f07a5735c678284e0262a61b01ff43374edaf3..b30527f0889d735e8cd50dd295eb93b2a21318eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DGNC_UTILS_H
 #define _DGNC_UTILS_H
 
index 05ae9fbf906e54091a0dcbd71ccab3495ec0a0c5..6bc03311c9c7e63d929dc5a287f9c7bee89d2737 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Core module
 obj-$(CONFIG_FB_TFT)             += fbtft.o
 fbtft-y                          += fbtft-core.o fbtft-sysfs.o fbtft-bus.o fbtft-io.o
index a80b5d115ff846f441bf7ae16854726e38b8f8ca..2a8eef15c439f6c891b0a3910e2c63e05cd40f5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/errno.h>
 #include <linux/gpio.h>
index ffb9a3b4d45433f753e1b1de1b4fc74a245e5703..f4a591919f6210eeb60c014897ae072ab08a2759 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/errno.h>
 #include <linux/gpio.h>
index 5bfd67b526b57d6188fe41b86d352e3544deee6d..712096659aa039bf53bfc18a2aca03b5727a9567 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "fbtft.h"
 #include "internal.h"
 
index 30b2481fe32b6cf25cf6af8aadf323c3c37da75b..1d15f183e0fad820ef8e6379ee94dfb1ad3ea7d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FIREWIRE_FWSERIAL_H
 #define _FIREWIRE_FWSERIAL_H
 
index ba7f11a6a097daf452d57b8b3973089b0854f98b..e61b95788c9fca0f925af2363701db2e08b32c57 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_LTE_GDM724X) := gdmulte.o
 gdmulte-y += gdm_lte.o netlink_k.o
 gdmulte-y += gdm_usb.o gdm_endian.o
index 23e1cb7bff8e3fab9852b67a3e3ece924a722afa..2551ed16b7423b1d1706fc3a2aeefc4fb0b9fe41 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Greybus core
 greybus-y :=   core.o          \
                debugfs.o       \
index 4bb1fc1b811de42a1d1d8314b0393f30665cf5d1..f4c8440093e45eccd6abb81d70554aa49d7098e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* FIXME
  * move this to include/linux/mod_devicetable.h when merging
  */
index 852b12b711495f394a7312da00288c28071fcd98..ad0ae8053b798608991d23bf8656f148a09d318e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifeq ($(strip $(V)), 1)
   Q =
 else
index 0cfd05d5bf49d1ad2f43d47c635a86016d6d2067..455bffc2964973b3fed2d271e382b67b22e8b8ac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the industrial I/O core.
 #
index bf18bdd7c99da59648d1c3673c6c10f43b46c11b..ebe83c1ad36295557dc83f503f38e6acfe79e4c4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for industrial I/O ADC drivers
 #
index d11c6de9c777f979a2a59b05cd82fc8ed0c54e0b..6150d2780e22c57479c95d59afaea1cbc2b385a5 100644 (file)
@@ -223,11 +223,9 @@ static int ad7192_setup(struct ad7192_state *st,
        struct iio_dev *indio_dev = spi_get_drvdata(st->sd.spi);
        unsigned long long scale_uv;
        int i, ret, id;
-       u8 ones[6];
 
        /* reset the serial interface */
-       memset(&ones, 0xFF, 6);
-       ret = spi_write(st->sd.spi, &ones, 6);
+       ret = ad_sd_reset(&st->sd, 48);
        if (ret < 0)
                goto out;
        usleep_range(500, 1000); /* Wait for at least 500us */
index de3863d6b07810dee1352c6a5012a55823b6d732..19e7982f556316e373ed0614a0107b991dc9f6fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for metering ic drivers
 #
index 1691760339da0f021db0d36e3c0d1e7dcef03323..02573c517d9d13cc8d95250e0de0f8623d381482 100644 (file)
@@ -172,7 +172,7 @@ static int ade7759_spi_read_reg_40(struct device *dev,
                                reg_address);
                goto error_ret;
        }
-       *val = ((u64)st->rx[1] << 32) | (st->rx[2] << 24) |
+       *val = ((u64)st->rx[1] << 32) | ((u64)st->rx[2] << 24) |
                (st->rx[3] << 16) | (st->rx[4] << 8) | st->rx[5];
 
 error_ret:
index dbd97def9cd80aaf9a2539f9925b54d015f939f6..c27247a7891a8709f1c23556d03cebce16cbbb38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ADE7854_H
 #define _ADE7854_H
 
index 0e37f23853f179460113b968cb334e77324c5bc6..edf26302fa57a658be6a319bc0ea98d1b1a5daad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _METER_H
 #define _METER_H
 
index c07321f8d94c219015ed6b5d80746b894c25c8c6..fb05a2a8397c8e401f541466a10cf575025ca779 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IIO_BFIN_TIMER_TRIGGER_H__
 #define __IIO_BFIN_TIMER_TRIGGER_H__
 
index ae03f7477324c2aae9c41f2b786aa2eb26e92a1a..dca2a142e834d5d6df9802ae821a5355d9b1fe6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef EAP_PACKET_H
 #define EAP_PACKET_H
 
index 215fa23827d1228167eafc36299ca53364c210f4..1607570ef8dea26747eeababa82e0e5f516601b9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index fd8585cd0ce2a4c99ecd25c836ad44fbe0d654ea..0a9d70924fe0006735142cd41c596b648d7831df 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index ef7adef4ccc5236acc57dee06536e500ef2aa8fe..519fd747e3ad578fbeced5c7c8582627d5fd4022 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index 80ee3920481aebd49a8e5dcbfc1a738642ef9d66..f9cf79761d51027f8fc3f790aca033cc4bdc02b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2012 Xyratex Technology Limited
  *
index 3abfb4eab3d3a134b47767b62d59c23187759054..1ebf0193f61a63631d6e9819ea9e0d79a5027822 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index fa0ad6548ecdc611d44126ce961c089d8d27bed2..e3fa9acff4c4238438cf02e8da4d33b23621e3d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index a518001cdfe88557188b69a6f56956f573bac718..1deb1971b39ee5bede8718a1061ec3ed5edfb773 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include
 subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include
 
index ac090c5fce3096f469e03b47ec416fab6038dab8..be732cf932fda5b6556000e2fc3704fad32999ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_I2C_BCM2048)      += bcm2048/
 obj-$(CONFIG_DVB_CXD2099)      += cxd2099/
 obj-$(CONFIG_VIDEO_IMX_MEDIA)  += imx/
index be13fab921753f3ad4abeb67e1571b835654daca..041a041718d2dc87e156728efdd7e33a239fef50 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for sensor drivers
 #
index b6578f09546ee32ec20f9c060434962396e0f64a..c1a85e6e27a90935ce8da144052b050a04c43eec 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIDEO_IMX) += imx1x5.o
 
 imx1x5-objs := imx.o drv201.o ad5816g.o dw9714.o dw9719.o dw9718.o vcm.o otp.o otp_imx.o otp_brcc064_e2prom.o otp_e2prom.o
index 558dcdf135d937827ccc4d144df96e5cdf2e2cd1..fb74f14cbe5a86019f86d464e9f7a91f28c1eeef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/delay.h>
index f995c2eeada469344b1c23bcdafc8dad72292e3e..e1396b00a0e1f776f42f3eda5e3d96c097119434 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AD5816G_H__
 #define __AD5816G_H__
 
index 7e525cef56ef6bf0abb07e65b7169c20bf903855..af2e3160df9580bfc0ffd858b44ab6e28b58c3c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __COMMON_H__
 #define __COMMON_H__
 
index 6d9d4c968722c92ef20d5d53472ae066da960e47..221e4875ac49829643600182bdaaf5358786da68 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/delay.h>
index 8fc0ad1166304d98e2bce7a82f449b3b2914fda7..2ef8aafdf6756d306207c91bf65da6dbc8e89e94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRV201_H__
 #define __DRV201_H__
 
index 6397a7ee0af6d5e0e2f57162441f4455fab30cbe..f968554543130bbd12831e965aa45d5db9df267c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/delay.h>
index 5a98a9c971823f5b6bdf963ac4c732d1083a586f..aee560026b56819e1286fca07639af8739b3d5e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DW9714_H__
 #define __DW9714_H__
 
index cf35197ed77fb68f8edf4bef0a17721c24605e0f..9026e8ba56791ce77c601f0d644c00c259a45b1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IMX134_H__
 #define __IMX134_H__
 
index 5f409ccedc85e249dadeda8b015d7c4f7302a911..5e082088cb3797006c9808fd932545dc8ff7b2ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IMX175_H__
 #define __IMX175_H__
 #include "common.h"
index 52df582c56d84898b1724760fbdb061879bc7280..bbd515bf72798fd64c01d654e80d492b91f58019 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IMX219_H__
 #define __IMX219_H__
 #include "common.h"
index 10e5b86f6687641f0aad18059bcdd72b989accd8..795fe017d01bb2ba635d4c89e742cda1a265ae77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IMX227_H__
 #define __IMX227_H__
 
index 4e3833aaec05fa5b3d9a0f83bb7ed4905b38584e..facb70e6a93ef5e956feb6578748e5060266332d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
 
 # HACK! While this driver is in bad shape, don't enable several warnings
index c5e22bba455a8a4a9137b9102367c780ad384b92..dc7104470f5c3078d5571fa0f6611f71f9fb17fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Access to message bus through three registers
  * in CUNIT(0:0:0) PCI configuration space.
index 2bd98f0667ec6fb08534681c20e14c7d4c6a9882..ac3805345f206d103175f3693482288af3cde777 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 atomisp-objs += \
        atomisp_drvfs.o \
        atomisp_file.o \
index cd452cc20fea8f96737b1b387a1e52efb49531d0..4631b1d39bb41beaf01fccdd9655a57304ee9323 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/pci.h>
 #include <linux/pm_qos.h>
index 3569625b63053532c923af4762f1cdab8a523815..698a4210316e613c944c1b5e42b05e9c19ec46f5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 imx-media-objs := imx-media-dev.o imx-media-internal-sd.o imx-media-of.o
 imx-media-common-objs := imx-media-utils.o imx-media-fim.o
 imx-media-ic-objs := imx-ic-common.o imx-ic-prp.o imx-ic-prpencvf.o
index d96f4512224ffb11fd13900422d6da1498ab8697..b55e5ebba8b4194df4392e259062e9b483be491d 100644 (file)
@@ -400,10 +400,10 @@ static int imx_media_create_pad_vdev_lists(struct imx_media_dev *imxmd)
                                        struct media_link, list);
                ret = imx_media_add_vdev_to_pad(imxmd, vdev, link->source);
                if (ret)
-                       break;
+                       return ret;
        }
 
-       return ret;
+       return 0;
 }
 
 /* async subdev complete notifier */
index 9ee981c7786b5ad59ca7de341d40e8a7db01cd33..f5bbb9deaab56f1c7119d531dacb7a7443357ff3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MOSTCORE) += mostcore/
 obj-$(CONFIG_AIM_CDEV) += aim-cdev/
 obj-$(CONFIG_AIM_NETWORK)      += aim-network/
index 13eaf16ecd16a26fcd94aeca0e522f54e4ebfd1b..87595c594b12091432f22f7135b1b61713002bda 100644 (file)
@@ -496,8 +496,12 @@ static int spinand_program_page(struct spi_device *spi_nand,
        if (!wbuf)
                return -ENOMEM;
 
-       enable_read_hw_ecc = 0;
-       spinand_read_page(spi_nand, page_id, 0, CACHE_BUF, wbuf);
+       enable_read_hw_ecc = 1;
+       retval = spinand_read_page(spi_nand, page_id, 0, CACHE_BUF, wbuf);
+       if (retval < 0) {
+               dev_err(&spi_nand->dev, "ecc error on read page!!!\n");
+               return retval;
+       }
 
        for (i = offset, j = 0; i < len; i++, j++)
                wbuf[i] &= buf[j];
index 0db0e1f43337c62bd017133dc02050f500acb217..f0cff8f9fdf6d45be40db657da0c7e8ceabc7751 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SERIO_NVEC_PS2)   += nvec_ps2.o
 obj-$(CONFIG_MFD_NVEC)         += nvec.o
 obj-$(CONFIG_NVEC_POWER)       += nvec_power.o
index 215e7ec4dea237b3c6452efe2f3b957fb99507ab..8fbde5d3b4a682b301f5c3c00bed28c255abb9d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef OLPC_DCON_H_
 #define OLPC_DCON_H_
 
index c4b1b218ea38f8d197b5393492e2f690158737f6..290b419aa9dd71358c479eacaa5fbffc662af7c2 100644 (file)
@@ -570,12 +570,6 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
                dev_dbg(&spi->dev, "set: DIO mapping");
        #endif
 
-       // check DIO number
-       if (DIONumber > 5) {
-               dev_dbg(&spi->dev, "set: illegal input param");
-               return -EINVAL;
-       }
-
        switch (DIONumber) {
        case 0: mask=MASK_DIO0; shift=SHIFT_DIO0; regaddr=REG_DIOMAPPING1; break;
        case 1: mask=MASK_DIO1; shift=SHIFT_DIO1; regaddr=REG_DIOMAPPING1; break;
@@ -583,6 +577,9 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
        case 3: mask=MASK_DIO3; shift=SHIFT_DIO3; regaddr=REG_DIOMAPPING1; break;
        case 4: mask=MASK_DIO4; shift=SHIFT_DIO4; regaddr=REG_DIOMAPPING2; break;
        case 5: mask=MASK_DIO5; shift=SHIFT_DIO5; regaddr=REG_DIOMAPPING2; break;
+       default:
+               dev_dbg(&spi->dev, "set: illegal input param");
+               return -EINVAL;
        }
 
        // read reg
index 27af86e05098faca6cbab94d6886ac30407d9e76..033fb2e6950def0b3ac79983ac4d034b8df5a9b6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 r8188eu-y :=                           \
                core/rtw_ap.o           \
                core/rtw_cmd.o          \
index 81bf4944ef44e7e083206625ad700b009f1d4c62..bbb981c6bcecd16eecae087605c601e9f5cad8e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*++
 Copyright (c) Realtek Semiconductor Corp. All rights reserved.
 
index 21996a1173ef51b6534cb0aa1e6daf6e25abb255..6722010ba1ec0f6ab17193d6f013c82a1863e003 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INC_RA_H
 #define __INC_RA_H
 /*++
index cd387e998574ebad7c5b6655ec51c5261f8f5821..e99ac3910787462dfcc795e956f376c47eb92e0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <odm.h>
 
 #define IQK_DELAY_TIME_88E         10
index 98a5551f5ae7bb7fd3e315c2dded16bfc355b68d..ed3241c020ad5544d112e41e702b94c6346f0d00 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define RF6052_MAX_TX_PWR      0x3F
 #define RF6052_MAX_REG         0x3F
 
index 7101fcc8871bba87dbf84a0dfbde4e19cf63eabf..6af519938868ed0273827b22809fa62d54db2c76 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 rtllib-objs :=                 \
        dot11d.o                \
        rtllib_module.o         \
index 176a4a2b8b209466383326fcf9f03c3591b9c3d2..75e6ec510555e57a6119cf6b3f5a3219ae1e0b83 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 r8192e_pci-objs :=             \
        r8192E_dev.o            \
        r8192E_phy.o            \
index 703c1505ea5f4249232092a74636d660abc181f2..3022728a364c5806979a8aebc2bb4de945252998 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 NIC_SELECT = RTL8192U
 
 ccflags-y := -std=gnu89
index 9e3f432e5355fca2826baf0dddbfe522df2ba1c6..0d4d6489f767afd14de45311c2c352717d8e3a54 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 NIC_SELECT = RTL8192U
 
 ccflags-y := -O2
index 00b6052fbbac581c3ee7cffb03583094e2c6f52b..64b13a5da3cb3283a0296fe3ce83d1bf30219beb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Implement 802.11d. */
 
 #include "dot11d.h"
index 8ae673b217d89e32c752451f63e03e41e1136900..88bc298305bd2ab9aee7cf538210bc8b6d80da60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INC_DOT11D_H
 #define __INC_DOT11D_H
 
index 7abedc27d7c1f460371415b7d6b0c2c536fc83b0..b6a76aae4832f7b5d615fbba04c43aee917c5d13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BATYPE_H_
 #define _BATYPE_H_
 
index 8aa38dcf0dfdfbbc07ed821b11a190e4445ef86e..4b92bb51c3e6f668a329b072e77887c0f9d0ffc1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /********************************************************************************************************************************
  * This file is created to process BA Action Frame. According to 802.11 spec, there are 3 BA action types at all. And as BA is
  * related to TS, this part need some structure defined in QOS side code. Also TX RX is going to be resturctured, so how to send
index 5f54d93dfb66f97e41875151f240983c3529f5e1..a85036022aa8d1916a260cce9916543af6251163 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RTL819XU_HTTYPE_H_
 #define _RTL819XU_HTTYPE_H_
 
index 9248dbcf3370a6ed3a4fcce50634450a58165448..bf7b7122d0423a588d789310d38fd56554b5aceb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 //As this function is mainly ported from Windows driver, so leave the name little changed. If any confusion caused, tell me. Created by WB. 2008.05.08
 #include "ieee80211.h"
index 49c23c720f78ce0cb2272a1979f877fef7de0885..71df9d9e2e99193bd23e9c8ae7e9bb93c137ed3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INC_QOS_TYPE_H
 #define __INC_QOS_TYPE_H
 
index e25b69777ee7e4e1a999e6e43479777d5c3b0e16..3a0ff08c687a8f3aab1351a92443ebbee0c4d0e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TSTYPE_H_
 #define _TSTYPE_H_
 #include "rtl819x_Qos.h"
index f98bb03aa293cecd9ca921de8d48538b1bab3b44..f4921abf7300486bd7774ee8ed077873617ad29d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "ieee80211.h"
 #include <linux/etherdevice.h>
 #include <linux/slab.h>
index e6f8d1da65d962b923bfa2bdb782025e6593e225..4c241a07ae75df617778c8ede26e759d88fcb8c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*++
 Copyright-c Realtek Semiconductor Corp. All rights reserved.
 
index 2d0232fb3f9b49283c46fc71771c5c7521a0d2df..98137f65d1b236078ca30e1d49bd0d963b8155fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*****************************************************************************
  *     Copyright(c) 2007,  RealTEK Technology Inc. All Right Reserved.
  *
index ae9a4f1ac8fdef0d303d4f2459701a560ad15fdb..80672100ea268638a8ec290056373b3411e306f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /******************************************************************************
  *
  *  (c) Copyright 2008, RealTEK Technologies Inc. All Rights Reserved.
index ad0f6003570d52520aec3620dcb780bb3aa244fb..85fb49ca7bc88187ebe3899f23b1522078485c24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef R819XUSB_CMDPKT_H
 #define R819XUSB_CMDPKT_H
 /* Different command packet have dedicated message length and definition. */
index 35d1786703a7b16db417f92450876606103c5091..9c7e19aedff141cced9ecf80cc17d5ecbe9a4b22 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**************************************************************************************************
  * Procedure:    Init boot code/firmware code/data session
  *
index 24b63f2ec509b1b3d6ddd6e6ee85e8d2f97b6e34..cccd1c82ffe09057df274a23b00d37ab81077b09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INC_FIRMWARE_H
 #define __INC_FIRMWARE_H
 
index 4eb43cfe56908c62749b8f539cf8ab5ff6edb910..0af062036688494c362ee20962d4ea9c0b37906b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*Created on  2008/ 7/16,  5:31*/
 #include <linux/types.h>
 #include "r819xU_firmware_img.h"
index 18d0a6b5cbaeff334c4150670f795ad234c9f023..355da9157be1d09f1ed6e997f65165e81d370629 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IMG_H
 #define IMG_H
 
index 3874f83071170f28687f74680f5f6c85d8f41da6..12750671c860fea7a1970d32c9db15f3daaad8df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "r8192U.h"
 #include "r8192U_hw.h"
 #include "r819xU_phy.h"
index e672126330f3dfa9c1e02bf6aa7fd30166b9ca3a..0a42a6092ea99fe6dc2976b5624d39f046a9706a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _R819XU_PHY_H
 #define _R819XU_PHY_H
 
index b855627e98165c95c893fc54b15ea6481a7d9a57..c058a9537526dc1aaf62fda05eed8abc584ab6f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _R819XU_PHYREG_H
 #define _R819XU_PHYREG_H
 
index 6f8500c2d922737131669596190eb88079b8852d..3ae216b6621b1c95d8aed2e51ebda955fcbead7f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 r8712u-y :=                            \
                rtl871x_cmd.o           \
                rtl8712_cmd.o           \
index 6a64f91ad75fe0fdb83fc51767f5c5bbddee6482..dbba51cd40fbc4853a8206d5f7645bc9fe15824a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RTL8712_EFUSE_H__
 #define __RTL8712_EFUSE_H__
 
index 08bcb3b41bbd4888d195828b5ff8a8a3d5c3187b..634e67461712b7335f72b5eb743957197c5774a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IOCTL_H
 #define __IOCTL_H
 
index 11bcfb7bf77cd4aaa5616887bec16ad20b6664de..d479f739ff085e3c583cb2dc5cdd569b030afcbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*****************************************************************************
  *     Copyright(c) 2008,  RealTEK Technology Inc. All Right Reserved.
  *
index 9de06c5fe62033bf676f439701c8f77e94c0574c..f87b2ff5de1cd3433ebfe63ec864a2d621cca6d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RTL871X_RECV_H_
 #define _RTL871X_RECV_H_
 
index 4e7b460a9c73eefdba5aa147213070d13327f67c..f236acfd3afaa8f9944b0ceb643dfb321d17aae7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 r8723bs-y = \
                core/rtw_ap.o \
                core/rtw_btcoex.o \
index 6b778206a1a36ffc12e040a1922126007802052a..cb8a95aabd6c218c8c73471c03398e4d526d458c 100644 (file)
@@ -119,9 +119,8 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
 
 void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
-       rtw_free_mlme_priv_ie_data(pmlmepriv);
-
        if (pmlmepriv) {
+               rtw_free_mlme_priv_ie_data(pmlmepriv);
                if (pmlmepriv->free_bss_buf) {
                        vfree(pmlmepriv->free_bss_buf);
                }
index 152a198c8f17374c97a8f6623e981c67bb8dcc89..ce02457922b7c62163016080e0fe5b21590b16b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*****************************************************************************
  *Copyright(c) 2009,  RealTEK Technology Inc. All Right Reserved.
  *
index 796449c3f430593b6f7c4debff1c41d79e19ffc4..130a94879805a805c119a448a16a53bf89913fb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef REALTEK_POWER_SEQUENCE_8723B
 #define REALTEK_POWER_SEQUENCE_8723B
 
index d97ca1630bd4cc196d614a373714a04e7bf989a3..ab5a8627d3712e07ae3163ecbaf7d14544b35467 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  *
  * Copyright(c) 2009-2010  Realtek Corporation.
index 92277457aba4efc6d77061765cf4cfaa44adce27..ce1dd6f9036fd6caff1716ef06a8838e9e136be4 100644 (file)
@@ -311,6 +311,8 @@ static ssize_t proc_set_cam(struct file *file, const char __user *buffer, size_t
 
                if (num < 2)
                        return count;
+               if (id >= TOTAL_CAM_ENTRY)
+                       return -EINVAL;
 
                if (strcmp("c", cmd) == 0) {
                        _clear_cam_entry(adapter, id);
index 305e88a6b2ca2cf4e4155dad0e7dd7c7f869b51b..aa2f62acc994ddc659728ae6382c8649fd1711f9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /******************************************************************************
  *
  * Copyright(c) 2009-2010  Realtek Corporation.
index 5f84526cb5b5b89afb9e7a7c3753e346b5b91e4b..edbf6af1c8b70a76749e7554bff3f718a8a431ad 100644 (file)
@@ -2901,11 +2901,11 @@ halmac_update_datapack_88xx(struct halmac_adapter *halmac_adapter,
        if (halmac_adapter->fw_version.h2c_version < 4)
                return HALMAC_RET_FW_NO_SUPPORT;
 
+       driver_adapter = halmac_adapter->driver_adapter;
+
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "[TRACE]%s ==========>\n", __func__);
 
-       driver_adapter = halmac_adapter->driver_adapter;
-
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "[TRACE]%s <==========\n", __func__);
 
index f33024e4d853de78ae699f50a6b77b177c1a54ae..544f638ed3efb94a6639e214da9bc10f2c6aee23 100644 (file)
@@ -1618,10 +1618,11 @@ halmac_send_h2c_set_pwr_mode_88xx(struct halmac_adapter *halmac_adapter,
        void *driver_adapter = NULL;
        enum halmac_ret_status status = HALMAC_RET_SUCCESS;
 
+       driver_adapter = halmac_adapter->driver_adapter;
+
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "%s!!\n", __func__);
 
-       driver_adapter = halmac_adapter->driver_adapter;
        h2c_header = h2c_buff;
        h2c_cmd = h2c_header + HALMAC_H2C_CMD_HDR_SIZE_88XX;
 
@@ -1713,10 +1714,11 @@ halmac_media_status_rpt_88xx(struct halmac_adapter *halmac_adapter, u8 op_mode,
        void *driver_adapter = NULL;
        enum halmac_ret_status status = HALMAC_RET_SUCCESS;
 
+       driver_adapter = halmac_adapter->driver_adapter;
+
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "halmac_send_h2c_set_pwr_mode_88xx!!\n");
 
-       driver_adapter = halmac_adapter->driver_adapter;
        h2c_header = H2c_buff;
        h2c_cmd = h2c_header + HALMAC_H2C_CMD_HDR_SIZE_88XX;
 
@@ -2143,10 +2145,11 @@ halmac_func_ctrl_ch_switch_88xx(struct halmac_adapter *halmac_adapter,
        enum halmac_cmd_process_status *process_status =
                &halmac_adapter->halmac_state.scan_state_set.process_status;
 
+       driver_adapter = halmac_adapter->driver_adapter;
+
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "halmac_ctrl_ch_switch!!\n");
 
-       driver_adapter = halmac_adapter->driver_adapter;
        halmac_api = (struct halmac_api *)halmac_adapter->halmac_api;
 
        if (halmac_transition_scan_state_88xx(
@@ -2276,15 +2279,13 @@ enum halmac_ret_status halmac_send_h2c_update_bcn_parse_info_88xx(
 {
        u8 h2c_buff[HALMAC_H2C_CMD_SIZE_88XX] = {0};
        u16 h2c_seq_mum = 0;
-       void *driver_adapter = NULL;
+       void *driver_adapter = halmac_adapter->driver_adapter;
        struct halmac_h2c_header_info h2c_header_info;
        enum halmac_ret_status status = HALMAC_RET_SUCCESS;
 
        HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG,
                        "%s!!\n", __func__);
 
-       driver_adapter = halmac_adapter->driver_adapter;
-
        UPDATE_BEACON_PARSING_INFO_SET_FUNC_EN(h2c_buff, bcn_ie_info->func_en);
        UPDATE_BEACON_PARSING_INFO_SET_SIZE_TH(h2c_buff, bcn_ie_info->size_th);
        UPDATE_BEACON_PARSING_INFO_SET_TIMEOUT(h2c_buff, bcn_ie_info->timeout);
index 1bddbdf3454b0b11696bb83018138e55e590bc4b..c878e75293f7b7b8c6852aced661df9e5100eda0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/string.h>
 
index b7f947fb98f0ff9a5bd1f30f6d78601ea4c3f15d..86b7966d694e9b1f13d97246b5874b11e5c21d51 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the skein secure hash algorithm
 #
index 509d464c65a300a70d1873c0788375709f20e36a..916f029da726c34d72750119bd6839d248a7cde2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SKEIN_IV_H_
 #define _SKEIN_IV_H_
 
index 2b649abb78c795628cda1f1b48b8fd9d9e5cf6b6..e69cefa6b16a112e96fb6d8100281a1c7d9fe941 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include "threefish_api.h"
 
index 615e467579eeacd72196883d0cbfe5ab2eb3c9a1..21539c3cc7a0d3093df54b870b739f6494822381 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef THREEFISHAPI_H
 #define THREEFISHAPI_H
index 50640656c10dfe615eb292c3682db28e9ef49153..87f0558905443bf11c0c5eb08bde211c021c3076 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include "threefish_api.h"
 
index 4754f7a2068460e1f3259afc3b5c0741150cad5d..313b99104398db1e947c5f2d25c59eefb948949e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 
index 2c7a9b9a7c8a18959b746d7fe7aaf85a5d5c9028..09c223f815def3359d65eda4f7107b1a1010d977 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_CHIP_H__
 #define DDK750_CHIP_H__
 #define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */
index 9b116ed6ecc740f96c5fbf020a1600c857bebc64..c6fd90191530c427899dabff7339f8f45766d86b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "ddk750_reg.h"
 #include "ddk750_chip.h"
 #include "ddk750_display.h"
index 609bf742efffb271574860e88a9c78b7a6e833d9..523bbf33521cb9b9361f810a88bcd9cbe83dccf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_DISPLAY_H__
 #define DDK750_DISPLAY_H__
 
index 87a199d6cdaf1b700da0ef33a40f0d8f8a295e51..f41bd91817576b10dbbd79fa1bac8464dcffeb25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define USE_DVICHIP
 #ifdef USE_DVICHIP
 #include "ddk750_chip.h"
index 4a8394561f7668e862d2fc6365c3abbe8f9abd1f..9529cb9cfd69e5ea10a9360f7c69cccd9589af6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_DVI_H__
 #define DDK750_DVI_H__
 
index ec556a978a98f18eae7c5aa07a8e277c272bd17d..8482689b665b1306430abcfc7773e220b7c7bc18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define USE_HW_I2C
 #ifdef USE_HW_I2C
 #include "ddk750_chip.h"
index 46e22dce2570e8fd466d38bc68e628237b12debe..337c6493ca61f30ba137973c055755f51b0d3955 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_HWI2C_H__
 #define DDK750_HWI2C_H__
 
index bb673e18999be04b1ba9a5b94f05d820ab38c55e..2cdd87b78e585e5735b692aacded925f71ebc966 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include "ddk750_reg.h"
 #include "ddk750_mode.h"
index d5eae36d85cb4b6ca17fc0dfbce2f67678959e5d..259a9d6a4eb2be5ec8274f9ca3b411a517db63b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_MODE_H__
 #define DDK750_MODE_H__
 
index 222ae1a06febcf92ed30f0d0cde3c5c73f93dd17..73aeaeb89a64847297a4bff55243a3858116b5a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "ddk750_chip.h"
 #include "ddk750_reg.h"
 #include "ddk750_power.h"
index 44c4fc587e9690dae1b5194083dd428220707537..651d05247edf2e8172eb1028c5e816b1b6db0f89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_POWER_H__
 #define DDK750_POWER_H__
 
index f9b989b7a15281b3d834b43634d8f7341d5b88aa..fe412ead72e5094aafa4673c957958b6d3ea6ccf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_REG_H__
 #define DDK750_REG_H__
 
index 0431833de781c5b9fce6c1188a9a79f656aa5736..1eeaf087e891f7b11b67b4495136ac8ea286cd93 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define USE_DVICHIP
 #ifdef USE_DVICHIP
 
index 6968cf532f160afca43b476abb78fdb5f00f1e2a..af52a3121067a6464b347ee495c495dd80c45474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DDK750_SII164_H__
 #define DDK750_SII164_H__
 
index 4386122799b2ad569ec5db346fb60714974d3745..ce90adcb449d0394f3c6b74bf027f328858fa85c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LYNXDRV_H_
 #define LYNXDRV_H_
 
index 4b720cfa05def15228821805a76ef8b92d16a756..1035e91e7cd359e7ca9a0d8ce0663ea475a530f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
index 4b0ff8feb9a0a70f050b27e9c40603c530bfa6d1..c4f42002a50ff0cc922d1ec6211c6aa1b2fb32f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ACCEL_H__
 #define ACCEL_H__
 
index aa47a16ac75c9a8aeb8b02ef83684b18ae37036a..9d24159226d12b063d2d27c2ce38226109f7bad0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
index c7b86ae235b42631268a67fbbaef1183d02a42f9..16ac07eb58d6d8ed8483c37fdd0c2fbbef93e284 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LYNX_CURSOR_H__
 #define LYNX_CURSOR_H__
 
index baf1bbdc92ff9c2546ca75fb96ce24af9d04a235..ffd114a6d09b622935ae08deac2b6d4962f68bc1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
index c864ea69c40d3244d60d88efa9e2f012e4e4dd6f..5befb4933b850e0cd2fdc9c5bb082a2ba9fa6579 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SPEAKUP_SYNTH_ACNTSA) += speakup_acntsa.o
 obj-$(CONFIG_SPEAKUP_SYNTH_ACNTPC) += speakup_acntpc.o
 obj-$(CONFIG_SPEAKUP_SYNTH_APOLLO) += speakup_apollo.o
index 58abd1d85105bd38246c12e8e429510f877859ec..d920256328c3000bdfcfccdc09c06b8ef58db743 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/miscdevice.h>  /* for misc_register, and SYNTH_MINOR */
 #include <linux/types.h>
index 7809867f5d288f7bb866b33e7c8203393bfb7398..cea8707653f56ef5a2a50a3b93a7e80de393ee45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Internationalization implementation.  Includes definitions of English
  * string arrays, and the i18n pointer.
  */
index 8fcce566653f365e252aac9690269ffc4410bff4..2ec6e659d02b8e79c5a81208aeb5a7d55c5aacb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef I18N_H
 #define I18N_H
 /* Internationalization declarations */
index 67956e24779ce6fea015da416422cdf5c834bf18..56f7be6af1f695a873c9acfe6619d3ec8dafd496 100644 (file)
@@ -1376,6 +1376,8 @@ static void reset_highlight_buffers(struct vc_data *);
 
 static int read_all_key;
 
+static int in_keyboard_notifier;
+
 static void start_read_all_timer(struct vc_data *vc, int command);
 
 enum {
@@ -1408,7 +1410,10 @@ static void read_all_doc(struct vc_data *vc)
        cursor_track = read_all_mode;
        spk_reset_index_count(0);
        if (get_sentence_buf(vc, 0) == -1) {
-               kbd_fakekey2(vc, RA_DOWN_ARROW);
+               del_timer(&cursor_timer);
+               if (!in_keyboard_notifier)
+                       speakup_fake_down_arrow();
+               start_read_all_timer(vc, RA_DOWN_ARROW);
        } else {
                say_sentence_num(0, 0);
                synth_insert_next_index(0);
@@ -2212,8 +2217,10 @@ static int keyboard_notifier_call(struct notifier_block *nb,
        int ret = NOTIFY_OK;
        static int keycode;     /* to hold the current keycode */
 
+       in_keyboard_notifier = 1;
+
        if (vc->vc_mode == KD_GRAPHICS)
-               return ret;
+               goto out;
 
        /*
         * First, determine whether we are handling a fake keypress on
@@ -2225,7 +2232,7 @@ static int keyboard_notifier_call(struct notifier_block *nb,
         */
 
        if (speakup_fake_key_pressed())
-               return ret;
+               goto out;
 
        switch (code) {
        case KBD_KEYCODE:
@@ -2266,6 +2273,8 @@ static int keyboard_notifier_call(struct notifier_block *nb,
                        break;
                }
        }
+out:
+       in_keyboard_notifier = 0;
        return ret;
 }
 
index 08f68fc2864ec6f751070216e977092b5e24be36..66061b5c34278b3015459c563316290013c7b44f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h> /* for kmalloc */
 #include <linux/consolemap.h>
 #include <linux/interrupt.h>
index 89de6fff9cb235c842f3e031def0ef126a5818b5..aa691e4a6916165afc8766e88e38e2cecb2ea3c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPEAKUP_SERIAL_H
 #define _SPEAKUP_SERIAL_H
 
index a654334c98b934b4f67d45dd0aa1fac1ade29666..3d8bda8b96202383b813ad5a57eab798bfd759aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SPEAKUP_H
 #define _SPEAKUP_H
 
index 107ec1155f51b6d5208615246408bdd7d5441297..cffa938ae5804576da40daf8fff433dc7e71f06a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* speakup_acntpc.h - header file for speakups Accent-PC driver. */
 
 #define SYNTH_IO_EXTENT        0x02
index 51ac0f2fcded4ab7bc3f3f9134ccdd765805ddb8..9c378b58066e4694fe64a85982b69dbe792ec7a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* speakup_dtlk.h - header file for speakups DoubleTalk driver. */
 
 #define SYNTH_IO_EXTENT        0x02
index f1c0dd3b2c3ae313032c7d046eddee820183f146..c60d7339b89a92305daf51c400853e9a91e2ed0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
        119, 62, 6,
        0, 16, 20, 17, 32, 48, 0,
        2, 0, 78, 0, 0, 0, 0,
index 22f657d45e46da041b13619192a307c9ccb96494..c50de6035a9aa27bb199fe2509b56e438b7276ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SPEAKUP_TYPES_H
 #define SPEAKUP_TYPES_H
 
index f3730d8c953e5359cf3963590a091915f99d2999..784cdc1f9d6a1acaa9a9b5e9e4ee76b8c0536cf9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Unisys visorbus
 #
index 74cce4f1a7bd7340a30ef13bece954da4f69a7c0..27ecf6fb49fd940021f6dedc25cf3a5ef849097a 100644 (file)
@@ -1826,7 +1826,7 @@ static __init int visorutil_spar_detect(void)
        return 0;
 }
 
-static int init_unisys(void)
+static int __init init_unisys(void)
 {
        int result;
 
@@ -1841,7 +1841,7 @@ static int init_unisys(void)
        return 0;
 };
 
-static void exit_unisys(void)
+static void __exit exit_unisys(void)
 {
        acpi_bus_unregister_driver(&unisys_acpi_driver);
 }
index 2d0b3bc7ad738a8bb3c8af8e9b731ba5759507bd..3f6094aa9cdf1c9a965825ca69f69b53136a1721 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Iinclude/drm
 
 vboxvideo-y :=  hgsmi_base.o modesetting.o vbva_base.o \
index e9a8e1343cbb734eaed82b585220c455d696f6da..1ecb261e04ae7bcdf2a770cefbb9ab2b83f3c427 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_BCM2835_VCHIQ)    += vchiq.o
 
 vchiq-objs := \
index 5f3d8f2339e34834d11edfa8de1d5819e3e32b4f..4be864dbd41c9f4eb63f03361a0dab1e13c54a67 100644 (file)
@@ -390,8 +390,7 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
                        __func__, instance);
                instance->alsa_stream = alsa_stream;
                alsa_stream->instance = instance;
-               ret = 0; // xxx todo -1;
-               goto err_free_mem;
+               return 0;
        }
 
        /* Initialize and create a VCHI connection */
@@ -401,16 +400,15 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
                        LOG_ERR("%s: failed to initialise VCHI instance (ret=%d)\n",
                                __func__, ret);
 
-                       ret = -EIO;
-                       goto err_free_mem;
+                       return -EIO;
                }
                ret = vchi_connect(NULL, 0, vchi_instance);
                if (ret) {
                        LOG_ERR("%s: failed to connect VCHI instance (ret=%d)\n",
                                __func__, ret);
 
-                       ret = -EIO;
-                       goto err_free_mem;
+                       kfree(vchi_instance);
+                       return -EIO;
                }
                initted = 1;
        }
@@ -421,19 +419,16 @@ static int bcm2835_audio_open_connection(struct bcm2835_alsa_stream *alsa_stream
        if (IS_ERR(instance)) {
                LOG_ERR("%s: failed to initialize audio service\n", __func__);
 
-               ret = PTR_ERR(instance);
-               goto err_free_mem;
+               /* vchi_instance is retained for use the next time. */
+               return PTR_ERR(instance);
        }
 
        instance->alsa_stream = alsa_stream;
        alsa_stream->instance = instance;
 
        LOG_DBG(" success !\n");
-       ret = 0;
-err_free_mem:
-       kfree(vchi_instance);
 
-       return ret;
+       return 0;
 }
 
 int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
index 8307f30517d537780b9329bb116bf362bb789716..2a4565e682d8c1a83e8daa61732ee18ced9433a5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \
        bcm2835-camera.o \
        controls.o \
index 0159ca4407d8a8faeba3918e260986fdc1c120c8..be08849175ea3622321136f3be66df8705e40772 100644 (file)
@@ -612,18 +612,20 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
                        if (head_bytes > actual)
                                head_bytes = actual;
 
-                       memcpy((char *)page_address(pages[0]) +
+                       memcpy((char *)kmap(pages[0]) +
                                pagelist->offset,
                                fragments,
                                head_bytes);
+                       kunmap(pages[0]);
                }
                if ((actual >= 0) && (head_bytes < actual) &&
                        (tail_bytes != 0)) {
-                       memcpy((char *)page_address(pages[num_pages - 1]) +
+                       memcpy((char *)kmap(pages[num_pages - 1]) +
                                ((pagelist->offset + actual) &
                                (PAGE_SIZE - 1) & ~(g_cache_line_size - 1)),
                                fragments + g_cache_line_size,
                                tail_bytes);
+                       kunmap(pages[num_pages - 1]);
                }
 
                down(&g_free_fragments_mutex);
index 9f5b6344b9b77f72ebd4ff6621c90fd0ac47efb1..dd1f324a865445b6f7997c6a88e52d9492b9b619 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# SPDX-License-Identifier: GPL-2.0
 
 use strict;
 
index ac4a4bad4091da31d729a639d2c9ef234ccd045c..65f834cdeab24d8856cf6bdcdf874ad30df7c71a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VME_PIO2_H_
 #define _VME_PIO2_H_
 
index a6cb75686fa4c08bb6990d275b5f9863f8dff6ee..19ecb05781cce291670237e311d8aced8af2c4af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VME_USER_H_
 #define _VME_USER_H_
 
index d55c3baade5327de0bd3781917cb02cba250a750..a151f30fc46f193bd68e09ff49f2764b679f38e0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # TODO: all of these should be removed
 ccflags-y := -DLINUX -D__KERNEL__ -D__NO_VERSION__
 ccflags-y += -DHOSTAP
index 3dbe1f89dd25060cf275d43be584d49b7eb0d2fc..b64c0d87f61269549af45d5d89c0a2c73e3ca2b5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # TODO: all of these should be removed
 ccflags-y := -DLINUX -D__KERNEL__ -DEXPORT_SYMTAB -D__NO_VERSION__
 ccflags-y += -DHOSTAP
index d226283143058f30abdae95040215676da1f3d74..ee7e26b886a563e8743d6fdf4a3948de9eaec453 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_WILC1000) += wilc1000.o
 
 ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \
index 622994795222b7ea07d31bc2dcf1c6a93daaa24e..8cf886d32afb218f574a16a42f278cdd5db8b7ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "coreconfigurator.h"
 #include "wilc_wlan_if.h"
 #include "wilc_wlan.h"
index 5256f40524bf0ff21be2d60eccf1139bb797cfdf..3f5da8c588155d96a87915a13a5f1aa1c31736b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*!
  *  @file      coreconfigurator.h
index 7b620658ec3847fa7a1b4df0a3a7bd23c4e1c7a5..421168b9a9ca9fe21b14f3666d70f77f30355538 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/kthread.h>
index 1ce5ead318c798bf357f8cb0087cb7cd4ddb4a9c..44a2f4b595c5530aa42605ea325f64c83a5c2ad2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef HOST_INT_H
 #define HOST_INT_H
 #include <linux/ieee80211.h>
index 01efa80b4f88a26d521f28f963e173002379609f..91d49c4738dc61a796115391ed055d3b311e78ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*!
  *  @file      linux_mon.c
  *  @brief     File Operations OS wrapper functionality
index ac5aaafa461cf33a0ff4cbb772b3fe70a3f5ca9a..af12925a9d2b58f0c92b8b68a5b01fc41eee63ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "wilc_wfi_cfgoperations.h"
 #include "host_interface.h"
 #include <linux/errno.h>
index 85a3810d7bb5a0226431e6baca23d5208f9cba2c..dfb7ec2729357762b34e93e02e3f999e00b1a3cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*!
  *  @file      wilc_wfi_cfgoperations.h
  *  @brief     Definitions for the network module
index 7a36561a599e0785ba7c71873a2d189dd6837565..e6f4d84971c3a3032bb2e570476c2ebc41696d1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*!
  *  @file      wilc_wfi_netdevice.h
  *  @brief     Definitions for the network module
index 7a5eba9b5f47f190973e6514b0189fd3c1b78270..da717310549725b46d4dcd8d0da07496a6656d09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WILC_WLAN_H
 #define WILC_WLAN_H
 
index d3e5b1b302f4751da3c19447cd981856a2cc6c03..19e4f85fdd279ad659caa767834ac783600d68b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ////////////////////////////////////////////////////////////////////////// */
 /*  */
 /* Copyright (c) Atmel Corporation.  All rights reserved. */
index b8641a2735478ac251c4588c0643b3cafbb9521a..08092a5518404c41f9bd6818d57eea79f99e44fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ////////////////////////////////////////////////////////////////////////// */
 /*  */
 /* Copyright (c) Atmel Corporation.  All rights reserved. */
index f4d60057a06e052bc98ce9ea95e146e4ebbe2a4b..c1693cfc076de7f451b4053a9797278e765e3b74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* ///////////////////////////////////////////////////////////////////////// */
 /*  */
 /* Copyright (c) Atmel Corporation.  All rights reserved. */
index 32b69f238c69772c459ea604debc5976b02e50d6..1d24b0f86eee6f49c9a3b82c232164f684b1fac6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PRISM2_USB) += prism2_usb.o
 
 prism2_usb-y := prism2usb.o \
index 178f6f5d4613daa4468815649ed438d2b51cdff2..42912257e2b90f108e5ce788e3e04525a4e2982b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* cfg80211 Interface for prism2_usb module */
 #include "hfa384x.h"
 #include "prism2mgmt.h"
index bfb6b0a6528d28795019aedb25b804039ecc6474..b5ba176004c1f88aa1e0cfc5f127bc3fa06586b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "hfa384x_usb.c"
 #include "prism2mgmt.c"
 #include "prism2mib.c"
index 7a80a90f229ff127d33ec94e48f4e235f104f7d9..a3af1cbbf8ee65d22e889b92011d5b163e9b50c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XGIFB_MAIN
 #define _XGIFB_MAIN
 /* ------------------- Constant Definitions ------------------------- */
index af50362395d5f3a3d7ebdacd57c6b564b62e8621..982c676c16c6800a42b3b8c2cd185bd078da178e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_XGIFB
 #define _LINUX_XGIFB
 #include "vgatypes.h"
index 94e2e3c7c264ffbeffce53a4a8bf483d9627d7e5..0311e2682d27569d91daa8b29103d40d9af0b34f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VB_DEF_
 #define _VB_DEF_
 #include "../../video/fbdev/sis/initdef.h"
index 591a3c9babf578c9aaa1cb3d5375c2729bb9b397..ac1c815a3c5e6e150f574020e7f6ad35d7192aaa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/delay.h>
 #include <linux/vmalloc.h>
 
index e835054b87bf806d410a7b50711a08748cf933da..2f8a70133ebdb61db1972b24c6455fb7e3691851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VBINIT_
 #define _VBINIT_
 unsigned char XGIInitNew(struct pci_dev *pdev);
index cea128bede52307a8903d4b61181ffd97161ba05..da07ca57bb40daca9106a4a63ee3bb3cd8cfc33c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/delay.h>
 #include "XGIfb.h"
 
index c6317ab004745c6ca8a1673b1a4f012be85ed950..5904ed1f26866b05786cdff309853c0173cedd59 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VBSETMODE_
 #define _VBSETMODE_
 
index 2fd1a5935e1d4f8e5839667963e26d9ad9bf90f6..e256f72f6d8ae47f36017c03f87817adacbf51da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VB_STRUCT_
 #define _VB_STRUCT_
 #include "../../video/fbdev/sis/vstruct.h"
index 31dd52c513dfff10c895427aa59141afcbe51fdb..0da63e1da32fa43bc497e2ece890180dbe277890 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VB_TABLE_
 #define _VB_TABLE_
 static const struct SiS_MCLKData XGI340New_MCLKData[] = {
index 052694e750539a5e650c067a7bb11010d46eee41..0f6d5aac04f6917b5e7f6d7cd0eab48258af5852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VBUTIL_
 #define _VBUTIL_
 static inline void xgifb_reg_set(unsigned long port, u8 index, u8 data)
index de80e5c108dc07f819177e3361d85435711946d6..22919f2368d5d2dd59711262ee575d9783bf9f58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VGATYPES_
 #define _VGATYPES_
 
index e619c0266a7939bdae8f52ff1da8390e90de6b6b..45634747377eb244ac597398bd3ddce0261f1389 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 target_core_mod-y              := target_core_configfs.o \
                                   target_core_device.o \
index 0f18295e05bce2b04a1bcec3bddd289d7629f488..8c9ae96b760d7ef783c7b80be5cd652dadc0d9eb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 iscsi_target_mod-y +=          iscsi_target_parameters.o \
                                iscsi_target_seq_pdu_list.o \
                                iscsi_target_auth.o \
index 4893ec29b6b374fb5edeca865ee464e5eae5baa4..d16aaae7ba2acba5e2d7b324c28847cac78b0633 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Idrivers/net/ethernet/chelsio/cxgb4
 ccflags-y += -Idrivers/net/ethernet/chelsio/libcxgb
 ccflags-y += -Idrivers/target/iscsi
index e0db2ceb0f87cb170a2ff1b12fcb5a8e7a407cb2..42de1843aa40d06f9967693ab5dbf20852e84629 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_H
 #define ISCSI_TARGET_H
 
index 1b91c13cc9657e5661c6ea254e799a068eedc4b7..d5600ac30b531478276c0644c35f68b6d79c6636 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ISCSI_CHAP_H_
 #define _ISCSI_CHAP_H_
 
index 16edeeeb7777b447cd93a4222e4e2cf54a10cfa1..a420fbd37969d9292166a989561a6855d5051a1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_DATAIN_VALUES_H
 #define ISCSI_TARGET_DATAIN_VALUES_H
 
index 06dbff5cd52069af9539d24305d0a2960bf5402f..ab2166f177852c2859a1953de4d720d565815df6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_DEVICE_H
 #define ISCSI_TARGET_DEVICE_H
 
index 3822d9cd12302071467af03d4920fda601fdd351..3393407bc4e43dddb522bd87e9eba86ef2cced99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_ERL0_H
 #define ISCSI_TARGET_ERL0_H
 
index 54d36bd25beacdf4da8856b0b97ab5e237d4b2aa..5f66b265b25bf2d8b2baa44c0f05c9c5e791ff1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_ERL1_H
 #define ISCSI_TARGET_ERL1_H
 
index 634d01e136521cd61fd34b89d98ad113a874d92d..93e180d68d073846e6fd36918a85be285403561e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_ERL2_H
 #define ISCSI_TARGET_ERL2_H
 
index 0e1fd6cedd54cb83ffc576654d5428d47e75efa9..c2495e03625c5b6ecd68fc0caea25eb42b3eb3e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_LOGIN_H
 #define ISCSI_TARGET_LOGIN_H
 
index 53438bfca4c66bee15a05ca56ae4d89686d6a05d..835e1b769b3f0cd557beb37474e822aa330ebbc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_NEGO_H
 #define ISCSI_TARGET_NEGO_H
 
index 79cdf06ade48bf8d63336877b40af572778f574a..ce074cb545794252729d9928c0c44bee7c41e6da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_NODEATTRIB_H
 #define ISCSI_TARGET_NODEATTRIB_H
 
index c47b73f5752838a2fcdbc80c3e8ec901498eefa7..daf47f38e0816037526a6b29502628ddeeedfcc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_PARAMETERS_H
 #define ISCSI_PARAMETERS_H
 
index be1234362271b0b3f672c33a83b26f0407b630c8..5a0907027973f731717bb7a8774f26360838a60c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_SEQ_AND_PDU_LIST_H
 #define ISCSI_SEQ_AND_PDU_LIST_H
 
index 64cc5c07e47c2d301cfc66c14082a6a76458542f..301f0936bd8e0647553cf1caad8557db377ac323 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_TMR_H
 #define ISCSI_TARGET_TMR_H
 
index 59fd3cabe89d0a2726b879074daf5f158abdde39..88576f5d0ca45d9372325cc3260324b592ae1861 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_TPG_H
 #define ISCSI_TARGET_TPG_H
 
index c4eb141c6435983ea3493159f48cf6c3919a9f7c..036940518bfe4a6da1c0b835807f9bb8537f8e60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/spinlock.h>
 #include <linux/list.h>
 #include <linux/module.h>
index 425160565d0c310a549c6f50524815247d83b786..5e053d61c0c52f1ccd04358ca44d6f54edb649bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_UTIL_H
 #define ISCSI_TARGET_UTIL_H
 
index 3acc43c05117a0e3b1f235d2caa6995ad86d9f6e..d3110909a21389f648bbb72dc9e99265f4cc30c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/types.h>
 #include <linux/device.h>
 #include <target/target_core_base.h> /* struct se_cmd */
index 73bcb12088322779ebcf8a325830859d2f29a672..1d101ac86527e0fe151ae3e6b8e61d64164581a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SBP_BASE_H
 #define _SBP_BASE_H
 
index c69c11baf07f03ab6dae23a52bace4e956b613a2..1902cb5c3b52c32de28290199012e9c2ae500e4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_ALUA_H
 #define TARGET_CORE_ALUA_H
 
index 526595a072de899c618487b4edc909ad0fd64d91..53be5ffd32613392b16e736e45f1e63380d16e4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_FILE_H
 #define TARGET_CORE_FILE_H
 
index f2a5797217d43e233a5cb1229f7e5977e0a564b8..b4aeb2584ad4f3b6a3a8773f8a9046215cb47e07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_IBLOCK_H
 #define TARGET_CORE_IBLOCK_H
 
index f30e8ac13386dc3c58ae30e8e8072cd56547652f..18e3eb16e756735f7fe8028715c4f090979dcb2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_INTERNAL_H
 #define TARGET_CORE_INTERNAL_H
 
index 772f9148e75ca36e8395e4e50525d7b07278b6f2..198fad5c89dc83fad55f87da730f1aaa898b23be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_PR_H
 #define TARGET_CORE_PR_H
 
index b86fb0e1b783d84b0163b2bd641af5ceb69c0439..e8458b5e85c9287c61e176a61414ff60ce2caf47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_PSCSI_H
 #define TARGET_CORE_PSCSI_H
 
index 91fc1a34791d909a1d68d265321caeaa833657db..8b88f9b14c3f40e4d1739110461bf8774e812f5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_RD_H
 #define TARGET_CORE_RD_H
 
index 97402856a8f0e3be40ae8eee5b0f74e74fdb2f9d..b0f4205a96cdde6ccf190247193ce97e96cbc8e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_UA_H
 #define TARGET_CORE_UA_H
 
index 7c0b105cbe1b486062c40d97280059a286f59bf8..26ba4c3c9cffda838e9dac362ffebbbb019dce90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <target/target_core_base.h>
 
 #define XCOPY_HDR_LEN                  16
index 20b14bb087c95f9924db6bab384cc48f6d5dfa8a..a7d1593ab5af74bb5100a3ca507905e0eb1a3ffa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 tcm_fc-y +=            tfc_cmd.o \
                        tfc_conf.o \
                        tfc_io.o \
index 7a4e4a1ac39c0f22ada94a4b4e19d081b2687744..21f51fd88b0746ddf8f52b558d19940559ec00c4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TEE) += tee.o
 tee-objs += tee_core.o
 tee-objs += tee_shm.o
index 92fe5789bcce29a3000f41e8523761cea6ccc15c..d526fb88d9c59ef6a6cab87fb858b510742f3119 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OPTEE) += optee.o
 optee-objs += core.o
 optee-objs += call.o
index 8b79bca23536578d031e530ad597188a960d7a3b..195cd08fbc304f8249095cb18b8664991ef8f749 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for sensor chip drivers.
 #
index df0df055e7ffaa82cfa640306f611f15b0ed2b89..287eb0a1476d87323dfcc612a2e2d12aff7d2e7a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_INT340X_THERMAL)  += int3400_thermal.o
 obj-$(CONFIG_INT340X_THERMAL)  += int340x_thermal_zone.o
 obj-$(CONFIG_INT340X_THERMAL)  += int3402_thermal.o
index 65075b1743294db65e8154b3eedf6bda8aa8f8a6..58822575fd54caf2de2c903161307810d82c8907 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_ACPI_THERMAL_H
 #define __ACPI_ACPI_THERMAL_H
 
index 1ce1af2cf0f500a0cbe3b1bd743dc9c7483b4d56..8a3f221f17c187cd1c611b64729d80f2dd978707 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TEGRA_SOCTHERM)   += tegra-soctherm.o
 
 tegra-soctherm-y                               := soctherm.o soctherm-fuse.o
index 0f89bdf037909b10ff2012c5f3951fdb0cc6a222..f180ebead8582f9a24b642d882346e6b4f2eb92a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TI_SOC_THERMAL)           += ti-soc-thermal.o
 ti-soc-thermal-y                       := ti-bandgap.o
 ti-soc-thermal-$(CONFIG_TI_THERMAL)    += ti-thermal-common.o
index 38bc27a5ce4fd5599d1b2c0603531356c35e983d..c2277b8ee88d560103655b27d37878016629150a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - capabilities lookup
  *
index fb40dd0588b9a7743e99e9af764772308d8d56c8..423ae231fc6ccf7e89845f3ac12c160a62187564 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - control channel and configuration commands
  *
index 36fd28b1c1c57b35e6566ab9fddc56ec9eb6c37b..dd34f627ce497c4a6e6cf4c6ad16f91ff6e83533 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt Cactus Ridge driver - control channel and configuration commands
  *
index fe2f00ceafc5d7e1a3bbafea4224c838dc2158a4..3e8caf22c2942f088f6e2ca0274c42583bb3ac79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - eeprom access
  *
index 5b5bb2c436be23e8d7230335996c436f569e666f..1c7e6b92e2354d32fe4506f7ef70324c538fa4fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt Cactus Ridge driver - NHI driver
  *
index 09ed574e92ff32d49a962097bc38466d6bf03b28..752ec04305f342eb029f4a2d2338a9e89e797aae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt driver - NHI registers
  *
index 9562cd026dc01754144edab74f981313f837b507..ff49ad880bfd4723f0aff43e89403170a84aed27 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - path/tunnel functionality
  *
index 53f40c57df59ccaefe0f69ab0d02977b3406e518..3953d17202a87f239b2a9209d030db87366fd30c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - switch/port utility functions
  *
index 0b22ad9d68b4107ff199f9e0382ee6ccf30e2599..d674e06767a560e9ffa3afc23f9127da2cd32779 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - bus logic (NHI independent)
  *
index e0deee4f1eb095233789ca7ff8fa3de377d770c1..d7ffc159bcf7beb516811b9ce78cec21686d38c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt Cactus Ridge driver - bus logic (NHI independent)
  *
index 582bd1f156dc6627a1843952d1bd5f36acc81b93..5d94142afda65c53450162734f99abc3760a42b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt Cactus Ridge driver - Port/Switch config area registers
  *
index ca4475907d7a48345f8c20c8b17646fb9891e655..0637537ea53f0e42238e0600324acd8cc1950476 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Thunderbolt Cactus Ridge driver - PCIe tunnel
  *
index a67f93c140fa119662ffb8e9a7ac84005a9df582..f9b65fa1fd4d085f185996dbecb878ae6286fb06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Thunderbolt Cactus Ridge driver - PCIe tunnel
  *
index 16330a819685947e6c74dd139cdb4bef6b3b1f5f..8ce3a8661b316840514bdf6b25b7ae7db8245ce5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_TTY)              += tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o \
                                   tty_buffer.o tty_port.o tty_mutex.o \
                                   tty_ldsem.o tty_baudrate.o tty_jobctrl.o \
index 6a2702be76d10ae8804b3cb43b5eac56f6e78423..0b02ec7f1dfd3054cc8a6010a3d3348622351701 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_HVC_CONSOLE)      += hvc_vio.o hvsi_lib.o
 obj-$(CONFIG_HVC_OPAL)         += hvc_opal.o hvsi_lib.o
 obj-$(CONFIG_HVC_OLD_HVSI)     += hvsi.o
index bc7a96874637baf9961ea6f998edd1be4b533ebb..4b255dfef2cc6b1f07ca733c1b375f8ec3ad9034 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright IBM Corp. 2001,2008
  *
index 8b70a1627356d337c8bad36f6e29b65e84c2f148..a74680729825ee1fba8f4c85fa2c8f3ef231650b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * z/VM IUCV hypervisor console (HVC) device driver
  *
index a270f04588d710e7dd4f716049abcfc4a3ebaae4..09289c8154aec41cb19b5bf6bf297ccdbb734547 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
index df0204b6148fb03efd3a348b96345ad84db3285a..a6b8240af6cdd6dcfb6bbb07e39e39bc13bf4f7b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 90a8590e43b0b056ae86548b825dbdb6ad55c036..e524a8fcc2ad2b2eea9ffe8a188096abefa24474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index f2cbb116bccb51d2c3c548cf5053b782fb84f9de..73818bb64416759ed32cbca23037be1bd315540e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index c2f9a3263b37d43be6f6e109740e36438167baa8..695439c0314741117c7af75a4fd6b99d10c71665 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 561f765b333419fa1aa4a48095efe734b89efd8e..784932a59a731a0fe84def0b07c1bebdae4e3016 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 002c34e72521097525d478577fb2737b2faf7c0c..d4a7ae257ca58ee0ddb2b2e896358581b9b922ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 2685d59d27245ca5a4d7b00d15e7938cdbd4d837..1ef751c27ac6d6e11cd4b0b29fe9ce7e07c59df9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 747b2d63786093058213b5aea75724a9cc68960e..ec698d9f338bd91ee69ae2db830c1abd7e1c57b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPWireless 3G PCMCIA Network Driver
  *
index 87d16ce57be721e1d7636e4e97129dcc97ee7806..8ce89fd36c7bdffbc9861c920a98c12831fa3d5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MOXA_H_FILE
 #define MOXA_H_FILE
 
index 1c0c9553bc050ecc8b6ad3a5dddab8150398a842..7dd38047ba2352d5dde2845170ecfc3e149ec27d 100644 (file)
@@ -246,11 +246,11 @@ struct mxser_port {
        unsigned char err_shadow;
 
        struct async_icount icount; /* kernel counters for 4 input interrupts */
-       int timeout;
+       unsigned int timeout;
 
        int read_status_mask;
        int ignore_status_mask;
-       int xmit_fifo_size;
+       unsigned int xmit_fifo_size;
        int xmit_head;
        int xmit_tail;
        int xmit_cnt;
@@ -572,8 +572,9 @@ static void mxser_dtr_rts(struct tty_port *port, int on)
 static int mxser_set_baud(struct tty_struct *tty, long newspd)
 {
        struct mxser_port *info = tty->driver_data;
-       int quot = 0, baud;
+       unsigned int quot = 0, baud;
        unsigned char cval;
+       u64 timeout;
 
        if (!info->ioaddr)
                return -1;
@@ -594,8 +595,13 @@ static int mxser_set_baud(struct tty_struct *tty, long newspd)
                quot = 0;
        }
 
-       info->timeout = ((info->xmit_fifo_size * HZ * 10 * quot) / info->baud_base);
-       info->timeout += HZ / 50;       /* Add .02 seconds of slop */
+       /*
+        * worst case (128 * 1000 * 10 * 18432) needs 35 bits, so divide in the
+        * u64 domain
+        */
+       timeout = (u64)info->xmit_fifo_size * HZ * 10 * quot;
+       do_div(timeout, info->baud_base);
+       info->timeout = timeout + HZ / 50; /* Add .02 seconds of slop */
 
        if (quot) {
                info->MCR |= UART_MCR_DTR;
index 0bf794313ffd5cb8a0b06d26ff7b1b5a69d496e5..e6cb15626567a7312e9cbcf88cb6597d14bd28bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MXSER_H
 #define _MXSER_H
 
index 26dcb3b60fb9917e04a30533977abc4cda531b1d..64338442050ef9d4e47e48edc72676159952090c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *
index c11a9392f219257c9dcefa001b4d22aad9d68e4d..d0560203f2157cc21af1ca3c0f1d8341d85e5f36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * rocket.h --- the exported interface of the rocket driver to its configuration program.
  *
index ef1e1be6b26d885a6efebc1fd45afec241e3977c..727e50dbb92f72aaf56c449d5ecb9cb362c6cd1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * rocket_int.h --- internal header file for rocket.c
  *
index 6a18d2d768fe699bd9c6f6db7ff5d4e06d629df4..18751bc63a848ec6c806415eefd3c4088df06c3e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the 8250 serial device drivers.
 #
index fe88a75d9a59cff23fe8c4c20544a9a3f146a94d..842d185d697e998f104f5fe83040d5cafd9ad406 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel serial device drivers.
 #
index 411c60e1f9a4c0cce1632176003b08c354efdbcc..077eb12a34723235259dba1bc996820547ceb560 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AMBA_PL011_H
 #define AMBA_PL011_H
 
index 5faf87c8d2bc299bb5ebce376fd10e5e82366507..81baf007694ffafe0f3af4fee4973a8bd4158c90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GRLIB_APBUART_H__
 #define __GRLIB_APBUART_H__
 
index 583c9a0c7eccd439b3c457c6c9c767976c49deda..8c48c3784831b3605158ef38b15f17d1dae65b93 100644 (file)
@@ -507,9 +507,14 @@ static void bcm_uart_set_termios(struct uart_port *port,
 {
        unsigned int ctl, baud, quot, ier;
        unsigned long flags;
+       int tries;
 
        spin_lock_irqsave(&port->lock, flags);
 
+       /* Drain the hot tub fully before we power it off for the winter. */
+       for (tries = 3; !bcm_uart_tx_empty(port) && tries; tries--)
+               mdelay(10);
+
        /* disable uart while changing speed */
        bcm_uart_disable(port);
        bcm_uart_flush(port);
index 60c7e94cde1e2eee65afdf65e5c2f62448291a1d..18ec0849918ac149614031e8f78644830605f978 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Driver for CPM (SCC/SMC) serial ports
  *
index 51e651a699389b0d9dcc4b9be230f46cf986a18a..051a8509c3e5b4456ffb0e9f2433da7f6b140986 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Driver for CPM (SCC/SMC) serial ports
  *
index 59a2a7e18b5a2540fad824b6053b2fb1a73a6274..1421804975e0b08115232b3c0d7d8430fa46bf24 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Serial port driver for the ETRAX 100LX chip
  *
index 15a52ee5825116adb490857b6d15066977827c3f..79ba2bc95d3d396948f14d9a904fe711e59f7399 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * serial.h: Arch-dep definitions for the Etrax100 serial driver.
  *
index faf169ed27b36e282206679dc8d7c8bb78e99355..3b3e31954f24ac660f09297a4dfb51d79bfae7cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dz.h: Serial port driver for DECstations equipped
  *       with the DZ chipset.
index 2f80bc7e44fb3c4f16210a806c0fcaecee3e3b1c..24bf6bfb29b451ef0884c28b3242303cfa82b357 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/console.h>
index 849c1f9991cec8e0102719a90fe3325e90f2d72f..f0252184291ed4a3ab49ab03ce634e7be8588bf4 100644 (file)
@@ -1276,7 +1276,6 @@ static void rx_dma_timer_init(struct lpuart_port *sport)
 static int lpuart_startup(struct uart_port *port)
 {
        struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
-       int ret;
        unsigned long flags;
        unsigned char temp;
 
@@ -1291,11 +1290,6 @@ static int lpuart_startup(struct uart_port *port)
        sport->rxfifo_size = 0x1 << (((temp >> UARTPFIFO_RXSIZE_OFF) &
                UARTPFIFO_FIFOSIZE_MASK) + 1);
 
-       ret = devm_request_irq(port->dev, port->irq, lpuart_int, 0,
-                               DRIVER_NAME, sport);
-       if (ret)
-               return ret;
-
        spin_lock_irqsave(&sport->port.lock, flags);
 
        lpuart_setup_watermark(sport);
@@ -1333,7 +1327,6 @@ static int lpuart_startup(struct uart_port *port)
 static int lpuart32_startup(struct uart_port *port)
 {
        struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
-       int ret;
        unsigned long flags;
        unsigned long temp;
 
@@ -1346,11 +1339,6 @@ static int lpuart32_startup(struct uart_port *port)
        sport->rxfifo_size = 0x1 << (((temp >> UARTFIFO_RXSIZE_OFF) &
                UARTFIFO_FIFOSIZE_MASK) - 1);
 
-       ret = devm_request_irq(port->dev, port->irq, lpuart32_int, 0,
-                               DRIVER_NAME, sport);
-       if (ret)
-               return ret;
-
        spin_lock_irqsave(&sport->port.lock, flags);
 
        lpuart32_setup_watermark(sport);
@@ -1380,8 +1368,6 @@ static void lpuart_shutdown(struct uart_port *port)
 
        spin_unlock_irqrestore(&port->lock, flags);
 
-       devm_free_irq(port->dev, port->irq, sport);
-
        if (sport->lpuart_dma_rx_use) {
                del_timer_sync(&sport->lpuart_timer);
                lpuart_dma_rx_free(&sport->port);
@@ -1400,7 +1386,6 @@ static void lpuart_shutdown(struct uart_port *port)
 
 static void lpuart32_shutdown(struct uart_port *port)
 {
-       struct lpuart_port *sport = container_of(port, struct lpuart_port, port);
        unsigned long temp;
        unsigned long flags;
 
@@ -1413,8 +1398,6 @@ static void lpuart32_shutdown(struct uart_port *port)
        lpuart32_write(port, temp, UARTCTRL);
 
        spin_unlock_irqrestore(&port->lock, flags);
-
-       devm_free_irq(port->dev, port->irq, sport);
 }
 
 static void
@@ -2212,16 +2195,22 @@ static int lpuart_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, &sport->port);
 
-       if (lpuart_is_32(sport))
+       if (lpuart_is_32(sport)) {
                lpuart_reg.cons = LPUART32_CONSOLE;
-       else
+               ret = devm_request_irq(&pdev->dev, sport->port.irq, lpuart32_int, 0,
+                                       DRIVER_NAME, sport);
+       } else {
                lpuart_reg.cons = LPUART_CONSOLE;
+               ret = devm_request_irq(&pdev->dev, sport->port.irq, lpuart_int, 0,
+                                       DRIVER_NAME, sport);
+       }
+
+       if (ret)
+               goto failed_irq_request;
 
        ret = uart_add_one_port(&lpuart_reg, &sport->port);
-       if (ret) {
-               clk_disable_unprepare(sport->clk);
-               return ret;
-       }
+       if (ret)
+               goto failed_attach_port;
 
        sport->dma_tx_chan = dma_request_slave_channel(sport->port.dev, "tx");
        if (!sport->dma_tx_chan)
@@ -2240,6 +2229,11 @@ static int lpuart_probe(struct platform_device *pdev)
        }
 
        return 0;
+
+failed_attach_port:
+failed_irq_request:
+       clk_disable_unprepare(sport->clk);
+       return ret;
 }
 
 static int lpuart_remove(struct platform_device *pdev)
index a59a9a8341d2d9248522016141a12e49eba625f6..b52801fe2d0d6107b66119559128cdf0689f6fa3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IP22_ZILOG_H
 #define _IP22_ZILOG_H
 
index 3483242ee3e07c05c63731c9ca8a5999670717e5..bb874e76810e08ec22fc7c77154caf2945587f56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PMAC_ZILOG_H__
 #define __PMAC_ZILOG_H__
 
index cdd2f942317c59fe4ec04c022a004d871f551fde..b9c7a904c1eaf7716d2137d5bcded2a8c805c17d 100644 (file)
@@ -889,7 +889,16 @@ static int sccnxp_probe(struct platform_device *pdev)
                        goto err_out;
                uartclk = 0;
        } else {
-               clk_prepare_enable(clk);
+               ret = clk_prepare_enable(clk);
+               if (ret)
+                       goto err_out;
+
+               ret = devm_add_action_or_reset(&pdev->dev,
+                               (void(*)(void *))clk_disable_unprepare,
+                               clk);
+               if (ret)
+                       goto err_out;
+
                uartclk = clk_get_rate(clk);
        }
 
@@ -988,7 +997,7 @@ static int sccnxp_probe(struct platform_device *pdev)
        uart_unregister_driver(&s->uart);
 err_out:
        if (!IS_ERR(s->regulator))
-               return regulator_disable(s->regulator);
+               regulator_disable(s->regulator);
 
        return ret;
 }
index 971b2ab088d847af9d3d2b4e4c0c2dd820eee653..938e23a2d16602fa2d02ead1b70cef6860e9c471 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/bitops.h>
 #include <linux/serial_core.h>
 #include <linux/io.h>
index b78e1f7b8050c01e25489c8533cacd00d5caac09..1644031aacda4bd589dfc968831f0f72da302f38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sunsab.h: Register Definitions for the Siemens SAB82532 DUSCC
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
index 5dec7b47cc3845ee2fbbe53fe7be1334d14aff8c..6d6764f0ac98aac921197d466841d0ccb0f1050e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SUNZILOG_H
 #define _SUNZILOG_H
 
index aa921b57d8278b8606de9c0ceae58a90688b7780..26ef8eafa1c1204ca2b891701aabf2b3dedd28a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zs.h: Definitions for the DECstation Z85C30 serial driver.
  *
index 3ffc1ce29023b5f6476d0006aa94b8b1b858c480..d008f5a7519718f9c9bc68c9d2a10277ec37b4f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Linux Magic System Request Key Hacks
  *
index 2fe216b276e29ee54d6dd804555f27668407875a..84a8ac2a779f6ba7d4faf9df4d132421ac440c0a 100644 (file)
@@ -694,10 +694,8 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
        tty_set_termios_ldisc(tty, disc);
        retval = tty_ldisc_open(tty, tty->ldisc);
        if (retval) {
-               if (!WARN_ON(disc == N_TTY)) {
-                       tty_ldisc_put(tty->ldisc);
-                       tty->ldisc = NULL;
-               }
+               tty_ldisc_put(tty->ldisc);
+               tty->ldisc = NULL;
        }
        return retval;
 }
@@ -752,8 +750,9 @@ void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
 
        if (tty->ldisc) {
                if (reinit) {
-                       if (tty_ldisc_reinit(tty, tty->termios.c_line) < 0)
-                               tty_ldisc_reinit(tty, N_TTY);
+                       if (tty_ldisc_reinit(tty, tty->termios.c_line) < 0 &&
+                           tty_ldisc_reinit(tty, N_TTY) < 0)
+                               WARN_ON(tty_ldisc_reinit(tty, N_NULL) < 0);
                } else
                        tty_ldisc_kill(tty);
        }
index d8bae67a6174b65e676a887e08dd9e681c2f5693..2640635ee177d1ad027ee7bc3443bfb2880ae17c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/tty.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
index 17ae94cb29f8e72d710fd5856a74e8abdc1e554b..edbbe0ccdb8339fe5caa12a1bca26e9c6214ab0f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # This file contains the font map for the default (hardware) font
 #
index accbd1257bc4a36938918965592e4a1e470098a6..7a4c8022c02375828608e5fc7ac9e8b58e6dc80e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This module exports the functions:
  *
index 56dcff6059d3db965343739eea731921994b6073..85b6634f518a995e2f1196daa66e7b1f31528a14 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Provide access to virtual console memory.
  * /dev/vcs0: the screen as it is being viewed right now (possibly scrolled)
index 96d389cb506ce6a9c1f1c9eaffda6cc2b62b272c..2d2b420598b236a9aa8a135ea16e74cf5763350f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1992 obz under the linux copyright
  *
index e9663bb8a4c732c0a1a18d6d3d61129c6c428ca5..c285dd2a4539b80fd9b957f5dc5f947d0ac2e04d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_UIO)      += uio.o
 obj-$(CONFIG_UIO_CIF)  += uio_cif.o
 obj-$(CONFIG_UIO_PDRV_GENIRQ)  += uio_pdrv_genirq.o
index 9650b351c26c7f2064facc118435cb1cea1b12ee..060643a1b5c8aa4f446973bc1ca8b7bfadfcb54b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel USB device drivers.
 #
index ac278946b06c037ddaa88651b1843820e6627763..7ac65ce1aa8abeeec269a94f7ce15a2d087548b3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for USB ATM/xDSL drivers
 #
index ddcbddf8361ad1c015d961ece04bd6431eb64129..e3d5e728fa530aef709487061b28f76a36f3a98d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_CHIPIDEA)             += ci_hdrc.o
 
 ci_hdrc-y                              := core.o otg.o debug.o
index 1c31e8a088101ff70d3aa37553d1e9b2d906b324..c9e1a165ed8231d7022f362129137e0df3cd7a90 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/device.h>
 #include <linux/types.h>
index 0f12f131bdd3f22671eaf170476e2511950fa1be..70112cf0f195d623dac93e2b74f7125a1e853557 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRIVERS_USB_CHIPIDEA_HOST_H
 #define __DRIVERS_USB_CHIPIDEA_HOST_H
 
index 5e056064259c85432ebe9f3d9eb12616e2aa1271..18c923a4c16e1f41c1893c6b5e7a79a3ed5df6c7 100644 (file)
@@ -1832,6 +1832,9 @@ static const struct usb_device_id acm_ids[] = {
        { USB_DEVICE(0xfff0, 0x0100), /* DATECS FP-2000 */
        .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
        },
+       { USB_DEVICE(0x09d8, 0x0320), /* Elatec GmbH TWN3 */
+       .driver_info = NO_UNION_NORMAL, /* has misplaced union descriptor */
+       },
 
        { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
        .driver_info = CLEAR_HALT_CONDITIONS,
index 7a2b3deafc90abc3d524463d32b49172a7778695..eacc116e83da2ccf38b2640aa5b5b02b5b3621c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Includes for cdc-acm.c
index 5aacea1978a5f38b5a7663ef7bcd71f4b1c311d3..3e865dbf878c74b2e904925798cd603e5cd0e979 100644 (file)
@@ -190,8 +190,10 @@ static void wdm_in_callback(struct urb *urb)
        /*
         * only set a new error if there is no previous error.
         * Errors are only cleared during read/open
+        * Avoid propagating -EPIPE (stall) to userspace since it is
+        * better handled as an empty read
         */
-       if (desc->rerr  == 0)
+       if (desc->rerr == 0 && status != -EPIPE)
                desc->rerr = status;
 
        if (length + desc->length > desc->wMaxCommand) {
index 6bbb3ec17018f745117e37ec0df6d890d47df7ae..0a7c45e8548135f27a4a47157d5a674fb4d29dfe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the usb common parts.
 #
index 250ec1d662d9ecbb53ec59449f5cd229a5071e77..92c9cefb43178ad49517f826025f3519196229a5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for USB Core files and filesystem
 #
index 4be52c602e9b7a7de6a76ecb4be686cb12ec9950..883549ee946cb5e206623bfc79d199620078a6bb 100644 (file)
@@ -643,15 +643,23 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,
 
                } else if (header->bDescriptorType ==
                                USB_DT_INTERFACE_ASSOCIATION) {
+                       struct usb_interface_assoc_descriptor *d;
+
+                       d = (struct usb_interface_assoc_descriptor *)header;
+                       if (d->bLength < USB_DT_INTERFACE_ASSOCIATION_SIZE) {
+                               dev_warn(ddev,
+                                        "config %d has an invalid interface association descriptor of length %d, skipping\n",
+                                        cfgno, d->bLength);
+                               continue;
+                       }
+
                        if (iad_num == USB_MAXIADS) {
                                dev_warn(ddev, "found more Interface "
                                               "Association Descriptors "
                                               "than allocated for in "
                                               "configuration %d\n", cfgno);
                        } else {
-                               config->intf_assoc[iad_num] =
-                                       (struct usb_interface_assoc_descriptor
-                                       *)header;
+                               config->intf_assoc[iad_num] = d;
                                iad_num++;
                        }
 
@@ -852,7 +860,7 @@ int usb_get_configuration(struct usb_device *dev)
                }
 
                if (dev->quirks & USB_QUIRK_DELAY_INIT)
-                       msleep(100);
+                       msleep(200);
 
                result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno,
                    bigbuffer, length);
@@ -952,10 +960,12 @@ int usb_get_bos_descriptor(struct usb_device *dev)
        for (i = 0; i < num; i++) {
                buffer += length;
                cap = (struct usb_dev_cap_header *)buffer;
-               length = cap->bLength;
 
-               if (total_len < length)
+               if (total_len < sizeof(*cap) || total_len < cap->bLength) {
+                       dev->bos->desc->bNumDeviceCaps = i;
                        break;
+               }
+               length = cap->bLength;
                total_len -= length;
 
                if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) {
index 318bb3b966879644644126062fb4c33b1392a6ef..e9326f31db8d4367cb80e813954573c983a49a08 100644 (file)
@@ -140,6 +140,9 @@ module_param(usbfs_memory_mb, uint, 0644);
 MODULE_PARM_DESC(usbfs_memory_mb,
                "maximum MB allowed for usbfs buffers (0 = no limit)");
 
+/* Hard limit, necessary to avoid arithmetic overflow */
+#define USBFS_XFER_MAX         (UINT_MAX / 2 - 1000000)
+
 static atomic64_t usbfs_memory_usage;  /* Total memory currently allocated */
 
 /* Check whether it's okay to allocate more memory for a transfer */
@@ -1460,6 +1463,8 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
                                USBDEVFS_URB_ZERO_PACKET |
                                USBDEVFS_URB_NO_INTERRUPT))
                return -EINVAL;
+       if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX)
+               return -EINVAL;
        if (uurb->buffer_length > 0 && !uurb->buffer)
                return -EINVAL;
        if (!(uurb->type == USBDEVFS_URB_TYPE_CONTROL &&
index 41eaf0b5251800c570736baf4775c35072e4d9fc..e9ce6bb0b22d15587efaff059b3c5c2c29681430 100644 (file)
@@ -2710,13 +2710,16 @@ static int hub_port_wait_reset(struct usb_hub *hub, int port1,
        if (!(portstatus & USB_PORT_STAT_CONNECTION))
                return -ENOTCONN;
 
-       /* bomb out completely if the connection bounced.  A USB 3.0
-        * connection may bounce if multiple warm resets were issued,
+       /* Retry if connect change is set but status is still connected.
+        * A USB 3.0 connection may bounce if multiple warm resets were issued,
         * but the device may have successfully re-connected. Ignore it.
         */
        if (!hub_is_superspeed(hub->hdev) &&
-                       (portchange & USB_PORT_STAT_C_CONNECTION))
-               return -ENOTCONN;
+           (portchange & USB_PORT_STAT_C_CONNECTION)) {
+               usb_clear_port_feature(hub->hdev, port1,
+                                      USB_PORT_FEAT_C_CONNECTION);
+               return -EAGAIN;
+       }
 
        if (!(portstatus & USB_PORT_STAT_ENABLE))
                return -EBUSY;
@@ -4838,7 +4841,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
                        goto loop;
 
                if (udev->quirks & USB_QUIRK_DELAY_INIT)
-                       msleep(1000);
+                       msleep(2000);
 
                /* consecutive bus-powered hubs aren't reliable; they can
                 * violate the voltage drop budget.  if the new child has
index 4c38ea41ae969e6fac8ced209a655957322ba36f..371a07d874a370bc70ad6ef1499debac8b34b6fe 100644 (file)
@@ -2069,6 +2069,10 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,
                        elength = 1;
                        goto next_desc;
                }
+               if ((buflen < elength) || (elength < 3)) {
+                       dev_err(&intf->dev, "invalid descriptor buffer length\n");
+                       break;
+               }
                if (buffer[1] != USB_DT_CS_INTERFACE) {
                        dev_err(&intf->dev, "skipping garbage\n");
                        goto next_desc;
index 82806e3112028f335a90ec34c0283a02c3f87e9b..a6aaf2f193a464450c96fd30f9acf9f1503eecb1 100644 (file)
@@ -221,6 +221,10 @@ static const struct usb_device_id usb_quirk_list[] = {
        /* Corsair Strafe RGB */
        { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
 
+       /* MIDI keyboard WORLDE MINI */
+       { USB_DEVICE(0x1c75, 0x0204), .driver_info =
+                       USB_QUIRK_CONFIG_INTF_STRINGS },
+
        /* Acer C120 LED Projector */
        { USB_DEVICE(0x1de1, 0xc102), .driver_info = USB_QUIRK_NO_LPM },
 
index b9237e1e45d098d43de9dea17bc535caa13c52ce..440320cc20a4704eff1b507fab656fa52bb5881f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_USB_DWC2_DEBUG)       += -DDEBUG
 ccflags-$(CONFIG_USB_DWC2_VERBOSE)     += -DVERBOSE_DEBUG
 
index f15fabbd1e59e9d23e07936be6cfa05a3489975f..7ac725038f8d8e9ad09dc25d37484b58cf8457a1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # define_trace.h needs to know how to find our header
 CFLAGS_trace.o                         := -I$(src)
 
index 4cef7d4f9cd060736ee53df87d2ca7b5dd931632..a26d1fde0f5e4b6f3613387da40aaca00f937477 100644 (file)
@@ -177,6 +177,7 @@ static const struct of_device_id of_dwc3_simple_match[] = {
        { .compatible = "rockchip,rk3399-dwc3" },
        { .compatible = "xlnx,zynqmp-dwc3" },
        { .compatible = "cavium,octeon-7130-usb-uctl" },
+       { .compatible = "sprd,sc9860-dwc3" },
        { /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, of_dwc3_simple_match);
index 827e376bfa97106f1ccbeefcad40bc2a05357c8b..75e6cb044eb2b96d173a2c716bb29f5f4fd7f703 100644 (file)
@@ -990,6 +990,8 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
                                         DWC3_TRBCTL_CONTROL_DATA,
                                         true);
 
+               req->trb = &dwc->ep0_trb[dep->trb_enqueue - 1];
+
                /* Now prepare one extra TRB to align transfer size */
                dwc3_ep0_prepare_one_trb(dep, dwc->bounce_addr,
                                         maxpacket - rem,
@@ -1015,6 +1017,8 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
                                         DWC3_TRBCTL_CONTROL_DATA,
                                         true);
 
+               req->trb = &dwc->ep0_trb[dep->trb_enqueue - 1];
+
                /* Now prepare one extra TRB to align transfer size */
                dwc3_ep0_prepare_one_trb(dep, dwc->bounce_addr,
                                         0, DWC3_TRBCTL_CONTROL_DATA,
@@ -1029,6 +1033,9 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
                dwc3_ep0_prepare_one_trb(dep, req->request.dma,
                                req->request.length, DWC3_TRBCTL_CONTROL_DATA,
                                false);
+
+               req->trb = &dwc->ep0_trb[dep->trb_enqueue];
+
                ret = dwc3_ep0_start_trans(dep);
        }
 
index 598a67d6ba05fcc5c5ebd159f1384725acf25c8b..130dad7130b65a738882f84219099c7f1b166213 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # USB peripheral controller drivers
 #
index dd74c99d6ce15f6a961d095f82c4a29bb560dc50..5d061b3d8224aaa0b0a88c5c700454d8256b25bc 100644 (file)
@@ -2026,6 +2026,8 @@ static DEVICE_ATTR_RO(suspended);
 static void __composite_unbind(struct usb_gadget *gadget, bool unbind_driver)
 {
        struct usb_composite_dev        *cdev = get_gadget_data(gadget);
+       struct usb_gadget_strings       *gstr = cdev->driver->strings[0];
+       struct usb_string               *dev_str = gstr->strings;
 
        /* composite_disconnect() must already have been called
         * by the underlying peripheral controller driver!
@@ -2045,6 +2047,9 @@ static void __composite_unbind(struct usb_gadget *gadget, bool unbind_driver)
 
        composite_dev_cleanup(cdev);
 
+       if (dev_str[USB_GADGET_MANUFACTURER_IDX].s == cdev->def_manufacturer)
+               dev_str[USB_GADGET_MANUFACTURER_IDX].s = "";
+
        kfree(cdev->def_manufacturer);
        kfree(cdev);
        set_gadget_data(gadget, NULL);
index a22a892de7b7e0ae3a1d816aa943bcac053880a4..aeb9f3c4052157e9a99d9c5dceef026970ea76f3 100644 (file)
@@ -1143,11 +1143,12 @@ static struct configfs_attribute *interf_grp_attrs[] = {
        NULL
 };
 
-int usb_os_desc_prepare_interf_dir(struct config_group *parent,
-                                  int n_interf,
-                                  struct usb_os_desc **desc,
-                                  char **names,
-                                  struct module *owner)
+struct config_group *usb_os_desc_prepare_interf_dir(
+               struct config_group *parent,
+               int n_interf,
+               struct usb_os_desc **desc,
+               char **names,
+               struct module *owner)
 {
        struct config_group *os_desc_group;
        struct config_item_type *os_desc_type, *interface_type;
@@ -1159,7 +1160,7 @@ int usb_os_desc_prepare_interf_dir(struct config_group *parent,
 
        char *vlabuf = kzalloc(vla_group_size(data_chunk), GFP_KERNEL);
        if (!vlabuf)
-               return -ENOMEM;
+               return ERR_PTR(-ENOMEM);
 
        os_desc_group = vla_ptr(vlabuf, data_chunk, os_desc_group);
        os_desc_type = vla_ptr(vlabuf, data_chunk, os_desc_type);
@@ -1184,7 +1185,7 @@ int usb_os_desc_prepare_interf_dir(struct config_group *parent,
                configfs_add_default_group(&d->group, os_desc_group);
        }
 
-       return 0;
+       return os_desc_group;
 }
 EXPORT_SYMBOL(usb_os_desc_prepare_interf_dir);
 
index 36c468c4f5e90be54e7356d48dc2037476a62994..3b6f5298b2e830904bddb4078c6a7bd35c91b42c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef USB__GADGET__CONFIGFS__H
 #define USB__GADGET__CONFIGFS__H
 
@@ -5,11 +6,12 @@
 
 void unregister_gadget_item(struct config_item *item);
 
-int usb_os_desc_prepare_interf_dir(struct config_group *parent,
-                                  int n_interf,
-                                  struct usb_os_desc **desc,
-                                  char **names,
-                                  struct module *owner);
+struct config_group *usb_os_desc_prepare_interf_dir(
+               struct config_group *parent,
+               int n_interf,
+               struct usb_os_desc **desc,
+               char **names,
+               struct module *owner);
 
 static inline struct usb_os_desc *to_usb_os_desc(struct config_item *item)
 {
index 86e8252699476c1bb7af5d3fa6012eeae2500d7a..5d3a6cf022185f5155e6b25c897df1198a2ff20a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # USB peripheral controller drivers
 #
index 9990944a724584c57603a489f411a81d17aef99b..8b342587f8ad6eb3d79d25d602b741592ec911ab 100644 (file)
@@ -46,7 +46,8 @@
 static void ffs_data_get(struct ffs_data *ffs);
 static void ffs_data_put(struct ffs_data *ffs);
 /* Creates new ffs_data object. */
-static struct ffs_data *__must_check ffs_data_new(void) __attribute__((malloc));
+static struct ffs_data *__must_check ffs_data_new(const char *dev_name)
+       __attribute__((malloc));
 
 /* Opened counter handling. */
 static void ffs_data_opened(struct ffs_data *ffs);
@@ -780,11 +781,12 @@ static void ffs_epfile_async_io_complete(struct usb_ep *_ep,
                                         struct usb_request *req)
 {
        struct ffs_io_data *io_data = req->context;
+       struct ffs_data *ffs = io_data->ffs;
 
        ENTER();
 
        INIT_WORK(&io_data->work, ffs_user_copy_worker);
-       schedule_work(&io_data->work);
+       queue_work(ffs->io_completion_wq, &io_data->work);
 }
 
 static void __ffs_epfile_read_buffer_free(struct ffs_epfile *epfile)
@@ -1500,7 +1502,7 @@ ffs_fs_mount(struct file_system_type *t, int flags,
        if (unlikely(ret < 0))
                return ERR_PTR(ret);
 
-       ffs = ffs_data_new();
+       ffs = ffs_data_new(dev_name);
        if (unlikely(!ffs))
                return ERR_PTR(-ENOMEM);
        ffs->file_perms = data.perms;
@@ -1610,6 +1612,7 @@ static void ffs_data_put(struct ffs_data *ffs)
                BUG_ON(waitqueue_active(&ffs->ev.waitq) ||
                       waitqueue_active(&ffs->ep0req_completion.wait) ||
                       waitqueue_active(&ffs->wait));
+               destroy_workqueue(ffs->io_completion_wq);
                kfree(ffs->dev_name);
                kfree(ffs);
        }
@@ -1642,7 +1645,7 @@ static void ffs_data_closed(struct ffs_data *ffs)
        ffs_data_put(ffs);
 }
 
-static struct ffs_data *ffs_data_new(void)
+static struct ffs_data *ffs_data_new(const char *dev_name)
 {
        struct ffs_data *ffs = kzalloc(sizeof *ffs, GFP_KERNEL);
        if (unlikely(!ffs))
@@ -1650,6 +1653,12 @@ static struct ffs_data *ffs_data_new(void)
 
        ENTER();
 
+       ffs->io_completion_wq = alloc_ordered_workqueue("%s", 0, dev_name);
+       if (!ffs->io_completion_wq) {
+               kfree(ffs);
+               return NULL;
+       }
+
        refcount_set(&ffs->ref, 1);
        atomic_set(&ffs->opened, 0);
        ffs->state = FFS_READ_DESCRIPTORS;
index d6bd0244b008aa93f91e63049fe96fbc0b9eccfe..5153e29870c3917fe4cdefc1e4c920536cdd4bf4 100644 (file)
@@ -307,8 +307,6 @@ struct fsg_common {
        struct completion       thread_notifier;
        struct task_struct      *thread_task;
 
-       /* Callback functions. */
-       const struct fsg_operations     *ops;
        /* Gadget's private data. */
        void                    *private_data;
 
@@ -2438,6 +2436,7 @@ static void handle_exception(struct fsg_common *common)
 static int fsg_main_thread(void *common_)
 {
        struct fsg_common       *common = common_;
+       int                     i;
 
        /*
         * Allow the thread to be killed by a signal, but set the signal mask
@@ -2476,21 +2475,16 @@ static int fsg_main_thread(void *common_)
        common->thread_task = NULL;
        spin_unlock_irq(&common->lock);
 
-       if (!common->ops || !common->ops->thread_exits
-        || common->ops->thread_exits(common) < 0) {
-               int i;
+       /* Eject media from all LUNs */
 
-               down_write(&common->filesem);
-               for (i = 0; i < ARRAY_SIZE(common->luns); i++) {
-                       struct fsg_lun *curlun = common->luns[i];
-                       if (!curlun || !fsg_lun_is_open(curlun))
-                               continue;
+       down_write(&common->filesem);
+       for (i = 0; i < ARRAY_SIZE(common->luns); i++) {
+               struct fsg_lun *curlun = common->luns[i];
 
+               if (curlun && fsg_lun_is_open(curlun))
                        fsg_lun_close(curlun);
-                       curlun->unit_attention_data = SS_MEDIUM_NOT_PRESENT;
-               }
-               up_write(&common->filesem);
        }
+       up_write(&common->filesem);
 
        /* Let fsg_unbind() know the thread has exited */
        complete_and_exit(&common->thread_notifier, 0);
@@ -2681,13 +2675,6 @@ void fsg_common_remove_luns(struct fsg_common *common)
 }
 EXPORT_SYMBOL_GPL(fsg_common_remove_luns);
 
-void fsg_common_set_ops(struct fsg_common *common,
-                       const struct fsg_operations *ops)
-{
-       common->ops = ops;
-}
-EXPORT_SYMBOL_GPL(fsg_common_set_ops);
-
 void fsg_common_free_buffers(struct fsg_common *common)
 {
        _fsg_common_free_buffers(common->buffhds, common->fsg_num_buffers);
index d3902313b8ac44dd2a53ba16b346b0d585c3f2e1..58857fcf199f54abdc00dff887aa9310c80fa4e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef USB_F_MASS_STORAGE_H
 #define USB_F_MASS_STORAGE_H
 
@@ -60,17 +61,6 @@ struct fsg_module_parameters {
 struct fsg_common;
 
 /* FSF callback functions */
-struct fsg_operations {
-       /*
-        * Callback function to call when thread exits.  If no
-        * callback is set or it returns value lower then zero MSF
-        * will force eject all LUNs it operates on (including those
-        * marked as non-removable or with prevent_medium_removal flag
-        * set).
-        */
-       int (*thread_exits)(struct fsg_common *common);
-};
-
 struct fsg_lun_opts {
        struct config_group group;
        struct fsg_lun *lun;
@@ -142,9 +132,6 @@ void fsg_common_remove_lun(struct fsg_lun *lun);
 
 void fsg_common_remove_luns(struct fsg_common *common);
 
-void fsg_common_set_ops(struct fsg_common *common,
-                       const struct fsg_operations *ops);
-
 int fsg_common_create_lun(struct fsg_common *common, struct fsg_lun_config *cfg,
                          unsigned int id, const char *name,
                          const char **name_pfx);
index 8df244fc9d80daa4c7caf0da729bae2ac66137a2..ea0da35a44e2e9f3f2c0e11921568da68b70fafd 100644 (file)
@@ -555,6 +555,7 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
        size_t                  size;   /* Amount of data in a TX request. */
        size_t                  bytes_copied = 0;
        struct usb_request      *req;
+       int                     value;
 
        DBG(dev, "printer_write trying to send %d bytes\n", (int)len);
 
@@ -634,7 +635,11 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
                        return -EAGAIN;
                }
 
-               if (usb_ep_queue(dev->in_ep, req, GFP_ATOMIC)) {
+               /* here, we unlock, and only unlock, to avoid deadlock. */
+               spin_unlock(&dev->lock);
+               value = usb_ep_queue(dev->in_ep, req, GFP_ATOMIC);
+               spin_lock(&dev->lock);
+               if (value) {
                        list_add(&req->list, &dev->tx_reqs);
                        spin_unlock_irqrestore(&dev->lock, flags);
                        mutex_unlock(&dev->lock_printer_io);
index e1d5853ef1e429743637ab546b229a02ee49245c..c7c5b3ce1d98840d8d4e9122d60fd51ae75b330d 100644 (file)
@@ -908,6 +908,7 @@ static void rndis_free_inst(struct usb_function_instance *f)
                        free_netdev(opts->net);
        }
 
+       kfree(opts->rndis_interf_group);        /* single VLA chunk */
        kfree(opts);
 }
 
@@ -916,6 +917,7 @@ static struct usb_function_instance *rndis_alloc_inst(void)
        struct f_rndis_opts *opts;
        struct usb_os_desc *descs[1];
        char *names[1];
+       struct config_group *rndis_interf_group;
 
        opts = kzalloc(sizeof(*opts), GFP_KERNEL);
        if (!opts)
@@ -940,8 +942,14 @@ static struct usb_function_instance *rndis_alloc_inst(void)
        names[0] = "rndis";
        config_group_init_type_name(&opts->func_inst.group, "",
                                    &rndis_func_type);
-       usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs,
-                                      names, THIS_MODULE);
+       rndis_interf_group =
+               usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs,
+                                              names, THIS_MODULE);
+       if (IS_ERR(rndis_interf_group)) {
+               rndis_free_inst(&opts->func_inst);
+               return ERR_CAST(rndis_interf_group);
+       }
+       opts->rndis_interf_group = rndis_interf_group;
 
        return &opts->func_inst;
 }
index 492924d0d599baa18c4fd0c8d5f3d1d93aa2c8c7..98b8462ad5381486d88aa89d92e44ad76a8c9fc6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header declares the utility functions used by "Gadget Zero", plus
  * interfaces to its two single-configuration function drivers.
index e0814a96013203752b2ab7400e2b70463c2cd82a..e5e3a2553aaaa0b7ca233ea68047297d7c9eee7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef USB_STORAGE_COMMON_H
 #define USB_STORAGE_COMMON_H
 
index a27e6e34db0b0dc130a965b45772a2e7b6f62c7f..3cd565794ad74266dc349273fc04e215af1f7b26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TARGET_USB_GADGET_H__
 #define __TARGET_USB_GADGET_H__
 
index 540f1c48c1a8d1a8bf058609bc5f455e3cf1dc57..79f70ebf85dc351c77d25e3315619cce280ed544 100644 (file)
@@ -279,6 +279,7 @@ struct ffs_data {
        }                               file_perms;
 
        struct eventfd_ctx *ffs_eventfd;
+       struct workqueue_struct *io_completion_wq;
        bool no_disconnect;
        struct work_struct reset_work;
 
index a35ee3c2545d9591aa4ef6b6b947cbedbe3f0093..efdb7ac381d973c6cca8f4665ea4ab9ba0083294 100644 (file)
@@ -26,6 +26,7 @@ struct f_rndis_opts {
        bool                            bound;
        bool                            borrowed_net;
 
+       struct config_group             *rndis_interf_group;
        struct usb_os_desc              rndis_os_desc;
        char                            rndis_ext_compat_id[16];
 
index ac461a9a1a70661da55e5f8a01b7fbde6caaf826..51ee94e5cf2b74a8f68b312792e215eb27060045 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UVC_QUEUE_H_
 #define _UVC_QUEUE_H_
 
index 7f485f25705eff517fb1615200bca1c2d77b9fae..abd0c3e66a05d8de76be3039e0a41047247d89c4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # USB gadget drivers
 #
index 684900fcfe24c3c5ab206568f24da857434a654f..5c28bee327e15440210eb33cfb427f7a1fd659b3 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/aio.h>
 #include <linux/uio.h>
 #include <linux/refcount.h>
-
+#include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/moduleparam.h>
 
@@ -116,6 +116,7 @@ enum ep0_state {
 struct dev_data {
        spinlock_t                      lock;
        refcount_t                      count;
+       int                             udc_usage;
        enum ep0_state                  state;          /* P: lock */
        struct usb_gadgetfs_event       event [N_EVENT];
        unsigned                        ev_next;
@@ -513,9 +514,9 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
                INIT_WORK(&priv->work, ep_user_copy_worker);
                schedule_work(&priv->work);
        }
-       spin_unlock(&epdata->dev->lock);
 
        usb_ep_free_request(ep, req);
+       spin_unlock(&epdata->dev->lock);
        put_ep(epdata);
 }
 
@@ -939,9 +940,11 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
                        struct usb_request      *req = dev->req;
 
                        if ((retval = setup_req (ep, req, 0)) == 0) {
+                               ++dev->udc_usage;
                                spin_unlock_irq (&dev->lock);
                                retval = usb_ep_queue (ep, req, GFP_KERNEL);
                                spin_lock_irq (&dev->lock);
+                               --dev->udc_usage;
                        }
                        dev->state = STATE_DEV_CONNECTED;
 
@@ -983,11 +986,14 @@ ep0_read (struct file *fd, char __user *buf, size_t len, loff_t *ptr)
                                retval = -EIO;
                        else {
                                len = min (len, (size_t)dev->req->actual);
-// FIXME don't call this with the spinlock held ...
+                               ++dev->udc_usage;
+                               spin_unlock_irq(&dev->lock);
                                if (copy_to_user (buf, dev->req->buf, len))
                                        retval = -EFAULT;
                                else
                                        retval = len;
+                               spin_lock_irq(&dev->lock);
+                               --dev->udc_usage;
                                clean_req (dev->gadget->ep0, dev->req);
                                /* NOTE userspace can't yet choose to stall */
                        }
@@ -1131,6 +1137,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
                        retval = setup_req (dev->gadget->ep0, dev->req, len);
                        if (retval == 0) {
                                dev->state = STATE_DEV_CONNECTED;
+                               ++dev->udc_usage;
                                spin_unlock_irq (&dev->lock);
                                if (copy_from_user (dev->req->buf, buf, len))
                                        retval = -EFAULT;
@@ -1142,6 +1149,7 @@ ep0_write (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
                                                GFP_KERNEL);
                                }
                                spin_lock_irq(&dev->lock);
+                               --dev->udc_usage;
                                if (retval < 0) {
                                        clean_req (dev->gadget->ep0, dev->req);
                                } else
@@ -1243,9 +1251,21 @@ static long dev_ioctl (struct file *fd, unsigned code, unsigned long value)
        struct usb_gadget       *gadget = dev->gadget;
        long ret = -ENOTTY;
 
-       if (gadget->ops->ioctl)
+       spin_lock_irq(&dev->lock);
+       if (dev->state == STATE_DEV_OPENED ||
+                       dev->state == STATE_DEV_UNBOUND) {
+               /* Not bound to a UDC */
+       } else if (gadget->ops->ioctl) {
+               ++dev->udc_usage;
+               spin_unlock_irq(&dev->lock);
+
                ret = gadget->ops->ioctl (gadget, code, value);
 
+               spin_lock_irq(&dev->lock);
+               --dev->udc_usage;
+       }
+       spin_unlock_irq(&dev->lock);
+
        return ret;
 }
 
@@ -1463,10 +1483,12 @@ delegate:
                                if (value < 0)
                                        break;
 
+                               ++dev->udc_usage;
                                spin_unlock (&dev->lock);
                                value = usb_ep_queue (gadget->ep0, dev->req,
                                                        GFP_KERNEL);
                                spin_lock (&dev->lock);
+                               --dev->udc_usage;
                                if (value < 0) {
                                        clean_req (gadget->ep0, dev->req);
                                        break;
@@ -1490,8 +1512,12 @@ delegate:
                req->length = value;
                req->zero = value < w_length;
 
+               ++dev->udc_usage;
                spin_unlock (&dev->lock);
                value = usb_ep_queue (gadget->ep0, req, GFP_KERNEL);
+               spin_lock(&dev->lock);
+               --dev->udc_usage;
+               spin_unlock(&dev->lock);
                if (value < 0) {
                        DBG (dev, "ep_queue --> %d\n", value);
                        req->status = 0;
@@ -1518,21 +1544,24 @@ static void destroy_ep_files (struct dev_data *dev)
                /* break link to FS */
                ep = list_first_entry (&dev->epfiles, struct ep_data, epfiles);
                list_del_init (&ep->epfiles);
+               spin_unlock_irq (&dev->lock);
+
                dentry = ep->dentry;
                ep->dentry = NULL;
                parent = d_inode(dentry->d_parent);
 
                /* break link to controller */
+               mutex_lock(&ep->lock);
                if (ep->state == STATE_EP_ENABLED)
                        (void) usb_ep_disable (ep->ep);
                ep->state = STATE_EP_UNBOUND;
                usb_ep_free_request (ep->ep, ep->req);
                ep->ep = NULL;
+               mutex_unlock(&ep->lock);
+
                wake_up (&ep->wait);
                put_ep (ep);
 
-               spin_unlock_irq (&dev->lock);
-
                /* break link to dcache */
                inode_lock(parent);
                d_delete (dentry);
@@ -1603,6 +1632,11 @@ gadgetfs_unbind (struct usb_gadget *gadget)
 
        spin_lock_irq (&dev->lock);
        dev->state = STATE_DEV_UNBOUND;
+       while (dev->udc_usage > 0) {
+               spin_unlock_irq(&dev->lock);
+               usleep_range(1000, 2000);
+               spin_lock_irq(&dev->lock);
+       }
        spin_unlock_irq (&dev->lock);
 
        destroy_ep_files (dev);
index e99ab57ee3e589a5df5ed8e0c4063ff6861158fb..fcba59782f265fc216d44d4b0394f79f08b320a7 100644 (file)
@@ -107,15 +107,6 @@ static unsigned int fsg_num_buffers = CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS;
 
 FSG_MODULE_PARAMETERS(/* no prefix */, mod_data);
 
-static unsigned long msg_registered;
-static void msg_cleanup(void);
-
-static int msg_thread_exits(struct fsg_common *common)
-{
-       msg_cleanup();
-       return 0;
-}
-
 static int msg_do_config(struct usb_configuration *c)
 {
        struct fsg_opts *opts;
@@ -154,9 +145,6 @@ static struct usb_configuration msg_config_driver = {
 
 static int msg_bind(struct usb_composite_dev *cdev)
 {
-       static const struct fsg_operations ops = {
-               .thread_exits = msg_thread_exits,
-       };
        struct fsg_opts *opts;
        struct fsg_config config;
        int status;
@@ -173,8 +161,6 @@ static int msg_bind(struct usb_composite_dev *cdev)
        if (status)
                goto fail;
 
-       fsg_common_set_ops(opts->common, &ops);
-
        status = fsg_common_set_cdev(opts->common, cdev, config.can_stall);
        if (status)
                goto fail_set_cdev;
@@ -256,18 +242,12 @@ MODULE_LICENSE("GPL");
 
 static int __init msg_init(void)
 {
-       int ret;
-
-       ret = usb_composite_probe(&msg_driver);
-       set_bit(0, &msg_registered);
-
-       return ret;
+       return usb_composite_probe(&msg_driver);
 }
 module_init(msg_init);
 
-static void msg_cleanup(void)
+static void __exit msg_cleanup(void)
 {
-       if (test_and_clear_bit(0, &msg_registered))
-               usb_composite_unregister(&msg_driver);
+       usb_composite_unregister(&msg_driver);
 }
 module_exit(msg_cleanup);
index 7cd5c969fcbe9724ec0892403f1a5bd1c7d01320..1e9567091d86073f6e77f85021531de142c055a2 100644 (file)
@@ -273,6 +273,7 @@ config USB_SNP_CORE
 config USB_SNP_UDC_PLAT
        tristate "Synopsys USB 2.0 Device controller"
        depends on USB_GADGET && OF && HAS_DMA
+       depends on EXTCON || EXTCON=n
        select USB_GADGET_DUALSPEED
        select USB_SNP_CORE
        default ARCH_BCM_IPROC
index ea9e1c7f19236b7df5d7397881c4c559aa4d207e..ce865b129fd64cc6fdd902ef179bfbb42fd50a44 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # define_trace.h needs to know how to find our header
 CFLAGS_trace.o                 := -I$(src)
 
index 98d71400f8a134442232196d47380fefb3b222fd..a884c022df7a5455e1f0c2746dd933afc55f65e3 100644 (file)
@@ -29,6 +29,8 @@
 #include <linux/of_gpio.h>
 
 #include "atmel_usba_udc.h"
+#define USBA_VBUS_IRQFLAGS (IRQF_ONESHOT \
+                          | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING)
 
 #ifdef CONFIG_USB_GADGET_DEBUG_FS
 #include <linux/debugfs.h>
@@ -2361,7 +2363,7 @@ static int usba_udc_probe(struct platform_device *pdev)
                                        IRQ_NOAUTOEN);
                        ret = devm_request_threaded_irq(&pdev->dev,
                                        gpio_to_irq(udc->vbus_pin), NULL,
-                                       usba_vbus_irq_thread, IRQF_ONESHOT,
+                                       usba_vbus_irq_thread, USBA_VBUS_IRQFLAGS,
                                        "atmel_usba_udc", udc);
                        if (ret) {
                                udc->vbus_pin = -ENODEV;
index 5cf6a3bcdf0fa9b13bf5928c58b4bb55da1d004f..52cb5ea48bbec9c1e8ebfa1e63f39d8c75ef4109 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_USB_BDC_UDC)      += bdc.o
 bdc-y  := bdc_core.o bdc_cmd.o bdc_ep.o bdc_udc.o
 
index 75c51ca4ee0f33cc419d36a3f928da093a30179d..d41d07aae0cec07294cd9917d8ccdbd57f1f29ca 100644 (file)
@@ -1320,8 +1320,7 @@ static int udc_bind_to_driver(struct usb_udc *udc, struct usb_gadget_driver *dri
        udc->dev.driver = &driver->driver;
        udc->gadget->dev.driver = &driver->driver;
 
-       if (driver->max_speed < udc->gadget->max_speed)
-               usb_gadget_udc_set_speed(udc, driver->max_speed);
+       usb_gadget_udc_set_speed(udc, driver->max_speed);
 
        ret = driver->bind(udc->gadget, driver);
        if (ret)
index a030d7923d7db4b4776f04eea94ca484c4e623d0..f04e91ef9e7c1c3fa5320659eb52dd20ccc1883d 100644 (file)
@@ -237,6 +237,8 @@ struct dummy_hcd {
 
        struct usb_device               *udev;
        struct list_head                urbp_list;
+       struct urbp                     *next_frame_urbp;
+
        u32                             stream_en_ep;
        u8                              num_stream[30 / 2];
 
@@ -253,11 +255,13 @@ struct dummy {
         */
        struct dummy_ep                 ep[DUMMY_ENDPOINTS];
        int                             address;
+       int                             callback_usage;
        struct usb_gadget               gadget;
        struct usb_gadget_driver        *driver;
        struct dummy_request            fifo_req;
        u8                              fifo_buf[FIFO_SIZE];
        u16                             devstatus;
+       unsigned                        ints_enabled:1;
        unsigned                        udc_suspended:1;
        unsigned                        pullup:1;
 
@@ -375,11 +379,10 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd)
                             USB_PORT_STAT_CONNECTION) == 0)
                                dum_hcd->port_status |=
                                        (USB_PORT_STAT_C_CONNECTION << 16);
-                       if ((dum_hcd->port_status &
-                            USB_PORT_STAT_ENABLE) == 1 &&
-                               (dum_hcd->port_status &
-                                USB_SS_PORT_LS_U0) == 1 &&
-                               dum_hcd->rh_state != DUMMY_RH_SUSPENDED)
+                       if ((dum_hcd->port_status & USB_PORT_STAT_ENABLE) &&
+                           (dum_hcd->port_status &
+                            USB_PORT_STAT_LINK_STATE) == USB_SS_PORT_LS_U0 &&
+                           dum_hcd->rh_state != DUMMY_RH_SUSPENDED)
                                dum_hcd->active = 1;
                }
        } else {
@@ -416,6 +419,7 @@ static void set_link_state_by_speed(struct dummy_hcd *dum_hcd)
 static void set_link_state(struct dummy_hcd *dum_hcd)
 {
        struct dummy *dum = dum_hcd->dum;
+       unsigned int power_bit;
 
        dum_hcd->active = 0;
        if (dum->pullup)
@@ -426,32 +430,43 @@ static void set_link_state(struct dummy_hcd *dum_hcd)
                        return;
 
        set_link_state_by_speed(dum_hcd);
+       power_bit = (dummy_hcd_to_hcd(dum_hcd)->speed == HCD_USB3 ?
+                       USB_SS_PORT_STAT_POWER : USB_PORT_STAT_POWER);
 
        if ((dum_hcd->port_status & USB_PORT_STAT_ENABLE) == 0 ||
             dum_hcd->active)
                dum_hcd->resuming = 0;
 
        /* Currently !connected or in reset */
-       if ((dum_hcd->port_status & USB_PORT_STAT_CONNECTION) == 0 ||
+       if ((dum_hcd->port_status & power_bit) == 0 ||
                        (dum_hcd->port_status & USB_PORT_STAT_RESET) != 0) {
-               unsigned disconnect = USB_PORT_STAT_CONNECTION &
+               unsigned int disconnect = power_bit &
                                dum_hcd->old_status & (~dum_hcd->port_status);
-               unsigned reset = USB_PORT_STAT_RESET &
+               unsigned int reset = USB_PORT_STAT_RESET &
                                (~dum_hcd->old_status) & dum_hcd->port_status;
 
                /* Report reset and disconnect events to the driver */
-               if (dum->driver && (disconnect || reset)) {
+               if (dum->ints_enabled && (disconnect || reset)) {
                        stop_activity(dum);
+                       ++dum->callback_usage;
+                       spin_unlock(&dum->lock);
                        if (reset)
                                usb_gadget_udc_reset(&dum->gadget, dum->driver);
                        else
                                dum->driver->disconnect(&dum->gadget);
+                       spin_lock(&dum->lock);
+                       --dum->callback_usage;
                }
-       } else if (dum_hcd->active != dum_hcd->old_active) {
+       } else if (dum_hcd->active != dum_hcd->old_active &&
+                       dum->ints_enabled) {
+               ++dum->callback_usage;
+               spin_unlock(&dum->lock);
                if (dum_hcd->old_active && dum->driver->suspend)
                        dum->driver->suspend(&dum->gadget);
                else if (!dum_hcd->old_active &&  dum->driver->resume)
                        dum->driver->resume(&dum->gadget);
+               spin_lock(&dum->lock);
+               --dum->callback_usage;
        }
 
        dum_hcd->old_status = dum_hcd->port_status;
@@ -972,8 +987,11 @@ static int dummy_udc_start(struct usb_gadget *g,
         * can't enumerate without help from the driver we're binding.
         */
 
+       spin_lock_irq(&dum->lock);
        dum->devstatus = 0;
        dum->driver = driver;
+       dum->ints_enabled = 1;
+       spin_unlock_irq(&dum->lock);
 
        return 0;
 }
@@ -984,6 +1002,16 @@ static int dummy_udc_stop(struct usb_gadget *g)
        struct dummy            *dum = dum_hcd->dum;
 
        spin_lock_irq(&dum->lock);
+       dum->ints_enabled = 0;
+       stop_activity(dum);
+
+       /* emulate synchronize_irq(): wait for callbacks to finish */
+       while (dum->callback_usage > 0) {
+               spin_unlock_irq(&dum->lock);
+               usleep_range(1000, 2000);
+               spin_lock_irq(&dum->lock);
+       }
+
        dum->driver = NULL;
        spin_unlock_irq(&dum->lock);
 
@@ -1037,7 +1065,12 @@ static int dummy_udc_probe(struct platform_device *pdev)
        memzero_explicit(&dum->gadget, sizeof(struct usb_gadget));
        dum->gadget.name = gadget_name;
        dum->gadget.ops = &dummy_ops;
-       dum->gadget.max_speed = USB_SPEED_SUPER;
+       if (mod_data.is_super_speed)
+               dum->gadget.max_speed = USB_SPEED_SUPER;
+       else if (mod_data.is_high_speed)
+               dum->gadget.max_speed = USB_SPEED_HIGH;
+       else
+               dum->gadget.max_speed = USB_SPEED_FULL;
 
        dum->gadget.dev.parent = &pdev->dev;
        init_dummy_udc_hw(dum);
@@ -1246,6 +1279,8 @@ static int dummy_urb_enqueue(
 
        list_add_tail(&urbp->urbp_list, &dum_hcd->urbp_list);
        urb->hcpriv = urbp;
+       if (!dum_hcd->next_frame_urbp)
+               dum_hcd->next_frame_urbp = urbp;
        if (usb_pipetype(urb->pipe) == PIPE_CONTROL)
                urb->error_count = 1;           /* mark as a new urb */
 
@@ -1521,6 +1556,8 @@ static struct dummy_ep *find_endpoint(struct dummy *dum, u8 address)
        if (!is_active((dum->gadget.speed == USB_SPEED_SUPER ?
                        dum->ss_hcd : dum->hs_hcd)))
                return NULL;
+       if (!dum->ints_enabled)
+               return NULL;
        if ((address & ~USB_DIR_IN) == 0)
                return &dum->ep[0];
        for (i = 1; i < DUMMY_ENDPOINTS; i++) {
@@ -1762,6 +1799,7 @@ static void dummy_timer(unsigned long _dum_hcd)
                spin_unlock_irqrestore(&dum->lock, flags);
                return;
        }
+       dum_hcd->next_frame_urbp = NULL;
 
        for (i = 0; i < DUMMY_ENDPOINTS; i++) {
                if (!ep_info[i].name)
@@ -1778,6 +1816,10 @@ restart:
                int                     type;
                int                     status = -EINPROGRESS;
 
+               /* stop when we reach URBs queued after the timer interrupt */
+               if (urbp == dum_hcd->next_frame_urbp)
+                       break;
+
                urb = urbp->urb;
                if (urb->unlinked)
                        goto return_urb;
@@ -1857,10 +1899,12 @@ restart:
                         * until setup() returns; no reentrancy issues etc.
                         */
                        if (value > 0) {
+                               ++dum->callback_usage;
                                spin_unlock(&dum->lock);
                                value = dum->driver->setup(&dum->gadget,
                                                &setup);
                                spin_lock(&dum->lock);
+                               --dum->callback_usage;
 
                                if (value >= 0) {
                                        /* no delays (max 64KB data stage) */
@@ -2561,8 +2605,6 @@ static struct hc_driver dummy_hcd = {
        .product_desc =         "Dummy host controller",
        .hcd_priv_size =        sizeof(struct dummy_hcd),
 
-       .flags =                HCD_USB3 | HCD_SHARED,
-
        .reset =                dummy_setup,
        .start =                dummy_start,
        .stop =                 dummy_stop,
@@ -2591,8 +2633,12 @@ static int dummy_hcd_probe(struct platform_device *pdev)
        dev_info(&pdev->dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
        dum = *((void **)dev_get_platdata(&pdev->dev));
 
-       if (!mod_data.is_super_speed)
+       if (mod_data.is_super_speed)
+               dummy_hcd.flags = HCD_USB3 | HCD_SHARED;
+       else if (mod_data.is_high_speed)
                dummy_hcd.flags = HCD_USB2;
+       else
+               dummy_hcd.flags = HCD_USB11;
        hs_hcd = usb_create_hcd(&dummy_hcd, &pdev->dev, dev_name(&pdev->dev));
        if (!hs_hcd)
                return -ENOMEM;
index 26974196cf4454701d00e00b33dd9d8725628e7d..00f9e608e755505a4cb466578961f8adb336c9fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * omap_udc.h -- for omap 3.2 udc, with OTG support
  *
index df37c1e6e9d5cc3e5cd1a7f1a632d768c2460c48..63a206122058968a1fb8fec424c0ca8022a1f0f6 100644 (file)
@@ -1038,7 +1038,7 @@ static int usb3_write_pipe(struct renesas_usb3_ep *usb3_ep,
                        usb3_ep->ep.maxpacket);
        u8 *buf = usb3_req->req.buf + usb3_req->req.actual;
        u32 tmp = 0;
-       bool is_last;
+       bool is_last = !len ? true : false;
 
        if (usb3_wait_pipe_status(usb3_ep, PX_STA_BUFSTS) < 0)
                return -EBUSY;
@@ -1059,7 +1059,8 @@ static int usb3_write_pipe(struct renesas_usb3_ep *usb3_ep,
                usb3_write(usb3, tmp, fifo_reg);
        }
 
-       is_last = usb3_is_transfer_complete(usb3_ep, usb3_req);
+       if (!is_last)
+               is_last = usb3_is_transfer_complete(usb3_ep, usb3_req);
        /* Send the data */
        usb3_set_px_con_send(usb3_ep, len, is_last);
 
@@ -1150,7 +1151,8 @@ static void usb3_start_pipe0(struct renesas_usb3_ep *usb3_ep,
                usb3_set_p0_con_for_ctrl_read_data(usb3);
        } else {
                usb3_clear_bit(usb3, P0_MOD_DIR, USB3_P0_MOD);
-               usb3_set_p0_con_for_ctrl_write_data(usb3);
+               if (usb3_req->req.length)
+                       usb3_set_p0_con_for_ctrl_write_data(usb3);
        }
 
        usb3_p0_xfer(usb3_ep, usb3_req);
@@ -2053,7 +2055,16 @@ static u32 usb3_calc_ramarea(int ram_size)
 static u32 usb3_calc_rammap_val(struct renesas_usb3_ep *usb3_ep,
                                const struct usb_endpoint_descriptor *desc)
 {
-       return usb3_ep->rammap_val | PN_RAMMAP_MPKT(usb_endpoint_maxp(desc));
+       int i;
+       const u32 max_packet_array[] = {8, 16, 32, 64, 512};
+       u32 mpkt = PN_RAMMAP_MPKT(1024);
+
+       for (i = 0; i < ARRAY_SIZE(max_packet_array); i++) {
+               if (usb_endpoint_maxp(desc) <= max_packet_array[i])
+                       mpkt = PN_RAMMAP_MPKT(max_packet_array[i]);
+       }
+
+       return usb3_ep->rammap_val | mpkt;
 }
 
 static int usb3_enable_pipe_n(struct renesas_usb3_ep *usb3_ep,
index cf2691fffcc0a5429858e39479a3c313be23d17b..4ab2689c8952becf01294a887f74a331fa1cc539 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for USB Host Controller Drivers
 #
index b5cfa7aeb277c783a9931931e4d902e40c92bf3b..7fcd785c7bc85471ce7ebf1a55571f690c6da5fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_FOTG210_H
 #define __LINUX_FOTG210_H
 
index dd34b7a33965e5da69d87c5a4c71b039cfc591e7..a5e929c10d535bf83a715342c376d25374926ace 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ISP116x register declarations and HCD data structures
  *
index 3b0b4847c3a95430b55ca825edf941b866095ac3..da79e36ced89d8fcecd1f48d77d737d9140ac7d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ISP1362 HCD (Host Controller Driver) for USB.
  *
index 1c216ad9aad28426913f68b4dc12dac6f6699953..437044147862ef4ca754c5a0a7f00fa5a402d53f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Host interface registers
  */
index 658d9d1f9ea3766c6236ab8d39e5fcd5604ce0d6..6dda3623a276d34f0926ee225a6becee16226a47 100644 (file)
@@ -447,7 +447,7 @@ static int usb_asmedia_wait_write(struct pci_dev *pdev)
                if ((value & ASMT_CONTROL_WRITE_BIT) == 0)
                        return 0;
 
-               usleep_range(40, 60);
+               udelay(50);
        }
 
        dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__);
@@ -1022,7 +1022,7 @@ EXPORT_SYMBOL_GPL(usb_disable_xhci_ports);
  *
  * Takes care of the handoff between the Pre-OS (i.e. BIOS) and the OS.
  * It signals to the BIOS that the OS wants control of the host controller,
- * and then waits 5 seconds for the BIOS to hand over control.
+ * and then waits 1 second for the BIOS to hand over control.
  * If we timeout, assume the BIOS is broken and take control anyway.
  */
 static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
@@ -1069,9 +1069,9 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
        if (val & XHCI_HC_BIOS_OWNED) {
                writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
 
-               /* Wait for 5 seconds with 10 microsecond polling interval */
+               /* Wait for 1 second with 10 microsecond polling interval */
                timeout = handshake(base + ext_cap_offset, XHCI_HC_BIOS_OWNED,
-                               0, 5000, 10);
+                               0, 1000000, 10);
 
                /* Assume a buggy BIOS and take HC ownership anyway */
                if (timeout) {
@@ -1100,7 +1100,7 @@ hc_init:
         * operational or runtime registers.  Wait 5 seconds and no more.
         */
        timeout = handshake(op_reg_base + XHCI_STS_OFFSET, XHCI_STS_CNR, 0,
-                       5000, 10);
+                       5000000, 10);
        /* Assume a buggy HC and start HC initialization anyway */
        if (timeout) {
                val = readl(op_reg_base + XHCI_STS_OFFSET);
index 5582cbafecd4c1a3ddc5443d6cc9182a9b9bc89f..b68dcb5dd0fdb0d69b2e2e48cc9f984e58bff56d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_USB_PCI_QUIRKS_H
 #define __LINUX_USB_PCI_QUIRKS_H
 
index 1e23ef49bec15977ff8af019703627c7e85e2233..2abe51a5db4452517ae328f64c7f5dae28eb728a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SL811HS register declarations and HCD data structures
  *
index 9c6635d43db0d88a48f2d54ca8ed9ab776d2ad5f..c4e67c4b51f6ec4adf3d6c1cd93931c1f81ae149 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * UHCI-specific debugging code. Invaluable when something
  * goes wrong, but don't get in my face.
index 0342991c9507a24b31afcb7ca27b4cafb82512e3..2103b1ed0f8ff132ce571ce11de68c53396d7d0d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * UHCI HCD (Host Controller Driver) for GRLIB GRUSBHC
  *
index 91b22b2ea3aa7d4cf11c46ffb3b679c8a9c9942f..d97f0d9b3ce6ce0ec29ad1d79531082c0e392d9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_UHCI_HCD_H
 #define __LINUX_UHCI_HCD_H
 
index ece9e37e89fe2888379d57a63814ed21d00b28be..47106dd8ca7cce69d675f74e2d9470c1eb35e7a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Universal Host Controller Interface driver for USB.
  *
index 49effdc0d8579c2c69d1424bdeb46e9f128f0ea9..0dd944277c99b04f9575281641d1587d60bc7310 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * UHCI HCD (Host Controller Driver) PCI Bus Glue.
  *
index 1b4e086c33a0d5400442198bac244579c85033c5..6cb16d4b22578f4982bd2333b9fd64dacec52bc1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generic UHCI HCD (Host Controller Driver) for Platform Devices
  *
index c17ea1589b8335b94abb1e176d13eb3cfee2b034..49d4edc03cc28bafef6ed4e20a0427c75148b4e7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Universal Host Controller Interface driver for USB.
  *
index ad89a6d4111b45e0c048ee437ffd391f5af846e0..a2336deb5e360cc7fb66b52f8730aa0691852da2 100644 (file)
@@ -112,7 +112,7 @@ static int xhci_create_usb3_bos_desc(struct xhci_hcd *xhci, char *buf,
 
        /* If PSI table exists, add the custom speed attributes from it */
        if (usb3_1 && xhci->usb3_rhub.psi_count) {
-               u32 ssp_cap_base, bm_attrib, psi;
+               u32 ssp_cap_base, bm_attrib, psi, psi_mant, psi_exp;
                int offset;
 
                ssp_cap_base = USB_DT_BOS_SIZE + USB_DT_USB_SS_CAP_SIZE;
@@ -139,6 +139,15 @@ static int xhci_create_usb3_bos_desc(struct xhci_hcd *xhci, char *buf,
                for (i = 0; i < xhci->usb3_rhub.psi_count; i++) {
                        psi = xhci->usb3_rhub.psi[i];
                        psi &= ~USB_SSP_SUBLINK_SPEED_RSVD;
+                       psi_exp = XHCI_EXT_PORT_PSIE(psi);
+                       psi_mant = XHCI_EXT_PORT_PSIM(psi);
+
+                       /* Shift to Gbps and set SSP Link BIT(14) if 10Gpbs */
+                       for (; psi_exp < 3; psi_exp++)
+                               psi_mant /= 1000;
+                       if (psi_mant >= 10)
+                               psi |= BIT(14);
+
                        if ((psi & PLT_MASK) == PLT_SYM) {
                        /* Symmetric, create SSA RX and TX from one PSI entry */
                                put_unaligned_le32(psi, &buf[offset]);
@@ -411,14 +420,25 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
                                                     GFP_NOWAIT);
                        if (!command) {
                                spin_unlock_irqrestore(&xhci->lock, flags);
-                               xhci_free_command(xhci, cmd);
-                               return -ENOMEM;
+                               ret = -ENOMEM;
+                               goto cmd_cleanup;
+                       }
+
+                       ret = xhci_queue_stop_endpoint(xhci, command, slot_id,
+                                                      i, suspend);
+                       if (ret) {
+                               spin_unlock_irqrestore(&xhci->lock, flags);
+                               xhci_free_command(xhci, command);
+                               goto cmd_cleanup;
                        }
-                       xhci_queue_stop_endpoint(xhci, command, slot_id, i,
-                                                suspend);
                }
        }
-       xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
+       ret = xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
+       if (ret) {
+               spin_unlock_irqrestore(&xhci->lock, flags);
+               goto cmd_cleanup;
+       }
+
        xhci_ring_cmd_db(xhci);
        spin_unlock_irqrestore(&xhci->lock, flags);
 
@@ -430,6 +450,8 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
                xhci_warn(xhci, "Timeout while waiting for stop endpoint command\n");
                ret = -ETIME;
        }
+
+cmd_cleanup:
        xhci_free_command(xhci, cmd);
        return ret;
 }
@@ -1506,9 +1528,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd)
                                t2 |= PORT_WKOC_E | PORT_WKCONN_E;
                                t2 &= ~PORT_WKDISC_E;
                        }
-                       if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) &&
-                           (hcd->speed < HCD_USB3))
-                               t2 &= ~PORT_WAKE_BITS;
                } else
                        t2 &= ~PORT_WAKE_BITS;
 
index 8071c8fdd15e741b008af64075cda3c87072bfb4..76f392954733631c7b660cc806d87736fb2d8d15 100644 (file)
 #define PCI_DEVICE_ID_INTEL_APL_XHCI                   0x5aa8
 #define PCI_DEVICE_ID_INTEL_DNV_XHCI                   0x19d0
 
-#define PCI_DEVICE_ID_AMD_PROMONTORYA_4                        0x43b9
-#define PCI_DEVICE_ID_AMD_PROMONTORYA_3                        0x43ba
-#define PCI_DEVICE_ID_AMD_PROMONTORYA_2                        0x43bb
-#define PCI_DEVICE_ID_AMD_PROMONTORYA_1                        0x43bc
-
 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI               0x1142
 
 static const char hcd_name[] = "xhci_hcd";
@@ -142,13 +137,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
        if (pdev->vendor == PCI_VENDOR_ID_AMD)
                xhci->quirks |= XHCI_TRUST_TX_LENGTH;
 
-       if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
-               ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
-               (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
-               (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) ||
-               (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
-               xhci->quirks |= XHCI_U2_DISABLE_WAKE;
-
        if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
                xhci->quirks |= XHCI_LPM_SUPPORT;
                xhci->quirks |= XHCI_INTEL_HOST;
index 163bafde709f79bf52e8e483d6ba6de43125cc48..1cb6eaef4ae14efcee09e5adfe0e913e4e54525c 100644 (file)
@@ -178,14 +178,18 @@ static int xhci_plat_probe(struct platform_device *pdev)
         * 2. xhci_plat is child of a device from firmware (dwc3-plat)
         * 3. xhci_plat is grandchild of a pci device (dwc3-pci)
         */
-       sysdev = &pdev->dev;
-       if (sysdev->parent && !sysdev->of_node && sysdev->parent->of_node)
-               sysdev = sysdev->parent;
+       for (sysdev = &pdev->dev; sysdev; sysdev = sysdev->parent) {
+               if (is_of_node(sysdev->fwnode) ||
+                       is_acpi_device_node(sysdev->fwnode))
+                       break;
 #ifdef CONFIG_PCI
-       else if (sysdev->parent && sysdev->parent->parent &&
-                sysdev->parent->parent->bus == &pci_bus_type)
-               sysdev = sysdev->parent->parent;
+               else if (sysdev->bus == &pci_bus_type)
+                       break;
 #endif
+       }
+
+       if (!sysdev)
+               sysdev = &pdev->dev;
 
        /* Try to set 64-bit DMA first */
        if (WARN_ON(!sysdev->dma_mask))
index a9443651ce0f32c4fafff6cdd7659a187f9923cd..82c746e2d85c0f7148cf780d9614eba3654f303d 100644 (file)
@@ -1309,6 +1309,7 @@ static void xhci_complete_del_and_free_cmd(struct xhci_command *cmd, u32 status)
 void xhci_cleanup_command_queue(struct xhci_hcd *xhci)
 {
        struct xhci_command *cur_cmd, *tmp_cmd;
+       xhci->current_cmd = NULL;
        list_for_each_entry_safe(cur_cmd, tmp_cmd, &xhci->cmd_list, cmd_list)
                xhci_complete_del_and_free_cmd(cur_cmd, COMP_COMMAND_ABORTED);
 }
@@ -2579,15 +2580,21 @@ static int handle_tx_event(struct xhci_hcd *xhci,
                                (struct xhci_generic_trb *) ep_trb);
 
                /*
-                * No-op TRB should not trigger interrupts.
-                * If ep_trb is a no-op TRB, it means the
-                * corresponding TD has been cancelled. Just ignore
-                * the TD.
+                * No-op TRB could trigger interrupts in a case where
+                * a URB was killed and a STALL_ERROR happens right
+                * after the endpoint ring stopped. Reset the halted
+                * endpoint. Otherwise, the endpoint remains stalled
+                * indefinitely.
                 */
                if (trb_is_noop(ep_trb)) {
-                       xhci_dbg(xhci,
-                                "ep_trb is a no-op TRB. Skip it for slot %u ep %u\n",
-                                slot_id, ep_index);
+                       if (trb_comp_code == COMP_STALL_ERROR ||
+                           xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
+                                                             trb_comp_code))
+                               xhci_cleanup_halted_endpoint(xhci, slot_id,
+                                                            ep_index,
+                                                            ep_ring->stream_id,
+                                                            td, ep_trb,
+                                                            EP_HARD_RESET);
                        goto cleanup;
                }
 
index b2ff1ff1a02faff066374cafdf9fa5b531db5b81..51535ba2bcd425d6c039d30ed4b63283c5d39240 100644 (file)
@@ -1703,7 +1703,8 @@ static int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
        if (xhci->quirks & XHCI_MTK_HOST) {
                ret = xhci_mtk_add_ep_quirk(hcd, udev, ep);
                if (ret < 0) {
-                       xhci_free_endpoint_ring(xhci, virt_dev, ep_index);
+                       xhci_ring_free(xhci, virt_dev->eps[ep_index].new_ring);
+                       virt_dev->eps[ep_index].new_ring = NULL;
                        return ret;
                }
        }
@@ -4804,7 +4805,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
                 */
                hcd->has_tt = 1;
        } else {
-               if (xhci->sbrn == 0x31) {
+               /* Some 3.1 hosts return sbrn 0x30, can't rely on sbrn alone */
+               if (xhci->sbrn == 0x31 || xhci->usb3_rhub.min_rev >= 1) {
                        xhci_info(xhci, "Host supports USB 3.1 Enhanced SuperSpeed\n");
                        hcd->speed = HCD_USB31;
                        hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS;
index 2abaa4d6d39daa74ff379020171efaf34a7e9197..2b48aa4f6b767935c64bc66855e43195dce5b2b9 100644 (file)
@@ -735,6 +735,8 @@ struct xhci_ep_ctx {
 #define EP_MAXPSTREAMS(p)      (((p) << 10) & EP_MAXPSTREAMS_MASK)
 /* Endpoint is set up with a Linear Stream Array (vs. Secondary Stream Array) */
 #define        EP_HAS_LSA              (1 << 15)
+/* hosts with LEC=1 use bits 31:24 as ESIT high bits. */
+#define CTX_TO_MAX_ESIT_PAYLOAD_HI(p)  (((p) >> 24) & 0xff)
 
 /* ep_info2 bitmasks */
 /*
@@ -1681,7 +1683,7 @@ struct xhci_bus_state {
 
 static inline unsigned int hcd_index(struct usb_hcd *hcd)
 {
-       if (hcd->speed == HCD_USB3)
+       if (hcd->speed >= HCD_USB3)
                return 0;
        else
                return 1;
@@ -1826,7 +1828,7 @@ struct xhci_hcd {
 /* For controller with a broken Port Disable implementation */
 #define XHCI_BROKEN_PORT_PED   (1 << 25)
 #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
-#define XHCI_U2_DISABLE_WAKE   (1 << 27)
+/* Reserved. It was XHCI_U2_DISABLE_WAKE */
 #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL        (1 << 28)
 
        unsigned int            num_active_eps;
@@ -2540,8 +2542,8 @@ static inline const char *xhci_decode_ep_context(u32 info, u32 info2, u64 deq,
        u8 lsa;
        u8 hid;
 
-       esit = EP_MAX_ESIT_PAYLOAD_HI(info) << 16 |
-               EP_MAX_ESIT_PAYLOAD_LO(tx_info);
+       esit = CTX_TO_MAX_ESIT_PAYLOAD_HI(info) << 16 |
+               CTX_TO_MAX_ESIT_PAYLOAD(tx_info);
 
        ep_state = info & EP_STATE_MASK;
        max_pstr = info & EP_MAXPSTREAMS_MASK;
index 7e32ae787136002fe21491ecabfc45840d541795..66685e59241a37d5344bd411b91990fdb7e2d813 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
  /*
  * Driver for Microtek Scanmaker X6 USB scanner and possibly others.
  * 
index 8e59e0c02b8a421ecd6f2b88e75afc4001fde0e2..bb4d6d9598714a19d6bc0f07fc41e0b7526a626c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Driver for the NXP ISP1760 chip
  *
index 0c1c98d6ea0884e58787286ad3fa8ab5b9c0e05a..f1bb2deb1ccf0ee696402c3b77f3ccb6f7c03459 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ISP1760_HCD_H_
 #define _ISP1760_HCD_H_
 
index bc68bbab7fa170796e06efc11080c67598bcc32b..241a00d7502729190590a4b9f899ebb0cb25c411 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Glue code for the ISP1760 driver and bus
  * Currently there is support for
index 7fdb45fc976fca2bd4c1bfd7e5fa35badfb96c6e..109f54f5b9aa4b8ecc69c9f301e6ff3d668cfd93 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the rest of the USB drivers
 # (the ones that don't fit into any other categories)
index eee82ca55b7b383bc507c39af7e64bb66a63c6a8..b3fc602b2e247ea150a49c13323ae66cde2b6b4b 100644 (file)
@@ -202,12 +202,13 @@ found:
                        return tmp;
        }
 
-       if (in) {
+       if (in)
                dev->in_pipe = usb_rcvbulkpipe(udev,
                        in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+       if (out)
                dev->out_pipe = usb_sndbulkpipe(udev,
                        out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
-       }
+
        if (iso_in) {
                dev->iso_in = &iso_in->desc;
                dev->in_iso_pipe = usb_rcvisocpipe(udev,
@@ -1964,6 +1965,9 @@ test_queue(struct usbtest_dev *dev, struct usbtest_param_32 *param,
        int                     status = 0;
        struct urb              *urbs[param->sglen];
 
+       if (!param->sglen || param->iterations > UINT_MAX / param->sglen)
+               return -EINVAL;
+
        memset(&context, 0, sizeof(context));
        context.count = param->iterations * param->sglen;
        context.dev = dev;
@@ -2087,6 +2091,8 @@ usbtest_do_ioctl(struct usb_interface *intf, struct usbtest_param_32 *param)
 
        if (param->iterations <= 0)
                return -EINVAL;
+       if (param->sglen > MAX_SGLEN)
+               return -EINVAL;
        /*
         * Just a bunch of test cases that every HCD is expected to handle.
         *
index b6d8bf475c9270a5bda4b5235e511c9202fd0fe7..f6ae753ab99b0998fcc99463fd50971f658dfaf0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * The USB Monitor, inspired by Dave Harding's USBMon.
  *
index 5bdf73a574981506f3776b5f6a6ec966d846d937..98ab0cc473d675592ff54ceea1ae99d408eb446e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * The USB Monitor, inspired by Dave Harding's USBMon.
  *
index 19c416d69eb9335e15d7fa46900e2b163a85130a..f5e1bb5e521777f1e5b6b29c61f4c4f9f19f9662 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * The USB Monitor, inspired by Dave Harding's USBMon.
  *
index df9a4df342c7b80fdf28049ccfaa331a8279e2ea..aa64efaba36634405367ca342d212183aa038e44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The USB Monitor, inspired by Dave Harding's USBMon.
  *
index 60e0fff7a847d966b07f13c85318896721718228..4a9715812bf9e9100461fad87b4e0754160425aa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 ccflags-$(CONFIG_USB_MTU3_DEBUG)       += -DDEBUG
 
index 689d42aba8a96d36cff8e93d122644c77ff0d69b..79d4d5439164a0b810899b383567619a7618da8b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # for USB OTG silicon based on Mentor Graphics INVENTRA designs
 #
index 9bb7c5e45c85fc547b870c44bfbb0e37f434086c..16dd1ed44bb52f4f976ea056f2c306193ce64355 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2005-2006 by Texas Instruments */
 
 #ifndef _CPPI_DMA_H_
index 029692053dd3a4e50d47742751d3697f6e4d7a1e..ff5a1a8989d5a5ad5ad599463d6d34533cf13f09 100644 (file)
@@ -906,7 +906,7 @@ b_host:
         */
        if (int_usb & MUSB_INTR_RESET) {
                handled = IRQ_HANDLED;
-               if (devctl & MUSB_DEVCTL_HM) {
+               if (is_host_active(musb)) {
                        /*
                         * When BABBLE happens what we can depends on which
                         * platform MUSB is running, because some platforms
@@ -916,9 +916,7 @@ b_host:
                         * drop the session.
                         */
                        dev_err(musb->controller, "Babble\n");
-
-                       if (is_host_active(musb))
-                               musb_recover_from_babble(musb);
+                       musb_recover_from_babble(musb);
                } else {
                        musb_dbg(musb, "BUS RESET as %s",
                                usb_otg_state_string(musb->xceiv->otg->state));
@@ -1861,22 +1859,22 @@ static void musb_pm_runtime_check_session(struct musb *musb)
                MUSB_DEVCTL_HR;
        switch (devctl & ~s) {
        case MUSB_QUIRK_B_INVALID_VBUS_91:
-               if (musb->quirk_retries--) {
+               if (musb->quirk_retries && !musb->flush_irq_work) {
                        musb_dbg(musb,
                                 "Poll devctl on invalid vbus, assume no session");
                        schedule_delayed_work(&musb->irq_work,
                                              msecs_to_jiffies(1000));
-
+                       musb->quirk_retries--;
                        return;
                }
                /* fall through */
        case MUSB_QUIRK_A_DISCONNECT_19:
-               if (musb->quirk_retries--) {
+               if (musb->quirk_retries && !musb->flush_irq_work) {
                        musb_dbg(musb,
                                 "Poll devctl on possible host mode disconnect");
                        schedule_delayed_work(&musb->irq_work,
                                              msecs_to_jiffies(1000));
-
+                       musb->quirk_retries--;
                        return;
                }
                if (!musb->session)
@@ -2681,8 +2679,15 @@ static int musb_suspend(struct device *dev)
 
        musb_platform_disable(musb);
        musb_disable_interrupts(musb);
+
+       musb->flush_irq_work = true;
+       while (flush_delayed_work(&musb->irq_work))
+               ;
+       musb->flush_irq_work = false;
+
        if (!(musb->io.quirks & MUSB_PRESERVE_SESSION))
                musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
+
        WARN_ON(!list_empty(&musb->pending_list));
 
        spin_lock_irqsave(&musb->lock, flags);
index c748f4ac1154428428eee6853cd37c816a2ea910..20f4614178d98c3155f4a508fb12f594f2cd4b5d 100644 (file)
@@ -428,6 +428,8 @@ struct musb {
        unsigned                test_mode:1;
        unsigned                softconnect:1;
 
+       unsigned                flush_irq_work:1;
+
        u8                      address;
        u8                      test_mode_nr;
        u16                     ackpend;                /* ep0 */
index ba255280a624d6922b82d501bf96ce3933359f1d..1ec0a4947b6b887414afd633e540e68470650113 100644 (file)
 
 #define MUSB_DMA_NUM_CHANNELS 15
 
+#define DA8XX_USB_MODE         0x10
+#define DA8XX_USB_AUTOREQ      0x14
+#define DA8XX_USB_TEARDOWN     0x1c
+
+#define DA8XX_DMA_NUM_CHANNELS 4
+
 struct cppi41_dma_controller {
        struct dma_controller controller;
-       struct cppi41_dma_channel rx_channel[MUSB_DMA_NUM_CHANNELS];
-       struct cppi41_dma_channel tx_channel[MUSB_DMA_NUM_CHANNELS];
+       struct cppi41_dma_channel *rx_channel;
+       struct cppi41_dma_channel *tx_channel;
        struct hrtimer early_tx;
        struct list_head early_tx_list;
        u32 rx_mode;
        u32 tx_mode;
        u32 auto_req;
+
+       u32 tdown_reg;
+       u32 autoreq_reg;
+
+       void (*set_dma_mode)(struct cppi41_dma_channel *cppi41_channel,
+                            unsigned int mode);
+       u8 num_channels;
 };
 
 static void save_rx_toggle(struct cppi41_dma_channel *cppi41_channel)
@@ -349,6 +362,32 @@ static void cppi41_set_dma_mode(struct cppi41_dma_channel *cppi41_channel,
        }
 }
 
+static void da8xx_set_dma_mode(struct cppi41_dma_channel *cppi41_channel,
+               unsigned int mode)
+{
+       struct cppi41_dma_controller *controller = cppi41_channel->controller;
+       struct musb *musb = controller->controller.musb;
+       unsigned int shift;
+       u32 port;
+       u32 new_mode;
+       u32 old_mode;
+
+       old_mode = controller->tx_mode;
+       port = cppi41_channel->port_num;
+
+       shift = (port - 1) * 4;
+       if (!cppi41_channel->is_tx)
+               shift += 16;
+       new_mode = old_mode & ~(3 << shift);
+       new_mode |= mode << shift;
+
+       if (new_mode == old_mode)
+               return;
+       controller->tx_mode = new_mode;
+       musb_writel(musb->ctrl_base, DA8XX_USB_MODE, new_mode);
+}
+
+
 static void cppi41_set_autoreq_mode(struct cppi41_dma_channel *cppi41_channel,
                unsigned mode)
 {
@@ -364,8 +403,8 @@ static void cppi41_set_autoreq_mode(struct cppi41_dma_channel *cppi41_channel,
        if (new_mode == old_mode)
                return;
        controller->auto_req = new_mode;
-       musb_writel(controller->controller.musb->ctrl_base, USB_CTRL_AUTOREQ,
-                   new_mode);
+       musb_writel(controller->controller.musb->ctrl_base,
+                   controller->autoreq_reg, new_mode);
 }
 
 static bool cppi41_configure_channel(struct dma_channel *channel,
@@ -373,6 +412,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
                                dma_addr_t dma_addr, u32 len)
 {
        struct cppi41_dma_channel *cppi41_channel = channel->private_data;
+       struct cppi41_dma_controller *controller = cppi41_channel->controller;
        struct dma_chan *dc = cppi41_channel->dc;
        struct dma_async_tx_descriptor *dma_desc;
        enum dma_transfer_direction direction;
@@ -398,7 +438,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
                        musb_writel(musb->ctrl_base,
                                RNDIS_REG(cppi41_channel->port_num), len);
                        /* gen rndis */
-                       cppi41_set_dma_mode(cppi41_channel,
+                       controller->set_dma_mode(cppi41_channel,
                                        EP_MODE_DMA_GEN_RNDIS);
 
                        /* auto req */
@@ -407,14 +447,15 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
                } else {
                        musb_writel(musb->ctrl_base,
                                        RNDIS_REG(cppi41_channel->port_num), 0);
-                       cppi41_set_dma_mode(cppi41_channel,
+                       controller->set_dma_mode(cppi41_channel,
                                        EP_MODE_DMA_TRANSPARENT);
                        cppi41_set_autoreq_mode(cppi41_channel,
                                        EP_MODE_AUTOREQ_NONE);
                }
        } else {
                /* fallback mode */
-               cppi41_set_dma_mode(cppi41_channel, EP_MODE_DMA_TRANSPARENT);
+               controller->set_dma_mode(cppi41_channel,
+                               EP_MODE_DMA_TRANSPARENT);
                cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE);
                len = min_t(u32, packet_sz, len);
        }
@@ -445,7 +486,7 @@ static struct dma_channel *cppi41_dma_channel_allocate(struct dma_controller *c,
        struct cppi41_dma_channel *cppi41_channel = NULL;
        u8 ch_num = hw_ep->epnum - 1;
 
-       if (ch_num >= MUSB_DMA_NUM_CHANNELS)
+       if (ch_num >= controller->num_channels)
                return NULL;
 
        if (is_tx)
@@ -581,12 +622,13 @@ static int cppi41_dma_channel_abort(struct dma_channel *channel)
 
        do {
                if (is_tx)
-                       musb_writel(musb->ctrl_base, USB_TDOWN, tdbit);
+                       musb_writel(musb->ctrl_base, controller->tdown_reg,
+                                   tdbit);
                ret = dmaengine_terminate_all(cppi41_channel->dc);
        } while (ret == -EAGAIN);
 
        if (is_tx) {
-               musb_writel(musb->ctrl_base, USB_TDOWN, tdbit);
+               musb_writel(musb->ctrl_base, controller->tdown_reg, tdbit);
 
                csr = musb_readw(epio, MUSB_TXCSR);
                if (csr & MUSB_TXCSR_TXPKTRDY) {
@@ -604,7 +646,7 @@ static void cppi41_release_all_dma_chans(struct cppi41_dma_controller *ctrl)
        struct dma_chan *dc;
        int i;
 
-       for (i = 0; i < MUSB_DMA_NUM_CHANNELS; i++) {
+       for (i = 0; i < ctrl->num_channels; i++) {
                dc = ctrl->tx_channel[i].dc;
                if (dc)
                        dma_release_channel(dc);
@@ -656,7 +698,7 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller)
                        goto err;
 
                ret = -EINVAL;
-               if (port > MUSB_DMA_NUM_CHANNELS || !port)
+               if (port > controller->num_channels || !port)
                        goto err;
                if (is_tx)
                        cppi41_channel = &controller->tx_channel[port - 1];
@@ -697,6 +739,8 @@ void cppi41_dma_controller_destroy(struct dma_controller *c)
 
        hrtimer_cancel(&controller->early_tx);
        cppi41_dma_controller_stop(controller);
+       kfree(controller->rx_channel);
+       kfree(controller->tx_channel);
        kfree(controller);
 }
 EXPORT_SYMBOL_GPL(cppi41_dma_controller_destroy);
@@ -705,6 +749,7 @@ struct dma_controller *
 cppi41_dma_controller_create(struct musb *musb, void __iomem *base)
 {
        struct cppi41_dma_controller *controller;
+       int channel_size;
        int ret = 0;
 
        if (!musb->controller->parent->of_node) {
@@ -727,12 +772,37 @@ cppi41_dma_controller_create(struct musb *musb, void __iomem *base)
        controller->controller.is_compatible = cppi41_is_compatible;
        controller->controller.musb = musb;
 
+       if (musb->io.quirks & MUSB_DA8XX) {
+               controller->tdown_reg = DA8XX_USB_TEARDOWN;
+               controller->autoreq_reg = DA8XX_USB_AUTOREQ;
+               controller->set_dma_mode = da8xx_set_dma_mode;
+               controller->num_channels = DA8XX_DMA_NUM_CHANNELS;
+       } else {
+               controller->tdown_reg = USB_TDOWN;
+               controller->autoreq_reg = USB_CTRL_AUTOREQ;
+               controller->set_dma_mode = cppi41_set_dma_mode;
+               controller->num_channels = MUSB_DMA_NUM_CHANNELS;
+       }
+
+       channel_size = controller->num_channels *
+                       sizeof(struct cppi41_dma_channel);
+       controller->rx_channel = kzalloc(channel_size, GFP_KERNEL);
+       if (!controller->rx_channel)
+               goto rx_channel_alloc_fail;
+       controller->tx_channel = kzalloc(channel_size, GFP_KERNEL);
+       if (!controller->tx_channel)
+               goto tx_channel_alloc_fail;
+
        ret = cppi41_dma_controller_start(controller);
        if (ret)
                goto plat_get_fail;
        return &controller->controller;
 
 plat_get_fail:
+       kfree(controller->tx_channel);
+tx_channel_alloc_fail:
+       kfree(controller->rx_channel);
+rx_channel_alloc_fail:
        kfree(controller);
 kzalloc_fail:
        if (ret == -EPROBE_DEFER)
index c9a09b5bb6e59dca0a7cb7ee5516b333caf18466..dc353e24d53cb6993218dfc7bd1f566877ba851b 100644 (file)
@@ -297,6 +297,8 @@ static int sunxi_musb_exit(struct musb *musb)
        if (test_bit(SUNXI_MUSB_FL_HAS_SRAM, &glue->flags))
                sunxi_sram_release(musb->controller->parent);
 
+       devm_usb_put_phy(glue->dev, glue->xceiv);
+
        return 0;
 }
 
index e7c9ca8cafb01ee9482910c4c7c2fa545b4f7f3b..0c40ccc906311f6876cb3e0035b8650bc66d010e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for physical layer USB drivers
 #
index e86b3165d69d363f1384429eac53e9f3d3c59646..cd4acfc6e360644730ae66bb723d722099269462 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AM335x_PHY_CONTROL_H_
 #define _AM335x_PHY_CONTROL_H_
 
index 0d0eadd54ed9a4205c1dec8248d9aa5d7aad9d84..97289627561da73d7041720766e609883c2b3b7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PHY_GENERIC_H_
 #define _PHY_GENERIC_H_
 
index 5fe4a5704bde329caf492451be7fdb0593bb3548..ccc2bf5274b4ca3cbe45c8f6d2ad9a23210f1523 100644 (file)
@@ -329,6 +329,14 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
        unsigned long val;
        void __iomem *base = phy->regs;
 
+       /*
+        * The USB driver may have already initiated the phy clock
+        * disable so wait to see if the clock turns off and if not
+        * then proceed with gating the clock.
+        */
+       if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) == 0)
+               return;
+
        if (phy->is_legacy_phy) {
                val = readl(base + USB_SUSP_CTRL);
                val |= USB_SUSP_SET;
@@ -351,6 +359,15 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
        unsigned long val;
        void __iomem *base = phy->regs;
 
+       /*
+        * The USB driver may have already initiated the phy clock
+        * enable so wait to see if the clock turns on and if not
+        * then proceed with ungating the clock.
+        */
+       if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
+                              USB_PHY_CLK_VALID) == 0)
+               return;
+
        if (phy->is_legacy_phy) {
                val = readl(base + USB_SUSP_CTRL);
                val |= USB_SUSP_CLR;
index d787d05f65461c38472909f1a687b42e7dbc49df..fac147a3ad23401047d803931ea6d1af7c730294 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # for Renesas USB
 #
index d1af831f43ebad07e86e1d62b0730eb0579ebb4c..50285b01da92ee0ee9ab60507800607ca207b8be 100644 (file)
@@ -282,11 +282,26 @@ static void usbhsf_fifo_clear(struct usbhs_pipe *pipe,
                              struct usbhs_fifo *fifo)
 {
        struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
+       int ret = 0;
 
-       if (!usbhs_pipe_is_dcp(pipe))
-               usbhsf_fifo_barrier(priv, fifo);
+       if (!usbhs_pipe_is_dcp(pipe)) {
+               /*
+                * This driver checks the pipe condition first to avoid -EBUSY
+                * from usbhsf_fifo_barrier() with about 10 msec delay in
+                * the interrupt handler if the pipe is RX direction and empty.
+                */
+               if (usbhs_pipe_is_dir_in(pipe))
+                       ret = usbhs_pipe_is_accessible(pipe);
+               if (!ret)
+                       ret = usbhsf_fifo_barrier(priv, fifo);
+       }
 
-       usbhs_write(priv, fifo->ctr, BCLR);
+       /*
+        * if non-DCP pipe, this driver should set BCLR when
+        * usbhsf_fifo_barrier() returns 0.
+        */
+       if (!ret)
+               usbhs_write(priv, fifo->ctr, BCLR);
 }
 
 static int usbhsf_fifo_rcv_len(struct usbhs_priv *priv,
@@ -842,9 +857,9 @@ static void xfer_work(struct work_struct *work)
                fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero);
 
        usbhs_pipe_running(pipe, 1);
-       usbhsf_dma_start(pipe, fifo);
        usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
        dma_async_issue_pending(chan);
+       usbhsf_dma_start(pipe, fifo);
        usbhs_pipe_enable(pipe);
 
 xfer_work_end:
index 5a21a82390e1326fa4883a48f68db361efb3995b..2d491e434f114a7c653782459a963a14a2a14cf5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the USB serial device drivers.
 #
index fdf89800ebc3fca8fd90ecac58c15cde813cb265..43a862a90a77592eda9eab2aa75be90a69981ffc 100644 (file)
@@ -186,6 +186,7 @@ static int usb_console_setup(struct console *co, char *options)
        tty_kref_put(tty);
  reset_open_count:
        port->port.count = 0;
+       info->port = NULL;
        usb_autopm_put_interface(serial->interface);
  error_get_interface:
        usb_serial_put(serial);
@@ -265,7 +266,7 @@ static struct console usbcons = {
 
 void usb_serial_console_disconnect(struct usb_serial *serial)
 {
-       if (serial->port[0] == usbcons_info.port) {
+       if (serial->port[0] && serial->port[0] == usbcons_info.port) {
                usb_serial_console_exit();
                usb_serial_put(serial);
        }
index 2d945c9f975c04d5cd7909e00a37017a97e8062e..412f812522ee05a2627334015c08b481ea3a6722 100644 (file)
@@ -177,6 +177,7 @@ static const struct usb_device_id id_table[] = {
        { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
        { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
        { USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */
+       { USB_DEVICE(0x18EF, 0xE032) }, /* ELV TFD500 Data Logger */
        { USB_DEVICE(0x1901, 0x0190) }, /* GE B850 CP2105 Recorder interface */
        { USB_DEVICE(0x1901, 0x0193) }, /* GE B650 CP2104 PMC interface */
        { USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
@@ -352,6 +353,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
 #define CP210X_PARTNUM_CP2104  0x04
 #define CP210X_PARTNUM_CP2105  0x05
 #define CP210X_PARTNUM_CP2108  0x08
+#define CP210X_PARTNUM_UNKNOWN 0xFF
 
 /* CP210X_GET_COMM_STATUS returns these 0x13 bytes */
 struct cp210x_comm_status {
@@ -1491,8 +1493,11 @@ static int cp210x_attach(struct usb_serial *serial)
        result = cp210x_read_vendor_block(serial, REQTYPE_DEVICE_TO_HOST,
                                          CP210X_GET_PARTNUM, &priv->partnum,
                                          sizeof(priv->partnum));
-       if (result < 0)
-               goto err_free_priv;
+       if (result < 0) {
+               dev_warn(&serial->interface->dev,
+                        "querying part number failed\n");
+               priv->partnum = CP210X_PARTNUM_UNKNOWN;
+       }
 
        usb_set_serial_data(serial, priv);
 
@@ -1505,10 +1510,6 @@ static int cp210x_attach(struct usb_serial *serial)
        }
 
        return 0;
-err_free_priv:
-       kfree(priv);
-
-       return result;
 }
 
 static void cp210x_disconnect(struct usb_serial *serial)
index 119d2e17077b1ec8885f85e0a5defa3b90352e3d..35e223751c0e7988b254ab24a0c781a5bea8b4f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CYPRESS_M8_H
 #define CYPRESS_M8_H
 
index 13f11469116eb1c45e3c808485e5ba59c29a215d..40d23f21ec7432af905bb635dec5412587f55cfa 100644 (file)
@@ -1,4 +1,5 @@
 #! /usr/bin/perl -w
+# SPDX-License-Identifier: GPL-2.0
 
 
 # convert an Intel HEX file into a set of C records usable by the firmware
index 1cec03799cdfbb60d369f9f454284110672f1a27..49d1b2d4606d3858c6b3c02104bd9dc16fa1f26f 100644 (file)
@@ -1015,6 +1015,8 @@ static const struct usb_device_id id_table_combined[] = {
        { USB_DEVICE(WICED_VID, WICED_USB20706V2_PID) },
        { USB_DEVICE(TI_VID, TI_CC3200_LAUNCHPAD_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       { USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_BT_USB_PID) },
+       { USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_WL_USB_PID) },
        { }                                     /* Terminating entry */
 };
 
index bbcc13df11ac9e3b2987d1b48f9870beea6c9976..dcd0b6e05baf87d0400ea2e29a4abe1f2a5fde39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Driver definitions for the FTDI USB Single Port Serial Converter -
  * known as FTDI_SIO (Serial Input/Output application of the chipset)
index 4fcf1cecb6d721ad366666eec49774bcf9d00808..4faa09fe308ca0570cc9dcda6900ef74efa3e1d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * vendor/product IDs (VID/PID) of devices using FTDI USB serial converters.
  * Please keep numerically sorted within individual areas, thanks!
 #define ADI_GNICE_PID          0xF000
 #define ADI_GNICEPLUS_PID      0xF001
 
+/*
+ * Cypress WICED USB UART
+ */
+#define CYPRESS_VID                    0x04B4
+#define CYPRESS_WICED_BT_USB_PID       0x009B
+#define CYPRESS_WICED_WL_USB_PID       0xF900
+
 /*
  * Microchip Technology, Inc.
  *
index 22a90badc86b4365ec8f9d8b6dfed87ea183cdcc..41c9bf60fbf0ccde62f5e3ebc4825e1d43c598d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for the KLSI KL5KUSB105 serial port adapter
  */
index be207f7156fe0298d7dd9547a415dd9918d0cf70..030c1b426611242905aef3e542e9d3d2d13c57ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define SUSBCRequest_SetBaudRateParityAndStopBits       1
 #define SUSBCR_SBR_MASK                                0xFF00
 #define SUSBCR_SBR_1200                                0x0100
index cc84da8dbb8495bc10bff34bcafd89a5960ec65e..14511d6a7d44db1e31fc216ac71ebc89a8c27837 100644 (file)
@@ -45,6 +45,7 @@ struct metrousb_private {
 static const struct usb_device_id id_table[] = {
        { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_BI) },
        { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) },
+       { USB_DEVICE_INTERFACE_CLASS(0x0c2e, 0x0730, 0xff) },   /* MS7820 */
        { }, /* Terminating entry. */
 };
 MODULE_DEVICE_TABLE(usb, id_table);
index 54bfef13966ac0d0145223ddb88891ddbcb494df..ba672cf4e888cf1fe2116abc69d3c17ecf1ff385 100644 (file)
@@ -522,6 +522,7 @@ static void option_instat_callback(struct urb *urb);
 
 /* TP-LINK Incorporated products */
 #define TPLINK_VENDOR_ID                       0x2357
+#define TPLINK_PRODUCT_LTE                     0x000D
 #define TPLINK_PRODUCT_MA180                   0x0201
 
 /* Changhong products */
@@ -2011,6 +2012,7 @@ static const struct usb_device_id option_ids[] = {
        { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
        { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
        { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
+       { USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) },      /* TP-Link LTE Module */
        { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
          .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
        { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000),                                 /* TP-Link MA260 */
index ebc0beea69d63efe165423799fd741214e99d15c..eb9928963a53c867c8d5707d895a3a0bc86637d8 100644 (file)
@@ -174,6 +174,10 @@ static const struct usb_device_id id_table[] = {
        {DEVICE_SWI(0x413c, 0x81b3)},   /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
        {DEVICE_SWI(0x413c, 0x81b5)},   /* Dell Wireless 5811e QDL */
        {DEVICE_SWI(0x413c, 0x81b6)},   /* Dell Wireless 5811e QDL */
+       {DEVICE_SWI(0x413c, 0x81cf)},   /* Dell Wireless 5819 */
+       {DEVICE_SWI(0x413c, 0x81d0)},   /* Dell Wireless 5819 */
+       {DEVICE_SWI(0x413c, 0x81d1)},   /* Dell Wireless 5818 */
+       {DEVICE_SWI(0x413c, 0x81d2)},   /* Dell Wireless 5818 */
 
        /* Huawei devices */
        {DEVICE_HWI(0x03f0, 0x581d)},   /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
index 44b25c08c68a15aa7db54056621576313a6bff48..d28dab4b9effcd5d766bb76fa2e2d92de7dcd4f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for USB serial mobile broadband cards
  */
index 4cd55481b309197f73b8aa34dae0d60e6bd35382..c5126a4cd95411574668a30dd87b9385b7c96f2a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the USB Mass Storage device drivers.
 #
index b6e448cab039364c07de6f580778a1c43774d3fe..6439992184fa3eaf49e183484d0c1c8937c03294 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OPTION_MS_H_
 #define _OPTION_MS_H_
 extern int option_ms_init(struct us_data *us);
index 9a51019ac7b29b81422eb87b4739e51820828658..daf62448483f3663f2d0a6f237c32239784d85b3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_cmnd.h>
index bb48634ac1fc06d0a858176ff53fb5776110db35..3e9da537d54aba9a5fe5c1d152f1f600def24784 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SIERRA_MS_H_
 #define _SIERRA_MS_H_
 extern int sierra_ms_init(struct us_data *us);
index 1a59f335b063e7e79f8ece2173f2f03574ce3a5b..a3ccb899df60c39dd537ae5d3664d937715d0338 100644 (file)
@@ -834,13 +834,25 @@ Retry_Sense:
                        if (result == USB_STOR_TRANSPORT_GOOD) {
                                srb->result = SAM_STAT_GOOD;
                                srb->sense_buffer[0] = 0x0;
+                       }
+
+                       /*
+                        * ATA-passthru commands use sense data to report
+                        * the command completion status, and often devices
+                        * return Check Condition status when nothing is
+                        * wrong.
+                        */
+                       else if (srb->cmnd[0] == ATA_16 ||
+                                       srb->cmnd[0] == ATA_12) {
+                               /* leave the data alone */
+                       }
 
                        /*
                         * If there was a problem, report an unspecified
                         * hardware error to prevent the higher layers from
                         * entering an infinite retry loop.
                         */
-                       else {
+                       else {
                                srb->result = DID_ERROR << 16;
                                if ((sshdr.response_code & 0x72) == 0x72)
                                        srb->sense_buffer[1] = HARDWARE_ERROR;
index f58caa9e6a27e6e1a7161a66e5e9a97698cc1e1a..1fcd758a961f5e192082efef9fb69c8efe3bd962 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/usb.h>
 #include <linux/usb/hcd.h>
 #include "usb.h"
@@ -9,7 +10,8 @@ static int uas_is_interface(struct usb_host_interface *intf)
                intf->desc.bInterfaceProtocol == USB_PR_UAS);
 }
 
-static int uas_find_uas_alt_setting(struct usb_interface *intf)
+static struct usb_host_interface *uas_find_uas_alt_setting(
+               struct usb_interface *intf)
 {
        int i;
 
@@ -17,10 +19,10 @@ static int uas_find_uas_alt_setting(struct usb_interface *intf)
                struct usb_host_interface *alt = &intf->altsetting[i];
 
                if (uas_is_interface(alt))
-                       return alt->desc.bAlternateSetting;
+                       return alt;
        }
 
-       return -ENODEV;
+       return NULL;
 }
 
 static int uas_find_endpoints(struct usb_host_interface *alt,
@@ -58,14 +60,14 @@ static int uas_use_uas_driver(struct usb_interface *intf,
        struct usb_device *udev = interface_to_usbdev(intf);
        struct usb_hcd *hcd = bus_to_hcd(udev->bus);
        unsigned long flags = id->driver_info;
-       int r, alt;
-
+       struct usb_host_interface *alt;
+       int r;
 
        alt = uas_find_uas_alt_setting(intf);
-       if (alt < 0)
+       if (!alt)
                return 0;
 
-       r = uas_find_endpoints(&intf->altsetting[alt], eps);
+       r = uas_find_endpoints(alt, eps);
        if (r < 0)
                return 0;
 
index cfb1e3bbd434715410e1f78914bb6ac3eb004b76..63cf981ed81cf8c30eadae32bc36c40499566bdc 100644 (file)
@@ -873,14 +873,14 @@ MODULE_DEVICE_TABLE(usb, uas_usb_ids);
 static int uas_switch_interface(struct usb_device *udev,
                                struct usb_interface *intf)
 {
-       int alt;
+       struct usb_host_interface *alt;
 
        alt = uas_find_uas_alt_setting(intf);
-       if (alt < 0)
-               return alt;
+       if (!alt)
+               return -ENODEV;
 
-       return usb_set_interface(udev,
-                       intf->altsetting[0].desc.bInterfaceNumber, alt);
+       return usb_set_interface(udev, alt->desc.bInterfaceNumber,
+                       alt->desc.bAlternateSetting);
 }
 
 static int uas_configure_endpoints(struct uas_dev_info *devinfo)
index 5a70c33ef0e0645d1c97a59021a6b400776dd473..eb06d88b41d6976b888317939bc2ae66a1394410 100644 (file)
@@ -1459,6 +1459,13 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
                USB_SC_DEVICE, USB_PR_DEVICE, NULL,
                US_FL_SANE_SENSE ),
 
+/* Reported by Kris Lindgren <kris.lindgren@gmail.com> */
+UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999,
+               "Seagate",
+               "External",
+               USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+               US_FL_NO_WP_DETECT ),
+
 UNUSUAL_DEV(  0x0d49, 0x7310, 0x0000, 0x9999,
                "Maxtor",
                "USB to SATA",
index 8372fc22f9b3789ad5ebe7da9e1c955658248bcb..b57891c1fd31a7e70b14ada774f824d30b36196e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS_trace.o                 := -I$(src)
 
 obj-$(CONFIG_TYPEC_UCSI)       += typec_ucsi.o
index e4d8fc763e6cb5e8539ad84246670ce4b7bbec50..fdeff39df12078d979cfaa76202fd1c4832b4069 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UCSI_DEBUG_H
 #define __UCSI_DEBUG_H
 
index 98b404404834bfe344b10b3936e6ab8f076c16e5..d5092446ecc6f6739b5c21bb94d51196f63a9e4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM ucsi
index 8a88f45822e39eb1a8c1826c2c5129371d555aef..53b80f40a9084d0dbd023c39112f38ddc4b94d7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __DRIVER_USB_TYPEC_UCSI_H
 #define __DRIVER_USB_TYPEC_UCSI_H
index d843a9e688528c9436b8806888c9efb6d8d126a9..f4c8f38402622e4e7e6a3893b2cea9ffe15945eb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_USBIP_DEBUG) := -DDEBUG
 
 obj-$(CONFIG_USBIP_CORE) += usbip-core.o
index b3bd313032b10dcb2c8619b94286ad9fb2ee633b..d604ccdd916f166ff2f91cd746b5daca904ac1c0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_USB_WUSB_CBAF_DEBUG) := -DDEBUG
 
 obj-$(CONFIG_USB_WUSB)         += wusbcore.o
index d47dd6e2942c76d6cee5705d5a106c2ecfe7ad76..32f4de7afbd65ef4d7cd9c7b96efca214f93406d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_UWB)              += uwb.o
 obj-$(CONFIG_UWB_WHCI)         += umc.o whci.o whc-rc.o
 obj-$(CONFIG_UWB_HWA)          += hwa-rc.o
index 35a1e777b4497ad0ad1cfa18db0834354732b128..9a53912bdfe9f73d4b7de6a1d3b74dd8a94dc8b6 100644 (file)
@@ -825,6 +825,8 @@ static int hwarc_probe(struct usb_interface *iface,
 
        if (iface->cur_altsetting->desc.bNumEndpoints < 1)
                return -ENODEV;
+       if (!usb_endpoint_xfer_int(&iface->cur_altsetting->endpoint[0].desc))
+               return -ENODEV;
 
        result = -ENOMEM;
        uwb_rc = uwb_rc_alloc();
index bd1b9f25424c032d873bdde566914233ee3b868c..4739fdac5922652db9146097fe2f010e86be3230 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_UWB_I1480U)       += i1480-dfu-usb.o
 
 i1480-dfu-usb-objs := \
index 01c20a260a8b3f9d9a8ccc315d453f810eb3104c..39dd4ef53c77902db9f740ea3e88fd8bec5cb4ec 100644 (file)
@@ -302,18 +302,22 @@ static int uwbd(void *param)
 /** Start the UWB daemon */
 void uwbd_start(struct uwb_rc *rc)
 {
-       rc->uwbd.task = kthread_run(uwbd, rc, "uwbd");
-       if (rc->uwbd.task == NULL)
+       struct task_struct *task = kthread_run(uwbd, rc, "uwbd");
+       if (IS_ERR(task)) {
+               rc->uwbd.task = NULL;
                printk(KERN_ERR "UWB: Cannot start management daemon; "
                       "UWB won't work\n");
-       else
+       } else {
+               rc->uwbd.task = task;
                rc->uwbd.pid = rc->uwbd.task->pid;
+       }
 }
 
 /* Stop the UWB daemon and free any unprocessed events */
 void uwbd_stop(struct uwb_rc *rc)
 {
-       kthread_stop(rc->uwbd.task);
+       if (rc->uwbd.task)
+               kthread_stop(rc->uwbd.task);
        uwbd_flush(rc);
 }
 
index 4a23c13b6be44b63ad258766e767c62c64d42512..de67c4725cce99080c7792e77894c6d37b99d717 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vfio_virqfd-y := virqfd.o
 
 obj-$(CONFIG_VFIO) += vfio.o
index 41a6224f5e6b6ab1b962605ac4e9aede6cac66f7..3f3a24e7c4ef8e4f433211146aa5d1addf2df3de 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vfio-platform-base-y := vfio_platform_common.o vfio_platform_irq.o
 vfio-platform-y := vfio_platform.o
 
index 93f4e232697bd62a9761fae12ad479e29eee88be..90ba20b646dac9d844920388cef0556f391c587c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 vfio-platform-calxedaxgmac-y := vfio_platform_calxedaxgmac.o
 vfio-platform-amdxgbe-y := vfio_platform_amdxgbe.o
 
index 6b012b986b577d5772c5007e26376c9bc8311ec3..6c6df24f770c7d8cb0bc3936487acbcf224c2491 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VHOST_NET) += vhost_net.o
 vhost_net-y := net.o
 
index 1fef5df82153089da50f7d06e903bf630d49f922..7dd265bfdf8166b544e018d167528461fc426649 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_VHOST_TEST_H
 #define LINUX_VHOST_TEST_H
 
index d59a9cc65f9d2b9b05860d0b251105d122477a82..79c6e7a60a5ec8e7122b1d3282415c0b506c4f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VHOST_H
 #define _VHOST_H
 
index 445b2c230b56ade5695c9e074ed9548b1a77caff..df7650adede9d14b7c9dfa2dc43d5d78c00e5847 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VGASTATE)            += vgastate.o
 obj-$(CONFIG_HDMI)                += hdmi.o
 
index 8905129691e84a2fe42acd625f32b0a01772097c..5e28f01c839107ef8e9cca3225181f46b953545e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Backlight & LCD drivers
 
 obj-$(CONFIG_LCD_AMS369FG06)           += ams369fg06.o
index eb2cbec5264340300078fa3b74de31ce28885aaa..db07b784bd2ccdcbffde933926ed5cee2bbbc7d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux graphics to console drivers.
 # 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
 # Rewritten to use lists instead of if-statements.
index ee8c81405a7f9af1f190c98ddcfa53666ad97b0f..8895536a20d648723197affff38d1bbf8fc140a8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux video drivers.
 # 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
 # Rewritten to use lists instead of if-statements.
index a24032c8156e0b913ebda42aa84ceef3e3668fbc..462c31381fa13b2a586b0c396ef7e52429b36d9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AMBA_CLCD_NOMADIK_H
 #define _AMBA_CLCD_NOMADIK_H
 
index 4692c309282327f366a7da8aa3db48559dca7ef0..b20baa47e6ada1640f4e2c9de88e2bef9125a7e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Special local versatile callbacks
  */
index 014e05906cb140e39fb1c7a3edccb98577579e30..2b2675980087ead73c69dcda7d22df24c8a4fd34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VIDEO_ATAFB_H
 #define _VIDEO_ATAFB_H
 
index ac9e19dc505720fb17a2afaa3152d537c1f12021..8f3396ea8ae5eee2dd8661f792f633536dc186bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VIDEO_ATAFB_UTILS_H
 #define _VIDEO_ATAFB_UTILS_H
 
index a6cc0e9ec7905393584206dd203c33fdc9b444e8..069465c82d6d80695564b6642a74138157cf7cc2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FB_ATY) += atyfb.o
 obj-$(CONFIG_FB_ATY128) += aty128fb.o
 obj-$(CONFIG_FB_RADEON) += radeonfb.o
index 3e9d28bcd9f84db780dea74e19c051aeb420e027..2b589d687b4c27893cca4189c48d20870bdce3d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ATI PCI IDs from XFree86, kept here to make sync'ing with
  * XFree much simpler. Currently, this list is only used by
index 63c4842eb2243ab0e73790776e7b7ec26abd806a..8235b285dbb29660beb7d389cab4aa3567af28f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ATI Frame Buffer Device Driver Core Definitions
  */
index 182bd680141f7f35ffe5e9afcff97fae540fa11c..2541a0e0de763669005cf8f1b0825f68e851ffa2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /*
  *  ATI Mach64 Hardware Acceleration
index 51f29d627cebce988e18b8a535c12db82fe4e09c..7d3bd723d3d585f0d48db8cd6d980af3b6240471 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /*
  *  ATI Mach64 CT/VT/GT/LT Support
index 2fa0317ab3c7d1a89c2cf0b91ee3ef047fe2e10e..4cde25eab8e89f08517d86bd75d1c3f256e8f06a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  ATI Mach64 CT/VT/GT/LT Cursor Support
  */
index 10c988aef58ec13df19580244b1a08651d4b9c8e..27cb65fa2ba2a9cb3ccf0b4cd9d63d9f2313ea79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /*
  *  ATI Mach64 GX Support
index a469a3d6edcbd49abb9897b524f6c25f25b46931..bb147d8bf82d6ad5fbb20b0c2d41ab5369045890 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "radeonfb.h"
 
 /* the accelerated functions here are patterned after the 
index ab1d0fd7631630ef2cfdd0fc5c5022a08284aec6..269b12ebb673edd9bb93e6ad7bb1a623e6307250 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "radeonfb.h"
 
 #include <linux/module.h>
index dd823f5fe4c9e81484184ededbbcedc6c9e551d2..9966c58aa26cd372adb92935af34f7bbb1dd7988 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "radeonfb.h"
 
 #include <linux/slab.h>
index 1417542738fcfdc4075bd3c0929f1a188166c784..f7c253dd5899f1e887abe7c768b1681a51b4162d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     drivers/video/aty/radeon_pm.c
  *
index 962e312632255173db6c68eb9b945a72118dc010..131b34dd65af61b2ee3e4dbbb3590d628b0d8799 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RADEONFB_H__
 #define __RADEONFB_H__
 
index 05306de0c6b6ea15b77a0f3bebc17503be1f6202..297688eba469e8aa11a8827af109b5937276e977 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CARMINE_CARMINE_H
 #define CARMINE_CARMINE_H
 
index 045215600b73aa22904cc8e877850a67aa98eea9..ae18318d2fc28e1ec93b70a2812e65796f682d7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CARMINEFB_REGS_H
 #define _CARMINEFB_REGS_H
 
index 73493bbd7a15a6278708b55315563cdbd08e3c9d..d34fd182ca680635a0037c0eda922d4803874a34 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FB_CMDLINE)          += fb_cmdline.o
 obj-$(CONFIG_FB_NOTIFY)           += fb_notify.o
 obj-$(CONFIG_FB)                  += fb.o
index 624ee115f129291a2fc3adfe9ff7b4781e19f0ac..e0d829873930687210d6bb9cb80305b405952c53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FB_DRAW_H
 #define _FB_DRAW_H
 
index 3a010641f6304e7460d5d7207052699e1b9e216f..d1bf9c2a78a7f43bb9a525aa78c9c9bc289ae853 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Framebuffer driver for EFI/UEFI based system
  *
index 5c98da12688397a8f6c8d9fbb9cf4dcc2c27fd7e..16ba8a71dc5201e89143cb53a86cd0c22422607b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Geode family framebuffer drivers
 
 obj-$(CONFIG_FB_GEODE_GX1) += gx1fb.o
index 96e08c8ded97911019c07c4917cfa430925dd85a..3e466510fe050b659a26e35468e927ce46b6c1ef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Intel 810/815 framebuffer driver
 #
index f7d631ebee8e34981360a83e5c56c97555238a43..7ff2debb31af00358141e2748f235b3b9753a2d6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FB_INTEL) += intelfb.o
 
 intelfb-y := intelfbdrv.o intelfbhw.o
index 37f8339ea88c831b7bd3211513e953134c505694..b54db05f028d185960caba2e3267259f34572a2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INTELFB_H
 #define _INTELFB_H
 
index aac615d18440e39a0dde7497030bf4f407280cb8..5303336c6547b10861031154315f4ef67fd218e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __G450_PLL_H__
 #define __G450_PLL_H__
 
index 1e6e45b57b78ec683e27844e4cb81caaa124779a..3b2a6fd35fff1bf93975749a3c71e33b48bb5f40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_DAC1064_H__
 #define __MATROXFB_DAC1064_H__
 
index 27872aaa0a17d494d5cadc73de0609093744f99f..faee149d0ba0c0ada4ad0962626c5f483c7f70a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_TI3026_H__
 #define __MATROXFB_TI3026_H__
 
index 1e418e62c22d3b9f08732a024722adac32269a5c..a7aa9a1d26c0a2bbd3c3adb84cdad942d81bf79d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_ACCEL_H__
 #define __MATROXFB_ACCEL_H__
 
index 7a90ea2c4613c772d4b14584a483fd2bbaed92bc..f85ad25659e56e6e27695c0f1a949812d37fbb9b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Hardware accelerated Matrox Millennium I, II, Mystique, G100, G200, G400 and G450
index 1005582e843e5084cecd6d99175c8168e0e1a375..23e90e21090566ee4ae44924c036546ceafcdbf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_CRTC2_H__
 #define __MATROXFB_CRTC2_H__
 
index 3a3e654444b8782b9dc9823c4e0d2d575b973ce7..b5f17b86eae50b082156c35550fd1832c79157cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_G450_H__
 #define __MATROXFB_G450_H__
 
index 99eddec9f30cd7bf0ebc932f68c917d917111b8f..f896b78836b11130a111a7e0ba193b4e0553de93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_MAVEN_H__
 #define __MATROXFB_MAVEN_H__
 
index 351c823f1f74ae5cd87429a83369cb75d51760ce..9cb6686d309e0f2c9b3327324f40ea78523ff5c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MATROXFB_MISC_H__
 #define __MATROXFB_MISC_H__
 
index 9df48b8edc94f6e745391a6a8ab9e3f9bb3de764..e6d0513958c2823c3a75233390d7d117931f6417 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Fujitsu MB862xx Graphics Controller Registers/Bits
  */
index 8550630c1e01dc8ee71d64aee5a43755fef6115a..50bc9b584ca141c7d9f5a5121cdd07cf04db58f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MB862XX_H__
 #define __MB862XX_H__
 
index 96a2dfef0f60a5c14ca8227c67406a75a919467b..3a2549f9a48fa6052cebf4e826ccd8c11051f347 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MB826XXFB_ACCEL_H__
 #define __MB826XXFB_ACCEL_H__
 
index 2528d3e609a4794d3f0456c35c83640cd6abbed0..2bd328883178d0158788fd1152360853792eaec5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/debugfs.h>
 #include <linux/slab.h>
 
index 5f14b4befd71389fef640a728956cfe77547e80d..6607f353639b611ebfc6604b08cd6b39bbe6186d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __REG_BITS_2700G_
 #define __REG_BITS_2700G_
 
index 063099d48839943a98faadaed0957083bfc8fa1d..591fc9d26084655ba802388dfee005383dd96a69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __REGS_2700G_
 #define __REGS_2700G_
 
index 4b2c4f457b11ffc70c8f8cfb92aa90a8da196f81..808890f7064bb63e52abacd872c122f82a7c293f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config MMP_PANEL_TPOHVGA
        bool "tpohvga panel TJ032MD01BW support"
        depends on SPI_MASTER
index 917d3eb05feb47a836c0a44536fa9d3f6afbdf04..cdd6e8ac454a9f33bca405ba2ba8c690d040296c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the nVidia framebuffer driver
 #
index 878a5ce022991aeb5859cdcbe103000384e0396f..fb9c5ebf2958296ab513691841b9a16d1f648fd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_proto.h,v 1.10 2003/07/31 20:24:29 mvojkovi Exp $ */
 
 #ifndef __NV_PROTO_H__
index 6ff321a3681328c014f39295b3c5b5cd8a8295bc..d7a1d4363d5fa042622ddf22bf34f4366f1d668b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NV_TYPE_H__
 #define __NV_TYPE_H__
 
index 732e0718be5309c76b03dd9dde26c65381e16156..daaa73a94e7fdcb1d236788252f54c8ae98b4f3e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the OMAP1 framebuffer device driver
 #
index 845222270db3f60b01ffdd7278f0c15ac3be2ac1..8a7607d861c13819278df2f476cca890a561c898 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LCDC_H
 #define LCDC_H
 
index ad68ecf141af2ebd2d255e7bd187d383063007c1..602edfed09dfd85ab6de06a8d5d1214226b98bea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_OMAP2_VRFB) += vrfb.o
 obj-y += dss/
 obj-y += displays/
index 4f7459272256dc978b66b2ae382a0cbc9f95ffb7..f801762ce45543020249db2f5c05491aa416247d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FB_OMAP2_ENCODER_OPA362) += encoder-opa362.o
 obj-$(CONFIG_FB_OMAP2_ENCODER_TFP410) += encoder-tfp410.o
 obj-$(CONFIG_FB_OMAP2_ENCODER_TPD12S015) += encoder-tpd12s015.o
index 27d220212870c7073f3b2cbf9405e055eb8392f4..6d0bb27e4f85eb1c197f44e676dfe8a66a332ce4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 config FB_OMAP2_DSS_INIT
        bool
 
index 02308e24f3efaf28c7e6d7cf1b1e905c918e2e23..7318d5260e8d5a1b6c6e8e35f95b478650e030c2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FB_OMAP2_DSS_INIT) += omapdss-boot-init.o
 obj-$(CONFIG_FB_OMAP2_DSS) += omapdss.o
 # Core DSS files
index 189a5ad125a37bc279c664cd61e37e5dcff780ac..f13d7639826d2af1c6f5a69a165960dc11367c82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #define DSS_SUBSYS_NAME "HDMI"
 
index eee09279c5248166e5f1b6f19b8714de23753f32..2aba90de13606b79ef5cdd011d6ec01937494f97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PXA168FB_H__
 #define __PXA168FB_H__
 
index 0428ed03dc491bfc712a086c8dcf402d1cc0f86c..ea9489d16de51048755a1f2680ad85b67a02a020 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PXA3XX_GCU_H__
 #define __PXA3XX_GCU_H__
 
index 8898c9915b022eb15582f1e0599e386a59ba3a76..bdbdd6eb80ece01d262ff010bdf667aaa7b4ba07 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Riva framebuffer driver
 #
index a69480c9a67cc089f00162bb2a0f44f0172f3c36..51937a0ae0a4a3ffabb42cea723a361aa57c37a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_type.h,v 1.35 2002/08/05 20:47:06 mvojkovi Exp $ */
 
 #ifndef __NV_STRUCT_H__
index 61fd37ca490af9b6e8f42731c6a8691412eb69b9..593297ca2b204106286c36c7a9358188559ee0d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RIVAFB_H
 #define __RIVAFB_H
 
index a350209ffbd3d1d67d918872f282782f0ec6f791..af6fc97f4ba4a5fac8cf2f100616f3cdf33a8aae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* sbuslib.c: Helper library for SBUS framebuffer drivers.
  *
  * Copyright (C) 2003 David S. Miller (davem@redhat.com)
index 7ba3250236bd7a453f32c8942c447922b03345a3..a6b9a2467646a00fe8ef42b6bf43765a3dcfb671 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sbuslib.h: SBUS fb helper library interfaces */
 #ifndef _SBUSLIB_H
 #define _SBUSLIB_H
index f839adef1d90a58128a922b78bf28a21bd6d047b..cc52c74721fe98570e03d9195aa407265c13e12d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SH_MOBILE_LCDCFB_H
 #define SH_MOBILE_LCDCFB_H
 
index af1619536ac84f3d2b638c400f7bf674cd087724..fb8f58f9867a70f7052c1405d9e3d36a7ff627a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef STICORE_H
 #define STICORE_H
 
index 159f26e6adb51382207b1bf7bd5f08e5f3e109e6..771a0eee7fb4ad1fe69b509175e48d480d0ea518 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the VIA framebuffer driver (for Linux Kernel 2.6)
 #
index f73ec6377a46cde2f19151c54b9d3743900d2d86..8d9ed8a51a79785fd920a718982c059d7db01e89 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_FB_WMT_GE_ROPS
 
 extern void wmt_ge_fillrect(struct fb_info *info,
index 3b437813584cec4f3d73ba5364353ac4a5cbb29b..6194373ee4240456f1ad93e7cae28e52ccbc50cd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux logos
 
 obj-$(CONFIG_LOGO)                     += logo.o
index 41e30e3dc842835aae20aa41596ad2edc40ae27e..3a2b5c5dcf46572ee0174c32a0733e93a5fc5321 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VIRTIO) += virtio.o virtio_ring.o
 obj-$(CONFIG_VIRTIO_MMIO) += virtio_mmio.o
 obj-$(CONFIG_VIRTIO_PCI) += virtio_pci.o
index 2662e916b96af86892ec71315cc660702ba852a3..42ecf961004e95b510375d65c2e6b546b79e2fb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VME_BRIDGE_H_
 #define _VME_BRIDGE_H_
 
index c5a3e96fcbabf9bd952e119a89dfd9d40e1c54d9..18954cae42567283206b7eea52e7f07174a83e8f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for 1-wire bus master drivers.
 #
index 36b22fb2d3a1d9d467208adc595f47064ac11929..79c611ce5f18be108399c9f11a666f3354cec908 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Dallas's 1-wire slaves.
 #
index 56adf9fa67d04b21d1848ea056b95ee00f1b0c37..715a21078e0c7819b8f043a7846f20f0ed99c246 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the WatchDog device drivers.
 #
index 3c57b45537a2f0cd552c7fc571156428de918175..7b82a7c6e7c39ee20e1eb3e5fd96172ccecb885b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* iTCO Vendor Specific Support hooks */
 #ifdef CONFIG_ITCO_VENDOR_SUPPORT
 extern void iTCO_vendor_pre_start(struct resource *, unsigned int);
index 2b28c00da0df00d2f99a8c5283b2d2b7c84a9ffa..1af4dee7133717f3165de37bdadc3c82c15a7b4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     sp5100_tco:     TCO timer driver for sp5100 chipsets.
  *
index a5a32b39c56da3a4ff5b1541be5e3314fb04ee4a..a3f1abc68839aa9002c52c280488c2fe08841379 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WATCHDOG_PRETIMEOUT_H
 #define __WATCHDOG_PRETIMEOUT_H
 
index caaa15dc37bc594ec6facb4276d1a543ab7f2de2..d3930ecaf11d72ede4d73774de72419914b7e03e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_HOTPLUG_CPU)              += cpu_hotplug.o
 obj-$(CONFIG_X86)                      += fallback.o
 obj-y  += grant-table.o features.o balloon.o manage.o preempt.o time.o
index 1bdd02a6d6ac757c5a500db192b3d7923c316753..30d7f52eb7cad2e6cc2eaa46c8f9794d09f6a6a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bio.h>
 #include <linux/io.h>
 #include <linux/export.h>
index 0003912a8111959a101803f52ed8be80f4ae2f30..d4265c8ebb22a24b1ab8794ab79b592793d14908 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt
 
 #include <linux/notifier.h>
index bdff01095f5496069036b7b684609731ba4b8cde..8edef51c92e597ba5fd702dc3fcd20590cac2ae8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen event channels (2-level ABI)
  *
index 82360594fa8e49bcbad179a6bb349564286cf203..57efbd3b053b37ca43816483dd3364c3c48a761e 100644 (file)
@@ -1024,6 +1024,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
        mutex_unlock(&priv->lock);
 
        if (use_ptemod) {
+               map->pages_vm_start = vma->vm_start;
                err = apply_to_page_range(vma->vm_mm, vma->vm_start,
                                          vma->vm_end - vma->vm_start,
                                          find_grant_ptes, map);
@@ -1061,7 +1062,6 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
                                            set_grant_ptes_as_special, NULL);
                }
 #endif
-               map->pages_vm_start = vma->vm_start;
        }
 
        return 0;
index ac5f23fcafc23939bb518375d853c3af99e896d9..a63fedbdcbe9876a413236f41a62c2ffe8c61cba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Xen stolen ticks accounting.
  */
index e89136ab851e30c1aff97893615f72f2d5bf3cd7..b437fccd4e624e3b7a8972245e9e992fe77c2993 100644 (file)
@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);
 static void watch_target(struct xenbus_watch *watch,
                         const char *path, const char *token)
 {
-       unsigned long long new_target;
+       unsigned long long new_target, static_max;
        int err;
        static bool watch_fired;
        static long target_diff;
@@ -72,13 +72,20 @@ static void watch_target(struct xenbus_watch *watch,
         * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10.
         */
        new_target >>= PAGE_SHIFT - 10;
-       if (watch_fired) {
-               balloon_set_new_target(new_target - target_diff);
-               return;
+
+       if (!watch_fired) {
+               watch_fired = true;
+               err = xenbus_scanf(XBT_NIL, "memory", "static-max", "%llu",
+                                  &static_max);
+               if (err != 1)
+                       static_max = new_target;
+               else
+                       static_max >>= PAGE_SHIFT - 10;
+               target_diff = xen_pv_domain() ? 0
+                               : static_max - balloon_stats.target_pages;
        }
 
-       watch_fired = true;
-       target_diff = new_target - balloon_stats.target_pages;
+       balloon_set_new_target(new_target - target_diff);
 }
 static struct xenbus_watch target_watch = {
        .node = "memory/target",
index ffe0ad3438bd4c944cbf69ddb36b64cb72c29afd..e8d981d4323557d31fe0f84c88d08c4e7d4765d8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback.o
 
 xen-pciback-y := pci_stub.o pciback_ops.o xenbus.o
index 9e9286d0872e492b0a917698bca749e808625143..60111719b01f75ca3ecea9a789b01da3f083b167 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Functions for creating a virtual configuration space for
  *               exported PCI Devices.
index 62461a8ba1d6bbfbf9e6de2e98a8230ebc67ff3e..22db630717eaafe53ddb72eb41ff12ee4042631c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PCI Backend - Common data structures for overriding the configuration space
  *
index 7f83e9083e9dd12a6b2d63a4cea5cb42932f5966..73427d8e01161ae55fa561599927bb68536bdbd0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Handles the virtual fields found on the capability lists
  *               in the configuration space.
index 5fbfd9cfb6d63e61c1c89e6a9deb071ce6de2d32..10ae24b5a76e80aa710b79a2403445285df46941 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Handles the virtual fields in the configuration space headers.
  *
@@ -169,6 +170,9 @@ static int rom_write(struct pci_dev *dev, int offset, u32 value, void *data)
 static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data)
 {
        struct pci_bar_info *bar = data;
+       unsigned int pos = (offset - PCI_BASE_ADDRESS_0) / 4;
+       const struct resource *res = dev->resource;
+       u32 mask;
 
        if (unlikely(!bar)) {
                pr_warn(DRV_NAME ": driver data not found for %s\n",
@@ -179,7 +183,13 @@ static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data)
        /* A write to obtain the length must happen as a 32-bit write.
         * This does not (yet) support writing individual bytes
         */
-       if (value == ~0)
+       if (res[pos].flags & IORESOURCE_IO)
+               mask = ~PCI_BASE_ADDRESS_IO_MASK;
+       else if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64))
+               mask = 0;
+       else
+               mask = ~PCI_BASE_ADDRESS_MEM_MASK;
+       if ((value | mask) == ~0U)
                bar->which = 1;
        else {
                u32 tmpval;
index 7476791cab40a54e6a584693c4c7c395f9c6bec7..89d9744ece613759757fc5bd880b656376b6357c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Handle special overlays for broken devices.
  *
index cfcc517e4570dad6b047dff4c2b69de669c73e0c..d873abe35bf665193a34d9cdf516b60ecb2f5e93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PCI Backend - Data structures for special overlays for broken devices.
  *
index f16a30e2a1100f810f22baf720ca40e5c660c0f8..66e9b814cc8615d636f2e56e27dcc31a34a28cab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Provides restricted access to the real PCI bus topology
  *               to the frontend
index 7af369b6aaa29dda1b14b504d31cdb5d0b4b98f6..263c059bff900ad2b6234fc87b87f9c8e3e99b1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PCI Backend Common Data Structures & Function Declarations
  *
index f8c77751f330973a5b1c64e58b423259e26532ab..ee2c891b55c6bf46e97e6e529f65e478a12e7c3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend Operations - respond to PCI requests from Frontend
  *
index c99f8bb1c56c4814747fc2fa92941cce4a17c6e5..f6ba18191c0f917fbe11842510c1a254af0d6784 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend - Provides a Virtual PCI bus (with real devices)
  *               to the frontend
index 3814b44bf1f76e2dc16964c557f731315a4c8876..581c4e1a8b829b39fcdab77fc1a90234d14729fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PCI Backend Xenbus Setup - handles setup with frontend and xend
  *
index a67e955cacd199298a3bfa22049b5549507c52bf..55988b8418eeb7eb315745ad7737278fa3c5ddd7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /******************************************************************************
  * Xen selfballoon driver (and optional frontswap self-shrinking driver)
  *
index 31e2e9050c7a5b5f511bfe780c69ddb1590e358c..0c75321108151d12df8c946fbadee5c1e1779e76 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y  += xenbus.o
 obj-y  += xenbus_dev_frontend.o
 
index 82a8866758ee0d5ac235430059f74a7bb56b09f8..a1c17000129ba1cb4465df0bc679a0756f8937a3 100644 (file)
@@ -519,64 +519,6 @@ static int __xenbus_map_ring(struct xenbus_device *dev,
        return err;
 }
 
-static int xenbus_map_ring_valloc_pv(struct xenbus_device *dev,
-                                    grant_ref_t *gnt_refs,
-                                    unsigned int nr_grefs,
-                                    void **vaddr)
-{
-       struct xenbus_map_node *node;
-       struct vm_struct *area;
-       pte_t *ptes[XENBUS_MAX_RING_GRANTS];
-       phys_addr_t phys_addrs[XENBUS_MAX_RING_GRANTS];
-       int err = GNTST_okay;
-       int i;
-       bool leaked;
-
-       *vaddr = NULL;
-
-       if (nr_grefs > XENBUS_MAX_RING_GRANTS)
-               return -EINVAL;
-
-       node = kzalloc(sizeof(*node), GFP_KERNEL);
-       if (!node)
-               return -ENOMEM;
-
-       area = alloc_vm_area(XEN_PAGE_SIZE * nr_grefs, ptes);
-       if (!area) {
-               kfree(node);
-               return -ENOMEM;
-       }
-
-       for (i = 0; i < nr_grefs; i++)
-               phys_addrs[i] = arbitrary_virt_to_machine(ptes[i]).maddr;
-
-       err = __xenbus_map_ring(dev, gnt_refs, nr_grefs, node->handles,
-                               phys_addrs,
-                               GNTMAP_host_map | GNTMAP_contains_pte,
-                               &leaked);
-       if (err)
-               goto failed;
-
-       node->nr_handles = nr_grefs;
-       node->pv.area = area;
-
-       spin_lock(&xenbus_valloc_lock);
-       list_add(&node->next, &xenbus_valloc_pages);
-       spin_unlock(&xenbus_valloc_lock);
-
-       *vaddr = area->addr;
-       return 0;
-
-failed:
-       if (!leaked)
-               free_vm_area(area);
-       else
-               pr_alert("leaking VM area %p size %u page(s)", area, nr_grefs);
-
-       kfree(node);
-       return err;
-}
-
 struct map_ring_valloc_hvm
 {
        unsigned int idx;
@@ -725,6 +667,65 @@ int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr)
 }
 EXPORT_SYMBOL_GPL(xenbus_unmap_ring_vfree);
 
+#ifdef CONFIG_XEN_PV
+static int xenbus_map_ring_valloc_pv(struct xenbus_device *dev,
+                                    grant_ref_t *gnt_refs,
+                                    unsigned int nr_grefs,
+                                    void **vaddr)
+{
+       struct xenbus_map_node *node;
+       struct vm_struct *area;
+       pte_t *ptes[XENBUS_MAX_RING_GRANTS];
+       phys_addr_t phys_addrs[XENBUS_MAX_RING_GRANTS];
+       int err = GNTST_okay;
+       int i;
+       bool leaked;
+
+       *vaddr = NULL;
+
+       if (nr_grefs > XENBUS_MAX_RING_GRANTS)
+               return -EINVAL;
+
+       node = kzalloc(sizeof(*node), GFP_KERNEL);
+       if (!node)
+               return -ENOMEM;
+
+       area = alloc_vm_area(XEN_PAGE_SIZE * nr_grefs, ptes);
+       if (!area) {
+               kfree(node);
+               return -ENOMEM;
+       }
+
+       for (i = 0; i < nr_grefs; i++)
+               phys_addrs[i] = arbitrary_virt_to_machine(ptes[i]).maddr;
+
+       err = __xenbus_map_ring(dev, gnt_refs, nr_grefs, node->handles,
+                               phys_addrs,
+                               GNTMAP_host_map | GNTMAP_contains_pte,
+                               &leaked);
+       if (err)
+               goto failed;
+
+       node->nr_handles = nr_grefs;
+       node->pv.area = area;
+
+       spin_lock(&xenbus_valloc_lock);
+       list_add(&node->next, &xenbus_valloc_pages);
+       spin_unlock(&xenbus_valloc_lock);
+
+       *vaddr = area->addr;
+       return 0;
+
+failed:
+       if (!leaked)
+               free_vm_area(area);
+       else
+               pr_alert("leaking VM area %p size %u page(s)", area, nr_grefs);
+
+       kfree(node);
+       return err;
+}
+
 static int xenbus_unmap_ring_vfree_pv(struct xenbus_device *dev, void *vaddr)
 {
        struct xenbus_map_node *node;
@@ -788,6 +789,12 @@ static int xenbus_unmap_ring_vfree_pv(struct xenbus_device *dev, void *vaddr)
        return err;
 }
 
+static const struct xenbus_ring_ops ring_ops_pv = {
+       .map = xenbus_map_ring_valloc_pv,
+       .unmap = xenbus_unmap_ring_vfree_pv,
+};
+#endif
+
 struct unmap_ring_vfree_hvm
 {
        unsigned int idx;
@@ -916,11 +923,6 @@ enum xenbus_state xenbus_read_driver_state(const char *path)
 }
 EXPORT_SYMBOL_GPL(xenbus_read_driver_state);
 
-static const struct xenbus_ring_ops ring_ops_pv = {
-       .map = xenbus_map_ring_valloc_pv,
-       .unmap = xenbus_unmap_ring_vfree_pv,
-};
-
 static const struct xenbus_ring_ops ring_ops_hvm = {
        .map = xenbus_map_ring_valloc_hvm,
        .unmap = xenbus_unmap_ring_vfree_hvm,
@@ -928,8 +930,10 @@ static const struct xenbus_ring_ops ring_ops_hvm = {
 
 void __init xenbus_ring_ops_init(void)
 {
+#ifdef CONFIG_XEN_PV
        if (!xen_feature(XENFEAT_auto_translated_physmap))
                ring_ops = &ring_ops_pv;
        else
+#endif
                ring_ops = &ring_ops_hvm;
 }
index 1126701e212ec4b7a86bb9c27298fd8b0fc24b42..edba5fecde4ddc6c3f8d9640a50b19650769bbfe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/slab.h>
index 2c5934ea9b1e5498c4f92ff2b74a40f11a973a6d..cfe4874b83a78dfaaf78f6c2b77f486ebefd65e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XENFS_XENBUS_H
 #define _XENFS_XENBUS_H
 
index 82fd2a396d96b27260e3320fb57a1ffc101fe32c..f59235f9f8a29d91ebad331c46eb8ad25fa5141f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/mm.h>
index c6e2b4a542ea80478c0d20df1d51eb2c426cbb26..c6c73a33c44d556c0ac5ebf53d6b5e078bfb6dc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/seq_file.h>
 #include <linux/fs.h>
index 7dc5332ff9842bfe1f119f4ff003056430959ec3..b360ac4ea8461b1cd8c07d127672579c32b865cb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Zorro bus specific drivers.
 #
index 16fe206f9998bc1d8631646ccad12e0782286032..e325c5ce995b919439160b7ef0f84b93bf237c79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Generate devlist.h from the Zorro ID file.
  *
index 83eedddbb79456759bb63f5c196f39293eae69b0..fa3c83dbe8431a0c2ebaa884370d737fd6deb40d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Zorro Device Name Tables
  *
index 05397305fccd16acddde83d3c18988b42349d52d..df05a26ab8d8a9888c67d7e66f49ef5b1f84c43b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Procfs interface for the Zorro bus.
  *
index 4f805c01cfbc017a01f012263f031a8411ac2486..ac0bab3412d90ddb934f88e995c1664f22183c36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifdef CONFIG_ZORRO_NAMES
 extern void zorro_name_device(struct zorro_dev *z);
index fa0808853883e3715ec413a54602f37ae3432121..168094a3fae7ebb109c1ead9fe3b8c3e38201444 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # kbuild file for firmware/
 #
index 9619ccadd2fcd9717bb3e186d8de78db932b9653..e7800a5c73959f2abc360468007468e1dfced2ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_9P_FS) := 9p.o
 
 9p-objs := \
index adaf6f6dd858cb9b0a6b0077782d068b3d024e0b..e1cbdfdb7c684fd24fdb6f25ee03f4e253e9ef58 100644 (file)
@@ -310,9 +310,13 @@ static int v9fs_write_end(struct file *filp, struct address_space *mapping,
 
        p9_debug(P9_DEBUG_VFS, "filp %p, mapping %p\n", filp, mapping);
 
-       if (unlikely(copied < len && !PageUptodate(page))) {
-               copied = 0;
-               goto out;
+       if (!PageUptodate(page)) {
+               if (unlikely(copied < len)) {
+                       copied = 0;
+                       goto out;
+               } else if (len == PAGE_SIZE) {
+                       SetPageUptodate(page);
+               }
        }
        /*
         * No need to use i_size_read() here, the i_size
index 7bbaca9c67b146e2284c9c495f1d0bfde29b1abd..ef772f1eaff80ade97232f502bb4c8915e87cdac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux filesystems.
 #
index fadf408bdd4622205b29c8a1066d1e03909abd40..c76db75f02aab45659a151b7d9b6d908da016963 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fs.h>
 #include <linux/adfs_fs.h>
 
index 46c0d5671cd541d8bafdc9327f2fbf99d0f5133a..754afb14a6ff74aa47c01cae529f86a564252d9a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/adfs/file.c
  *
index 773749be8290cb782324d341865861a2e64d199a..a92eb6ae2ae2e57c7a6af91e10a752af5e229658 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef pr_fmt
 #undef pr_fmt
 #endif
index 8cf941c3b511d681249dcaf7364cd4e172e595a1..185d5ab7e986af489612d795185d91e86a22ace3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/amigaffs.c
  *
index 43b41c06aa372c4dd94ff6f76a8824fe2f219404..f9bef905665927551acd4034370a902e6441981b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AMIGAFFS_H
 #define AMIGAFFS_H
 
index 2b2112475ec20675c787f67f351910ffec5ee6c6..2b1399611d9e6595151a578724c4bc6d17996ff2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/bitmap.c
  *
index 591ecd7f3063731d0eebe1435714e0be3949d455..a105e77df2c10b818bb4134b7fa6cf2075db34d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/dir.c
  *
index 00331810f69084162d08c1fff7272d47050e2a0a..a85817f54483f742bd42955d8995c69eb5d2891a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/file.c
  *
index fd4ef3c40e4054ba9f23dec2198b650ef53e4cae..73598bff8506d45dbfcdfa2804bdbe393fe32149 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/inode.c
  *
index 46d3ace6761d7df89dcbbc598991a41561e16518..d8aa0ae3d037c8b91ab13f7d3f6d209bd2326797 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/namei.c
  *
index ae622cdce142264af53127a8d94730c64a0d74d2..a7531b26e8f0297509eae83cd7624282cb83f152 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/affs/symlink.c
  *
index 095c54165dfd311e2b3a65fd6e627a7d83aa5b8a..641148208e9078da9b1ba1a55badc2673bb38f4b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Red Hat Linux AFS client.
 #
index 40b2bab3e401445492f91e11661617bda1328f37..50bd5bb1c4fb1b4b91c25980f5f1452509c540e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* AFS network device helpers
  *
  * Copyright (c) 2007 Patrick McHardy <kaber@trash.net>
index 135304146120bc1230642784f93e3587b196abdc..12ffdb6fb63c27dfe17101d67a867bdfd83b1916 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/attr.c
  *
index bb53728c7a31b0abee8f5080ae25e162ff74f203..213b51dbbb607251d0f5c131843cc6af68ce3f6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/bad_inode.c
  *
index b914cfb03820aa7780e629dc047287df1ea56b08..7cd47245694def9e65928de60f053e736dd8953d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * befs.h
  *
index 69c9d8cde95563b58dd31c5a5a7e41e9f02fb3c1..8019fde814b7a278479f3f22d2834abfebb2b049 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fs/befs/befs_fs_types.h
  *
index 60c6c728e64e78168ad9c37d759948d6e82f596a..a253a6276d8eca52fb5bfe71c10806a8a1033b9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * btree.h
  *
index 720b3bc5c16a70bd664562bfe72abacffa8c7360..97719a7c7e40dae1644cdd54e40791cb84351f5e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/befs/datastream.c
  *
index 7ff9ff09ec6e70718b4b8bd398239922d1065f84..39b1d4766ccff875055d071e763255bace538f8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * datastream.h
  *
index 36656c86f50ec526d0a9f9c3b8ce76ec6098198a..eb7bd6c692c793e3c97913a85137d4cd32380ba1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/befs/debug.c
  *
index 27223878ba9fc9b9ba354a887837653ecdd170f4..bb55a54c24c00ddd54b2a064e84c3b592e90b0ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/befs/endian.h
  *
index 5367a6470a69fb59c0db37e321ff9d9c343d5519..791b46a6f2f91114a7caadbfcfe8d3942cbe8fd4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * inode.c
  *
index 227cb86e07fe3a99afc45c1790a87671641eb5af..2caf50a4abbeac087e782af95bacf7c6af163b1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/befs/io.c
  *
index f40006db36dfdd68c573785cfee4003bf81457a0..67aef3bb89e4c491b84691089020ecb15b00fdbf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     fs/bfs/bfs.h
  *     Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
index 3e5ac30e8b6fa705ccbb09eaf980626217e1c7cb..ee832ca5f734aac252bae4ba754fa4c1e34f1730 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     fs/bfs/dir.c
  *     BFS directory operations.
index 97f1b51601550e38c8c4e45bf49c4336da04bed9..1476cdd90cfbb14a1d53b131ec7bef84b40b1c3b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     fs/bfs/file.c
  *     BFS file operations.
index 475d083f808845db1949bf471238158777935317..5d6b94475f272629dc3f8c252749aff08790766d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /****************************************************************************/
 /*
  *  linux/fs/binfmt_flat.c
index ce7181ea60fa9af516e2a8774fd1fc2fac38274a..a7c5a9861bef5a73b8f7377dfa9e045427b915c7 100644 (file)
@@ -54,7 +54,7 @@ typedef struct {
        int size;                       /* size of magic/mask */
        char *magic;                    /* magic or filename extension */
        char *mask;                     /* mask, NULL for exact match */
-       char *interpreter;              /* filename of interpreter */
+       const char *interpreter;        /* filename of interpreter */
        char *name;
        struct dentry *dentry;
        struct file *interp_file;
@@ -131,27 +131,26 @@ static int load_misc_binary(struct linux_binprm *bprm)
 {
        Node *fmt;
        struct file *interp_file = NULL;
-       char iname[BINPRM_BUF_SIZE];
-       const char *iname_addr = iname;
        int retval;
        int fd_binary = -1;
 
        retval = -ENOEXEC;
        if (!enabled)
-               goto ret;
+               return retval;
 
        /* to keep locking time low, we copy the interpreter string */
        read_lock(&entries_lock);
        fmt = check_file(bprm);
        if (fmt)
-               strlcpy(iname, fmt->interpreter, BINPRM_BUF_SIZE);
+               dget(fmt->dentry);
        read_unlock(&entries_lock);
        if (!fmt)
-               goto ret;
+               return retval;
 
        /* Need to be able to load the file after exec */
+       retval = -ENOENT;
        if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE)
-               return -ENOENT;
+               goto ret;
 
        if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) {
                retval = remove_arg_zero(bprm);
@@ -195,22 +194,22 @@ static int load_misc_binary(struct linux_binprm *bprm)
        bprm->argc++;
 
        /* add the interp as argv[0] */
-       retval = copy_strings_kernel(1, &iname_addr, bprm);
+       retval = copy_strings_kernel(1, &fmt->interpreter, bprm);
        if (retval < 0)
                goto error;
        bprm->argc++;
 
        /* Update interp in case binfmt_script needs it. */
-       retval = bprm_change_interp(iname, bprm);
+       retval = bprm_change_interp(fmt->interpreter, bprm);
        if (retval < 0)
                goto error;
 
-       if (fmt->flags & MISC_FMT_OPEN_FILE && fmt->interp_file) {
+       if (fmt->flags & MISC_FMT_OPEN_FILE) {
                interp_file = filp_clone_open(fmt->interp_file);
                if (!IS_ERR(interp_file))
                        deny_write_access(interp_file);
        } else {
-               interp_file = open_exec(iname);
+               interp_file = open_exec(fmt->interpreter);
        }
        retval = PTR_ERR(interp_file);
        if (IS_ERR(interp_file))
@@ -238,6 +237,7 @@ static int load_misc_binary(struct linux_binprm *bprm)
                goto error;
 
 ret:
+       dput(fmt->dentry);
        return retval;
 error:
        if (fd_binary > 0)
@@ -594,8 +594,13 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
 
 static void bm_evict_inode(struct inode *inode)
 {
+       Node *e = inode->i_private;
+
+       if (e && e->flags & MISC_FMT_OPEN_FILE)
+               filp_close(e->interp_file, NULL);
+
        clear_inode(inode);
-       kfree(inode->i_private);
+       kfree(e);
 }
 
 static void kill_node(Node *e)
@@ -603,24 +608,14 @@ static void kill_node(Node *e)
        struct dentry *dentry;
 
        write_lock(&entries_lock);
-       dentry = e->dentry;
-       if (dentry) {
-               list_del_init(&e->list);
-               e->dentry = NULL;
-       }
+       list_del_init(&e->list);
        write_unlock(&entries_lock);
 
-       if ((e->flags & MISC_FMT_OPEN_FILE) && e->interp_file) {
-               filp_close(e->interp_file, NULL);
-               e->interp_file = NULL;
-       }
-
-       if (dentry) {
-               drop_nlink(d_inode(dentry));
-               d_drop(dentry);
-               dput(dentry);
-               simple_release_fs(&bm_mnt, &entry_count);
-       }
+       dentry = e->dentry;
+       drop_nlink(d_inode(dentry));
+       d_drop(dentry);
+       dput(dentry);
+       simple_release_fs(&bm_mnt, &entry_count);
 }
 
 /* /<entry> */
@@ -665,7 +660,8 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
                root = file_inode(file)->i_sb->s_root;
                inode_lock(d_inode(root));
 
-               kill_node(e);
+               if (!list_empty(&e->list))
+                       kill_node(e);
 
                inode_unlock(d_inode(root));
                break;
@@ -794,7 +790,7 @@ static ssize_t bm_status_write(struct file *file, const char __user *buffer,
                inode_lock(d_inode(root));
 
                while (!list_empty(&entries))
-                       kill_node(list_entry(entries.next, Node, list));
+                       kill_node(list_first_entry(&entries, Node, list));
 
                inode_unlock(d_inode(root));
                break;
index afdf4e3cafc2aa5f1c1ff1dc0e8cfb256c6a3b89..7cde3f46ad263ab084aafaefa14161902f33d4f1 100644 (file)
@@ -19,7 +19,6 @@ static int load_script(struct linux_binprm *bprm)
        const char *i_arg, *i_name;
        char *cp;
        struct file *file;
-       char interp[BINPRM_BUF_SIZE];
        int retval;
 
        if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!'))
@@ -55,7 +54,7 @@ static int load_script(struct linux_binprm *bprm)
                        break;
        }
        for (cp = bprm->buf+2; (*cp == ' ') || (*cp == '\t'); cp++);
-       if (*cp == '\0') 
+       if (*cp == '\0')
                return -ENOEXEC; /* No interpreter name found */
        i_name = cp;
        i_arg = NULL;
@@ -65,7 +64,6 @@ static int load_script(struct linux_binprm *bprm)
                *cp++ = '\0';
        if (*cp)
                i_arg = cp;
-       strcpy (interp, i_name);
        /*
         * OK, we've parsed out the interpreter name and
         * (optional) argument.
@@ -80,24 +78,27 @@ static int load_script(struct linux_binprm *bprm)
        if (retval)
                return retval;
        retval = copy_strings_kernel(1, &bprm->interp, bprm);
-       if (retval < 0) return retval; 
+       if (retval < 0)
+               return retval;
        bprm->argc++;
        if (i_arg) {
                retval = copy_strings_kernel(1, &i_arg, bprm);
-               if (retval < 0) return retval; 
+               if (retval < 0)
+                       return retval;
                bprm->argc++;
        }
        retval = copy_strings_kernel(1, &i_name, bprm);
-       if (retval) return retval; 
+       if (retval)
+               return retval;
        bprm->argc++;
-       retval = bprm_change_interp(interp, bprm);
+       retval = bprm_change_interp(i_name, bprm);
        if (retval < 0)
                return retval;
 
        /*
         * OK, now restart the process with the interpreter's dentry.
         */
-       file = open_exec(interp);
+       file = open_exec(i_name);
        if (IS_ERR(file))
                return PTR_ERR(file);
 
index 93d088ffc05c679c7f0f35b847eb1d4341fc3761..789f55e851aeffb6b1212403188638d12a1d2540 100644 (file)
@@ -716,10 +716,12 @@ int bdev_write_page(struct block_device *bdev, sector_t sector,
 
        set_page_writeback(page);
        result = ops->rw_page(bdev, sector + get_start_sect(bdev), page, true);
-       if (result)
+       if (result) {
                end_page_writeback(page);
-       else
+       } else {
+               clean_page_buffers(page);
                unlock_page(page);
+       }
        blk_queue_exit(bdev->bd_queue);
        return result;
 }
index 962a95aefb811eb965185323d1954d6b04f1530d..f2cd9dedb037390cb9c635babba386e15cb3fa5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_BTRFS_FS) := btrfs.o
 
index b51d23f5cafa9eff1cfc9b1936817095a1b3b5e0..280384bf34f13b20b7a0817a36fe49a53d618285 100644 (file)
@@ -107,7 +107,8 @@ static void end_compressed_bio_read(struct bio *bio)
        struct inode *inode;
        struct page *page;
        unsigned long index;
-       int ret;
+       unsigned int mirror = btrfs_io_bio(bio)->mirror_num;
+       int ret = 0;
 
        if (bio->bi_status)
                cb->errors = 1;
@@ -118,6 +119,21 @@ static void end_compressed_bio_read(struct bio *bio)
        if (!refcount_dec_and_test(&cb->pending_bios))
                goto out;
 
+       /*
+        * Record the correct mirror_num in cb->orig_bio so that
+        * read-repair can work properly.
+        */
+       ASSERT(btrfs_io_bio(cb->orig_bio));
+       btrfs_io_bio(cb->orig_bio)->mirror_num = mirror;
+       cb->mirror_num = mirror;
+
+       /*
+        * Some IO in this cb have failed, just skip checksum as there
+        * is no way it could be correct.
+        */
+       if (cb->errors == 1)
+               goto csum_failed;
+
        inode = cb->inode;
        ret = check_compressed_csum(BTRFS_I(inode), cb,
                                    (u64)bio->bi_iter.bi_sector << 9);
index 5a8933da39a75f504c5bb0329a2b62508be40042..8fc690384c585779a9a6838b08228b41468a49b6 100644 (file)
@@ -709,7 +709,6 @@ struct btrfs_delayed_root;
 #define BTRFS_FS_OPEN                          5
 #define BTRFS_FS_QUOTA_ENABLED                 6
 #define BTRFS_FS_QUOTA_ENABLING                        7
-#define BTRFS_FS_QUOTA_DISABLING               8
 #define BTRFS_FS_UPDATE_UUID_TREE_GEN          9
 #define BTRFS_FS_CREATING_FREE_SPACE_TREE      10
 #define BTRFS_FS_BTREE_ERR                     11
@@ -723,7 +722,7 @@ struct btrfs_delayed_root;
  * Indicate that a whole-filesystem exclusive operation is running
  * (device replace, resize, device add/delete, balance)
  */
-#define BTRFS_FS_EXCL_OP                       14
+#define BTRFS_FS_EXCL_OP                       16
 
 struct btrfs_fs_info {
        u8 fsid[BTRFS_FSID_SIZE];
index 487bbe4fb3c6e7a92156aec7060dd84e3c2525a0..dfdab849037b70887e9a61d5b1044a313658d437 100644 (file)
@@ -3643,7 +3643,14 @@ int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors)
        u64 flags;
 
        do_barriers = !btrfs_test_opt(fs_info, NOBARRIER);
-       backup_super_roots(fs_info);
+
+       /*
+        * max_mirrors == 0 indicates we're from commit_transaction,
+        * not from fsync where the tree roots in fs_info have not
+        * been consistent on disk.
+        */
+       if (max_mirrors == 0)
+               backup_super_roots(fs_info);
 
        sb = fs_info->super_for_commit;
        dev_item = &sb->dev_item;
index fa66980726c92ce68c84348ca3154854e97f72ec..3aeb5770f8965ba30bd40c5ce76938fb0809bf3e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/types.h>
 #include "ctree.h"
index 074348a95841f21f8e7cb10215389b4b223f34ea..91b3908e7c5490904f760ba17a9d3a4409fa9028 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BTRFS_EXPORT_H
 #define BTRFS_EXPORT_H
 
index 3e5bb0cdd3cdd46dbc92273d370d9593963820e7..7fa50e12f18e7371032438689e46ea158684862e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <linux/slab.h>
 #include <linux/bio.h>
@@ -2801,7 +2802,7 @@ static int submit_extent_page(unsigned int opf, struct extent_io_tree *tree,
                }
        }
 
-       bio = btrfs_bio_alloc(bdev, sector << 9);
+       bio = btrfs_bio_alloc(bdev, (u64)sector << 9);
        bio_add_page(bio, page, page_size, offset);
        bio->bi_end_io = end_io_func;
        bio->bi_private = tree;
@@ -3471,8 +3472,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
        unsigned int write_flags = 0;
        unsigned long nr_written = 0;
 
-       if (wbc->sync_mode == WB_SYNC_ALL)
-               write_flags = REQ_SYNC;
+       write_flags = wbc_to_write_flags(wbc);
 
        trace___extent_writepage(page, inode, wbc);
 
@@ -3718,7 +3718,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
        unsigned long i, num_pages;
        unsigned long bio_flags = 0;
        unsigned long start, end;
-       unsigned int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META;
+       unsigned int write_flags = wbc_to_write_flags(wbc) | REQ_META;
        int ret = 0;
 
        clear_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags);
@@ -4063,9 +4063,6 @@ static void flush_epd_write_bio(struct extent_page_data *epd)
        if (epd->bio) {
                int ret;
 
-               bio_set_op_attrs(epd->bio, REQ_OP_WRITE,
-                                epd->sync_io ? REQ_SYNC : 0);
-
                ret = submit_one_bio(epd->bio, 0, epd->bio_flags);
                BUG_ON(ret < 0); /* -ENOMEM */
                epd->bio = NULL;
index faffa28ba707f3733e841aff16b02da259730249..e5535bbe69537f03a267ddbee3a3f137879740f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __EXTENTIO__
 #define __EXTENTIO__
 
index 69850155870c067d82768c67f3895a2e7a7c487d..2e348fb0b280d64ae158a28713e33a8d48f0598d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
index a67b2def54131f10326c71092f80f2cd2d706212..64365bbc9b161b24e5fe3d0817fc65fffb8b04af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __EXTENTMAP__
 #define __EXTENTMAP__
 
index c8e864b2d530f88c7e65350ca557e36e6061700e..6734ec92a1e92c8259d7250a3327fb99a41e5c1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BTRFS_INODE_MAP
 #define __BTRFS_INODE_MAP
 
index 128f3e58634f4a6821b4cf18547db075cfbe03d5..d94e3f68b9b134f8e3027dec70f1952c42e8ce52 100644 (file)
@@ -135,6 +135,18 @@ static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
                                                 const u64 offset,
                                                 const u64 bytes)
 {
+       unsigned long index = offset >> PAGE_SHIFT;
+       unsigned long end_index = (offset + bytes - 1) >> PAGE_SHIFT;
+       struct page *page;
+
+       while (index <= end_index) {
+               page = find_get_page(inode->i_mapping, index);
+               index++;
+               if (!page)
+                       continue;
+               ClearPagePrivate2(page);
+               put_page(page);
+       }
        return __endio_write_update_ordered(inode, offset + PAGE_SIZE,
                                            bytes - PAGE_SIZE, false);
 }
@@ -8357,11 +8369,8 @@ static void btrfs_endio_direct_read(struct bio *bio)
        struct btrfs_io_bio *io_bio = btrfs_io_bio(bio);
        blk_status_t err = bio->bi_status;
 
-       if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED) {
+       if (dip->flags & BTRFS_DIO_ORIG_BIO_SUBMITTED)
                err = btrfs_subio_endio_read(inode, io_bio, err);
-               if (!err)
-                       bio->bi_status = 0;
-       }
 
        unlock_extent(&BTRFS_I(inode)->io_tree, dip->logical_offset,
                      dip->logical_offset + dip->bytes - 1);
@@ -8369,7 +8378,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
 
        kfree(dip);
 
-       dio_bio->bi_status = bio->bi_status;
+       dio_bio->bi_status = err;
        dio_end_io(dio_bio);
 
        if (io_bio->end_io)
@@ -8387,6 +8396,7 @@ static void __endio_write_update_ordered(struct inode *inode,
        btrfs_work_func_t func;
        u64 ordered_offset = offset;
        u64 ordered_bytes = bytes;
+       u64 last_offset;
        int ret;
 
        if (btrfs_is_free_space_inode(BTRFS_I(inode))) {
@@ -8398,6 +8408,7 @@ static void __endio_write_update_ordered(struct inode *inode,
        }
 
 again:
+       last_offset = ordered_offset;
        ret = btrfs_dec_test_first_ordered_pending(inode, &ordered,
                                                   &ordered_offset,
                                                   ordered_bytes,
@@ -8408,6 +8419,12 @@ again:
        btrfs_init_work(&ordered->work, func, finish_ordered_fn, NULL, NULL);
        btrfs_queue_work(wq, &ordered->work);
 out_test:
+       /*
+        * If btrfs_dec_test_ordered_pending does not find any ordered extent
+        * in the range, we can exit.
+        */
+       if (ordered_offset == last_offset)
+               return;
        /*
         * our bio might span multiple ordered extents.  If we haven't
         * completed the accounting for the whole dio, go back and try again
index d6715c2bcdc472d567bab9fd617e808fbcbd480f..6c7a49faf4e0636e67c9f818893975dc48d7436a 100644 (file)
@@ -2773,9 +2773,9 @@ static long btrfs_ioctl_fs_info(struct btrfs_fs_info *fs_info,
        }
        mutex_unlock(&fs_devices->device_list_mutex);
 
-       fi_args->nodesize = fs_info->super_copy->nodesize;
-       fi_args->sectorsize = fs_info->super_copy->sectorsize;
-       fi_args->clone_alignment = fs_info->super_copy->sectorsize;
+       fi_args->nodesize = fs_info->nodesize;
+       fi_args->sectorsize = fs_info->sectorsize;
+       fi_args->clone_alignment = fs_info->sectorsize;
 
        if (copy_to_user(arg, fi_args, sizeof(*fi_args)))
                ret = -EFAULT;
@@ -3032,7 +3032,7 @@ static int btrfs_cmp_data_prepare(struct inode *src, u64 loff,
 out:
        if (ret)
                btrfs_cmp_data_free(cmp);
-       return 0;
+       return ret;
 }
 
 static int btrfs_cmp_data(u64 len, struct cmp_pages *cmp)
@@ -4061,6 +4061,10 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
                ret = PTR_ERR(new_root);
                goto out;
        }
+       if (!is_fstree(new_root->objectid)) {
+               ret = -ENOENT;
+               goto out;
+       }
 
        path = btrfs_alloc_path();
        if (!path) {
index 5c8b61c86e61f9ed5445f5022a3b20f1134068bf..e172d4843eae2d8eb6f0d29dce38fb7f693f4ed0 100644 (file)
@@ -807,7 +807,6 @@ static int btrfs_clean_quota_tree(struct btrfs_trans_handle *trans,
        }
        ret = 0;
 out:
-       set_bit(BTRFS_FS_QUOTA_DISABLING, &root->fs_info->flags);
        btrfs_free_path(path);
        return ret;
 }
@@ -953,7 +952,6 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans,
        if (!fs_info->quota_root)
                goto out;
        clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags);
-       set_bit(BTRFS_FS_QUOTA_DISABLING, &fs_info->flags);
        btrfs_qgroup_wait_for_completion(fs_info, false);
        spin_lock(&fs_info->qgroup_lock);
        quota_root = fs_info->quota_root;
@@ -1307,6 +1305,8 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
                }
        }
        ret = del_qgroup_item(trans, quota_root, qgroupid);
+       if (ret && ret != -ENOENT)
+               goto out;
 
        while (!list_empty(&qgroup->groups)) {
                list = list_first_entry(&qgroup->groups,
@@ -2086,8 +2086,6 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans,
 
        if (test_and_clear_bit(BTRFS_FS_QUOTA_ENABLING, &fs_info->flags))
                set_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags);
-       if (test_and_clear_bit(BTRFS_FS_QUOTA_DISABLING, &fs_info->flags))
-               clear_bit(BTRFS_FS_QUOTA_ENABLED, &fs_info->flags);
 
        spin_lock(&fs_info->qgroup_lock);
        while (!list_empty(&fs_info->dirty_qgroups)) {
index 3a49a3c2fca4549a8e6fd19cf4ec9de119aa0a5d..9841faef08ea72d0b50aa3ad3c881bd27bd7fc76 100644 (file)
@@ -2400,11 +2400,11 @@ void free_reloc_roots(struct list_head *list)
        while (!list_empty(list)) {
                reloc_root = list_entry(list->next, struct btrfs_root,
                                        root_list);
+               __del_reloc_root(reloc_root);
                free_extent_buffer(reloc_root->node);
                free_extent_buffer(reloc_root->commit_root);
                reloc_root->node = NULL;
                reloc_root->commit_root = NULL;
-               __del_reloc_root(reloc_root);
        }
 }
 
index 32b043ef8ac9a3e25f492e99cd4fe4ef347205cf..8fd195cfe81b97b92412b95ac645188eb9a5a693 100644 (file)
@@ -2630,7 +2630,7 @@ static int send_create_inode(struct send_ctx *sctx, u64 ino)
        } else {
                btrfs_warn(sctx->send_root->fs_info, "unexpected inode type %o",
                                (int)(mode & S_IFMT));
-               ret = -ENOTSUPP;
+               ret = -EOPNOTSUPP;
                goto out;
        }
 
index 35a128acfbd157b302386f9890d2a1de160c7be7..161694b660385a3ecedd758c964c1690d3e39386 100644 (file)
@@ -1135,7 +1135,7 @@ static int btrfs_fill_super(struct super_block *sb,
 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
        sb->s_flags |= MS_POSIXACL;
 #endif
-       sb->s_flags |= MS_I_VERSION;
+       sb->s_flags |= SB_I_VERSION;
        sb->s_iflags |= SB_I_CGROUPWB;
 
        err = super_setup_bdi(sb);
index d7da1a4c2f6c12d04a8f29e4d8f503943058d46d..4cb908305e5dab49638a9b3d6368f1b730aa5966 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BTRFS_SYSFS_H_
 #define _BTRFS_SYSFS_H_
 
index ad7f4bab640be36d9f43b8b2f3371a7bd871738f..c800d067fcbf0c8eec90c479eefe5df13e2dc945 100644 (file)
@@ -4181,6 +4181,7 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
        struct extent_map *em, *n;
        struct list_head extents;
        struct extent_map_tree *tree = &inode->extent_tree;
+       u64 logged_start, logged_end;
        u64 test_gen;
        int ret = 0;
        int num = 0;
@@ -4190,10 +4191,11 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
        down_write(&inode->dio_sem);
        write_lock(&tree->lock);
        test_gen = root->fs_info->last_trans_committed;
+       logged_start = start;
+       logged_end = end;
 
        list_for_each_entry_safe(em, n, &tree->modified_extents, list) {
                list_del_init(&em->list);
-
                /*
                 * Just an arbitrary number, this can be really CPU intensive
                 * once we start getting a lot of extents, and really once we
@@ -4208,6 +4210,12 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
 
                if (em->generation <= test_gen)
                        continue;
+
+               if (em->start < logged_start)
+                       logged_start = em->start;
+               if ((em->start + em->len - 1) > logged_end)
+                       logged_end = em->start + em->len - 1;
+
                /* Need a ref to keep it from getting evicted from cache */
                refcount_inc(&em->refs);
                set_bit(EXTENT_FLAG_LOGGING, &em->flags);
@@ -4216,7 +4224,7 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
        }
 
        list_sort(NULL, &extents, extent_cmp);
-       btrfs_get_logged_extents(inode, logged_list, start, end);
+       btrfs_get_logged_extents(inode, logged_list, logged_start, logged_end);
        /*
         * Some ordered extents started by fsync might have completed
         * before we could collect them into the list logged_list, which
index 0e8f16c305df192b412b86be4a69acb1a2236243..b39737568c223c208d92b2f4ab73ac0263ad3ff4 100644 (file)
@@ -6166,7 +6166,7 @@ blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
        map_length = length;
 
        btrfs_bio_counter_inc_blocked(fs_info);
-       ret = __btrfs_map_block(fs_info, bio_op(bio), logical,
+       ret = __btrfs_map_block(fs_info, btrfs_op(bio), logical,
                                &map_length, &bbio, mirror_num, 1);
        if (ret) {
                btrfs_bio_counter_dec(fs_info);
index 32cbab0ffce30cd94667d40e444c1e10cb47cc6a..891dedda59054ef42f64ee622a04e20c8f5715f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for caching in a mounted filesystem
 #
index 85a4230b9bffd5ca311d7b37bfc97e409ccc30ee..174f5709e5086257bdfd623de7fbb07011c30634 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for CEPH filesystem.
 #
index b3e3edc09d80382c72a1d2d42515ad67ea51bdb3..4d622654bfbcc2eb10ce81d461c53a35e5f2c44d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/backing-dev.h>
index 157fe59fbabe5c9f5608d4e186154c8372643d6f..ff5d32cf9578f77aa28bebd2634fd61cb3d27064 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/fs.h>
@@ -1991,6 +1992,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
 retry:
        spin_lock(&ci->i_ceph_lock);
        if (ci->i_ceph_flags & CEPH_I_NOFLUSH) {
+               spin_unlock(&ci->i_ceph_lock);
                dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode);
                goto out;
        }
@@ -2008,8 +2010,10 @@ retry:
                        mutex_lock(&session->s_mutex);
                        goto retry;
                }
-               if (cap->session->s_state < CEPH_MDS_SESSION_OPEN)
+               if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) {
+                       spin_unlock(&ci->i_ceph_lock);
                        goto out;
+               }
 
                flushing = __mark_caps_flushing(inode, session, true,
                                                &flush_tid, &oldest_flush_tid);
index bdce8b1fbd06794d9de7be918c9ab8aab97bcbd2..6f67d5b884a0b8fc8efe7dde153d6bb918bddfbc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Ceph 'frag' type
  */
index d635496ea1899dc06195812d2f0644d33ecff6c6..644def8137547e103a67e653b9fe3832e0737eb8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/device.h>
index 019c2036d36f3e15b86a4da732b5cfd862e4670a..8a5266699b67657b0ea9053a03fe0ed255abb293 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/spinlock.h>
index 7df550c13d7f3e25c2f0f4d6259bd92255a44f58..3c59ad180ef0bb5b9dfb09528e5c1dc363f9b94e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/exportfs.h>
index 65a6fa12c857319900fa45b323947ca054998a16..5c17125f45c786ab65aeeaa4782faedd895525a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/module.h>
index 373dab5173cac540d27eb3b6b889569cb69415db..f2550a076edc4e65da6e36354ef9ba2ba517d184 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/module.h>
index 4c9c72f26eb90c6fd3693dc8f6ad7e9eda458ca3..851aa69ec8f0dae6ec4837b2dc3807c4420cc751 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 #include <linux/in.h>
 
index c77028afb1e1e6b52315a73d013a26fb5c9c7f5b..51f7f1d39a94c54b2b6c17bd83833be017edf38b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_CEPH_IOCTL_H
 #define FS_CEPH_IOCTL_H
 
index 8cd63e8123d8f10f2f81734a32658d0c07f5feab..e7cce412f2cf7b5362606f2286291290a218b9c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/file.h>
index 9dd6b836ac9e5b91d60a439995695d72c06c97e5..0687ab3c32674d863213186dc4554d17ad219bf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/fs.h>
@@ -7,7 +8,6 @@
 #include <linux/sched.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
-#include <linux/utsname.h>
 #include <linux/ratelimit.h>
 
 #include "super.h"
@@ -735,12 +735,13 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
                        inode = req->r_inode;
                        ihold(inode);
                } else {
-                       /* req->r_dentry is non-null for LSSNAP request.
-                        * fall-thru */
-                       WARN_ON_ONCE(!req->r_dentry);
+                       /* req->r_dentry is non-null for LSSNAP request */
+                       rcu_read_lock();
+                       inode = get_nonsnap_parent(req->r_dentry);
+                       rcu_read_unlock();
+                       dout("__choose_mds using snapdir's parent %p\n", inode);
                }
-       }
-       if (!inode && req->r_dentry) {
+       } else if (req->r_dentry) {
                /* ignore race with rename; old or new d_parent is okay */
                struct dentry *parent;
                struct inode *dir;
@@ -884,8 +885,8 @@ static struct ceph_msg *create_session_open_msg(struct ceph_mds_client *mdsc, u6
        void *p;
 
        const char* metadata[][2] = {
-               {"hostname", utsname()->nodename},
-               {"kernel_version", utsname()->release},
+               {"hostname", mdsc->nodename},
+               {"kernel_version", init_utsname()->release},
                {"entity_id", opt->name ? : ""},
                {"root", fsopt->server_path ? : "/"},
                {NULL, NULL}
@@ -3539,6 +3540,8 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
        init_rwsem(&mdsc->pool_perm_rwsem);
        mdsc->pool_perm_tree = RB_ROOT;
 
+       strncpy(mdsc->nodename, utsname()->nodename,
+               sizeof(mdsc->nodename) - 1);
        return 0;
 }
 
index db57ae98ed345e280358a2ac65e75ac6c71e7c2b..837ac4b087a0babb0f202ae66e79688d8f57822c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_MDS_CLIENT_H
 #define _FS_CEPH_MDS_CLIENT_H
 
@@ -8,6 +9,7 @@
 #include <linux/rbtree.h>
 #include <linux/spinlock.h>
 #include <linux/refcount.h>
+#include <linux/utsname.h>
 
 #include <linux/ceph/types.h>
 #include <linux/ceph/messenger.h>
@@ -368,6 +370,8 @@ struct ceph_mds_client {
 
        struct rw_semaphore     pool_perm_rwsem;
        struct rb_root          pool_perm_tree;
+
+       char nodename[__NEW_UTS_LEN + 1];
 };
 
 extern const char *ceph_mds_op_name(int op);
index 33ced4c22732a86a159f66d91c1ae7a533e192b1..44e53abeb32ae6495663afd1131564f33fea3188 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/bug.h>
index 1ffc8b426c1c4c9f444c5eda57cc803ca5016783..8a2ca41e4b97ca50cad0016102684a50a3ebed59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/sort.h>
@@ -374,12 +375,10 @@ static int build_snap_context(struct ceph_snap_realm *realm,
             realm->ino, realm, snapc, snapc->seq,
             (unsigned int) snapc->num_snaps);
 
-       if (realm->cached_context) {
-               ceph_put_snap_context(realm->cached_context);
-               /* queue realm for cap_snap creation */
-               list_add_tail(&realm->dirty_item, dirty_realms);
-       }
+       ceph_put_snap_context(realm->cached_context);
        realm->cached_context = snapc;
+       /* queue realm for cap_snap creation */
+       list_add_tail(&realm->dirty_item, dirty_realms);
        return 0;
 
 fail:
index 913dea163d5c4dc54d64363561aa8d6ff0083759..4a79f3632260e83a9f3169aea4c11da0119f8117 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Ceph fs string constants
  */
index 279a2f401cf5f40929970e0eb37d7be0d43d7246..3e27a28aa44adfd2da34ff995ff9481ac749d043 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_SUPER_H
 #define _FS_CEPH_SUPER_H
 
index 3542b2c364cfd8e2c517111beee04a6191bbbe4d..e1c4e0b12b4cd1309af51bad916120c7f2273fc4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 #include <linux/ceph/pagelist.h>
 
index ebcc8fb3fa6641363e302082aacd92812142e6b1..a65e4a56318ca79d17c91e36c69c6aa3371728e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/char_dev.c
  *
index f7243617316c072b71817fe951532c758b8de064..d5b2e12b5d02212046f0a7b816550737cc3b45af 100644 (file)
@@ -5,9 +5,14 @@ config CIFS
        select CRYPTO
        select CRYPTO_MD4
        select CRYPTO_MD5
+       select CRYPTO_SHA256
+       select CRYPTO_CMAC
        select CRYPTO_HMAC
        select CRYPTO_ARC4
+       select CRYPTO_AEAD2
+       select CRYPTO_CCM
        select CRYPTO_ECB
+       select CRYPTO_AES
        select CRYPTO_DES
        help
          This is the client VFS module for the SMB3 family of NAS protocols,
index 5e853a395b92fa22724b26f0668258cf07f48d24..7134f182720b636a0f514580dc0047792fe95860 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Linux CIFS VFS client 
 #
index 9727e1dcacd558a89e5fa0c206e82b6f0941a99c..cbb9534b89b40bc3f3cc3be31254485b976d2bcb 100644 (file)
@@ -160,8 +160,13 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
                        if ((ses->serverDomain == NULL) ||
                                (ses->serverOS == NULL) ||
                                (ses->serverNOS == NULL)) {
-                               seq_printf(m, "\n%d) entry for %s not fully "
-                                          "displayed\n\t", i, ses->serverName);
+                               seq_printf(m, "\n%d) Name: %s Uses: %d Capability: 0x%x\tSession Status: %d\t",
+                                       i, ses->serverName, ses->ses_count,
+                                       ses->capabilities, ses->status);
+                               if (ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST)
+                                       seq_printf(m, "Guest\t");
+                               else if (ses->session_flags & SMB2_SESSION_FLAG_IS_NULL)
+                                       seq_printf(m, "Anonymous\t");
                        } else {
                                seq_printf(m,
                                    "\n%d) Name: %s  Domain: %s Uses: %d OS:"
index 180b3356ff8612dfc7f3cd702e350bb284ca1a0d..8c8b75d33f310ce5e258042ff489f942379cdd27 100644 (file)
@@ -461,6 +461,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
                seq_puts(s, ",nocase");
        if (tcon->retry)
                seq_puts(s, ",hard");
+       else
+               seq_puts(s, ",soft");
        if (tcon->use_persistent)
                seq_puts(s, ",persistenthandles");
        else if (tcon->use_resilient)
@@ -1447,7 +1449,7 @@ exit_cifs(void)
        exit_cifs_idmap();
 #endif
 #ifdef CONFIG_CIFS_UPCALL
-       unregister_key_type(&cifs_spnego_key_type);
+       exit_cifs_spnego();
 #endif
        cifs_destroy_request_bufs();
        cifs_destroy_mids();
index 30bf89b1fd9a789ec02070f534d9d9f68b593650..5a10e566f0e610fcaadf0d949e307087f01ecc90 100644 (file)
@@ -149,5 +149,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
 extern const struct export_operations cifs_export_ops;
 #endif /* CONFIG_CIFS_NFSD_EXPORT */
 
-#define CIFS_VERSION   "2.09"
+#define CIFS_VERSION   "2.10"
 #endif                         /* _CIFSFS_H */
index 808486c29f0dcb40dbda7a86e626d77908d82001..e185b2853eab7b1116dafc7ca8aeeb6d09b10687 100644 (file)
@@ -188,6 +188,8 @@ enum smb_version {
 #ifdef CONFIG_CIFS_SMB311
        Smb_311,
 #endif /* SMB311 */
+       Smb_3any,
+       Smb_default,
        Smb_version_err
 };
 
@@ -659,7 +661,9 @@ struct TCP_Server_Info {
 #endif
        unsigned int    max_read;
        unsigned int    max_write;
-       __u8            preauth_hash[512];
+#ifdef CONFIG_CIFS_SMB311
+       __u8    preauth_sha_hash[64]; /* save initital negprot hash */
+#endif /* 3.1.1 */
        struct delayed_work reconnect; /* reconnect workqueue job */
        struct mutex reconnect_mutex; /* prevent simultaneous reconnects */
        unsigned long echo_interval;
@@ -847,7 +851,9 @@ struct cifs_ses {
        __u8 smb3signingkey[SMB3_SIGN_KEY_SIZE];
        __u8 smb3encryptionkey[SMB3_SIGN_KEY_SIZE];
        __u8 smb3decryptionkey[SMB3_SIGN_KEY_SIZE];
-       __u8 preauth_hash[512];
+#ifdef CONFIG_CIFS_SMB311
+       __u8 preauth_sha_hash[64];
+#endif /* 3.1.1 */
 };
 
 static inline bool
@@ -1701,6 +1707,10 @@ extern struct smb_version_values smb20_values;
 #define SMB21_VERSION_STRING   "2.1"
 extern struct smb_version_operations smb21_operations;
 extern struct smb_version_values smb21_values;
+#define SMBDEFAULT_VERSION_STRING "default"
+extern struct smb_version_values smbdefault_values;
+#define SMB3ANY_VERSION_STRING "3"
+extern struct smb_version_values smb3any_values;
 #define SMB30_VERSION_STRING   "3.0"
 extern struct smb_version_operations smb30_operations;
 extern struct smb_version_values smb30_values;
index 5aa2d278ca841f7aa7d4de0bb892dbdfc7a48645..0bfc2280436df86c7414288b5cb4afefb401127d 100644 (file)
@@ -301,6 +301,8 @@ static const match_table_t cifs_smb_version_tokens = {
        { Smb_311, SMB311_VERSION_STRING },
        { Smb_311, ALT_SMB311_VERSION_STRING },
 #endif /* SMB311 */
+       { Smb_3any, SMB3ANY_VERSION_STRING },
+       { Smb_default, SMBDEFAULT_VERSION_STRING },
        { Smb_version_err, NULL }
 };
 
@@ -1148,6 +1150,14 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol)
                vol->vals = &smb311_values;
                break;
 #endif /* SMB311 */
+       case Smb_3any:
+               vol->ops = &smb30_operations; /* currently identical with 3.0 */
+               vol->vals = &smb3any_values;
+               break;
+       case Smb_default:
+               vol->ops = &smb30_operations; /* currently identical with 3.0 */
+               vol->vals = &smbdefault_values;
+               break;
        default:
                cifs_dbg(VFS, "Unknown vers= option specified: %s\n", value);
                return 1;
@@ -1274,9 +1284,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 
        vol->actimeo = CIFS_DEF_ACTIMEO;
 
-       /* FIXME: add autonegotiation for SMB3 or later rather than just SMB3 */
-       vol->ops = &smb30_operations; /* both secure and accepted widely */
-       vol->vals = &smb30_values;
+       /* offer SMB2.1 and later (SMB3 etc). Secure and widely accepted */
+       vol->ops = &smb30_operations;
+       vol->vals = &smbdefault_values;
 
        vol->echo_interval = SMB_ECHO_INTERVAL_DEFAULT;
 
@@ -1988,11 +1998,10 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 
        if (got_version == false)
                pr_warn("No dialect specified on mount. Default has changed to "
-                       "a more secure dialect, SMB3 (vers=3.0), from CIFS "
+                       "a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS "
                        "(SMB1). To use the less secure SMB1 dialect to access "
-                       "old servers which do not support SMB3 specify vers=1.0"
-                       " on mount. For somewhat newer servers such as Windows "
-                       "7 try vers=2.1.\n");
+                       "old servers which do not support SMB3 (or SMB2.1) specify vers=1.0"
+                       " on mount.\n");
 
        kfree(mountdata_copy);
        return 0;
@@ -2133,6 +2142,7 @@ static int match_server(struct TCP_Server_Info *server, struct smb_vol *vol)
        if (vol->nosharesock)
                return 0;
 
+       /* BB update this for smb3any and default case */
        if ((server->vals != vol->vals) || (server->ops != vol->ops))
                return 0;
 
@@ -4144,6 +4154,14 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
        cifs_dbg(FYI, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d\n",
                 server->sec_mode, server->capabilities, server->timeAdj);
 
+       if (ses->auth_key.response) {
+               cifs_dbg(VFS, "Free previous auth_key.response = %p\n",
+                        ses->auth_key.response);
+               kfree(ses->auth_key.response);
+               ses->auth_key.response = NULL;
+               ses->auth_key.len = 0;
+       }
+
        if (server->ops->sess_setup)
                rc = server->ops->sess_setup(xid, ses, nls_info);
 
index e702d48bd023411f3bbed69c6cc6a571f2fc059c..81ba6e0d88d8f3ec1d1c8b2e81e695819537c921 100644 (file)
@@ -204,7 +204,8 @@ check_name(struct dentry *direntry, struct cifs_tcon *tcon)
        struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
        int i;
 
-       if (unlikely(direntry->d_name.len >
+       if (unlikely(tcon->fsAttrInfo.MaxPathNameComponentLength &&
+                    direntry->d_name.len >
                     le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength)))
                return -ENAMETOOLONG;
 
@@ -520,7 +521,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
 
        rc = check_name(direntry, tcon);
        if (rc)
-               goto out_free_xid;
+               goto out;
 
        server = tcon->ses->server;
 
index 0786f19d288f8e5e5defe2c7a97a26a88c646e87..92fdf9c35de2153fd6f008c4d1306ead6d806c89 100644 (file)
@@ -224,6 +224,13 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
        if (backup_cred(cifs_sb))
                create_options |= CREATE_OPEN_BACKUP_INTENT;
 
+       /* O_SYNC also has bit for O_DSYNC so following check picks up either */
+       if (f_flags & O_SYNC)
+               create_options |= CREATE_WRITE_THROUGH;
+
+       if (f_flags & O_DIRECT)
+               create_options |= CREATE_NO_BUFFER;
+
        oparms.tcon = tcon;
        oparms.cifs_sb = cifs_sb;
        oparms.desired_access = desired_access;
@@ -1102,8 +1109,10 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
        struct cifs_tcon *tcon;
        unsigned int num, max_num, max_buf;
        LOCKING_ANDX_RANGE *buf, *cur;
-       int types[] = {LOCKING_ANDX_LARGE_FILES,
-                      LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES};
+       static const int types[] = {
+               LOCKING_ANDX_LARGE_FILES,
+               LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES
+       };
        int i;
 
        xid = get_xid();
@@ -1434,8 +1443,10 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
                  unsigned int xid)
 {
        int rc = 0, stored_rc;
-       int types[] = {LOCKING_ANDX_LARGE_FILES,
-                      LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES};
+       static const int types[] = {
+               LOCKING_ANDX_LARGE_FILES,
+               LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES
+       };
        unsigned int i;
        unsigned int max_num, num, max_buf;
        LOCKING_ANDX_RANGE *buf, *cur;
index a8693632235f02b349db28e8d77aa45e30d4c783..7c732cb4416411e597f2e1a4af96fd8bf7e49beb 100644 (file)
@@ -234,6 +234,8 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
        fattr->cf_atime = cifs_NTtimeToUnix(info->LastAccessTime);
        fattr->cf_mtime = cifs_NTtimeToUnix(info->LastModificationTime);
        fattr->cf_ctime = cifs_NTtimeToUnix(info->LastStatusChange);
+       /* old POSIX extensions don't get create time */
+
        fattr->cf_mode = le64_to_cpu(info->Permissions);
 
        /*
@@ -2024,6 +2026,19 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
        stat->blksize = CIFS_MAX_MSGSIZE;
        stat->ino = CIFS_I(inode)->uniqueid;
 
+       /* old CIFS Unix Extensions doesn't return create time */
+       if (CIFS_I(inode)->createtime) {
+               stat->result_mask |= STATX_BTIME;
+               stat->btime =
+                     cifs_NTtimeToUnix(cpu_to_le64(CIFS_I(inode)->createtime));
+       }
+
+       stat->attributes_mask |= (STATX_ATTR_COMPRESSED | STATX_ATTR_ENCRYPTED);
+       if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_COMPRESSED)
+               stat->attributes |= STATX_ATTR_COMPRESSED;
+       if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_ENCRYPTED)
+               stat->attributes |= STATX_ATTR_ENCRYPTED;
+
        /*
         * If on a multiuser mount without unix extensions or cifsacl being
         * enabled, and the admin hasn't overridden them, set the ownership
index 7ca9808a0daa01bfb149690964bbd165d9c6af20..62c88dfed57b3f66fff931f4abbcc8126ca4cf11 100644 (file)
@@ -214,7 +214,7 @@ static const struct status_to_posix_error smb2_error_map_table[] = {
        {STATUS_DATATYPE_MISALIGNMENT, -EIO, "STATUS_DATATYPE_MISALIGNMENT"},
        {STATUS_BREAKPOINT, -EIO, "STATUS_BREAKPOINT"},
        {STATUS_SINGLE_STEP, -EIO, "STATUS_SINGLE_STEP"},
-       {STATUS_BUFFER_OVERFLOW, -EIO, "STATUS_BUFFER_OVERFLOW"},
+       {STATUS_BUFFER_OVERFLOW, -E2BIG, "STATUS_BUFFER_OVERFLOW"},
        {STATUS_NO_MORE_FILES, -ENODATA, "STATUS_NO_MORE_FILES"},
        {STATUS_WAKE_SYSTEM_DEBUGGER, -EIO, "STATUS_WAKE_SYSTEM_DEBUGGER"},
        {STATUS_HANDLES_CLOSED, -EIO, "STATUS_HANDLES_CLOSED"},
index fb2934b9b97cf56f16359702a7bcb81cd6624252..bdb963d0ba32069035bdd23c9046985b41feb2bb 100644 (file)
@@ -426,6 +426,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
        return rc;
 }
 
+#ifdef CONFIG_CIFS_XATTR
 static ssize_t
 move_smb2_ea_to_cifs(char *dst, size_t dst_size,
                     struct smb2_file_full_ea_info *src, size_t src_size,
@@ -521,6 +522,7 @@ smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
        struct cifs_open_parms oparms;
        struct cifs_fid fid;
        struct smb2_file_full_ea_info *smb2_data;
+       int ea_buf_size = SMB2_MIN_EA_BUF;
 
        utf16_path = cifs_convert_path_to_utf16(path, cifs_sb);
        if (!utf16_path)
@@ -540,14 +542,32 @@ smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
                return rc;
        }
 
-       smb2_data = kzalloc(SMB2_MAX_EA_BUF, GFP_KERNEL);
-       if (smb2_data == NULL) {
-               SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
-               return -ENOMEM;
+       while (1) {
+               smb2_data = kzalloc(ea_buf_size, GFP_KERNEL);
+               if (smb2_data == NULL) {
+                       SMB2_close(xid, tcon, fid.persistent_fid,
+                                  fid.volatile_fid);
+                       return -ENOMEM;
+               }
+
+               rc = SMB2_query_eas(xid, tcon, fid.persistent_fid,
+                                   fid.volatile_fid,
+                                   ea_buf_size, smb2_data);
+
+               if (rc != -E2BIG)
+                       break;
+
+               kfree(smb2_data);
+               ea_buf_size <<= 1;
+
+               if (ea_buf_size > SMB2_MAX_EA_BUF) {
+                       cifs_dbg(VFS, "EA size is too large\n");
+                       SMB2_close(xid, tcon, fid.persistent_fid,
+                                  fid.volatile_fid);
+                       return -ENOMEM;
+               }
        }
 
-       rc = SMB2_query_eas(xid, tcon, fid.persistent_fid, fid.volatile_fid,
-                           smb2_data);
        SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
 
        if (!rc)
@@ -613,6 +633,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
 
        return rc;
 }
+#endif
 
 static bool
 smb2_can_echo(struct TCP_Server_Info *server)
@@ -3110,6 +3131,46 @@ struct smb_version_values smb21_values = {
        .create_lease_size = sizeof(struct create_lease),
 };
 
+struct smb_version_values smb3any_values = {
+       .version_string = SMB3ANY_VERSION_STRING,
+       .protocol_id = SMB302_PROT_ID, /* doesn't matter, send protocol array */
+       .req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_PERSISTENT_HANDLES | SMB2_GLOBAL_CAP_ENCRYPTION,
+       .large_lock_type = 0,
+       .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
+       .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
+       .unlock_lock_type = SMB2_LOCKFLAG_UNLOCK,
+       .header_size = sizeof(struct smb2_hdr),
+       .max_header_size = MAX_SMB2_HDR_SIZE,
+       .read_rsp_size = sizeof(struct smb2_read_rsp) - 1,
+       .lock_cmd = SMB2_LOCK,
+       .cap_unix = 0,
+       .cap_nt_find = SMB2_NT_FIND,
+       .cap_large_files = SMB2_LARGE_FILES,
+       .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
+       .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
+       .create_lease_size = sizeof(struct create_lease_v2),
+};
+
+struct smb_version_values smbdefault_values = {
+       .version_string = SMBDEFAULT_VERSION_STRING,
+       .protocol_id = SMB302_PROT_ID, /* doesn't matter, send protocol array */
+       .req_capabilities = SMB2_GLOBAL_CAP_DFS | SMB2_GLOBAL_CAP_LEASING | SMB2_GLOBAL_CAP_LARGE_MTU | SMB2_GLOBAL_CAP_PERSISTENT_HANDLES | SMB2_GLOBAL_CAP_ENCRYPTION,
+       .large_lock_type = 0,
+       .exclusive_lock_type = SMB2_LOCKFLAG_EXCLUSIVE_LOCK,
+       .shared_lock_type = SMB2_LOCKFLAG_SHARED_LOCK,
+       .unlock_lock_type = SMB2_LOCKFLAG_UNLOCK,
+       .header_size = sizeof(struct smb2_hdr),
+       .max_header_size = MAX_SMB2_HDR_SIZE,
+       .read_rsp_size = sizeof(struct smb2_read_rsp) - 1,
+       .lock_cmd = SMB2_LOCK,
+       .cap_unix = 0,
+       .cap_nt_find = SMB2_NT_FIND,
+       .cap_large_files = SMB2_LARGE_FILES,
+       .signing_enabled = SMB2_NEGOTIATE_SIGNING_ENABLED | SMB2_NEGOTIATE_SIGNING_REQUIRED,
+       .signing_required = SMB2_NEGOTIATE_SIGNING_REQUIRED,
+       .create_lease_size = sizeof(struct create_lease_v2),
+};
+
 struct smb_version_values smb30_values = {
        .version_string = SMB30_VERSION_STRING,
        .protocol_id = SMB30_PROT_ID,
index 5531e7ee1210eba48915a6a0d4d01b348b386cde..5331631386a23bd4a7458ecb5fb96efe1773cf71 100644 (file)
@@ -439,7 +439,7 @@ assemble_neg_contexts(struct smb2_negotiate_req *req)
        build_encrypt_ctxt((struct smb2_encryption_neg_context *)pneg_ctxt);
        req->NegotiateContextOffset = cpu_to_le32(OFFSET_OF_NEG_CONTEXT);
        req->NegotiateContextCount = cpu_to_le16(2);
-       inc_rfc1001_len(req, 4 + sizeof(struct smb2_preauth_neg_context) + 2
+       inc_rfc1001_len(req, 4 + sizeof(struct smb2_preauth_neg_context)
                        + sizeof(struct smb2_encryption_neg_context)); /* calculate hash */
 }
 #else
@@ -491,10 +491,25 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
 
        req->hdr.sync_hdr.SessionId = 0;
 
-       req->Dialects[0] = cpu_to_le16(ses->server->vals->protocol_id);
-
-       req->DialectCount = cpu_to_le16(1); /* One vers= at a time for now */
-       inc_rfc1001_len(req, 2);
+       if (strcmp(ses->server->vals->version_string,
+                  SMB3ANY_VERSION_STRING) == 0) {
+               req->Dialects[0] = cpu_to_le16(SMB30_PROT_ID);
+               req->Dialects[1] = cpu_to_le16(SMB302_PROT_ID);
+               req->DialectCount = cpu_to_le16(2);
+               inc_rfc1001_len(req, 4);
+       } else if (strcmp(ses->server->vals->version_string,
+                  SMBDEFAULT_VERSION_STRING) == 0) {
+               req->Dialects[0] = cpu_to_le16(SMB21_PROT_ID);
+               req->Dialects[1] = cpu_to_le16(SMB30_PROT_ID);
+               req->Dialects[2] = cpu_to_le16(SMB302_PROT_ID);
+               req->DialectCount = cpu_to_le16(3);
+               inc_rfc1001_len(req, 6);
+       } else {
+               /* otherwise send specific dialect */
+               req->Dialects[0] = cpu_to_le16(ses->server->vals->protocol_id);
+               req->DialectCount = cpu_to_le16(1);
+               inc_rfc1001_len(req, 2);
+       }
 
        /* only one of SMB2 signing flags may be set in SMB2 request */
        if (ses->sign)
@@ -528,16 +543,43 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
         */
        if (rc == -EOPNOTSUPP) {
                cifs_dbg(VFS, "Dialect not supported by server. Consider "
-                       "specifying vers=1.0 or vers=2.1 on mount for accessing"
+                       "specifying vers=1.0 or vers=2.0 on mount for accessing"
                        " older servers\n");
                goto neg_exit;
        } else if (rc != 0)
                goto neg_exit;
 
+       if (strcmp(ses->server->vals->version_string,
+                  SMB3ANY_VERSION_STRING) == 0) {
+               if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) {
+                       cifs_dbg(VFS,
+                               "SMB2 dialect returned but not requested\n");
+                       return -EIO;
+               } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) {
+                       cifs_dbg(VFS,
+                               "SMB2.1 dialect returned but not requested\n");
+                       return -EIO;
+               }
+       } else if (strcmp(ses->server->vals->version_string,
+                  SMBDEFAULT_VERSION_STRING) == 0) {
+               if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) {
+                       cifs_dbg(VFS,
+                               "SMB2 dialect returned but not requested\n");
+                       return -EIO;
+               } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) {
+                       /* ops set to 3.0 by default for default so update */
+                       ses->server->ops = &smb21_operations;
+               }
+       } else if (le16_to_cpu(rsp->DialectRevision) !=
+                               ses->server->vals->protocol_id) {
+               /* if requested single dialect ensure returned dialect matched */
+               cifs_dbg(VFS, "Illegal 0x%x dialect returned: not requested\n",
+                       le16_to_cpu(rsp->DialectRevision));
+               return -EIO;
+       }
+
        cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode);
 
-       /* BB we may eventually want to match the negotiated vs. requested
-          dialect, even though we are only requesting one at a time */
        if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID))
                cifs_dbg(FYI, "negotiated smb2.0 dialect\n");
        else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID))
@@ -558,6 +600,8 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
        }
        server->dialect = le16_to_cpu(rsp->DialectRevision);
 
+       /* BB: add check that dialect was valid given dialect(s) we asked for */
+
        /* SMB2 only has an extended negflavor */
        server->negflavor = CIFS_NEGFLAVOR_EXTENDED;
        /* set it to the maximum buffer size value we can send with 1 credit */
@@ -604,22 +648,30 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
 {
        int rc = 0;
        struct validate_negotiate_info_req vneg_inbuf;
-       struct validate_negotiate_info_rsp *pneg_rsp;
+       struct validate_negotiate_info_rsp *pneg_rsp = NULL;
        u32 rsplen;
+       u32 inbuflen; /* max of 4 dialects */
 
        cifs_dbg(FYI, "validate negotiate\n");
 
        /*
         * validation ioctl must be signed, so no point sending this if we
-        * can not sign it.  We could eventually change this to selectively
+        * can not sign it (ie are not known user).  Even if signing is not
+        * required (enabled but not negotiated), in those cases we selectively
         * sign just this, the first and only signed request on a connection.
-        * This is good enough for now since a user who wants better security
-        * would also enable signing on the mount. Having validation of
-        * negotiate info for signed connections helps reduce attack vectors
+        * Having validation of negotiate info  helps reduce attack vectors.
         */
-       if (tcon->ses->server->sign == false)
+       if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST)
                return 0; /* validation requires signing */
 
+       if (tcon->ses->user_name == NULL) {
+               cifs_dbg(FYI, "Can't validate negotiate: null user mount\n");
+               return 0; /* validation requires signing */
+       }
+
+       if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL)
+               cifs_dbg(VFS, "Unexpected null user (anonymous) auth flag sent by server\n");
+
        vneg_inbuf.Capabilities =
                        cpu_to_le32(tcon->ses->server->vals->req_capabilities);
        memcpy(vneg_inbuf.Guid, tcon->ses->server->client_guid,
@@ -634,9 +686,30 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
        else
                vneg_inbuf.SecurityMode = 0;
 
-       vneg_inbuf.DialectCount = cpu_to_le16(1);
-       vneg_inbuf.Dialects[0] =
-               cpu_to_le16(tcon->ses->server->vals->protocol_id);
+
+       if (strcmp(tcon->ses->server->vals->version_string,
+               SMB3ANY_VERSION_STRING) == 0) {
+               vneg_inbuf.Dialects[0] = cpu_to_le16(SMB30_PROT_ID);
+               vneg_inbuf.Dialects[1] = cpu_to_le16(SMB302_PROT_ID);
+               vneg_inbuf.DialectCount = cpu_to_le16(2);
+               /* structure is big enough for 3 dialects, sending only 2 */
+               inbuflen = sizeof(struct validate_negotiate_info_req) - 2;
+       } else if (strcmp(tcon->ses->server->vals->version_string,
+               SMBDEFAULT_VERSION_STRING) == 0) {
+               vneg_inbuf.Dialects[0] = cpu_to_le16(SMB21_PROT_ID);
+               vneg_inbuf.Dialects[1] = cpu_to_le16(SMB30_PROT_ID);
+               vneg_inbuf.Dialects[2] = cpu_to_le16(SMB302_PROT_ID);
+               vneg_inbuf.DialectCount = cpu_to_le16(3);
+               /* structure is big enough for 3 dialects */
+               inbuflen = sizeof(struct validate_negotiate_info_req);
+       } else {
+               /* otherwise specific dialect was requested */
+               vneg_inbuf.Dialects[0] =
+                       cpu_to_le16(tcon->ses->server->vals->protocol_id);
+               vneg_inbuf.DialectCount = cpu_to_le16(1);
+               /* structure is big enough for 3 dialects, sending only 1 */
+               inbuflen = sizeof(struct validate_negotiate_info_req) - 4;
+       }
 
        rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
                FSCTL_VALIDATE_NEGOTIATE_INFO, true /* is_fsctl */,
@@ -654,8 +727,9 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
                         rsplen);
 
                /* relax check since Mac returns max bufsize allowed on ioctl */
-               if (rsplen > CIFSMaxBufSize)
-                       return -EIO;
+               if ((rsplen > CIFSMaxBufSize)
+                    || (rsplen < sizeof(struct validate_negotiate_info_rsp)))
+                       goto err_rsp_free;
        }
 
        /* check validate negotiate info response matches what we got earlier */
@@ -674,10 +748,13 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
 
        /* validate negotiate successful */
        cifs_dbg(FYI, "validate negotiate info successful\n");
+       kfree(pneg_rsp);
        return 0;
 
 vneg_out:
        cifs_dbg(VFS, "protocol revalidation - security settings mismatch\n");
+err_rsp_free:
+       kfree(pneg_rsp);
        return -EIO;
 }
 
@@ -1110,6 +1187,8 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,
        while (sess_data->func)
                sess_data->func(sess_data);
 
+       if ((ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) && (ses->sign))
+               cifs_dbg(VFS, "signing requested but authenticated as guest\n");
        rc = sess_data->result;
 out:
        kfree(sess_data);
@@ -1180,7 +1259,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
        struct smb2_tree_connect_req *req;
        struct smb2_tree_connect_rsp *rsp = NULL;
        struct kvec iov[2];
-       struct kvec rsp_iov;
+       struct kvec rsp_iov = { NULL, 0 };
        int rc = 0;
        int resp_buftype;
        int unc_path_len;
@@ -1297,7 +1376,7 @@ tcon_exit:
        return rc;
 
 tcon_error_exit:
-       if (rsp->hdr.sync_hdr.Status == STATUS_BAD_NETWORK_NAME) {
+       if (rsp && rsp->hdr.sync_hdr.Status == STATUS_BAD_NETWORK_NAME) {
                cifs_dbg(VFS, "BAD_NETWORK_NAME: %s\n", tree);
        }
        goto tcon_exit;
@@ -1634,7 +1713,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
        struct cifs_tcon *tcon = oparms->tcon;
        struct cifs_ses *ses = tcon->ses;
        struct kvec iov[4];
-       struct kvec rsp_iov;
+       struct kvec rsp_iov = {NULL, 0};
        int resp_buftype;
        int uni_path_len;
        __le16 *copy_path = NULL;
@@ -1763,7 +1842,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
 
        if (rc != 0) {
                cifs_stats_fail_inc(tcon, SMB2_CREATE_HE);
-               if (err_buf)
+               if (err_buf && rsp)
                        *err_buf = kmemdup(rsp, get_rfc1002_length(rsp) + 4,
                                           GFP_KERNEL);
                goto creat_exit;
@@ -1900,6 +1979,9 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
        } else
                iov[0].iov_len = get_rfc1002_length(req) + 4;
 
+       /* validate negotiate request must be signed - see MS-SMB2 3.2.5.5 */
+       if (opcode == FSCTL_VALIDATE_NEGOTIATE_INFO)
+               req->hdr.sync_hdr.Flags |= SMB2_FLAGS_SIGNED;
 
        rc = SendReceive2(xid, ses, iov, n_iov, &resp_buftype, flags, &rsp_iov);
        cifs_small_buf_release(req);
@@ -2116,9 +2198,13 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon,
        req->PersistentFileId = persistent_fid;
        req->VolatileFileId = volatile_fid;
        req->AdditionalInformation = cpu_to_le32(additional_info);
-       /* 4 for rfc1002 length field and 1 for Buffer */
-       req->InputBufferOffset =
-               cpu_to_le16(sizeof(struct smb2_query_info_req) - 1 - 4);
+
+       /*
+        * We do not use the input buffer (do not send extra byte)
+        */
+       req->InputBufferOffset = 0;
+       inc_rfc1001_len(req, -1);
+
        req->OutputBufferLength = cpu_to_le32(output_len);
 
        iov[0].iov_base = (char *)req;
@@ -2158,12 +2244,12 @@ qinf_exit:
 }
 
 int SMB2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
-       u64 persistent_fid, u64 volatile_fid,
-       struct smb2_file_full_ea_info *data)
+                  u64 persistent_fid, u64 volatile_fid,
+                  int ea_buf_size, struct smb2_file_full_ea_info *data)
 {
        return query_info(xid, tcon, persistent_fid, volatile_fid,
                          FILE_FULL_EA_INFORMATION, SMB2_O_INFO_FILE, 0,
-                         SMB2_MAX_EA_BUF,
+                         ea_buf_size,
                          sizeof(struct smb2_file_full_ea_info),
                          (void **)&data,
                          NULL);
index 393ed5f4e1b6516b40f30f64890a385a43b44c9a..c2ec934be96891a645537140df279b0fb3e2fcbe 100644 (file)
@@ -716,7 +716,7 @@ struct validate_negotiate_info_req {
        __u8   Guid[SMB2_CLIENT_GUID_SIZE];
        __le16 SecurityMode;
        __le16 DialectCount;
-       __le16 Dialects[1]; /* dialect (someday maybe list) client asked for */
+       __le16 Dialects[3]; /* BB expand this if autonegotiate > 3 dialects */
 } __packed;
 
 struct validate_negotiate_info_rsp {
@@ -832,7 +832,7 @@ struct smb2_flush_rsp {
 /* Channel field for read and write: exactly one of following flags can be set*/
 #define SMB2_CHANNEL_NONE              0x00000000
 #define SMB2_CHANNEL_RDMA_V1           0x00000001 /* SMB3 or later */
-#define SMB2_CHANNEL_RDMA_V1_INVALIDATE 0x00000001 /* SMB3.02 or later */
+#define SMB2_CHANNEL_RDMA_V1_INVALIDATE 0x00000002 /* SMB3.02 or later */
 
 /* SMB2 read request without RFC1001 length at the beginning */
 struct smb2_read_plain_req {
@@ -1178,7 +1178,8 @@ struct smb2_file_link_info { /* encoding of request for level 11 */
        char   FileName[0];     /* Name to be assigned to new link */
 } __packed; /* level 11 Set */
 
-#define SMB2_MAX_EA_BUF 2048
+#define SMB2_MIN_EA_BUF  2048
+#define SMB2_MAX_EA_BUF 65536
 
 struct smb2_file_full_ea_info { /* encoding of response for level 15 */
        __le32 next_entry_offset;
index 003217099ef3e6831a36ed81f7c13f1f611efb9d..e9ab5227e7a8ac3d69e69afe678cee78566056a8 100644 (file)
@@ -134,6 +134,7 @@ extern int SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon,
                      u64 persistent_file_id, u64 volatile_file_id);
 extern int SMB2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
                          u64 persistent_file_id, u64 volatile_file_id,
+                         int ea_buf_size,
                          struct smb2_file_full_ea_info *data);
 extern int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
                           u64 persistent_file_id, u64 volatile_file_id,
index 67367cf1f8cd2391359ff041836f0ae34a2091f4..99493946e2f9abcf02673bf685238b0313da4180 100644 (file)
@@ -390,6 +390,7 @@ generate_smb30signingkey(struct cifs_ses *ses)
        return generate_smb3signingkey(ses, &triplet);
 }
 
+#ifdef CONFIG_CIFS_SMB311
 int
 generate_smb311signingkey(struct cifs_ses *ses)
 
@@ -398,25 +399,26 @@ generate_smb311signingkey(struct cifs_ses *ses)
        struct derivation *d;
 
        d = &triplet.signing;
-       d->label.iov_base = "SMB2AESCMAC";
-       d->label.iov_len = 12;
-       d->context.iov_base = "SmbSign";
-       d->context.iov_len = 8;
+       d->label.iov_base = "SMBSigningKey";
+       d->label.iov_len = 14;
+       d->context.iov_base = ses->preauth_sha_hash;
+       d->context.iov_len = 64;
 
        d = &triplet.encryption;
-       d->label.iov_base = "SMB2AESCCM";
-       d->label.iov_len = 11;
-       d->context.iov_base = "ServerIn ";
-       d->context.iov_len = 10;
+       d->label.iov_base = "SMBC2SCipherKey";
+       d->label.iov_len = 16;
+       d->context.iov_base = ses->preauth_sha_hash;
+       d->context.iov_len = 64;
 
        d = &triplet.decryption;
-       d->label.iov_base = "SMB2AESCCM";
-       d->label.iov_len = 11;
-       d->context.iov_base = "ServerOut";
-       d->context.iov_len = 10;
+       d->label.iov_base = "SMBS2CCipherKey";
+       d->label.iov_len = 16;
+       d->context.iov_base = ses->preauth_sha_hash;
+       d->context.iov_len = 64;
 
        return generate_smb3signingkey(ses, &triplet);
 }
+#endif /* 311 */
 
 int
 smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server)
index 5bb630a769e044942fcfa3e5910ffd841141ee47..201fc08a8b4fd087e1a35a8548fafabcbd9034c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Cache operations for Coda.
  * For Linux 2.1: (C) 1997 Carnegie Mellon University
index f13e09057c6b8297ce8f8572e880b953c4e4e864..845b5a66952a381ea47ffae5f3c2709af1be9d73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* cnode related routines for the coda kernel code
    (C) 1996 Peter Braam
    */
index c910b5eb1ceb3e351e1ff0f3b7b0b23cea46dad8..c9f7a77c013ee7957d9061afaddcf5f7b562826b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Coda filesystem -- Linux Minicache
  *
  * Copyright (C) 1989 - 1997 Carnegie Mellon University
index c64075213218065e51da038f75393c842a1d2dcf..d702ba1a2bf955ada7776ec14082c1e8f65b6176 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  coda_fs_i.h
  *
index 381c993b14270553c68586763322290c4495b1a9..bb0b3e0ed6c2f0eb1ce12040dab099cb831b1268 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CODA_INT_
 #define _CODA_INT_
 
index f1714cfb589c6018adf3d37046ef53d117aab42e..ca599df0dcb1e18da08c50cf6406d6203b974e92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Inode operations for Coda filesystem
  * Original version: (C) 1996 P. Braam and M. Callahan
index d3c361883c2844e227c8a4f472c73829e39b1795..126155cadfa93c1c0eed8ff4849528a2407f9546 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * Coda File System, Linux Kernel module
  * 
index 274ab5586dd064a49fba35cad7201be9dc47e84b..00876ddadb43021396c9c2f010fa2c4fa2e90cd1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /*
  * Directory operations for Coda filesystem
index 363402fcb3ed090dde17642dd569fac72365f0b4..1cbc1f2298ee480f283320fe2b9d6ca24ad3f9de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File operations for Coda.
  * Original version: (C) 1996 Peter Braam 
index 6058df380cc00ed0d4be8cb81a0a87369cb9aac3..6f0a6a4d5faa95aff7b7f0e948ba7b55bed99eb7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Super block/filesystem wide operations
  *
index b0b9cda41928087a53212f1085dc268dbfd6f432..e0c17b7dccce626858f3c588a03a42c975ab15bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Pioctl operations for Coda.
  * Original version: (C) 1996 Peter Braam
index 03736e20d72076cec96eb0c57aa0c9bf8f901e59..202297d156dff6c5b166cd1cefb72b2387d744c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Symlink inode operations for Coda filesystem
  * Original version: (C) 1996 P. Braam and M. Callahan
index 34218a8a28cd9c9aa5895e9b773044b6850696ea..0301d45000a8a45e4492d1993ce1de5bbabb47e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Sysctl operations for Coda filesystem
  * Original version: (C) 1996 P. Braam and M. Callahan
index e82357c89979345a807ac565f04972840b85083d..a37f003530d7353ca1ae4b37ea8c7f8c2c3a9261 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Mostly platform independent upcall operations to Venus:
  *  -- upcalls
index d27b326d96f4e0402a01cdf8f7ba7233bd022aa3..bd5d91e119ca95f2bbf43110c10ec46816830ee8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
  *
index 0eec03696707f03d498d1e4596c1c2cfdbb66873..52c63d6c9143f6fe9370ffd2101b0976f9345c28 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/file.h>
 #include <linux/fdtable.h>
index ec4f1d4fdad062b2b5e0003adb77f05c3382cdbd..975d98fc26b511f8f8f309a2a37cb7d4fc4e8d09 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * uncompress.c
  *
index 483784d5eb7362b0a682d7ba745ccbf1eec4a511..0d5e6a569d58ae2c775aad617200ca4fd1b88518 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This contains encryption functions for per-file encryption.
  *
index ad9f814fdead370eaa420a423139938687c3047b..8606da1df0aa7e129810e3d73b86f50fa2216270 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This contains functions for filename crypto management
  *
index a1d5021c31ef8f494b5ae96cd4e2129976e43ef3..092e9dad14144e8b71e9432597c3646d76735000 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fscrypt_private.h
  *
index 018c588c7ac3b7ac8fd78b4092332f771c6411c0..a38630214058214dec6c30eca64f74f3f7f693df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * key management facility for FS encryption support.
  *
@@ -109,6 +110,11 @@ static int validate_user_key(struct fscrypt_info *crypt_info,
                goto out;
        }
        ukp = user_key_payload_locked(keyring_key);
+       if (!ukp) {
+               /* key was revoked before we acquired its semaphore */
+               res = -EKEYREVOKED;
+               goto out;
+       }
        if (ukp->datalen != sizeof(struct fscrypt_key)) {
                res = -EINVAL;
                goto out;
index ce07a86200f3344a7e10f24b0beecd8354e9fe21..a120649beeca4e5e9b0e54d6e7ed16de7fb47f17 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Encryption policy functions for per-file encryption support.
  *
index 5fa2211e49aee2186546d8db7a70c5295c7591f0..b53e66d9abd7030f6b05a6dac4847928c24bf1a0 100644 (file)
  */
 #define DIO_PAGES      64
 
+/*
+ * Flags for dio_complete()
+ */
+#define DIO_COMPLETE_ASYNC             0x01    /* This is async IO */
+#define DIO_COMPLETE_INVALIDATE                0x02    /* Can invalidate pages */
+
 /*
  * This code generally works in units of "dio_blocks".  A dio_block is
  * somewhere between the hard sector size and the filesystem block size.  it
@@ -225,10 +231,11 @@ static inline struct page *dio_get_page(struct dio *dio,
  * filesystems can use it to hold additional state between get_block calls and
  * dio_complete.
  */
-static ssize_t dio_complete(struct dio *dio, ssize_t ret, bool is_async)
+static ssize_t dio_complete(struct dio *dio, ssize_t ret, unsigned int flags)
 {
        loff_t offset = dio->iocb->ki_pos;
        ssize_t transferred = 0;
+       int err;
 
        /*
         * AIO submission can race with bio completion to get here while
@@ -259,18 +266,37 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, bool is_async)
                ret = transferred;
 
        if (dio->end_io) {
-               int err;
-
                // XXX: ki_pos??
                err = dio->end_io(dio->iocb, offset, ret, dio->private);
                if (err)
                        ret = err;
        }
 
+       /*
+        * Try again to invalidate clean pages which might have been cached by
+        * non-direct readahead, or faulted in by get_user_pages() if the source
+        * of the write was an mmap'ed region of the file we're writing.  Either
+        * one is a pretty crazy thing to do, so we don't support it 100%.  If
+        * this invalidation fails, tough, the write still worked...
+        *
+        * And this page cache invalidation has to be after dio->end_io(), as
+        * some filesystems convert unwritten extents to real allocations in
+        * end_io() when necessary, otherwise a racing buffer read would cache
+        * zeros from unwritten extents.
+        */
+       if (flags & DIO_COMPLETE_INVALIDATE &&
+           ret > 0 && dio->op == REQ_OP_WRITE &&
+           dio->inode->i_mapping->nrpages) {
+               err = invalidate_inode_pages2_range(dio->inode->i_mapping,
+                                       offset >> PAGE_SHIFT,
+                                       (offset + ret - 1) >> PAGE_SHIFT);
+               WARN_ON_ONCE(err);
+       }
+
        if (!(dio->flags & DIO_SKIP_DIO_COUNT))
                inode_dio_end(dio->inode);
 
-       if (is_async) {
+       if (flags & DIO_COMPLETE_ASYNC) {
                /*
                 * generic_write_sync expects ki_pos to have been updated
                 * already, but the submission path only does this for
@@ -291,7 +317,7 @@ static void dio_aio_complete_work(struct work_struct *work)
 {
        struct dio *dio = container_of(work, struct dio, complete_work);
 
-       dio_complete(dio, 0, true);
+       dio_complete(dio, 0, DIO_COMPLETE_ASYNC | DIO_COMPLETE_INVALIDATE);
 }
 
 static blk_status_t dio_bio_complete(struct dio *dio, struct bio *bio);
@@ -304,6 +330,7 @@ static void dio_bio_end_aio(struct bio *bio)
        struct dio *dio = bio->bi_private;
        unsigned long remaining;
        unsigned long flags;
+       bool defer_completion = false;
 
        /* cleanup the bio */
        dio_bio_complete(dio, bio);
@@ -315,12 +342,24 @@ static void dio_bio_end_aio(struct bio *bio)
        spin_unlock_irqrestore(&dio->bio_lock, flags);
 
        if (remaining == 0) {
-               if (dio->result && dio->defer_completion) {
+               /*
+                * Defer completion when defer_completion is set or
+                * when the inode has pages mapped and this is AIO write.
+                * We need to invalidate those pages because there is a
+                * chance they contain stale data in the case buffered IO
+                * went in between AIO submission and completion into the
+                * same region.
+                */
+               if (dio->result)
+                       defer_completion = dio->defer_completion ||
+                                          (dio->op == REQ_OP_WRITE &&
+                                           dio->inode->i_mapping->nrpages);
+               if (defer_completion) {
                        INIT_WORK(&dio->complete_work, dio_aio_complete_work);
                        queue_work(dio->inode->i_sb->s_dio_done_wq,
                                   &dio->complete_work);
                } else {
-                       dio_complete(dio, 0, true);
+                       dio_complete(dio, 0, DIO_COMPLETE_ASYNC);
                }
        }
 }
@@ -838,7 +877,8 @@ out:
         */
        if (sdio->boundary) {
                ret = dio_send_cur_page(dio, sdio, map_bh);
-               dio_bio_submit(dio, sdio);
+               if (sdio->bio)
+                       dio_bio_submit(dio, sdio);
                put_page(sdio->cur_page);
                sdio->cur_page = NULL;
        }
@@ -1210,10 +1250,19 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
         * For AIO O_(D)SYNC writes we need to defer completions to a workqueue
         * so that we can call ->fsync.
         */
-       if (dio->is_async && iov_iter_rw(iter) == WRITE &&
-           ((iocb->ki_filp->f_flags & O_DSYNC) ||
-            IS_SYNC(iocb->ki_filp->f_mapping->host))) {
-               retval = dio_set_defer_completion(dio);
+       if (dio->is_async && iov_iter_rw(iter) == WRITE) {
+               retval = 0;
+               if ((iocb->ki_filp->f_flags & O_DSYNC) ||
+                   IS_SYNC(iocb->ki_filp->f_mapping->host))
+                       retval = dio_set_defer_completion(dio);
+               else if (!dio->inode->i_sb->s_dio_done_wq) {
+                       /*
+                        * In case of AIO write racing with buffered read we
+                        * need to defer completion. We can't decide this now,
+                        * however the workqueue needs to be initialized here.
+                        */
+                       retval = sb_init_dio_done_wq(dio->inode->i_sb);
+               }
                if (retval) {
                        /*
                         * We grab i_mutex only for reads so we don't have
@@ -1322,7 +1371,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
                dio_await_completion(dio);
 
        if (drop_refcount(dio) == 0) {
-               retval = dio_complete(dio, retval, false);
+               retval = dio_complete(dio, retval, DIO_COMPLETE_INVALIDATE);
        } else
                BUG_ON(retval != -EIOCBQUEUED);
 
index ca1c9124c8cec014e2c49cc58aaa35903eb5a08c..3545fdafc6fbbe86bcbfb7132677494eab3bb6a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DLM) +=           dlm.o
 dlm-y :=                       ast.o \
                                config.o \
index d72d52b904333767328235a2de720107503cdcf2..82377017130f0137a4208e0082bb61946cc0b817 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement the manual drop-all-pagecache function
  */
index 9c351bf757b20e037f39aeadf0fa0ed12f963db6..3fbc0ff79699dde5cca295262591b2cb5aafcced 100644 (file)
@@ -84,11 +84,16 @@ struct ecryptfs_page_crypt_context {
 static inline struct ecryptfs_auth_tok *
 ecryptfs_get_encrypted_key_payload_data(struct key *key)
 {
-       if (key->type == &key_type_encrypted)
-               return (struct ecryptfs_auth_tok *)
-                       (&((struct encrypted_key_payload *)key->payload.data[0])->payload_data);
-       else
+       struct encrypted_key_payload *payload;
+
+       if (key->type != &key_type_encrypted)
                return NULL;
+
+       payload = key->payload.data[0];
+       if (!payload)
+               return ERR_PTR(-EKEYREVOKED);
+
+       return (struct ecryptfs_auth_tok *)payload->payload_data;
 }
 
 static inline struct key *ecryptfs_get_encrypted_key(char *sig)
@@ -114,12 +119,17 @@ static inline struct ecryptfs_auth_tok *
 ecryptfs_get_key_payload_data(struct key *key)
 {
        struct ecryptfs_auth_tok *auth_tok;
+       struct user_key_payload *ukp;
 
        auth_tok = ecryptfs_get_encrypted_key_payload_data(key);
-       if (!auth_tok)
-               return (struct ecryptfs_auth_tok *)user_key_payload_locked(key)->data;
-       else
+       if (auth_tok)
                return auth_tok;
+
+       ukp = user_key_payload_locked(key);
+       if (!ukp)
+               return ERR_PTR(-EKEYREVOKED);
+
+       return (struct ecryptfs_auth_tok *)ukp->data;
 }
 
 #define ECRYPTFS_MAX_KEYSET_SIZE 1024
index 3cf1546dca8257677572db866f86e3f2190a918e..fa218cd64f746d2c924a786edc1c6052911c1732 100644 (file)
@@ -459,7 +459,8 @@ out:
  * @auth_tok_key: key containing the authentication token
  * @auth_tok: authentication token
  *
- * Returns zero on valid auth tok; -EINVAL otherwise
+ * Returns zero on valid auth tok; -EINVAL if the payload is invalid; or
+ * -EKEYREVOKED if the key was revoked before we acquired its semaphore.
  */
 static int
 ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
@@ -468,6 +469,12 @@ ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
        int rc = 0;
 
        (*auth_tok) = ecryptfs_get_key_payload_data(auth_tok_key);
+       if (IS_ERR(*auth_tok)) {
+               rc = PTR_ERR(*auth_tok);
+               *auth_tok = NULL;
+               goto out;
+       }
+
        if (ecryptfs_verify_version((*auth_tok)->version)) {
                printk(KERN_ERR "Data structure version mismatch. Userspace "
                       "tools must match eCryptfs kernel module with major "
index a7be96e5f1cb802a882a273903eeeceeb6276c2b..f892ac7c2a35e0094a314eeded06a974154e46d7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dir.c
  *
index 70f5d4f9a94570ec6c41ec8d855e05956002e0cc..13a4d9622633710985bb48e09c6506ab703cd05d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 1999 Al Smith
  *
index a37dcee46866074d94ad1515833fe5e4b766ebe2..9e641da6fab2760f351e0c290cc880847fe349de 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * file.c
  *
index d34a40edcdb27cd4bd98a9273e70180c240970e4..38961ee1d1af18e01e29fbdeeb114ad86d6361e7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * namei.c
  *
index 5c42f1e34a2ffa10e7135236a84e523f7918718a..65b59009555b6e3c8cc8d6f647ced0de09de3319 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * super.c
  *
index 4870cc82deb014be3e28a5f55704ecedfb3b0c91..923eb91654d5c9c3e6d19fab643f2130fd536c5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * symlink.c
  *
index ac34d972468489cfc9e5e0b70f863296f82ed246..3e14ba25f678bf8869e005a34dc9742e117e90df 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1410,7 +1410,7 @@ static void free_bprm(struct linux_binprm *bprm)
        kfree(bprm);
 }
 
-int bprm_change_interp(char *interp, struct linux_binprm *bprm)
+int bprm_change_interp(const char *interp, struct linux_binprm *bprm)
 {
        /* If a binfmt changed the interp, free it first. */
        if (bprm->interp != bprm->filename)
@@ -1802,6 +1802,7 @@ static int do_execveat_common(int fd, struct filename *filename,
        /* execve succeeded */
        current->fs->in_exec = 0;
        current->in_execve = 0;
+       membarrier_execve(current);
        acct_update_integrals(current);
        task_numa_free(current);
        free_bprm(bprm);
index 445b0e996a122a8ea82705233fefb6bc2de5166b..311479d864a75e42dd4363455fb09dbba1d98229 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ext2-filesystem routines.
 #
index 51f0aea70cb434bd9f5ddcd854fe5cf156766f42..224c04abb2e5ded3f5734cacd1c9f7a25f3562fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/acl.c
  *
index 44937f9fcf327522bb65fe4d2463c1cb2f8bc3b8..0f01c759daac7980f38316fd2fe2bd527ccf45ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: fs/ext2/acl.h
 
index d0bdb74f0e151bc0fd8471146b681442aec4137a..e1b3724bebf23bb78622f81aa3a085f4d304e532 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/balloc.c
  *
index e2709695b1772bb6684b697dd8965366d7698fe0..987647986f47171dc5d83d8a440b04de61d004d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/dir.c
  *
index 28de3edd4f4dc32e9c9dec3d3c12ac1af6c0ddc1..032295e1d3865383342f843b99b4c2c0e972078c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1992, 1993, 1994, 1995
  * Remy Card (card@masi.ibp.fr)
index ff3a3636a5cab588fb05f0644e1892ce6e236c6f..c67b486488fd2a1113dc8a121ef2ac79d5247f45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/file.c
  *
index 395fc074c0db8b6bd7e4e89a2922ce5e0c56aff0..a1fc3dabca41b979db18ec1688d2cda0307a5680 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/ialloc.c
  *
index 4dca6f3487149a6e3b876157a1f6f2223d7a8e8b..1442a4c734c8f7b20ffbaf5b37312a94113d95c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/inode.c
  *
index 087f122cca42063a796367364e09874581fba90d..0367c0039e68fd7ef25e102d3e0b2ab85f198132 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/ioctl.c
  *
index 814e405a2da670c1ae687459c94d4ed95f67e164..e078075dc66faaa80ce377118c3750246fc64da8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/namei.c
  *
index eeffb0138a1744a32466308ed8f39c9151d0bd33..d5589ddcc281fc8d872fae64a16c446da150d9c7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext2/symlink.c
  *
index 1b9b1268d418049b6978dee5bfbe0be098c65f34..62d9a659a8ff4e7a3a9556449e35fecc25612e43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/xattr.c
  *
index 6f82ab1b00cac3544b5376560aac6444ac072391..cee888cdc235eb1c0cd091ff3122ed853d977101 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: linux/ext2_xattr.h
 
index 7b9e9c1842d5232ceb20f2aeebda31cacb5855fd..9a682e440acba09b663162a990d785672e2495af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/xattr_security.c
  * Handler for storing security labels as extended attributes.
index 65049b71af137d7f75f162f81ebd808b5fc3c0d0..49add11078507d22edc7fe51b8948535d3a5db04 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/xattr_trusted.c
  * Handler for trusted extended attributes.
index fb2f992ae763a59c3081713d6d95c93c035d83f9..c243a3b4d69d55a6da2d70646c60fb245aedacc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext2/xattr_user.c
  * Handler for extended user attributes.
index d9beca1653c597bcc9f48835e766332124f07cc3..8fdfcd3c3e04373b913a6f3bf54807286dfebc0b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ext4-filesystem routines.
 #
index 46ff2229ff5efed30a498d05a416ea7e5c1e6d22..fb50f9aa6ead20359fad647ac0bc82b0ce646f1f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/acl.c
  *
index da2c79577d724ae14e7fbf3b5adb4cb3e2848e5d..a48fc5ae2701b16136cdb0efabbed87f3155855d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: fs/ext4/acl.h
 
index e04ec868e37e71d3e82529eeb68f449c284b47c6..d5ddfb96c83c8d8008618ef402a2c2878b4fae73 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/balloc.c
  *
index 4a606afb171f04dc42064e7e7c8b09f4172281ed..f63e028c638c2426136e4c300ccc0ec02bce2358 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/bitmap.c
  *
index fdb19543af1e62f9b990c944b92fd5dce0fd644a..bee888e0e2db3e7ae415ab9d7f67c45b6a29061a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/block_validity.c
  *
index b04e882179c68240a83a562e61c7840ca71f8ca8..d5babc9f222bf38fdfd782fac8fd825b1bae4bf5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/dir.c
  *
index e2abe01c8c6bac60e04ef26fd4559c854fbef280..58a0304566dbbd19742ca11d4e28af10cfd4af3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ext4.h
  *
index 5b342ac67d2ede320eb98234139ca000a268aa8c..2d593201cf7a0b012d7a537ac74186cc3c7b0eff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Interface between ext4 and JBD
  */
index e7f12a204cbcaee34d75b4ae1675127ff68c6d5c..763ef185dd17f3ca1c2b97167ae620029de40186 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/ext4/extents_status.c
  *
index f7aa24f4642d83fd781fc2b69a5c4644098e3002..ca90fc96f47e25f10d3ffa7fecbf1bf1d4d3085a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  fs/ext4/extents_status.h
  *
index b1da660ac3bcf97c8cd799fcc6823a23666c8ea5..5cb9aa3ad249a6b8cea2a59566de24b1765b4737 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/file.c
  *
index f9230580a84b2efd9317ad175c71dabcffbf2c5d..26a7fe5c4fd3cbc7b8d40d193a3c350b2163bb6c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/fsync.c
  *
index ee823022aa344a2723bfac9c11d61ace60b32e69..c5f697a3fad43b88b294af13ac54f669337cc8dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/ialloc.c
  *
index 7ffa290cbb8e7d2fe9cf6ac605833f0b827318f8..c32802c956d5ebac9f264b95ec3f77c78137e4ca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/indirect.c
  *
index 31db875bc7a13dde67b9a6b17ce498b4c16bd17f..90afeb7293a6b986078d98f8c0112a4d5d7033b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/inode.c
  *
index afb66d4ab5cfb895ce99574f18740621c37815db..75d83471f65c40b504de7920ff4c4ce5e4a0f63b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/ioctl.c
  *
index 009300ee1561b6ec51e433ff8a70b106818d28e6..dcf52540f379c63af743eb5bd0539deb7923ad3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  fs/ext4/mballoc.h
  *
index 84c54f15f1dd7f1163e06c75bd6c0ec5d6b2c6cd..27b9a76a0dfabeff3ee9ec65a15d8d5e711d851a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/random.h>
 #include <linux/buffer_head.h>
index c1cf020d18895ccedca1690431e009c1f05ad846..bd48a8d83961bcc560525fd6b88933f8aa6ce532 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/namei.c
  *
index 55ad7dd149d005dca26109fd0f018fdd0e075220..db7590178dfcf1a4b59ee3c44deaa89a21de8ca6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/page-io.c
  *
index 04c90643af7a4763647919188e67f5e0479cec1b..9ffa6fad18dbef1528f3ddbacc67fafff370cf03 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/readpage.c
  *
index 035cd3f4785e2d824be923cbed2c5012b18abb9c..1dac59c247920a0fad6b3d2cc06d5a9f72fc15fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/resize.c
  *
index b104096fce9eeec4e6079d3d1b05dd8b83fe796b..b0915b734a3817a811b62b41f677f7a1a6228c9f 100644 (file)
@@ -1677,7 +1677,7 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
                sbi->s_mount_flags |= EXT4_MF_FS_ABORTED;
                return 1;
        case Opt_i_version:
-               sb->s_flags |= MS_I_VERSION;
+               sb->s_flags |= SB_I_VERSION;
                return 1;
        case Opt_lazytime:
                sb->s_flags |= MS_LAZYTIME;
@@ -2060,7 +2060,7 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
                SEQ_OPTS_PRINT("min_batch_time=%u", sbi->s_min_batch_time);
        if (nodefs || sbi->s_max_batch_time != EXT4_DEF_MAX_BATCH_TIME)
                SEQ_OPTS_PRINT("max_batch_time=%u", sbi->s_max_batch_time);
-       if (sb->s_flags & MS_I_VERSION)
+       if (sb->s_flags & SB_I_VERSION)
                SEQ_OPTS_PUTS("i_version");
        if (nodefs || sbi->s_stripe)
                SEQ_OPTS_PRINT("stripe=%lu", sbi->s_stripe);
index 5c8fc53cb0e5a3127366b6324514407668f150b3..a2006c9af1d968980b0c758ddd3babc8cea5d24f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/symlink.c
  *
index 48c7a7d55ed305b16c3b9fa2bb054e4b97d122f5..e21afd52e7d7906bd1ff473b090a1d938307c492 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ext4/sysfs.c
  *
index c70d06a383e28819cc556f1027ea118272e5f738..b64a9fa0ff41d1d9cc431342e43fbc5aaca10129 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/ext4/truncate.h
  *
index 3b69330a42506dc85bf5a51812326b862d499c50..218a7ba57819411cd9dd12271a0005e963157dbb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/xattr.c
  *
index 0d2dde1fa87a1a4cde68188980546225daf4f671..f8cc07588ac91ce449017f4d354a90edd0f1f336 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: fs/ext4/xattr.h
 
index a8921112030d31f00bd28e9cdd32d3f04c6f806c..629001b2863263ccf23800c8b7f13cdd89d95947 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/xattr_security.c
  * Handler for storing security labels as extended attributes.
index c7765c73571446b2f9296fea7cb9e9e1086bd474..e9389e5d75c30f7083a04364ccc4fea2035fc408 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/xattr_trusted.c
  * Handler for trusted extended attributes.
index ca20e423034bf48a8e6e237cff0f3f3896d5280b..d4546184b34b4976ab0512eed46bbeb81a146d66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ext4/xattr_user.c
  * Handler for extended user attributes.
index a0dc559b1b47f6f694c3d8dcc607f32be101d6eb..776c4b93650496d20ebf749515085f667f58271f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_F2FS_FS) += f2fs.o
 
 f2fs-y         := dir.o file.o inode.o namei.o hash.o super.o inline.o
index 9a7c903869477835afe192e15b064c6832297520..4b4a72f392be4be76575d9d485cce0ced2adfdfe 100644 (file)
@@ -2525,7 +2525,7 @@ void invalidate_blocks(struct f2fs_sb_info *sbi, block_t addr);
 bool is_checkpointed_data(struct f2fs_sb_info *sbi, block_t blkaddr);
 void refresh_sit_entry(struct f2fs_sb_info *sbi, block_t old, block_t new);
 void stop_discard_thread(struct f2fs_sb_info *sbi);
-void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi);
+void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi, bool umount);
 void clear_prefree_segments(struct f2fs_sb_info *sbi, struct cp_control *cpc);
 void release_discard_addrs(struct f2fs_sb_info *sbi);
 int npages_for_summary_flush(struct f2fs_sb_info *sbi, bool for_ra);
index 621b9b3d320bba293f68b5eaf74b91aa364dd567..c695ff462ee6990f1abd4d27458b9ad4bf89c025 100644 (file)
@@ -1210,11 +1210,11 @@ void stop_discard_thread(struct f2fs_sb_info *sbi)
 }
 
 /* This comes from f2fs_put_super and f2fs_trim_fs */
-void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)
+void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi, bool umount)
 {
        __issue_discard_cmd(sbi, false);
        __drop_discard_cmd(sbi);
-       __wait_discard_cmd(sbi, false);
+       __wait_discard_cmd(sbi, !umount);
 }
 
 static void mark_discard_range_all(struct f2fs_sb_info *sbi)
@@ -2244,7 +2244,7 @@ int f2fs_trim_fs(struct f2fs_sb_info *sbi, struct fstrim_range *range)
        }
        /* It's time to issue all the filed discards */
        mark_discard_range_all(sbi);
-       f2fs_wait_discard_bios(sbi);
+       f2fs_wait_discard_bios(sbi, false);
 out:
        range->len = F2FS_BLK_TO_BYTES(cpc.trimmed);
        return err;
index 89f61eb3d1671c3c5686a002adca8c0c427abd1c..933c3d529e6531c827c2237c97f816103c6d4ef0 100644 (file)
@@ -801,7 +801,7 @@ static void f2fs_put_super(struct super_block *sb)
        }
 
        /* be sure to wait for any on-going discard commands */
-       f2fs_wait_discard_bios(sbi);
+       f2fs_wait_discard_bios(sbi, true);
 
        if (f2fs_discard_en(sbi) && !sbi->discard_blks) {
                struct cp_control cpc = {
index 964b634f6667ca89a3427ee453a016285aec8cf8..70645ce2f7fcfec83f11a9ec7e9606cd90a3b054 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux fat filesystem support.
 #
index 5d384921524d9722c96cd14c9fdcf0a3aab05851..e9bed49df6b71047b6658063e377fb59ef4c339e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/fat/cache.c
  *
index 051dac1ce3be1713bf8e1e8df983ce9a35a1e34c..8fc1093da47d38ebf354e2b96c23d6fb5f086822 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FAT_H
 #define _FAT_H
 
index 0491da3b28c36bbf786f1f1303d3bb44f6bfdb98..8d78ffd7b399d430f05fdb8b72b68dfa1bda3bcb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/fcntl.c
  *
@@ -749,7 +750,7 @@ static void send_sigio_to_task(struct task_struct *p,
                         * specific si_codes.  In that case use SI_SIGIO instead
                         * to remove the ambiguity.
                         */
-                       if (sig_specific_sicodes(signum))
+                       if ((signum != SIGPOLL) && sig_specific_sicodes(signum))
                                si.si_code = SI_SIGIO;
 
                        /* Make sure we are called with one of the POLL_*
index 58a61f55e0d09f868bb1bac6a0b4d6e5042822ad..474adc8d2a3aa5bb7c34913f38e347c604ede26f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/syscalls.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
index 1fc7fbbb4510ffa4f99ae2b5f6bb45003a01a366..4eecbf4244a5242df38816c7c9bfedbcf3e75313 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/file.c
  *
index a920ad2629ac73481cc9c5e2cd38d3ba4b8915dd..f2728a4a03a1dccd2fe67353ed9bceeccd5392cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/filesystems.c
  *
index e747b3d720eeb1594737ed8b7a7c0ef15fd5166b..0d285fd5b44ab6d16d2377f3a19ef7fb6cc06384 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
index 6d561531cb36c661355fa060e0b6f60a67509e15..79e08e05ef84803437a4d1af3fa6589eba62a62b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for general filesystem caching code
 #
index b5ab06fabc60a3bd0a7a308f45e4cb5b850398c1..0438d4cd91ef74ee98f8990936d07c3bf8a67b30 100644 (file)
@@ -331,6 +331,13 @@ static void fscache_objlist_config(struct fscache_objlist_data *data)
        rcu_read_lock();
 
        confkey = user_key_payload_rcu(key);
+       if (!confkey) {
+               /* key was revoked */
+               rcu_read_unlock();
+               key_put(key);
+               goto no_config;
+       }
+
        buf = confkey->data;
 
        for (len = confkey->datalen - 1; len >= 0; len--) {
index 622081b97426d5b439bb1db5ee57dc4c3eead253..24967382a7b15271ae0646c3cb5522b3e58c37d0 100644 (file)
@@ -1308,7 +1308,8 @@ static int parse_dirplusfile(char *buf, size_t nbytes, struct file *file,
                        */
                        over = !dir_emit(ctx, dirent->name, dirent->namelen,
                                       dirent->ino, dirent->type);
-                       ctx->pos = dirent->off;
+                       if (!over)
+                               ctx->pos = dirent->off;
                }
 
                buf += reclen;
index 65c88379a3a14311cca68b8750d6bb0b9f107444..94a745acaef842eed799e45731bd12dd2ac0f7f7 100644 (file)
@@ -1059,7 +1059,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        if (sb->s_flags & MS_MANDLOCK)
                goto err;
 
-       sb->s_flags &= ~(MS_NOSEC | MS_I_VERSION);
+       sb->s_flags &= ~(MS_NOSEC | SB_I_VERSION);
 
        if (!parse_fuse_opt(data, &d, is_bdev))
                goto err;
index 86128202384f5422e27967321e85a1c6f7e58200..41b2aa4bc3bf43a2e113c76936221f29afa41a78 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -I$(src)
 obj-$(CONFIG_GFS2_FS) += gfs2.o
 gfs2-y := acl.o bmap.o dir.o xattr.o glock.o \
index 98e845b7841bda81b4bd9000f4ba027639861d27..11066d8647d29320dcb30d063536aa4f218cf5ec 100644 (file)
@@ -1945,13 +1945,9 @@ static void *gfs2_glock_seq_start(struct seq_file *seq, loff_t *pos)
 {
        struct gfs2_glock_iter *gi = seq->private;
        loff_t n = *pos;
-       int ret;
-
-       if (gi->last_pos <= *pos)
-               n = (*pos - gi->last_pos);
 
-       ret = rhashtable_walk_start(&gi->hti);
-       if (ret)
+       rhashtable_walk_enter(&gl_hash_table, &gi->hti);
+       if (rhashtable_walk_start(&gi->hti) != 0)
                return NULL;
 
        do {
@@ -1959,6 +1955,7 @@ static void *gfs2_glock_seq_start(struct seq_file *seq, loff_t *pos)
        } while (gi->gl && n--);
 
        gi->last_pos = *pos;
+
        return gi->gl;
 }
 
@@ -1970,6 +1967,7 @@ static void *gfs2_glock_seq_next(struct seq_file *seq, void *iter_ptr,
        (*pos)++;
        gi->last_pos = *pos;
        gfs2_glock_iter_next(gi);
+
        return gi->gl;
 }
 
@@ -1980,6 +1978,7 @@ static void gfs2_glock_seq_stop(struct seq_file *seq, void *iter_ptr)
 
        gi->gl = NULL;
        rhashtable_walk_stop(&gi->hti);
+       rhashtable_walk_exit(&gi->hti);
 }
 
 static int gfs2_glock_seq_show(struct seq_file *seq, void *iter_ptr)
@@ -2042,12 +2041,10 @@ static int __gfs2_glocks_open(struct inode *inode, struct file *file,
                struct gfs2_glock_iter *gi = seq->private;
 
                gi->sdp = inode->i_private;
-               gi->last_pos = 0;
                seq->buf = kmalloc(GFS2_SEQ_GOODSIZE, GFP_KERNEL | __GFP_NOWARN);
                if (seq->buf)
                        seq->size = GFS2_SEQ_GOODSIZE;
                gi->gl = NULL;
-               rhashtable_walk_enter(&gl_hash_table, &gi->hti);
        }
        return ret;
 }
@@ -2063,7 +2060,6 @@ static int gfs2_glocks_release(struct inode *inode, struct file *file)
        struct gfs2_glock_iter *gi = seq->private;
 
        gi->gl = NULL;
-       rhashtable_walk_exit(&gi->hti);
        return seq_release_private(inode, file);
 }
 
index 49ac55da4e334e2c5239e7ce81e1e04e3a016540..2f159265693b802c2bebfe3f2784ccf26bc23aff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM gfs2
 
index 0933600e11c8a9d2eb4113ae24e481c540e358f3..74fa626431363755cb311246cd4ece74c7961b88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfs/attr.c
  *
index de69d8a24f6d7462868fd8ed7c92fe4a6786888b..4af318fbda774ca78fa43de106b2e4ed39161a5a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfs/bfind.c
  *
index d77d844b668b14cbe16ab3e341f617d7db8e5f38..8aec5e732abf94efdb3def2b75a6134379b982e9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfs/bnode.c
  *
index 6fc766df04617a3f4abbdb0ba44f76ec71a468de..ad04a5741016994374289cf8cc8ba6f97d6c0480 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfs/brec.c
  *
index 37cdd955eceb2d787befb3393537f47c63ff5224..374b5688e29e5f9bda46fa3ad58e93fd1f743162 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfs/btree.c
  *
index f6bd266d70b55d8273fcffc362f347c336237ae1..c8b252dbb26c0ae75b10e848152ab2b10126587a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/hfs/btree.h
  *
index 683fca2e5e65a479b89be09ee3be3d289a4ee358..f6a56542f8d7d6a4057a22bb624be768ce477c1e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 ## Makefile for the linux hfsplus filesystem routines.
 #
index 95c8ed9ec17f7006940cf9c0fccdfe3c07a7868f..488c2b75cf41acf1c822b3b26f494db60eebdc32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/hfsplus/acl.h
  *
index e5b221de7de636e7d7b126f8ce3c7c978e1d56c9..2bab6b3cdba48da8322e0d1dd1c7a0e4f6f071b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/attributes.c
  *
index 528e38b5af7fecf9e3f202298f0773ea96a7e174..ca2ba8c9f82ef25519b7a0f6c5b66c15405b171f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/bfind.c
  *
index c0ae274c0a22560ff9850aa04daf2e3f465e8f17..cebce0cfe340589533cb4e2d40b065a876dc4b3c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/bitmap.c
  *
index ce014ceb89efcc0b810f99a8cac4bbf815f21bfc..d77015c3f22c2208e9ba0bce7733fe5f9f639d40 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/bnode.c
  *
index 754fdf8c6356388f16bbdc285240394b350bd90e..808f4d8c859c997f72753bf064b5308f0f10063e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/brec.c
  *
index d9d1a36ba8266b9d97da2ca99c1fd197bb6f8d70..de14b2b6881bb73c421bea985873848641c8e9a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/btree.c
  *
index a5e00f7a4c1434ba9d5718935c213fe0c2158868..a196369ba779f54b22c012c9803d9e4d0e655c59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/catalog.c
  *
index 31d5e3f1fe1797fcf46b187772ce4df57b7a8a13..e8120a282435d1eac2e4f08ce1451b126c3e5b6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/dir.c
  *
index a3eb640b4f8f8474130a893100303a0211d9037c..e8770935ce6d8588fc636661485c2fe23a3bafad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/extents.c
  *
index a3f03b24746376ddfcb8bac254613334ae4747b9..a015044daa053a3b55fef920d235483e2e46a3e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/hfsplus_fs.h
  *
index 8298d0985f810bbc6a4a45c54288c0701d7890e6..456e87aec7fd7eb016cc231822f93ce13129de42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/hfsplus_raw.h
  *
index 4f26b687713052286ad5baa98c7c7ca4cb61edc3..190c60efbc99804293661cda554dfcabc13c9d4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/inode.c
  *
index 0a156d84e67d63aaa75f57bd3741b59e4bf47748..5e6502ef7415426b67338e0ed7210aaecc9b065c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/ioctl.c
  *
index bb806e58c9770ec5491235bb8ac5fcdcd2e5574b..047e05c575601bb9699138be91f21f81fa17b82a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/options.c
  *
index 6bb5d7c42888fe049dba0cc98fc2d92f10e5d6d8..066114dcc3a299a31f7e88f42f7f1fa8e29fc788 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/posix_acl.c
  *
index 1b911730a0c107140d5d91f899f3201c69b9e91f..a5fb8ee7d019d4d722b4f9f257091ed1d0f1e89d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/tables.c
  *
index e563939882f35b8fb0cb6efcd3f5c16897112419..dfa90c21948f82a34b6eedfab2bfdd8b1c996ef3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/unicode.c
  *
index 10032b919a85c21be47678d7117d61f49fcc81b2..08c1580bdf7ad69e88305b15720769e5db6856d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hfsplus/wrapper.c
  *
index d37bb88dc746e6aed35e2b2307d88105c3b37b37..e538b758c448bef6beaaf8d7558b20ef04f82eaf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/xattr.c
  *
index 68f6b539371f51632654574b6e5d8d9e668a2a02..a4e611d697104ba0b0e81bbf4884bb4aeb8dd1f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/hfsplus/xattr.h
  *
index 37b3efa733ef246141034026550e5a94e521a107..f5550b006e8810bd43d5c2680bf80f55b3fcd511 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/xattr_trusted.c
  *
index 94519d6c627df8b447cc468971520b5b73d05439..fbad91e1dada2248c53d39dc104407f577a0a79c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/xattr_trusted.c
  *
index fae6c0ea00305f0e21a84f2489522187f279d550..74d19faf255e1174c65c1412b12e1f9dc53477c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/hfsplus/xattr_user.c
  *
index 91e19f9dffe513796e7a8e544d25bd23d302ca44..ffaec2e7526c94c003f30fb214d4b192bb07f98b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UM_FS_HOSTFS
 #define __UM_FS_HOSTFS
 
index 098bf0f4f386613c8502c7503ae9a237f28579b1..66617b1557c647cf02256be1188dee63038e5f8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/alloc.c
  *
index 2d5b254ad9e275352eae070e729a30b6af2f1a14..c14c9a035ee0c0bea94d8b441a4fb0e6934d19d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/anode.c
  *
index f626114449e4a74c44568d07b26b81af4cc41ff8..e285d6b3bba415d14269fac1460c2a581bf2d355 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/buffer.c
  *
index bb87d65f0d97129adee8cfa22b017d9b1dadffa5..89a36fdc68cbb77a62b3b1cc27735cc89d6a64f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/dentry.c
  *
index fa6bbb4f509f43bd8ec51c27c34f3f349d40013b..8d6b7e35faf9a76d91ce9835598c13495adb2032 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/dir.c
  *
index 86ab7e790b4e5bb14be86b1336576c2918f53d7c..3b834563b1f161352806249f0ef62b3e552ecee6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/dnode.c
  *
index ce3f98ba993ac220f379c0834288e4b4a2cd2b04..102ba18e561f6fbce6bcbeda94acd62a1300e211 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/ea.c
  *
index f26138425b16edec599f27df730b82b00fd8589c..1ecec124e76f17866ce8b8450a71291bae7534c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/file.c
  *
index cce025aff1b19b86f824cd47bfb6c9457d583068..823a328791c0c219d4b726e830ab9d2ad34fb014 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/hpfs/hpfs.h
  *
index d352f3a6af7f0931ce97478514b136748d0e89f0..2577ef1034efc45c67beb7e6f8ae54203207c349 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/hpfs/hpfs_fn.h
  *
index b9c724ed1e7e3cabcec7059af86d967edb83eb50..eb8b4baf0f2e0630d60a11cbac4d2efc976df209 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/inode.c
  *
index a136929189f01435533ec5fbb0d0bae7a37b6908..e0e60b1484006f9ca3d396399221983d4171eab9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/map.c
  *
index b00d396d22c697e8aa31c1033b6593231b4af73d..ef7ba77f36b88545b6dc07d1fb380b90a85e7010 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/name.c
  *
index f30c144145187343ac0d4bdadd39a529dae5f814..a3615e4c730d3b8a8d443d13e8237d9c148d7433 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/hpfs/namei.c
  *
index 59073e9f01a410f29150a3abf0087ac28409ad5b..ed113ea17affe6475523434d475aa2d94f6ce9c7 100644 (file)
@@ -842,9 +842,12 @@ static int hugetlbfs_error_remove_page(struct address_space *mapping,
                                struct page *page)
 {
        struct inode *inode = mapping->host;
+       pgoff_t index = page->index;
 
        remove_huge_page(page);
-       hugetlb_fix_reserve_counts(inode);
+       if (unlikely(hugetlb_unreserve_pages(inode, index, index + 1, 1)))
+               hugetlb_fix_reserve_counts(inode);
+
        return 0;
 }
 
index 569db68d02b317bbc7f1b4fd040268c3c53afa8a..5ace7efb0d04d2c0d4201e0fa24176be43b6e69c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ioctl.c
  *
index 269b24a01f3218ff9cdb9c1ef5254f3e5a64c3b1..d4801f8dd4fd55a111e647a810c3e0788829897d 100644 (file)
@@ -713,6 +713,8 @@ struct iomap_dio {
 static ssize_t iomap_dio_complete(struct iomap_dio *dio)
 {
        struct kiocb *iocb = dio->iocb;
+       struct inode *inode = file_inode(iocb->ki_filp);
+       loff_t offset = iocb->ki_pos;
        ssize_t ret;
 
        if (dio->end_io) {
@@ -726,12 +728,33 @@ static ssize_t iomap_dio_complete(struct iomap_dio *dio)
        if (likely(!ret)) {
                ret = dio->size;
                /* check for short read */
-               if (iocb->ki_pos + ret > dio->i_size &&
+               if (offset + ret > dio->i_size &&
                    !(dio->flags & IOMAP_DIO_WRITE))
-                       ret = dio->i_size - iocb->ki_pos;
+                       ret = dio->i_size - offset;
                iocb->ki_pos += ret;
        }
 
+       /*
+        * Try again to invalidate clean pages which might have been cached by
+        * non-direct readahead, or faulted in by get_user_pages() if the source
+        * of the write was an mmap'ed region of the file we're writing.  Either
+        * one is a pretty crazy thing to do, so we don't support it 100%.  If
+        * this invalidation fails, tough, the write still worked...
+        *
+        * And this page cache invalidation has to be after dio->end_io(), as
+        * some filesystems convert unwritten extents to real allocations in
+        * end_io() when necessary, otherwise a racing buffer read would cache
+        * zeros from unwritten extents.
+        */
+       if (!dio->error &&
+           (dio->flags & IOMAP_DIO_WRITE) && inode->i_mapping->nrpages) {
+               int err;
+               err = invalidate_inode_pages2_range(inode->i_mapping,
+                               offset >> PAGE_SHIFT,
+                               (offset + dio->size - 1) >> PAGE_SHIFT);
+               WARN_ON_ONCE(err);
+       }
+
        inode_dio_end(file_inode(iocb->ki_filp));
        kfree(dio);
 
@@ -993,6 +1016,13 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
        WARN_ON_ONCE(ret);
        ret = 0;
 
+       if (iov_iter_rw(iter) == WRITE && !is_sync_kiocb(iocb) &&
+           !inode->i_sb->s_dio_done_wq) {
+               ret = sb_init_dio_done_wq(inode->i_sb);
+               if (ret < 0)
+                       goto out_free_dio;
+       }
+
        inode_dio_begin(inode);
 
        blk_start_plug(&plug);
@@ -1015,13 +1045,6 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
        if (ret < 0)
                iomap_dio_set_error(dio, ret);
 
-       if (ret >= 0 && iov_iter_rw(iter) == WRITE && !is_sync_kiocb(iocb) &&
-                       !inode->i_sb->s_dio_done_wq) {
-               ret = sb_init_dio_done_wq(inode->i_sb);
-               if (ret < 0)
-                       iomap_dio_set_error(dio, ret);
-       }
-
        if (!atomic_dec_and_test(&dio->ref)) {
                if (!is_sync_kiocb(iocb))
                        return -EIOCBQUEUED;
@@ -1042,19 +1065,6 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
 
        ret = iomap_dio_complete(dio);
 
-       /*
-        * Try again to invalidate clean pages which might have been cached by
-        * non-direct readahead, or faulted in by get_user_pages() if the source
-        * of the write was an mmap'ed region of the file we're writing.  Either
-        * one is a pretty crazy thing to do, so we don't support it 100%.  If
-        * this invalidation fails, tough, the write still worked...
-        */
-       if (iov_iter_rw(iter) == WRITE) {
-               int err = invalidate_inode_pages2_range(mapping,
-                               start >> PAGE_SHIFT, end >> PAGE_SHIFT);
-               WARN_ON_ONCE(err);
-       }
-
        return ret;
 
 out_free_dio:
index bf162f0942d54251b49fed531b433d87fbd228e6..6498fd2b0f6073bad2ca098873b2601262d957c7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux isofs filesystem routines.
 #
index e7599615e4e0469bbf420cc9804ce47e3d001f0e..947ce22f5b3c343c3eb7abad856423241c3a5fc7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/isofs/dir.c
  *
index 0c5f721b4e91d019d8b25a756b40dacaff0f4463..85a9093769a955ba1cd7355190e2a1462d626d96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * fs/isofs/export.c
  *
index db692f554158854d4fa683d116827594d6ffd978..447a24d77b894ef733412ba201cadcaa9a226f7e 100644 (file)
@@ -514,9 +514,11 @@ static int isofs_show_options(struct seq_file *m, struct dentry *root)
        if (sbi->s_fmode != ISOFS_INVALID_MODE)
                seq_printf(m, ",fmode=%o", sbi->s_fmode);
 
+#ifdef CONFIG_JOLIET
        if (sbi->s_nls_iocharset &&
            strcmp(sbi->s_nls_iocharset->charset, CONFIG_NLS_DEFAULT) != 0)
                seq_printf(m, ",iocharset=%s", sbi->s_nls_iocharset->charset);
+#endif
        return 0;
 }
 
index 133a456b04259bd84262723ce0d0ba27f85830d2..57d4c3e2e94a4dfaea5234e2152cf353e21e430e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
 #include <linux/exportfs.h>
index a048de81c09318ae5ccd092f5675649a50a7025b..be8b6a9d0b926cb5b7b5a7f95708d90f8d27785d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/isofs/joliet.c
  *
index aee592767f1d0bd6301b22c1a46bf1e37312e575..cac468f04820e9669b1f59ba9632c420b52b2bce 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/isofs/namei.c
  *
index 0ec137310320f080316c5e6111198b842a77303e..94ef92fe806c472cf8152e21d5f54dbdc0f28343 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/isofs/rock.c
  *
index ed09e2b086372f0954200e487814e8e12e315542..ef03625431bbffd3873747be928848614e3686e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * These structs are used by the system-use-sharing protocol, in which the
  * Rock Ridge extensions are embedded.  It is quite possible that other
index 005a15cfd30a84d1e68021f5781e4a1d333d1a22..42544bf0e2223bdfacd6b77caa401e6f93d41fb2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/isofs/util.c
  */
index 60e5d49ca03e774fd3d02c72cdddebe7fb9eeb56..5294969d5bf9c8aae4c0919307cad0fd3deb6e22 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Journalling Flash File System v2 (JFFS2)
 #
index d20d4737b3ef917e76a440e196efe09c4cf6ce10..285ec189ed5c1c4fe9cbd44339f37c29949f3d7f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux JFS filesystem routines.
 #
index 5c5ac5b3aec33baf1da1af89f762d62275a59916..ba34dae8bd9ffd42a615453441f789938011b2fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/jfs/ioctl.c
  *
index 9b320cc2a8cf083d1ae647eae0af758916770166..6d5e83ed4476226a440624071584ccb7c8b1bff2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux lock manager stuff
 #
index c349fc0f9b80413f501bd0ea960e3a7eaefa8c92..00d5ef5f99f73dde4b549087087bc0807d360f43 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/clnt4xdr.c
  *
index 3b4724a6c4eebc5087830d7e25bb2027c5b1907c..2c6176387143c5a6f73ba2a9ae52c39bbd7c98c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/clntxdr.c
  *
index d716c9993a261cc0f62115bc65aecd74c15ea7b3..0d4e590e05498b69a7e93a35b7dcde8d93e56a7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/host.c
  *
index 9d8166c39c549a88c38892e2db54e2d9783ac59d..9fbbd11f9ecbbcc9e29aa989c33a58fc8ad727ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/mon.c
  *
index fb8cac88251ae64da116b8390826118c3eb1c81c..5bec78c8e431ff0c512605025726e4882190529f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LOCKD_NETNS_H__
 #define __LOCKD_NETNS_H__
 
index 8f72cb237ef345d326064e42eb50e728152dd693..ca9228a56d657a22612799a930953fd757b46523 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Procfs support for lockd
  *
index 184a15edd18d7426c5ac77903d283790d1462a50..ba9a82f4ce283dbc6255ecc1af0a8f7370f69978 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Procfs support for lockd
  *
index 82925f17ec45f554378696cfcb3faacb4f0544b8..1bddf70d96560fbb89e68c619cb18a40bee14ef5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/svc4proc.c
  *
index 3507c80d1d4b962b579d501201f4cdd060e6248b..3701bccab478638be018a0dfe9840915c78ccbb3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/svclock.c
  *
index 07915162581d62fcb58538dbf147d72ef8dcc81e..0d670c5c378fcf355abea12e0a811b898d88ff57 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/svcproc.c
  *
index b0ae07008700c65de59ddb2404a51dd642c84aee..ade4931b2da247abd23bd16923f1d2388dc6ce00 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/svcshare.c
  *
index 442bbd0b0b293bf8b8a6a3b9c3d58040d1c5478d..7147e4aebecc218e0b480f724e121a77966979c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/xdr.c
  *
index 2a0cd5679c49ddc2580e1dcea885d93ecd79e1b5..7ed9edf9aed4a69031229537a4e9b25bfb7feee5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/lockd/xdr4.c
  *
index c2c3fd3277b5c89c012024c216edcd33a1e19d91..f4e5e5181a144b5d78d65c14a89258014f2fff1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/minix/bitmap.c
  *
index baa9721f1299c2306e2e614a6dea37cf8bc2ff70..dcfe5b25378b54242d781ed7aaae23d6678379a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/minix/dir.c
  *
index a6a4797aa0d40cb89d99d00edbfd32ef590de86c..c50b0a20fcd9c15ecf4a2bd8887bce9a8b6e88f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/minix/file.c
  *
index 2d1ca08870f7f6142082e880d78d0e9acc31c3dd..043c3fdbc8e7ebe5b0d8cf8d078322c4936b2581 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Generic part */
 
 typedef struct {
index 46ca39d6c73586fea640e60cfdee9905ad19970c..046cc96ee7adb57aefc7110bae557e7a648334bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/buffer_head.h>
 #include <linux/slab.h>
 #include "minix.h"
index 1ee101352586465cada91c2674a41b8a7c79ad38..f7fc7eccccccde1c980be538be928d99db2c3b13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/buffer_head.h>
 #include "minix.h"
 
index 663d66138d06dfc17430a25496e1f2673e5deda0..df081e8afcc3cba9339e3303a07731d1150c4d0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_MINIX_H
 #define FS_MINIX_H
 
index 1e0f11f5dac9c90093dd511f2dc451971c232c6d..ccf0f00030bf4652a56eb54f0d7af2c9f19a2e89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/minix/namei.c
  *
index 6790767d18834fcb71b360f6683fe2cf54edb42f..f39bc9da4d73c8e38bdbb85c8385fc8820f76dc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/mount.h>
 #include <linux/seq_file.h>
 #include <linux/poll.h>
index 37bb77c1302c354adf0386a32e3b678fdc93f54c..b7e7f570733ad0766afe5d7f116e787c7ebf21f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * fs/mpage.c
  *
@@ -468,6 +469,16 @@ static void clean_buffers(struct page *page, unsigned first_unmapped)
                try_to_free_buffers(page);
 }
 
+/*
+ * For situations where we want to clean all buffers attached to a page.
+ * We don't need to calculate how many buffers are attached to the page,
+ * we just need to specify a number larger than the maximum number of buffers.
+ */
+void clean_page_buffers(struct page *page)
+{
+       clean_buffers(page, ~0U);
+}
+
 static int __mpage_writepage(struct page *page, struct writeback_control *wbc,
                      void *data)
 {
@@ -605,10 +616,8 @@ alloc_new:
        if (bio == NULL) {
                if (first_unmapped == blocks_per_page) {
                        if (!bdev_write_page(bdev, blocks[0] << (blkbits - 9),
-                                                               page, wbc)) {
-                               clean_buffers(page, first_unmapped);
+                                                               page, wbc))
                                goto out;
-                       }
                }
                bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9),
                                BIO_MAX_PAGES, GFP_NOFS|__GFP_HIGH);
index c75ea03ca147ec81977f67929b7f4489b90cf42e..ed8b9488a890c2b936e249ab16e6a44a292a9521 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/namei.c
  *
index 54059b142d6ba1153b8adab7114cd7587e0c3aad..d18deb4c410b24ed276c9b60c869f4c06b6ec20f 100644 (file)
@@ -468,7 +468,9 @@ static inline int may_write_real(struct file *file)
 
        /* File refers to upper, writable layer? */
        upperdentry = d_real(dentry, NULL, 0, D_REAL_UPPER);
-       if (upperdentry && file_inode(file) == d_inode(upperdentry))
+       if (upperdentry &&
+           (file_inode(file) == d_inode(upperdentry) ||
+            file_inode(file) == d_inode(dentry)))
                return 0;
 
        /* Lower layer: can't write to real file, sorry... */
@@ -2823,7 +2825,8 @@ long do_mount(const char *dev_name, const char __user *dir_name,
                            SB_MANDLOCK |
                            SB_DIRSYNC |
                            SB_SILENT |
-                           SB_POSIXACL);
+                           SB_POSIXACL |
+                           SB_I_VERSION);
 
        if (flags & MS_REMOUNT)
                retval = do_remount(&path, flags, sb_flags, mnt_flags,
index c66af563f2ceef35fbf68b01527866f8128711d0..66fe5f87881735a95c693657e7e55e3fbfedef35 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ncp filesystem routines.
 #
index 088f52484d6e2d3eb87812a3cd509c534c95c206..b5ec1d980dc933bfe0434201d7350def1371b6d1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  dir.c
  *
index a06c07619ee660ca7cb8b4044a3b34e58741042b..8f8cc0334dddf3bcfbaaac2d177312c8a7a8f3e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  file.c
  *
index 344889cd120ed156671d2c9d745c07802bae0c5f..5c941bef14c4e20c8c3826614fcd0f7d2cb34c9d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * getopt.c
  */
index cccc007dcaf96dc45ff6779a449bfe6270d156df..30f0da3176701e713dffe82d4d7239491d09d85c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_GETOPT_H
 #define _LINUX_GETOPT_H
 
index 12550c2320ccbb79f69868a2eeafa67fdfaa82ee..d378b98cd7b6bb88d8516cd96be2162962de8838 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  ioctl.c
  *
index 6719c0be674d2b76a911c3a5db1c634990194079..a5c5cf2ff0073980eb32058414da0d16ffdba064 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  mmap.c
  *
index b9f69e1b1f434422ec0ca8435e1ac5cf6c087612..bdd262b6c19865b2c81f109a4aaf5722870ec11b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/ncp_fs.h>
 #include "ncp_fs_i.h"
 #include "ncp_fs_sb.h"
index c4794504f8437fc37520b5c4f46127eb6dd7bb04..3432bafb53a58e5eadda28727cfd18eaa1f79eac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ncp_fs_i.h
  *
index 366fd63cc506fc3e61be93877349ef6032cf5734..89031d7e3ae1966625a8970a9890cfe26dfc481d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ncp_fs_sb.h
  *
index 88dbbc9fcf4d6a5eb76a95f162481c7b88190a9b..804adfebba2f7e4631caa5c1205a5481e915cfb9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  ncplib_kernel.c
  *
index b4c87cfcee9504eea37089a5407900b47c355913..aaae8aa9bf7df554690f7ff844b1d6f30da143d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ncplib_kernel.h
  *
index 08907599dcd23a36ad47765897ca2b00b5b8ac33..8085b1a3ba47a69be303b835cff61ae90cacfd74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  ncpsign_kernel.c
  *
index d9a1438bb1f6eded67c82b0efccbed5da862a070..57ff0a0650b8c484f6307b2b8c1184549ba8571b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ncpsign_kernel.h
  *
index 98b6db0ed63e0323477be82768f9c3c08a06de5d..7dd7170d6cdf2904086792650ca258736cfd1db8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ncpfs/sock.c
  *
index a6d26b46fc05af7895aaae8e69220ca3babcb5ec..b6e16da4837a841c0eada5c564ca94a5a7497fba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ncpfs/symlink.c
  *
index 1fb118902d57be8def63ae898961d265e7f77bf6..c587e3c4c6a6765ea901dae41f9b9b1c6b84162f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux nfs filesystem routines.
 #
index a69ef4e9c24c7ed411cf54bd9b1ba78a371010f2..95f74bd2c067fcd2556f09e3abbbb57cbd41f0f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014-2016 Christoph Hellwig.
  */
index c85fbfd2d0d99e7cd5e3cc902ebd4b75b8e1b02c..7a57ff2528af9da516cbb9168513e8941c318ec9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014-2016 Christoph Hellwig.
  */
index 2ae676f93e6bd5e3823358bcd3b988ce074adc75..b60627bcfc6234bf0f2a44c808b3fee3c461b1df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/cache_lib.c
  *
index 4116d2c3f52f130ca887d55682f1a8a24ba878cb..4e6236a86cf7c73950647ec1aab79d57391fd401 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Helper routines for the NFS client caches
  *
index 2cddf7f437e666e7e486b3d8ec7676c488440635..cd9d992feb2e155eac9d57b51bb22a7a0f1f85c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/callback.c
  *
index 3dc54d7cb19c0e1c97f9c82e67105495a9c12553..a20a0bce40a48885453375cb3ab0c0ca5a3c3e53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/nfs/callback.h
  *
index 14358de173fb9d851433977a0e70b8dcff9f0ff3..19151f6c0e97e32d4f58245a75c0b237194911b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/callback_proc.c
  *
index 681dd642f1195a0ebe253f8c57cb3fa81888f0c7..123c069429a7ba71fed0d1ed986eb7e764f75706 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/callback_xdr.c
  *
index efebe6cf4378e32a13d109eebd0b694dd629c2a5..22880ef6d8dd74f6b44d7d755bdb9c8e8de59917 100644 (file)
@@ -218,7 +218,6 @@ static void nfs_cb_idr_remove_locked(struct nfs_client *clp)
 static void pnfs_init_server(struct nfs_server *server)
 {
        rpc_init_wait_queue(&server->roc_rpcwaitq, "pNFS ROC");
-       rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC");
 }
 
 #else
@@ -888,6 +887,7 @@ struct nfs_server *nfs_alloc_server(void)
        ida_init(&server->openowner_id);
        ida_init(&server->lockowner_id);
        pnfs_init_server(server);
+       rpc_init_wait_queue(&server->uoc_rpcwaitq, "NFS UOC");
 
        return server;
 }
index e9d55579687393552b0d83c46dfcafc56dbace89..ddaf2644cf13a15aa8bf1dd18046460013132ba7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/nfs/delegation.h
  *
index d25f10fb4926b09dc39ac3f6f62a433d4bcdc58b..060c658eab6600ebb0cf2dfa069d70d4e0f152a0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/dns_resolve.c
  *
index 2e4f596d2923d5876b685fb9fb8bdc0ed13c2de6..576ff4b54c82a84a1bfff8f970c2e309f40f0744 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Resolve DNS hostnames into valid ip addresses
  */
index 249cb96cc5b5c7d854b90ca1db90a28674fdd44b..83fd09fc8f7705ff951aaee9e863bcb4cc053a0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015, Primary Data, Inc. All rights reserved.
  *
index 44c638b7876cfd5824d2d6287731e4411ea02052..508126eb49f9577eeec6f9e1b97abf6286cc82eb 100644 (file)
@@ -745,7 +745,8 @@ filelayout_free_lseg(struct pnfs_layout_segment *lseg)
        struct nfs4_filelayout_segment *fl = FILELAYOUT_LSEG(lseg);
 
        dprintk("--> %s\n", __func__);
-       nfs4_fl_put_deviceid(fl->dsaddr);
+       if (fl->dsaddr != NULL)
+               nfs4_fl_put_deviceid(fl->dsaddr);
        /* This assumes a single RW lseg */
        if (lseg->pls_range.iomode == IOMODE_RW) {
                struct nfs4_filelayout *flo;
index 98b34c9b0564b348615a0d560b863c11cd17ad5e..679cb087ef3f228b833def767d33bf266e238902 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NFSv4 flexfile layout driver data structures.
  *
index f32c58bbe55671cb75abdcb9934152d110e3537d..d62279d3fc5d311f5eacc6eb7618beac70159bf5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device operations for the pnfs nfs4 file layout driver.
  *
index 5bdf952f414b54c04987e1c3ce5c23ac0bf95961..f9a4a5524bd580e08213161438bb2ace368dd5db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NFS internal definitions
  */
index 1fc5d1ce327e272c0878e8a53aa45b2dc96e97ad..20fef85d2bb15782c4ede8bdbaa083867e522d82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016 Trond Myklebust
  *
index 0cb806fbd4c4c40bd303b9f205fd6250bfd5af5a..2ddaab1ac6537254b59d9f0a5dc5fc170e637438 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/nfs/iostat.h
  *
index 60bad882c12351fe39314bd1d265f7980c5719ab..d979ff4fee7e04a9b28998de01c58a673a9ba1db 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * In-kernel MOUNT protocol client
  *
index 5fbd2bde91ba7e7c18a367559d636b90908fc6e7..fc9978c58265133907776c6539750f771246c0a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NFS-private data for each "struct net".  Accessed with net_generic().
  */
index 43679df56cd0536c5ea9186a2c800867d58ed643..5ba00610aede074400a5c3d02f310099833a797d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2012 Netapp, Inc. All rights reserved.
  *
index fe68dabfbde6115708ac3ef570d897c6a1487926..85e4b4a233f9d9b3f0bcab413c92458844c558e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/nfs2xdr.c
  *
index e134d6548ab7244c4de25786fc1f491038c1643c..f82e11c4cb56b402b7641551c87204259750aaf9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2014 Anna Schumaker.
  *
index 720d92f5abfb838875bb1a01630e101e4738581a..7173a4ee862cb87af4cbab0314032c412a6bf3e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/gfp.h>
 #include <linux/nfs.h>
index d1e87ec0df8482d272b2a2c481b0eb3d76401ebd..bc673fb47fb38fcd4830de96d1f0e7967ce94eb6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/nfs/nfs3proc.c
  *
index e82c9e5532249e1791cefdd61261539bed2c5f77..6cd33bd5da87c355c47ade6823e2c2683941e1b2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/nfs3xdr.c
  *
index b6cd15314bab4e3260c5fdc2809ebf54a02b4291..19ec38f85ce0724fb11e8d879c9688a12b3929d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2014 Anna Schumaker <Anna.Schumaker@Netapp.com>
  */
index 6c2db51e67a77422cead4b27fb83fa3695d1eb91..9c374441f660a85bc3e3b2ee1f65f97c9f8dc316 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 Anna Schumaker <Anna.Schumaker@Netapp.com>
  */
index 5ee1b0f0d904490bb0a08478101ae49cd09acb57..5966e1e7b1f51d059e54f4b3a5506d033ed5cc22 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 Anna Schumaker <Anna.Schumaker@Netapp.com>
  */
index ac4f10b7f6c1beafc5027ad02a53b33e091f32d0..dcfcf7fd7438f9a3248d110d149de8f7e652cf07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/fs/nfs/nfs4_fs.h
  *
index 0efba77789b9044b6ae93689df5e01b35ad879cb..626d1382002ed0894db3c5edd19df534cc8dfef6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/nfs/file.c
  *
index ac84060189626ccb07f24b366594d36372717cbb..1a69479a3a59d3ce780ebff7785edb5202154d0e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
index dd5d27da8c0cc5f19d96c33360400778a6a60b5c..30426c1a1bbda245b831bfbac5ff8f1aa570f71f 100644 (file)
@@ -274,7 +274,7 @@ static struct key *nfs_idmap_request_key(const char *name, size_t namelen,
        ssize_t ret;
 
        ret = nfs_idmap_get_desc(name, namelen, type, strlen(type), &desc);
-       if (ret <= 0)
+       if (ret < 0)
                return ERR_PTR(ret);
 
        rkey = request_key(&key_type_id_resolver, desc, "");
index 7d531da1bae37e1cd957c3181423930e1033ab8b..8c3f327d858d57ab5bbd519b929b26a7ecaee8dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/nfs4namespace.c
  *
index 6c61e2b996351cde05b1c922674cd3a2670913ea..f90090e8c959b14346baf76ac7eaefed7ae30f82 100644 (file)
@@ -8399,8 +8399,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
                lo = NFS_I(inode)->layout;
                /* If the open stateid was bad, then recover it. */
                if (!lo || test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags) ||
-                   nfs4_stateid_match_other(&lgp->args.stateid,
-                                       &lgp->args.ctx->state->stateid)) {
+                   !nfs4_stateid_match_other(&lgp->args.stateid, &lo->plh_stateid)) {
                        spin_unlock(&inode->i_lock);
                        exception->state = lgp->args.ctx->state;
                        exception->stateid = &lgp->args.stateid;
index dfae4880eacb9884539d62cb2167a78f6429b7db..3c550f2975611945264f0dea39cbd79dbb0d8672 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fs/nfs/nfs4session.h
  *
index 8693d77c45ea423c344254e0b3042f9e55b48d0b..0d91d84e5822274d8150b2008ef2206247c34d46 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/nfs4sysctl.c
  *
index 2850bce19244377440c426aed08028910f28cfd8..e9fb3e50a999bc936c83d3349fa58277e153ddad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  */
index be1da19c65d61e89e19f45d9bd07faaabe54d71f..e7c6275519b09d856ab50223edbaa8bf5f0517ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  */
index 37c8af00327588d772610cac487fcf0651cf8fbf..14ed9791ec9cf156905a3e686042c325173582c0 100644 (file)
@@ -1842,8 +1842,8 @@ static void encode_create_session(struct xdr_stream *xdr,
         * Assumes OPEN is the biggest non-idempotent compound.
         * 2 is the verifier.
         */
-       max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE +
-                             RPC_MAX_AUTH_SIZE + 2) * XDR_UNIT;
+       max_resp_sz_cached = (NFS4_dec_open_sz + RPC_REPHDRSIZE + 2)
+                               * XDR_UNIT + RPC_MAX_AUTH_SIZE;
 
        encode_op_hdr(xdr, OP_CREATE_SESSION, decode_create_session_maxsz, hdr);
        p = reserve_space(xdr, 16 + 2*28 + 20 + clnt->cl_nodelen + 12);
index 89a15dbe5efcd5c7b86f12a3c286b24a1cc1ea35..effaa4247b912fe9836e65910470e1e0ec15a0f2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Copyright (C) 1995, 1996  Gero Kuhlmann <gero@gkminix.han.de>
  *
index c74f7af23d77a756b1f785fa78723c00c26a4312..b60d5fbd7727507009dff6e15110ea20d54ed24f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  */
index 551711042ba466dd0cca8fef872d53b659e8a05d..093290c42d7ccb2795c1cf91b3726e06fe714678 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2013 Trond Myklebust <Trond.Myklebust@netapp.com>
  */
index 7962e49097c3878e7e8257427d3a1ec32eee776c..f7fd9192d4bc8e853656508cd492ae50aef4723e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/nfs/proc.c
  *
index 5a1d0ded897989c0243df2c07cd9108a38bbc594..06eb44b4788571f84452c1898ee8773bac310d4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/nfs/symlink.c
  *
index bb6ed810fa6f35d46c9f1f5ff87e392e2f539644..7aea195ddb353772c736d2984f000231b3b51bee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/nfs/sysctl.c
  *
index e3949d93085c8bc53692df7e8a4fd6b49052280c..630b4a3c1a93de58cfe7a6acc4ea5c083027ea4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/nfs/unlink.c
  *
index 5f5d3a76980c02725018555e7c8f239dfb59f228..2bfb58eefad1c2e015178140fc5c9566cf9348fb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux nfs server
 #
index 62469c60be23263f21903fadc2217488c7160ed6..697f8ae7792d1304e3cec035fd56185eb2ee02df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> */
 
 #include <linux/sched.h>
index 53325a12ba62a05335c7989f658373ba41e18b0f..dbd66424f600be9faff713408c12eb6499194e06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * nfsd-specific authentication stuff.
  *
index c862c2489df0eba4ece4e8878b9bb8da447472d5..3f880ae0966b68fbe7d437fc7abc5313775f4c67 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014-2016 Christoph Hellwig.
  */
index ac6f54546fdde92b060e10839f631a574fa76cf5..442543304930b8d90f6019a657735dcf25d1cf98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014-2016 Christoph Hellwig.
  */
index 397bc7563a4927c9673e5715bbb79e0cd1c6006b..bc5166bfe46bf1dea2c219fd44f740a3438d5f5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFSD_BLOCKLAYOUTXDR_H
 #define _NFSD_BLOCKLAYOUTXDR_H 1
 
index dd96a38300040fd1da2566117233893f7eec1507..046b3f04875745019abc3247b2e7e479d96d9dd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Request reply cache. This was heavily inspired by the
  * implementation in 4.3BSD/4.4BSD.
index 34075cee573a0aa5b3d1c1041b5863c78f52b868..c28540d8674250c3693774b35df4aadaa288f54d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFSD4_CURRENT_STATE_H
 #define _NFSD4_CURRENT_STATE_H
 
index 3bc08c394a3f9525620b256466f4222a9133080e..46b48dbbdd3255260c2b505b49d87b8d2e874100 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NFS exporting and validation.
  *
index 730f15eeb7ed561fb50b5485af00f2a5a8aca2f7..c8b74126ddaa86c4de9ab9233f3ce3552d7e5edf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
  */
index 34c1c449fddf33d065a518b5f8455887ba2b6ccd..6dfede6d172aa276ba99544cf561cf4744220ff7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2011 Bryan Schumaker <bjschuma@netapp.com>
  *
index b672873830109e1d4705a4de7496a23da4227610..db7ef07ae50c9bfbf4396559cabff576a6eb56df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016 Tom Haynes <loghyr@primarydata.com>
  *
index 5e3fd7fc1a9fc4bf1aab9ea58b94a70305193f36..e81d2a5cf381e39952f33fa6e230954bd9d08348 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016 Tom Haynes <loghyr@primarydata.com>
  */
index 467defd4e56364188d689c537080ed15be74a602..8e195aeca0237765666abd237e76480688686f80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2016 Tom Haynes <loghyr@primarydata.com>
  */
index 1a03bc3059e84c6c399a1a5c79d4cc5e583ce220..3f5b3d7b62b7142ed0ac09e55a2c7def65a78612 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains all the stubs needed when communicating with lockd.
  * This level of indirection is necessary so we can run nfsd+lockd without
index 6276ec8608b0674a5bcd9d35a1c271a4816b1613..cbab1d2d8a750949c4ede993f03e31daac9a48b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Process version 2 NFSACL requests.
  *
index 01976529f04240f45cf7dcf0246c193e5be8d77a..13bca4a2f89d2680e74c4816bebf356ca1ec3846 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Process version 3 NFSACL requests.
  *
index 2cb56a0d6625f07db79447768fac92c86940d9b7..1d0ce3c57d939d6de10418fe12cf4cd217d392e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Process version 3 NFS requests.
  *
index bf444b664011a891992b04435b739e30fbc17b0e..f38acd9054419606e3abd25060599960d38c6f2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XDR support for nfsd/protocol version 3.
  *
index e122da696f1b17abc1befa94b95f3a9396d52757..ea45d954e8d7c53cbb3db6dcbf8ac3958b314a90 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 Christoph Hellwig.
  */
index 3c69db7d4905e379487ebdec7f31c2b4670412d6..8487486ec4963efb72477e7cf2f19616108f12f2 100644 (file)
@@ -927,6 +927,13 @@ nfsd4_secinfo_release(union nfsd4_op_u *u)
                exp_put(u->secinfo.si_exp);
 }
 
+static void
+nfsd4_secinfo_no_name_release(union nfsd4_op_u *u)
+{
+       if (u->secinfo_no_name.sin_exp)
+               exp_put(u->secinfo_no_name.sin_exp);
+}
+
 static __be32
 nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
              union nfsd4_op_u *u)
@@ -2375,7 +2382,7 @@ static const struct nfsd4_operation nfsd4_ops[] = {
        },
        [OP_SECINFO_NO_NAME] = {
                .op_func = nfsd4_secinfo_no_name,
-               .op_release = nfsd4_secinfo_release,
+               .op_release = nfsd4_secinfo_no_name_release,
                .op_flags = OP_HANDLES_WRONGSEC,
                .op_name = "OP_SECINFO_NO_NAME",
                .op_rsize_bop = nfsd4_secinfo_rsize,
index 96fd15979cbd44d4275b47276e1619b5c9ee3339..334f2ad6070491d2302e93fd7fc87b6603c325f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Request reply cache. This is currently a global cache, but this may
  * change in the future and be a per-client cache.
index b9c538ab7a59bf48cd56f956045804596ad040e2..3fce905d036502987d4ebb9560800a28fd37ad98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Hodge-podge collection of knfsd-related stuff.
  * I will sort this out later.
index cfe7500d5847baaca753a064d132ed6dd4d58c3b..8aa011820c4a855e0aa99e596564cffa667d13ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NFS server file handle treatment.
  *
index e47cf6c2ac28b6ad1aac5797a9ecb93806e2f951..43f31cf49bae3f1e27fe8af8630e1f489e636d8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
  *
index 5076ae2b82585fb563822483cf1b10f208f5e9ab..43c0419b8ddbd0ead78fabce06be943ace1439ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Process version 2 NFS requests.
  *
index 7e3af3ef091778fa4eb0258f77a5f2582555c375..e02bd278312463af174de08b017c445eb4e86b5b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Central processing for nfsd.
  *
index e4da2717982d0ef8c5d81fd27f1775eeba5af363..644a0342f0e0653386679d5b93bd92f5803bdb77 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * XDR support for nfsd
  *
index d27a5aa6002294eb5c3fcb6cf4db5b3e2edacd9b..4f4282d4eeca41f5f99e9be2c41f4bd5a59a075f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_NFSD_PNFS_H
 #define _FS_NFSD_PNFS_H 1
 
index d97338bb6a39864173e499ac76b43b1b2fb9e8f7..9bce3b913189cd1b88170cd2986558d9e588d636 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * procfs-based user access to knfsd statistics
  *
index a5c944b771c60d595ce3ea3bd51de7a3d79b097e..b23fdac69820150ad72b016b30ddbeff06b06ab5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Statistics for NFS server.
  *
index 3287041905dabaca2b80b3add4269a55ecf28a27..8b2f1d92c57995da7abdec0c34e352bd9d14b40e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2014 Christoph Hellwig.
  */
index bc69d40c4e8b9436c71b2aef5ae2444e35d78833..a3c9bfa77def8da3a2a5d54f21edae47943a4ae1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * File operations used by nfsd. Some of these have been ripped from
  * other parts of the kernel because they weren't exported, others
index 1bbdccecbf3df886c61be593b33e9d7bf71d122b..be6d8e00453f7e598a699f7c6401be37dc1a7867 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
  */
index 457ce45e5084fde7084cd4a2df3c412cc187f16b..2f4f22e6b8cbe9b79ac513b306880eb05e569938 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* XDR types for nfsd. This is mainly a typing exercise. */
 
 #ifndef LINUX_NFSD_H
index 80d7da620e912e52c2e678e35834bffe147a777c..056bf8a7364e22d75a47e646f206a1e5415df6e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * XDR types for NFSv3 in nfsd.
  *
index 49b719dfef95a95cef4937d1d9ca5e7c6bc49078..517239af03027c176eeb9dd73e2c08a0ed9d43bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define NFS4_MAXTAGLEN         20
 
 #define NFS4_enc_cb_null_sz            0
index fc603e0431bb2b4973e46fe7c11b801ec654b5c5..43b60b8a4d0783518f2ecabaf3a0b978192a37fd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NILFS2_FS) += nilfs2.o
 nilfs2-y := inode.o file.o dir.o super.o namei.o page.o mdt.o \
        btnode.o bmap.o btree.o direct.o dat.o recovery.o \
index 00107fdb93433dc0cf23e71a2d687589578fa3c0..d29fd837c42cdf92e218d9f55d7073c137f38ca6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef NILFS_EXPORT_H
 #define NILFS_EXPORT_H
 
index 8ae37c1b524995d49a8b0a0ba38362ebfd749f47..ac54db29712831d39c26d197b2c246a422ce49dc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for native language support
 #
index 3e969ae91b60dd1bbc55cb51698387f2c01ba412..63a4b8828df427709ea4f89b14a128664150e7ba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_FSNOTIFY)         += fsnotify.o notification.o group.o mark.o \
                                   fdinfo.o
 
index 2fa99aeaa0959e43e80db466a95e7a09ea0dbfa7..09640b5463638672409ef692b066e7c349e203bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fanotify.h>
 #include <linux/fdtable.h>
 #include <linux/fsnotify_backend.h>
index 4eb6f5efa282527f4d2d4824fcf80267f0b68be7..7dacb7d807279d3d4727168b73518493d849a3d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fsnotify_backend.h>
 #include <linux/path.h>
 #include <linux/slab.h>
index 907a481ac78158612ce918e4a1f4c46ea860fb30..9752e7270e616d3641ca0f4fe9b0dd90ccd1ef1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fanotify.h>
 #include <linux/fcntl.h>
 #include <linux/file.h>
index dd63aa9a6f9a3fe2696496fee7afa17a4ea45210..517f88c1dbe5f65508e5a26df70b95e814ab323b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/fsnotify_backend.h>
index 9664c4904d6b7aeb388e5143671db18bb19b7015..5c9937e02e21740f062a9b5e73694100ecc7c3c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FSNOTIFY_FDINFO_H__
 #define __FSNOTIFY_FDINFO_H__
 
index bf012e8ecd14be9fb3d9a526eba95baa9fe7c9be..60f365dc1408bb535a41b08a84cc059349a408e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FS_NOTIFY_FSNOTIFY_H_
 #define __FS_NOTIFY_FSNOTIFY_H_
 
index 9ff67b61da8a6abb3e573ae7b1f31c71235b4139..c00d2caca8948662a06bfd715187d8640c774b3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fsnotify_backend.h>
 #include <linux/inotify.h>
 #include <linux/slab.h> /* struct kmem_cache */
index 08127a2b8559ab9660b7dcced023770ff8588c59..ef243e14b6ebd2d8c57113ced959fb2f2a772a6f 100644 (file)
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mount.h>
 #include <linux/file.h>
 #include <linux/fs.h>
index 2ff263e6d363dba5f9621ad705c5795aaf855326..3e736572ed005d3cd22e0f36baf75a512b3c9fe8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Rules for making the NTFS driver.
 
 obj-$(CONFIG_NTFS_FS) += ntfs.o
index 4342c7ee7d202153126fbaace723a19846d02fd4..99ee093182cbe1e867e7a3b817cdb4b127734daf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -Ifs/ocfs2
 
 obj-$(CONFIG_OCFS2_FS) +=      \
index a177eae3aa1ad593adc62349d6e734cc026717b4..addd7c5f2d3e522a7a65bd51b0164ef705402605 100644 (file)
@@ -7304,13 +7304,24 @@ out:
 
 static int ocfs2_trim_extent(struct super_block *sb,
                             struct ocfs2_group_desc *gd,
-                            u32 start, u32 count)
+                            u64 group, u32 start, u32 count)
 {
        u64 discard, bcount;
+       struct ocfs2_super *osb = OCFS2_SB(sb);
 
        bcount = ocfs2_clusters_to_blocks(sb, count);
-       discard = le64_to_cpu(gd->bg_blkno) +
-                       ocfs2_clusters_to_blocks(sb, start);
+       discard = ocfs2_clusters_to_blocks(sb, start);
+
+       /*
+        * For the first cluster group, the gd->bg_blkno is not at the start
+        * of the group, but at an offset from the start. If we add it while
+        * calculating discard for first group, we will wrongly start fstrim a
+        * few blocks after the desried start block and the range can cross
+        * over into the next cluster group. So, add it only if this is not
+        * the first cluster group.
+        */
+       if (group != osb->first_cluster_group_blkno)
+               discard += le64_to_cpu(gd->bg_blkno);
 
        trace_ocfs2_trim_extent(sb, (unsigned long long)discard, bcount);
 
@@ -7318,7 +7329,7 @@ static int ocfs2_trim_extent(struct super_block *sb,
 }
 
 static int ocfs2_trim_group(struct super_block *sb,
-                           struct ocfs2_group_desc *gd,
+                           struct ocfs2_group_desc *gd, u64 group,
                            u32 start, u32 max, u32 minbits)
 {
        int ret = 0, count = 0, next;
@@ -7337,7 +7348,7 @@ static int ocfs2_trim_group(struct super_block *sb,
                next = ocfs2_find_next_bit(bitmap, max, start);
 
                if ((next - start) >= minbits) {
-                       ret = ocfs2_trim_extent(sb, gd,
+                       ret = ocfs2_trim_extent(sb, gd, group,
                                                start, next - start);
                        if (ret < 0) {
                                mlog_errno(ret);
@@ -7435,7 +7446,8 @@ int ocfs2_trim_fs(struct super_block *sb, struct fstrim_range *range)
                }
 
                gd = (struct ocfs2_group_desc *)gd_bh->b_data;
-               cnt = ocfs2_trim_group(sb, gd, first_bit, last_bit, minlen);
+               cnt = ocfs2_trim_group(sb, gd, group,
+                                      first_bit, last_bit, minlen);
                brelse(gd_bh);
                gd_bh = NULL;
                if (cnt < 0) {
index 4506ec5ec2ea624235a36c06cb755ef2211e0914..ab30c005cc4bc3c08e9ecd8a4c04ee8ea95d604e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ocfs2/ioctl.c
  *
index 0cd5323bd3f00f756a2953e0d21f04ea681eaf79..9f5e4d95e37f84588bc61dec2b07116069ce9bd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ioctl.h
  *
index 1274ee0f1fe2f70c2242e5f8560a3d04f7e991d2..1051507cc6841156d631879f759e0c57bfcb7cee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef OCFS2_MMAP_H
 #define OCFS2_MMAP_H
 
index 0b58abcf1c6dac33747d664c40702e30751ef363..a0b5d00ef0a92ecb91627e3a35391b94937b661e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM ocfs2
 
index d153e6e31529a5fce986d382bb699a5d2c27e9b7..ebb5c99f490efd38573740d7595d9f3d1d21b8c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * quota.h for OCFS2
  *
index c94b6baaa55128b7cf9bec5961f6aecee446fa38..b39d14cbfa34d949eea04a5253772c22aa5af625 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Implementation of operations over global quota file
  */
index aa700fd10610baf8b022fc17581cd200e13c22ec..16c42ed0dca882cf281746933193c990b12ff2e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Implementation of operations over local quota file
  */
index 83f4e76511c2bf7804c922f268ba4319a5cfb799..7147ba6a6afcb2038f4f9e24aea6857ab1909af4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
index f0f8bc75e6094fa014ab76f46bcba1f73afe3808..4008be73de545ee4b07a379b7f795b4f63b44bad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OMFS_H
 #define _OMFS_H
 
index 83a98330ed6602d7a5ffe03e7f5598a201e6ecf7..caecb3d5a3443fa9944c2cccbf57a9f383470cf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OMFS_FS_H
 #define _OMFS_FS_H
 
index a9d6a968fe6de9c1f00e5e4f6273c1820b8c9f29..9b6c50bb173b890284951ab010ea19cb22dacd54 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ORANGEFS filesystem.
 #
index 9108ef433e6d7b09721360a4dc3c1e7f4f2caf3b..c2d8233b1e826cc99abb615d55c1b590bc89d0b8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 5355efba4bc8c13f4e2ac2f5a7dfe7a6a6284225..ae782df5c063e460918b149136dd396ad49d51b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 2826859bdc2cb12149c1eed219ec65a1f01ad5d9..ded456f17de611c33aee001deab8729bfdfbabfe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index d327cbd17756dcbc18ca787602e436c24e70d198..a8cc588d6224f3b48c2e9be7f7881612889ef2bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2017 Omnibond Systems, L.L.C.
  */
index 163001c9550184feff1255364a3b59a61de1ecf9..ea2332e16af999666a82ebaa6eb5b677ff03957f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 336ecbf8c2683a80b5a8a7b96a7fabe1e6a012b5..e4a8e6a7eb17b6aaa4b0ab5bf34e16b514c0ea82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 9428ea0aac16d32e14fa74501ad470b5eab1ffda..28825a5b6d098f5fbfad1741e0476f7601f41a56 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 478e88bd7f9d3d3d79e4f8edf76d4df5a5acc395..7e9e5d0ea3bc24a9b8f270497c3319a1f5bd0848 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 7ef473f3d64286d8d9e32ddf636bc955bee27b31..59f444dced9bcc6edf2297874e21b64cb65d6556 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 71f64f4057b5943e03a8935860a4c76f8d465d67..c2c3c5a0eeab41e625633d462c257ccd571193a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index aa3830b741c78d9e14459895413600233e5796f4..3b6982bf6bcf3ecd64f36fa118d4ec551f080acf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 387db17cde2bba314256175a82d1fd2195c805d1..b6001bb28f5a94f6d86a17a76b3245525748be9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 5f59917fd631ca8ed3952bd02ac86d4b2a0de8fb..1c59dff530dee5d10eadcb671798367ee40e173b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * What:               /sys/kernel/debug/orangefs/debug-help
  * Date:               June 2015
index 803517269ba6594e9dda7bfdd49e53dc165191b6..b5fd9cd4960f413bd234aaa59ab78fa95dd709b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 int orangefs_debugfs_init(int);
 void orangefs_debugfs_cleanup(void);
 int orangefs_client_debug_init(void);
index efe08c763e566bffc500439645757966c65cc93c..dc6609824965e2082379c3418f36537464a62d59 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index ea0ce507a6ab641d17c1983b898fb2f12a2d0ed2..004af348fb80ec5204a662b5787dfddec3aff153 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index afd2f523b2837988ae30975c231d83a21869c533..079a465796f3ef95e318b3929b83fab005f42df7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Documentation/ABI/stable/orangefs-sysfs:
  *
index aab6f1842963d3d0e5891900f46fc9eb570e9a4f..f82336496311c532c3150f1e85b1caf59de03abb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 48bcc1bbe415f1a4f2394fb1b72ab704b2d0a1d3..e0bf5e4dce0da164ed046fc7aa3915ecef58a1e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/spinlock_types.h>
index 47f3fb9cbec405855289679272405a8302575919..47ebd9bfd1a1be6c638261c4167d530cd5cb3b2a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 02b1bbdbcc42feef7e88af3b6cf5bdb4ff2dba66..d856cdf917634cd97abdec56bd5daab45a6f7d9a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index b8249f8fdd8027b8552e4b019203b4ea2dd6ea2a..16118452aa123d0952da4e41f1bfc267458072a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index 61e2ca7fec553d3a694cf80d5e7083da98853015..835c6e148afccbb75105d221f8d3034159b20b52 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  * (C) 2011 Omnibond Systems
index 81ac88bb91ff9fc6d0d77dc555b8142c86a8040d..03bcb871544dc8414b17761416166e89f4f678a6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * (C) 2001 Clemson University and The University of Chicago
  *
index aad97b30d5e657199f741f02700208c41e5424ae..c441f9387a1ba0f2ddf1f1426a114a5533fb6e30 100644 (file)
@@ -561,10 +561,8 @@ static int ovl_do_copy_up(struct ovl_copy_up_ctx *c)
                c->tmpfile = true;
                err = ovl_copy_up_locked(c);
        } else {
-               err = -EIO;
-               if (lock_rename(c->workdir, c->destdir) != NULL) {
-                       pr_err("overlayfs: failed to lock workdir+upperdir\n");
-               } else {
+               err = ovl_lock_rename_workdir(c->workdir, c->destdir);
+               if (!err) {
                        err = ovl_copy_up_locked(c);
                        unlock_rename(c->workdir, c->destdir);
                }
index 3309b1912241769bba93e2caba483a4e2f57035a..cc961a3bd3bdec34fcace34553f9e8cfb319db25 100644 (file)
@@ -216,26 +216,6 @@ out_unlock:
        return err;
 }
 
-static int ovl_lock_rename_workdir(struct dentry *workdir,
-                                  struct dentry *upperdir)
-{
-       /* Workdir should not be the same as upperdir */
-       if (workdir == upperdir)
-               goto err;
-
-       /* Workdir should not be subdir of upperdir and vice versa */
-       if (lock_rename(workdir, upperdir) != NULL)
-               goto err_unlock;
-
-       return 0;
-
-err_unlock:
-       unlock_rename(workdir, upperdir);
-err:
-       pr_err("overlayfs: failed to lock workdir+upperdir\n");
-       return -EIO;
-}
-
 static struct dentry *ovl_clear_empty(struct dentry *dentry,
                                      struct list_head *list)
 {
index a619addecafcf05713b3a41e7e05a9e0866847a1..321511ed8c4235e102adfe84b98ac17c247eeadb 100644 (file)
@@ -598,18 +598,30 @@ static bool ovl_verify_inode(struct inode *inode, struct dentry *lowerdentry,
        return true;
 }
 
-struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry)
+struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry,
+                           struct dentry *index)
 {
        struct dentry *lowerdentry = ovl_dentry_lower(dentry);
        struct inode *realinode = upperdentry ? d_inode(upperdentry) : NULL;
        struct inode *inode;
+       /* Already indexed or could be indexed on copy up? */
+       bool indexed = (index || (ovl_indexdir(dentry->d_sb) && !upperdentry));
+
+       if (WARN_ON(upperdentry && indexed && !lowerdentry))
+               return ERR_PTR(-EIO);
 
        if (!realinode)
                realinode = d_inode(lowerdentry);
 
-       if (!S_ISDIR(realinode->i_mode) &&
-           (upperdentry || (lowerdentry && ovl_indexdir(dentry->d_sb)))) {
-               struct inode *key = d_inode(lowerdentry ?: upperdentry);
+       /*
+        * Copy up origin (lower) may exist for non-indexed upper, but we must
+        * not use lower as hash key in that case.
+        * Hash inodes that are or could be indexed by origin inode and
+        * non-indexed upper inodes that could be hard linked by upper inode.
+        */
+       if (!S_ISDIR(realinode->i_mode) && (upperdentry || indexed)) {
+               struct inode *key = d_inode(indexed ? lowerdentry :
+                                                     upperdentry);
                unsigned int nlink;
 
                inode = iget5_locked(dentry->d_sb, (unsigned long) key,
index c3addd1114f1f562464370e6d640abd22cd3a3e4..a12dc10bf726351a4a47a75f92b66d3b87043174 100644 (file)
@@ -405,14 +405,13 @@ int ovl_verify_index(struct dentry *index, struct path *lowerstack,
         * be treated as stale (i.e. after unlink of the overlay inode).
         * We don't know the verification rules for directory and whiteout
         * index entries, because they have not been implemented yet, so return
-        * EROFS if those entries are found to avoid corrupting an index that
-        * was created by a newer kernel.
+        * EINVAL if those entries are found to abort the mount to avoid
+        * corrupting an index that was created by a newer kernel.
         */
-       err = -EROFS;
+       err = -EINVAL;
        if (d_is_dir(index) || ovl_is_whiteout(index))
                goto fail;
 
-       err = -EINVAL;
        if (index->d_name.len < sizeof(struct ovl_fh)*2)
                goto fail;
 
@@ -506,6 +505,11 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry,
 
        index = lookup_one_len_unlocked(name.name, ofs->indexdir, name.len);
        if (IS_ERR(index)) {
+               err = PTR_ERR(index);
+               if (err == -ENOENT) {
+                       index = NULL;
+                       goto out;
+               }
                pr_warn_ratelimited("overlayfs: failed inode index lookup (ino=%lu, key=%*s, err=%i);\n"
                                    "overlayfs: mount with '-o index=off' to disable inodes index.\n",
                                    d_inode(origin)->i_ino, name.len, name.name,
@@ -515,18 +519,9 @@ static struct dentry *ovl_lookup_index(struct dentry *dentry,
 
        inode = d_inode(index);
        if (d_is_negative(index)) {
-               if (upper && d_inode(origin)->i_nlink > 1) {
-                       pr_warn_ratelimited("overlayfs: hard link with origin but no index (ino=%lu).\n",
-                                           d_inode(origin)->i_ino);
-                       goto fail;
-               }
-
-               dput(index);
-               index = NULL;
+               goto out_dput;
        } else if (upper && d_inode(upper) != inode) {
-               pr_warn_ratelimited("overlayfs: wrong index found (index=%pd2, ino=%lu, upper ino=%lu).\n",
-                                   index, inode->i_ino, d_inode(upper)->i_ino);
-               goto fail;
+               goto out_dput;
        } else if (ovl_dentry_weird(index) || ovl_is_whiteout(index) ||
                   ((inode->i_mode ^ d_inode(origin)->i_mode) & S_IFMT)) {
                /*
@@ -546,6 +541,11 @@ out:
        kfree(name.name);
        return index;
 
+out_dput:
+       dput(index);
+       index = NULL;
+       goto out;
+
 fail:
        dput(index);
        index = ERR_PTR(-EIO);
@@ -634,6 +634,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
                }
 
                if (d.redirect) {
+                       err = -ENOMEM;
                        upperredirect = kstrdup(d.redirect, GFP_KERNEL);
                        if (!upperredirect)
                                goto out_put_upper;
@@ -708,7 +709,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
                upperdentry = dget(index);
 
        if (upperdentry || ctr) {
-               inode = ovl_get_inode(dentry, upperdentry);
+               inode = ovl_get_inode(dentry, upperdentry, index);
                err = PTR_ERR(inode);
                if (IS_ERR(inode))
                        goto out_free_oe;
index d4e8c1a08fb0f5d7b4c79de7aa88a5211a4996a4..d9a0edd4e57e40c6157613a652d0dffe86335c07 100644 (file)
@@ -235,6 +235,7 @@ bool ovl_inuse_trylock(struct dentry *dentry);
 void ovl_inuse_unlock(struct dentry *dentry);
 int ovl_nlink_start(struct dentry *dentry, bool *locked);
 void ovl_nlink_end(struct dentry *dentry, bool locked);
+int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *upperdir);
 
 static inline bool ovl_is_impuredir(struct dentry *dentry)
 {
@@ -285,7 +286,8 @@ int ovl_update_time(struct inode *inode, struct timespec *ts, int flags);
 bool ovl_is_private_xattr(const char *name);
 
 struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, dev_t rdev);
-struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry);
+struct inode *ovl_get_inode(struct dentry *dentry, struct dentry *upperdentry,
+                           struct dentry *index);
 static inline void ovl_copyattr(struct inode *from, struct inode *to)
 {
        to->i_uid = from->i_uid;
index 878a750986dd799ad17d9acfc3818e93dcf288fa..25d9b5adcd429071537c5edf3185b58a6ab9cd60 100644 (file)
@@ -37,6 +37,9 @@ struct ovl_fs {
        bool noxattr;
        /* sb common to all layers */
        struct super_block *same_sb;
+       /* Did we take the inuse lock? */
+       bool upperdir_locked;
+       bool workdir_locked;
 };
 
 /* private information held for every overlayfs dentry */
index 62e9b22a2077ac2ac9acb382dd5617a34e9e7636..698b74dd750ee6a9fb2586d0f8d42853111e6bd1 100644 (file)
@@ -988,6 +988,7 @@ int ovl_indexdir_cleanup(struct dentry *dentry, struct vfsmount *mnt,
                         struct path *lowerstack, unsigned int numlower)
 {
        int err;
+       struct dentry *index = NULL;
        struct inode *dir = dentry->d_inode;
        struct path path = { .mnt = mnt, .dentry = dentry };
        LIST_HEAD(list);
@@ -1007,8 +1008,6 @@ int ovl_indexdir_cleanup(struct dentry *dentry, struct vfsmount *mnt,
 
        inode_lock_nested(dir, I_MUTEX_PARENT);
        list_for_each_entry(p, &list, l_node) {
-               struct dentry *index;
-
                if (p->name[0] == '.') {
                        if (p->len == 1)
                                continue;
@@ -1018,18 +1017,20 @@ int ovl_indexdir_cleanup(struct dentry *dentry, struct vfsmount *mnt,
                index = lookup_one_len(p->name, dentry, p->len);
                if (IS_ERR(index)) {
                        err = PTR_ERR(index);
+                       index = NULL;
                        break;
                }
                err = ovl_verify_index(index, lowerstack, numlower);
-               if (err) {
-                       if (err == -EROFS)
-                               break;
+               /* Cleanup stale and orphan index entries */
+               if (err && (err == -ESTALE || err == -ENOENT))
                        err = ovl_cleanup(dir, index);
-                       if (err)
-                               break;
-               }
+               if (err)
+                       break;
+
                dput(index);
+               index = NULL;
        }
+       dput(index);
        inode_unlock(dir);
 out:
        ovl_cache_free(&list);
index fd5ea4facc622f80861f1495d93b148ecde2a003..f5738e96a052fe06c892923b69cd4708d8b24f70 100644 (file)
@@ -174,6 +174,9 @@ static struct inode *ovl_alloc_inode(struct super_block *sb)
 {
        struct ovl_inode *oi = kmem_cache_alloc(ovl_inode_cachep, GFP_KERNEL);
 
+       if (!oi)
+               return NULL;
+
        oi->cache = NULL;
        oi->redirect = NULL;
        oi->version = 0;
@@ -211,9 +214,10 @@ static void ovl_put_super(struct super_block *sb)
 
        dput(ufs->indexdir);
        dput(ufs->workdir);
-       ovl_inuse_unlock(ufs->workbasedir);
+       if (ufs->workdir_locked)
+               ovl_inuse_unlock(ufs->workbasedir);
        dput(ufs->workbasedir);
-       if (ufs->upper_mnt)
+       if (ufs->upper_mnt && ufs->upperdir_locked)
                ovl_inuse_unlock(ufs->upper_mnt->mnt_root);
        mntput(ufs->upper_mnt);
        for (i = 0; i < ufs->numlower; i++)
@@ -881,9 +885,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
                        goto out_put_upperpath;
 
                err = -EBUSY;
-               if (!ovl_inuse_trylock(upperpath.dentry)) {
-                       pr_err("overlayfs: upperdir is in-use by another mount\n");
+               if (ovl_inuse_trylock(upperpath.dentry)) {
+                       ufs->upperdir_locked = true;
+               } else if (ufs->config.index) {
+                       pr_err("overlayfs: upperdir is in-use by another mount, mount with '-o index=off' to override exclusive upperdir protection.\n");
                        goto out_put_upperpath;
+               } else {
+                       pr_warn("overlayfs: upperdir is in-use by another mount, accessing files from both mounts will result in undefined behavior.\n");
                }
 
                err = ovl_mount_dir(ufs->config.workdir, &workpath);
@@ -901,9 +909,13 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
                }
 
                err = -EBUSY;
-               if (!ovl_inuse_trylock(workpath.dentry)) {
-                       pr_err("overlayfs: workdir is in-use by another mount\n");
+               if (ovl_inuse_trylock(workpath.dentry)) {
+                       ufs->workdir_locked = true;
+               } else if (ufs->config.index) {
+                       pr_err("overlayfs: workdir is in-use by another mount, mount with '-o index=off' to override exclusive workdir protection.\n");
                        goto out_put_workpath;
+               } else {
+                       pr_warn("overlayfs: workdir is in-use by another mount, accessing files from both mounts will result in undefined behavior.\n");
                }
 
                ufs->workbasedir = workpath.dentry;
@@ -1156,11 +1168,13 @@ out_put_lowerpath:
 out_free_lowertmp:
        kfree(lowertmp);
 out_unlock_workdentry:
-       ovl_inuse_unlock(workpath.dentry);
+       if (ufs->workdir_locked)
+               ovl_inuse_unlock(workpath.dentry);
 out_put_workpath:
        path_put(&workpath);
 out_unlock_upperdentry:
-       ovl_inuse_unlock(upperpath.dentry);
+       if (ufs->upperdir_locked)
+               ovl_inuse_unlock(upperpath.dentry);
 out_put_upperpath:
        path_put(&upperpath);
 out_free_config:
index 117794582f9fa597d34d8843aa8bdfb7a99cbe76..b9b239fa5cfd28d18b120696d05e817330e44241 100644 (file)
@@ -430,7 +430,7 @@ void ovl_inuse_unlock(struct dentry *dentry)
        }
 }
 
-/* Called must hold OVL_I(inode)->oi_lock */
+/* Caller must hold OVL_I(inode)->lock */
 static void ovl_cleanup_index(struct dentry *dentry)
 {
        struct inode *dir = ovl_indexdir(dentry->d_sb)->d_inode;
@@ -469,6 +469,9 @@ static void ovl_cleanup_index(struct dentry *dentry)
        err = PTR_ERR(index);
        if (!IS_ERR(index))
                err = ovl_cleanup(dir, index);
+       else
+               index = NULL;
+
        inode_unlock(dir);
        if (err)
                goto fail;
@@ -557,3 +560,22 @@ void ovl_nlink_end(struct dentry *dentry, bool locked)
                mutex_unlock(&OVL_I(d_inode(dentry))->lock);
        }
 }
+
+int ovl_lock_rename_workdir(struct dentry *workdir, struct dentry *upperdir)
+{
+       /* Workdir should not be the same as upperdir */
+       if (workdir == upperdir)
+               goto err;
+
+       /* Workdir should not be subdir of upperdir and vice versa */
+       if (lock_rename(workdir, upperdir) != NULL)
+               goto err_unlock;
+
+       return 0;
+
+err_unlock:
+       unlock_rename(workdir, upperdir);
+err:
+       pr_err("overlayfs: failed to lock workdir+upperdir\n");
+       return -EIO;
+}
index 97e5be897753ef61c67b3534205f9839b715942e..349c9d56d4b34a0b307c5ef5b3fdc552ae030b0c 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/pipe.c
  *
index 12c6922c913c4519255c54f5cb1f92fc3f5d8901..f7456c4e7d0f1810c6c541adf577252c93d85656 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux proc filesystem routines.
 #
index 88c355574aa0afe3b1a62b371b048af8d948070e..9390032a11e13d559b0fbc9accbee25bdff38b30 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/proc/array.c
  *
@@ -62,6 +63,7 @@
 #include <linux/mman.h>
 #include <linux/sched/mm.h>
 #include <linux/sched/numa_balancing.h>
+#include <linux/sched/task_stack.h>
 #include <linux/sched/task.h>
 #include <linux/sched/cputime.h>
 #include <linux/proc_fs.h>
@@ -118,30 +120,25 @@ static inline void task_name(struct seq_file *m, struct task_struct *p)
  * simple bit tests.
  */
 static const char * const task_state_array[] = {
-       "R (running)",          /*   0 */
-       "S (sleeping)",         /*   1 */
-       "D (disk sleep)",       /*   2 */
-       "T (stopped)",          /*   4 */
-       "t (tracing stop)",     /*   8 */
-       "X (dead)",             /*  16 */
-       "Z (zombie)",           /*  32 */
+
+       /* states in TASK_REPORT: */
+       "R (running)",          /* 0x00 */
+       "S (sleeping)",         /* 0x01 */
+       "D (disk sleep)",       /* 0x02 */
+       "T (stopped)",          /* 0x04 */
+       "t (tracing stop)",     /* 0x08 */
+       "X (dead)",             /* 0x10 */
+       "Z (zombie)",           /* 0x20 */
+       "P (parked)",           /* 0x40 */
+
+       /* states beyond TASK_REPORT: */
+       "I (idle)",             /* 0x80 */
 };
 
 static inline const char *get_task_state(struct task_struct *tsk)
 {
-       unsigned int state = (tsk->state | tsk->exit_state) & TASK_REPORT;
-
-       /*
-        * Parked tasks do not run; they sit in __kthread_parkme().
-        * Without this check, we would report them as running, which is
-        * clearly wrong, so we report them as sleeping instead.
-        */
-       if (tsk->state == TASK_PARKED)
-               state = TASK_INTERRUPTIBLE;
-
-       BUILD_BUG_ON(1 + ilog2(TASK_REPORT) != ARRAY_SIZE(task_state_array)-1);
-
-       return task_state_array[fls(state)];
+       BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != ARRAY_SIZE(task_state_array));
+       return task_state_array[__get_task_state(tsk)];
 }
 
 static inline int get_task_umask(struct task_struct *tsk)
@@ -421,7 +418,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
                 * esp and eip are intentionally zeroed out.  There is no
                 * non-racy way to read them without freezing the task.
                 * Programs that need reliable values can use ptrace(2).
+                *
+                * The only exception is if the task is core dumping because
+                * a program is not able to use ptrace(2) in that case. It is
+                * safe because the task has stopped executing permanently.
                 */
+               if (permitted && (task->flags & PF_DUMPCORE)) {
+                       eip = KSTK_EIP(task);
+                       esp = KSTK_ESP(task);
+               }
        }
 
        get_task_comm(tcomm, task);
index ad3b0762cc3e952bf7c8c7bd717d186d93c21376..9d357b2ea6cb59af34af699cb46689464aef419e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/proc/base.c
  *
index cbd82dff7e81aeecadacb219ba96ec01ae4f5202..403cbb12a6e9b428fb56f0767492a0dd3acde536 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
index 06f4d31e0396dfe4d2187c1a70f62aa8401e1d0e..e0f867cd855375ce42c0fae37518d941e36c9236 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
index e5709343feb7fb63a22c3bb6897c9d8d02f2aee6..2c7f22b14489c7fe65ceb09602048191248558e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
index c330495c3115ed24162846f93e3da382e0757945..96fc70225e54437922399a2410cb5a6f1da56458 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched/signal.h>
 #include <linux/errno.h>
 #include <linux/dcache.h>
index 46dafadd0083a5b59fe7c7a5bc6c8d33282a74be..f371a602bf5856d7381ded1d3bbe91f00e2634c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PROCFS_FD_H__
 #define __PROCFS_FD_H__
 
index e250910cffc8fd54af942e8009da413ce76093ac..225f541f7078c937c6a4c25264069700025a0582 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/proc/inode.c
  *
index a352d5703b4196112c9e581905ef467f28d4f133..6a6bee9c603cfdb82fa90094e24e29aafb26def6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
index 45629f4b54021e14a11e858fe02c9b7fb6b0bdb4..4bc85cb8be6a2f119520b6f8e279604074420eca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     fs/proc/kcore.c kernel ELF core dumper
  *
index f9387bb7631b032a32dfe6472260c350165a52f3..e0f8774acd658a9ea084fded8ce265a2f1efa36f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/proc/kmsg.c
  *
index 983fce5c24183dc658115371cc19e3d25fec411f..9bc5c58c00ee7a97964482ccd0ad78fd73a4406c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/pid_namespace.h>
index cdd979724c7412387f00cf2123965d8998d62c3e..6bb20f8642590f72163adc591831754f8b34a961 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index 3803b24ca220a4dc6cd02b4637e7576a071a9f98..59b17e509f4633c31d86fa34425838bc390a6a88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/proc_fs.h>
 #include <linux/nsproxy.h>
 #include <linux/ptrace.h>
index 2726536489b19a30394226a27e7a0183690e6b4c..1491918a33c385394fcaf06ef07dcd7751832c82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bootmem.h>
 #include <linux/compiler.h>
 #include <linux/fs.h>
index 8f479229b349d3f629884b51864279f31593bee8..c5cbbdff3c3d683df9b651c457e54cc6ab14f6c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * /proc/sys support
  */
index 901bd06f437d8607eb81fe06df0eb3a875455bb4..2da657848cfc619cd3268bdafb143a48902252ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * proc_tty.c -- handles /proc/tty
  *
index 926fb27f4ca26cb27c17c2a3d9eed9b9e32fc639..4e42aba97f2e3ed694aa5df146ecbf949c0b3f68 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/proc/root.c
  *
index 39857f6db5cfd85c5ae4dff31b85f2739d783648..31326bb23b8b472d9b69990e0c99c68c3f2ca33b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/pid_namespace.h>
index ad8a77f94beb0210311b1f8d2af0cbeee6093201..24072cc06e65451164a631bfbc7a97b86e06e646 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
 #include <linux/proc_fs.h>
index bd4e55f4aa20b2b4b4ff2f89705749dc7673106e..59749dfaef6743c270a00fdee97e378929a03899 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cpumask.h>
 #include <linux/fs.h>
 #include <linux/init.h>
index 5589b4bd4b858fa5369728f0a0a2b90b4a3052ae..6744bd706ecf018f0db0a3e335449945b523ea74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/vmacache.h>
 #include <linux/hugetlb.h>
@@ -1310,13 +1311,15 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
                pmd_t pmd = *pmdp;
                struct page *page = NULL;
 
-               if ((vma->vm_flags & VM_SOFTDIRTY) || pmd_soft_dirty(pmd))
+               if (vma->vm_flags & VM_SOFTDIRTY)
                        flags |= PM_SOFT_DIRTY;
 
                if (pmd_present(pmd)) {
                        page = pmd_page(pmd);
 
                        flags |= PM_PRESENT;
+                       if (pmd_soft_dirty(pmd))
+                               flags |= PM_SOFT_DIRTY;
                        if (pm->show_pfn)
                                frame = pmd_pfn(pmd) +
                                        ((addr & ~PMD_MASK) >> PAGE_SHIFT);
@@ -1328,6 +1331,8 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
                        frame = swp_type(entry) |
                                (swp_offset(entry) << MAX_SWAPFILES_SHIFT);
                        flags |= PM_SWAP;
+                       if (pmd_swp_soft_dirty(pmd))
+                               flags |= PM_SOFT_DIRTY;
                        VM_BUG_ON(!is_pmd_migration_entry(pmd));
                        page = migration_entry_to_page(entry);
                }
index b00b766098fa388d56d19502b11b358da19a0865..5b62f57bd9bceed80b386057b93fbce3a43602b3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/mm.h>
 #include <linux/file.h>
index 20614b62a9b793cd357b76f1eba97ab9218f89e7..b813e3b529f266696d45670766ef97203806f090 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/pid_namespace.h>
index 7981c4ffe787a6afb80ae5a3017cef39f744c984..95a708d8372126f41106a9e0cdbe9e0cf973a36d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
index d2154eb6d78faa593ed72ee176eadb89d7df3f4c..94901e8e700dd579c38932aabf18dbd343c42229 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index 99dff222fe67a1173d753b63f8badec4c71b55d1..7626ee11b06c67edac5d9c021516ff6ea3390b98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * fs/proc_namespace.c - handling of /proc/<pid>/{mounts,mountinfo,mountstats}
  *
index b8803cc07fce72ce06d96b286e6927a0f00aba7f..967b5891f325d487dcd24b7249dd3b28e60bc89c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux pstorefs routines.
 #
index 7f4e48c8d1884dc122834193969f77761abc7676..c029314478fad020a46e27562ee5936d0e3b407b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PSTORE_INTERNAL_H__
 #define __PSTORE_INTERNAL_H__
 
index 76a7a697b778d7918e5db75bf5a1dd744a073a5d..163afc4ba4b2e2225485b128bb0e3647d4d69e63 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * QNX4 file system, Linux implementation.
  *
index 781056a0480f442942b69b85712ed7d697607f41..a6ee23aadd2837829037a61beb22bfa24e99c50c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * QNX4 file system, Linux implementation.
  *
index e62c8183777a73fb3b74f35d61f5821807b442c0..eca27878079dfe9535ddf4765909390be5830eab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* 
  * QNX4 file system, Linux implementation.
  * 
index c9b1be2c164dd9339b94cddd2a9d21ad2abd7577..6283705466a4af8f101d4c2a24e8b723f8991e8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fs.h>
 #include <linux/qnx4_fs.h>
 
index 27637e0bdc9f19e28005a7478049a376ebd20632..c1cfb8a19e9d707d2bdd0bec194ee35120ec38e0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * QNX6 file system, Linux implementation.
  *
index 6c1a323137dda33fb798c10ca3ef42ffee2460c3..72c2770830be886fe14d0e4d99bed070daaa2182 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * QNX6 file system, Linux implementation.
  *
index f23b5c4a66ad753b8299f5e463bcd1965cfd4de6..34a6b126a3a98338e1504b1b1ce2b6969294b0b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * QNX6 file system, Linux implementation.
  *
index 62aaf3e3126a6c18bb45abf5c48040393223b178..d282c2c7340479e2208e194502dd5bc4a136904b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * QNX6 file system, Linux implementation.
  *
index c66c37cdaa396ea860cdee00f17d4148887c078b..f2b49d0f0287c95e3481a2d5f566b5f925f694c1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_QUOTA)            += dquot.o
 obj-$(CONFIG_QFMT_V1)          += quota_v1.o
 obj-$(CONFIG_QFMT_V2)          += quota_v2.o
index fb1892fe3e56ca12cb3ae9e83bbc180659c3349e..779caed4f078dfbfdd5a705e215dae3342ebefdc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/syscalls.h>
 #include <linux/compat.h>
index 8381db9db6d9bcc3acfa645bf9f73cbb5933c564..9f78b5015f2ec3828f2440500deedb662d0cbd61 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the diskquota system for the LINUX operating system. QUOTA
  * is implemented using the BSD system call interface as the means of
@@ -1297,21 +1298,18 @@ static int dquot_add_space(struct dquot *dquot, qsize_t space,
        spin_lock(&dquot->dq_dqb_lock);
        if (!sb_has_quota_limits_enabled(sb, dquot->dq_id.type) ||
            test_bit(DQ_FAKE_B, &dquot->dq_flags))
-               goto add;
+               goto finish;
 
        tspace = dquot->dq_dqb.dqb_curspace + dquot->dq_dqb.dqb_rsvspace
                + space + rsv_space;
 
-       if (flags & DQUOT_SPACE_NOFAIL)
-               goto add;
-
        if (dquot->dq_dqb.dqb_bhardlimit &&
            tspace > dquot->dq_dqb.dqb_bhardlimit &&
             !ignore_hardlimit(dquot)) {
                if (flags & DQUOT_SPACE_WARN)
                        prepare_warning(warn, dquot, QUOTA_NL_BHARDWARN);
                ret = -EDQUOT;
-               goto out;
+               goto finish;
        }
 
        if (dquot->dq_dqb.dqb_bsoftlimit &&
@@ -1322,7 +1320,7 @@ static int dquot_add_space(struct dquot *dquot, qsize_t space,
                if (flags & DQUOT_SPACE_WARN)
                        prepare_warning(warn, dquot, QUOTA_NL_BSOFTLONGWARN);
                ret = -EDQUOT;
-               goto out;
+               goto finish;
        }
 
        if (dquot->dq_dqb.dqb_bsoftlimit &&
@@ -1338,13 +1336,21 @@ static int dquot_add_space(struct dquot *dquot, qsize_t space,
                         * be always printed
                         */
                        ret = -EDQUOT;
-                       goto out;
+                       goto finish;
                }
        }
-add:
-       dquot->dq_dqb.dqb_rsvspace += rsv_space;
-       dquot->dq_dqb.dqb_curspace += space;
-out:
+finish:
+       /*
+        * We have to be careful and go through warning generation & grace time
+        * setting even if DQUOT_SPACE_NOFAIL is set. That's why we check it
+        * only here...
+        */
+       if (flags & DQUOT_SPACE_NOFAIL)
+               ret = 0;
+       if (!ret) {
+               dquot->dq_dqb.dqb_rsvspace += rsv_space;
+               dquot->dq_dqb.dqb_curspace += space;
+       }
        spin_unlock(&dquot->dq_dqb_lock);
        return ret;
 }
@@ -1980,7 +1986,9 @@ int __dquot_transfer(struct inode *inode, struct dquot **transfer_to)
                ret = dquot_add_space(transfer_to[cnt], cur_space, rsv_space, 0,
                                      &warn_to[cnt]);
                if (ret) {
+                       spin_lock(&transfer_to[cnt]->dq_dqb_lock);
                        dquot_decr_inodes(transfer_to[cnt], inode_usage);
+                       spin_unlock(&transfer_to[cnt]->dq_dqb_lock);
                        goto over_quota;
                }
        }
index ebc5e62858007d8f9ed6acee5f6aef2afb28c9c0..f814fa90af38220a26d8cf7dd3b3464e4a5c9336 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
 #include <linux/quota.h>
 #include <linux/export.h>
index e99b1a72d9a7348abd9d59a37d661ec335bfe73b..95acdae391b47ec3a5b8763350a85cf18bad3a99 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cred.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index a9c5dfe6b83e5ef6f17f6adeb3662e65a97f1b2b..43612e2a73af8c7d334dabe6278f6e427c916f42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Quota code necessary even when VFS quota support is not compiled
  * into the kernel.  The interesting stuff is over in dquot.c, here
index a1ab8db81a511b52c5471a7959493251eba88750..31cf27e0e9e0f8c89f32270379fee37c6007c3ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Definitions of structures for vfsv0 quota format
  */
index c0187cda2c1ed3ff65b449a74aa71c05ca29eb58..a73e5b34db4181272bc943c4e0ea406797ff0311 100644 (file)
@@ -328,12 +328,16 @@ static int v2_write_dquot(struct dquot *dquot)
        if (!dquot->dq_off) {
                alloc = true;
                down_write(&dqopt->dqio_sem);
+       } else {
+               down_read(&dqopt->dqio_sem);
        }
        ret = qtree_write_dquot(
                        sb_dqinfo(dquot->dq_sb, dquot->dq_id.type)->dqi_priv,
                        dquot);
        if (alloc)
                up_write(&dqopt->dqio_sem);
+       else
+               up_read(&dqopt->dqio_sem);
        return ret;
 }
 
index 746654b5de70afa3f89ff224fe631bd6016bfabe..bd11e2c08119a586519bdc350c9887fef5615f0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_QUOTAIO_V1_H
 #define _LINUX_QUOTAIO_V1_H
 
index 4e95430093d9959f271b970e645c1911152a7886..43cf0f0e29021e02a86c2fcff76b1c26ee1c26e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Definitions of structures for vfsv0 quota format
  */
index a2b9a47235c5ba48b4db2bf81d03c1579b562f79..0046d72efe94667619b8d6016abb087364ceb8d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/read_write.c
  *
@@ -112,7 +113,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
                 * In the generic case the entire file is data, so as long as
                 * offset isn't at the end of the file then the offset is data.
                 */
-               if (offset >= eof)
+               if ((unsigned long long)offset >= eof)
                        return -ENXIO;
                break;
        case SEEK_HOLE:
@@ -120,7 +121,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence,
                 * There is a virtual hole at the end of the file, so as long as
                 * offset isn't i_size or larger, return i_size.
                 */
-               if (offset >= eof)
+               if ((unsigned long long)offset >= eof)
                        return -ENXIO;
                offset = eof;
                break;
index 89659549c09d81b42d26aef337f62c93ca4c1379..d336db65a33eaa4124a741e89fbbbee6b849850f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/readdir.c
  *
index 3c3b00165114c8023d4e8e98c1cafb9474095039..a39a562c1c101b48dba40bea2f5ac24dba07460e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux reiser-filesystem routines.
 #
index 4a211f5b34b81f00dc123c251a3adc7aff9dcf93..0c1c847f992f7d154be29a5ce733cdc16dedd1e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/init.h>
 #include <linux/posix_acl.h>
 
index f59c667df15b4cf357e20080833d5da0b19f6851..69ff280bdfe889a77afac56a24ed6d51ad668aad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Write ahead logging implementation copyright Chris Mason 2000
  *
index 045b83ef9fd9d42264fd55af61775abd62843807..46bd7bd63a71aae9a5dc6ae1136f8d8690f2819a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "reiserfs.h"
 #include <linux/mutex.h>
 
index 1d34377fef97624e2ca695b4a552f01e94e84712..48835a659948f1367b1d2ad9cf71b3dc51a73ae0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 1996, 1997, 1998 Hans Reiser, see reiserfs/README for
  * licensing and copyright details
index 2d5489b0a2693a007dee760995e10cd8f1e7daef..b0ae088dffc76dfb2c350b35bf6b0591209f2fd5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 1999 Hans Reiser, see reiserfs/README for licensing and copyright
  * details
index e87aa21c30de055539b2858f97773d66fb6006f9..46492fb37a4c6a44194f171fdab768acbbd17f06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/reiserfs/xattr.c
  *
index 613ff5aef94ea014caa87d52ae8c03d9c88e5bdd..c764352447ba1b1ccf91d05dcbb754901f824a0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/reiserfs_xattr.h>
 #include <linux/init.h>
 #include <linux/list.h>
index 54415f0e3d1868601ab08a6ff49d2fb29cdfb2da..aa9380bac196321a1a3020ace76c0fe27fdda614 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/capability.h>
 #include <linux/fs.h>
 #include <linux/posix_acl.h>
index e4cbb7719906308a461b1a93b307201eca3faad3..20be9a0e5870e5c8e2ee9f6bebca804e961446bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "reiserfs.h"
 #include <linux/errno.h>
 #include <linux/fs.h>
index f15a5f9e84ce1a83e2052b7852a21bff727f105c..5ed48da3d02b5f2f03f2facb8c4be7cc788e15f3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "reiserfs.h"
 #include <linux/capability.h>
 #include <linux/errno.h>
index dc59df43b2dbfb2dab5729a69d5ac302e0873ed3..a573ca45bacc7ff3443e67ad83efe6a7ce77df05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "reiserfs.h"
 #include <linux/errno.h>
 #include <linux/fs.h>
index 420beb7d495cdcbedf917815a85ff905bf5b785f..844928f1571160abed9d5aff54152b5508eaf7be 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux RomFS filesystem routines.
 #
index c6362e38ae92dcfafd76f2b10541cb9e4464e230..063067e606ca76bc2cedb098fe774a14d1cd6c9b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains the procedures for the handling of select and poll
  *
index dc7c2be963ed4e2c2751313a44270b7655a45b4d..4be761c1a03d1f1dee3fb024a36c45e56df909af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/seq_file.c
  *
index d2c434112f4265fec495a1b622c04e59be1e8b58..1c667af86da52f8aa2ad5820b64997f884193604 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/signalfd.c
  *
index 6655631c53ae78573c3f88d14d6f60d134ed1639..7bd9b8b856d0bf61f49358625eb26b2912c92fc8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux squashfs routines.
 #
index 8a6aa8caf8917fea570ff861c1247ac5f8a519e3..873785dae022d9607ccb7b44fb56ea055a870283 100644 (file)
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/stat.c
  *
index fab9b6a3c116c145115fa230a5848e6d9eb81bb1..c25dd9a26cc1c7c3810c398c1b4bc70e27a6d1d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/syscalls.h>
 #include <linux/export.h>
 #include <linux/fs.h>
index 166c4ee0d0ed02a00591c9b00cdb69eb8759ca61..994db21f59bf58d3f83d750f8524d1c35849706b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/super.c
  *
index a576aa2e6b0902662814476fa20d9551e432d930..83ac79a960dd1aea9aa79932bbb08de662e7abab 100644 (file)
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * High-level sync()-related operations
  */
index 862c1f74a5834d687e3acdd4a93df0825082784c..0e69dbdf7277feccbb8542823ff5641e68028b3a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/balloc.c
  *
index f5191cb2c947a3abdc4e77d0ee84ade3a15d133c..88e38cd8f5c9ae435979a71c367d22f65de26759 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/dir.c
  *
index 7ba997e31aeb9bfb3f0474dd55933061c63e11df..45fc79a18594f1a21f9f5234c280187557ae720a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/file.c
  *
index eb963fbb7903cd2a477c877363ccb0b9d9820633..6c9801986af6d5de4c3c833966608afb514ba7d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/ialloc.c
  *
index 1c8bf9453a71f0c8b802ef61785ec12cba27e53d..3c47b7d5d4cf8e8d38eae5a7ab0484d3132e30e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/inode.c
  *
index 83809f5b5eca25427a5d52abde54ba2a76121ede..bcb67b0cabe7e5b99561610106fe383066925d9e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/itree.c
  *
index d8817f13976357232a21a1ead9577c68b8c4b117..250b0755b9085378997767740afffafbfcbbe174 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/sysv/namei.c
  *
index 1e7e27c729affb80b6d4eee02c295df7e59ebfc5..e913698779c0b517b8449795266e14884f718888 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SYSV_H
 #define _SYSV_H
 
index ece0c02d7e63a434cffbc16de66321fc0d43f3b6..040612ec9598310dfec5a706c3d2312da8eb3f12 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  fs/timerfd.c
  *
index 6f3251c2bf088e7bd205662277e1a49b8471751b..9758f709c73612dd59244817e7c4fae4dcb8335d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_UBIFS_FS) += ubifs.o
 
 ubifs-y += shrinker.o journal.o file.o dir.o super.o sb.o io.o
index 114ba455bac3d0ee11208c5af44749d5df3864f2..16a5d5c82073cc38a132c98e392788e3c6db74b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "ubifs.h"
 
 static int ubifs_crypt_get_context(struct inode *inode, void *ctx, size_t len)
index 486a2844949ff2cc34a1c2d6692c8fa04223742f..586fd5b578a766f3f56c81e2f06738e1a9dd9489 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include "ubifs.h"
 
index b1b9a63d8cf3e603754fa21e0037854ea5c8b630..630426ffb775b1a95bf5c57ca0d32bce21a63c1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UDF_I_H
 #define _UDF_I_H
 
index c13875d669c0f45722c5f138a5fa34786f2b3d75..68c9f1d618f5b3ee4a00dd44a9876b098b1b2498 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_UDF_SB_H
 #define __LINUX_UDF_SB_H
 
index 63b0349843787a403bdfc25feb1f2d761603de62..fa206558128db9c1b9f31bf4c52755a61b07e081 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UDF_DECL_H
 #define __UDF_DECL_H
 
index 6a9f3a9cc4281adf8f7ff6498ee6a38c3b04e565..a4363ac2cfeb89ee118f3425bd27501919f5434c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UDF_ENDIAN_H
 #define __UDF_ENDIAN_H
 
index f80be4c5df9d13b7009602dd5be2f4c58a5de1ac..b5cd79065ef9a84d72aa427252d81a0edd0abb2d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/balloc.c
  *
index b4676322ddb65830d69b74a014c78668eb24a90f..1abe5454de479ddb2af40515eab0506f854b2e6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/cylinder.c
  *
index 48609f1d95803742656b74933fb6490548144354..2edc1755b7c5dec73028ad04d5bbffff802d9f5a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/ufs_dir.c
  *
index 042ddbf110ccf65254c82bcb834c63916c941d81..7e087581be7e0c455923706499408766eb9deeb6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/file.c
  *
index d1dd8cc33179137988aedf9bb15098547906a561..916b4a4289334f277d481020ef51c8c7f17a11b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/ialloc.c
  *
index f36d6a53687d13fd817f65f99913a54d425e8048..afb601c0dda0b1c18e9b4e2947749be451d55bf0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/inode.c
  *
index 8eca4eda8450a1bec00f80ea30964ea5c51f8286..32545cd00cebf0fb50a403a7275efc194ef6bb4f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/fs/ufs/namei.c
  *
index 8d974c4fd18b1eea45ddc849803f01904f7b8abb..a0e1d8c827f43b4a8a3978d5ec3bc37f75c744c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/ufs/swab.h
  *
index c87f4c3fa9ddd87849403a58e817a63ebf441cf1..b49e0efdf3d7b7bbed2e18a75c982af99c2a9f3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UFS_UFS_H
 #define _UFS_UFS_H 1
 
index 150eef6f12331a034dab0c48bee530fdc73c821e..ef9ead44776a70fee61c52310205b50ac799292c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/ufs_fs.h
  *
index 02497a492eb25085fc7fcefc446ad0e9cd0f967a..4fa633f842749d533b098420eb5dd9b6ba66e77c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/fs/ufs/util.c
  *
index 9fc7119a1551f8ff82a02e9d89d05d6e60024c55..1907be6d580855bf595f169ea82e7abca2d7df76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/fs/ufs/util.h
  *
index ef4b48d1ea4270f59f46e29ae898a48cdb0c8aa6..1c713fd5b3e67966c3d998979d2c30eb8e14ba07 100644 (file)
@@ -588,6 +588,12 @@ static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx,
                        break;
                if (ACCESS_ONCE(ctx->released) ||
                    fatal_signal_pending(current)) {
+                       /*
+                        * &ewq->wq may be queued in fork_event, but
+                        * __remove_wait_queue ignores the head
+                        * parameter. It would be a problem if it
+                        * didn't.
+                        */
                        __remove_wait_queue(&ctx->event_wqh, &ewq->wq);
                        if (ewq->msg.event == UFFD_EVENT_FORK) {
                                struct userfaultfd_ctx *new;
@@ -1061,6 +1067,12 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait,
                                        (unsigned long)
                                        uwq->msg.arg.reserved.reserved1;
                                list_move(&uwq->wq.entry, &fork_event);
+                               /*
+                                * fork_nctx can be freed as soon as
+                                * we drop the lock, unless we take a
+                                * reference on it.
+                                */
+                               userfaultfd_ctx_get(fork_nctx);
                                spin_unlock(&ctx->event_wqh.lock);
                                ret = 0;
                                break;
@@ -1091,19 +1103,53 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait,
 
        if (!ret && msg->event == UFFD_EVENT_FORK) {
                ret = resolve_userfault_fork(ctx, fork_nctx, msg);
+               spin_lock(&ctx->event_wqh.lock);
+               if (!list_empty(&fork_event)) {
+                       /*
+                        * The fork thread didn't abort, so we can
+                        * drop the temporary refcount.
+                        */
+                       userfaultfd_ctx_put(fork_nctx);
+
+                       uwq = list_first_entry(&fork_event,
+                                              typeof(*uwq),
+                                              wq.entry);
+                       /*
+                        * If fork_event list wasn't empty and in turn
+                        * the event wasn't already released by fork
+                        * (the event is allocated on fork kernel
+                        * stack), put the event back to its place in
+                        * the event_wq. fork_event head will be freed
+                        * as soon as we return so the event cannot
+                        * stay queued there no matter the current
+                        * "ret" value.
+                        */
+                       list_del(&uwq->wq.entry);
+                       __add_wait_queue(&ctx->event_wqh, &uwq->wq);
 
-               if (!ret) {
-                       spin_lock(&ctx->event_wqh.lock);
-                       if (!list_empty(&fork_event)) {
-                               uwq = list_first_entry(&fork_event,
-                                                      typeof(*uwq),
-                                                      wq.entry);
-                               list_del(&uwq->wq.entry);
-                               __add_wait_queue(&ctx->event_wqh, &uwq->wq);
+                       /*
+                        * Leave the event in the waitqueue and report
+                        * error to userland if we failed to resolve
+                        * the userfault fork.
+                        */
+                       if (likely(!ret))
                                userfaultfd_event_complete(ctx, uwq);
-                       }
-                       spin_unlock(&ctx->event_wqh.lock);
+               } else {
+                       /*
+                        * Here the fork thread aborted and the
+                        * refcount from the fork thread on fork_nctx
+                        * has already been released. We still hold
+                        * the reference we took before releasing the
+                        * lock above. If resolve_userfault_fork
+                        * failed we've to drop it because the
+                        * fork_nctx has to be freed in such case. If
+                        * it succeeded we'll hold it because the new
+                        * uffd references it.
+                        */
+                       if (ret)
+                               userfaultfd_ctx_put(fork_nctx);
                }
+               spin_unlock(&ctx->event_wqh.lock);
        }
 
        return ret;
index 51edb9f9507c409269dd8722a6c49303ef926f84..e4b3d7c2c9f55182049b475117cf3fe2c06e76d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/file.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
index 4424f7fecf14549b65c62d0cac4b8b692718f426..61cd28ba25f364df5af103277924befb6d4a39a0 100644 (file)
@@ -250,7 +250,7 @@ xattr_getsecurity(struct inode *inode, const char *name, void *value,
        }
        memcpy(value, buffer, len);
 out:
-       security_release_secctx(buffer, len);
+       kfree(buffer);
 out_noalloc:
        return len;
 }
index b008ff3250eba4f3884e18841c4c316b7e7cbf50..df3e600835e8de81e69ac295b06fae6fecefd7a4 100644 (file)
@@ -156,7 +156,8 @@ __xfs_ag_resv_free(
        trace_xfs_ag_resv_free(pag, type, 0);
 
        resv = xfs_perag_resv(pag, type);
-       pag->pag_mount->m_ag_max_usable += resv->ar_asked;
+       if (pag->pag_agno == 0)
+               pag->pag_mount->m_ag_max_usable += resv->ar_asked;
        /*
         * AGFL blocks are always considered "free", so whatever
         * was reserved at mount time must be given back at umount.
@@ -216,7 +217,14 @@ __xfs_ag_resv_init(
                return error;
        }
 
-       mp->m_ag_max_usable -= ask;
+       /*
+        * Reduce the maximum per-AG allocation length by however much we're
+        * trying to reserve for an AG.  Since this is a filesystem-wide
+        * counter, we only make the adjustment for AG 0.  This assumes that
+        * there aren't any AGs hungrier for per-AG reservation than AG 0.
+        */
+       if (pag->pag_agno == 0)
+               mp->m_ag_max_usable -= ask;
 
        resv = xfs_perag_resv(pag, type);
        resv->ar_asked = ask;
index 744dcaec34cca98b2de73e4d900894c57b0807a8..f965ce832bc0561acb50a67ce28373fc7fb0b091 100644 (file)
@@ -1584,6 +1584,10 @@ xfs_alloc_ag_vextent_small(
 
                                bp = xfs_btree_get_bufs(args->mp, args->tp,
                                        args->agno, fbno, 0);
+                               if (!bp) {
+                                       error = -EFSCORRUPTED;
+                                       goto error0;
+                               }
                                xfs_trans_binval(args->tp, bp);
                        }
                        args->len = 1;
@@ -2141,6 +2145,10 @@ xfs_alloc_fix_freelist(
                if (error)
                        goto out_agbp_relse;
                bp = xfs_btree_get_bufs(mp, tp, args->agno, bno, 0);
+               if (!bp) {
+                       error = -EFSCORRUPTED;
+                       goto out_agbp_relse;
+               }
                xfs_trans_binval(tp, bp);
        }
 
index 459f4b4f08fe5a1eba6fd725cb3a8866a5876a11..89263797cf3253d905e1e1010625243a0ee9bf23 100644 (file)
@@ -49,7 +49,6 @@
 #include "xfs_rmap.h"
 #include "xfs_ag_resv.h"
 #include "xfs_refcount.h"
-#include "xfs_rmap_btree.h"
 #include "xfs_icache.h"
 
 
@@ -192,12 +191,8 @@ xfs_bmap_worst_indlen(
        int             maxrecs;        /* maximum record count at this level */
        xfs_mount_t     *mp;            /* mount structure */
        xfs_filblks_t   rval;           /* return value */
-       xfs_filblks_t   orig_len;
 
        mp = ip->i_mount;
-
-       /* Calculate the worst-case size of the bmbt. */
-       orig_len = len;
        maxrecs = mp->m_bmap_dmxr[0];
        for (level = 0, rval = 0;
             level < XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK);
@@ -205,20 +200,12 @@ xfs_bmap_worst_indlen(
                len += maxrecs - 1;
                do_div(len, maxrecs);
                rval += len;
-               if (len == 1) {
-                       rval += XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) -
+               if (len == 1)
+                       return rval + XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) -
                                level - 1;
-                       break;
-               }
                if (level == 0)
                        maxrecs = mp->m_bmap_dmxr[1];
        }
-
-       /* Calculate the worst-case size of the rmapbt. */
-       if (xfs_sb_version_hasrmapbt(&mp->m_sb))
-               rval += 1 + xfs_rmapbt_calc_size(mp, orig_len) +
-                               mp->m_rmap_maxlevels;
-
        return rval;
 }
 
@@ -1490,14 +1477,14 @@ xfs_bmap_isaeof(
        int                     is_empty;
        int                     error;
 
-       bma->aeof = 0;
+       bma->aeof = false;
        error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
                                     &is_empty);
        if (error)
                return error;
 
        if (is_empty) {
-               bma->aeof = 1;
+               bma->aeof = true;
                return 0;
        }
 
@@ -3865,6 +3852,17 @@ xfs_trim_extent(
        }
 }
 
+/* trim extent to within eof */
+void
+xfs_trim_extent_eof(
+       struct xfs_bmbt_irec    *irec,
+       struct xfs_inode        *ip)
+
+{
+       xfs_trim_extent(irec, 0, XFS_B_TO_FSB(ip->i_mount,
+                                             i_size_read(VFS_I(ip))));
+}
+
 /*
  * Trim the returned map to the required bounds
  */
index 851982a5dfbc54b347d5836898264f56b3b4f957..502e0d8fb4ff63e125328d31434e3ee1eaa39cbd 100644 (file)
@@ -208,6 +208,7 @@ void        xfs_bmap_trace_exlist(struct xfs_inode *ip, xfs_extnum_t cnt,
 
 void   xfs_trim_extent(struct xfs_bmbt_irec *irec, xfs_fileoff_t bno,
                xfs_filblks_t len);
+void   xfs_trim_extent_eof(struct xfs_bmbt_irec *, struct xfs_inode *);
 int    xfs_bmap_add_attrfork(struct xfs_inode *ip, int size, int rsvd);
 void   xfs_bmap_local_to_extents_empty(struct xfs_inode *ip, int whichfork);
 void   xfs_bmap_add_free(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
index 8211f48b98e6d19c5abfd0f1db13cf8893d93424..999a290cfd722b306c9944a61b8eeb4516f31b86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XFS_CKSUM_H
 #define _XFS_CKSUM_H 1
 
index 988bb3f3144664216bdf6880fd79838785a7b8db..dfd643909f8512be75322a0ebff86ff3b039cb52 100644 (file)
@@ -1962,7 +1962,7 @@ xfs_difree_inobt(
        if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
            rec.ir_free == XFS_INOBT_ALL_FREE &&
            mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
-               xic->deleted = 1;
+               xic->deleted = true;
                xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
                xic->alloc = xfs_inobt_irec_to_allocmask(&rec);
 
@@ -1989,7 +1989,7 @@ xfs_difree_inobt(
 
                xfs_difree_inode_chunk(mp, agno, &rec, dfops);
        } else {
-               xic->deleted = 0;
+               xic->deleted = false;
 
                error = xfs_inobt_update(cur, &rec);
                if (error) {
index 8372e9bcd7b6ba4b8fcc7b9133d5acecef4842e2..71de185735e06c1d44e13e55e30ff1d38b5a62d8 100644 (file)
@@ -270,6 +270,7 @@ typedef struct xfs_inode_log_format {
        uint32_t                ilf_fields;     /* flags for fields logged */
        uint16_t                ilf_asize;      /* size of attr d/ext/root */
        uint16_t                ilf_dsize;      /* size of data/ext/root */
+       uint32_t                ilf_pad;        /* pad for 64 bit boundary */
        uint64_t                ilf_ino;        /* inode number */
        union {
                uint32_t        ilfu_rdev;      /* rdev value for dev inode*/
@@ -280,29 +281,17 @@ typedef struct xfs_inode_log_format {
        int32_t                 ilf_boffset;    /* off of inode in buffer */
 } xfs_inode_log_format_t;
 
-typedef struct xfs_inode_log_format_32 {
-       uint16_t                ilf_type;       /* inode log item type */
-       uint16_t                ilf_size;       /* size of this item */
-       uint32_t                ilf_fields;     /* flags for fields logged */
-       uint16_t                ilf_asize;      /* size of attr d/ext/root */
-       uint16_t                ilf_dsize;      /* size of data/ext/root */
-       uint64_t                ilf_ino;        /* inode number */
-       union {
-               uint32_t        ilfu_rdev;      /* rdev value for dev inode*/
-               uuid_t          ilfu_uuid;      /* mount point value */
-       } ilf_u;
-       int64_t                 ilf_blkno;      /* blkno of inode buffer */
-       int32_t                 ilf_len;        /* len of inode buffer */
-       int32_t                 ilf_boffset;    /* off of inode in buffer */
-} __attribute__((packed)) xfs_inode_log_format_32_t;
-
-typedef struct xfs_inode_log_format_64 {
+/*
+ * Old 32 bit systems will log in this format without the 64 bit
+ * alignment padding. Recovery will detect this and convert it to the
+ * correct format.
+ */
+struct xfs_inode_log_format_32 {
        uint16_t                ilf_type;       /* inode log item type */
        uint16_t                ilf_size;       /* size of this item */
        uint32_t                ilf_fields;     /* flags for fields logged */
        uint16_t                ilf_asize;      /* size of attr d/ext/root */
        uint16_t                ilf_dsize;      /* size of data/ext/root */
-       uint32_t                ilf_pad;        /* pad for 64 bit boundary */
        uint64_t                ilf_ino;        /* inode number */
        union {
                uint32_t        ilfu_rdev;      /* rdev value for dev inode*/
@@ -311,7 +300,7 @@ typedef struct xfs_inode_log_format_64 {
        int64_t                 ilf_blkno;      /* blkno of inode buffer */
        int32_t                 ilf_len;        /* len of inode buffer */
        int32_t                 ilf_boffset;    /* off of inode in buffer */
-} xfs_inode_log_format_64_t;
+} __attribute__((packed));
 
 
 /*
index 7034e17535dee2fbce449e72a4505341234a718e..3354140de07eb8aa2566c6c9254ad85e24a2a4bf 100644 (file)
@@ -247,6 +247,8 @@ xfs_set_mode(struct inode *inode, umode_t mode)
 int
 xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 {
+       umode_t mode;
+       bool set_mode = false;
        int error = 0;
 
        if (!acl)
@@ -257,16 +259,24 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
                return error;
 
        if (type == ACL_TYPE_ACCESS) {
-               umode_t mode;
-
                error = posix_acl_update_mode(inode, &mode, &acl);
                if (error)
                        return error;
-               error = xfs_set_mode(inode, mode);
-               if (error)
-                       return error;
+               set_mode = true;
        }
 
  set_acl:
-       return __xfs_set_acl(inode, acl, type);
+       error =  __xfs_set_acl(inode, acl, type);
+       if (error)
+               return error;
+
+       /*
+        * We set the mode after successfully updating the ACL xattr because the
+        * xattr update can fail at ENOSPC and we don't want to change the mode
+        * if the ACL update hasn't been applied.
+        */
+       if (set_mode)
+               error = xfs_set_mode(inode, mode);
+
+       return error;
 }
index 29172609f2a31b756cd40da7b42f288fe8b0915b..a3eeaba156c5ab8d7d34e6b4f217423c452b73dc 100644 (file)
@@ -343,7 +343,8 @@ xfs_end_io(
                error = xfs_reflink_end_cow(ip, offset, size);
                break;
        case XFS_IO_UNWRITTEN:
-               error = xfs_iomap_write_unwritten(ip, offset, size);
+               /* writeback should never update isize */
+               error = xfs_iomap_write_unwritten(ip, offset, size, false);
                break;
        default:
                ASSERT(!xfs_ioend_is_append(ioend) || ioend->io_append_trans);
@@ -445,6 +446,19 @@ xfs_imap_valid(
 {
        offset >>= inode->i_blkbits;
 
+       /*
+        * We have to make sure the cached mapping is within EOF to protect
+        * against eofblocks trimming on file release leaving us with a stale
+        * mapping. Otherwise, a page for a subsequent file extending buffered
+        * write could get picked up by this writeback cycle and written to the
+        * wrong blocks.
+        *
+        * Note that what we really want here is a generic mapping invalidation
+        * mechanism to protect us from arbitrary extent modifying contexts, not
+        * just eofblocks.
+        */
+       xfs_trim_extent_eof(imap, XFS_I(inode));
+
        return offset >= imap->br_startoff &&
                offset < imap->br_startoff + imap->br_blockcount;
 }
@@ -734,6 +748,14 @@ xfs_vm_invalidatepage(
 {
        trace_xfs_invalidatepage(page->mapping->host, page, offset,
                                 length);
+
+       /*
+        * If we are invalidating the entire page, clear the dirty state from it
+        * so that we can check for attempts to release dirty cached pages in
+        * xfs_vm_releasepage().
+        */
+       if (offset == 0 && length >= PAGE_SIZE)
+               cancel_dirty_page(page);
        block_invalidatepage(page, offset, length);
 }
 
@@ -1189,25 +1211,27 @@ xfs_vm_releasepage(
         * mm accommodates an old ext3 case where clean pages might not have had
         * the dirty bit cleared. Thus, it can send actual dirty pages to
         * ->releasepage() via shrink_active_list(). Conversely,
-        * block_invalidatepage() can send pages that are still marked dirty
-        * but otherwise have invalidated buffers.
+        * block_invalidatepage() can send pages that are still marked dirty but
+        * otherwise have invalidated buffers.
         *
         * We want to release the latter to avoid unnecessary buildup of the
-        * LRU, skip the former and warn if we've left any lingering
-        * delalloc/unwritten buffers on clean pages. Skip pages with delalloc
-        * or unwritten buffers and warn if the page is not dirty. Otherwise
-        * try to release the buffers.
+        * LRU, so xfs_vm_invalidatepage() clears the page dirty flag on pages
+        * that are entirely invalidated and need to be released.  Hence the
+        * only time we should get dirty pages here is through
+        * shrink_active_list() and so we can simply skip those now.
+        *
+        * warn if we've left any lingering delalloc/unwritten buffers on clean
+        * or invalidated pages we are about to release.
         */
+       if (PageDirty(page))
+               return 0;
+
        xfs_count_page_state(page, &delalloc, &unwritten);
 
-       if (delalloc) {
-               WARN_ON_ONCE(!PageDirty(page));
+       if (WARN_ON_ONCE(delalloc))
                return 0;
-       }
-       if (unwritten) {
-               WARN_ON_ONCE(!PageDirty(page));
+       if (WARN_ON_ONCE(unwritten))
                return 0;
-       }
 
        return try_to_free_buffers(page);
 }
index ebd66b19fbfc365982500e67aa654c3838b57886..e3a950ed35a81088f121eccb1a8c2ef760ab5f31 100644 (file)
@@ -302,6 +302,8 @@ xfs_attr3_node_inactive(
                                                 &bp, XFS_ATTR_FORK);
                        if (error)
                                return error;
+                       node = bp->b_addr;
+                       btree = dp->d_ops->node_tree_p(node);
                        child_fsb = be32_to_cpu(btree[i + 1].before);
                        xfs_trans_brelse(*trans, bp);
                }
index cd9a5400ba4fef2a75d5c24f3f626f5ad0211fae..6503cfa442620efb7abf22458eed86eed9628e90 100644 (file)
@@ -84,6 +84,7 @@ xfs_zero_extent(
                GFP_NOFS, 0);
 }
 
+#ifdef CONFIG_XFS_RT
 int
 xfs_bmap_rtalloc(
        struct xfs_bmalloca     *ap)    /* bmap alloc argument struct */
@@ -190,6 +191,7 @@ xfs_bmap_rtalloc(
        }
        return 0;
 }
+#endif /* CONFIG_XFS_RT */
 
 /*
  * Check if the endoff is outside the last extent. If so the caller will grow
@@ -1459,7 +1461,19 @@ xfs_shift_file_space(
                return error;
 
        /*
-        * The extent shiting code works on extent granularity. So, if
+        * Clean out anything hanging around in the cow fork now that
+        * we've flushed all the dirty data out to disk to avoid having
+        * CoW extents at the wrong offsets.
+        */
+       if (xfs_is_reflink_inode(ip)) {
+               error = xfs_reflink_cancel_cow_range(ip, offset, NULLFILEOFF,
+                               true);
+               if (error)
+                       return error;
+       }
+
+       /*
+        * The extent shifting code works on extent granularity. So, if
         * stop_fsb is not the starting block of extent, we need to split
         * the extent at stop_fsb.
         */
@@ -2110,11 +2124,31 @@ xfs_swap_extents(
                ip->i_d.di_flags2 |= tip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK;
                tip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
                tip->i_d.di_flags2 |= f & XFS_DIFLAG2_REFLINK;
+       }
+
+       /* Swap the cow forks. */
+       if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+               xfs_extnum_t    extnum;
+
+               ASSERT(ip->i_cformat == XFS_DINODE_FMT_EXTENTS);
+               ASSERT(tip->i_cformat == XFS_DINODE_FMT_EXTENTS);
+
+               extnum = ip->i_cnextents;
+               ip->i_cnextents = tip->i_cnextents;
+               tip->i_cnextents = extnum;
+
                cowfp = ip->i_cowfp;
                ip->i_cowfp = tip->i_cowfp;
                tip->i_cowfp = cowfp;
-               xfs_inode_set_cowblocks_tag(ip);
-               xfs_inode_set_cowblocks_tag(tip);
+
+               if (ip->i_cowfp && ip->i_cnextents)
+                       xfs_inode_set_cowblocks_tag(ip);
+               else
+                       xfs_inode_clear_cowblocks_tag(ip);
+               if (tip->i_cowfp && tip->i_cnextents)
+                       xfs_inode_set_cowblocks_tag(tip);
+               else
+                       xfs_inode_clear_cowblocks_tag(tip);
        }
 
        xfs_trans_log_inode(tp, ip,  src_log_flags);
index 0eaa81dc49be674137cda51a3364b54721c10d58..7d330b3c77c3576fb6d58974e7af97c4b0ecc8e1 100644 (file)
@@ -28,7 +28,20 @@ struct xfs_mount;
 struct xfs_trans;
 struct xfs_bmalloca;
 
+#ifdef CONFIG_XFS_RT
 int    xfs_bmap_rtalloc(struct xfs_bmalloca *ap);
+#else /* !CONFIG_XFS_RT */
+/*
+ * Attempts to allocate RT extents when RT is disable indicates corruption and
+ * should trigger a shutdown.
+ */
+static inline int
+xfs_bmap_rtalloc(struct xfs_bmalloca *ap)
+{
+       return -EFSCORRUPTED;
+}
+#endif /* CONFIG_XFS_RT */
+
 int    xfs_bmap_eof(struct xfs_inode *ip, xfs_fileoff_t endoff,
                     int whichfork, int *eof);
 int    xfs_bmap_punch_delalloc_range(struct xfs_inode *ip,
index da14658da3103475940555600581f0bf12217d55..2f97c12ca75e4d5554b94b7a195b4dca53f90174 100644 (file)
@@ -1258,8 +1258,6 @@ xfs_buf_ioapply_map(
        int             size;
        int             offset;
 
-       total_nr_pages = bp->b_page_count;
-
        /* skip the pages in the buffer before the start offset */
        page_index = 0;
        offset = *buf_offset;
index 0f070f9e44e1440f55dd1cf0b8177632d822d525..de92d9cc958ff353b2e5304025c98a0e614e4127 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef XFS_DISCARD_H
 #define XFS_DISCARD_H 1
 
index bd786a9ac2c38879cf6e94ad660cd1bda19873c5..eaf86f55b7f2156c351aa26fd0190871ef1772bd 100644 (file)
@@ -347,7 +347,7 @@ xfs_verifier_error(
 {
        struct xfs_mount *mp = bp->b_target->bt_mount;
 
-       xfs_alert(mp, "Metadata %s detected at %pF, %s block 0x%llx",
+       xfs_alert(mp, "Metadata %s detected at %pS, %s block 0x%llx",
                  bp->b_error == -EFSBADCRC ? "CRC error" : "corruption",
                  __return_address, bp->b_ops->name, bp->b_bn);
 
index ebdd0bd2b2616a7e9052b4da8378721b144dc0af..6526ef0e2a234965e7895e823b544f24faedb81a 100644 (file)
@@ -58,7 +58,7 @@ xfs_zero_range(
        xfs_off_t               count,
        bool                    *did_zero)
 {
-       return iomap_zero_range(VFS_I(ip), pos, count, NULL, &xfs_iomap_ops);
+       return iomap_zero_range(VFS_I(ip), pos, count, did_zero, &xfs_iomap_ops);
 }
 
 int
@@ -237,11 +237,13 @@ xfs_file_dax_read(
        if (!count)
                return 0; /* skip atime */
 
-       if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
-               if (iocb->ki_flags & IOCB_NOWAIT)
+       if (iocb->ki_flags & IOCB_NOWAIT) {
+               if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
                        return -EAGAIN;
+       } else {
                xfs_ilock(ip, XFS_IOLOCK_SHARED);
        }
+
        ret = dax_iomap_rw(iocb, to, &xfs_iomap_ops);
        xfs_iunlock(ip, XFS_IOLOCK_SHARED);
 
@@ -259,9 +261,10 @@ xfs_file_buffered_aio_read(
 
        trace_xfs_file_buffered_read(ip, iov_iter_count(to), iocb->ki_pos);
 
-       if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
-               if (iocb->ki_flags & IOCB_NOWAIT)
+       if (iocb->ki_flags & IOCB_NOWAIT) {
+               if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
                        return -EAGAIN;
+       } else {
                xfs_ilock(ip, XFS_IOLOCK_SHARED);
        }
        ret = generic_file_read_iter(iocb, to);
@@ -377,8 +380,6 @@ restart:
         */
        spin_lock(&ip->i_flags_lock);
        if (iocb->ki_pos > i_size_read(inode)) {
-               bool    zero = false;
-
                spin_unlock(&ip->i_flags_lock);
                if (!drained_dio) {
                        if (*iolock == XFS_IOLOCK_SHARED) {
@@ -399,7 +400,7 @@ restart:
                        drained_dio = true;
                        goto restart;
                }
-               error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), &zero);
+               error = xfs_zero_eof(ip, iocb->ki_pos, i_size_read(inode), NULL);
                if (error)
                        return error;
        } else
@@ -436,7 +437,6 @@ xfs_dio_write_end_io(
        struct inode            *inode = file_inode(iocb->ki_filp);
        struct xfs_inode        *ip = XFS_I(inode);
        loff_t                  offset = iocb->ki_pos;
-       bool                    update_size = false;
        int                     error = 0;
 
        trace_xfs_end_io_direct_write(ip, offset, size);
@@ -447,6 +447,21 @@ xfs_dio_write_end_io(
        if (size <= 0)
                return size;
 
+       if (flags & IOMAP_DIO_COW) {
+               error = xfs_reflink_end_cow(ip, offset, size);
+               if (error)
+                       return error;
+       }
+
+       /*
+        * Unwritten conversion updates the in-core isize after extent
+        * conversion but before updating the on-disk size. Updating isize any
+        * earlier allows a racing dio read to find unwritten extents before
+        * they are converted.
+        */
+       if (flags & IOMAP_DIO_UNWRITTEN)
+               return xfs_iomap_write_unwritten(ip, offset, size, true);
+
        /*
         * We need to update the in-core inode size here so that we don't end up
         * with the on-disk inode size being outside the in-core inode size. We
@@ -461,20 +476,11 @@ xfs_dio_write_end_io(
        spin_lock(&ip->i_flags_lock);
        if (offset + size > i_size_read(inode)) {
                i_size_write(inode, offset + size);
-               update_size = true;
-       }
-       spin_unlock(&ip->i_flags_lock);
-
-       if (flags & IOMAP_DIO_COW) {
-               error = xfs_reflink_end_cow(ip, offset, size);
-               if (error)
-                       return error;
-       }
-
-       if (flags & IOMAP_DIO_UNWRITTEN)
-               error = xfs_iomap_write_unwritten(ip, offset, size);
-       else if (update_size)
+               spin_unlock(&ip->i_flags_lock);
                error = xfs_setfilesize(ip, offset, size);
+       } else {
+               spin_unlock(&ip->i_flags_lock);
+       }
 
        return error;
 }
@@ -549,9 +555,10 @@ xfs_file_dio_aio_write(
                iolock = XFS_IOLOCK_SHARED;
        }
 
-       if (!xfs_ilock_nowait(ip, iolock)) {
-               if (iocb->ki_flags & IOCB_NOWAIT)
+       if (iocb->ki_flags & IOCB_NOWAIT) {
+               if (!xfs_ilock_nowait(ip, iolock))
                        return -EAGAIN;
+       } else {
                xfs_ilock(ip, iolock);
        }
 
@@ -603,9 +610,10 @@ xfs_file_dax_write(
        size_t                  count;
        loff_t                  pos;
 
-       if (!xfs_ilock_nowait(ip, iolock)) {
-               if (iocb->ki_flags & IOCB_NOWAIT)
+       if (iocb->ki_flags & IOCB_NOWAIT) {
+               if (!xfs_ilock_nowait(ip, iolock))
                        return -EAGAIN;
+       } else {
                xfs_ilock(ip, iolock);
        }
 
@@ -761,7 +769,7 @@ xfs_file_fallocate(
        enum xfs_prealloc_flags flags = 0;
        uint                    iolock = XFS_IOLOCK_EXCL;
        loff_t                  new_size = 0;
-       bool                    do_file_insert = 0;
+       bool                    do_file_insert = false;
 
        if (!S_ISREG(inode->i_mode))
                return -EINVAL;
@@ -822,7 +830,7 @@ xfs_file_fallocate(
                        error = -EINVAL;
                        goto out_unlock;
                }
-               do_file_insert = 1;
+               do_file_insert = true;
        } else {
                flags |= XFS_PREALLOC_SET;
 
index 814ed729881d9a4305c3dd5646d75ef0f112b87b..43cfc07996a43ed1779e7ce6249df2113d87dc28 100644 (file)
@@ -367,29 +367,6 @@ xfs_getfsmap_datadev_helper(
        return xfs_getfsmap_helper(cur->bc_tp, info, rec, rec_daddr);
 }
 
-/* Transform a rtbitmap "record" into a fsmap */
-STATIC int
-xfs_getfsmap_rtdev_rtbitmap_helper(
-       struct xfs_trans                *tp,
-       struct xfs_rtalloc_rec          *rec,
-       void                            *priv)
-{
-       struct xfs_mount                *mp = tp->t_mountp;
-       struct xfs_getfsmap_info        *info = priv;
-       struct xfs_rmap_irec            irec;
-       xfs_daddr_t                     rec_daddr;
-
-       rec_daddr = XFS_FSB_TO_BB(mp, rec->ar_startblock);
-
-       irec.rm_startblock = rec->ar_startblock;
-       irec.rm_blockcount = rec->ar_blockcount;
-       irec.rm_owner = XFS_RMAP_OWN_NULL;      /* "free" */
-       irec.rm_offset = 0;
-       irec.rm_flags = 0;
-
-       return xfs_getfsmap_helper(tp, info, &irec, rec_daddr);
-}
-
 /* Transform a bnobt irec into a fsmap */
 STATIC int
 xfs_getfsmap_datadev_bnobt_helper(
@@ -475,6 +452,30 @@ xfs_getfsmap_logdev(
        return xfs_getfsmap_helper(tp, info, &rmap, 0);
 }
 
+#ifdef CONFIG_XFS_RT
+/* Transform a rtbitmap "record" into a fsmap */
+STATIC int
+xfs_getfsmap_rtdev_rtbitmap_helper(
+       struct xfs_trans                *tp,
+       struct xfs_rtalloc_rec          *rec,
+       void                            *priv)
+{
+       struct xfs_mount                *mp = tp->t_mountp;
+       struct xfs_getfsmap_info        *info = priv;
+       struct xfs_rmap_irec            irec;
+       xfs_daddr_t                     rec_daddr;
+
+       rec_daddr = XFS_FSB_TO_BB(mp, rec->ar_startblock);
+
+       irec.rm_startblock = rec->ar_startblock;
+       irec.rm_blockcount = rec->ar_blockcount;
+       irec.rm_owner = XFS_RMAP_OWN_NULL;      /* "free" */
+       irec.rm_offset = 0;
+       irec.rm_flags = 0;
+
+       return xfs_getfsmap_helper(tp, info, &irec, rec_daddr);
+}
+
 /* Execute a getfsmap query against the realtime device. */
 STATIC int
 __xfs_getfsmap_rtdev(
@@ -561,6 +562,7 @@ xfs_getfsmap_rtdev_rtbitmap(
        return __xfs_getfsmap_rtdev(tp, keys, xfs_getfsmap_rtdev_rtbitmap_query,
                        info);
 }
+#endif /* CONFIG_XFS_RT */
 
 /* Execute a getfsmap query against the regular data device. */
 STATIC int
@@ -795,7 +797,15 @@ xfs_getfsmap_check_keys(
        return false;
 }
 
+/*
+ * There are only two devices if we didn't configure RT devices at build time.
+ */
+#ifdef CONFIG_XFS_RT
 #define XFS_GETFSMAP_DEVS      3
+#else
+#define XFS_GETFSMAP_DEVS      2
+#endif /* CONFIG_XFS_RT */
+
 /*
  * Get filesystem's extents as described in head, and format for
  * output.  Calls formatter to fill the user's buffer until all
@@ -853,10 +863,12 @@ xfs_getfsmap(
                handlers[1].dev = new_encode_dev(mp->m_logdev_targp->bt_dev);
                handlers[1].fn = xfs_getfsmap_logdev;
        }
+#ifdef CONFIG_XFS_RT
        if (mp->m_rtdev_targp) {
                handlers[2].dev = new_encode_dev(mp->m_rtdev_targp->bt_dev);
                handlers[2].fn = xfs_getfsmap_rtdev_rtbitmap;
        }
+#endif /* CONFIG_XFS_RT */
 
        xfs_sort(handlers, XFS_GETFSMAP_DEVS, sizeof(struct xfs_getfsmap_dev),
                        xfs_getfsmap_dev_compare);
index 5599dda4727af6736fa1ae15429456b2e5fc6a04..4ec5b7f4540137622856883ab5dafb73d95f89ab 100644 (file)
@@ -1624,10 +1624,12 @@ xfs_itruncate_extents(
                goto out;
 
        /*
-        * Clear the reflink flag if we truncated everything.
+        * Clear the reflink flag if there are no data fork blocks and
+        * there are no extents staged in the cow fork.
         */
-       if (ip->i_d.di_nblocks == 0 && xfs_is_reflink_inode(ip)) {
-               ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
+       if (xfs_is_reflink_inode(ip) && ip->i_cnextents == 0) {
+               if (ip->i_d.di_nblocks == 0)
+                       ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
                xfs_inode_clear_cowblocks_tag(ip);
        }
 
index 6d0f74ec31e89c35769b55f3402003c2548ae980..9bbc2d7cc8cbb2c7cf42ee335061acfeff68617c 100644 (file)
@@ -364,6 +364,9 @@ xfs_inode_to_log_dinode(
        to->di_dmstate = from->di_dmstate;
        to->di_flags = from->di_flags;
 
+       /* log a dummy value to ensure log structure is fully initialised */
+       to->di_next_unlinked = NULLAGINO;
+
        if (from->di_version == 3) {
                to->di_changecount = inode->i_version;
                to->di_crtime.t_sec = from->di_crtime.t_sec;
@@ -404,6 +407,11 @@ xfs_inode_item_format_core(
  * the second with the on-disk inode structure, and a possible third and/or
  * fourth with the inode data/extents/b-tree root and inode attributes
  * data/extents/b-tree root.
+ *
+ * Note: Always use the 64 bit inode log format structure so we don't
+ * leave an uninitialised hole in the format item on 64 bit systems. Log
+ * recovery on 32 bit systems handles this just fine, so there's no reason
+ * for not using an initialising the properly padded structure all the time.
  */
 STATIC void
 xfs_inode_item_format(
@@ -412,8 +420,8 @@ xfs_inode_item_format(
 {
        struct xfs_inode_log_item *iip = INODE_ITEM(lip);
        struct xfs_inode        *ip = iip->ili_inode;
-       struct xfs_inode_log_format *ilf;
        struct xfs_log_iovec    *vecp = NULL;
+       struct xfs_inode_log_format *ilf;
 
        ASSERT(ip->i_d.di_version > 1);
 
@@ -425,7 +433,17 @@ xfs_inode_item_format(
        ilf->ilf_boffset = ip->i_imap.im_boffset;
        ilf->ilf_fields = XFS_ILOG_CORE;
        ilf->ilf_size = 2; /* format + core */
-       xlog_finish_iovec(lv, vecp, sizeof(struct xfs_inode_log_format));
+
+       /*
+        * make sure we don't leak uninitialised data into the log in the case
+        * when we don't log every field in the inode.
+        */
+       ilf->ilf_dsize = 0;
+       ilf->ilf_asize = 0;
+       ilf->ilf_pad = 0;
+       uuid_copy(&ilf->ilf_u.ilfu_uuid, &uuid_null);
+
+       xlog_finish_iovec(lv, vecp, sizeof(*ilf));
 
        xfs_inode_item_format_core(ip, lv, &vecp);
        xfs_inode_item_format_data_fork(iip, ilf, lv, &vecp);
@@ -745,7 +763,7 @@ xfs_iflush_done(
                 */
                iip = INODE_ITEM(blip);
                if ((iip->ili_logged && blip->li_lsn == iip->ili_flush_lsn) ||
-                   lip->li_flags & XFS_LI_FAILED)
+                   (blip->li_flags & XFS_LI_FAILED))
                        need_ail++;
 
                blip = next;
@@ -855,44 +873,29 @@ xfs_istale_done(
 }
 
 /*
- * convert an xfs_inode_log_format struct from either 32 or 64 bit versions
- * (which can have different field alignments) to the native version
+ * convert an xfs_inode_log_format struct from the old 32 bit version
+ * (which can have different field alignments) to the native 64 bit version
  */
 int
 xfs_inode_item_format_convert(
-       xfs_log_iovec_t         *buf,
-       xfs_inode_log_format_t  *in_f)
+       struct xfs_log_iovec            *buf,
+       struct xfs_inode_log_format     *in_f)
 {
-       if (buf->i_len == sizeof(xfs_inode_log_format_32_t)) {
-               xfs_inode_log_format_32_t *in_f32 = buf->i_addr;
-
-               in_f->ilf_type = in_f32->ilf_type;
-               in_f->ilf_size = in_f32->ilf_size;
-               in_f->ilf_fields = in_f32->ilf_fields;
-               in_f->ilf_asize = in_f32->ilf_asize;
-               in_f->ilf_dsize = in_f32->ilf_dsize;
-               in_f->ilf_ino = in_f32->ilf_ino;
-               /* copy biggest field of ilf_u */
-               uuid_copy(&in_f->ilf_u.ilfu_uuid, &in_f32->ilf_u.ilfu_uuid);
-               in_f->ilf_blkno = in_f32->ilf_blkno;
-               in_f->ilf_len = in_f32->ilf_len;
-               in_f->ilf_boffset = in_f32->ilf_boffset;
-               return 0;
-       } else if (buf->i_len == sizeof(xfs_inode_log_format_64_t)){
-               xfs_inode_log_format_64_t *in_f64 = buf->i_addr;
-
-               in_f->ilf_type = in_f64->ilf_type;
-               in_f->ilf_size = in_f64->ilf_size;
-               in_f->ilf_fields = in_f64->ilf_fields;
-               in_f->ilf_asize = in_f64->ilf_asize;
-               in_f->ilf_dsize = in_f64->ilf_dsize;
-               in_f->ilf_ino = in_f64->ilf_ino;
-               /* copy biggest field of ilf_u */
-               uuid_copy(&in_f->ilf_u.ilfu_uuid, &in_f64->ilf_u.ilfu_uuid);
-               in_f->ilf_blkno = in_f64->ilf_blkno;
-               in_f->ilf_len = in_f64->ilf_len;
-               in_f->ilf_boffset = in_f64->ilf_boffset;
-               return 0;
-       }
-       return -EFSCORRUPTED;
+       struct xfs_inode_log_format_32  *in_f32 = buf->i_addr;
+
+       if (buf->i_len != sizeof(*in_f32))
+               return -EFSCORRUPTED;
+
+       in_f->ilf_type = in_f32->ilf_type;
+       in_f->ilf_size = in_f32->ilf_size;
+       in_f->ilf_fields = in_f32->ilf_fields;
+       in_f->ilf_asize = in_f32->ilf_asize;
+       in_f->ilf_dsize = in_f32->ilf_dsize;
+       in_f->ilf_ino = in_f32->ilf_ino;
+       /* copy biggest field of ilf_u */
+       uuid_copy(&in_f->ilf_u.ilfu_uuid, &in_f32->ilf_u.ilfu_uuid);
+       in_f->ilf_blkno = in_f32->ilf_blkno;
+       in_f->ilf_len = in_f32->ilf_len;
+       in_f->ilf_boffset = in_f32->ilf_boffset;
+       return 0;
 }
index 5049e8ab6e302e05b4c0d66fcf3eaa1ba9e2721b..aa75389be8cfa81d06695f80701c2093b65289b0 100644 (file)
@@ -1088,6 +1088,7 @@ xfs_ioctl_setattr_dax_invalidate(
        int                     *join_flags)
 {
        struct inode            *inode = VFS_I(ip);
+       struct super_block      *sb = inode->i_sb;
        int                     error;
 
        *join_flags = 0;
@@ -1100,7 +1101,7 @@ xfs_ioctl_setattr_dax_invalidate(
        if (fa->fsx_xflags & FS_XFLAG_DAX) {
                if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
                        return -EINVAL;
-               if (ip->i_mount->m_sb.sb_blocksize != PAGE_SIZE)
+               if (bdev_dax_supported(sb, sb->s_blocksize) < 0)
                        return -EINVAL;
        }
 
index a1909bc064e9e70c90ef6ced3017935951aefc2e..f179bdf1644dc346b2f7f064543eca0c3f808c6a 100644 (file)
@@ -829,7 +829,8 @@ int
 xfs_iomap_write_unwritten(
        xfs_inode_t     *ip,
        xfs_off_t       offset,
-       xfs_off_t       count)
+       xfs_off_t       count,
+       bool            update_isize)
 {
        xfs_mount_t     *mp = ip->i_mount;
        xfs_fileoff_t   offset_fsb;
@@ -840,6 +841,7 @@ xfs_iomap_write_unwritten(
        xfs_trans_t     *tp;
        xfs_bmbt_irec_t imap;
        struct xfs_defer_ops dfops;
+       struct inode    *inode = VFS_I(ip);
        xfs_fsize_t     i_size;
        uint            resblks;
        int             error;
@@ -899,7 +901,8 @@ xfs_iomap_write_unwritten(
                i_size = XFS_FSB_TO_B(mp, offset_fsb + count_fsb);
                if (i_size > offset + count)
                        i_size = offset + count;
-
+               if (update_isize && i_size > i_size_read(inode))
+                       i_size_write(inode, i_size);
                i_size = xfs_new_eof(ip, i_size);
                if (i_size) {
                        ip->i_d.di_size = i_size;
index 00db3ecea0840c2587f6c0de2f2828bcaaab6fbe..ee535065c5d0e3795158e9cf1ce7dafad5f3a729 100644 (file)
@@ -27,7 +27,7 @@ int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t,
                        struct xfs_bmbt_irec *, int);
 int xfs_iomap_write_allocate(struct xfs_inode *, int, xfs_off_t,
                        struct xfs_bmbt_irec *);
-int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, xfs_off_t);
+int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, xfs_off_t, bool);
 
 void xfs_bmbt_to_iomap(struct xfs_inode *, struct iomap *,
                struct xfs_bmbt_irec *);
index c5107c7bc4bf8cfaad37050babd60e9a4f17e109..dc95a49d62e72f1808a6a8fa31aa82651bb8a643 100644 (file)
@@ -2515,7 +2515,7 @@ next_lv:
                                if (lv)
                                        vecp = lv->lv_iovecp;
                        }
-                       if (record_cnt == 0 && ordered == false) {
+                       if (record_cnt == 0 && !ordered) {
                                if (!lv)
                                        return 0;
                                break;
index 85401155750eaa5e95868597bc1e97e7b24dcbab..34447dca97d136bb36016bfadc5e7312e4b6e5db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __XFS_MESSAGE_H
 #define __XFS_MESSAGE_H 1
 
index ea7d4b4e50d0ca3eedee85ffd840542e0bb105db..e9727d0a541a109329c2c9072b24c7c0d3b6ed23 100644 (file)
@@ -704,7 +704,7 @@ xfs_mountfs(
        xfs_set_maxicount(mp);
 
        /* enable fail_at_unmount as default */
-       mp->m_fail_unmount = 1;
+       mp->m_fail_unmount = true;
 
        error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, NULL, mp->m_fsname);
        if (error)
index 0c381d71b242ec8553be6e01b8400977c4403365..0492436a053fcf0875764b341cbb150a2dde3baa 100644 (file)
@@ -134,7 +134,7 @@ xfs_check_ondisk_structs(void)
        XFS_CHECK_STRUCT_SIZE(struct xfs_icreate_log,           28);
        XFS_CHECK_STRUCT_SIZE(struct xfs_ictimestamp,           8);
        XFS_CHECK_STRUCT_SIZE(struct xfs_inode_log_format_32,   52);
-       XFS_CHECK_STRUCT_SIZE(struct xfs_inode_log_format_64,   56);
+       XFS_CHECK_STRUCT_SIZE(struct xfs_inode_log_format,      56);
        XFS_CHECK_STRUCT_SIZE(struct xfs_qoff_logformat,        20);
        XFS_CHECK_STRUCT_SIZE(struct xfs_trans_header,          16);
 }
index 2f2dc3c09ad008a75fa0ffba6fd5d7aed392c162..aa6c5c193f4581d1c233578b34a897b871a1bf94 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2014 Christoph Hellwig.
  */
@@ -274,7 +275,7 @@ xfs_fs_commit_blocks(
                                        (end - 1) >> PAGE_SHIFT);
                WARN_ON_ONCE(error);
 
-               error = xfs_iomap_write_unwritten(ip, start, length);
+               error = xfs_iomap_write_unwritten(ip, start, length, false);
                if (error)
                        goto out_drop_iolock;
        }
index b587cb99b2b76140555ce6bd10988420aeeb4186..bf45951e28fe5428ea484ca1d73158aa382f3bb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XFS_PNFS_H
 #define _XFS_PNFS_H 1
 
index 3246815c24d659d83da380c5cce04dd8ee40a101..37e603bf159137dfd38a1210b5d0bb31e5f4829f 100644 (file)
@@ -736,7 +736,13 @@ xfs_reflink_end_cow(
        /* If there is a hole at end_fsb - 1 go to the previous extent */
        if (!xfs_iext_lookup_extent(ip, ifp, end_fsb - 1, &idx, &got) ||
            got.br_startoff > end_fsb) {
-               ASSERT(idx > 0);
+               /*
+                * In case of racing, overlapping AIO writes no COW extents
+                * might be left by the time I/O completes for the loser of
+                * the race.  In that case we are done.
+                */
+               if (idx <= 0)
+                       goto out_cancel;
                xfs_iext_get_extent(ifp, --idx, &got);
        }
 
@@ -809,6 +815,7 @@ next_extent:
 
 out_defer:
        xfs_defer_cancel(&dfops);
+out_cancel:
        xfs_trans_cancel(tp);
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
 out:
index c996f4ae4a5f293199ede0d0137329cc0919418b..f663022353c0d98b681e51fe8578096d0fbf57bf 100644 (file)
@@ -1637,7 +1637,7 @@ xfs_fs_fill_super(
 
        /* version 5 superblocks support inode version counters. */
        if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5)
-               sb->s_flags |= MS_I_VERSION;
+               sb->s_flags |= SB_I_VERSION;
 
        if (mp->m_flags & XFS_MOUNT_DAX) {
                xfs_warn(mp,
@@ -1654,6 +1654,16 @@ xfs_fs_fill_super(
                "DAX and reflink have not been tested together!");
        }
 
+       if (mp->m_flags & XFS_MOUNT_DISCARD) {
+               struct request_queue *q = bdev_get_queue(sb->s_bdev);
+
+               if (!blk_queue_discard(q)) {
+                       xfs_warn(mp, "mounting with \"discard\" option, but "
+                                       "the device does not support discard");
+                       mp->m_flags &= ~XFS_MOUNT_DISCARD;
+               }
+       }
+
        if (xfs_sb_version_hasrmapbt(&mp->m_sb)) {
                if (mp->m_sb.sb_rblocks) {
                        xfs_alert(mp,
index dedf9d789166184fbe859faa12a9415d55804dc8..fa1505292f6cda4c4b2434d264d4116bcefe640c 100644 (file)
@@ -399,17 +399,12 @@ extern const struct fwnode_operations acpi_device_fwnode_ops;
 extern const struct fwnode_operations acpi_data_fwnode_ops;
 extern const struct fwnode_operations acpi_static_fwnode_ops;
 
+bool is_acpi_device_node(const struct fwnode_handle *fwnode);
+bool is_acpi_data_node(const struct fwnode_handle *fwnode);
+
 static inline bool is_acpi_node(const struct fwnode_handle *fwnode)
 {
-       return !IS_ERR_OR_NULL(fwnode) &&
-               (fwnode->ops == &acpi_device_fwnode_ops
-                || fwnode->ops == &acpi_data_fwnode_ops);
-}
-
-static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
-{
-       return !IS_ERR_OR_NULL(fwnode) &&
-               fwnode->ops == &acpi_device_fwnode_ops;
+       return (is_acpi_device_node(fwnode) || is_acpi_data_node(fwnode));
 }
 
 #define to_acpi_device_node(__fwnode)                                  \
@@ -422,11 +417,6 @@ static inline bool is_acpi_device_node(const struct fwnode_handle *fwnode)
                        NULL;                                           \
        })
 
-static inline bool is_acpi_data_node(const struct fwnode_handle *fwnode)
-{
-       return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &acpi_data_fwnode_ops;
-}
-
 #define to_acpi_data_node(__fwnode)                                    \
        ({                                                              \
                typeof(__fwnode) __to_acpi_data_node_fwnode = __fwnode; \
index 303315b9693fc999022b192f91b4681505f3c571..d0633fc1fc156eee7432a34481d64483a54964a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ACPI_IO_H_
 #define _ACPI_IO_H_
 
index 1e3a74f94131eb15448f9c48c8410d75602949cd..fdebcfc6c8df8a90d24ff3b013e4f90c90f847d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_NUMA_H
 #define __ACPI_NUMA_H
 
index c46694abea28846509f222a613e3e20d8eb799c2..1797e81a320408e79c24ab09c1802f6b86f28a12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * apei.h - ACPI Platform Error Interface
  */
index 1cad8b2d460c3eabf9a7cf833fa6ece8785fe6e7..3a2b8535dec6c4eaba511e1a445d3c0f187fddec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ACPI_BUTTON_H
 #define ACPI_BUTTON_H
 
index 9061c5c743b386cb05e065d1158a9fd1ca771dae..8feb0c866ee059a65951874f83f5261a4b84501f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GHES_H
 #define GHES_H
 
index 552637b0d051d2677818e4e8f841fe9f1499ee64..967c552d1cd31f9b08b3f01c1538cb2d358455cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* _PDC bit definition for Intel processors */
 
index c1ba00fc4888cab32133313b27ae21a43fe55e79..d591bb77f592b21a56a0496d223ac0455b31b359 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_PROCESSOR_H
 #define __ACPI_PROCESSOR_H
 
index 0419184ce8867664164de63b2a232da985af718f..14122fc55bbe617b36bfc99e3e6fc6e0cf0d85d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_REBOOT_H
 #define __ACPI_REBOOT_H
 
index bfe484da55d2c98506106321501fa74a7551ecd1..db8548ff03cef48fc2af9f7fab2443e9b1c0d6d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACPI_VIDEO_H
 #define __ACPI_VIDEO_H
 
index 928fd66b12712241d100c5f4c9d3a857b9eabf1b..89f3b03b14451af9f4a9707172a97143f2ae9b5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _4LEVEL_FIXUP_H
 #define _4LEVEL_FIXUP_H
 
index b5ca82dc41753f084d8d1c9d3f838102a9371046..dfbd9d99063728bdf05b533e3bbaddd493630fac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _5LEVEL_FIXUP_H
 #define _5LEVEL_FIXUP_H
 
index 939869c772b17a07a9776e323e1a253dba1f92d2..2fa2bc208383314746e264fbd9514389b7e3baaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/bitops.h>
 #undef __memset
 extern void *__memset(void *, int, __kernel_size_t);
index 288cc9e963953ae182e6b8760663d7b712e834c6..49be4bba1e9641de9713ebc06532e581f934e40b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_ATOMIC_LONG_H
 #define _ASM_GENERIC_ATOMIC_LONG_H
 /*
index a1865537339b011b1e31506da53f7cacdf5757c2..331670807cf011f6eea61b2066ee28e5663d51ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __NR_chmod
 __NR_chmod,
 #endif
index 7b61db4fe72b1cb610674038d8577c82a9f6224f..8fb83b43006ac7953468e62d6565cb0ef7b27a95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __NR_rename
 __NR_rename,
 #endif
index 3b249cb857dc55dfb33dec433d4617318a7bc1ac..7bb7b5a83ae2e549c151112a75c0f8da4f4995d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __NR_readlink
 __NR_readlink,
 #endif
index 274575d7129fc6b499c2c0ccbb4aad62af5a013a..dfc52b3c103f5c79e3d658d3f67e01db2222d558 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <asm-generic/audit_dir_write.h>
 __NR_acct,
 #ifdef __NR_swapon
index dcdcacf2fd2b8da3831eff135b4719aeeaad16d6..bfc96bf6606ed95c89c2d3c3b10314669f843a80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_BITOPS_H
 #define __ASM_GENERIC_BITOPS_H
 
index 937d7c4355759ddd4945e189cb12d7a800417332..39e56e1c72032413a082d6f336e01ba5d3d8be92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS___FFS_H_
 #define _ASM_GENERIC_BITOPS___FFS_H_
 
index a60a7ccb6782d869b9d47503a158f86a92b84374..03f721a8a2b1993734e458399a68848637112c87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS___FLS_H_
 #define _ASM_GENERIC_BITOPS___FLS_H_
 
index 6a211f40665c02c8e2083b4966eb9c0d0616e9fb..c2705e1d220d1567186ecfc219c075fbe1aa0ba4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
 #define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
 
index 49673510b484157cefd9d7e94393bd6226ab443e..04deffaf5f7d416f7b0892b206856bd9e9c849db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
 #define _ASM_GENERIC_BITOPS_ATOMIC_H_
 
index 90041e3a41f04a92175cefd8b66f0ef0df9c38ef..87024da44d10c8625113502766f410beaa1f48cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
 #define _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_
 
index 0248f386635f94a92d4104438bdab236b218d9d9..43a5aa9afbdb7247f136f13fa2d0a1efcdfe0ebf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
 #define _ASM_GENERIC_BITOPS_BUILTIN___FLS_H_
 
index 064825829e1caf6ef12e3d6b948896a9792307d3..458c85ebcd150c429278974290c36530be2bc9ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
 #define _ASM_GENERIC_BITOPS_BUILTIN_FFS_H_
 
index eda652d0ac7f9be4d047b055f43d34340811ef49..62daf940989df977d94be029beafcca21a777338 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
 #define _ASM_GENERIC_BITOPS_BUILTIN_FLS_H_
 
index 0a7e06623470586b0509ef99410dbc54aa572f9e..149faeeeeaf2cca1dbc62891c8314bf5ab07e416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
 #define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
 
index 5a0997857b34892fdfbbd9f1c57eb31aff58ae0e..b041cbf0d899c638e81d4628c46ccc9932dd5f9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_SETBIT_H_
 #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_SETBIT_H_
 
index 87f0f109d7f1db4eb34ab11744bd30031daab69b..0cfc3180b0746d93fbaa5277f1022acfdc9c5e29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
 #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_
 
index fbbb43af7dc08201e78fb51b56746e6f28b1d3de..e81868b2c0f07b876c04647fa0603409edf786ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FFS_H_
 #define _ASM_GENERIC_BITOPS_FFS_H_
 
index 6744bd4cdf465733899110a54073e6398cdbc8cc..0d010085fdecf824398353aa3116a6cf9556e921 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FFZ_H_
 #define _ASM_GENERIC_BITOPS_FFZ_H_
 
index 998d4d544f182ee305ae779ec0bf5e4f8f2ef43e..1ba611e16fa0c2b1ff2ff9b2fff5570564016d3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FIND_H_
 #define _ASM_GENERIC_BITOPS_FIND_H_
 
index 0576d1f42f43fc34fb5efa8e27969afc5dbdf0b4..753aecaab641a82d7f218988fcebe0751f7149ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FLS_H_
 #define _ASM_GENERIC_BITOPS_FLS_H_
 
index b097cf8444e3f99811ee395144b05a0a237519f3..866f2b2304ff639fdde2f81916e6d7fece289df2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FLS64_H_
 #define _ASM_GENERIC_BITOPS_FLS64_H_
 
index a94d6519c7ed1bafbfb1659aa506afbe5d99f752..6bf1bba83589686c1e628be659bebbace97a77e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_HWEIGHT_H_
 #define _ASM_GENERIC_BITOPS_HWEIGHT_H_
 
index 61731543c00ea381fb8954c69b834b976260c0db..188d3eba3ace85f8c5c21127403e70a7d355fb1d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_LE_H_
 #define _ASM_GENERIC_BITOPS_LE_H_
 
index 8ef0ccbf8167857c1c16c8235b745b1a8f37b3b0..bc397573c43ad4f5d4a670f050818ff16ec313c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_LOCK_H_
 #define _ASM_GENERIC_BITOPS_LOCK_H_
 
index 697cc2b7e0f0d90189aa3e1e9d6d8c8c44bb42be..7e10c4b50c5db3b4f7fe1a1472a03db0bb2af653 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
 #define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
 
index 604fab7031a62e2a8ae2f0cde8022362fd89c38b..86470cfcef60bf73d6b924577b37decde39315d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_SCHED_H_
 #define _ASM_GENERIC_BITOPS_SCHED_H_
 
index d1d70aa1902108c7c64970ab18d9e4aed8d94d74..3905c1c93dc206482627eda2a80902b4849d65e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_BITS_PER_LONG
 #define __ASM_GENERIC_BITS_PER_LONG
 
index 87191357d303c9b53873a1280ca6caf440331136..af2cc94a61bf9e1e7f4e29d6bd1fd1ad997bbf5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BUG_H
 #define _ASM_GENERIC_BUG_H
 
index 6c4f62ea714df3f331255e40bd565c28f6fb54b2..69021830f078d68331eadbab7f2a2240c1f863ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_BUGS_H
 #define __ASM_GENERIC_BUGS_H
 /*
index 1bfcfe5c223703673633f20e7a9211b5d5ed6123..60386e164246cf3bdf64f98acb28d24050155d29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_CACHE_H
 #define __ASM_GENERIC_CACHE_H
 /*
index 87bc536ccde3cedb139a892e692e83ee45a12cfe..0dd47a6db2cf1aea83f569e9766b2401c631cfe9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_CACHEFLUSH_H
 #define __ASM_CACHEFLUSH_H
 
index 3150cbd8eb212d1b3a92615342196ec23408629d..34785c0f57b0ebb07b6d151713bd3bd667519141 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_CHECKSUM_H
 #define __ASM_GENERIC_CHECKSUM_H
 
index 70bef78912b796171fb03cc00fe912ded7da1785..f17f14f84d09e5c1b108cf0d6bd124bf13e4ab47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_CMPXCHG_LOCAL_H
 #define __ASM_GENERIC_CMPXCHG_LOCAL_H
 
index e5f9080e8e8600c359ffaab6ba2adad660402c52..9a24510cd8c1848f4c655ffc9f57d0ca4e1f1f4c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generic UP xchg and cmpxchg using interrupt disablement.  Does not
  * support SMP.
index 5e86f6ae7cab64c9c049a581d408ae9c91dd0a4b..3a2e224b9fa09386bba7bfd7bb49de5bcede1669 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_CURRENT_H
 #define __ASM_GENERIC_CURRENT_H
 
index 0f79054ce7cd0e93b597c1ae2bb862707fe2b8b4..e448ac61430cae484631cd435a157b4a63e7f971 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_DELAY_H
 #define __ASM_GENERIC_DELAY_H
 
index 163f77999ea4e47639ea31ed30ec37bd1657cafe..d2013064dc69719cf7111f8c045c02580e51006e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_DIV64_H
 #define _ASM_GENERIC_DIV64_H
 /*
index 292c571750f02b7fed9201e6ad1e8b97191ddca6..f24b0f9a4f05b6dca25981323e79f0ee84404c78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_DMA_CONTIGUOUS_H
 #define _ASM_GENERIC_DMA_CONTIGUOUS_H
 
index 9dfc3a7f36d2399361f2b8408a07f05f17aaaeb4..43d0c8af8058e5b3e6f4a0a5e243e036bac3170f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_DMA_H
 #define __ASM_GENERIC_DMA_H
 /*
index 2edef8d7fa6b8a1fe65bacb8e0d110f55b5e803f..9def22e6e2b311dc4d5520d1f844196c9ea8765d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_EARLY_IOREMAP_H_
 #define _ASM_EARLY_IOREMAP_H_
 
index 0d68a1eae98528b3c2f711774ecf01b4c2a21dbb..445de38b795e944527d4d2c5abf96fd223268918 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
 #define _ASM_GENERIC_EMERGENCY_RESTART_H
 
index ca14c6664027d40f88473ca1a97bbaeef6dcc1ed..f9618bd0723a42e7cb6fb4edd80614987cb910cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_EXTABLE_H
 #define __ASM_GENERIC_EXTABLE_H
 
index fe8ca7fcea00102be2b4412b2b4e62f03d0ec8ef..f9f18101ed362fc59ffa5cdd3d8af6d1223fd272 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_FB_H_
 #define __ASM_GENERIC_FB_H_
 #include <linux/fb.h>
index f0d8b1c51343c813761416d147255aeac9e74140..fcb61b4659b39db73a1636a9b893dd2620eafd56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_FUTEX_H
 #define _ASM_GENERIC_FUTEX_H
 
index 65e4468ac53da6b156d795385e54df4e6ea032e5..c64bea7a52bebd5c7332203e1e3a78bfa69b84c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_GETORDER_H
 #define __ASM_GENERIC_GETORDER_H
 
index 8ca627dcea11096b992135679571fa44bba0ee32..19eadac415c42dd381161d122eaf4299e712ca92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_GPIO_H
 #define _ASM_GENERIC_GPIO_H
 
index 04d0a977cd431fc5eb2c2f34cbd5390bfeb0db05..d14214dfc10b34eac735cd64495cf23b7c8416e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_HARDIRQ_H
 #define __ASM_GENERIC_HARDIRQ_H
 
index 540354f94f83faf0fa1086339d682df2ad9962f1..9d0cde8ab716f6264e5e9c2398100dcb55f64010 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_HUGETLB_H
 #define _ASM_GENERIC_HUGETLB_H
 
index 1b91d068191420a9b7e7b655b234c6b85c74750d..81dfa3ee5e0697b7e0880a85f80cc42f7315b497 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Generic I/O and MEMIO string operations.  */
 
 #define __ide_insw     insw
index 4cd84855cb4615ca5717545aee700c9b63af77db..ffb68d67be5f9b8911394e816a13972158c27240 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * asm-generic/int-ll64.h
  *
index 297fb0d7cd6c63ebcc25e17a111de4b1a64e9198..9fda9ed000cd04394ec87f419fe876d58d04c566 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_IOCTL_H
 #define _ASM_GENERIC_IOCTL_H
 
index 650fede33c253a845a8449f0f158a9906de07db8..5b63b94ef6b51bbcbe3b275e7be52a4713bfb16d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GENERIC_IO_H
 #define __GENERIC_IO_H
 
index b90ec0bc485f1fda6fbcf29103909d6b3de1b0a7..da21de991e841ae2e1f370f91db2144211913f27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_IRQ_H
 #define __ASM_GENERIC_IRQ_H
 
index a44f452c6590c898fff302328adeff43c9c0c989..d5dce06f74b8e30132b2d8aa88a5f50728306595 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_IRQ_WORK_H
 #define __ASM_IRQ_WORK_H
 
index 1f40d0024cf381d5c380f2a1c19b5c5ce3ae24e1..19ccbf483a2403184b2eaaa9d21c809afd97bc4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_IRQFLAGS_H
 #define __ASM_GENERIC_IRQFLAGS_H
 
index d1814497bcdb050a0694453441b2722c7ce75898..2b10b31b02d0432320c630bc6c67994623999b1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_KDEBUG_H
 #define _ASM_GENERIC_KDEBUG_H
 
index 90f99c74dd386b5412ae36ba0a9ba6ba14e63e55..9f95b7b63d192817c2a94cc8f6a18d14a7550446 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_KMAP_TYPES_H
 #define _ASM_GENERIC_KMAP_TYPES_H
 
index 57af9f21d148e5f89118e6e337524d181f415aaa..4a982089c95cc523fa137462d4e853ce134df6f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_KPROBES_H
 #define _ASM_GENERIC_KPROBES_H
 
index fa25becbdcaf406faddcf9b00cad76fbfa343b72..18c6abe81fbdc60967e83ffe303462ce7cf0ea08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_KVM_PARA_H
 #define _ASM_GENERIC_KVM_PARA_H
 
index 9ceb03b4f4661d3ade8c0ca9fbe98ac87f31bc89..fca7f1d8481822848d263aaa863291bd9eb7f2d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_LOCAL_H
 #define _ASM_GENERIC_LOCAL_H
 
index 5980002b8b7bee3db8bc7ab84f6c5a9de128b30c..765be0b7d88306eaec9216b1dd1dd89a4199b6f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_LOCAL64_H
 #define _ASM_GENERIC_LOCAL64_H
 
index 5148150cc80b02d9ff440de4827ab7a173067446..7637fb46ba4f49edb81985c7baf7fff1aadc8675 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MEMORY_MODEL_H
 #define __ASM_MEMORY_MODEL_H
 
index 41e5b6784b975d1974604c6265486ab858c3865f..ea189d88a3cc761e0239043785e00d9c6d8402f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Define generic no-op hooks for arch_dup_mmap, arch_exit_mmap
  * and arch_unmap to be included in asm-FOO/mmu_context.h for any
index 0ed3f1cfb85444443566ca46ca6ceb7e15d3e017..061838037542992e544998d0e7adf7ef07980002 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_MMU_H
 #define __ASM_GENERIC_MMU_H
 
index a7eec910ba6c6b26b84985ad8bfe82a2574a5005..6be9106fb6fb4700b8ec9525ec8574518cbf8be7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_MMU_CONTEXT_H
 #define __ASM_GENERIC_MMU_CONTEXT_H
 
index 14dc41d185a7a3163bc59f45a9df37588584fb65..98e1541b72b7019249fd73429ff811604075f18c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_MODULE_H
 #define __ASM_GENERIC_MODULE_H
 
index 61c58d8878ce0aa89dc333daa29ef007c5cd9760..e6795f088bdddf4fa1bbd322a6a4a39280a6f3b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_MSI_H
 #define __ASM_GENERIC_MSI_H
 
index 67cfb7dbc28474921c607d33307bcd84f53aa1b6..27bf3377b0cbf6e804474fc76b0ad0441b637a8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_PAGE_H
 #define __ASM_GENERIC_PAGE_H
 /*
index 04e715bcccebdd5f6140973c8bcdfab81d1ea68e..8d3009dd28ff2fa1dc535593cd6783ea4199874d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_PARAM_H
 #define __ASM_GENERIC_PARAM_H
 
index 2c9f9d4336cacf8cf46d591cf1a4b019ef4044e7..483991d619a769dd45e1c77c13df1fad6faa15b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_PARPORT_H
 #define __ASM_GENERIC_PARPORT_H
 
index f24bc519bf31c63d72803d08a5969d176413aa4f..830d7659289b917b002207ff9d701db10a70ec65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/asm-generic/pci.h
  *
index 0504ef8f3aa31d5e7a9f0d86d1cb3fc130fee9e0..1817a8415a5e82a7bc526a38361cea88566e62bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_PERCPU_H_
 #define _ASM_GENERIC_PERCPU_H_
 
@@ -115,15 +116,35 @@ do {                                                                      \
        (__ret);                                                        \
 })
 
-#define this_cpu_generic_read(pcp)                                     \
+#define __this_cpu_generic_read_nopreempt(pcp)                         \
 ({                                                                     \
        typeof(pcp) __ret;                                              \
        preempt_disable_notrace();                                      \
-       __ret = raw_cpu_generic_read(pcp);                              \
+       __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));                        \
        preempt_enable_notrace();                                       \
        __ret;                                                          \
 })
 
+#define __this_cpu_generic_read_noirq(pcp)                             \
+({                                                                     \
+       typeof(pcp) __ret;                                              \
+       unsigned long __flags;                                          \
+       raw_local_irq_save(__flags);                                    \
+       __ret = raw_cpu_generic_read(pcp);                              \
+       raw_local_irq_restore(__flags);                                 \
+       __ret;                                                          \
+})
+
+#define this_cpu_generic_read(pcp)                                     \
+({                                                                     \
+       typeof(pcp) __ret;                                              \
+       if (__native_word(pcp))                                         \
+               __ret = __this_cpu_generic_read_nopreempt(pcp);         \
+       else                                                            \
+               __ret = __this_cpu_generic_read_noirq(pcp);             \
+       __ret;                                                          \
+})
+
 #define this_cpu_generic_to_op(pcp, val, op)                           \
 do {                                                                   \
        unsigned long __flags;                                          \
index 9e429d08b1f881df1ecf24ca194c90bbecac884c..948714c1535a4224be5b22b313fae671119c6e9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_PGALLOC_H
 #define __ASM_GENERIC_PGALLOC_H
 /*
index 752fb7511750e08533c2aff578e1f1a8b311a358..0c34215263b8aec624451b3f04575a1ea6328cf7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PGTABLE_NOP4D_HACK_H
 #define _PGTABLE_NOP4D_HACK_H
 
index de364ecb8df68f5fbb7496c5fea266fd6e69a603..8f22f55de17a84892e5532f6db6ba3e5e5252bbf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PGTABLE_NOP4D_H
 #define _PGTABLE_NOP4D_H
 
index 725612b793ce1d55462de9ab2158a795ab3b4faa..f35f6e8149e47dca34e7cded26574b0786322fc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PGTABLE_NOPMD_H
 #define _PGTABLE_NOPMD_H
 
index c2b9b96d6268f4e85de4e4e15a27bf4a283e9312..e950b9c50f34f218284ff0785366c9ef07a6bdf9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PGTABLE_NOPUD_H
 #define _PGTABLE_NOPUD_H
 
index 8e02430365640e2e026c1a244eef70dadab6e080..757dc6ffc7ba5f294bae554af3e6d1a01c1207e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_PGTABLE_H
 #define _ASM_GENERIC_PGTABLE_H
 
index c1cde3577551817c9f5581b98f331406e8c61f83..c3046c9200630b15f9ced04213c8415258dd1c81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_PREEMPT_H
 #define __ASM_PREEMPT_H
 
index 0abc6b6062fbb1c203bed0f025e05e82ac3eea24..d93573eff16294aa1a9efa0a79a1f428ddd08c23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_QRWLOCK_TYPES_H
 #define __ASM_GENERIC_QRWLOCK_TYPES_H
 
index 5e752b9590548448b42080151169cc7e38a1245c..8874f681b056751fa9be3bee4d1a12b86f8fd1b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_RESOURCE_H
 #define _ASM_GENERIC_RESOURCE_H
 
index 6c6a2141f271cba9fd7fe56636718dc9ad04b550..bdbe43bac2307f5cdd617ebad8c0ae5d0842a37d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_RWSEM_H
 #define _ASM_GENERIC_RWSEM_H
 
index e5da44eddd2f3ca7ccaa9f3d78c11eb1775d3b94..6d95769310842b5712ccb59038a9cc4d91d99ce0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_SECTIONS_H_
 #define _ASM_GENERIC_SECTIONS_H_
 
index 5e291090fe04cc08f8cd09c591a9234fe91968fd..ca9f7b6be3f045d74b7a94a050c9eee55f093009 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_SERIAL_H
 #define __ASM_GENERIC_SERIAL_H
 
index 83e81f8996b22c0d3185e7c61ad0e566ac11aa3a..c86abf6bc7ba27e10de5292232f37c3ca1b589c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SET_MEMORY_H
 #define __ASM_SET_MEMORY_H
 
index d840c90a157a1ce0a636213aea1fc4eb34ba4e81..c53984fa97614db5aea70411110e9e5573ea4d03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_SIGNAL_H
 #define __ASM_GENERIC_SIGNAL_H
 
index f57eb7b5c23b377934f8cf46fd85309715a1cd0f..d0343d58a74a19460bc3c03e7eb7073ae11261fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <linux/hardirq.h>
 
index 1547a03ac50f952ec892670e1f88c70ceb9f4a33..adaf6acab17287a19a4a172499aaf32ec976cc0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_SPINLOCK_H
 #define __ASM_GENERIC_SPINLOCK_H
 /*
index 4b934e9ec97087cb16982d194a6cdc87d18c07e2..f88dcd8ed9dd57b98f4bba8860ba5bbb4af2a2ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GENERIC_STATFS_H
 #define _GENERIC_STATFS_H
 
index 1f74be5113b20a7f759e95950d8428087f6a370c..933ca6581abace6a4f61bc9f7f720c4f3d526c8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_SYSCALLS_H
 #define __ASM_GENERIC_SYSCALLS_H
 
index 157bbf6f451048cd60686f35175cefd86e3864e5..59c5a3bd4a6e190058e42cb50efc3914f7c5ef42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* termios.h: generic termios/termio user copying/translation
  */
 
index 8c13a16b074ee0c7c96efe464b1b654f9b2898b9..b1398d0d4a1d52e54832fd91645843ad21a34a95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_TERMIOS_H
 #define _ASM_GENERIC_TERMIOS_H
 
index b2243cb8d6f6f3d7989e578b3b31863074d5d89b..50ba9b5ce983f09d5331f7891adf31520f58fc75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_TIMEX_H
 #define __ASM_GENERIC_TIMEX_H
 
index d6d0a88430fed492e0aed40d5d802d8295165603..dc2669289faf69f53501d3d6a69992329766aef4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_TLBFLUSH_H
 #define __ASM_GENERIC_TLBFLUSH_H
 /*
index 6726f1bafb5e4f5fd3a68aa070d6435ee21dd3ac..cbbca295931a1df2333e109f7e7d6ed24ed0f716 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_TRACE_CLOCK_H
 #define _ASM_GENERIC_TRACE_CLOCK_H
 /*
index 2e51f6e7b3c26d4f6102db05211b5e7a88306dda..6b2e63df27391dc7050e823cd6a6057c7043d50f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_UACCESS_H
 #define __ASM_GENERIC_UACCESS_H
 
index 1ac097279db1ee68cf7e02760ddfea2ac389dce7..374c940e9be126787ce98815894f94629fa089d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_UNALIGNED_H
 #define __ASM_GENERIC_UNALIGNED_H
 
index cccc86ecfeaa505a6310f9168bbd71bb952cc8a3..cdf904265caf3913e98d865df1f7b96870a4b765 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <uapi/asm-generic/unistd.h>
 #include <linux/export.h>
 
index 36c8ff52016b10b63efe9d4ecbf5eeda3c208e4b..adf91a783b5c15a7383e5914f3f273404c551fa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Access to VGA videoram
  *
index 011dde083f231e763e4c96fcc7fb3cb9b6ce23c7..20c93f08c9933b81d4a362701d30cd7fda5106d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_WORD_AT_A_TIME_H
 #define _ASM_WORD_AT_A_TIME_H
 
index 7654d71243dd7104dc9f1d07647020500d5481b7..a5b41f31a1c256afa3bb1017ebd840aa95399a52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CLKSOURCE_TIMER_SP804_H
 #define __CLKSOURCE_TIMER_SP804_H
 
index 4f93df50c23e4401339bc7d9714e6bdaee62fec9..4e655c2a4e15929f43cce7587d50cd5ef59505b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared async block cipher helpers
  */
index 7524ba3b6f3c8f2c028215e926afd960297a3728..852eaa9cd4dbcf7ccda2b428ab0a03f232823357 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for AES algorithms
  */
index 1450d4a27980b073d99095742e7fd95254e1e4a1..9b384670b3566f3a5572027afe099d6ff9e9aba1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for blowfish algorithms
  */
index 14fbf39d6380dd4f24c5319564e778400989199c..3d4ed4ea9c3b0294c4cf9843369357da9781e104 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_CAST5_H
 #define _CRYPTO_CAST5_H
 
index 32b60eb8bd24ee67996674440346b7c9e7e9352c..c71f6ef47f0f45945fb674f74187671239d78371 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_CAST6_H
 #define _CRYPTO_CAST6_H
 
index b7df35cd9f0a7a2b28db486db4de0d3d062c3d0f..b900902441646f8a3e4334e601249c6807de18a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_CAST_COMMON_H
 #define _CRYPTO_CAST_COMMON_H
 
index 445fc45f4b5b26abe2c631b64053c948e11f43e4..caaa470389e0ea0c5e29f446590822d2c7d82f06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for the ChaCha20 algorithm
  */
index 94418cbf90139eb68591bf23600f483d3039a3d2..1e64f354c2b83b37dbf2ddbd8564af8d48e0c110 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Software async crypto daemon
  *
index a7d252daf91b4ec6988e95e9b8aec9ed412573be..23114746ac08713b9a506dd60c00a73a662be767 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CRYPTO_WQ_H
 #define CRYPTO_WQ_H
 
index fc6274c6bb26cbfc6056c8abc1dcc5668c847119..d4094d58ac54add8fcd78459aaa834c83ca8c415 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* 
  * DES & Triple DES EDE Cipher Algorithms.
  */
index 2a61c9bbab8faf411e0696765e0511c6500821a8..9136301062a5cada1a7418db9274c7198c9227b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for GHASH algorithms
  */
index ef09f793820480d639fecea0027680b1e34afd41..66774132a7b60fe86e171df2314ba66a5c442bad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_HMAC_H
 #define _CRYPTO_HMAC_H
 
index 429509968f68d1f8f04fe4c8af8af7c044a4e72c..32ceb6929885e1abc5bcda021312a285f83357c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared crypto simd helpers
  */
index 25a2c8716375152ee49195c6beebdf5d0e3751a3..a9d44c06d081299b44c1ef75a7c4270a56d7efae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_LRW_H
 #define _CRYPTO_LRW_H
 
index 4a53c0d38cd2c48e105085966bf362fa1b54d93c..cceafa01f9073293cf4e813247b54bbe094728e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Software async multibuffer crypto daemon headers
  *
index 327deac963c08f01de978ba5fd02ee4da10a70ea..cf9e9dec3d214e310b4288c3ee4f346037f32384 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_MD5_H
 #define _CRYPTO_MD5_H
 
index 3f0c59fb0a61d8c0159ed7fa94c24c5f1e47b4e4..5757c0a4b3219e64c87026b4f3a5055529d6364d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Values for NULL algorithms */
 
 #ifndef _CRYPTO_NULL_H
index 894df59b74e44a403947ca75e669688f5165640f..c65567d01e8e73ebb39e0fbea3d96272847dc55b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for the Poly1305 algorithm
  */
index b7e0941eb6fcd4bcd11cf8bf695535927f1ce437..7dd780c5d05897b7ab3386b2020cf982773695a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for serpent algorithms
  */
index c94d3eb1cefdef3dc9437554d1b5a2eeb1879092..0555b571dd3488ac7ac565f779a84d2af69e9826 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for SHA algorithms
  */
index f4c9f68f5ffeb15c99e986b933b32aed4017b7fc..b9d9bd553b48b75950f678690186a77d6a90a99a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common values for SHA-3 algorithms
  */
index 095c901a8af3c155e44f123f2ea043edd0615f66..2e2c09673d88ec54288543cfe74192c8a0291f24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_TWOFISH_H
 #define _CRYPTO_TWOFISH_H
 
index c0bde308b28ae6566b6f96046b3a53b9951bec7f..322aab6e78a71f5b241bae2eab17d8fa5c461bde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CRYPTO_XTS_H
 #define _CRYPTO_XTS_H
 
index 5765648b5ef7fb0e32f71fbeb9f9814afa3f9be4..a728a1364e6691659ee07edfeb25695b58a1ca5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DRM_ATI_PCIGART_H
 #define DRM_ATI_PCIGART_H
 
index b2d912670a7fb07c27685008bc62b7bf5310a8b5..b05e462276d588dcd8b147711043c3e05bf180e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DRM_AGPSUPPORT_H_
 #define _DRM_AGPSUPPORT_H_
 
index a323781afc3f3a73a6c0bdbdd7ac1dfc5b10e9a0..1df291d117101901f94239343d5a303d448e8447 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRM_FB_CMA_HELPER_H__
 #define __DRM_FB_CMA_HELPER_H__
 
index 58a739bf15f1fd5d5cfb112dfa9b425fc07f5856..520e3feb502c569374f5c30f69f1afdb449728b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRM_GEM_CMA_HELPER_H__
 #define __DRM_GEM_CMA_HELPER_H__
 
index 104dd517fdbe032d4f0f5a87e96b64efbfe4b6b5..4f835490d77a761d11fd859afbf976595c7679ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRM_OF_H__
 #define __DRM_OF_H__
 
index 10122353b74482da3bcccb654ca00fc7dc006632..ee8d61b64f2935b9dbd176b1efdc304d420d4fd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * \file drm_os_linux.h
  * OS abstraction macros.
index 8bc073d297db2a233cf389d6c0656dec78c0445a..683742826511f895f93001aaaaa21af1aef5b71c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define radeon_PCI_IDS \
        {0x1002, 0x1304, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
        {0x1002, 0x1305, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \
index 70c9a1074acad77db0ebbe461e09e7ff31e427e7..4f311e836cdc26cd0118902cac0fc115c6e58107 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DRM_SYSFS_H_
 #define _DRM_SYSFS_H_
 
index a25483090cd57923d1e375238ff61e3e0ac4e7d6..3cb25ccbe5e68bf95ce13249f15549b7e2582281 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DRM_I2C_TDA998X_H__
 #define __DRM_I2C_TDA998X_H__
 
index b3bf717cfc456dd4e84897d3ffcafcaffd504927..c5db7975c6401f56cd6370028aaabc3ca9737b82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Common header for intel-gtt.ko and i915.ko */
 
 #ifndef _DRM_INTEL_GTT_H
index 0c30800175dfab26c353d588f2cc0c7892e75c7e..b07b8efab075453e003d76137607aff173164819 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Berlin2 BG2/BG2CD clock tree IDs
  */
index 72eaf91c9ca6c76946365631a20348407684e3c1..44b4ac3828508fc0641b69674901ea0dfe5c1564 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Berlin2 BG2Q clock tree IDs
  */
index acf5cd550b0c71e9a3fb0421760e794ee3c64803..04c3404b2d335a16ef8f19fe7df86cc4488b6831 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DT_BINDINGS_CORTINA_GEMINI_CLOCK_H
 #define DT_BINDINGS_CORTINA_GEMINI_CLOCK_H
 
index b21b91e736af037a0fdd54af53c6396a619b4003..4b48d15fe194fb2708ce9cf9b6bd23346d942304 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_BINDINGS_CLOCK_EFM32_CMU_H
 #define __DT_BINDINGS_CLOCK_EFM32_CMU_H
 
index 0ae6f5a75d2a5abcffbfbef0ebbbc20e906f8ff2..eee9fcc6e6af2006b8c55d073bbe9683ffa40d06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for Samsung audio subsystem
  * clock controller.
index c04a76d8facff42319d708830c985bf342427627..8c92528aa48ad1cd94494d6d0f09074ccff32c3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * GXBB clock tree IDs
  */
index 43153d3e9bd267904a6f93e11a27769338fae1be..6ed83f926ae71608e44e469b9fb8fb26ba006577 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides clock numbers for the ingenic,jz4740-cgu DT binding.
  *
index 467165e3cfee4ca7da1a94e17369fe8445712165..1859ce53ee388d4e21f82950cb9e072959737a47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides clock numbers for the ingenic,jz4780-cgu DT binding.
  *
index 7a510384a82ae19e1776bfc771b6a6626c987a9e..228a5e234af048ce8388bb02326a16c183fb4444 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MARVELL_MMP2_CLOCK_H
 #define __DTS_MARVELL_MMP2_CLOCK_H
 
index 3e45bdfe1aa45f60a6cb976304053202bda4ab8a..caf90436b84836ad4bb62f6591c7ea5e479169f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MARVELL_PXA168_CLOCK_H
 #define __DTS_MARVELL_PXA168_CLOCK_H
 
index d4f2e18919ff8f07ceb8b023f5b7658a45176d6c..5dca4820297fed620587c438f7b7c4ee4abad426 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MARVELL_PXA1928_CLOCK_H
 #define __DTS_MARVELL_PXA1928_CLOCK_H
 
index 135082a0b62f6c472421f9dbcb568d9d92de8554..7bf46238946eb2edb290a32c79ba02f09f62d1ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MARVELL_PXA910_CLOCK_H
 #define __DTS_MARVELL_PXA910_CLOCK_H
 
index a9c0306330b6a78e910fb5b1fb9fd3dfd107b01e..dea9d46d4fa7cef8dc7bb4988a7448adc679c524 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Meson8b clock tree IDs
  */
index 4f94919327ced87ee06cc5d1a6fe94d628525755..13c316bf2796b7b8aeb345a0b9d65c159196346d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for MPC512x clock specs in DT bindings.
  */
index 1a873432f965c548234b048bfa0084c9828559f4..75dabfc6adc14aae4c2f4f24603244ad07cb9e4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants clk index RK808 pmic clkout
  */
index 6731f1f00a84463d8ce15b4fdda0f75901432863..fb42dd0cab5fc00e0999473e2135eb48ad42a692 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __STE_CLK_AB8500_H__
 #define __STE_CLK_AB8500_H__
 
index 082edd9badfa1c1e87c203ba2734c95114fc7ca5..f0936c13377212e776e7a84976212205549f4245 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants clk index STMicroelectronics
  * STiH407 SoC.
index 2097a4bbe155df2c92e2cd5817ee47f345223226..90cbe6154c3904fe033251200873e0fcb6f15055 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants clk index STMicroelectronics
  * STiH410 SoC.
index f9bdbd13568dde25044d885e307acc89a8031d28..74302278024ea91ed0cdfc0968346e6beeabd976 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants clk index STMicroelectronics
  * STiH416 SoC.
index b62aa0b20217e4f9ad5ffe1be7a0ac2c8cbde17c..0e7fba0c52b32efaeca82d58ea4699c37dfec0da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants clk index STMicroelectronics
  * STiH418 SoC.
index ed5ca218c8573e735ccb3fc96ebd9c0ad43dafc5..bb5c2c999c0596bd3fce25e71119bce7b2230bc2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra114-car.
  *
index 9352c7e2ce0ba6349b1d298b8356e2c04ba742fe..4331f1df6ebeeda1fc6a9aa7f1dfdeb1b47c5e1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra124-car or
  * nvidia,tegra132-car.
index 2860737f04436ba0515895b7b04b85e4bfe7885c..c520ee2319509033736674a537fad35770583e5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides Tegra124-specific constants for binding
  * nvidia,tegra124-car.
index f73d32098f992a4c5ad0780253a72be0d38bad68..d6b525f4566fa28f813955cff1da3b5cf43effe1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /** @file */
 
 #ifndef _MACH_T186_CLK_T186_H
index 04500b243a4d89be0731a326baca289ee4efbd29..b21a0eb329214b055df6dddc8b16aec748abb6d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra20-car.
  *
index 46689cd3750bf11aed2115f4d34df9f1642ce265..a9dc1457cb006db607600ca6a3999ddc6c28036c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra210-car.
  *
index 7213354b9652c77f99fbd41a9a4c26d0bfb4662f..3c90f1535551a43dd7b67afe9de4a135bd062fee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra30-car.
  *
index 34757a3847ef3abd1e8a3166938dfeb170a41ea5..746831ff396c26b1bd10ff3c11ec82aa702f7a67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_TDA998X_H
 #define _DT_BINDINGS_TDA998X_H
 
index c5074584561d9459db81230a9d7081b30189cac8..32dd58a3d13cb982b968a17d719ba66a5645db5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for most GPIO bindings.
  *
index a1c09e88e80b772dcfdff48eb7554ee17d69d05f..7625dbc577c24045be4d2e09e531f638ac276023 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra*-gpio.
  *
index 38001c7023f1024af59bd698b0bb53082a768ac4..463ad398fe3eae104fe85e37d6b66b5263293f06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra186-gpio*.
  *
index 87abdd4a76740c128020f6b30f35007b5f79a8d4..08ef4d298b940fe3798c82304420ccbe9b4de11e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for configuring the I.MX25 ADC
  */
index c48aca1dcade61094996d23b0a69a3760a3ea5eb..9f8c7b808cd19108349250c87bb8c5de35405e71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _DT_BINDINGS_ADI_AD5592R_H
 #define _DT_BINDINGS_ADI_AD5592R_H
index a21413324a3f7bbb55a0f2e002d10f7b2211a7e5..bcf0ae100f21af8cfe0afc49d0a9107d4dfa62d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for most input bindings.
  *
index d4110d5caa3efde4e0b44402ed8d4d8a00aed6cc..0c85f65c81c7da2554f65e7702b1d053df3f6b06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the ARM GIC.
  */
index 33a1003c55aa2e10c8af8236fb8049e4c398412b..a8b310555f14a2a56340c1c04c77dcf1d59f7226 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for most IRQ bindings.
  *
index cf35a577e371d76444a15bcc2e0dc0505e113f9c..bd45cee0c3f05bea9df7262e8b457d06860ab88e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_INTERRUPT_CONTROLLER_MIPS_GIC_H
 #define _DT_BINDINGS_INTERRUPT_CONTROLLER_MIPS_GIC_H
 
index 8249558545c7dc3a6c7b49b606b962d68f2f8450..bb5217c64206a3eccd53442639395d2516427fea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the MVEBU ICU driver.
  */
index 7958bec7de8c1f8a27d75ba4e85900f21603ae09..e171d0a6beb269533615e15d7ac963e5753c75fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides macros for the common LEDs device tree bindings.
  *
index 491c5f974a92c7d1f69f12fa48b0a4a0f3263ac5..fd615749e70387bb36c47f502c09e82d08fbb4ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_LEDS_NS2_H
 #define _DT_BINDINGS_LEDS_NS2_H
 
index f5d66e5f5f10f7eb2f1b8e75e5de71315cf8882f..bcab5b7ca7852c2f157fbfe4d98983e9e5f9ac2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra186-hsp.
  */
index a0b5c7be683c85c391cf2fa652512532038d3adc..6b1fb6f5413b8c5fbcf7dc2d786468ee3428caaf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_C8SECTPFE_H
 #define __DT_C8SECTPFE_H
 
index 8f48985a31390809bcca258a9a3f8e055d8484c2..27c8386987ffa43db5aee53c655b9913e96ce8e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DT_BINDINGS_MEMORY_TEGRA114_MC_H
 #define DT_BINDINGS_MEMORY_TEGRA114_MC_H
 
index 7d8ee798f34e9a71cf28b317003825f685c604ec..f534d7c06019415d541df1b45db4a5def3591c69 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DT_BINDINGS_MEMORY_TEGRA124_MC_H
 #define DT_BINDINGS_MEMORY_TEGRA124_MC_H
 
index d1731bc14dbc6a67add863095b1f6c845d465eef..4490f7cf47726f64859333f72eca18b435276aea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DT_BINDINGS_MEMORY_TEGRA210_MC_H
 #define DT_BINDINGS_MEMORY_TEGRA210_MC_H
 
index 502beb03d777eb78b5d1c520cba5c84ab8aeaf02..3cac81919023d48de1c10f3753c02d24178c6a92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DT_BINDINGS_MEMORY_TEGRA30_MC_H
 #define DT_BINDINGS_MEMORY_TEGRA30_MC_H
 
index e66c0898c58e7025acd0b6fe7806f9d4d26d2530..9ef0cba90407603c85978448d9eaa4c8846cac3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides macros for ams AS3722 device bindings.
  *
index 552a2d174f015958bbba9e8c26a6116cb0ccf1b4..0404bcc47dd4f4688d94a0236e3b99544e6ad9d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the PRCMU bindings.
  *
index b911a0720ccd49a326f610b73bb23559cd5e31ec..1e19c5f908d7f588e79761d2968bd4a1fac75b14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides macros for MAXIM MAX77620 device bindings.
  *
index cdb075aae4e1abdef5b26ae8b988850abed781ae..c4f1d57ff4ff2114db5e4672aade9aeab7a15cc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides macros for Palmas device bindings.
  *
index 54aef5e21763d0256750de29814f6e9894021b69..c9204c4df5209fae8f89bbdf4d1f1781b0f585e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the Qualcomm RPM bindings.
  */
index d05894afa7e720310665e47d583d2c3cc35fbad0..88a7f56843bc2a62e665af3ae47ba764c9188718 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides shared DT/Driver defines for ST's LPC device
  *
index 082a81c9429883815effc721caaf3180d97b27ca..309e8c79f27b182056116c17b675ea0a6fbbe262 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the STM32F4 RCC IP
  */
index e36cc69959c76bc3b75f3aac20176d1cbdbd3e0a..8b7b7197ffd797f2dd105ed85c3d0bb8393cf43c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the STM32F7 RCC IP
  */
index c8e855c4a609e238c1961f4a401ecac85db510ad..042719218dbf77307ecfddf838c368fcb1cdf8ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for most Multiplexer bindings.
  *
index 226f77246a70c689f34c6720f1796cf59b4b8a3b..7d947a597220922a66f4776ff86db4751e016735 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants specific to AM33XX pinctrl bindings.
  */
index 344bd1eb3386bad14425861485a66dc25927cd54..46789157660b0cf1c2175ae89097017b5932c5a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants specific to AM43XX pinctrl bindings.
  */
index 0f484273da0de43aaee899316c6a2e63f7dda15f..afbabbc4ddbbb58d7adeadc965615806957b47ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants specific to DM814X pinctrl bindings.
  */
index 85739b308c2fb7da92424b9f5ae30755c49d9791..f393fbd689057b9e77bd4e881f16f293c661cb5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MT6397_PINFUNC_H
 #define __DTS_MT6397_PINFUNC_H
 
index 436a87be864afbbf857ffc0cbfaea4d39b4dc91d..2d6a7b1d7be2122105a306a428d1b22ec42d2a7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DTS_MT7623_PINFUNC_H
 #define __DTS_MT7623_PINFUNC_H
 
index fbd6f7202476be21cac02ee0b7105d8439e62a4b..49b5dea2b38800c528899d22bf8b21a76f7ce6d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for OMAP pinctrl bindings.
  *
index 914d56da9324219f2663823401c3cc29c9e48e1d..ac63c399b4b62606e662a1eb97176117cd7ed5ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H
 #define _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H 1
 
index b8ff8824e21b77be263f362b3d3b1d9163d80482..e5df5ce45a0f5bd28d2f4e2843c90aee154c1f29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the Qualcomm PMIC GPIO binding.
  */
index 2e360d8f780172209ac0a3a7096be1ec767bdee4..32e66ee7e83032ef5eaa7dc1d436c2e6ca5ee12d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the Qualcomm PMIC's
  * Multi-Purpose Pin binding.
index 6b609fe109107119d53604f8c9044625ce4b9ab2..cdb95024688055c230449feda63fd24fa67f4a0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Defines macros and constants for Renesas RZ/A1 pin controller pin
  * muxing functions.
index 26f18798d949bd2665fb9a89cae383bc038d81b8..9a5a028f0d00086cf7c6386a0e18f45293a0c8a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_STM32F429_PINFUNC_H
 #define _DT_BINDINGS_STM32F429_PINFUNC_H
 
index 6348c6a830e9a09c52f8ebc7f873141dabf476fc..4c28f8f4162144c44487f8cdd5773604c5f5d682 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_STM32F746_PINFUNC_H
 #define _DT_BINDINGS_STM32F746_PINFUNC_H
 
index cb673b5e8e1ef9fbdc310ca12faff7c1d7e909d5..06d99a8ddbc6954c35086ec757471643aa2a795a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_STM32H7_PINFUNC_H
 #define _DT_BINDINGS_STM32H7_PINFUNC_H
 
index b34cee95aa894fe3bff61df50b8dd376f3b9efba..15d531aa6e78dfbac464bee9872ba199ef3dfb70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_POWER_MT8183_POWER_H
 #define _DT_BINDINGS_POWER_MT8183_POWER_H
 
index b8b1045f3daa79bfba850fefb260dc68071ac222..f710b56ccd817c2c91422eb19e4410bde44ae690 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_BINDINGS_POWER_RK3288_POWER_H__
 #define __DT_BINDINGS_POWER_RK3288_POWER_H__
 
index 10c3c37153340f35582a164a3cccc71dfadf88f1..02e3d7fc1cce850e93c7406e5591c4918ac57669 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_BINDINGS_POWER_RK3328_POWER_H__
 #define __DT_BINDINGS_POWER_RK3328_POWER_H__
 
index 93633d57ed8485bb657979438bd355cc6cdb3edb..5e602dbd64ec633ed4151719244af36c0fa7f77c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_BINDINGS_POWER_RK3368_POWER_H__
 #define __DT_BINDINGS_POWER_RK3368_POWER_H__
 
index 168b3bfbd6f5fbff4baca312897d2b279e2057cf..aedd8b180fe4c491df0289783312d852fa297999 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_BINDINGS_POWER_RK3399_POWER_H__
 #define __DT_BINDINGS_POWER_RK3399_POWER_H__
 
index 96f49e82253ed25d06e405aa6000fc61c2bff84c..ab9a077e3c7d95362b55b70170f4efcc578c8e49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for most PWM bindings.
  *
index 0b886aee65e3702e75d619ce9bdb062c0225930a..f48aff23847a2adaceb5d192f65247e19d3254f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_RESET_CORTINA_GEMINI_H
 #define _DT_BINDINGS_RESET_CORTINA_GEMINI_H
 
index 322ec5335b65cf880aa70456a43581b1a89e1368..e7c362a81a971ad7881d881af7d86ef2e00484a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * This header provides index for the reset controller
  * based on hi6220 SoC.
index 60a189b1faef8a54cb97ca188bcd8aab9b2f5998..5bb4dd0d6377311574918aaf81f727af200f4416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the reset controller
  * present in the Pistachio SoC
diff --git a/include/dt-bindings/reset/snps,hsdk-reset.h b/include/dt-bindings/reset/snps,hsdk-reset.h
new file mode 100644 (file)
index 0000000..e1a643e
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * This header provides index for the HSDK reset controller.
+ */
+#ifndef _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
+#define _DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK
+
+#define HSDK_APB_RESET 0
+#define HSDK_AXI_RESET 1
+#define HSDK_ETH_RESET 2
+#define HSDK_USB_RESET 3
+#define HSDK_SDIO_RESET        4
+#define HSDK_HDMI_RESET        5
+#define HSDK_GFX_RESET 6
+#define HSDK_DMAC_RESET        7
+#define HSDK_EBI_RESET 8
+
+#endif /*_DT_BINDINGS_RESET_CONTROLLER_SNPS_HSDK*/
diff --git a/include/dt-bindings/reset/snps,hsdk-v1-reset.h b/include/dt-bindings/reset/snps,hsdk-v1-reset.h
deleted file mode 100644 (file)
index d898c89..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * This header provides index for the HSDK v1 reset controller.
- */
-#ifndef _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
-#define _DT_BINDINGS_RESET_CONTROLLER_HSDK_V1
-
-#define HSDK_V1_APB_RESET      0
-#define HSDK_V1_AXI_RESET      1
-#define HSDK_V1_ETH_RESET      2
-#define HSDK_V1_USB_RESET      3
-#define HSDK_V1_SDIO_RESET     4
-#define HSDK_V1_HDMI_RESET     5
-#define HSDK_V1_GFX_RESET      6
-#define HSDK_V1_DMAC_RESET     7
-#define HSDK_V1_EBI_RESET      8
-
-#endif /*_DT_BINDINGS_RESET_CONTROLLER_HSDK_V1*/
index 4ab3a1c94958ee7cf89e02ebd1bcd2ac336cd7b3..f2a2c4f7f06a7cb1c197bd078f66d719901626ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the reset controller
  * based peripheral powerdown requests on the STMicroelectronics
index c2329fe29cf6e0c9e455cb593d96d5444db0bbef..96f7831a1db0ea24f894429fd2bc68ff9641a8d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the reset controller
  * based peripheral powerdown requests on the STMicroelectronics
index fcf9af1ac0b2ab9420d3b5bdf9d3e50a18058bea..f682c906ed5a312d9c24f64782b9b3f272e1c7a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the reset controller
  * based peripheral powerdown requests on the STMicroelectronics
index 070e4f6e7486d17b85972a6dcba47c3cbc82542c..97d2f3db82bfdf8a875a197e61b31af42f2dba8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides Tegra124-specific constants for binding
  * nvidia,tegra124-car.
index 296ec6e3f8c0b3ed22e22e71d28a72ea33a40c22..9dc84ec76301eb058af2520b2ac99cdbf9254aa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides Tegra210-specific constants for binding
  * nvidia,tegra210-car.
index ae7c867e736a80684b4e2ae19a72b361573db47a..4b0914c0989da653110b700fa90871e3f0046fb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ROCKCHIP_BOOT_MODE_H
 #define __ROCKCHIP_BOOT_MODE_H
 
index 499076e980a37bb8c67873307e6f2e0778558064..3c3e16c0aadbfd585c0ed0fcd8e9db296a69a1d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_APQ8016_LPASS_H
 #define __DT_APQ8016_LPASS_H
 
index 378349f28069a16d810c25c1403d177047598a1c..1b29b295126af9e4ecb7546b60bae38ed1bed66b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __AUDIO_JACK_EVENTS_H
 #define __AUDIO_JACK_EVENTS_H
 
index 0c6d6a3c15a23f8fae0b8f5422a88a2971c92e71..7549d5019e8bf6749c477a64b59c9f28b645245e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_CS35L32_H
 #define __DT_CS35L32_H
 
index 50b09e96f247d3f6f83a6eaad3342c406b2bf81b..751fe1416f958ea0f3f5ae56309fe7992f2134eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_FSL_IMX_AUDMUX_H
 #define __DT_FSL_IMX_AUDMUX_H
 
index 0c69818d530ce8684e690d3247563631391e8c5a..77545f14c379ad02e88d35cafe7709232f7132cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DT_BINDINGS_SAMSUNG_I2S_H
 #define _DT_BINDINGS_SAMSUNG_I2S_H
 
index a4e1a079980b072d2e177b9546ca0f68a8566913..0daeb8385837c09f4f9ae721c59cdcc68ece332f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_TAS2552_H
 #define __DT_TAS2552_H
 
index f5cb772ab9c8bced39257ad3eab6a19381996f6d..c6895a18a4552a48e7cc15350c75d45e36f72c5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DT_TLV320AIC31XX_MICBIAS_H
 #define __DT_TLV320AIC31XX_MICBIAS_H
 
index 8c2e3095f704e533a5e076c031db07bedc1538d6..eed91a16c32fdbc818718fbdcbf80612ab92a518 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for the LM90 thermal bindings.
  */
index 2a99f1d52bb5e778648ebb0882bc6fb1d9f4eb2c..c15e8b709a0de6d7a9c9dd0a042d3d956e1a27f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header provides constants for binding nvidia,tegra124-soctherm.
  */
index f69c4ac197a0bd53952d8e6b0f89353f7b8effbe..aa6d3e050cc71e4e2c724c262a0b7fd8dbd028e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KEYS_CEPH_TYPE_H
 #define _KEYS_CEPH_TYPE_H
 
index b24ff086a662af04535fc3707a838ce4c526753f..9c777d2c98f54414b8ac427d2025aa63a88eda2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for PCI support.
  */
index ee884168989fcde6be427b6fb81817fc9e011151..600cf45645c60c0ebe1d6f8016e9c646051c1adf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __A_OUT_GNU_H__
 #define __A_OUT_GNU_H__
 
index dccc2d4fe7de690b30589334bf615d0e814590b5..18e1955f81f59eaefdff0dad9ac19726426c6201 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  BSD Process Accounting for Linux - Definitions
  *
index 1d0ef1ae80362d50f1b620b54c01313d6c46b936..50d88bf1498d71059b241767d0a646a9ba970a20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ACPI_PMTMR_H_
 #define _ACPI_PMTMR_H_
 
index cde41300c7ad8679964e17447e82b143922d30de..f6306fc8601528d2fc3f6523af05110d3e422450 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for ADB (Apple Desktop Bus) support.
  */
index 0d991071a9d4beb147c2f60e3102723ceac7ffd7..4836e382ad52f40cefb4c343420fcccd8085816f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ADFS_FS_H
 #define _ADFS_FS_H
 
index 43799bd17a0257dce95d79287e3a30ecbf525399..8f87bbeceef41948fd0dc22cf16db22534b04e71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2006 Intel Corp.
  *     Tom Long Nguyen (tom.l.nguyen@intel.com)
index 62be3a40239d6c148b0d1b9f017453b2c4b7fd39..230c871ba0840723d0c08efd7167a1dc4790adac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_AHCI_REMAP_H
 #define _LINUX_AHCI_REMAP_H
 
index fdd0a343f45527ee2b5d4a787ad5388a6ce4e47a..9d8aabecfe2d40634352ee3729b26da4c760a670 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX__AIO_H
 #define __LINUX__AIO_H
 
index c70aac13244aa68930e248d9fef21300f167d38f..0760ca1cb009dab5f0f844a1f706f8c089fbf27f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ALARMTIMER_H
 #define _LINUX_ALARMTIMER_H
 
index 953b178a1650a159a3aa0d8ed38647a42319870c..527a142cd530a9e4b7ff4efd28fb2391c04de641 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * altera_jtaguart.h -- Altera JTAG UART driver defines.
  */
index c022c82db7cac72baae890d7e0be4ca88bb3f127..3eb73b8c49c8ceddff9b2a9726e8bcde4e01f516 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * altera_uart.h -- Altera UART driver defines.
  */
index 8c98113069ce9264a2bdf2fe7ae10198ceed0b9d..da8357ba11bcb45b52a2c23d2e0aedb9c51096e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/amba/mmci.h
  */
index 346993268b451313dbb9cfb0893662e868185e35..202a77dbe46df82c85c8dc3c4100dbf215adc47b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AMIFD_H
 #define _AMIFD_H
 
index 76188bf48d3b8085192cedfa1cecbbdfd8f17a64..9b514d05ec70e47ebd2e7d85ba08fa7d7f2068d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_AMIFDREG_H
 #define _LINUX_AMIFDREG_H
 
index 8013a45242fe37df8b07d8970e14f3ab05d570da..d0d7d96261adf11b9a7dec250918b38470141852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/anon_inodes.h
  *
index 0a95e730fcea706a185f52af4b3c563ee40e7d7f..445af2e3cc21039df9971bafebb852d087b2ad46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * apple_bl exported symbols
  */
index 716ce587247e0b2b503969ee1ca2f1c090942eaa..d4fcb0efb896c3e4a40cb527c4da531bc58b3831 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/arch_topology.h - arch specific cpu topology information
  */
index 619d9e78e6447db2cb4df71f6464b19f07e790f0..ff2120215decca77cb0fa1f0fd90c65a54bb2c68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ATA_PLATFORM_H
 #define __LINUX_ATA_PLATFORM_H
 
index 73fd8b7e9534434d663aa2a18ab5c2a58421b739..4d356e168692514c3e09e4686289693ab8b74579 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ATALK_H__
 #define __LINUX_ATALK_H__
 
index 30006c4359516970be63aaa3ab788c260fe4eda1..4b50fd0a6eab22b2da4a1b58f4786c41e3c78bb2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atm.h - general ATM declarations */
 #ifndef _LINUX_ATM_H
 #define _LINUX_ATM_H
index db6b65fc0aec7fa2bd5526015aedb29c6f5c7f00..c8ecf6f68fb508ff6c76a3aa23192fdc1fa3dbcf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by
               driver-specific utilities) */
 
index 0ec9bdb1cc9f9bdcad76caae816e7c8518f272f3..0c27515d2cf6db3683da2341a700283f82a99645 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* atmdev.h - ATM device driver declarations and various related items */
 #ifndef LINUX_ATMDEV_H
 #define LINUX_ATMDEV_H
index 42a9e1884842e9631f7e83b2381850c4ce474f22..1491af38cc6e4bf7418998850bdc223b89c89c5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ATMEL_MCI_H
 #define __LINUX_ATMEL_MCI_H
 
index fdb545101ede3c0518361ebb6bc1f755f6a3779b..6091d2abc1eb2471653afe757957a7b2c7ab0908 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INCLUDE_ATMEL_SSC_H
 #define __INCLUDE_ATMEL_SSC_H
 
index 40d6bfec0e0d0fb8ef40de6a6bb37a9d1905cf93..cd18203d6ff3278e477e24001fe2af058c5b00b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Atomic operations usable in machine independent code */
 #ifndef _LINUX_ATOMIC_H
 #define _LINUX_ATOMIC_H
index 74d4d4e8e3db9f173611dc169a20955a7c89dc45..cb708eb8accc59d3dafee57c7c696647e80be471 100644 (file)
@@ -314,11 +314,7 @@ void audit_core_dumps(long signr);
 
 static inline void audit_seccomp(unsigned long syscall, long signr, int code)
 {
-       if (!audit_enabled)
-               return;
-
-       /* Force a record to be reported if a signal was delivered. */
-       if (signr || unlikely(!audit_dummy_context()))
+       if (audit_enabled && unlikely(!audit_dummy_context()))
                __audit_seccomp(syscall, signr, code);
 }
 
index 3e0fbe44176328193cf849fd039d70e91694a4ca..f68d0ec2d740d6e5138e7cc7d63ae0dcf2b706c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_AUXVEC_H
 #define _LINUX_AUXVEC_H
 
index 7ddaf340d2ac982bf0e7a3a209017c071e2fa42d..1b6f5560c264d0fd0557800e1e66ba4722c4b758 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_AVERAGE_H
 #define _LINUX_AVERAGE_H
 
index 866c433e7d3220b29170ed98ccd1b70803a43964..fff4cfa0c21df2117f99d93f7d6c7130d02c9d87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BACKING_DEV_DEFS_H
 #define __LINUX_BACKING_DEV_DEFS_H
 
index 854e1bdd0b2a4978aa739d056103400ed65e1381..16621579a3db313bf4a5f315a732ae6121e8b8c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/backing-dev.h
  *
index 5f2fd61ef4fb12ec52d3384abab93fabd87c084a..af70035485937a696812925f27e8d703537f3474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Backlight Lowlevel Control Abstraction
  *
index c3bdf8c594800a49101d2974d91172bcd4686871..2426276b9bd3c40a874dc958ad087f8337169926 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BADBLOCKS_H
 #define _LINUX_BADBLOCKS_H
 
index 79542b2698ec7bae9f915fd6b7f2fefa5891e5a3..fbbe6da40feda116cd90c8041bd551d56b8b933f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/balloon_compaction.h
  *
index 18fff11fb3eadbe6ebd715a584aa49909d1dd30f..118bea36d7d49082d5725a9b9d2ecadb40898846 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BCD_H
 #define _BCD_H
 
index 8d9d07ec22a57938bb188ff9be036ca31a7e881a..fc9dcdb4b9795209a3913f70875c4c0bc9744c10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCM47XX_WDT_H_
 #define LINUX_BCM47XX_WDT_H_
 
index 290c231b8cf15f8f1d6d9464692c40e7826f963b..c8c7f01159fed5b73b15fdd4e46de0f16ff908e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BCM963XX_NVRAM_H__
 #define __LINUX_BCM963XX_NVRAM_H__
 
index 161c7b37a77b4cef3697132e27e1948468185d3b..b87945cb6946aae3485bc397acb25e146e284b6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BCM963XX_TAG_H__
 #define __LINUX_BCM963XX_TAG_H__
 
index 8eeedb2db9242ec0101d5c390db02cc51d5999e1..ef61f3607e99942341ab37095943e432e1161779 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_H_
 #define LINUX_BCMA_H_
 
index 93bd73d670d5bccf7269ed150c96388d30f52346..688cf590c99bb4052a38a3d0c3087c18fd1fbbeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_ARM_C9_H_
 #define LINUX_BCMA_DRIVER_ARM_C9_H_
 
index 2f1c690a3e6622a5b79fa2486854574788083c24..d35b9206096ded9ead41b278aef947d6da5d1824 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_CC_H_
 #define LINUX_BCMA_DRIVER_CC_H_
 
index 4354d4ea6713da3d1121cde7bd8a0c0325626243..420e222d7a22bc5c38e190fe0a185ebb6b8e2c16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_GMAC_CMN_H_
 #define LINUX_BCMA_DRIVER_GMAC_CMN_H_
 
index 8eea7f9e33b45d1665aed004f874d9b931ad2769..798013fab54fdc8a47fd1eedef6b298ee2ad8d1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_MIPS_H_
 #define LINUX_BCMA_DRIVER_MIPS_H_
 
index bca6a5e4ca3db3a6370b83621c80bb5ca876f27a..68da8dba5162c0d55ca02f75806a521d9c783aa0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_PCI_H_
 #define LINUX_BCMA_DRIVER_PCI_H_
 
index 31e6d17ab7985c4800110121ceca7209a38e4838..91ce515e3a77cb526fdf04f6dd406a1048c278b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_DRIVER_PCIE2_H_
 #define LINUX_BCMA_DRIVER_PCIE2_H_
 
index 9986f8288d01ae2fc22273f7aad6c86ac6cc8be5..944105cbd67180704e6073024e054dabb4c64d50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_REGS_H_
 #define LINUX_BCMA_REGS_H_
 
index 1b5fc0c3b1b5f0292a653aafa77a3b5e0b7ec982..7cca5f859a907c16781de6e9a3f4d9067fc7ca38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_BCMA_SOC_H_
 #define LINUX_BCMA_SOC_H_
 
index fb44d6180ca0e74960abd1cd5dbefb8cd9461273..b0abe21d6cc9a18310bcb9eea6b16ab762be5272 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BINFMTS_H
 #define _LINUX_BINFMTS_H
 
@@ -131,7 +132,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,
                           int executable_stack);
 extern int transfer_args_to_stack(struct linux_binprm *bprm,
                                  unsigned long *sp_location);
-extern int bprm_change_interp(char *interp, struct linux_binprm *bprm);
+extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
 extern int copy_strings_kernel(int argc, const char *const *argv,
                               struct linux_binprm *bprm);
 extern int prepare_bprm_creds(struct linux_binprm *bprm);
index 3b5bafce433763a4e7c6bb0302fa373dec7364fb..bbc4730a6505c1af8ab04114d87d2a2289672546 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BIT_SPINLOCK_H
 #define __LINUX_BIT_SPINLOCK_H
 
index 8b9d6fff002db113cb2233a2d80b3186ff041ef0..f2deb71958b2dbee591c4c9bf95ee6f1e70f41c4 100644 (file)
@@ -92,7 +92,7 @@
 /**
  * FIELD_GET() - extract a bitfield element
  * @_mask: shifted mask defining the field's length and position
- * @_reg:  32bit value of entire bitfield
+ * @_reg:  value of entire bitfield
  *
  * FIELD_GET() extracts the field specified by @_mask from the
  * bitfield passed in as @_reg by masking and shifting it down.
index 700cf5f67118504d85def31a2be37c7c7b117ce3..19748a5b0e778d5ad7948a3ffd560d92917fa5f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BITMAP_H
 #define __LINUX_BITMAP_H
 
index 8fbe259b197c987a56190328997aa8ded227c067..d03c5dd6185daafd871e8ad8e685fa1c0af5cd8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
 #include <asm/types.h>
index b97be27e5a85c9901724a20daef32aa8da4c73be..50fb0dee23e8662120461cd227cf11f548939339 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BITREV_H
 #define _LINUX_BITREV_H
 
index 9d92153dd856f49eb927271e493a4416a2ea15a7..8bbc3716507ac254c38aebeda44fa69a300aa47d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BLK_CGROUP_H
 #define _BLK_CGROUP_H
 /*
index 6ab595259112c6cccbfec6c4fc1730b3b4e8b73e..6338551e0fb9308fc43994353f96d6b6df235c3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BLK_MQ_PCI_H
 #define _LINUX_BLK_MQ_PCI_H
 
index b1ef6e14744f62a37ec3f93f33fe11f27a35ad4b..69b4da262c4508ba98560e79fb986013723fa824 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BLK_MQ_VIRTIO_H
 #define _LINUX_BLK_MQ_VIRTIO_H
 
index 50c6485cb04f5d4f306ef794758e280113b5756a..994cbb0f7ffca5a38771c4dd24eb46eccda6abde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BLK_MQ_H
 #define BLK_MQ_H
 
index a2d2aa709cef4afc0bb5c3875df3073b81b368fa..96ac3815542c1484b6c9300dafdef53bacdf4903 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Block data types and constants.  Directly include this file only to
  * break include dependency loop.
index 460294bb0fa52560b44e4764ce34cf7bce9cd2ce..8da66379f7ea7afceb9af2f32f998d7ca71c25a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BLKDEV_H
 #define _LINUX_BLKDEV_H
 
@@ -551,6 +552,7 @@ struct request_queue {
        int                     node;
 #ifdef CONFIG_BLK_DEV_IO_TRACE
        struct blk_trace        *blk_trace;
+       struct mutex            blk_trace_mutex;
 #endif
        /*
         * for flush operations
index bef124fde61e55ee34d3012b8597199ddfc2fbca..1c91753c3c28fbd92fab6cef546db96f158efb0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BLKPG_H
 #define _LINUX_BLKPG_H
 
index 67b4d4dfc19c5e6f1e958ca73fc8f463d2a4991c..8804753805ac554f3b0590b19d43f2509a7aea2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BLKTRACE_H
 #define BLKTRACE_H
 
index 225bdb7daec749ba85e93c35aceb39fac8be53b5..511ab123a8223493f8c15ee5dbc683f2ca747dd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BLOCKGROUP_LOCK_H
 #define _LINUX_BLOCKGROUP_LOCK_H
 /*
index e223d91b6439b091c8d4ac2402b2bfc910f38af8..fdf40ca04b3ca03b1ad8d6c75a947a126a09269c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Discontiguous memory support, Kanoj Sarcar, SGI, Nov 1999
  */
index 8fdcb783197d723a60dc548114af08cd6de9ca88..a19519f4241dce4f18b8c338648a70af75392994 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BH_H
 #define _LINUX_BH_H
 
index d41d40ac3efdb940bf96391d17ee737456cd24c2..44dfae288fcf1b71a4ad6b521a2b242bba11ae2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BPF_CGROUP_H
 #define _BPF_CGROUP_H
 
index 8390859e79e70b9a07f0948e1efaa5adbfb0c99c..f1af7d63d6786673ac087dbfca66310a1236126f 100644 (file)
@@ -368,6 +368,11 @@ static inline void __bpf_prog_uncharge(struct user_struct *user, u32 pages)
 {
 }
 
+static inline int bpf_obj_get_user(const char __user *pathname)
+{
+       return -EOPNOTSUPP;
+}
+
 static inline struct net_device  *__dev_map_lookup_elem(struct bpf_map *map,
                                                       u32 key)
 {
index b22efbdd2eb45ba85ffef7866953afac9c7c6382..e6fe98ae3794330298f834a89a7448b5fa9d730b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BPF_TRACE_H__
 #define __LINUX_BPF_TRACE_H__
 
index 6f1a567667b8ba8a2999cb867b61eb7b8e7c2f2f..e1149327a0c0e00b9fad7a9b152e0ac2a58dda17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* internal file - do not include directly */
 
 #ifdef CONFIG_NET
index abcda9b458ab65143acb1fb28b50225adbec83fd..4f087f86a7413f8eebb1c15ba566118d7fc50372 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BRCMPHY_H
 #define _LINUX_BRCMPHY_H
 
index 90b1aa867224140aae88f5f32be48f7379728371..62b1eb34885843ee3b8f74e267c13ee02ece6895 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BSEARCH_H
 #define _LINUX_BSEARCH_H
 
index 7173f6e9d2dd55fbcba32070b15194f8538b9b1c..2a202e41a3af53f3da1beadd94fbe41bd5a6f157 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BSG_H
 #define BSG_H
 
index 0b3414c4c9287f71e9071ec2a6df077c668da22b..22c09f5c3c39c36d567261e7c4f8fa84924fd43f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 extern struct btree_geo btree_geo128;
 
 struct btree_head128 { struct btree_head h; };
index 9a1147ef8563bec13ba46195657945b10866f922..fb34a52c788b22a433e294c27878364e894583bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define __BTREE_TP(pfx, type, sfx)     pfx ## type ## sfx
 #define _BTREE_TP(pfx, type, sfx)      __BTREE_TP(pfx, type, sfx)
 #define BTREE_TP(pfx)                  _BTREE_TP(pfx, BTREE_TYPE_SUFFIX,)
index 65b5bb0583245fb1ca989e9416b4f8784382e52a..68f858c831b11e81a2d0a73e84a084abe1047119 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BTREE_H
 #define BTREE_H
 
index 22d799147db2bcb9f6a85ce7bf7481cbf81c4515..9a37a45ec801081e393bbdd1595d18b0edf06ccf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BTRFS_H
 #define _LINUX_BTRFS_H
 
index c8dae555eccf9f30e50213eef55d2e6bee648d06..afa37f807f12c1065a44ba35ffe6c88423756fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/buffer_head.h
  *
@@ -232,6 +233,7 @@ int generic_write_end(struct file *, struct address_space *,
                                loff_t, unsigned, unsigned,
                                struct page *, void *);
 void page_zero_new_buffers(struct page *page, unsigned from, unsigned to);
+void clean_page_buffers(struct page *page);
 int cont_write_begin(struct file *, struct address_space *, loff_t,
                        unsigned, unsigned, struct page **, void **,
                        get_block_t *, loff_t *);
index 5d5554c874fd6f611189a6b2f59861a7fa2e7f8b..da4231c905c85a644c4d2223b5167bfe811ad36f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BUG_H
 #define _LINUX_BUG_H
 
index b7d22d60008a9004e1f5669aae812cdddb7dddec..3efed0d742a054cd00e343236bbd2dfcf6c3b94f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BUILD_BUG_H
 #define _LINUX_BUILD_BUG_H
 
index ffd215988392d96db0739118382bc3e4257efb29..d64a524d3cfb832ab4d0edbbc78f40831c71cf09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H
 #define _LINUX_BYTEORDER_BIG_ENDIAN_H
 
index 89f67c1c316064614fca10a47a3be5319bbe874d..133b76d0d2c0349bd47544360673e2ebf332d5d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BYTEORDER_GENERIC_H
 #define _LINUX_BYTEORDER_GENERIC_H
 
index ba910bb9aad0c75b83be099bf98b844505f72688..1ec650ff76cb311439ebde523e970bb200fa059e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
 #define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
 
index 1be04f8c563a0c60bdfca72a36c120ec96ef327c..750621e41d1c1ccaab7f8a1b1dcca4bd7d6f289a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_CACHE_H
 #define __LINUX_CACHE_H
 
index 6a524bf6a06d112613075547c5b17a069da00077..3d9805297cda826e5f2f26ac2669259258088957 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CACHEINFO_H
 #define _LINUX_CACHEINFO_H
 
index c9a17bb1221c326f7569d423d93304fe241f72e0..6099bc18bd0c7efa4aab18284ede65cde71a0af7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/can/core.h
  *
index 141b05aade81ddb5974c18e837bd6ea1befe4fe5..61f1cf2d9f440ce321e8a0f782a1003326aaf9ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/can/dev.h
  *
index 78b2d44f04cffc83f7ce7feb4cd08c94cea84ce8..9587d6882906db86cb598470a7a27d200ea12435 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CAN_PLATFORM_CC770_H
 #define _CAN_PLATFORM_CC770_H
 
index d44fcae274ff2a0877c06091bfaafe68e0cc8d6d..9e5ac27fb6c107aeb0e6f6533751368993f0f89d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CAN_PLATFORM_MCP251X_H
 #define _CAN_PLATFORM_MCP251X_H
 
index 0f4a2f3df5040b87d6335cb9e13647fd6b24bc96..a43dcd0cf79ee3ec47a0fa8d2f146a06a02d2c97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CAN_PLATFORM_RCAR_CAN_H_
 #define _CAN_PLATFORM_RCAR_CAN_H_
 
index 93570b61ec6c58bfa433e6b4f710fb9a4e466121..5755ae5a47122b553d9de4d6b80a7d9aeeecd120 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CAN_PLATFORM_SJA1000_H
 #define _CAN_PLATFORM_SJA1000_H
 
index 51bb6532785c3b9918698c3761d5a6e5088e176c..b3379a97245c1f2169bfb08a9be17dccb81a6693 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/can/skb.h
  *
index b52e278e474471909e31070a4e3d2ad7a49fe9b0..f640dcbc880c0c291cdbd2a5780f4fd21be4b7b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is <linux/capability.h>
  *
index 84b6e2d0f44d491409f92c39e379d17e440e0074..1d5229200a717ce82e088a6e7fdf4d24196453b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CCISS_IOCTLH
 #define CCISS_IOCTLH
 
index cb28eb21e3ca52054fbb65d72e22c93127aaf472..0e8cd6293debbaa177d9ae232e61bbb500b40c7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CDEV_H
 #define _LINUX_CDEV_H
 
index 6e8f209a6dff05156c2c56aee33b309b61bb91ee..e75dfd1f1dec6eb8e5ca7331e3546463c9f37a63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * -- <linux/cdrom.h>
  * General header file for linux CD-ROM drivers 
index a6747789fe5c25679d99fcc42b74042ea29251a3..e931da8424a44f82666cf0233a2e1c527c1442e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_AUTH_H
 #define _FS_CEPH_AUTH_H
 
index 07ca15e7610016439fb4707a6e2a75418f456e87..5e58bb29b1a36b55e86bf8951cd04eaf149853e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FS_CEPH_BUFFER_H
 #define __FS_CEPH_BUFFER_H
 
index 51c5bd64bd0022c8a3f197d846c23448e7bb6a6e..d5a5da838cafa4c6c31cc58445e2e6f3b3ba0f99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_DEBUG_H
 #define _FS_CEPH_DEBUG_H
 
index 040dd105c3e72aa4d9e20621515381192ab2b07f..59042d5ac52026a5f43416e6a92a2b70166e63b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CEPH_FEATURES
 #define __CEPH_FEATURES
 
index 146507df8650c0a5af41c2eea40705ffcda8424a..97bab0adc58ac4cc4f8704ec9661178548e3adbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_CEPH_FRAG_H
 #define FS_CEPH_FRAG_H
 
index b422170b791abeabb83d15463d05ba6401828b3c..88dd51381aaf9d72e18f277dee6173a214bcb8c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ceph_fs.h - Ceph constants and data types to share between kernel and
  * user space.
index d099c3f90236276976586dfbf505ff46141e7ddb..fda474c7a5d62b0e9da00917a300db04ec4ad5da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FS_CEPH_HASH_H
 #define FS_CEPH_HASH_H
 
index 0594d3bba774c5a78c0bc7e4fde5fbd741bd1c17..bea6c77d2093c9a4dd062bc026500cd903184a48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CEPH_CLS_LOCK_CLIENT_H
 #define _LINUX_CEPH_CLS_LOCK_CLIENT_H
 
index 29cf897cc5cd3cafe2ed69a415fb0713d90704b2..fa5f9b7f5dbbced4b0d94b949338e6625c4bf064 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_DEBUGFS_H
 #define _FS_CEPH_DEBUGFS_H
 
index 14af9b70d3017b9cbad70689ffa34bb880c6b742..d143ac8879c6bdcbbed432e4cedf8e897194e1fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CEPH_DECODE_H
 #define __CEPH_DECODE_H
 
index 4c846aabd9f646fed049130653934560fb2bba0b..c2ec44cf5098af4d247cc22d124625eef32fb471 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_LIBCEPH_H
 #define _FS_CEPH_LIBCEPH_H
 
index d5f783f3226a8deb43f9336e7fe3c1b955b0e137..0067d767c9ae03b25a4a03e5f915262f0f6b34c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_MDSMAP_H
 #define _FS_CEPH_MDSMAP_H
 
index fbd94d9fa5dd4fdcc760a677faf85276cefa6cca..ead9d85f1c1114412c4f83688e377e7f9f0c6294 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FS_CEPH_MESSENGER_H
 #define __FS_CEPH_MESSENGER_H
 
index 0fa990bf867a1ca047e5ae71190afe908061f458..3a4688af7455ea7e61d0b02a1b6b843af68c017e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_MON_CLIENT_H
 #define _FS_CEPH_MON_CLIENT_H
 
index ddd0d48d0384496fcac771a6d15b0d49ca4182a5..76c98a51275884f74a78161293e32bc50690f65a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_MSGPOOL
 #define _FS_CEPH_MSGPOOL
 
index 0fe2656ac415711cce5bfc53f3c9ed753bf3ed26..73ae2a92654851fd7fd68eaf71481e635dc6ca08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CEPH_MSGR_H
 #define CEPH_MSGR_H
 
index adf670ecaf94688449f92f240dd3f0bde3b87500..52fb37d1c2a5fa2fcd5d54c71dfe231bb926f4be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_OSD_CLIENT_H
 #define _FS_CEPH_OSD_CLIENT_H
 
index af3444a5bfdd1a0e45493d9603596fd38c042a24..d41fad99c0fa7ece3c05fa1478f162c82da7e2ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_OSDMAP_H
 #define _FS_CEPH_OSDMAP_H
 
index 75a7db21457de5e6fce1e75cfca3749ff539057c..7edcded0764185732adfb824c94770878201cbf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FS_CEPH_PAGELIST_H
 #define __FS_CEPH_PAGELIST_H
 
index 01408841c9c4d179bdb72daccad4cf594f5ae5e3..f1988387c5ad03882decfa12f444f250fe905134 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CEPH_RADOS_H
 #define CEPH_RADOS_H
 
index 1b02c96daf75fd080fc8ba4ec4a10c6c107f8026..a4a9962d1e14676846c0ff2fb6a316f8d21e5523 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_STRING_TABLE_H
 #define _FS_CEPH_STRING_TABLE_H
 
index d3ff1cf2d27e36a02fc5f0597b66bf39afc06d08..27cd973d3881b2bcaf798ed2128c1306fddfa106 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_TYPES_H
 #define _FS_CEPH_TYPES_H
 
index ade4a78a54c2454cbd40646547f40388cf4b85d3..1dff0a478b45aace3903af82883cb3bf39194774 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/cgroup-defs.h - basic definitions for cgroup
  *
index d023ac5e377f4bd21b0a6fdc5ae33a100990e32f..dddbc29e20098e0a9f0377f64b0945c87691d315 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CGROUP_H
 #define _LINUX_CGROUP_H
 /*
index d0e597c445854531b21a0915d1c42190833e5a2e..acb77dcff3b41dbb5d265ee358b1a6958d809c11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * List of cgroup subsystems.
  *
index 90f2471dc6f2382d9f522d0c80287a09069c9ed8..7cf262a421c3f4105424b4d7a12116108b6b9251 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * See Documentation/circular-buffers.txt for more information.
  */
index bbb3712dd8923feca7e8239cf044ef5ef041d7c0..5f5730c1d324ffe39121869405baa29285d8631a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CLEANCACHE_H
 #define _LINUX_CLEANCACHE_H
 
index 607321fa2c2b49dbcdd7a00b6405bddef149b8aa..4451304603805afd76272363c9bcf0fca4f9ec04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CLK_MMP_H
 #define __CLK_MMP_H
 
index a116926598fdd6740d709806e3d06792e61c86f8..8ae9a95ebf5b5053e576a5995fa4d58b57f20bb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*  linux/include/linux/clockchips.h
  *
  *  This file contains the structure definitions for clockchips.
index a78cb1848e656d7042526752034b6d4f1b622de5..7dff1963c185c9d2c85da84f5e89f96cc5a2b3b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*  linux/include/linux/clocksource.h
  *
  *  This file contains the structure definitions for clocksources.
index 88bee3a3309045970ff2a561a519b256f6261141..ea4958e07a14a0dddfdb1393255488f8559e4aa1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        _CM4000_H_
 #define        _CM4000_H_
 
index 3e8fbf5a5c73ae1b0a40308de1158df65988c2fa..bf90f0bb42bd584fa59c1de2b0c04b7e139ae3be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CMA_H__
 #define __CMA_H__
 
index 2e6dce6e5c2acf9bae626033c700ec0da012bbcb..68a541807bdf5a9581cd56955a6f21d67369fd8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Parsing command line, get the partitions information.
  *
index 31e4e1f1547cc1698514d854898110446ba4a4f7..15170954aa2b3d35b1f817c782e30febee6349f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CODA_PSDEV_H
 #define __CODA_PSDEV_H
 
index 0d8415820fc35409fbabcbef3bfe05c4cfa99546..68250a57aace9f017a6cfe3eaf0468a652100535 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_COMPACTION_H
 #define _LINUX_COMPACTION_H
 
index a5619de3437d9b1691b0e707bb2577b075592822..3e838a828459d45100ce888b2db06e6306fa8e9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_COMPAT_H
 #define _LINUX_COMPAT_H
 /*
index de179993e039d41d7e9034b5744be40954f81c09..54dfef70a072744981e77f2621f8c01309c38970 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_COMPILER_H
 #error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
 #endif
index 16d41de92ee3a7799c873d479f3f2770bf87ba4c..bb78e5bdff26334376eb54a4b142845bbbaf8c46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_COMPILER_H
 #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
 #endif
index d4c71132d07f0bd03b22766310455b8c133b6070..523d1b74550f20e39c86f3042982185e3dfeb7bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_COMPILER_H
 #error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
 #endif
index e95a2631e54561d8981a9e849802ba9f9f65f998..202710420d6deba1bba8107616359ae069ffd5e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_COMPILER_H
 #define __LINUX_COMPILER_H
 
@@ -190,13 +191,13 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
        asm("%c0:\n\t"                                                  \
            ".pushsection .discard.reachable\n\t"                       \
            ".long %c0b - .\n\t"                                        \
-           ".popsection\n\t" : : "i" (__LINE__));                      \
+           ".popsection\n\t" : : "i" (__COUNTER__));                   \
 })
 #define annotate_unreachable() ({                                      \
        asm("%c0:\n\t"                                                  \
            ".pushsection .discard.unreachable\n\t"                     \
            ".long %c0b - .\n\t"                                        \
-           ".popsection\n\t" : : "i" (__LINE__));                      \
+           ".popsection\n\t" : : "i" (__COUNTER__));                   \
 })
 #define ASM_UNREACHABLE                                                        \
        "999:\n\t"                                                      \
index cae5400022a3535df8d95190162f62211db9c6b7..7828451e161aed19181a3b6cd6e210e6468cb190 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_COMPLETION_H
 #define __LINUX_COMPLETION_H
 
index a559eebc0e0f5b32e6214955f7c54933ab38c79f..e71fbbbc74e2b44cc7b39ddbc9f5cd70bbd29397 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef COMPONENT_H
 #define COMPONENT_H
 
index 6fd3c908a340d234aee8ec8c8a99e0612f9c8a91..c0ec478ea5bf17df0d7ce0356a99e66728cc77b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * console_struct.h
  *
index c4811da1338b7c92546e5d0d0a48c8c4d8c9c7c6..254246673390507f4738fa0f04493c4de08d1293 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * consolemap.h
  *
index c78fc27418f218c3d343a4c176602a50ad563236..d05609ad329d46373e875f7cabb77f3e30924572 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CONTEXT_TRACKING_H
 #define _LINUX_CONTEXT_TRACKING_H
 
index 1d34fe68f48ad3bea0c98e2eadbabae0aeb152d9..f128dc3be0dfeed67f7a25e9a4863cff17346937 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CONTEXT_TRACKING_STATE_H
 #define _LINUX_CONTEXT_TRACKING_STATE_H
 
index 28ffa94aed6b85d10531e7dc11864f9ebc8701f4..207aed96a5b7dd7dcc7b74df34ec512558738ac5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_COREDUMP_H
 #define _LINUX_COREDUMP_H
 
index a978bb85599a819d94da22d3fe4aa987af83fb4f..74714b59f9d2c9c4bca80367808d1c6c64539496 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_CORESIGHT_STM_H_
 #define __LINUX_CORESIGHT_STM_H_
 
index ca73bc1563f4e131884e151ddd65dce24978c96d..938ea8ae0ba422925b06d9e0c677eda4dba76eb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/cpu.h - generic cpu definition
  *
index f24bfb2b9a2dcca0ac61034e86fe3bc489da7947..2477a5cb5bd54a95423b46ddb39e3555ed7b8802 100644 (file)
@@ -1,10 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPUHOTPLUG_H
 #define __CPUHOTPLUG_H
 
 #include <linux/types.h>
 
+/*
+ * CPU-up                      CPU-down
+ *
+ * BP          AP              BP              AP
+ *
+ * OFFLINE                     OFFLINE
+ *   |                           ^
+ *   v                           |
+ * BRINGUP_CPU->AP_OFFLINE     BRINGUP_CPU  <- AP_IDLE_DEAD (idle thread/play_dead)
+ *               |                             AP_OFFLINE
+ *               v (IRQ-off)     ,---------------^
+ *             AP_ONLNE          | (stop_machine)
+ *               |             TEARDOWN_CPU <- AP_ONLINE_IDLE
+ *               |                               ^
+ *               v                               |
+ *              AP_ACTIVE                      AP_ACTIVE
+ */
+
 enum cpuhp_state {
-       CPUHP_OFFLINE,
+       CPUHP_INVALID = -1,
+       CPUHP_OFFLINE = 0,
        CPUHP_CREATE_THREADS,
        CPUHP_PERF_PREPARE,
        CPUHP_PERF_X86_PREPARE,
index cd415b733c2a0595ca8c58c22f23ffb5b5126bc4..8d3125c493b2322478ccca401d932797dec34850 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_CPUMASK_H
 #define __LINUX_CPUMASK_H
 
index a1e6a33a4b039cf879ca5e70cd6f14a8bd9a18b8..1b8e41597ef536724fed06fbbea74e9ac6a7c501 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CPUSET_H
 #define _LINUX_CPUSET_H
 /*
index 2df2118fbe13568c66bc93f5f249d6b9bc39f7b2..06097ef304491dc8f9743154c10f92d20165cb47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_CRASH_CORE_H
 #define LINUX_CRASH_CORE_H
 
index 3873697ba21c88510fb55b061fa167bdc4b47581..a992e6ca2f1c0dd36dad530606f16290bce48fd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_CRASH_DUMP_H
 #define LINUX_CRASH_DUMP_H
 
index f52696a1ff0daa40414af9b071678280a373655a..cd4f420231bab97e8c90b5e2490edbe566fc04c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CRC_CCITT_H
 #define _LINUX_CRC_CCITT_H
 
index d81961e9e37daf04456f36a1cedd607ca0dcdf8a..1fe0cfcdea30ea4db784f49e254ba247814cdf55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CRC_T10DIF_H
 #define _LINUX_CRC_T10DIF_H
 
index bd8b44d96bdcbd38e764ddfa7b8d6cbed43ebe5d..357ae4611a4539e0cba582941e5c85095238272e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CRC32C_H
 #define _LINUX_CRC32C_H
 
index 8f739f1d794f82ecc208f7fbc4a051b8f8a6e0af..bd2c90556a06b4f4f509743df46a52e74f55ab68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CRC4_H
 #define _LINUX_CRC4_H
 
index d590765106f3d226449ccf5228181baef53c4c17..b462842f3c32c72abb1aca2c57a9cc07ff14338b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CRC7_H
 #define _LINUX_CRC7_H
 #include <linux/types.h>
index 07eed95e10c7d67b8a2c0543c152672bc6019203..54741295c70bfdddfd87e64601a6bf35a77736d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CEPH_CRUSH_CRUSH_H
 #define CEPH_CRUSH_CRUSH_H
 
index d1d90258242eef2965eb3e1e1e399132e85c8c34..904df41f78477fc88a3eee446abfac9d6f69205d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CEPH_CRUSH_HASH_H
 #define CEPH_CRUSH_HASH_H
 
index 141edabb947e31524b0256504ad52582cb2a45a8..f9b99232f5a19615d251393f33ac1f3a646a5eb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CEPH_CRUSH_MAPPER_H
 #define CEPH_CRUSH_MAPPER_H
 
index df4d3e943d288ed7acd8b27defe890cdd345c8f4..f6ba4c3e60d793c385fa1e1a21fb3ce00f427fc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CRYPTOHASH_H
 #define __CRYPTOHASH_H
 
index f13e4ff6835aed2e746792340590995a53f010b8..363b004426db0283f493e19f8dca9c6776e68fce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CTYPE_H
 #define _LINUX_CTYPE_H
 
index b723328238072cd62bf19dd30e635bc916cb23ce..056867f09a0177e7bfd201d3a1befae7831d84ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for talking to the CUDA.  The CUDA is a microcontroller
  * which controls the ADB, system power, RTC, and various other things.
index 19ae518f54715ca3592043c70797e2176a84cb30..83925bd12c0b9946c0a687ede1f46455d234d9ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
  * linux/include/linux/cyclades.h
  *
index 122197124b9def0e148482c40df7def28ec6ce99..895e16fcc62d50e34813d6fbd214832c9e9d305f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DAX_H
 #define _LINUX_DAX_H
 
index ed1a7cf6923af31a3c08a591ca74444b6771e71d..f05a659cdf348a0f2efa2f11b1a932a8f3181482 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_DCACHE_H
 #define __LINUX_DCACHE_H
 
index 68449293c4b6233c1a1d4133b1819376a9310225..6b64b6cc217596bf51280902d7998e94fc2ed0c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DCCP_H
 #define _LINUX_DCCP_H
 
index 699b6c499c4f5a3c600380b8aa8971ab3bba61b4..ddfdac20cad03ca774c87be11b0dd4350eb0a0c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * dcookies.h
  *
index 822c1354f3a69dae20e7f6cacaf340b40ea9d7c4..120225e9a366ba2c34658e0dc6e4fd6da52878a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_DEBUG_LOCKING_H
 #define __LINUX_DEBUG_LOCKING_H
 
index d82bf1994485da292a56bc9858f3d98360b5d5ea..afc416e5dcabd77b461b4c198503c71ce6b75fb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DEBUGOBJECTS_H
 #define _LINUX_DEBUGOBJECTS_H
 
index 4d683df898e6eace4661926628982c70249a5276..5860163942a4e5e9484ba753e89e76ffb4726ae5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECOMPRESS_BUNZIP2_H
 #define DECOMPRESS_BUNZIP2_H
 
index 1fcfd64b5076eaa8a7830d840e098ce8b5fe9edc..207d80138db557712529c54253e74185cb7ddac5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECOMPRESS_GENERIC_H
 #define DECOMPRESS_GENERIC_H
 
index e4f411fdbd24b2461959a454e98dc158344c1ec0..b65f24e7d442ab3ee4937fdd8bbfead481e2aa1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_DECOMPRESS_INFLATE_H
 #define LINUX_DECOMPRESS_INFLATE_H
 
index 7925bf0ee83627e8b58fb7bc895c04f27e858772..868e9eacd69e5e2f81804766b4d61d9b7eb21f87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/compr_mm.h
  *
index 3273c2f364961f7490684161818c4e6fa11d7f5e..5a235f605d5f0d5c777afed71d1bad55a3298fe1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECOMPRESS_UNLZ4_H
 #define DECOMPRESS_UNLZ4_H
 
index 8a891a1938403c654e546cc2bcb3eb131259a51b..1c930f1251823b53fbd9f630c27784c0e34b261d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECOMPRESS_UNLZMA_H
 #define DECOMPRESS_UNLZMA_H
 
index af18f95d65703e0b16594a288a01bb3a72c30a95..550ae8783d1b5a4312e6401bfb64a0d63e0029ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DECOMPRESS_UNLZO_H
 #define DECOMPRESS_UNLZO_H
 
index 2ecb3c46b20a2af689b1fcf4a6bea3c8924ded60..b78bab4395d806d1b9cd4607107779e4388cb8c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DELAY_H
 #define _LINUX_DELAY_H
 
index f7fa76ae1a9b956a405ee1f1d5bc01acfc83ec2c..a26c3b95b5cf5b63a06efc95c694e5feeca16ecd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DELAYED_CALL_H
 #define _DELAYED_CALL_H
 
index 3f033c48071e65d6bb11af2897d3f234b47643c5..92521471517fef8e312f9029b7ff131295e87167 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DELL_LED_H__
 #define __DELL_LED_H__
 
index c6f27207dbe87392502dba2082e73617bd6d02ac..66fe271c2544d5cf861e1e5c58e23a0793ba1ed6 100644 (file)
@@ -307,8 +307,6 @@ struct driver_attribute {
                         size_t count);
 };
 
-#define DRIVER_ATTR(_name, _mode, _show, _store) \
-       struct driver_attribute driver_attr_##_name = __ATTR(_name, _mode, _show, _store)
 #define DRIVER_ATTR_RW(_name) \
        struct driver_attribute driver_attr_##_name = __ATTR_RW(_name)
 #define DRIVER_ATTR_RO(_name) \
@@ -838,7 +836,7 @@ struct dev_links_info {
  * @driver_data: Private pointer for driver specific info.
  * @links:     Links to suppliers and consumers of this device.
  * @power:     For device power management.
- *             See Documentation/power/admin-guide/devices.rst for details.
+ *             See Documentation/driver-api/pm/devices.rst for details.
  * @pm_domain: Provide callbacks that are executed during system suspend,
  *             hibernation, system resume and during runtime PM transitions
  *             along with subsystem-level and driver-level callbacks.
index 8b64221b432b2b3258e119912f08ac475fc1727c..cdbc344a92e4a72b7e7c568cd523b1339248b0c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fs.h>
 
 #ifdef CONFIG_CGROUP_DEVICE
index 2cc0fd00463f549082d8836cd041b24c53f3af13..1470d1d943b477ab2de63d0be9d5f193c5903d92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* header file for DIO boards for the HP300 architecture.
  * Maybe this should handle DIO-II later?
  * The general structure of this is vaguely based on how
index f072fb8d10a3268b402323c91b40be250872726a..fc61f3cff72f7b79f1ed0fe4a51b4e973e705901 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DIRENT_H
 #define _LINUX_DIRENT_H
 
index 95b6a82f595142f63cd68f0bce3ce7108a3e2dd1..3649a031893ad7cbb88c6249e9b73caa5797af38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DMA_DIRECTION_H
 #define _LINUX_DMA_DIRECTION_H
 /*
index 29ce9815da87fcf436405fff2c1bdfddd6847e4b..7653ea66874dd53260cdfbbe386dd915b4c1675a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DMA_MAPPING_H
 #define _LINUX_DMA_MAPPING_H
 
index 2dc9b2bc18fc53cd8d8652ab5f654587525a2648..25cab62a28c455e653f37527cd5348bb061132b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MMP_PDMA_H_
 #define _MMP_PDMA_H_
 
index 3edc99294bf66c34cbab5862d63ed5546ca4b854..e56ec7af4fd7ca1054dba37f0a1800c079d21d27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PXA_DMA_H_
 #define _PXA_DMA_H_
 
index 90884072fa73254f5da8bb2091c6c3d2bded2f20..21b3e7d33d6809ee1f888ac8aef38203fe27a1c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DMA_REMAPPING_H
 #define _DMA_REMAPPING_H
 
index 9bbf21a516e4aa339aff03e9c2091043bb265fba..46e151172d95429f72ff5d6b4252ea8d2d430305 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DMI_H__
 #define __DMI_H__
 
index 3290555a52ee62e722860bcb00244ba296a2d4b2..0aad774beaec4d64bb9f8b36b8cf6e711c8c38fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DNOTIFY_H
 #define _LINUX_DNOTIFY_H
 /*
index 0de21e9359760d5b19640b5a532398f8a800b7fa..100d22a46b8283934d47bda640c9e95f1f982d83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Definitions of structures and functions for quota formats using trie
  */
index c0d4d1e2a45c4158a2613b1e76ab3704bae19230..85d837a14838b32364d0b628e94b24eab30db52e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     File with in-memory structures of old quota format
  */
index 18000a5426772382cac9f927585b15add4a22c4c..da95932ad9e7595b1ae49fdd694948f0b2249575 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Definitions for vfsv0 quota format
  */
index 4e6d4d4c705662fa5c60cf5bc36c4421472f42e6..53f44b8cd75f3336fedf76d07b9dc24bd8077f90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * General overview:
  * full generic netlink message:
index 9ef50d51e34ed0a458892bbbb56f6ebb38f25986..bd62efc2900262f4a1aa7b15b37cc0a7bcb7d443 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef DRBD_GENL_STRUCT_H
 #define DRBD_GENL_STRUCT_H
 
index 24ae1b9b76c7d3b70025814f07e1a7989d3e902f..9e33f7038beaa3a5d6f74b96e3f7bb2db750476e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   drbd_limits.h
   This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
index b4e281f65c155fc58a96275871f56afa161eef17..fb6c97e10956253e75de3aa3ff866f624069d318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_DS2782_BATTERY_H
 #define __LINUX_DS2782_BATTERY_H
 
index 22a7b9a5f5d1b5bb77718f87dc7d62f42b59c313..27b95e70bde3dcbfc0fc82954ef759c9488299ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define DTLK_MINOR     0
 #define DTLK_IO_EXTENT 0x02
 
index 546d68057e3b7716c55f3c9d097a854ac8646aee..2fd8006153c35081444a9e7bd43e73ce8cf888d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DYNAMIC_DEBUG_H
 #define _DYNAMIC_DEBUG_H
 
index a4be70398ce1b2cb192a7b3bed9477439b2e3c57..34c0a5464c743c57f651c4563e465659a56a4534 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Dynamic queue limits (dql) - Definitions
  *
index 111f46d83d00b6ef79796d8554fbeba157aa311e..c70519267c7781375b7bf9c1baba783ceeabfc02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_EARLYCPIO_H
 #define _LINUX_EARLYCPIO_H
 
index 8d5ab998a222565c44df58930b70dafa38381a6b..91e142abf7e870285e085b32eeb5196fab8aaeb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ECRYPTFS_H
 #define _LINUX_ECRYPTFS_H
 
index 915898759280288f553df6369afe83dc8aec2c81..eec7928ff8fe043a9d10e790a184a908aa14cb4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Module: eeprom_93xx46
  * platform description for 93xx46 EEPROMs.
index e6f624b53c3d89c6ba575bb61a3d868a251473ae..e6cd510056332df569bda0c3bb17541f9fcb2764 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_EFI_BGRT_H
 #define _LINUX_EFI_BGRT_H
 
index 66f4a4e79f4b2ea1894e5b91fce00eb05528e843..d813f7b04da7a1dbe35fc7dac5bb2842287c8021 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_EFI_H
 #define _LINUX_EFI_H
 
index 8a11150c61febf1685571c6557b328926967d2dd..206c5270f7b892f2bdf19a5db5e049bf1c88df1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * efs_vh.h
  *
index 6925249a5ac656a7cda3c104d04914816e303ff4..b012e30afebda212b16c406121f3b1aa0e7708c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_EISA_H
 #define _LINUX_EISA_H
 
index 5bc8f8682a3e1a745c66547b3f22b2e2f38495d6..ddb7632d73b9532df238f6d727bafd19ec39ec60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ELEVATOR_H
 #define _LINUX_ELEVATOR_H
 
index b5f0bda9472e0720d5d1abb9368cf2b5ae0f5478..da0dbb7b6be3b8713ff8068fa51794415242746d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ELF_RANDOMIZE_H
 #define _ELF_RANDOMIZE_H
 
index ba069e8f4f7873b002da2d632d81520eb2a662fd..e3649b3e970e63d325958e2c31aebbe1ef16586e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ELF_H
 #define _LINUX_ELF_H
 
index 0a90e1c3a42207c9d961ff29315dc48c95e0ddec..b5f2efdd05e068a0fed4710fb779917478033511 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ELFCORE_COMPAT_H
 #define _LINUX_ELFCORE_COMPAT_H
 
index c8240a12c42d9880659e9cc24b800c8d9d3f63da..4cad0e784b286b62aa4dc5fc5ad07b07964e0d57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ELFCORE_H
 #define _LINUX_ELFCORE_H
 
index 278e3ef0533699f2e9a3845bdc12715ce6be30cb..f236f5b931b2a0ef0021556bf1b41be09668062a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ELFNOTE_H
 #define _LINUX_ELFNOTE_H
 /*
index 1e3558845e4c3d986411d34b066b3e5d2518bab8..87be24350e91c2788fd68a06dce1da3499d3fc0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ERR_H
 #define _LINUX_ERR_H
 
index 7ce9fb1b7d28f3472be97621e624a4448ead577f..3cba627577d6915c303babde55e45cc2dbf15d9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ERRNO_H
 #define _LINUX_ERRNO_H
 
index 6fdfc884fdeb3d3cf81dcbd40c52c0b8c8d203b1..be1cf7291d6cf65a7196bd43a6f81b703647d90f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ERRQUEUE_H
 #define _LINUX_ERRQUEUE_H 1
 
index f746bd8fe4d0873ba7eddf78f0ac45fc152014f3..6ffae9c5052dd0bdc9c4fad77411c36a68b99170 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * See Documentation/errseq.rst and lib/errseq.c
  */
index 4587a4c369232589fbbc77200ca3257440f850de..0c0146e7e274f460ca9e3ea39c77531e6bedf065 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ethtool.h: Defines for Linux ethtool.
  *
index 9e4befd95bc7bd285ed4e6faad5953416b3f55d8..60b2985e8a184764ba7c5031985052c1a2f66f52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/eventfd.h
  *
index 35ed9a8a403a8557aba07222503daf6fa29bac7a..8302bc29bb358abca818d7b16ba0e1170b8924d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * evm.h
  *
index 5ab958cdc50bcb23b084f0faadb91b2793185fcd..0d3037419bc782c6c0d6883cd2207dfad2bd1773 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_EXPORTFS_H
 #define LINUX_EXPORTFS_H 1
 
index 2723e715f67a19d2574aa0f151f5b4c525fcb43e..1fef885690370e5c039871ac8dd99d649d72aa64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/ext2_fs.h
  *
index 28addad0dda7afeb8a34e0f0fa510df48ab2497f..41c5b3a25f67b5808d07d6ce8aa8aeee433c5f65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_EXTABLE_H
 #define _LINUX_EXTABLE_H
 
index 7494dc67c66f421541edf064d69233bbbc432d8f..674d59f4d6ce581b8c713ab1615e6de7b096ca8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FALLOC_H_
 #define _FALLOC_H_
 
index cef93ddcc5a0d16f4eccb53b454fb285c464d14b..096c96f4f16af0f94a54e5e237e3f36fe9883778 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FANOTIFY_H
 #define _LINUX_FANOTIFY_H
 
index 728d4e0292aa776a0d22141055ef17d650d41b2a..c3c95d18bf43ff8fb7ff56bac9db745ec856e317 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FAULT_INJECT_H
 #define _LINUX_FAULT_INJECT_H
 
index f4386b0ccf4010dcbfcabd8e499734fd0aa3aaed..bc24e48e396d0b6153c95d347878e43fa28be21e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FB_H
 #define _LINUX_FB_H
 
index 1b48d9c9a5613cc1b619444e2046c36dcfeda872..27dc7a60693e15bca6b2394381870f5d427c7fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FCNTL_H
 #define _LINUX_FCNTL_H
 
index 69275bccc3e486d53ca3a36a922dba8ea8908a66..ece5ea53205b55cb870c6055a4cd961e28a34435 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FD_H
 #define _LINUX_FD_H
 
index 6e84b2cae6ad62b529298b662856dc857c3091b6..1c65817673db17f62f668c3760e115d6728b6d21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * descriptor table internals; you almost certainly want file.h instead.
  */
index 61eb82cbafbad4c61258cd8ab1754f60e3ca5910..279720db984af394c90737ed31b8ec09ef73c2ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Wrapper functions for accessing the file_struct fd array.
  */
index d29e58fde364f01168c059f85faac389622a3fc3..48ec57e70f9f3d9a073f9cdd439c8ed597f14445 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux Socket Filter Data Structures
  */
@@ -728,7 +729,7 @@ void xdp_do_flush_map(void);
 void bpf_warn_invalid_xdp_action(u32 act);
 void bpf_warn_invalid_xdp_redirect(u32 ifindex);
 
-struct sock *do_sk_redirect_map(void);
+struct sock *do_sk_redirect_map(struct sk_buff *skb);
 
 #ifdef CONFIG_BPF_JIT
 extern int bpf_jit_enable;
index f8fb07b0b6b824db4a3d088f2e00067f1a8d4f92..afeeece9230244e776d4e82ec87b81f9ea2a533f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FIPS_H
 #define _FIPS_H
 
index d4b7683c722d6311f05a2e60d1849e91f4e34dca..aec8f30ab200dedeefc8b7348bee51f722876842 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FIREWIRE_H
 #define _LINUX_FIREWIRE_H
 
index b1f9f0ccb8ac85903dcceb11864e60248105afe9..d4508080348d301444a50cfadf6947ac363147a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FIRMWARE_H
 #define _LINUX_FIRMWARE_H
 
index 7d542dfd0def53892cd421e22fc4930306253c1d..569b67d64d5c99c008e2adff64e0708b64d59d29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2002-2003  David McCullough <davidm@snapgear.com>
  * Copyright (C) 1998       Kenneth Albanowski <kjahds@kjahds.com>
index 11366b3ff0b4fda30d8ff466c180ed3e23beef5e..b94fa61b51fb30d290b357e18dce124068679afb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FLEX_ARRAY_H
 #define _FLEX_ARRAY_H
 
index 0d348e011a6e9002825989d37972cc5d0820b1da..c12df59d3f5fcb087b2ec85cfba5e0d8c517a69e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Floating proportions with flexible aging period
  *
index 599bd6bab56dad4f058facc7413ebde4f1c2d6e1..bec899f0867c75197221b7a5b627dab466309a10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is separate from sdb.h, because I want that one to remain
  * unchanged (as far as possible) from the official sdb distribution
index dba6e3c697c745414d592bc6616568ccd09fa926..aa66c87c120be0ec3187d80fc6e7505389f4575a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/device.h>
 #include <linux/fpga/fpga-mgr.h>
 
index d772c61c31da3cca3ba99274ce355704e1eb0df7..02d3ca2d959853f3e6b7847a07aea0f81192e37f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FRAME_H
 #define _LINUX_FRAME_H
 
index dd03e837ebb7fa4c4dd5f86ada677595367d3dba..3995df1d068f66b6c1574312b8740d35e2ad0de5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Freezer declarations */
 
 #ifndef FREEZER_H_INCLUDED
index 1d18af0345543aaecbfc46a04230735c2b0b0cf7..011965c08b939206fadc0081b3c0c7acc3e065ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FRONTSWAP_H
 #define _LINUX_FRONTSWAP_H
 
index 339e73742e736cfcccdfedf323e6ab8bc651138b..885266aae2d7d57615db4125884abb813066590f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FS_H
 #define _LINUX_FS_H
 
@@ -403,7 +404,7 @@ struct address_space {
        unsigned long           flags;          /* error bits */
        spinlock_t              private_lock;   /* for use by the address_space */
        gfp_t                   gfp_mask;       /* implicit gfp mask for allocations */
-       struct list_head        private_list;   /* ditto */
+       struct list_head        private_list;   /* for use by the address_space */
        void                    *private_data;  /* ditto */
        errseq_t                wb_err;
 } __attribute__((aligned(sizeof(long)))) __randomize_layout;
index 3886b3bffd7f75305fc60db553916729cf677a1e..7cab74d66f85476ff20c0445edc1164115091ca2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/wait.h>
 
 struct fs_pin {
index da317c7163ab55c4ff6e3552c58ecb7db916ce7e..54210a42c30d1629411ac5b50a23080686e38e21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FS_STACK_H
 #define _LINUX_FS_STACK_H
 
index 7a026240cbb1bc0b45f65ac9b14a1f1823501c06..cf1015abfbf238082c89ae99650bea83c3fb290f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FS_STRUCT_H
 #define _LINUX_FS_STRUCT_H
 
index 97f738628b36e2684622a67e01d37f2e0c77e6be..854d724978fa9ba5733f8716b3fe26b6ea5aef35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fscrypt_common.h: common declarations for per-file encryption
  *
index ec406aed2f2f8c3331d0002fba8a83036e75c08b..19609ceea350333c76156e337b975f16be62dcce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fscrypt_notsupp.h
  *
index 32e2fcf13b015ed198381c06c750b84ada99cafd..5153dce22f09c12e17a726350e9c55417abc2fed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * fscrypt_supp.h
  *
index 90d64d4ec1a954aac1bc06ad7fda402acd72fd29..148a297d7587da43dc7cff6bc59e444ee842b63b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef FSL_EDAC_H
 #define FSL_EDAC_H
 
index b78aa7ac77ce1d6920aa196f4cd71d6d6a7aee7b..bdaf22582f6ea5c59a1eb9e4e7c319854087df42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FS_NOTIFY_H
 #define _LINUX_FS_NOTIFY_H
 
index c6c69318752bd7b8caeecee48496bb39227c2754..3597ef78df4d7bbd40df3e252e064f89f75aadbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Filesystem access notification for Linux
  *
index 2e028854bac779c1282b5c7201904ef7194f89a0..e54d257983f28c4e395d9a7bf871652e7f89c3de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Ftrace header.  For implementation details beyond the random comments
  * scattered below, see: Documentation/trace/ftrace-design.txt
index 4ec2c9b205f2138fb1239c9580da866b753ffbc4..ccda97dc7f8b916fb62942057d3316e9abaa2b0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FTRACE_IRQ_H
 #define _LINUX_FTRACE_IRQ_H
 
index f36bfd26f998a7daccdb4f271c7c3300f567b2a9..c0fb9a24bbd245c980723bce4b0dc5777bd4fb64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_FUTEX_H
 #define _LINUX_FUTEX_H
 
index 69f5e8a01bad01193a374a160d7dea34184b5942..cb572677fd7fb23b07b38495c49bdb09915d7777 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GCD_H
 #define _GCD_H
 
index a4c61cbce777096a2d2171f8ec37a5f75f5f6bb8..b96dd4e1e6630997cbcea3f58c5dc34f0a1ed674 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GENERIC_NETLINK_H
 #define __LINUX_GENERIC_NETLINK_H
 
index ea652bfcd6756ff382e54a7f209043d9217e3608..44790523057f0380b1254458a20ca658f17a3305 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_GENHD_H
 #define _LINUX_GENHD_H
 
index 377257d8f7e3557fe1f98eae3a5f906eb68bac44..604967609e553147ba13c236540dc4a80b079a90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GENL_MAGIC_FUNC_H
 #define GENL_MAGIC_FUNC_H
 
index 6270a56e5edc4eac7f707f121ff2a8e0e536386a..5972e4969197aeeab2114f452cfd44ab24b3ac25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GENL_MAGIC_STRUCT_H
 #define GENL_MAGIC_STRUCT_H
 
index c7372d7a97be34a22874f38c388284640ae29512..c304dcdb4eac2a9117080e6a14f4e3f28d07fd56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_GETCPU_H
 #define _LINUX_GETCPU_H 1
 
index f780718b7391d40999962bed20621c2b8b0cca21..710143741eb57aadb229a4c298e064ff3426d7b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GFP_H
 #define __LINUX_GFP_H
 
index 861d8347d08e722ec64d3c678b74ff6f2183d0b9..861327b33e41dccf9c95c75a67cf292f5fd6d52c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_GLOB_H
 #define _LINUX_GLOB_H
 
index 93e080b39cf6c09f7c310dcb31194962e67e92b3..2835c150c3ff0a89dc8f1a9628f2b3f3f0b0ed42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GOLDFISH_H
 #define __LINUX_GOLDFISH_H
 
index d90ebbe02ca4b257ff00a7a628f34aaef25ab3be..1e1fa0160480d85756b25e99ae554d86d85a3a8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GPIO_PXA_H
 #define __GPIO_PXA_H
 
index d12b5d566e4b11c725aa79dae8f2301364d3b9a9..8ef7fc0ce0f0cb408bf04a9a01cea0eb2309815b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GPIO_H
 #define __LINUX_GPIO_H
 
index 8f702fcbe4853e349235813c3438493b362fea3c..c4a350d83578852e7be38d0c26c6a79eb9d440c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GPIO_CONSUMER_H
 #define __LINUX_GPIO_CONSUMER_H
 
index c97f8325e8bf5c2f4d309b1e8e82b69d62e68bfc..424e5139ff10f0ed27836f88a3821896819f22f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GPIO_DRIVER_H
 #define __LINUX_GPIO_DRIVER_H
 
index 90e0b9060e6dfc4c6d4ecf5781f0487ee283b657..5c6efd394cb0eda9f21f7105722c25ca1e80caac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GPIO_REG_H
 #define GPIO_REG_H
 
index ba4ccfd900f91cafe1721a6a633c30b967bf9475..b7225369e568d1fcd118cae658d1f00676262817 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GPIO_MACHINE_H
 #define __LINUX_GPIO_MACHINE_H
 
index 0b71024c082c37f817b4b0303a826abaa796fc95..d06bf77400f16ae861b938696dae9f2b93d797f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GPIO_KEYS_H
 #define _GPIO_KEYS_H
 
index c683996110b15f1ca45e9b7499fc983a036c5b96..0fbbcdf0c178ec5dc6ff5372fa248b121b65b49d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_HARDIRQ_H
 #define LINUX_HARDIRQ_H
 
index 082dc1bd0801c0b7f8fe61916d13a4c48a68f4c3..417d2c4bc60db4b80b29d1a7f78d1273b600b258 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Statically sized hash table implementation
  * (C) 2012  Sasha Levin <levinsasha928@gmail.com>
index be3be25bb898f549376945e9ad5fd6a365e40ade..d4d633a49d36f37817d09dd56b0bcf8251336767 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * hdlcdrv.h  -- HDLC packet radio network driver.
  * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
index bb3f3297062a0b67a590adbb6630d6f419249ea5..776f90f3a1cdcc9706fef8a5bff0ae0ed81e8aaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HIGHMEM_H
 #define _LINUX_HIGHMEM_H
 
index 434e56246f678c615b118720ba499c5fc127ab9c..50d383fd674d25b5ee4e39f85a44b2328bd3486c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HIGHUID_H
 #define _LINUX_HIGHUID_H
 
index 9427ab4e01c3594c7354380abad13e0b6e31bad0..8604564b985dcaf36ee4cca2bdbbdcc025d4f5d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        __HPET__
 #define        __HPET__ 1
 
index ab3f6cb4dddc1a48a43bab6ec43ecf4538fd7078..842fce69ac0637043eeef0f4a35b9fe4702ce3fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_HTCPLD_H
 #define __LINUX_HTCPLD_H
 
index d4a527e58434df73800eed55fbbc6750f5f2d5ee..127c39d815ba683a45d634f99db7893f79384b3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_HTIRQ_H
 #define LINUX_HTIRQ_H
 
index 14bc21c2ee7ff8d9c7956b9c317d4a39b36cc0c0..87067d23a48b898a2d9e60c51ee4a5d2196f6c62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HUGE_MM_H
 #define _LINUX_HUGE_MM_H
 
index 8bbbd37ab10508571f634203469680090dd435b8..fbf5b31d47eea91925b9275b9f7fa2784cd5fe56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HUGETLB_H
 #define _LINUX_HUGETLB_H
 
index a4e7ca0f3585e4ca33d65dedd3989af26ecd0bfa..0660a03d37d986c8167dbdb5086acaa96dc17a99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HUGETLB_INLINE_H
 #define _LINUX_HUGETLB_INLINE_H
 
index 0464c85e63fd05d1fc10f0f03eeac56fe03f3e8e..cf045885a4990380c926a1f929528672d490dfb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HW_BREAKPOINT_H
 #define _LINUX_HW_BREAKPOINT_H
 
index c458d7b7ad197688469772fb0c842180c668864c..6431087816ba5b06d9d5f7dae08af53ed57e11ca 100644 (file)
@@ -1403,7 +1403,7 @@ extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf,
                                const int *srv_version, int srv_vercnt,
                                int *nego_fw_version, int *nego_srv_version);
 
-void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid);
+void hv_process_channel_removal(u32 relid);
 
 void vmbus_setevent(struct vmbus_channel *channel);
 /*
index 3fa5ef2b37590cd1b059f7d27025e4467b171eac..b4054fd5b6f66fc5695585b0f38b121462d02620 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_HYPEVISOR_H
 #define __LINUX_HYPEVISOR_H
 
index a3c3ecd59f08cf5ab801cd890edad28eb117340c..d03071732db4add88eadef01988c6585b23b5955 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_I2C_ALGO_PCA_H
 #define _LINUX_I2C_ALGO_PCA_H
 
index babe0cf6d56bbe88e9feaaef2dc72ec9a1789266..3444265ee8ee72741e28d3c71665f0b4f42400dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __I2C_OMAP_H__
 #define __I2C_OMAP_H__
 
index aba33759dec485223220b6760495dbc72db7b04d..0e5f7c77d1d80452dd08e3391125c00fca1970ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef I2C_PCA9564_PLATFORM_H
 #define I2C_PCA9564_PLATFORM_H
 
index 41dcdfe7f625d7e45aedbb1efa7f2259214bc19a..a897e2b507b6730a96b76854aafc5bb443e5a78a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_I2C_ALGO_PXA_H
 #define _LINUX_I2C_ALGO_PXA_H
 
index 1587b7dec505ff182f6f5beceaee97907ecb9381..4dbe651f71f59f1faea1294e301fd3491e702551 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef I7300_IDLE_H
 #define I7300_IDLE_H
index 57086e9fc64c6ce05bf66f632727ceb32250ad92..a8f888976137820e9b6a94a5d6bf37619073d19a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ICMPV6_H
 #define _LINUX_ICMPV6_H
 
index dc152e4b7f732ed294bde4f1f2e87fc2277d6262..70db3af045417d7077fa2aa2fce15990f7b08547 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IDE_H
 #define _IDE_H
 /*
index 0b17c585b5cdae2094aaac4592b55b17b2a43b9b..4c54611e03e967afe6a9eaa4fd35a6113db91632 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IF_LINK_H
 #define _LINUX_IF_LINK_H
 
index 81e434c50790f302213e3ce23b8447e9cb30a8b2..4cc1c0b7787000497cec5fa345b79ebb0afa4f70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_LTALK_H
 #define __LINUX_LTALK_H
 
index c9ec1343d1879cc463ffe50afcee143623350b5d..0e2c60efad2def3c70ce43758bed23e90030fce3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IF_MACVLAN_H
 #define _LINUX_IF_MACVLAN_H
 
index bbcdb0a767d87de802237b503a75716f99a3b0aa..3b5c60da2e2abe6117afd8c10eb1e7dca3eaa588 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File: if_phonet.h
  *
index 4837157da0dc04c4cc2c1a7c02da71e41c787d63..13edf19ce9fb5e1eddeb366bc315cb9a92ba691e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IF_TAP_H_
 #define _LINUX_IF_TAP_H_
 
@@ -73,8 +74,8 @@ void tap_del_queues(struct tap_dev *tap);
 int tap_get_minor(dev_t major, struct tap_dev *tap);
 void tap_free_minor(dev_t major, struct tap_dev *tap);
 int tap_queue_resize(struct tap_dev *tap);
-int tap_create_cdev(struct cdev *tap_cdev,
-                   dev_t *tap_major, const char *device_name);
+int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major,
+                   const char *device_name, struct module *module);
 void tap_destroy_cdev(dev_t major, struct cdev *tap_cdev);
 
 #endif /*_LINUX_IF_TAP_H_*/
index 712710bc05803f7fa7b47014d55e1471be18d837..26606523eca4ac66d21050fc7246afae62f8aecb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IF_TUNNEL_H_
 #define _IF_TUNNEL_H_
 
index 31d8629e75a15f55ae59d8d4e936dab96f9fa396..75c1943918693cc77a55d40c5e5f88887d3db72c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Compact binary representation of ihex records. Some devices need their
  * firmware loaded in strange orders rather than a single big blob, but
index 5ba430cc9a87352c305b7e6319f3a53ec4a94cc6..1fc7abd28b0b064b54a73e9c5717c2954e25e1cb 100644 (file)
@@ -111,6 +111,9 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
 int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
        unsigned int size, unsigned int *val);
 
+int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
+       unsigned int reset_length);
+
 int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
        const struct iio_chan_spec *chan, int *val);
 int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,
index 8daba198fafa28abcc3c4d6f5feacb7552f00859..b9e22b7e2f2884fe6c2f473c1c3e8baefe61e469 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IIO_BUFFER_GENERIC_IMPL_H_
 #define _IIO_BUFFER_GENERIC_IMPL_H_
 #include <linux/sysfs.h>
index 8fd8f057a890b52b3dcf074dd92bd0c30a57374b..d8ee9a7f8a6aa055799e5d08bd74f8926e1ec3c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IIO_DAC_AD5421_H__
 #define __IIO_DAC_AD5421_H__
 
index 027cfa9c37039f388b0492f636ad88eb75d9c6b9..764659e01b68cdf2f865f0cd4aa519f698943d56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_IIO_KFIFO_BUF_H__
 #define __LINUX_IIO_KFIFO_BUF_H__
 
index c8400959d197d4e5f8b8a67c4702fe51b7a71fcf..ac9366f807cb3a1ecfa04a3122b2e23d5854d592 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IIO_MAGNETOMETER_AK8975_H__
 #define __IIO_MAGNETOMETER_AK8975_H__
 
index 30145616773d303054fd257fbc8ccf85e863de35..238ad30ce16653b0f457a2f6e808149403e0ab28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IIO_TRIGGERED_BUFFER_H_
 #define _LINUX_IIO_TRIGGERED_BUFFER_H_
 
index 8fe8537085bb0721d55b0c2fef121b6b2aaaac72..13250fd99745a782e3b498ef59751dda7ebbb4d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IIO_TRIGGERED_EVENT_H_
 #define _LINUX_IIO_TRIGGERED_EVENT_H_
 
index ee251c585854ca09978bba226dca23fd31534b9e..39faaaf843e1efb864ad148c710ed9cec7a82381 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INET_DIAG_H_
 #define _INET_DIAG_H_ 1
 
index fb3f809e34e4796b406bf4da2323a940d28517fb..5058f061cb2bded194f6403043f757289203b77a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_INETDEVICE_H
 #define _LINUX_INETDEVICE_H
 
index 94769d687cf07d8b41081f3e966d7319b5a71ee9..f38b993edacb7c30fd40f3eb9623373aab529397 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_INIT_H
 #define _LINUX_INIT_H
 
index 3c03a4bba5e438977e21d4daa347488e32d89fe8..228afca432acf88170d1c8d357ed3f6132dc4265 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
 extern int __initdata init_ohci1394_dma_early;
 extern void __init init_ohci1394_dma_on_all_controllers(void);
index 3c07ace5b431094f3603438f9c27550007012101..8062e6cc607c82074d2e3513cd2db30f07333038 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX__INIT_TASK_H
 #define _LINUX__INIT_TASK_H
 
index bc67b767f9ce5a59c62a0b8e3321525d9ff0c63e..84b423044088728feeccd7d1e468ac747f91cede 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
 
index 23aede0b5843b7481e2385be955a71ae45d91c0e..44f9ffe72c874ed0a4a8098b2df5240e9ae90114 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Inode based directory notification for Linux
  *
index a65e3b24fb1838e43cffc24e2ecdc8a8f92eba12..7c7516eb7d76c64071e51c199fdb0fd0f4e3c934 100644 (file)
@@ -234,6 +234,10 @@ struct input_dev {
 #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
 #endif
 
+#if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX
+#error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match"
+#endif
+
 #define INPUT_DEVICE_ID_MATCH_DEVICE \
        (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT)
 #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
@@ -469,6 +473,9 @@ int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke);
 int input_set_keycode(struct input_dev *dev,
                      const struct input_keymap_entry *ke);
 
+bool input_match_device_id(const struct input_dev *dev,
+                          const struct input_device_id *id);
+
 void input_enable_softrepeat(struct input_dev *dev, int delay, int period);
 
 extern struct class input_class;
@@ -529,6 +536,7 @@ int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code,
 
 int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
 int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
+int input_ff_flush(struct input_dev *dev, struct file *file);
 
 int input_ff_create_memless(struct input_dev *dev, void *data,
                int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
index 09522cb5991049a828e2abd21ef7d5f3f47c6720..77582ae1745a46f0e6036a7a6be48e9733b76af8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CY8CTMG110_PDATA_H
 #define _LINUX_CY8CTMG110_PDATA_H
 
index aad2fd44a61a21a0e27e903cc56db3284228457b..3614a13a82978371b9332ae106ba84f612c07176 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GP2AP002A00F_H_
 #define _GP2AP002A00F_H_
 
index c1cc52d380e018a8bc96961ed8dab88418a4402e..f9d932476a80571b8b85b3d02b01c83e6c034afc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INPUT_GPIO_TILT_H
 #define _INPUT_GPIO_TILT_H
 
index a5471245a13ce7463cbec20e0fbeedfd00c15fa1..b76e7c1404cd14b658019d50c09fe5cb3011517e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ILI210X_H
 #define _ILI210X_H
 
index 6174733a57ebc60b68fe674d1c271bb8af6d9d51..9476768c3b90a1a201bd82cc719a3297b410c933 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MATRIX_KEYPAD_H
 #define _MATRIX_KEYPAD_H
 
index 5d253cd93691d2bec2a12b34fe2791f61e57a09f..b3c4f3b6679ccc805fb76a2f4367882c7e81c0bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SH_KEYSC_H__
 #define __SH_KEYSC_H__
 
index 59ba11661b6e69988a97e75996239b7ec0dea817..baeb872283d91b8018773f52e8eb32f9897de3e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* interrupt.h */
 #ifndef _LINUX_INTERRUPT_H
 #define _LINUX_INTERRUPT_H
index 202ee1283f4bd59d984a1066bda5881380a4268e..288c26f50732d7c2c9403765d7d8f3e79d20729b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_INTERVAL_TREE_H
 #define _LINUX_INTERVAL_TREE_H
 
index defcc4644ce3642f8cc0281a97cf8d6b5edad174..862d786a904f3a3f1819eedf94238928388c3353 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IO_64_NONATOMIC_HI_LO_H_
 #define _LINUX_IO_64_NONATOMIC_HI_LO_H_
 
index 084461a4e5abce9823518ba57221c4881d89c8ae..d042e7bb5adbf1901376cea445c13377d8afe235 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IO_64_NONATOMIC_LO_HI_H_
 #define _LINUX_IO_64_NONATOMIC_LO_HI_H_
 
index df38db2ef45bbf50def2b9de1970225c8a76c6de..dba15ca8e60bc8b0f0d0faf3ca13c2afcd87c231 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IOCONTEXT_H
 #define IOCONTEXT_H
 
index f64dc6ce5161185240aef38669e7c1fb7f85c7ff..8a7c6d26b147a9ddf0c9b41fbd098a3e3aed6143 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_IOMAP_H
 #define LINUX_IOMAP_H 1
 
index 376a27c9cc6aa4901a1870c13749ce762f4fe69f..802c90c79d1f845610d1c62856971bee44e846a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IOMMU_COMMON_H
 #define _LINUX_IOMMU_COMMON_H
 
index 86bdeffe43ad69e3dba2781eeed06b8cbe847a69..cb9a9248c8c0c52656b8976293d0689349fee8c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IOMMU_HELPER_H
 #define _LINUX_IOMMU_HELPER_H
 
index a7f2ac689d2917e2902e78604e8b6b33df1ee333..41b8c575785916f7691a7686a5c5d4e7d99003fa 100644 (file)
@@ -167,11 +167,11 @@ struct iommu_resv_region {
  * @map: map a physically contiguous memory region to an iommu domain
  * @unmap: unmap a physically contiguous memory region from an iommu domain
  * @map_sg: map a scatter-gather list of physically contiguous memory chunks
+ *          to an iommu domain
  * @flush_tlb_all: Synchronously flush all hardware TLBs for this domain
  * @tlb_range_add: Add a given iova range to the flush queue for this domain
  * @tlb_sync: Flush all queued ranges from the hardware TLBs and empty flush
  *            queue
- * to an iommu domain
  * @iova_to_phys: translate iova to physical address
  * @add_device: add device to iommu grouping
  * @remove_device: remove device from iommu grouping
index f5cf32e800411ecafd0aef552d7ae675dceefeb7..83c8d6530f0f54ac308bd34424795a05e7d48df4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ioport.h    Definitions of routines for detecting, reserving and
  *             allocating system resources.
index 8c1239020d79d36a8c2593cbf56ad8fa134c618a..2cdd7480989962c69d8e7946ac8cf0cb76aa53e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IOPRIO_H
 #define IOPRIO_H
 
index 92a2ccff80c5cf287e2447c75dc505b24bcd62d8..821b2f2609926636a6b88c5e25cb23ecc8f92806 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IPC_H
 #define _LINUX_IPC_H
 
index 83f0bf7a587d55c5e7f7d46d4e239b36c1b3c289..474812abe7731af01d4b3fd7f868ba02fc7bbeb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IPC_NAMESPACE_H__
 #define __IPC_NAMESPACE_H__
 
index ac2da4e11d5e84c5dfbdefa5cc3a427ee84777ce..ea04ca024f0d2ad21fa3840b4baf4a397517b421 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IPV6_H
 #define _IPV6_H
 
index b99a784635ff5801c20fce3a187a12cc4358660a..4536286cc4d24bcbb64dcc6a4db6a47f399f82d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQ_H
 #define _LINUX_IRQ_H
 
@@ -783,10 +784,7 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
 static inline
 struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
 {
-       if (!cpumask_empty(d->common->effective_affinity))
-               return d->common->effective_affinity;
-
-       return d->common->affinity;
+       return d->common->effective_affinity;
 }
 static inline void irq_data_update_effective_affinity(struct irq_data *d,
                                                      const struct cpumask *m)
@@ -1012,7 +1010,7 @@ void irq_gc_mask_clr_bit(struct irq_data *d);
 void irq_gc_unmask_enable_reg(struct irq_data *d);
 void irq_gc_ack_set_bit(struct irq_data *d);
 void irq_gc_ack_clr_bit(struct irq_data *d);
-void irq_gc_mask_disable_reg_and_ack(struct irq_data *d);
+void irq_gc_mask_disable_and_ack_set(struct irq_data *d);
 void irq_gc_eoi(struct irq_data *d);
 int irq_gc_set_wake(struct irq_data *d, unsigned int on);
 
index 77e4bac292872848aed81c358ab3d0ee75441145..4954948d19733bc5c782bc09131cf9d56c2db908 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __irq_cpustat_h
 #define __irq_cpustat_h
 
index 3e8c1b8fb9be283dbd9830d7c3b889a5dda96d2d..16aaeccb65cbd24767dd5cf60068d352b885b924 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef IRQ_POLL_H
 #define IRQ_POLL_H
 
index 47b9ebd4a74fc667601d76476645fefbdb3c36f6..9270d73ea6821cbf027709596e5dd80b86bbfa29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQ_WORK_H
 #define _LINUX_IRQ_WORK_H
 
index 1ea576c8126f8b8c467f1ea3ab2623826efde0af..14b74f22d43c147f2bc8eec9ef82e2a1461a6643 100644 (file)
 #define GITS_BASER_ENTRY_SIZE_SHIFT            (48)
 #define GITS_BASER_ENTRY_SIZE(r)       ((((r) >> GITS_BASER_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
 #define GITS_BASER_ENTRY_SIZE_MASK     GENMASK_ULL(52, 48)
+#define GITS_BASER_PHYS_52_to_48(phys)                                 \
+       (((phys) & GENMASK_ULL(47, 16)) | (((phys) >> 48) & 0xf) << 12)
 #define GITS_BASER_SHAREABILITY_SHIFT  (10)
 #define GITS_BASER_InnerShareable                                      \
        GIC_BASER_SHAREABILITY(GITS_BASER, InnerShareable)
index 697af0fe7c5a4cd261216bcf8afac90ca3476e56..d120496370b9735a13ad11d7b78d0e459b3b98af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2012 Imagination Technologies
  */
index 4ebdfb3101ab8a7f311b1ad8c5b09299c5b57852..0adcf449e4e4ca750469c19e61b7dd79c2097859 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2011 Imagination Technologies
  */
index c78a8921185dafe6c109bdbbdba3ba95fd22a3d1..cb8455c87c8aaaa6774a7dc45f91562b85c95e30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        __IRQCHIP_MMP_H
 #define        __IRQCHIP_MMP_H
 
index 1fac9651d3ca8e299a10e2aeb8b44a7878400892..a978fc8c7996514444a264288584b0a728793d7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PLAT_FPGA_IRQ_H
 #define PLAT_FPGA_IRQ_H
 
index 3e90a094798d2955054db8f8bee381cb07dcfde9..b6084898d33017e01edaef49893169a26c9c0164 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQDESC_H
 #define _LINUX_IRQDESC_H
 
index 81e4889ca6dd2c3e571c3ca292e0d8db55780da4..b1037dfc47e40eff76735022b7582024b6d89290 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * irq_domain - IRQ translation domains
  *
index 5fdd93bb93009ccb3bb70404a59f9fd31939bcb4..46cb57d5eb1361e521f36208f0fef6b31fd071ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/irqflags.h
  *
index 661bed0ed1f3124ca2024559f2613507dd22221f..1e6f4e7123d653c58fb914be633d3d2cc05f4bb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQHANDLER_H
 #define _LINUX_IRQHANDLER_H
 
index 9669bf9d4f48fa38381f6c5f931b6579fc10a800..3496baa0b07f37929eb68216738a10182257bda5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQNR_H
 #define _LINUX_IRQNR_H
 
index eb1bdcf95f2e0c931a3a5cb599ab06547ff34f3d..bd4c066ad39b3bf419df923c19f27b5964130f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_IRQRETURN_H
 #define _LINUX_IRQRETURN_H
 
index f2d0258414cfef9a98384f3c59d691f387ef5862..41336da0f4e72069a3f6dede709af04c687df5a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ISA bus.
  */
index b92e0565063939ede488f0764011614999e0c148..7de6822d7b1a3c0978c5a2d588b492bdb39308a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ISICOM_H
 #define _LINUX_ISICOM_H
 
index 734377ad42e9f0e4719edc4750b57245fa2d3f17..9385aa57497b80851cbe7bfd6adc83c60f03034c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_JIFFIES_H
 #define _LINUX_JIFFIES_H
 
index 98cd41bb39c8667953c10030ef32f2945765f7e8..9fb870524314548de86ea51fb476de685c5cddb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/journal-head.h
  *
index cd5861651b17eeb28e66ecb82f5b4ba99ce3cf39..3b7675bcca645397d664ef24d6ed5449ff9f3fc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_JUMP_LABEL_H
 #define _LINUX_JUMP_LABEL_H
 
index 23da3af459fe7af7b5e5c2eabccbda350122e88b..fc13ff289903700cb569f1bbfa5912e69b796455 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_JUMP_LABEL_RATELIMIT_H
 #define _LINUX_JUMP_LABEL_RATELIMIT_H
 
index 8184578fbfa45621a83380c11066f009b4949a5b..19d995c8bf06bd21db0d88605f4b526e796f40f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __LINUX_JZ4740_ADC
 #define __LINUX_JZ4740_ADC
index 6883e197acb9e939156c4934d9cc7150b1b107f5..11dd93e4258027cac8968074a5725aeafc7ae814 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Rewritten and vastly simplified by Rusty Russell for in-kernel
  * module loader:
  *   Copyright 2002 Rusty Russell <rusty@rustcorp.com.au> IBM Corporation
index 41960fecf7838d7160a2fa5a17e4a78eb0e55a33..d314150658a43f4392026b62d57cd708814e5eb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KASAN_CHECKS_H
 #define _LINUX_KASAN_CHECKS_H
 
index a5c7046f26b4b93f9199c2f4800b7a1da77791da..5017269e3f044d6d185fe8be2502e24932e8357f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KASAN_H
 #define _LINUX_KASAN_H
 
index 7274ec68c246628bf5939f30f76ef450a3bb6483..738c7340c151dd338a406d07cb2112d66e9b9d9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _DIACR_H
 #define _DIACR_H
 #include <linux/kd.h>
index cbfb171bbcbaaf169726b00a2013683e3ec94a1b..bb2246c8ec13792128030fe6b781c1633005866a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KBD_KERN_H
 #define _KBD_KERN_H
 
index 4e80f3a9ad58abc815926b701a8fbc83c153b5a9..e7be517aaaf68da7764049044734095966a1e7be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_KBUILD_H
 #define __LINUX_KBUILD_H
 
index 4d748603e818307feb491f26cafb9c4170586e5d..fec5076eda91d2fd6e401b43463cb43855aa6c57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_KCONFIG_H
 #define __LINUX_KCONFIG_H
 
index d92762286645a90a0fd8bfad21e6860c8f30e0bd..7ff25a808feffd115e5af4faab56c2542c227c63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * /proc/kcore definitions
  */
index 2883ac98c280ca429f25f5571805d02fa09be96b..f5d8ce4f4f8667d8fd1002f058c8b56f250d480a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KCOV_H
 #define _LINUX_KCOV_H
 
index 25bd17fad239f44da6e2576413fc4a43e1342ede..b130a18f860f0ec95864de523186040a64d38cb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KD_H
 #define _LINUX_KD_H
 
index ed815090b3bc2bc686612697dadbbdd2c4f85d0a..fd311565fabfbf1a8fc752bb1c4d6b2d4f8b9f7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KDEBUG_H
 #define _LINUX_KDEBUG_H
 
index 8e9e288b08c13f6cddc63cf33724248b2e1150e8..85b5151911cfd098ca97d0397e440f737de1493a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KDEV_T_H
 #define _LINUX_KDEV_T_H
 
index f282d4e87258bcae11c6fb34091e23354e90d47e..d237fe854ad928c9340f610bf46d10c9339c58ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KERN_LEVELS_H__
 #define __KERN_LEVELS_H__
 
index f65ce09784f14b4ec67802b69e032297433b91c0..abd20ef93c98b2f708499496445ee310e344c0aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_KERNEL_PAGE_FLAGS_H
 #define LINUX_KERNEL_PAGE_FLAGS_H
 
index 0ad4c3044cf9333fa9664c2be0850e9596ab2206..4b484ab9e1635e6b412038fa2204d3f297a7c97d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KERNEL_H
 #define _LINUX_KERNEL_H
 
 
 #define STACK_MAGIC    0xdeadbeef
 
+/**
+ * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
+ * @x: value to repeat
+ *
+ * NOTE: @x is not checked for > 0xff; larger values produce odd results.
+ */
 #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
 
 /* @a is a power of 2 value */
 #define READ                   0
 #define WRITE                  1
 
+/**
+ * ARRAY_SIZE - get the number of elements in array @arr
+ * @arr: array to be sized
+ */
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
 
 #define u64_to_user_ptr(x) (           \
 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
 #define round_down(x, y) ((x) & ~__round_mask(x, y))
 
+/**
+ * FIELD_SIZEOF - get the size of a struct's field
+ * @t: the target struct
+ * @f: the target struct's field
+ * Return: the size of @f in the struct definition without having a
+ * declared instance of @t.
+ */
 #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
+
 #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
 
 #define DIV_ROUND_DOWN_ULL(ll, d) \
 /*
  * Divide positive or negative dividend by positive or negative divisor
  * and round to closest integer. Result is undefined for negative
- * divisors if he dividend variable type is unsigned and for negative
+ * divisors if the dividend variable type is unsigned and for negative
  * dividends if the divisor variable type is unsigned.
  */
 #define DIV_ROUND_CLOSEST(x, divisor)(                 \
@@ -247,13 +266,13 @@ extern int _cond_resched(void);
  * @ep_ro: right open interval endpoint
  *
  * Perform a "reciprocal multiplication" in order to "scale" a value into
- * range [0, ep_ro), where the upper interval endpoint is right-open.
+ * range [0, @ep_ro), where the upper interval endpoint is right-open.
  * This is useful, e.g. for accessing a index of an array containing
- * ep_ro elements, for example. Think of it as sort of modulus, only that
+ * @ep_ro elements, for example. Think of it as sort of modulus, only that
  * the result isn't that of modulo. ;) Note that if initial input is a
  * small value, then result will return 0.
  *
- * Return: a result based on val in interval [0, ep_ro).
+ * Return: a result based on @val in interval [0, @ep_ro).
  */
 static inline u32 reciprocal_scale(u32 val, u32 ep_ro)
 {
@@ -618,8 +637,8 @@ do {                                                                        \
  * trace_printk - printf formatting in the ftrace buffer
  * @fmt: the printf format for printing
  *
- * Note: __trace_printk is an internal function for trace_printk and
- *       the @ip is passed in via the trace_printk macro.
+ * Note: __trace_printk is an internal function for trace_printk() and
+ *       the @ip is passed in via the trace_printk() macro.
  *
  * This function allows a kernel developer to debug fast path sections
  * that printk is not appropriate for. By scattering in various
@@ -629,7 +648,7 @@ do {                                                                        \
  * This is intended as a debugging tool for the developer only.
  * Please refrain from leaving trace_printks scattered around in
  * your code. (Extra memory is used for special buffers that are
- * allocated when trace_printk() is used)
+ * allocated when trace_printk() is used.)
  *
  * A little optization trick is done here. If there's only one
  * argument, there's no need to scan the string for printf formats.
@@ -681,7 +700,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...);
  *       the @ip is passed in via the trace_puts macro.
  *
  * This is similar to trace_printk() but is made for those really fast
- * paths that a developer wants the least amount of "Heisenbug" affects,
+ * paths that a developer wants the least amount of "Heisenbug" effects,
  * where the processing of the print format is still too much.
  *
  * This function allows a kernel developer to debug fast path sections
@@ -692,7 +711,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...);
  * This is intended as a debugging tool for the developer only.
  * Please refrain from leaving trace_puts scattered around in
  * your code. (Extra memory is used for special buffers that are
- * allocated when trace_puts() is used)
+ * allocated when trace_puts() is used.)
  *
  * Returns: 0 if nothing was written, positive # if string was.
  *  (1 when __trace_bputs is used, strlen(str) when __trace_puts is used)
@@ -771,6 +790,12 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
        t2 min2 = (y);                                  \
        (void) (&min1 == &min2);                        \
        min1 < min2 ? min1 : min2; })
+
+/**
+ * min - return minimum of two values of the same or compatible types
+ * @x: first value
+ * @y: second value
+ */
 #define min(x, y)                                      \
        __min(typeof(x), typeof(y),                     \
              __UNIQUE_ID(min1_), __UNIQUE_ID(min2_),   \
@@ -781,12 +806,31 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
        t2 max2 = (y);                                  \
        (void) (&max1 == &max2);                        \
        max1 > max2 ? max1 : max2; })
+
+/**
+ * max - return maximum of two values of the same or compatible types
+ * @x: first value
+ * @y: second value
+ */
 #define max(x, y)                                      \
        __max(typeof(x), typeof(y),                     \
              __UNIQUE_ID(max1_), __UNIQUE_ID(max2_),   \
              x, y)
 
+/**
+ * min3 - return minimum of three values
+ * @x: first value
+ * @y: second value
+ * @z: third value
+ */
 #define min3(x, y, z) min((typeof(x))min(x, y), z)
+
+/**
+ * max3 - return maximum of three values
+ * @x: first value
+ * @y: second value
+ * @z: third value
+ */
 #define max3(x, y, z) max((typeof(x))max(x, y), z)
 
 /**
@@ -805,8 +849,8 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
  * @lo: lowest allowable value
  * @hi: highest allowable value
  *
- * This macro does strict typechecking of lo/hi to make sure they are of the
- * same type as val.  See the unnecessary pointer comparisons.
+ * This macro does strict typechecking of @lo/@hi to make sure they are of the
+ * same type as @val.  See the unnecessary pointer comparisons.
  */
 #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi)
 
@@ -816,11 +860,24 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
  *
  * Or not use min/max/clamp at all, of course.
  */
+
+/**
+ * min_t - return minimum of two values, using the specified type
+ * @type: data type to use
+ * @x: first value
+ * @y: second value
+ */
 #define min_t(type, x, y)                              \
        __min(type, type,                               \
              __UNIQUE_ID(min1_), __UNIQUE_ID(min2_),   \
              x, y)
 
+/**
+ * max_t - return maximum of two values, using the specified type
+ * @type: data type to use
+ * @x: first value
+ * @y: second value
+ */
 #define max_t(type, x, y)                              \
        __max(type, type,                               \
              __UNIQUE_ID(min1_), __UNIQUE_ID(min2_),   \
@@ -834,7 +891,7 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
  * @hi: maximum allowable value
  *
  * This macro does no typechecking and uses temporary variables of type
- * 'type' to make all the comparisons.
+ * @type to make all the comparisons.
  */
 #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
 
@@ -845,15 +902,17 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
  * @hi: maximum allowable value
  *
  * This macro does no typechecking and uses temporary variables of whatever
- * type the input argument 'val' is.  This is useful when val is an unsigned
- * type and min and max are literals that will otherwise be assigned a signed
+ * type the input argument @val is.  This is useful when @val is an unsigned
+ * type and @lo and @hi are literals that will otherwise be assigned a signed
  * integer type.
  */
 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
 
 
-/*
- * swap - swap value of @a and @b
+/**
+ * swap - swap values of @a and @b
+ * @a: first value
+ * @b: second value
  */
 #define swap(a, b) \
        do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
index 66be8b6becebec1d8a79d65f925a3f3096d22427..7ee2bb43b251a890aae37c56d0ee8edde7012ac5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KERNEL_STAT_H
 #define _LINUX_KERNEL_STAT_H
 
index e985ba679c4a4b87ce3e5de051c8f1eabdfa45af..075fab5f92e1a5331209f2ffae134935db22ae3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
  * 
index 2b7590f5483a1fc4474fbecddd099977222531cb..1c08c925cefbb748e0255486e30be309d70c497f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_KEXEC_H
 #define LINUX_KEXEC_H
 
index 044114185120633b8ca5c678b22570c3c2f8e264..8a15cabe928d0ee282742f0c44be26e7af01851d 100644 (file)
@@ -138,6 +138,11 @@ struct key_restriction {
        struct key_type *keytype;
 };
 
+enum key_state {
+       KEY_IS_UNINSTANTIATED,
+       KEY_IS_POSITIVE,                /* Positively instantiated */
+};
+
 /*****************************************************************************/
 /*
  * authentication token / access credential / keyring
@@ -169,6 +174,7 @@ struct key {
                                                 * - may not match RCU dereferenced payload
                                                 * - payload should contain own length
                                                 */
+       short                   state;          /* Key state (+) or rejection error (-) */
 
 #ifdef KEY_DEBUGGING
        unsigned                magic;
@@ -176,17 +182,16 @@ struct key {
 #endif
 
        unsigned long           flags;          /* status flags (change with bitops) */
-#define KEY_FLAG_INSTANTIATED  0       /* set if key has been instantiated */
-#define KEY_FLAG_DEAD          1       /* set if key type has been deleted */
-#define KEY_FLAG_REVOKED       2       /* set if key had been revoked */
-#define KEY_FLAG_IN_QUOTA      3       /* set if key consumes quota */
-#define KEY_FLAG_USER_CONSTRUCT        4       /* set if key is being constructed in userspace */
-#define KEY_FLAG_NEGATIVE      5       /* set if key is negative */
-#define KEY_FLAG_ROOT_CAN_CLEAR        6       /* set if key can be cleared by root without permission */
-#define KEY_FLAG_INVALIDATED   7       /* set if key has been invalidated */
-#define KEY_FLAG_BUILTIN       8       /* set if key is built in to the kernel */
-#define KEY_FLAG_ROOT_CAN_INVAL        9       /* set if key can be invalidated by root without permission */
-#define KEY_FLAG_KEEP          10      /* set if key should not be removed */
+#define KEY_FLAG_DEAD          0       /* set if key type has been deleted */
+#define KEY_FLAG_REVOKED       1       /* set if key had been revoked */
+#define KEY_FLAG_IN_QUOTA      2       /* set if key consumes quota */
+#define KEY_FLAG_USER_CONSTRUCT        3       /* set if key is being constructed in userspace */
+#define KEY_FLAG_ROOT_CAN_CLEAR        4       /* set if key can be cleared by root without permission */
+#define KEY_FLAG_INVALIDATED   5       /* set if key has been invalidated */
+#define KEY_FLAG_BUILTIN       6       /* set if key is built in to the kernel */
+#define KEY_FLAG_ROOT_CAN_INVAL        7       /* set if key can be invalidated by root without permission */
+#define KEY_FLAG_KEEP          8       /* set if key should not be removed */
+#define KEY_FLAG_UID_KEYRING   9       /* set if key is a user or user session keyring */
 
        /* the key type and key description string
         * - the desc is used to match a key against search criteria
@@ -212,7 +217,6 @@ struct key {
                        struct list_head name_link;
                        struct assoc_array keys;
                };
-               int reject_error;
        };
 
        /* This is set on a keyring to restrict the addition of a link to a key
@@ -243,6 +247,7 @@ extern struct key *key_alloc(struct key_type *type,
 #define KEY_ALLOC_NOT_IN_QUOTA         0x0002  /* not in quota */
 #define KEY_ALLOC_BUILT_IN             0x0004  /* Key is built into kernel */
 #define KEY_ALLOC_BYPASS_RESTRICTION   0x0008  /* Override the check on restricted keyrings */
+#define KEY_ALLOC_UID_KEYRING          0x0010  /* allocating a user or user session keyring */
 
 extern void key_revoke(struct key *key);
 extern void key_invalidate(struct key *key);
@@ -351,17 +356,27 @@ extern void key_set_timeout(struct key *, unsigned);
 #define        KEY_NEED_SETATTR 0x20   /* Require permission to change attributes */
 #define        KEY_NEED_ALL    0x3f    /* All the above permissions */
 
+static inline short key_read_state(const struct key *key)
+{
+       /* Barrier versus mark_key_instantiated(). */
+       return smp_load_acquire(&key->state);
+}
+
 /**
- * key_is_instantiated - Determine if a key has been positively instantiated
+ * key_is_positive - Determine if a key has been positively instantiated
  * @key: The key to check.
  *
  * Return true if the specified key has been positively instantiated, false
  * otherwise.
  */
-static inline bool key_is_instantiated(const struct key *key)
+static inline bool key_is_positive(const struct key *key)
+{
+       return key_read_state(key) == KEY_IS_POSITIVE;
+}
+
+static inline bool key_is_negative(const struct key *key)
 {
-       return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) &&
-               !test_bit(KEY_FLAG_NEGATIVE, &key->flags);
+       return key_read_state(key) < 0;
 }
 
 #define dereference_key_rcu(KEY)                                       \
index 131ed5146521cd609488c2dc2d65620fdd96386f..73d11e4090cf52cb8e4574b473417677d9f59b99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_KEYBOARD_H
 #define __LINUX_KEYBOARD_H
 
index f0d7335336cd6ed00bd2759e4c6fb9a5f5b38671..082d1d2a5216977262d3a1817b30a9131efe873a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KHUGEPAGED_H
 #define _LINUX_KHUGEPAGED_H
 
index 39f8453239f779edcd0e5dedfc2d293b34bf7b60..7b1d7bead7d93ceb32dfdd43a4bb3c771ac69551 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_KMEMCHECK_H
 #define LINUX_KMEMCHECK_H
 
index 18ca75ffcc5a159b81be6bc153bd9d5e01ae4adc..c9919f8b22932cc3cab9efae41d50f6cbbdd6de6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * kobj_map.h
  */
index 78b44a024eaae8e9a9a0e2c448b4b3e2b7f48719..44368b19b27e11e848ced6348c4e747396c23b6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_KSM_H
 #define __LINUX_KSM_H
 /*
index 82e197eeac91f2bff8b62df9a58c75b5645b1ca2..4e26609c77d4136cd0ecb096ac3616cebf4e0a6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KTHREAD_H
 #define _LINUX_KTHREAD_H
 /* Simple interface for creating and stopping kernel threads without mess. */
index 35e568f04b1e7b94a6322c05d48583b43af8618c..51f6ef2c2ff461a0b80ea121ad48545b31473d03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_KVM_PARA_H
 #define __LINUX_KVM_PARA_H
 
index bffdb962f1a6cba216e1c9ec9ba13acb878f4a3a..0402eda1a94e81810453b8f01d027ad7b2451a49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * L2TP-over-IP socket for L2TPv3.
  *
index 873c1eb635e478a3259cbf1fb59cd57545c0d701..eb56472f23b23011586bc30fa9e4ae0c7c4d4767 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * These are the public elements of the Linux LAPB module.
  */
index 59ccab297ae061ba03494ccede8eae2d7a5236a1..7c560e0dc8f4d6793ba00553bea63d2cb1de2a87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * latencytop.h: Infrastructure for displaying latency
  *
index 504f6246f38f38feb59d3eb0faee7a4e663379b7..851eee8fff257836c06ed5b8b7f4ddb7d0e87e2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * LCD Lowlevel Control Abstraction
  *
index 1ce79a7f1daa18868adfe14598c35206382f58a5..0db3efd56efbbe478dff8d81b18ce655fb3a250a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LCM_H
 #define _LCM_H
 
index a65e9646e4b15e5312b0af9904e66ed41514cb8b..93d101d28943f1659fb1f328f7c16bc6c5566b7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PWM LED driver data - see drivers/leds/leds-pwm.c
  */
index 4c0306c69b4e0efce9c8b10d84dafc08c9c1f836..27ba06e5d117e7833c68fd3cca5c7ef61748e273 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_LIBFDT_H_
 #define _INCLUDE_LIBFDT_H_
 
index 2a663c6bb4285851a7a0270728ad7c2ddcab33ef..14997285e53d30d3e7cb27cf306b4a172a31021e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBFDT_ENV_H
 #define _LIBFDT_ENV_H
 
index 7dfa56ebbc6d0f1bd4e215c93d5e642b3231334b..a29a8db5cc2fcd3865ee99fb8e35520389aa8975 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef NVM_H
 #define NVM_H
 
index a6a42dd024661324dbeed5b9cfaa028744bae154..2e6f90bd52aa6254a1291abe7082269bdf3003b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LINKAGE_H
 #define _LINUX_LINKAGE_H
 
index ca5bd91d12e169cd80eb6a546fe73c35df8ead91..5e3581d76c7f466dfa0568582bce4a1b7fdde0ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LINUX_LOGO_H
 #define _LINUX_LINUX_LOGO_H
 
index f1664c636af096ef487f545a91ab8127bd625d71..b72b8cdba76501d9cd60df8000073c95434555d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LIS3LV02D_H_
 #define __LIS3LV02D_H_
 
index ae537fa462160efff72574107dd34a8b1e29375c..4b129df4d46b5a4c26d970c6a0c385b6c208d9d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LIST_H
 #define _LINUX_LIST_H
 
index cb483305e1f5af4e856a05446a02fbcfacf61165..3fc2cc57ba1bc6d5badfd24ef67982683457507e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LIST_BL_H
 #define _LINUX_LIST_BL_H
 
index fa7fd03cb5f964c4be4b74f435c2fdb81ba58936..bb8129a3474d7ebe3977e0631809ea71342c8e55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2013 Red Hat, Inc. and Parallels Inc. All rights reserved.
  * Authors: David Chinner and Glauber Costa
index 87ff4f58a2f0182ec0586c0dee923bc30e004149..3ef96743db8da3868744efc92d812c9b746bf9c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LIST_NULLS_H
 #define _LINUX_LIST_NULLS_H
 
index 1a2df2efb77165ebdf0b0d7d37cc7e4489f93bd6..ba79956e848d5d86ea9194f64c59bf0c60c4b65a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_LIST_SORT_H
 #define _LINUX_LIST_SORT_H
 
index 05728396a1a18f701f5bba8075be5301e6a89e4e..053a4ef3d43175df329ab8b5e2758ce67c50cf7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/bind.h
  *
index 0ca8109934e43d3ee5ede75daf7b9b4d1831e5e0..e536c579827f116bf819c76a50467056ae51affc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/debug.h
  *
index 3eca6772836660a74097fc1d459e3ff716d00088..d7d313fb9cd4c1ef72e3f610e3c683adcd143a23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/lockd.h
  *
index d9d46e4425385d68c1706a75ba5d278a1798e7e4..6e343ef760dc3a7fb561f42ec917fa9aaa91242f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/nlm.h
  *
index 630c5bf69b0786046bf420481e0894c56e3a4562..1f18a9faf645224de0e5d720d3cb38da1d167385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/share.h
  *
index 7acbecc21a4016532b327b90b3addcd08612d08d..7ab9f264313f09ba07e85a1e3dee4c3d8af7c77d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/xdr.h
  *
index bf16456092254b99e36e57a42cd68e5978d20ab9..e709fe5924f2b094e971cf6eabd1186b1f504348 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/lockd/xdr4.h
  *
index bfa8e0b0d6f1b26442fbe1f36be54b749dffb7bc..f301d31b473c789b9f51038b9d9ac2dddace38f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Runtime locking correctness validator
  *
index b10b122dd09989be9bcf70f3700d22ffce0b3623..ef3c9342e11916266b15ebf001ab2c0943d2a85d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_LOCKREF_H
 #define __LINUX_LOCKREF_H
 
index 0dd276af9e4ead29f039f67becde01b991c8769d..be8a07eb20834cfda3be02d81fb1abd2cfca2bb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * usr/include/linux/lp.h c.1991-1992 James Wiegand
  * many modifications copyright (C) 1992 Michael K. Johnson
index d1c2901f15420dd331ac70a004b699ae7f76c455..915330abf6e58fc2ecf494c498b7d266b0d56448 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common LSM logging functions
  * Heavily borrowed from selinux/avc.h
index a0848d9377e569a38b0f7f493a36383224686b53..2ae27cb89927e36dadc1c1bce1232ee7a121808c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LZO_H__
 #define __LZO_H__
 /*
index 41d1eeb9b3bd5ea554308dd22bffbd05a8c23050..00758f45fddc6a7af0291b049f2aea95cdb7f68b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __mISDNdsp_H__
 #define __mISDNdsp_H__
 
index c37288b23e0cf4cb1bb37fa4a0516efcd0cd4d5f..9b140272ee165b314744271ca90cf28008f8ddf9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MAPLE_H
 #define __LINUX_MAPLE_H
 
index 4055cf8cc978cce05a0c07b3f181f18ce39f1b3f..4f5f8c21e2830bd3c7de20bd509b360f27e66816 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MARVELL_PHY_H
 #define _MARVELL_PHY_H
 
index 80690c96c734d4fea4cd8970fe6a93b89eb34379..082de345b73ce0c02d5a3466336bb97bd408894f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MATH64_H
 #define _LINUX_MATH64_H
 
index e1bc734149835b54c71fecdbd6ceb6ca42298001..20f1e3ff60130d036276bef138533755a97e7b48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MBCACHE_H
 #define _LINUX_MBCACHE_H
 
index 0d3f14fd26217fcb2a472c411c2e9ee73a6c6c85..4773145246ed264f47e2a1c885dc7bd36654ddd3 100644 (file)
@@ -31,8 +31,8 @@ struct mbus_dram_target_info
        struct mbus_dram_window {
                u8      cs_index;
                u8      mbus_attr;
-               u32     base;
-               u32     size;
+               u64     base;
+               u64     size;
        } cs[4];
 };
 
index 28e301e295da0d91fb31853c024032f5eff481e6..8dffab19b4ac187658b558997c79432207b069d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MC6821_H_
 #define _MC6821_H_
 
index 76f52bbbb2f430b822524b4e60ef90fa05a4f476..a8ac9cfa014ccbc89e8ee3d9f4f08f8b2847f3cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MDIO_BITBANG_H
 #define __LINUX_MDIO_BITBANG_H
 
index a0d274fe08f157e3ae0ad476d89c732428eda227..7fde40e17c8b0716dcdc572f0f17f0e6275b9a9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MEI_CL_BUS_H
 #define _LINUX_MEI_CL_BUS_H
 
index b723a686fc1048f47eb94132ebdfdc0da0b0e6ea..f71e732c77b2b6619291c2f62eee16853054aae4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/memory.h - generic memory definition
  *
index 0995e1a2b4583138953d395e3d10b389b0cb0609..58e110aee7ab4d68a954ad850fd626d71ed28b55 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MEMORY_HOTPLUG_H
 #define __LINUX_MEMORY_HOTPLUG_H
 
index 3a58b4be1b0cba5d8db19a763438ab343fea9c71..5228c62af41659bb7d5ae0e7db00969b9f16ef73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NUMA memory policies for Linux.
  * Copyright 2003,2004 Andi Kleen SuSE Labs
index b1086c936507a34925020ce18131a8d5c3573a8a..b51f5c430c268974b220b43c68780fad4837b7c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * memory buffer pool support
  */
index 79f8ba7c38940953182d05a59df970d06acc13fc..10d23c3670481813c540b3e7a92f925c336b4a63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MEMREMAP_H_
 #define _LINUX_MEMREMAP_H_
 #include <linux/mm.h>
index 0aa3a1a49ee32761ae5d15ff4942a90c18d475b0..d1c57b8dbba4e3d6d9aef1068d9a4069518929bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PMIC_DA903X_H
 #define __LINUX_PMIC_DA903X_H
 
index 004b24576da887616fad82ae012405c938ce3297..4cade9aa8edb2e3e38e932159af8ceb81bed5af4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_USB_DLN2_H
 #define __LINUX_USB_DLN2_H
 
index 2227c6a75d84953f5e93122d76ea13d123670863..43dfca1c970250bc9f34c04ae1787e3afb79c035 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* MFD cell driver data for the DS1WM driver
  *
  * to be defined in the MFD device that is
index 32a1b5cfeba1f426547127233c84732363fc4e30..ffde195e12b7dfd94b92e69e68d63decf9ce3d75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2009 Daniel Ribeiro <drwyrm@gmail.com>
  *
index 7fe4b8c3baac4171d2e28d83ad94aa3023d87733..21f8adfefd1d57f8b54379dba9e8664767a1c61f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_INCLUDE_MFD_IMX25_TSADC_H_
 #define _LINUX_INCLUDE_MFD_IMX25_TSADC_H_
 
index 5c4d29f6674f11c9add92c6e0b3b8a27c5412a58..ee48a4321c57a781a1812f3b54773a79765939e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Header file for the compaq Micro MFD
  */
index 9e85ac06da89d90c266a453ebd9d6c3f283dad53..ce489aba88ecb3bd2c6e35e3584bf03520848131 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Functions to access Menelaus power management chip
  */
index 2d3dbe53b2351c5cc348e6bf31709cda2874cff2..eac0c3d8e984c9f3517e2419b75a9ef2e1535e70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MFD_PCF50633_PMIC_H
 #define __LINUX_MFD_PCF50633_PMIC_H
 
index 742ebf1b76ca2e74a14bb3b48eeab92653948d48..4b6b644f11088a6a67ca8008b4e4b6ffa23c814d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_RPM_H__
 #define __QCOM_RPM_H__
 
index 442743a8f9153752661bf11a8dab9b998e55fe04..697933b2227b92fd4bd99ca630ee837b93c82560 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RDC321X_MFD_H
 #define __RDC321X_MFD_H
 
index 15646740e2a8ce38654a87371bf19522b340d974..e1cfe91941293a380f8c06ca710beefac42b25d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MFD_TMIO_H
 #define MFD_TMIO_H
 
index 96187ed9f9bbdf7941b08caa68ae5a20496232e8..2fe68e48123092f16dd4e97ad89f5bd1f84c8db9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MFD_TPS6586X_H
 #define __LINUX_MFD_TPS6586X_H
 
index 643c7ae7d7b4d8dfad5fa20faf255334f133176f..895ec0c4942e68c43ca49f1fb77f5112344ca05a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MIGRATE_H
 #define _LINUX_MIGRATE_H
 
index bdf66af9b937a51a661a15c7f0feda67847efe90..883c992490334ba27dcbcd5ba4dcad897e5dfff6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MIGRATE_MODE_H_INCLUDED
 #define MIGRATE_MODE_H_INCLUDED
 /*
index e870bfa6abfebee71051aecf237f8de03c1b2532..55000ee5c6ad7eb31bc7c3d587b85a0c6d138cc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/mii.h: definitions for MII-compatible transceivers
  * Originally drivers/net/sunhme.h.
index 58751eae5f7723e185c126e1d424d7f7f1971696..4de703d9e21f0de963752a83efa2a29dc6b00b24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MISCDEVICE_H
 #define _LINUX_MISCDEVICE_H
 #include <linux/major.h>
index eaf4ad209c8fa9bb8859d6c7e0c4392f8f8c23aa..e32dbc4934dbbf7e743bd33dd1b3ed8a4c9cee88 100644 (file)
@@ -980,7 +980,6 @@ enum mlx5_cap_type {
        MLX5_CAP_RESERVED,
        MLX5_CAP_VECTOR_CALC,
        MLX5_CAP_QOS,
-       MLX5_CAP_FPGA,
        /* NUM OF CAP Types */
        MLX5_CAP_NUM
 };
@@ -1110,10 +1109,10 @@ enum mlx5_mcam_feature_groups {
        MLX5_GET(mcam_reg, (mdev)->caps.mcam, mng_feature_cap_mask.enhanced_features.fld)
 
 #define MLX5_CAP_FPGA(mdev, cap) \
-       MLX5_GET(fpga_cap, (mdev)->caps.hca_cur[MLX5_CAP_FPGA], cap)
+       MLX5_GET(fpga_cap, (mdev)->caps.fpga, cap)
 
 #define MLX5_CAP64_FPGA(mdev, cap) \
-       MLX5_GET64(fpga_cap, (mdev)->caps.hca_cur[MLX5_CAP_FPGA], cap)
+       MLX5_GET64(fpga_cap, (mdev)->caps.fpga, cap)
 
 enum {
        MLX5_CMD_STAT_OK                        = 0x0,
index 02ff700e4f30cb66f70773caf6d467a5000d580d..401c8972cc3a869d77bcf1245dfc5095bcb6bbaf 100644 (file)
@@ -774,6 +774,7 @@ struct mlx5_core_dev {
                u32 hca_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
                u32 pcam[MLX5_ST_SZ_DW(pcam_reg)];
                u32 mcam[MLX5_ST_SZ_DW(mcam_reg)];
+               u32 fpga[MLX5_ST_SZ_DW(fpga_cap)];
        } caps;
        phys_addr_t             iseg_base;
        struct mlx5_init_seg __iomem *iseg;
index a528b35a022e0bd1ad840392c7d32a0c44aa3a6f..69772347f866680d1a19c08d4e5e5e48b5c233f8 100644 (file)
@@ -327,7 +327,8 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
        u8         reserved_at_80[0x18];
        u8         log_max_destination[0x8];
 
-       u8         reserved_at_a0[0x18];
+       u8         log_max_flow_counter[0x8];
+       u8         reserved_at_a8[0x10];
        u8         log_max_flow[0x8];
 
        u8         reserved_at_c0[0x40];
index c57d4b7de3a80203719f36319d17fb4794dd40b7..c59af8ab753a4f9eb35cb5da124fd7a0990339d0 100644 (file)
@@ -157,6 +157,8 @@ int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, u8 *prio_tc);
 int mlx5_query_port_prio_tc(struct mlx5_core_dev *mdev,
                            u8 prio, u8 *tc);
 int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, u8 *tc_group);
+int mlx5_query_port_tc_group(struct mlx5_core_dev *mdev,
+                            u8 tc, u8 *tc_group);
 int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *tc_bw);
 int mlx5_query_port_tc_bw_alloc(struct mlx5_core_dev *mdev,
                                u8 tc, u8 *bw_pct);
index f8c10d336e42ea5b43e6f72e593eaf90027a6cc5..43edf659453b2692a618d3d093d1f00262a6e715 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MM_H
 #define _LINUX_MM_H
 
@@ -240,7 +241,7 @@ extern unsigned int kobjsize(const void *objp);
 
 #if defined(CONFIG_X86_INTEL_MPX)
 /* MPX specific bounds table or bounds directory */
-# define VM_MPX                VM_HIGH_ARCH_BIT_4
+# define VM_MPX                VM_HIGH_ARCH_4
 #else
 # define VM_MPX                VM_NONE
 #endif
index 25438b2b6f223fb29989c41e1ce8ff854c425d10..c30b32e3c86248c2f39fa1b926124184fc45b205 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_MM_INLINE_H
 #define LINUX_MM_INLINE_H
 
index 46f4ecf5479adbb2829c26e63d5e56b20e779312..c85f11dafd56064c5c77a4e39cd4ad7a74f65755 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MM_TYPES_H
 #define _LINUX_MM_TYPES_H
 
@@ -445,6 +446,9 @@ struct mm_struct {
        unsigned long flags; /* Must use atomic bitops to access the bits */
 
        struct core_state *core_state; /* coredumping support */
+#ifdef CONFIG_MEMBARRIER
+       atomic_t membarrier_state;
+#endif
 #ifdef CONFIG_AIO
        spinlock_t                      ioctx_lock;
        struct kioctx_table __rcu       *ioctx_table;
index fc412fbd80bd4a9cb3b470292256a25a4217c496..5fe87687664c7d78046060499cf96b28790190cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MM_TYPES_TASK_H
 #define _LINUX_MM_TYPES_TASK_H
 
index c8367041fafde6e761044e7d77fb25736e58a863..7c87b6652244f191b1276dab72d9e60e41a2e72b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MMAN_H
 #define _LINUX_MMAN_H
 
index f3f2d07feb2a627d9b65409b7e5a0c0e53fe54c2..9a43763a68adb3e998ec942300688f99e065489b 100644 (file)
@@ -316,7 +316,7 @@ struct mmc_host {
 #define MMC_CAP_UHS_SDR50      (1 << 18)       /* Host supports UHS SDR50 mode */
 #define MMC_CAP_UHS_SDR104     (1 << 19)       /* Host supports UHS SDR104 mode */
 #define MMC_CAP_UHS_DDR50      (1 << 20)       /* Host supports UHS DDR50 mode */
-#define MMC_CAP_NO_BOUNCE_BUFF (1 << 21)       /* Disable bounce buffers on host */
+/* (1 << 21) is free for reuse */
 #define MMC_CAP_DRIVER_TYPE_A  (1 << 23)       /* Host supports Driver Type A */
 #define MMC_CAP_DRIVER_TYPE_C  (1 << 24)       /* Host supports Driver Type C */
 #define MMC_CAP_DRIVER_TYPE_D  (1 << 25)       /* Host supports Driver Type D */
index fda15b6d4135d387549e1ed628ca1285b399abb0..36f986d4a59a3424f2e979a7a319088accc5e681 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_MMC_SDHCI_PCI_DATA_H
 #define LINUX_MMC_SDHCI_PCI_DATA_H
 
index abacd5484bc0bfc0fd128519e75150baafbc9010..cdd66a5fbd5e00905ff5e6c2623e6efaf12bf225 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SDIO Classes, Interface Types, Manufacturer IDs, etc.
  */
index 451a811f48f262cd951a69755b8e30fbb0cb1ce9..57b0030d38007b4ce9eeb4b1c1f56e360a5e78c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_MM_DEBUG_H
 #define LINUX_MM_DEBUG_H 1
 
index 3ba327af055cc43e4d38517fda8557420238f7f0..88236849894dd4aea8d54a8b1bc92dac1b161473 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MMIOTRACE_H
 #define _LINUX_MMIOTRACE_H
 
index a4441784503b5bcade00e20c5b67ac496a9f1143..d9a543a9e1ccec60ea7ab8ce283e0f2bd9503566 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MMU_CONTEXT_H
 #define _LINUX_MMU_CONTEXT_H
 
index 7b2e31b1745aaf3a7d3e8af0ca915c6c2dc04516..2cf1c3c807f6500375bec36667d95db3704f3716 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MMU_NOTIFIER_H
 #define _LINUX_MMU_NOTIFIER_H
 
@@ -400,6 +401,11 @@ extern void mmu_notifier_synchronize(void);
 
 #else /* CONFIG_MMU_NOTIFIER */
 
+static inline int mm_has_notifiers(struct mm_struct *mm)
+{
+       return 0;
+}
+
 static inline void mmu_notifier_release(struct mm_struct *mm)
 {
 }
index 356a814e7c8eb8b56179dd72bdbcf76703fa56b1..c9c4a81b976711531125939340086e79a7de3ba1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MMZONE_H
 #define _LINUX_MMZONE_H
 
@@ -1094,8 +1095,14 @@ static inline unsigned long early_pfn_to_nid(unsigned long pfn)
 #error Allocator MAX_ORDER exceeds SECTION_SIZE
 #endif
 
-#define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT)
-#define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT)
+static inline unsigned long pfn_to_section_nr(unsigned long pfn)
+{
+       return pfn >> PFN_SECTION_SHIFT;
+}
+static inline unsigned long section_nr_to_pfn(unsigned long sec)
+{
+       return sec << PFN_SECTION_SHIFT;
+}
 
 #define SECTION_ALIGN_UP(pfn)  (((pfn) + PAGES_PER_SECTION - 1) & PAGE_SECTION_MASK)
 #define SECTION_ALIGN_DOWN(pfn)        ((pfn) & PAGE_SECTION_MASK)
index 12b2ab51032317357c9ca49221f0af864668af0d..35942084cd40d56cc1bd9f7ccc08be460ad35cc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NAMESPACE_H_
 #define _NAMESPACE_H_
 #ifdef __KERNEL__
index 694cebb50f72c7d1cb404e26416e5400545c114c..1c2e8d6b72743b3dd899b6c0d4892c99b721dccd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Device tables which are exported to userspace via
  * scripts/mod/file2alias.c.  You must keep that file in sync with this
@@ -293,6 +294,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_SND_MAX                0x07
 #define INPUT_DEVICE_ID_FF_MAX         0x7f
 #define INPUT_DEVICE_ID_SW_MAX         0x0f
+#define INPUT_DEVICE_ID_PROP_MAX       0x1f
 
 #define INPUT_DEVICE_ID_MATCH_BUS      1
 #define INPUT_DEVICE_ID_MATCH_VENDOR   2
@@ -308,6 +310,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_MATCH_SNDBIT   0x0400
 #define INPUT_DEVICE_ID_MATCH_FFBIT    0x0800
 #define INPUT_DEVICE_ID_MATCH_SWBIT    0x1000
+#define INPUT_DEVICE_ID_MATCH_PROPBIT  0x2000
 
 struct input_device_id {
 
@@ -327,6 +330,7 @@ struct input_device_id {
        kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
        kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
        kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
+       kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1];
 
        kernel_ulong_t driver_info;
 };
index 4d0cb9bba93e4650d76b314cc50160e5b8e7e65d..31013c2effd3d5c7b148d601dff665e8ed10e7b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MODULELOADER_H
 #define _LINUX_MODULELOADER_H
 /* The stuff needed for archs to support modules. */
index 1ee7b30dafecdb27067a2e83fa0bbaccad96e8d9..1d7140fef154c8bd68b4c3a55f0f7dfa02136d8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MODULE_PARAMS_H
 #define _LINUX_MODULE_PARAMS_H
 /* (C) Copyright 2001, 2002 Rusty Russell IBM Corporation */
index 1ce85e6fd95f798a2e0f2afbb470515d8b0e40dd..45b1f56c6c2f9fb0db10fc912251955af04fc05e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  * Definitions for mount interface. This describes the in the kernel build 
index 068a0c9946af7e1f780f8cd287a517a14852286b..001f1fcf98361db20ccb2e09dfa36a6ffb78ace1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/mpage.h
  *
index 384fb22b6c436e357919656232342c0d538b8de3..ae1a188c011b9c1de229b812791d65998971c022 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MPLS_H
 #define _LINUX_MPLS_H
 
index ef29eb2d6dfd6bd103837a5afa449ffe74125364..140c56954fbe26de938589cf9f541911188d95c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MPLS_IPTUNNEL_H
 #define _LINUX_MPLS_IPTUNNEL_H
 
index d7f63339ef0b48e7321954ea2fd083d3da2478d6..65a70a7c51c13cebcd96085354db631dbfd70b4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MROUTE_H
 #define __LINUX_MROUTE_H
 
index ce44e3e96d2763cf766058c88680a15215a37084..3014c52bfd86e6f971ec9e569732d34bf8702282 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MROUTE6_H
 #define __LINUX_MROUTE6_H
 
index e1b163f912fbf0ad484c2435d08577f7929452b6..b7a5d4c72f56e450f71f5673711987185541b42e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MSDOS_FS_H
 #define _LINUX_MSDOS_FS_H
 
index 81263fe3f9dc9dee1d3341fa5c7eda322df415c0..0a7eefeee0d11862d7e2932a1ee56750b562b24f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MSG_H
 #define _LINUX_MSG_H
 
index 80e3b562bef6c9cb5f3e966b397ec61ef711940d..cdd069cf9ed83acc413be8a534a04da08c290cf6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_MSI_H
 #define LINUX_MSI_H
 
index 8255118be0f0a508fdee0b6a83ba148e0d837bb9..fdfff87066a97bb07a427e1f34930737a32195d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     inftl.h -- defines to support the Inverse NAND Flash Translation Layer
  *
index 628a6a21ddf035063c07051c95b25b24686fb246..ee8f95643f9b9ae69c2a818c314c7986e755baac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MTD_MTDRAM_H__
 #define __MTD_MTDRAM_H__
 
index be4f45d89be26c0b73ea50bd00d07b6f9e5753b1..fdef72d6e19891081af777b8fc5e75e19a674a57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MTD_NAND_GPIO_H
 #define __LINUX_MTD_NAND_GPIO_H
 
index 42ff7ff09bf59ca8d18981b71bed1c72b9639501..122f3439e1af20db053123df13893ea7bd21db70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Primary function overlay window definitions
  * and service functions used by LPDDR chips
  */
index b532ce524dae9e9e987854111b53445ab8cc54c0..df5b9fddea164ca705fae6a007d24b0b2ecaacc2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_MTD_QINFO_H
 #define __LINUX_MTD_QINFO_H
 
index ffcba1f337da833dee1f86d3960b1a315a4bd1a2..153274f78402b0483ff24001960b19739772afcd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Mutexes: blocking mutual exclusion locks
  *
index 61a0da38d0cbc163e88b46e0b0fdf0fb50c62934..3682ae75c7aa35ea904179330c8d5e794394b830 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MV-643XX ethernet platform device data definition file.
  */
index 8b4794e83196db62997ef5aea81886c3ad800bbd..a982bb7cd4806f887811b4928e1154f654cd0474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NAMEI_H
 #define _LINUX_NAMEI_H
 
index f535779d9dc1dfe36934c2abba4e43d053ac5d6f..2eaac7d75af4f1bbdaf876acc55b4bd0d37a7f36 100644 (file)
@@ -3694,6 +3694,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
                                    unsigned char name_assign_type,
                                    void (*setup)(struct net_device *),
                                    unsigned int txqs, unsigned int rxqs);
+int dev_get_valid_name(struct net *net, struct net_device *dev,
+                      const char *name);
+
 #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
        alloc_netdev_mqs(sizeof_priv, name, name_assign_type, setup, 1, 1)
 
index f84bca1703cdc865eabfe1f0290b882f4baee99f..b24e9b10165124121359d206b74c54b430a483d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NETFILTER_H
 #define __LINUX_NETFILTER_H
 
index 366d6c0ea04fe5c028fbda7413145d9f4d34b7d6..2dddbc6dcac708661c6f11680a861461cf84dbc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IP_SET_BITMAP_H
 #define __IP_SET_BITMAP_H
 
index 90d09300e9541381cffc5aee6a6d7b03e49e607f..ac6a11d38a190c43abd3b5ef6f1568dbddaa0c84 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IP_SET_GETPORT_H
 #define _IP_SET_GETPORT_H
 
index f98ddfb094cb320fc9059a78347df396140d1bb4..838abab672af111844de062e334596ebb2963814 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IP_SET_HASH_H
 #define __IP_SET_HASH_H
 
index fe2622a001516f382b71246dd7d9b68ec4f8b094..a61fe2a7e655b69d44cdcf386196f18c05221aba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IP_SET_LIST_H
 #define __IP_SET_LIST_H
 
index 1afbb94b4b65739eb04134c58a64fde586a92087..f59094e6158b917810d9d527370e15cf78ae7de3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PFXLEN_H
 #define _PFXLEN_H
 
index 4b59a15849592333cc09f107c3407f712a5360f3..34345e543ba290851bada958e3b0f4f909d4d00b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_AMANDA_H
 #define _NF_CONNTRACK_AMANDA_H
 /* AMANDA tracking. */
index 1d1ef4e205121cf8999e5adc195e0fe22ecd599a..03097fa70975434ed686d99b4cda8171749656e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_COMMON_H
 #define _NF_CONNTRACK_COMMON_H
 
index ff721d7325cfbb4e9bfd7ce3d57ab68401ea0247..ace0f952d50f77ecd08fd76756830e9c3844f8a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_DCCP_H
 #define _NF_CONNTRACK_DCCP_H
 
index 5f818b01e0356d7eac8c80762dff87a15483fad8..73a296dfd019a287a3b240b4877a17f49eb9ed3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_FTP_H
 #define _NF_CONNTRACK_FTP_H
 
index 858d9b214053ff141e5e856ce98edbf50412bc00..f76ed373a2a53a56dc8b61747f4a7a214298e314 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_H323_H
 #define _NF_CONNTRACK_H323_H
 
index 4bb9bae671763d211a3f7efe9115db4965e5c85b..00c2b74206e14f3c42570ce355088f929b86adb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_IRC_H
 #define _NF_CONNTRACK_IRC_H
 
index 2ab2830316b730d3ca9f29572500b43371aad641..833a5b2255ea4d84f324ed8f28f0e73bee9f9c82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* PPTP constants and structs */
 #ifndef _NF_CONNTRACK_PPTP_H
 #define _NF_CONNTRACK_PPTP_H
index dee0acd0dd318c9eafde85601318d4b6013cface..b8d95564bd53481acf0bd78b15a140e8ac761776 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CONNTRACK_PROTO_GRE_H
 #define _CONNTRACK_PROTO_GRE_H
 #include <asm/byteorder.h>
index 4767d6e23e977197ebc930600bb859db2ca96245..7d2de44edce36447c1c5df91a452fdc5e4b9a101 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_SANE_H
 #define _NF_CONNTRACK_SANE_H
 /* SANE tracking. */
index 22a16a23cd8a7e3d6d000ee7249477a3fef11604..9a33f171aa822d3a484f6f42f840ad2c7d5dc760 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_SCTP_H
 #define _NF_CONNTRACK_SCTP_H
 /* SCTP tracking. */
index d5af3c27fb7de0385b11396ac241991bacb3684e..c7fc38807a3304002b1f6179ef5ea840dc7e464e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NF_CONNTRACK_SIP_H__
 #define __NF_CONNTRACK_SIP_H__
 #ifdef __KERNEL__
index 064bc63a53464d612924758c5a7db075f60f39c1..818088c474758627c60f82a24b67a7381a377ac3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_SNMP_H
 #define _NF_CONNTRACK_SNMP_H
 
index 22db9614b584ad0d5b6bc174c2eb3613a8b73dfd..f9e3a663037b8f83da96e215c4b39fd5fdfddcef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_TCP_H
 #define _NF_CONNTRACK_TCP_H
 
index c78d38fdb0507b77e26bde53f8afbe297e72e859..5769e12dd0a2abdfdc89c189b23217fe6a6e3ab0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_TFTP_H
 #define _NF_CONNTRACK_TFTP_H
 
index 5d7cf36d4766564e5bc9c9873ce7da54d90554b6..8f3905e12a64b6e6373f3a3d395aeaa2eb6eaf4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_ZONES_COMMON_H
 #define _NF_CONNTRACK_ZONES_COMMON_H
 
index 41d04e9d088a8bee6410ee7c4fa2d150fd299b88..414a5e769fde98ba36f0bbe0b90505ffac2445ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFNETLINK_H
 #define _NFNETLINK_H
 
index 664da00486257519acadedde60b5de1571a8d540..b4d741195c28d925740964c657d85e44c41c0bab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFNL_ACCT_H_
 #define _NFNL_ACCT_H_
 
index b3044c2c62cbe8e856605129aa17f111e2a21493..33f7530f96b9d710f6a6bee0d06c6612437e220e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _X_TABLES_H
 #define _X_TABLES_H
 
index 0fc458bde80b3f8413a988c10a4ce603a2e1bf72..169d03983589c7491a683ad2c7a6ebb5ad3b210e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XT_HASHLIMIT_H
 #define _XT_HASHLIMIT_H
 
index 5b5e41716d693d267bdb9484f463615d833f5ec5..4ca0593949cd61877d7c43644389e3c9db201c39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XT_PHYSDEV_H
 #define _XT_PHYSDEV_H
 
index 029b95e8924e02bd5e89f305f39b3df13759a6d7..e98028f00e47921824aac7ca28a6b9317ad76cd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Format of an ARP firewall descriptor
  *
index 2ed40c402b5e446f9a06de983de8f9834d6c8b07..b671fdfd212b49c74d8768575531df8ed3a867d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BRIDGE_NETFILTER_H
 #define __LINUX_BRIDGE_NETFILTER_H
 
index e17e8bfb4e8beba6e72ce72ec161528d5468ae32..c6147f9c0d80f7fe57729d6f2409c469cd1f2cbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BRIDGE_EBT_802_3_H
 #define __LINUX_BRIDGE_EBT_802_3_H
 
index 2c2a5514b0df98a0fd92294aad15b00855c9256a..0773b5a032f1fc1cedaaef44c89f37c9344399f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  ebtables
  *
@@ -108,9 +109,10 @@ struct ebt_table {
 
 #define EBT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & \
                     ~(__alignof__(struct _xt_align)-1))
-extern struct ebt_table *ebt_register_table(struct net *net,
-                                           const struct ebt_table *table,
-                                           const struct nf_hook_ops *);
+extern int ebt_register_table(struct net *net,
+                             const struct ebt_table *table,
+                             const struct nf_hook_ops *ops,
+                             struct ebt_table **res);
 extern void ebt_unregister_table(struct net *net, struct ebt_table *table,
                                 const struct nf_hook_ops *);
 extern unsigned int ebt_do_table(struct sk_buff *skb,
index d3a7f8597e821912f95c2e85b7df1d47c475adf7..dc6111adea06de701a7054857e89aa2d984c1cbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NETFILTER_CORE_H_
 #define __LINUX_NETFILTER_CORE_H_
 
index 8d5dae1e2ff85185fe64fa2874a9d5abdc0d0717..554c920691dd297ca74df0770c6df40eba5f30c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NETFILTER_INGRESS_H_
 #define _NETFILTER_INGRESS_H_
 
index 7bfc5893ec314e247693374131a31f0144da20d3..d026e63a5aa49208f32a51077c6ba64fd11bc962 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * 25-Jul-1998 Major changes to allow for ip chain table
  *
index b21c392d6012837abb89858e1ea407130583b7d9..99cbfd3add40cb5ed8aae404fc6e03f2b480cfd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * 25-Jul-1998 Major changes to allow for ip chain table
  *
index 8664fd26eb5d0c4a7896dc7c63200e5b3ee1569e..6ddb4a5da3710f88a9d9af2c557158b6ca67e804 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NETLINK_H
 #define __LINUX_NETLINK_H
 
index 27c0aaa22cb0f146c87b4e0abe6191fc7f1bbc8f..67662d01130a7b4f69c8b4ec176f59b11e8ae33d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common code for low-level network console, dump, and debugger code
  *
index 610af5155ef2f1b7252f1aed24ad3f62d62eb922..0dc7ad38a0da4f4df118806c8f9cf01876b1bcd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NFS protocol definitions
  *
index a778ad8e3afd8080c4427d9aae4e08495caa5e80..404b8f724fc95648844194f338ee6a3024f739d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * NFSv3 protocol definitions
  */
index 47239c3366882326a95c4b509e273c58ce622806..47adac640191f8f3ffdc24c5075c534247679e42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/nfs4.h
  *
index a0282ceaa48b7a2ac71cf3c5942169096289c7a6..f0015f801a7845890332dbafda8279dc1a34b53c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/nfs_fs.h
  *
index a5c50d97341edfac63d04a0f7bad96a5f1bfd0f9..98f9268fcfc2c2f619d1a4d2b8682515b2300b0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFS_FS_I
 #define _NFS_FS_I
 
index 74c44665e6d33dd4f7c8bfce30457eb56f942c80..286b71c418b415af4b158f93a16a12c9a9813f8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFS_FS_SB
 #define _NFS_FS_SB
 
index 9dcbbe9a51fb17da49fe9d8e8a4deaadd67ccec1..027874c36c88ce55911a0e8c0c50edfa84636e21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  User-space visible declarations for NFS client per-mount
  *  point statistics
index d117120c9b6e06ed5f3f02651cc18be9575b7c76..e27572d30d97751ba70a9c5d753997faaac49d51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/nfs_page.h
  *
index 164d5359d4ab0099772cfc21f5c257f2a9d6211d..6959968dc36a779b3cb61cf80b6c2e1b99672ff7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NFS_XDR_H
 #define _LINUX_NFS_XDR_H
 
index 5e69e67b31ab28bd5cb1bfc451687a36597f6b1f..103d4469532340b5cf0351c5fd67bc610b943f68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File: linux/nfsacl.h
  *
index 520681b6820817b6f08cb304503bf75b8f8f564f..499e486b3722d48746c4e4d44cae4ce7a18dfc8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NLS_H
 #define _LINUX_NLS_H
 
index a36abe2da13e1a23edc8aa152205af143f658990..b8d868d23e797b3cd80303c9c8f531300e4ee62b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/nmi.h
  */
 
 #ifdef CONFIG_LOCKUP_DETECTOR
 void lockup_detector_init(void);
+void lockup_detector_soft_poweroff(void);
+void lockup_detector_cleanup(void);
+bool is_hardlockup(void);
+
+extern int watchdog_user_enabled;
+extern int nmi_watchdog_user_enabled;
+extern int soft_watchdog_user_enabled;
+extern int watchdog_thresh;
+extern unsigned long watchdog_enabled;
+
+extern struct cpumask watchdog_cpumask;
+extern unsigned long *watchdog_cpumask_bits;
+#ifdef CONFIG_SMP
+extern int sysctl_softlockup_all_cpu_backtrace;
+extern int sysctl_hardlockup_all_cpu_backtrace;
 #else
-static inline void lockup_detector_init(void)
-{
-}
-#endif
+#define sysctl_softlockup_all_cpu_backtrace 0
+#define sysctl_hardlockup_all_cpu_backtrace 0
+#endif /* !CONFIG_SMP */
+
+#else /* CONFIG_LOCKUP_DETECTOR */
+static inline void lockup_detector_init(void) { }
+static inline void lockup_detector_soft_poweroff(void) { }
+static inline void lockup_detector_cleanup(void) { }
+#endif /* !CONFIG_LOCKUP_DETECTOR */
 
 #ifdef CONFIG_SOFTLOCKUP_DETECTOR
 extern void touch_softlockup_watchdog_sched(void);
@@ -24,29 +45,17 @@ extern void touch_softlockup_watchdog(void);
 extern void touch_softlockup_watchdog_sync(void);
 extern void touch_all_softlockup_watchdogs(void);
 extern unsigned int  softlockup_panic;
-extern int soft_watchdog_enabled;
-extern atomic_t watchdog_park_in_progress;
 #else
-static inline void touch_softlockup_watchdog_sched(void)
-{
-}
-static inline void touch_softlockup_watchdog(void)
-{
-}
-static inline void touch_softlockup_watchdog_sync(void)
-{
-}
-static inline void touch_all_softlockup_watchdogs(void)
-{
-}
+static inline void touch_softlockup_watchdog_sched(void) { }
+static inline void touch_softlockup_watchdog(void) { }
+static inline void touch_softlockup_watchdog_sync(void) { }
+static inline void touch_all_softlockup_watchdogs(void) { }
 #endif
 
 #ifdef CONFIG_DETECT_HUNG_TASK
 void reset_hung_task_detector(void);
 #else
-static inline void reset_hung_task_detector(void)
-{
-}
+static inline void reset_hung_task_detector(void) { }
 #endif
 
 /*
@@ -54,12 +63,12 @@ static inline void reset_hung_task_detector(void)
  * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit -
  * bit 0 for the hard lockup detector and bit 1 for the soft lockup detector.
  *
- * 'watchdog_user_enabled', 'nmi_watchdog_enabled' and 'soft_watchdog_enabled'
- * are variables that are only used as an 'interface' between the parameters
- * in /proc/sys/kernel and the internal state bits in 'watchdog_enabled'. The
- * 'watchdog_thresh' variable is handled differently because its value is not
- * boolean, and the lockup detectors are 'suspended' while 'watchdog_thresh'
- * is equal zero.
+ * 'watchdog_user_enabled', 'nmi_watchdog_user_enabled' and
+ * 'soft_watchdog_user_enabled' are variables that are only used as an
+ * 'interface' between the parameters in /proc/sys/kernel and the internal
+ * state bits in 'watchdog_enabled'. The 'watchdog_thresh' variable is
+ * handled differently because its value is not boolean, and the lockup
+ * detectors are 'suspended' while 'watchdog_thresh' is equal zero.
  */
 #define NMI_WATCHDOG_ENABLED_BIT   0
 #define SOFT_WATCHDOG_ENABLED_BIT  1
@@ -73,17 +82,41 @@ extern unsigned int hardlockup_panic;
 static inline void hardlockup_detector_disable(void) {}
 #endif
 
+#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
+# define NMI_WATCHDOG_SYSCTL_PERM      0644
+#else
+# define NMI_WATCHDOG_SYSCTL_PERM      0444
+#endif
+
 #if defined(CONFIG_HARDLOCKUP_DETECTOR_PERF)
 extern void arch_touch_nmi_watchdog(void);
+extern void hardlockup_detector_perf_stop(void);
+extern void hardlockup_detector_perf_restart(void);
+extern void hardlockup_detector_perf_disable(void);
+extern void hardlockup_detector_perf_enable(void);
+extern void hardlockup_detector_perf_cleanup(void);
+extern int hardlockup_detector_perf_init(void);
 #else
-#if !defined(CONFIG_HAVE_NMI_WATCHDOG)
+static inline void hardlockup_detector_perf_stop(void) { }
+static inline void hardlockup_detector_perf_restart(void) { }
+static inline void hardlockup_detector_perf_disable(void) { }
+static inline void hardlockup_detector_perf_enable(void) { }
+static inline void hardlockup_detector_perf_cleanup(void) { }
+# if !defined(CONFIG_HAVE_NMI_WATCHDOG)
+static inline int hardlockup_detector_perf_init(void) { return -ENODEV; }
 static inline void arch_touch_nmi_watchdog(void) {}
+# else
+static inline int hardlockup_detector_perf_init(void) { return 0; }
+# endif
 #endif
-#endif
+
+void watchdog_nmi_stop(void);
+void watchdog_nmi_start(void);
+int watchdog_nmi_probe(void);
 
 /**
  * touch_nmi_watchdog - restart NMI watchdog timeout.
- * 
+ *
  * If the architecture supports the NMI watchdog, touch_nmi_watchdog()
  * may be used to reset the timeout - for code which intentionally
  * disables interrupts for a long time. This call is stateless.
@@ -153,22 +186,6 @@ static inline bool trigger_single_cpu_backtrace(int cpu)
 u64 hw_nmi_get_sample_period(int watchdog_thresh);
 #endif
 
-#ifdef CONFIG_LOCKUP_DETECTOR
-extern int nmi_watchdog_enabled;
-extern int watchdog_user_enabled;
-extern int watchdog_thresh;
-extern unsigned long watchdog_enabled;
-extern struct cpumask watchdog_cpumask;
-extern unsigned long *watchdog_cpumask_bits;
-extern int __read_mostly watchdog_suspended;
-#ifdef CONFIG_SMP
-extern int sysctl_softlockup_all_cpu_backtrace;
-extern int sysctl_hardlockup_all_cpu_backtrace;
-#else
-#define sysctl_softlockup_all_cpu_backtrace 0
-#define sysctl_hardlockup_all_cpu_backtrace 0
-#endif
-
 #if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \
     defined(CONFIG_HARDLOCKUP_DETECTOR)
 void watchdog_update_hrtimer_threshold(u64 period);
@@ -176,7 +193,6 @@ void watchdog_update_hrtimer_threshold(u64 period);
 static inline void watchdog_update_hrtimer_threshold(u64 period) { }
 #endif
 
-extern bool is_hardlockup(void);
 struct ctl_table;
 extern int proc_watchdog(struct ctl_table *, int ,
                         void __user *, size_t *, loff_t *);
@@ -188,18 +204,6 @@ extern int proc_watchdog_thresh(struct ctl_table *, int ,
                                void __user *, size_t *, loff_t *);
 extern int proc_watchdog_cpumask(struct ctl_table *, int,
                                 void __user *, size_t *, loff_t *);
-extern int lockup_detector_suspend(void);
-extern void lockup_detector_resume(void);
-#else
-static inline int lockup_detector_suspend(void)
-{
-       return 0;
-}
-
-static inline void lockup_detector_resume(void)
-{
-}
-#endif
 
 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
 #include <asm/nmi.h>
index d1751beb462ca3792c02747feb72c6a35c29fd80..4ece0fee0ffc9744286b22b2d6f1d41cba9f5418 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/node.h - generic node definition
  *
index cf0b91c3ec1204956d972363033775c7beb4d29a..de1c50b93c61534207e9da8345fe45cda27c0a5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NODEMASK_H
 #define __LINUX_NODEMASK_H
 
index 4149868de4e6c82e8248544ff01ddfe801258be0..6d731110e0db1475660dbbc1d9cb7a4987df6768 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Routines to manage notifier chains for passing status changes to any
  *     interested routines. We need this instead of hard coded call lists so
index 85a5c8c16be9a6cda644a09db8b43cd05a011871..5fbc4000358f15dbd57e9d42ae9c7472c3ea49fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NS_COMMON_H
 #define _LINUX_NS_COMMON_H
 
index 7da0cf3702ee05692f1d65fea8a8ad7344106b97..d7a04a6e3783a12edfb79e7db5416a9c92fba386 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
    nsc_gpio.c
 
index ac0d65bef5d0860d7ff8944a097a122fb222ddc0..2ae1b1a4d84d4429fdc653461590912e2af3906d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NSPROXY_H
 #define _LINUX_NSPROXY_H
 
index 6165b2c620408a7ee5d956d703f714275740e255..11ce6b1117a8e58946af6587772a1029ca536d93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   nubus.h: various definitions and prototypes for NuBus drivers to use.
 
index 3aaa31603a861a98d44f0d2b7862c582c589d934..110b0e5d0fb0041226361603aa2d197496363b49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NUMA_H
 #define _LINUX_NUMA_H
 
index 9c5cb44808063d8531cfc800beb1e3f5e0e440a4..a726f96010d59d9d99eda4e6d5d5ea9776ebdd18 100644 (file)
@@ -346,11 +346,6 @@ struct nvme_fc_remote_port {
  *       indicating an FC transport Aborted status.
  *       Entrypoint is Mandatory.
  *
- * @defer_rcv:  Called by the transport to signal the LLLD that it has
- *       begun processing of a previously received NVME CMD IU. The LLDD
- *       is now free to re-use the rcv buffer associated with the
- *       nvmefc_tgt_fcp_req.
- *
  * @max_hw_queues:  indicates the maximum number of hw queues the LLDD
  *       supports for cpu affinitization.
  *       Value is Mandatory. Must be at least 1.
@@ -806,11 +801,19 @@ struct nvmet_fc_target_port {
  *       outstanding operation (if there was one) to complete, then will
  *       call the fcp_req_release() callback to return the command's
  *       exchange context back to the LLDD.
+ *       Entrypoint is Mandatory.
  *
  * @fcp_req_release:  Called by the transport to return a nvmefc_tgt_fcp_req
  *       to the LLDD after all operations on the fcp operation are complete.
  *       This may be due to the command completing or upon completion of
  *       abort cleanup.
+ *       Entrypoint is Mandatory.
+ *
+ * @defer_rcv:  Called by the transport to signal the LLLD that it has
+ *       begun processing of a previously received NVME CMD IU. The LLDD
+ *       is now free to re-use the rcv buffer associated with the
+ *       nvmefc_tgt_fcp_req.
+ *       Entrypoint is Optional.
  *
  * @max_hw_queues:  indicates the maximum number of hw queues the LLDD
  *       supports for cpu affinitization.
index 87723c86f136f0e48c64a4c39fa9f0dcb3ad979d..9310ce77d8e1f3b324e8c046ba414084530826e9 100644 (file)
@@ -471,12 +471,14 @@ enum nvme_opcode {
  *
  * @NVME_SGL_FMT_ADDRESS:     absolute address of the data block
  * @NVME_SGL_FMT_OFFSET:      relative offset of the in-capsule data block
+ * @NVME_SGL_FMT_TRANSPORT_A: transport defined format, value 0xA
  * @NVME_SGL_FMT_INVALIDATE:  RDMA transport specific remote invalidation
  *                            request subtype
  */
 enum {
        NVME_SGL_FMT_ADDRESS            = 0x00,
        NVME_SGL_FMT_OFFSET             = 0x01,
+       NVME_SGL_FMT_TRANSPORT_A        = 0x0A,
        NVME_SGL_FMT_INVALIDATE         = 0x0f,
 };
 
@@ -490,12 +492,16 @@ enum {
  *
  * For struct nvme_keyed_sgl_desc:
  *   @NVME_KEY_SGL_FMT_DATA_DESC:      keyed data block descriptor
+ *
+ * Transport-specific SGL types:
+ *   @NVME_TRANSPORT_SGL_DATA_DESC:    Transport SGL data dlock descriptor
  */
 enum {
        NVME_SGL_FMT_DATA_DESC          = 0x00,
        NVME_SGL_FMT_SEG_DESC           = 0x02,
        NVME_SGL_FMT_LAST_SEG_DESC      = 0x03,
        NVME_KEY_SGL_FMT_DATA_DESC      = 0x04,
+       NVME_TRANSPORT_SGL_DATA_DESC    = 0x05,
 };
 
 struct nvme_sgl_desc {
@@ -1127,19 +1133,6 @@ enum {
        NVME_SC_UNWRITTEN_BLOCK         = 0x287,
 
        NVME_SC_DNR                     = 0x4000,
-
-
-       /*
-        * FC Transport-specific error status values for NVME commands
-        *
-        * Transport-specific status code values must be in the range 0xB0..0xBF
-        */
-
-       /* Generic FC failure - catchall */
-       NVME_SC_FC_TRANSPORT_ERROR      = 0x00B0,
-
-       /* I/O failure due to FC ABTS'd */
-       NVME_SC_FC_TRANSPORT_ABORTED    = 0x00B1,
 };
 
 struct nvme_completion {
index cf0ff555a6ac486902d7dc27b977452fcd0458cf..28bfb9ab94ca65c1cc34135693e89a3485713108 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NVRAM_H
 #define _LINUX_NVRAM_H
 
index cfc34117fc9203eefc2702a87271a95f761a2a3a..b240ed69dc9626a266498807e568a5b09c0b888b 100644 (file)
@@ -734,6 +734,16 @@ static inline struct device_node *of_get_cpu_node(int cpu,
        return NULL;
 }
 
+static inline int of_n_addr_cells(struct device_node *np)
+{
+       return 0;
+
+}
+static inline int of_n_size_cells(struct device_node *np)
+{
+       return 0;
+}
+
 static inline int of_property_read_u64(const struct device_node *np,
                                       const char *propname, u64 *out_value)
 {
index 37864734ca50f76838cc1e95ea92f8d37bbdc856..b8ac44c9748e594052b00f4cc26d97c5336b62f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OF_ADDRESS_H
 #define __OF_ADDRESS_H
 #include <linux/ioport.h>
index 611502524425c8d7a57753efe693b3317c0a9726..8da5a1b31ece8e6302ccde7e02760c0627abec0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
index 13394ac83c66a70946d5a269ca8014c15477f942..cddfaff4d0b70ff112e72bc9125d2c2b45dc5fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OF_IOMMU_H
 #define __OF_IOMMU_H
 
index 1e0deb8e849458ca179c1df4734bb24f0e4cd748..1214cabb22479be282ea6482ecec1657d8d59c1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OF_IRQ_H
 #define __OF_IRQ_H
 
index 518c8d20647a560bf2f679b62b80364b040ba9ae..bf588a05d0d0f9af194d0d415b2ce29d47787aad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OF_PCI_H
 #define __OF_PCI_H
 
index e0d1946270f38e5238ddf0a3bb25cf03c3f3ebe4..fb908e598348097712981459b969f45fed4a8d09 100644 (file)
@@ -57,7 +57,14 @@ extern const struct of_device_id of_default_bus_match_table[];
 extern struct platform_device *of_device_alloc(struct device_node *np,
                                         const char *bus_id,
                                         struct device *parent);
+#ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
+#else
+static inline struct platform_device *of_find_device_by_node(struct device_node *np)
+{
+       return NULL;
+}
+#endif
 
 /* Platform devices and busses creation */
 extern struct platform_device *of_platform_device_create(struct device_node *np,
index f8e1992d6423ca837e731ddb32c83c6ff9a6fe98..bb4fda7317beca62d8c4d3d2d1941a40efa13d15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OF_RESERVED_MEM_H
 #define __OF_RESERVED_MEM_H
 
index 2925df3ce78a32a2e0c0130239fc3e51a74ca7f8..79bdc6328c52a8c5e9ce10a6f574dece80e7d9ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_OLPC_EC_H
 #define _LINUX_OLPC_EC_H
 
index 290081620b3e1af334e114e48728c10340327943..840ce551e773b80444c959db3ec5e20e2dbf3a85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_OMAP_DMA_H
 #define __LINUX_OMAP_DMA_H
 #include <linux/omap-dmaengine.h>
index 9c98aaa87cbcd4f26b8ecdc25b93fae555ab4daa..6790884d3c57a244525102b3409bfdb9dbb7ecae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ONCE_H
 #define _LINUX_ONCE_H
 
index 76aac4ce39bcf59e2e5eeb38053cf05f0c9d05ae..01c91d874a57f5edc7f4698b57918402a211d707 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INCLUDE_LINUX_OOM_H
 #define __INCLUDE_LINUX_OOM_H
 
index 703ea5c30a33f84bd60fcc19415b48c53084f5c7..5581dbd3bd3407c6009b565fb935e0797585ab3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_OSQ_LOCK_H
 #define __LINUX_OSQ_LOCK_H
 
index 0bf96eae53894492af38801814ecccdd6553910f..94cd25165c08cf011a0c1f1619f2495877ec804b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* platform data for the OXU210HP HCD */
 
 struct oxu210hp_platform_data {
index 77b078c103b264d9b55361dec47c4a42f4595370..7ec86bf31ce48602b2fdbbdadca43a9436c5d62a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PAGE_FLAGS_LAYOUT_H
 #define PAGE_FLAGS_LAYOUT_H
 
index ba2d470d2d0a325e9e9d19d39bc675cc311b6a83..584b14c774c181e85eac69be4f5a3ad037cb75d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Macros for manipulating and testing page->flags
  */
index d4cd2014fa6f5a18f03f1b0babfccb21fa3ac55f..05a04e60368640baa285f03cd18d3e9a1d8d1b9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PAGEISOLATION_H
 #define __LINUX_PAGEISOLATION_H
 
index 7e62920a3a94ac20f28faca2467f7ddca3515d52..c15ab80ad32de4387879d29421b77521a73556e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PAGE_COUNTER_H
 #define _LINUX_PAGE_COUNTER_H
 
index 9298c393ddaa24a63c849a6c811d5d4110c1a410..ca5461efae2f1834a83d7b17289fdb3fecf15be6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PAGE_EXT_H
 #define __LINUX_PAGE_EXT_H
 
index fec40271339f8044aa1e3f1743e62017f146f9cc..1e894d34bdceb2a91318bd1ea7796a17deeddf8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MM_PAGE_IDLE_H
 #define _LINUX_MM_PAGE_IDLE_H
 
index 2be728d156b5555a6331a89798bd4b0bfc2a9562..8679ccd722e8985b01ba113c0f472da7f25d1aa4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PAGE_OWNER_H
 #define __LINUX_PAGE_OWNER_H
 
index 1fd71733aa68efb95b390eb708616213271a0fd9..760d74a0e9a977c507da9006d8e7cdf4584dc6bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PAGE_REF_H
 #define _LINUX_PAGE_REF_H
 
index 5bbd6780f205103066bbf8b7d0d96959d5cbaed3..e08b5339023c0afae64a0ecb7a204ae3b4cb5295 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PAGEMAP_H
 #define _LINUX_PAGEMAP_H
 
index 4dcd5506f1ed02768a2b5d1654767e8f1293d4f9..2636c0c0f279333959f2155adc4995d527257f9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/pagevec.h
  *
index cc1767f5cca86026d4ab98a782037d285666a37f..3d6fc576d6a112031af511e955aded9659a2a73d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PARPORT_PC_H
 #define __LINUX_PARPORT_PC_H
 
index 884c1e6eb3fe10eec968d5519a94ee6fbde6f4c7..12fc3482f5fc7ae1135d2a7f9a10358d88a9bcf9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/parser.h
  *
index 97a919fc9927005bb976b654de32ba8a3909f999..f581defb2df04b650bce26fdc200ddc0688860ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * <linux/patchkey.h> -- definition of _PATCHKEY macro
  *
index cde895cc4af4cd5053f1a0f477f15c6a1240eedc..81e65a5be7ce26f09c3093cd4c1137535294124d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PATH_H
 #define _LINUX_PATH_H
 
index dd86c97f2454b25746552c26e0e985363c18d352..8082b612f5612edb0e10b3b54cb8cc9d30306a27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File                pci-acpi.h
  *
index 207c561fb40ef000feeda342d1f681349df4b99b..3cc06b059017b19e49baaca049bc615db699d0e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     aspm.h
  *
index 782fb8e0755f1682ee29445fee2626150cb69387..7c4b8e27268c7455c9f13234d0d2790dfb46dfc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_PCI_ATS_H
 #define LINUX_PCI_ATS_H
 
index 39726caef5b1813e9a37ed4e294d22200c81689e..d1f9fdade1e063dc343340646a7e21289ca7cf8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* include this file if the platform implements the dma_ DMA Mapping API
  * and wants to provide the pci_ DMA Mapping API in terms of it */
 
index 549a041f9c089b424d1c7bb77fd30ab1c3d7cb84..0f7aa7353ca3eaf9d66d9d2e32ac2f78aa744dc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PCI_DMA_H
 #define _LINUX_PCI_DMA_H
 
index f68c58a93dd045b9b58de9882088621253ec7758..d16a7c037ec0bca6176aaf0212d73af45387c7e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     pci.h
  *
@@ -1685,6 +1686,8 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }
 
 #define dev_is_pci(d) (false)
 #define dev_is_pf(d) (false)
+static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags)
+{ return false; }
 #endif /* CONFIG_PCI */
 
 /* Include architecture-dependent settings and functions */
index 4adf6161ec77d9accd1015f51099c5db2857e4d6..ab20dc5db423cd80f5e2b5a18a0e631af3a5e4b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     PCI Class, Vendor and Device IDs
  *
index e8f3f74792241fb314b0fbb6614cb87e1b2dbd9d..b69769dbf6597ada1960403ceaa370a75a6303d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * File:       pcieport_if.h
  * Purpose:    PCI Express Port Bus Driver's IF Data Structure
index c13dceb87b60adbe36c8ae2c7ba21824f33343dd..6658d9ee525720f2d80557380045291bc71d075a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Percpu refcounts:
  * (C) 2012 Google, Inc.
index 93664f022ecf15fcbe7640d37989d520d3ae6d9a..b1f37a89e368683233499bc5942b43e353b637a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PERCPU_RWSEM_H
 #define _LINUX_PERCPU_RWSEM_H
 
index 6a5fb939d3e5fd6cea40532402389d02f0835566..296bbe49d5d18368737e89203cf96d6937f8f016 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PERCPU_H
 #define __LINUX_PERCPU_H
 
index ec065387f44307852a512197a0ebfaa3c45dbbf6..73a7bf30fe9a3fc299812cfbba6ea33a0fde39c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PERCPU_COUNTER_H
 #define _LINUX_PERCPU_COUNTER_H
 /*
index f5cfdd6a5539101a0bc57d7815044f9bca3c11c9..07d78e4653bc007ce8bfa7c233456a603fb3223b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERCPU_IDA_H__
 #define __PERCPU_IDA_H__
 
index 9b7dd59fe28d5f1cd8636bec98a15552440168da..476747456bca590df158a3ea630aa940597eea02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PERF_REGS_H
 #define _LINUX_PERF_REGS_H
 
index aeb7892b2468f8e1eefead4b1a723d5fed466bdd..fc16fbc659c7a47aeb0192afd647e7f3d3fe8140 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PERSONALITY_H
 #define _LINUX_PERSONALITY_H
 
index 1132953235c0708bd87e1b9eea777bb705f54cb3..14bc053c53d8a4efb49dfca43c7f4116099b1f85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PFN_H_
 #define _LINUX_PFN_H_
 
index a49b3259cad728e4cbe8e2e90f820980c8e0862c..43b1d7648e826260e193cdb0a49cb038e4896958 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PFN_T_H_
 #define _LINUX_PFN_T_H_
 #include <linux/mm.h>
index f2ebe490a4bc590aa381247c9bfbd1a12fecc11b..7054b440347ce677c48d14e0af5ddd52e71dc3d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/phy/phy.h>
 
 /**
index 1d41ec44e39da375abd79c167c227a3daa5a3305..cf6392de6eb08e5785235ad89f5a72a3e1c59ea4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PHY_FIXED_H
 #define __PHY_FIXED_H
 
index 719582744a2e873a978dbf9a925e143ec29243da..dfd684ce078754682c31e631146dc24368336a8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PID_H
 #define _LINUX_PID_H
 
index b09136f88cf45c3bd84064a88f441c41da6730b3..c78af6061644f35f4dec749665a6422da2aba8ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PID_NS_H
 #define _LINUX_PID_NS_H
 
index 0e81b2778ae0e15790cce8308a6aba2c84bf514a..290d4d2ed9b9ceccfdd936315c60b8e1360bb147 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PIM_H
 #define __LINUX_PIM_H
 
index 23073519339f35e5bf42ccd72764e0e58cd67a6e..a0e785815a64bd523be92bea960b6332f2b8fa3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Standard pin control state definitions
  */
index e7497c9dde7f760805e54b32e007bf15c2c70b2e..6a80cfc63e0cbf1484bdd874e9d52a2d28519c93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PIPE_FS_I_H
 #define _LINUX_PIPE_FS_I_H
 
index a1bacf1150b2146e6cf560740459edf08f0c18a5..0794ca78c379a609c576e975a1a0acbbb218d978 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PKEYS_H
 #define _LINUX_PKEYS_H
 
index bbd89fa51188e651f3e6c77dc54aace7b1082c8f..b1fd1530c9a5cc231a1a2421782b91c3a4b52474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IIO_AD7291_H__
 #define __IIO_AD7291_H__
 
index f9e4db1b82aec7a88b4f7072cf8565c2ce43a424..cc7533049b5b34cc3ea08721cf6565777adba607 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PLATFORM_DATA_AD7791__
 #define __LINUX_PLATFORM_DATA_AD7791__
 
index 69e2e1fd2bc89f5bfd596b36831c60be1a4a3ed2..6655cc8453acfa36d5bf8f76833f03893b286daa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/platform_data/ad7879.h */
 
 /* Touchscreen characteristics vary between boards and models.  The
index 92c7fd72f63669b0354179a5f8c3370feb347e0f..902851aeb0b497275fc221fbae58423f58e2dd1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_SSI_H
 #define __MACH_SSI_H
 
index d6a55bd2e578c804e56fcd578fa28bafea41d2d8..d442cefa392835b8b629a30700e8781ff9aff366 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PLAT_AUDIO_H
 #define __PLAT_AUDIO_H
 
index 409adcd04d049f4cde48da7ab19777938ed01225..2107d0d992dd8754ca92d539b4688d443d4b75f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PLATFORM_DATA_ASOC_MX27VIS_H
 #define __PLATFORM_DATA_ASOC_MX27VIS_H
 
index 58afb30d52987d999a4175472cd609856e1237d9..22b69a393a57e6aae96a447735b60c0fbb1d738d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_PALMASOC_H_
 #define _INCLUDE_PALMASOC_H_
 
index 26af54321958e097f4a7b7e92a711d7c73cd0dce..d8f8738629d20982ecfa7448b35a5a47be917cad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PLATFORM_DATA_BCMGENET_H__
 #define __LINUX_PLATFORM_DATA_BCMGENET_H__
 
index b46e0d9062a0488e2c323f1c754202e018c06c21..0471aaf6999b6e0f5a0a957bd8333f78ad548e1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_CRYPTO_ATMEL_H
 #define __LINUX_CRYPTO_ATMEL_H
 
index e82c642fa53cd49ac88afc412b4194319fc3303f..f8f1f6b952a620c11bba8e66a8172da7ab74896e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_DMA_H
 #define __ASM_ARCH_DMA_H
 
index 2d08816720f6d6be449db87ae8238144f85923bf..6eaa53cef0bd228b8a0d7bb2b3938ff04c548f95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MACH_MXC_SDMA_H__
 #define __MACH_MXC_SDMA_H__
 
index 92ffd3245f76c67bc2c02a36067a77425338be9f..6867a7ea329beb6ac3cafc68eea3bdd7c0ec043c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Marvell XOR platform device data definition file.
  */
index 736bb87ac0fccd1b1194ff6fec64cbca950402e8..6ef58bb77e46e09cc49a29224fc2a2c96c4ab3da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DS620_H
 #define _LINUX_DS620_H
 
index 31b19ca1d73a83dd8ac0e143e986c8f241cec62b..a2c56fcd05341d79557de51925a2d9a31b0669a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PLATFORM_DATA_EFM32_SPI_H__
 #define __LINUX_PLATFORM_DATA_EFM32_SPI_H__
 
index ed0e975b3c5433bccd33b22fb9fa5a95b07492e8..ccbb8f11db7528d443a05f86de163f98b5f57c4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *
index b4201c971367ceda15d5066d4a9f9629bc485b01..b7baf1e42c55aae43901e82207f718961c2f25b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HTC simple EGPIO irq and gpio extender
  */
index 9ffb12d06e9178bf4497ba7088cfbdb7136dc7cc..23036273a97e4901ac26ea339a02ebe234bf8d3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_NUC900_I2C_H
 #define __ASM_ARCH_NUC900_I2C_H
 
index 3cd41f77dda44128a5afd052c563d6a8cea5edc2..bd35ddcf3068263d6bf3ac0c0f8e25961b489a1b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_ARCH_IRDA_H
 #define ASMARM_ARCH_IRDA_H
 
index 0e95527edf253db9ab55496f4e404743b6c04b35..2ccdce6a4e27cbbe467fdab7468a533827f73223 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Platform data for the Intel TCO Watchdog
  */
index 053587caffdd82c7cb1f7d6335f107bc7e41f580..3271aa01cbe8e6d3a3185d3666aebe39964eb94f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_PXA930_ROTARY_H
 #define __ASM_ARCH_PXA930_ROTARY_H
 
index adccee25b162f234eddf8352dd68811da16a078f..0e36818e368056f849920788207986c8b32ef36e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KEYPAD_EP93XX_H
 #define __KEYPAD_EP93XX_H
 
index 24625569d16df600ed258a9c23c7c69be89fbaca..a376442b99357e99d6f1eb9348adbf6bbf52cfb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_PXA27x_KEYPAD_H
 #define __ASM_ARCH_PXA27x_KEYPAD_H
 
index 556778e8ddaa3ce8b85be89c46aee4943593e517..206ca4ecd93f94b35a42fc0025687a0e0f66c27f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_W90P910_KEYPAD_H
 #define __ASM_ARCH_W90P910_KEYPAD_H
 
index 8e52c6572281792cdb703b2f9ea60c70dbd56559..63f05eb23827479b5f67369955b45fa2b617b263 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LCD_MIPID_H
 #define __LCD_MIPID_H
 
index 0303d1970084d8324075ba239adafd998de4edf8..5947a6f43d602c5acda66fdf8d005ecb5dc650b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (c) 2014 eGauge Systems LLC
  *     Contributed by David Mosberger-Tang <davidm@egauge.net>
index 6011c42034daaccc71910638f758ef0b5adb7d50..65bfdb4fdc15714d33d9b5cfda41cbf96dc98a6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_MAX6639_H
 #define _LINUX_MAX6639_H
 
index c04bac8bf2feb45cdfe18f959476c4efd6693755..f231c635faecc60a456a59938c58f010e15c3a98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_I2C_MAX732X_H
 #define __LINUX_I2C_MAX732X_H
 
index 2c94ab568bfa52f4e8d2d22197fa11e5869bfccd..9d127aa648e72bcae6d9eb7f3d6fb9c86f493a7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IR_RX51_H
 #define _IR_RX51_H
 
index 7611963a257f96b48993af41293ace4372e4615f..83804028115c085be3debb395dfdfe7794f492de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Information for the Marvell Armada MMP camera
  */
index 0d7620db5e323b835305679dfe90b9f860fb4e3c..2a511a8fcda7300a05cedb4b73d529866c1ded9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_ARM_PLAT_OMAP4_ISS_H
 #define ARCH_ARM_PLAT_OMAP4_ISS_H
 
index 9cea4ee377b5bedca8a95f64aa226e3870b962b9..87a8bed3b6cbe1d39297e8a56727361bbfc4f020 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Board-specific MMC configuration
  */
index b0fdaa9bd18567b92d30c5181a1243ae4c85773f..ac677351316a75bfac1a422d5c1a8a4e9ac59b5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_ARCH_MMC_H
 #define ASMARM_ARCH_MMC_H
 
index 1706b3597ce00c10776d8c8fbf8e0c6067afcb6a..752f97c62ef2367498d19b3cbcfc6806ea1657ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_ARCH_MMC_H
 #define ASMARM_ARCH_MMC_H
 
index c42d31711944ecadc3f53eb81c0e729b5b6a4200..b68d9f0bdd9ebddc114982a157956b3b8bf80e31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ARCH_MCI_H
 #define _ARCH_MCI_H
 
index 249f02387a350d38625e27cbc7611b7ae10f5219..74a54eeb27b16c204ffc3ed7c4f1448a9e993756 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PLATFORM_DATA_SDHCI_S3C_H
 #define __PLATFORM_DATA_SDHCI_S3C_H
 
index 5e0789bc4729ede8be468a565899d9e7a9172ec2..ba0ac7a30d8c09af17a4923c59a8ec7ae9a23a02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_PXA930_TRKBALL_H
 #define __ASM_ARCH_PXA930_TRKBALL_H
 
index 394d15597dc75a2ec923dc4daa64dd1acd4c2d66..b42ad83cbc20c4221ce0790ed6251c6b0ec06769 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_ARCH_PXA3XX_NAND_H
 #define __ASM_ARCH_PXA3XX_NAND_H
 
index 881a8e92d605484b8420c788ffb964995317f5db..5e8b17d77a5fe5873dd07c223806ef6c0f92976c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OMAP1_BL_H__
 #define __OMAP1_BL_H__
 
index 3c98dd4f901f64aad5d6c1ab17462981424ef719..4eb53e02399786300f8f27f3682504a8696f83a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PCA953X_H
 #define _LINUX_PCA953X_H
 
index 0767a2a6b2f1256746220a9f772efaec82f5c9f7..11d4ed78c7f405711dec9a263ceff94ef966a5de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PCF857X_H
 #define __LINUX_PCF857X_H
 
index d428be4db44c5e415ad2d26ec56c629d83ac2207..a23b58aff9e1525b6d509fe0d8ff52d22ba419d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ARCOM_PCMCIA_H
 #define __ARCOM_PCMCIA_H
 
index 72eacda9b3609ef7939c7b7d6ced357f06adb41a..1cf36fdf9510df9285186f3bb532328272f11d21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * irq:                optional wake-up interrupt
  * rearm:      optional soc specific rearm function
index 646af6f8b838efe17e90cd54180e5ee3778924ae..4ab3cd6f1cc20a94cce50449589819f554c0e1d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        _PIXCIR_I2C_TS_H
 #define        _PIXCIR_I2C_TS_H
 
index c6c5e98b5b8230b7ddd09baeb7c071be3c97b5eb..ff9c35dca59d39b05f94c26c88ac7d53c51a00fb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This supports machine-specific differences in how the PXA2xx
  * USB Device Controller (UDC) is wired.
index 009e1d83fe39d66aa6751fe4d254e52feda33f59..8b79ab08af45e95c43e42d7c84dab2805dad5a62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Author: Nicolas Pitre
  *
index 533d9807e543701099cb77dbbb780513b7d48381..818c5c6e203fbd7ab90a97ebafc4db710573f915 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Si5351A/B/C programmable clock generator platform_data.
  */
index 171a271c2cbd5e1d5d806b0275116b59ee6710bf..eb16c6739ac2aadd91dd22193bc786b1a9cd2bdd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_MACH_EP93XX_SPI_H
 #define __ASM_MACH_EP93XX_SPI_H
 
index 08be445e8eb89ffd612aa0cb777d1c1fe90fba97..6f012fefa1a231b5517981353ea2b892fd668863 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __MACH_SPI_H_
 #define __MACH_SPI_H_
index c100456eab17958bbdbe6571e6346db864c87ead..13c83a25958a6b9bd8db6524a508e412dfc21ff1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _OMAP2_MCSPI_H
 #define _OMAP2_MCSPI_H
 
index cac3e7b4c45418aa725ca18fdc5cd7b6fa7b52c5..1dcd23bee24e31e6a35e76177a78196b6ec82ab7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_ST1232_PDATA_H
 #define _LINUX_ST1232_PDATA_H
 
index 2354c6fa3726c9a983018345902db1b82ab89fa1..2c089dd3e2bda3baf5cef201ef43bca709e12c0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PLATFORM_DATA_SYSCON_H
 #define PLATFORM_DATA_SYSCON_H
 
index c2d3aa1dadd4bd94b6a2bae5fa25b24a0e496bc8..a0ca52c41ccbc8c4c7c5088aec31cc24653d6f57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_I2C_TSC2007_H
 #define __LINUX_I2C_TSC2007_H
 
index c90d7a09dda7bff0d2b71f3c369b6e07fbf8e5cb..9cf9309c3f241781b69618f551ede590c30d099d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_TSL2563_H
 #define __LINUX_TSL2563_H
 
index 157e71f79f9901bade8330338e3dee408de862fc..ad9794d09bc887a8ab03487f1677f459f4dfed92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
 #define __INCLUDE_ASM_ARCH_MXC_EHCI_H
 
index 95b6e2a6e514723e716b8878a89866ec2c246566..69adea7694f3cc985843de7b291f05112f564f0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASMARM_ARCH_OHCI_H
 #define ASMARM_ARCH_OHCI_H
 
index 1d1b6ef871f6ace33196cc893a1c8b45d1375b40..e049d51c1353e4db766417cf88b79ba2e605f6a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USB3503_H__
 #define __USB3503_H__
 
index 09ccf182af4dc3b729d272c4ef1ce154c820c8fa..305ebaec3afd3aea8a8197ec00c09e9133bc6b13 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PLAT_CLCD_H
 #define PLAT_CLCD_H
 
index 699ac41093660e1b35d002865ea42fa0dd0b8c38..a6f3ccdec1cb72ef4f7c484cee4ff028dbf84be2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __VIDEO_EP93XX_H
 #define __VIDEO_EP93XX_H
 
index cf9348b376ac50f99944c5bc0762afb3e0b65daf..02812651af7d7242312eecfe29736c2fbdc7e55c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This structure describes the machine which we are running on.
  */
index 48883995f47f41708ee839419339b8ec6680fbf1..dd7747ba3269df9ef77bb2898e35546d7da2a1d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PLATFORM_DATA_VIDEO_S3C
 #define __PLATFORM_DATA_VIDEO_S3C
 
index 7b78793f07d7df692aea26feae8b756185016ab8..b8604f8847d9877fb883a3c25dc9e66086b4e4ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PM_TRACE_H
 #define PM_TRACE_H
 
index 032b559091450ad17dd752cff3bdf58f297aeb18..2a3acf4dba9ab73cad5b54fc8ebfbfb8d711dd87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PM_QOS_H
 #define _LINUX_PM_QOS_H
 /* interface for the pm_qos_power infrastructure of the linux kernel.
index 99b400b8a2412b558e9c79b508bf62d384d458b2..9ac8fc60ad492716231b872b01ac7ba3a13f787a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for talking to the PMU.  The PMU is a microcontroller
  * which controls battery charging and system power on PowerBook 3400
index 2588ca6a9028d40efccccd8f6250271d860966f4..3b12fd28af78d1142c9503d3908d6c39823184ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux Plug and Play Support
  * Copyright by Adam Belay <ambx1@neo.rr.com>
index a39540326417960b586cdba4985cf09c131fe086..15927ebc22f2592468c4134ca7c83afae38186d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_POISON_H
 #define _LINUX_POISON_H
 
index 2889f09a1c6080523ebf7179d337868d4610763b..d384f12abdd59d58b425eaf8cf945e14c0f1cf83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_POLL_H
 #define _LINUX_POLL_H
 
index 62839fd04dce25dc63fa8ceb175eb94ae915171a..672c4f32311e2f569e99fac56448009d5efbe3ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _linux_POSIX_TIMERS_H
 #define _linux_POSIX_TIMERS_H
 
index 5a9a739acdd596fa139d04974140737d9f37ee4f..b2b7255ec7f56b650a74da54fab184f2060a69d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: linux/posix_acl.h
 
index 8b867e3bf3aa84e553e2c02fa0e6244284abcc51..2387709991b54a39a2726268b08185c9b50f9a6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: linux/posix_acl_xattr.h
 
index 43194e02c1ee12f9df7d9b6d2e3f9992cf8ca893..e6187f524f2cb5ea76730027ac1491eb75d63ee5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BQ27X00_BATTERY_H__
 #define __LINUX_BQ27X00_BATTERY_H__
 
index 65c01c10b335911e49091bf923b7f7136cdcba75..94ceec713afeed4e1de2bd704f95176218349d3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_PR_H
 #define LINUX_PR_H
 
index cae461224948a715c029467d573f18716873f54f..5bd3f151da7857ca488bdd1740833ab6f48bc5b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PREEMPT_H
 #define __LINUX_PREEMPT_H
 
index a3bfbdf63d32a9da2d2b3227967303c5e87e2aba..13eafebf3549ac76b90fc09e68946c5028a2b223 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Generic cache management functions. Everything is arch-specific,  
  *  but this header exists to make sure the defines/functions can be
index 14ec4f567342d9ecaf8df8ae4836be67e40e486b..2b8e99c948d3cd79502e99bf94ff5472fa03d7fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PRIME_NUMBERS_H
 #define __LINUX_PRIME_NUMBERS_H
 
index e10f274683222358f892096c3bda5fbf7e896015..335926039adcfda6f9a8af97a15f9c7802d63b4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KERNEL_PRINTK__
 #define __KERNEL_PRINTK__
 
index 76124dd4e36d64e87d3bf9f816b6979a8c35e5c4..928ef9e4d912513bcee0b366f4cf781d534d55cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The proc filesystem constants/structures
  */
index 06844b54dfc17a222dc42ce17d4cde5e0d848a8e..2ff18c9840a7b1b6b513e8f32a11d25b1e8de019 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * procfs namespace bits
  */
index da0c5e56ca02271ee9d0424ab38c261ced1ea2f4..dbc952eec86959290fcde991ce6f638d7f471d58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Misc low level processor primitives */
 #ifndef _LINUX_PROCESSOR_H
 #define _LINUX_PROCESSOR_H
index b537a25ffa17215996577b65ac88539c959595c9..bad18ca431506d6785e5cbab2c7634e3182a246c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PROFILE_H
 #define _LINUX_PROFILE_H
 
index 8c1f2c55226de3dc577ac052f8e459766ea47823..613730622a1a68436ec29a8ae6d08f3c4a24aeca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PROJID_H
 #define _LINUX_PROJID_H
 
index 0e5fcc11b1b8a2441e05d56fcfbe6852e25eb7c1..919b2a0b0307482016c317399a906af75a703770 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PTRACE_H
 #define _LINUX_PTRACE_H
 
index d60d4e278609601f93aeab06f2f16f3f0aa0ccf0..b950e961cfa89e3b897213828db15483817095e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_PURGATORY_H
 #define _LINUX_PURGATORY_H
 
index a71d2dbd36108118f9bde41139b3835f230489ab..f63549581f3e18a048fdd99208bd2130ff78a2f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PVCLOCK_GTOD_H
 #define _PVCLOCK_GTOD_H
 
index 08fad7c6a4713c459051779baf4bc8e909bc3377..56518adc31dd702bc849078005a564b8ae6fa0df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PWM_H
 #define __LINUX_PWM_H
 
index efdd9227a49c9c9e77e7b74fff7e891df27935b7..e8afbd71a140696cd5b6affe1a7fbada5ccc5148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generic PWM backlight driver data - see drivers/video/backlight/pwm_bl.c
  */
index e1ab6e86cdb39491e9a1a311d1e6323bf0b2f9ad..fb09c2c7cb75e036aed944dc986fda56f3bb8902 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *pxa168 ethernet platform device data definition file.
  */
index 1e015c50e6b8869eb208be9e5ee48b9eaf00b268..46082480a2c349d5695488e7cded377f92fb4a41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _QED_FCOE_IF_H
 #define _QED_FCOE_IF_H
 #include <linux/types.h>
index 26049eab90100e2d196b87f211ff935c57e000d2..13373d437cf2874a9a717f7bc5291b9ff1551be9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Name                 : qnx6_fs.h
  *  Author               : Kai Bankett
index 3bdfa70bc64260faceabae8496cc7d90c6953e3d..034982c98c8b09a52aee2ee6ca9bd2fe11a549e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_QUICKLIST_H
 #define LINUX_QUICKLIST_H
 /*
index 0ce6fc49962e1bed7dd50ed8b3e10b7dd74207b8..2fb6fb11132efb1a967796cfed3e633c73ccd587 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions for diskquota-operations. When diskquota is configured these
  * macros expand to the right source-code.
index 5a210959e3f8a71f5251ccf325bc52f629df124a..2a9fee8ddae3f961b52d26ba79c1fe6ae78fc73e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XOR_H
 #define _XOR_H
 
index ecc730977a5ae9372b5605e1879ec1b4a146b246..5ef7d54caac23ecd957145a407cb95f29542d109 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RAMFS_H
 #define _LINUX_RAMFS_H
 
index eafea6a09361f8787bad4aa22d906dc17177d03f..4024f7d9c77dfe848de46ee0ea3afea57ad69ec1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/random.h
  *
index bd184a5db791bd81bf4c1917072746ab197c401d..d1fbeb66401241f3f0a0dfdbc6deebef8eb63428 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RANGE_H
 #define _LINUX_RANGE_H
 
index be5338a35d57962f9d7f2735ac17264412276f12..7c3debb47c87aba02aa87c46531aa188b0cf3412 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RAS_H__
 #define __RAS_H__
 
index 56375edf2ed22c7f32dd1d92c6b4fe59f3b42229..8ddf79e9207a9db19a91fd09081f8df3c18eea22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RATELIMIT_H
 #define _LINUX_RATELIMIT_H
 
index bfa6a2bcfb32bc9767ece9a60e823d618b75f3c5..33f5f5fc3e36c92ce63787d32d0479b758c7ff6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * rational fractions
  *
index 4f3432c61d12eade43d07afbd89d8e8f919fed8f..ece43e882b56df3c119b97d26e69f388cc348499 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Latched RB-trees
  *
index b1fd8bf85fdc430eaaa2195cd6dc18417bb64585..c2cdd45a880aa00229c0f7c5807305804cfd7823 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RCULIST_H
 #define _LINUX_RCULIST_H
 
@@ -276,7 +277,7 @@ static inline void list_splice_tail_init_rcu(struct list_head *list,
 #define list_entry_rcu(ptr, type, member) \
        container_of(lockless_dereference(ptr), type, member)
 
-/**
+/*
  * Where are list_empty_rcu() and list_first_entry_rcu()?
  *
  * Implementing those functions following their counterparts list_empty() and
index 4f216c59e7dbf83eec7b0c14538c22997409ea4d..66e73ec1aa99533d234b03a0b0699820837856da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RCULIST_BL_H
 #define _LINUX_RCULIST_BL_H
 
index a23a3315318048eec1fc18678e17967f03eaa89b..a328e8181e49f3a0947dd713daeef35b9d7c831f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RCULIST_NULLS_H
 #define _LINUX_RCULIST_NULLS_H
 
index de50d8a4cf414121a9f83e50df7738a5f530494a..1a9f70d44af954ffe790dcb75872704beab152b2 100644 (file)
@@ -523,7 +523,7 @@ static inline void rcu_preempt_sleep_check(void) { }
  * Return the value of the specified RCU-protected pointer, but omit
  * both the smp_read_barrier_depends() and the READ_ONCE().  This
  * is useful in cases where update-side locks prevent the value of the
- * pointer from changing.  Please note that this primitive does -not-
+ * pointer from changing.  Please note that this primitive does *not*
  * prevent the compiler from repeating this reference or combining it
  * with other references, so it should not be used without protection
  * of appropriate locks.
@@ -568,7 +568,7 @@ static inline void rcu_preempt_sleep_check(void) { }
  * is handed off from RCU to some other synchronization mechanism, for
  * example, reference counting or locking.  In C11, it would map to
  * kill_dependency().  It could be used as follows:
- *
+ * ``
  *     rcu_read_lock();
  *     p = rcu_dereference(gp);
  *     long_lived = is_long_lived(p);
@@ -579,6 +579,7 @@ static inline void rcu_preempt_sleep_check(void) { }
  *                     p = rcu_pointer_handoff(p);
  *     }
  *     rcu_read_unlock();
+ *``
  */
 #define rcu_pointer_handoff(p) (p)
 
@@ -778,18 +779,21 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
 
 /**
  * RCU_INIT_POINTER() - initialize an RCU protected pointer
+ * @p: The pointer to be initialized.
+ * @v: The value to initialized the pointer to.
  *
  * Initialize an RCU-protected pointer in special cases where readers
  * do not need ordering constraints on the CPU or the compiler.  These
  * special cases are:
  *
- * 1.  This use of RCU_INIT_POINTER() is NULLing out the pointer -or-
+ * 1.  This use of RCU_INIT_POINTER() is NULLing out the pointer *or*
  * 2.  The caller has taken whatever steps are required to prevent
- *     RCU readers from concurrently accessing this pointer -or-
+ *     RCU readers from concurrently accessing this pointer *or*
  * 3.  The referenced data structure has already been exposed to
- *     readers either at compile time or via rcu_assign_pointer() -and-
- *     a.      You have not made -any- reader-visible changes to
- *             this structure since then -or-
+ *     readers either at compile time or via rcu_assign_pointer() *and*
+ *
+ *     a.      You have not made *any* reader-visible changes to
+ *             this structure since then *or*
  *     b.      It is OK for readers accessing this structure from its
  *             new location to see the old state of the structure.  (For
  *             example, the changes were to statistical counters or to
@@ -805,7 +809,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
  * by a single external-to-structure RCU-protected pointer, then you may
  * use RCU_INIT_POINTER() to initialize the internal RCU-protected
  * pointers, but you must use rcu_assign_pointer() to initialize the
- * external-to-structure pointer -after- you have completely initialized
+ * external-to-structure pointer *after* you have completely initialized
  * the reader-accessible portions of the linked structure.
  *
  * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no
@@ -819,6 +823,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
 
 /**
  * RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer
+ * @p: The pointer to be initialized.
+ * @v: The value to initialized the pointer to.
  *
  * GCC-style initialization for an RCU-protected pointer in a structure field.
  */
index e774b4f5f220da5407eabe14e9fe7777481d7574..57f371344152a55bd8f791bc524d0778988b98fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_RCUPDATE_WAIT_H
 #define _LINUX_SCHED_RCUPDATE_WAIT_H
 
index a4ede51b3e7c146897ffaa4d871b5f7774930f22..90bfa3279a01c555746ea3fc1a80b9e6c6523426 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RCUWAIT_H_
 #define _LINUX_RCUWAIT_H_
 
index 75f7fe5c881f0711051ba3385c2ac294d48903dc..4a2abb38d1d612ec0fdf05eb18c98b210f631b7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __REBOOT_MODE_H__
 #define __REBOOT_MODE_H__
 
index a7ff409f386d0fadcb318fd41eefe90d97783145..d03da0eb95ca773bbe912f6ad139a303299b6412 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_REBOOT_H
 #define _LINUX_REBOOT_H
 
index 8c5a3fb6c6c57821720dc307f3eeec944c56f974..e031e9f2f9d85f1330a9f38b1a82c7f322f00f3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RECIPROCAL_DIV_H
 #define _LINUX_RECIPROCAL_DIV_H
 
index 48b7c9c68c4dee8a523d12f3b76edf34e554a0a8..e8286585e14978dc86684a5f4034c62777bee2c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_REFCOUNT_H
 #define _LINUX_REFCOUNT_H
 
index 763953f7e3b8a4f65c7cb8fdd4fdf4ecdc4722e0..df7f154a2ed588a0e172e2889c2163c75c8bb8ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * OpenFirmware regulator support routines
  *
index b4554ce9d4bb33dc228c8af18181cbe141716d52..b5dba0628951694a09f6f08a9b684c874b2bf50b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __REGULATOR_PLATFORM_CONSUMER_H_
 #define __REGULATOR_PLATFORM_CONSUMER_H_
 
index 68c1448e56bb3840da7161bebb1de12b8954eb39..e1bdf01a86e2a25bd158def8d731bae43c6c6ae5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/relay.h
  *
index db1fe6772ad50b4df500c1be56c0e9e5e366d53c..adb88f8cefbcdf2a8ea7e35bbd1b6a52f4684cc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RESET_CONTROLLER_H_
 #define _LINUX_RESET_CONTROLLER_H_
 
index 56463f37f3e67ec03e0f594a331bf62eb2d70722..4c7871ddf3c65365bb0609ab42a71a18edcf65a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RESET_H_
 #define _LINUX_RESET_H_
 
index 277afdad65890568c04fe6b06e19f900a06321e8..bdf491cbcab78164c7d573f73a8aa84dfb3b87ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RESOURCE_H
 #define _LINUX_RESOURCE_H
 
index 19df8422606c4d3f891c3454dabe57c605c1d46f..bcfdb918cd810ec5e7b006764e3be936edea34b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Common syscall restarting data
  */
index ee9b461af095389f7dd238b10e6cff120bcb773d..fa6ace66fea5e383bbcec98e064267667ad74b76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RING_BUFFER_H
 #define _LINUX_RING_BUFFER_H
 
index 733d3d8181e22fc2a7effe78add0f22acc3c147c..988d176472df75342b307cb40b809049f0ed64cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_RMAP_H
 #define _LINUX_RMAP_H
 /*
index 93c0a64aefa6c4f2ebe8431904c1b5c74b5ffcff..882587c2b15e73279a1ba52d3de848d3f7b6f2eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Remote Network Driver Interface Specification (RNDIS)
  * definitions of the magic numbers used by this protocol
index ed241aad7c17a8c8375bce2728bca6c7018759fb..bab671b0782f60615e57d5c1172262ab839d16a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ROOT_DEV_H_
 #define _ROOT_DEV_H_
 
index f27917e0a10114f9c72e228c42b6f60efd51b541..2e92d7407a855361733184c9b9c3cc22c21de89d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _LINUX_RPMSG_QCOM_SMD_H
 #define _LINUX_RPMSG_QCOM_SMD_H
index e6d0f9c1cafd818285e691e40fc156cedb51639a..f6d7ee98d93c3afb7c8b205a75361bd101a56600 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generic RTC interface.
  * This version contains the part of the user interface to the Real Time Clock
index 53fcbe9de7fd11bd18b9cdd8ce406588f3297410..1b92a28dd672ba99c8d89ba4e042f64776b2ad6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * RT Mutexes: blocking mutual exclusion locks with PI support
  *
index dea59c8eec54d69792271877cb34c09fba2c1cce..ff3dd2ec44b478eb0a3c42977190588c3c138295 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_RTNETLINK_H
 #define __LINUX_RTNETLINK_H
 
index e784761a4443b68430052d70832972ce2c002be5..e47568363e5ef784c3030fe5a43ade82641a23c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* rwsem-spinlock.h: fallback C implementation
  *
  * Copyright (c) 2001   David Howells (dhowells@redhat.com).
index 0ad7318ff2994a316a9a6a1a0ac1f1daf6152fb0..dfa34d8034399c80eef05c707e36f839510dec92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* rwsem.h: R/W semaphores, public interface
  *
  * Written by David Howells (dhowells@redhat.com).
index 99dadbffdd4ff576f08473640608d0e28f57de83..833871dcf6fd6f2ea4d8df6deafaf8f3bb15f9c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S3C_ADC_BATTERY_H
 #define _S3C_ADC_BATTERY_H
 
index 4b3286ac60c86e3185ced18b1c14452eb80f5679..d87dfa41142d4d7770b6774b5f19681293862656 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCATTERLIST_H
 #define _LINUX_SCATTERLIST_H
 
index c5a004962679b6025b177d3b56176406617d8781..745eabd17c10ee5d14144671d1df81e2b4c4922b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: scc.h,v 1.29 1997/04/02 14:56:45 jreuter Exp jreuter $ */
 #ifndef        _SCC_H
 #define        _SCC_H
index 92fb8dd5a9e4884bfde2225bb0c6d933ed13c660..fdf74f27acf1e9801051c5b6c22f1ec5008b9f42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_H
 #define _LINUX_SCHED_H
 
@@ -65,25 +66,23 @@ struct task_group;
  */
 
 /* Used in tsk->state: */
-#define TASK_RUNNING                   0
-#define TASK_INTERRUPTIBLE             1
-#define TASK_UNINTERRUPTIBLE           2
-#define __TASK_STOPPED                 4
-#define __TASK_TRACED                  8
+#define TASK_RUNNING                   0x0000
+#define TASK_INTERRUPTIBLE             0x0001
+#define TASK_UNINTERRUPTIBLE           0x0002
+#define __TASK_STOPPED                 0x0004
+#define __TASK_TRACED                  0x0008
 /* Used in tsk->exit_state: */
-#define EXIT_DEAD                      16
-#define EXIT_ZOMBIE                    32
+#define EXIT_DEAD                      0x0010
+#define EXIT_ZOMBIE                    0x0020
 #define EXIT_TRACE                     (EXIT_ZOMBIE | EXIT_DEAD)
 /* Used in tsk->state again: */
-#define TASK_DEAD                      64
-#define TASK_WAKEKILL                  128
-#define TASK_WAKING                    256
-#define TASK_PARKED                    512
-#define TASK_NOLOAD                    1024
-#define TASK_NEW                       2048
-#define TASK_STATE_MAX                 4096
-
-#define TASK_STATE_TO_CHAR_STR         "RSDTtXZxKWPNn"
+#define TASK_PARKED                    0x0040
+#define TASK_DEAD                      0x0080
+#define TASK_WAKEKILL                  0x0100
+#define TASK_WAKING                    0x0200
+#define TASK_NOLOAD                    0x0400
+#define TASK_NEW                       0x0800
+#define TASK_STATE_MAX                 0x1000
 
 /* Convenience macros for the sake of set_current_state: */
 #define TASK_KILLABLE                  (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE)
@@ -99,7 +98,8 @@ struct task_group;
 /* get_task_state(): */
 #define TASK_REPORT                    (TASK_RUNNING | TASK_INTERRUPTIBLE | \
                                         TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \
-                                        __TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD)
+                                        __TASK_TRACED | EXIT_DEAD | EXIT_ZOMBIE | \
+                                        TASK_PARKED)
 
 #define task_is_traced(task)           ((task->state & __TASK_TRACED) != 0)
 
@@ -1243,17 +1243,34 @@ static inline pid_t task_pgrp_nr(struct task_struct *tsk)
        return task_pgrp_nr_ns(tsk, &init_pid_ns);
 }
 
-static inline char task_state_to_char(struct task_struct *task)
+#define TASK_REPORT_IDLE       (TASK_REPORT + 1)
+#define TASK_REPORT_MAX                (TASK_REPORT_IDLE << 1)
+
+static inline unsigned int __get_task_state(struct task_struct *tsk)
+{
+       unsigned int tsk_state = READ_ONCE(tsk->state);
+       unsigned int state = (tsk_state | tsk->exit_state) & TASK_REPORT;
+
+       BUILD_BUG_ON_NOT_POWER_OF_2(TASK_REPORT_MAX);
+
+       if (tsk_state == TASK_IDLE)
+               state = TASK_REPORT_IDLE;
+
+       return fls(state);
+}
+
+static inline char __task_state_to_char(unsigned int state)
 {
-       const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
-       unsigned long state = task->state;
+       static const char state_char[] = "RSDTtXZPI";
 
-       state = state ? __ffs(state) + 1 : 0;
+       BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != sizeof(state_char) - 1);
 
-       /* Make sure the string lines up properly with the number of task states: */
-       BUILD_BUG_ON(sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1);
+       return state_char[state];
+}
 
-       return state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?';
+static inline char task_state_to_char(struct task_struct *tsk)
+{
+       return __task_state_to_char(__get_task_state(tsk));
 }
 
 /**
index 55cd496df8849dbcd7519675e77bd7758f01daba..704391cc1d206e96017c2291759b71d1b4d53e37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_AUTOGROUP_H
 #define _LINUX_SCHED_AUTOGROUP_H
 
index a55600ffdf4b5c23210199c5335c5bc07b744518..867d588314e0359b01557c0f2476f4711080bbc2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_CLOCK_H
 #define _LINUX_SCHED_CLOCK_H
 
index 98ae0d05aa32e4da15edcb532d7d5d86695e8081..9c8847395b5e15347e150d9b99337a70217b97db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_COREDUMP_H
 #define _LINUX_SCHED_COREDUMP_H
 
index d2be2ccbb3729de5ad9de019b67c78a039b99808..d1ad3d825561118c814320b444267a92a87fcd70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_CPUFREQ_H
 #define _LINUX_SCHED_CPUFREQ_H
 
index 4c5b9735c1ae1d0875de8cac7d21e2f534a506fc..d0677f6739f636e6ed6152e5875528f6539b1334 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_CPUTIME_H
 #define _LINUX_SCHED_CPUTIME_H
 
index 975be862e0835ce4527d59c7158b56978b00368d..a5bc8728ead78303afd4de9c5067b5da2f39bb06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_DEADLINE_H
 #define _LINUX_SCHED_DEADLINE_H
 
index 5d58d49e9f87634fa6c14db44a4eb62eb1552fc4..95fb9e025247ef3f5599f814c303637fd48def59 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_DEBUG_H
 #define _LINUX_SCHED_DEBUG_H
 
index 752ac7e628d72ee61e6f4825852a000d0a0868ef..9a62ffdd296f0790974dcaf9a8c71ece11af6fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_HOTPLUG_H
 #define _LINUX_SCHED_HOTPLUG_H
 
index 5ca63ebad6b40e2b2c3e7eee245e45f9d5b8fa26..22873d276be60e5d4200e7acfd5b7015191005a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_IDLE_H
 #define _LINUX_SCHED_IDLE_H
 
index 127215045285e6e0b0de966cfc5b53695b2be946..03542575fd33fc8325ec7be196e05983039b61fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_INIT_H
 #define _LINUX_SCHED_INIT_H
 
index 016afa0fb3bbce188627108ad66b700b0c4e10ff..98228bd48aeea29eb1d456586b58b17ee2aef60a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_JOBCTL_H
 #define _LINUX_SCHED_JOBCTL_H
 
index 4264bc6b2c2767f5442684b5467f9d44023f6351..80bc84ba5d2a937e6860414f25c6351fb681e95d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_LOADAVG_H
 #define _LINUX_SCHED_LOADAVG_H
 
index 3a19c253bdb1c52faaed181db73077d6eec6e989..3d49b91b674d75640d9eebdb0bff240434e2a6dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_MM_H
 #define _LINUX_SCHED_MM_H
 
@@ -84,6 +85,12 @@ static inline bool mmget_not_zero(struct mm_struct *mm)
 
 /* mmput gets rid of the mappings and all user-space */
 extern void mmput(struct mm_struct *);
+#ifdef CONFIG_MMU
+/* same as above but performs the slow path from the async context. Can
+ * be called from the atomic context as well
+ */
+void mmput_async(struct mm_struct *);
+#endif
 
 /* Grab a reference to a task's mm, if it is not already going away */
 extern struct mm_struct *get_task_mm(struct task_struct *task);
@@ -205,4 +212,20 @@ static inline void memalloc_noreclaim_restore(unsigned int flags)
        current->flags = (current->flags & ~PF_MEMALLOC) | flags;
 }
 
+#ifdef CONFIG_MEMBARRIER
+enum {
+       MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY        = (1U << 0),
+       MEMBARRIER_STATE_SWITCH_MM                      = (1U << 1),
+};
+
+static inline void membarrier_execve(struct task_struct *t)
+{
+       atomic_set(&t->mm->membarrier_state, 0);
+}
+#else
+static inline void membarrier_execve(struct task_struct *t)
+{
+}
+#endif
+
 #endif /* _LINUX_SCHED_MM_H */
index 028d17b918a7e28b902715e2bb4706952ec5815c..3d3a97d9399d8925a8ea0cf81b2c43bec6bb25e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_NOHZ_H
 #define _LINUX_SCHED_NOHZ_H
 
index 35d5fc77b4be9b2cec488d57fcbe00f27f2f4db1..e7dd04a84ba89d79507d461cee5b839269ff0b8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_NUMA_BALANCING_H
 #define _LINUX_SCHED_NUMA_BALANCING_H
 
index 2cc450f6ec5423cce507d2697a3319aa766ab06d..7d64feafc408e10902391acb61e6e59320869759 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_PRIO_H
 #define _LINUX_SCHED_PRIO_H
 
index f93329aba31a9ebf814600447b4abc107827dd17..db865ed25ef310e8c5109129a64631d17fdb099b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_RT_H
 #define _LINUX_SCHED_RT_H
 
index 2a0dd40b15dbae8c49c6196ee9d13b6146f2df8d..0aa4548fb49293b858ded19f056112cdefded7be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_SIGNAL_H
 #define _LINUX_SCHED_SIGNAL_H
 
index 141b74c53fad2d491cef5bb1b43dcb492de20207..04f1321d14c49d9e5ce1e63f59a7b7224c83fcaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_STAT_H
 #define _LINUX_SCHED_STAT_H
 
index 0f5ecd4d298e2acc41d87e46f31409de228b3010..d6a18a3839cc281c6c7c61f4e7cb4281a5087c66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_SYSCTL_H
 #define _LINUX_SCHED_SYSCTL_H
 
index 79a2a744648dd704b024cab1b37d85e4b2949ca0..05b8650f06f5334acbcbbf0ed1a3a12c9d79836f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_TASK_H
 #define _LINUX_SCHED_TASK_H
 
index df6ea6665b310ec4443d883487e7bb1613041f0d..cb4828aaa34fd1d8171dedcf79bcf46a623c21f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_TASK_STACK_H
 #define _LINUX_SCHED_TASK_STACK_H
 
index d7b6dab956ec4a130cd835d255b3a93bab764e54..cf257c2e728d622ec7db40f69620d2ed39ddcf7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_TOPOLOGY_H
 #define _LINUX_SCHED_TOPOLOGY_H
 
@@ -71,14 +72,6 @@ struct sched_domain_shared {
        atomic_t        ref;
        atomic_t        nr_busy_cpus;
        int             has_idle_cores;
-
-       /*
-        * Some variables from the most recent sd_lb_stats for this domain,
-        * used by wake_affine().
-        */
-       unsigned long   nr_running;
-       unsigned long   load;
-       unsigned long   capacity;
 };
 
 struct sched_domain {
index 3c07e4135127915b75f916fa12e99f077889a141..0dcf4e480ef73345174bfb7d1446e0e1a89daa5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_USER_H
 #define _LINUX_SCHED_USER_H
 
index d03d8a9047dcb56312532696a585c9c726e16824..10b19a192b2d000121eff7dc91e8f224918d5fec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_WAKE_Q_H
 #define _LINUX_SCHED_WAKE_Q_H
 
index a28156a0d34a12b4e0a796b98f8353cabfec80f7..c078f0a94ceca7ddae6630fc6640f3553d5d8a42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SCHED_XACCT_H
 #define _LINUX_SCHED_XACCT_H
 
index f0f8bad54be9e509f9824bb74621b6e9706b778d..eab7081392d502ca58e99aad2498cce9c6253ea6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCREEN_INFO_H
 #define _SCREEN_INFO_H
 
index 82b171e1aa0b8e0f074b0300f630c909a91d6a16..da803dfc7a3980a732ed328db276e12a1ae75e03 100644 (file)
@@ -231,7 +231,7 @@ struct sctp_datahdr {
        __be32 tsn;
        __be16 stream;
        __be16 ssn;
-       __be32 ppid;
+       __u32 ppid;
        __u8  payload[0];
 };
 
@@ -716,28 +716,28 @@ struct sctp_reconf_chunk {
 
 struct sctp_strreset_outreq {
        struct sctp_paramhdr param_hdr;
-       __u32 request_seq;
-       __u32 response_seq;
-       __u32 send_reset_at_tsn;
-       __u16 list_of_streams[0];
+       __be32 request_seq;
+       __be32 response_seq;
+       __be32 send_reset_at_tsn;
+       __be16 list_of_streams[0];
 };
 
 struct sctp_strreset_inreq {
        struct sctp_paramhdr param_hdr;
-       __u32 request_seq;
-       __u16 list_of_streams[0];
+       __be32 request_seq;
+       __be16 list_of_streams[0];
 };
 
 struct sctp_strreset_tsnreq {
        struct sctp_paramhdr param_hdr;
-       __u32 request_seq;
+       __be32 request_seq;
 };
 
 struct sctp_strreset_addstrm {
        struct sctp_paramhdr param_hdr;
-       __u32 request_seq;
-       __u16 number_of_streams;
-       __u16 reserved;
+       __be32 request_seq;
+       __be16 number_of_streams;
+       __be16 reserved;
 };
 
 enum {
@@ -752,16 +752,16 @@ enum {
 
 struct sctp_strreset_resp {
        struct sctp_paramhdr param_hdr;
-       __u32 response_seq;
-       __u32 result;
+       __be32 response_seq;
+       __be32 result;
 };
 
 struct sctp_strreset_resptsn {
        struct sctp_paramhdr param_hdr;
-       __u32 response_seq;
-       __u32 result;
-       __u32 senders_next_tsn;
-       __u32 receivers_next_tsn;
+       __be32 response_seq;
+       __be32 result;
+       __be32 senders_next_tsn;
+       __be32 receivers_next_tsn;
 };
 
 #endif /* __LINUX_SCTP_H__ */
index de466e11e271a92df49206d317a5ce6572f3d6af..652ec1a45f7cd396f95896aafe583b971eee1788 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/include/linux/scx200.h
 
    Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
index ece4e553e9ac26d61ce77eb31bc4e4a1b6874be3..6386ddbb6b702a61e6849e5b6c042fa411ab7ffd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear);
 
 extern unsigned scx200_gpio_base;
index fbb76a46c8a58949de16941288f5cefc06e0d253..a2404a2bbd102d0766c62118ca8f11d8a645aac7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is the official version 1.1 of sdb.h
  */
index ecc296c137cd2e3e926821dc357e5c00563bedd4..10f25f7e4304cc0330851a01ecd10353a4ad2ef6 100644 (file)
@@ -1,9 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SECCOMP_H
 #define _LINUX_SECCOMP_H
 
 #include <uapi/linux/seccomp.h>
 
-#define SECCOMP_FILTER_FLAG_MASK       (SECCOMP_FILTER_FLAG_TSYNC)
+#define SECCOMP_FILTER_FLAG_MASK       (SECCOMP_FILTER_FLAG_TSYNC | \
+                                        SECCOMP_FILTER_FLAG_LOG)
 
 #ifdef CONFIG_SECCOMP
 
index da1b33b33af7f45f6642a3d21e40b9094265c1b3..656528673983d7aee022b049dbfa2fa105113ab4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SECUREBITS_H
 #define _LINUX_SECUREBITS_H 1
 
index 7a66d2b4c5a6c38b19473da000f85bf5aacdf02c..369066a33ab9fd56658400174234c8bfa80552ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEG6_H
 #define _LINUX_SEG6_H
 
index d6c3fb4f3734d6cd26c3f30416d4ace66cd38a58..2f25a3cd7cb3b6263f83b82c240b8617cb89f652 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEG6_GENL_H
 #define _LINUX_SEG6_GENL_H
 
index da437ebdc6cd489520c96d193a1194a8f13a02ef..16e59595e870696512939d88d99570537691141a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEG6_HMAC_H
 #define _LINUX_SEG6_HMAC_H
 
index 5377cf6a5a02f1c28f579088115bc5775e19adf3..d07df7fc9deed36539eb7c4d0d6c4c15ecd44501 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEG6_IPTUNNEL_H
 #define _LINUX_SEG6_IPTUNNEL_H
 
index 8e4624efdb6f1553f21e71c6918fd60b7444e201..5b278ce99d8d0666ac77bc913133fd3933c1546b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * selection.h
  *
index 0083128318f6da53dc1d29cecb3145096bd22a9a..9badd322dcee809bcd398977ad511868be96cc6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEM_H
 #define _LINUX_SEM_H
 
index fb7eb9ccb1cd43db30eb6742dab9510cc8a17eb4..aa5deb041c25d4796c8efa021de3c40d17483913 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEQ_BUF_H
 #define _LINUX_SEQ_BUF_H
 
index e305b66a9fb994904cdd87b046cca7822e62cef1..09c6e28746f9193da3052b81fbd7867dc34f5a8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SEQ_FILE_H
 #define _LINUX_SEQ_FILE_H
 
index 32c89bbe24a260754a7d3ee13293daeee9f548e9..43ccd84127b6799c099d280612d20d001e63113f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SEQ_FILE_NET_H__
 #define __SEQ_FILE_NET_H__
 
index ead97654c4e9afa7239e068cb37f6981d77ce6a3..f189a8a3bbb881974a37d6c936bb4d5cb71e6eb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SEQLOCK_H
 #define __LINUX_SEQLOCK_H
 /*
index 570e964dc899c39928ec18dce0db1073838c986f..b5e48ef89736430eedf871e44aade9d98ee99050 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SERIAL_BCM63XX_H
 #define _LINUX_SERIAL_BCM63XX_H
 
index e598eaef396296fc5c7b6c2d394809887fa7b035..c0e795d95477daea839ba98f762e09195e327184 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SERIAL_SCI_H
 #define __LINUX_SERIAL_SCI_H
 
index 645896b812448ed1e3a6874f57d2bd2f9d7100cf..7bed5be886c6579bef41ba29e3e9ac5b0831a882 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SH_CLOCK_H
 #define __SH_CLOCK_H
 
index f2e27e07836231d9b640e4408287b5b274047b56..ff3642d267f7f3311a063e2b1e2b2ebd946686e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_ETH_H__
 #define __ASM_SH_ETH_H__
 
index 32383285da68315817041a36650b9e8e94048fff..c255273b02810ebc1b9fcd9e517f87478bda2636 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SH_INTC_H
 #define __SH_INTC_H
 
index 64638b058076e094ad785072912889640bcb7d85..74fd5140bb7a5db0cf6489ddfd809e970c37ddcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SH_TIMER_H__
 #define __SH_TIMER_H__
 
index 74a4b3b64352ec29e9e613b8d8bc41a1ad54a491..2bbafacfbfc9fc87bb03d207b79915e237a2eb1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SHM_H_
 #define _LINUX_SHM_H_
 
index b6c3540e07bc31a5aafbf43c61b469f4eeb4fa96..ed91ce57c428da1632c7696e8b75fb0bf88941c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SHMEM_FS_H
 #define __SHMEM_FS_H
 
index 51d189615bdaac321e32a6966ad689b7c37b78ce..388ff2936a8716d6c90f6ced8a7a8193a6957e06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SHRINKER_H
 #define _LINUX_SHRINKER_H
 
index 38564e3e54c70cda7531423bdf9b7e3e1576c2d2..042968dd98f01083633b9d07d43b7ebf068e24aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SIGNAL_H
 #define _LINUX_SIGNAL_H
 
index 16d862a3d8f38daa8b08f471e5bd8a5b4f173266..222ae696000b966aa47a03cabf59219bcb20e4ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SIGNAL_TYPES_H
 #define _LINUX_SIGNAL_TYPES_H
 
index 4985048640a7312f75ead55b8f1215c3341627d3..9a47c380bda8b1310d7d287cdddcf61e095daf1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/signalfd.h
  *
index 29d959333d8158bdf49dc18f2c0ace91d2038b4a..50161b6afb614de14226a7a15ee126a5ac6e5733 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SIRFSOC_DMA_H_
 #define _SIRFSOC_DMA_H_
 
index 41473df6dfb074a8c0a193716b0ac2a1d43151d3..af5aa65c7c18c120d9f395aad56d26a18786b7ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk).
  *
index 4ad2c5a263999e24cf4d860f088bb4df07ba0e4c..8f7d2b1656d23832246a8869522515b561740103 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SLAB_DEF_H
 #define        _LINUX_SLAB_DEF_H
 
index 0783b622311e1ce96acbb0d2ed85658e1a377cfa..39fa09bcde23f26a6e12162eb79b389b4c856709 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SLUB_DEF_H
 #define _LINUX_SLUB_DEF_H
 
index 521f37143faec48cb6b918aa4a768df00f864659..8cace8189e748a97e2cb1e4621eef22531e6452e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SMC911X_H__
 #define __SMC911X_H__
 
index 129bc674dcf5df4ed3b2e184391fda0ada071618..f3b195fa78b9c41fe62d5ee73e1f9784e3681a33 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SMC91X_H__
 #define __SMC91X_H__
 
index 98b1fe027fc9c653e2d9c55fc890f19be3973cb3..9fb239e12b82485b5c14d4fd21a9db650b3bdce9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SMP_H
 #define __LINUX_SMP_H
 
index 12910cf19869c7db32d1ca34ddda0931e80570d1..c174844cf663eaf7df5ab1f3d856919d557aac4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SMPBOOT_H
 #define _LINUX_SMPBOOT_H
 
@@ -55,7 +56,7 @@ smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
 }
 
 void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread);
-int smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
-                                        const struct cpumask *);
+void smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
+                                         const struct cpumask *);
 
 #endif
index f4bf16e16e166fce6ea13bb92b759a00d48f0ecb..1a136271ba6a9e4d6de922682304ca097b8b2ff8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SMSCPHY_H__
 #define __LINUX_SMSCPHY_H__
 
index 337ce414e898467f38969102ee477429aba70e4d..003f3dd5b192fe827b11525ebea38f2c58e9d796 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BRCMSTB_SOC_H
 #define __BRCMSTB_SOC_H
 
index 765386972b55286caab046d401692f63627cc388..1955c01deec5321aaa1bf42f3be3c4c1932326f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SOC_DOVE_PMU_H
 #define LINUX_SOC_DOVE_PMU_H
 
index a0182ec2a621c2044208b8a780847e58bb066ad5..e8d9f0d52933193740404601be224aee6b10b0da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOC_MEDIATEK_INFRACFG_H
 #define __SOC_MEDIATEK_INFRACFG_H
 
index f423001db3a9a8af3fc480013838e7725eb23766..bd8e0864b05923a8b4232ca82ffe62b9a9ba4208 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_MDT_LOADER_H__
 #define __QCOM_MDT_LOADER_H__
 
index 2a53dcaeeeed424e3ef0e375742a38989bd4f479..4eff6e68600d979ed5bdbc31bebf875c95ba2332 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_SMD_RPM_H__
 #define __QCOM_SMD_RPM_H__
 
index 785e196ee2cae6f1b0ec48fad8816db3839aa943..c1657ed27b303acd96a5cda27f8f4895a3524ec6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_SMEM_H__
 #define __QCOM_SMEM_H__
 
index b8478ee7a71f2757195a0aa135b0eeb38c766d9c..63ad8cddad14a60c74962658f7d8f44207071874 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QCOM_SMEM_STATE__
 #define __QCOM_SMEM_STATE__
 
index a4dd4d7c711dc000fc3f1fe93a794dbff245b418..bbeb6b9c0221d67d827aec109fe2d0538b5d672c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WCNSS_CTRL_H__
 #define __WCNSS_CTRL_H__
 
index 2c231f2280a6dc504f9a05eaf3462a4d0d3219ff..7899a5b8c24789a6756931d4f4b2ebd0828a98df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SOC_RENESAS_RCAR_RST_H__
 #define __LINUX_SOC_RENESAS_RCAR_RST_H__
 
index 7b8b280c181b838906926e26c7f869dd25844f90..8a6086d2e9c37585991ab2a9de249a5d71151ec9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SOC_RENESAS_RCAR_SYSC_H__
 #define __LINUX_SOC_RENESAS_RCAR_SYSC_H__
 
index a2f8109bb215751427e99b3c026badfe7113b875..15fe980a27ead226cdf5cbd00df3c54f2dd944a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOCK_DIAG_H__
 #define __SOCK_DIAG_H__
 
index 8ad963cdc88c50114759a343dd13a7a87c76abab..9286a5a8c60c5d1971716340f9beaf2ffb064fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SOCKET_H
 #define _LINUX_SOCKET_H
 
index 680f9a31df25653043a41603c4134ff284469b0a..2b802b6d12ad18d4ff7561ea6c0d404905ec88da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sonet.h - SONET/SHD physical layer control */
 #ifndef LINUX_SONET_H
 #define LINUX_SONET_H
index e2e036d94e4a9decf46e27e283f0a0f699feb08a..1a4b77317fa164406622759d8b91012d4586e5f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SONYLAPTOP_H_
 #define _SONYLAPTOP_H_
 
index d534da2b55750983571987b33761e09da71babc4..2b99a5dd073d16ea1c94b6cfbc2d9d97e57b1ed7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SORT_H
 #define _LINUX_SORT_H
 
index 73ded040f1d7c894a1bdd8e56ce69af74b76918b..3c6d393c7f29efb5f68081b9564827cee7b58a03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SOUND_H
 #define _LINUX_SOUND_H
 
index cdbed816f25ea04ab1cf576ce38a5c1c6186d080..b7be843c88e2305c69453744cb08068bc53a932f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/spi/ad7877.h */
 
 /* Touchscreen characteristics vary between boards and models.  The
index 2f694f3846a9ad1a5d052e96d5f68cd9a152c313..1a5eaef3b7f2727e317cb11833b1f98a34c0bbd8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/spi/ads7846.h */
 
 /* Touchscreen characteristics vary between boards and models.  The
index 0f20a70e5eb48daca2778a6827f6445af899f345..cbca6654aa3138cd5be03d175d5bde8e44916c80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Board-specific data used to set up AT73c213 audio DAC driver.
  */
index 6692b3418ccfdd0e219cba62a04e2d482909a5e8..edf4beccdadb454b008e674f637fd9234686f8ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_CORGI_LCD_H
 #define __LINUX_SPI_CORGI_LCD_H
 
index 287ec830eab73e5a626756e74858dbdbb267965d..82db6cd152dc36d1fc1a73d7b2bbe605120e78b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_DS1305_H
 #define __LINUX_SPI_DS1305_H
 
index e34e169f9dcb8f73801649dbdf0bab205a8162f9..aceccf9c71fb0ff3cc3ce3bb9fab67cfb5220019 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_EEPROM_H
 #define __LINUX_SPI_EEPROM_H
 
index f4199e758f97d5a90518d2336c955b3d3c4fe182..2401a0887209bf15e0b8f5f5a88dab45823548cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SPI_FLASH_H
 #define LINUX_SPI_FLASH_H
 
index 394fec9e7722db01bce36264e77a18d23a27c161..694268c78d5da053440cf4c69875e6b9901dfe47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_IFX_MODEM_H
 #define LINUX_IFX_MODEM_H
 
index bcaa2f762cc18e2e06afcc4cad35d1090e3399c6..433c20e2f46ef9e6b5cc5f5db4d10237e8d7f96b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SPI_MAX7301_H
 #define LINUX_SPI_MAX7301_H
 
index 82ffccd6fbe5432d12b70d70ad899728bd3e7d05..205a49cb99dbd3e9b1e7a91fe243f623475bb39b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SPI_MC33880_H
 #define LINUX_SPI_MC33880_H
 
index 82d96a346e6f7d67841c459cd491a09604b1880d..738a45b435f213da0e7ed4b9f257c9c7fe1812bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 struct mcp23s08_platform_data {
        /* For mcp23s08, up to 4 slaves (numbered 0..3) can share one SPI
         * chipselect, each providing 1 gpio_chip instance with 8 gpios.
index 274bc0fa00af6e2662f47f7d14b5f25c7649dbd8..bfde741a543dce055b92565b2c7f08d56cdfe2af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_MMC_SPI_H
 #define __LINUX_SPI_MMC_SPI_H
 
index f74b581f242f8c430c8030ab32a2955420447498..dc2a0cbd210df085bdc53f8ebdc54bfc20da677c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SPI_SH_MSIOF_H__
 #define __SPI_SH_MSIOF_H__
 
index 154788ed218c501d515b55b53b5e2ddcbe4f84a0..51d8c060e513ef767125a6268b459df91091b8df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef        __SPI_BITBANG_H
 #define        __SPI_BITBANG_H
 
index 1634ce31c06d40df05cd689941d44da82d1daf40..e7bd89a59cd10d77b41fda118205b12078d616c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_GPIO_H
 #define __LINUX_SPI_GPIO_H
 
index 1ac529cf4f06b6f4a9bca6d33d2d6e53ab9c60ad..a3ecf2feadf20402e00f88b1634dbfd34497ad4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SPI_SPI_OC_TINY_H
 #define _LINUX_SPI_SPI_OC_TINY_H
 
index 7572d4e1fe7657c94b1ba3ad00beab1ec44803dd..48dd58ac53834fdcad2942e875ea52a4163977b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TDO24M_H__
 #define __TDO24M_H__
 
index 333ecdfee0d9f13c0c630b857a4c67c1f503512f..c15d69d28e6810dd38a23546207448104a8ddefc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPI_XILINX_SPI_H
 #define __LINUX_SPI_XILINX_SPI_H
 
index 69e079c5ff985bdc49d8b933ea688159f448e2f1..341e1a12bfc78c99c62e21857c2f9e304800db52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPINLOCK_H
 #define __LINUX_SPINLOCK_H
 
index db42746bdfea54858ba2fae9fdaf5e4141b478a9..74b4911ac16dd227921dc0a84acbe83287acba2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Function declerations and data structures related to the splice
  * implementation.
index 39af9bc0f653ec97f739b2e803385cba669d1aa7..62be8966e8370535ac6cb9b15b7c154e23381dda 100644 (file)
@@ -78,6 +78,7 @@ void synchronize_srcu(struct srcu_struct *sp);
 
 /**
  * srcu_read_lock_held - might we be in SRCU read-side critical section?
+ * @sp: The srcu_struct structure to check
  *
  * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an SRCU
  * read-side critical section.  In absence of CONFIG_DEBUG_LOCK_ALLOC,
index 26a0b3c3ce5f85ff73bfa7bd1fa1d9f80d9d708c..3b43655cabe69991be5bf5a8353f88f6442ece4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_H_
 #define LINUX_SSB_H_
 
index 0688472500bbabb1274a55c1ab0720d39b10922b..31593b34608e6418403a6d43db5a6cd501b81d81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_DRIVER_GIGE_H_
 #define LINUX_SSB_DRIVER_GIGE_H_
 
index 6535e4718fdebeee689a1d214da4ca39f060f437..bef6bba32dff9b5ae0686e5e7a196d06f1d254a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_MIPSCORE_H_
 #define LINUX_SSB_MIPSCORE_H_
 
index 41e330e51c2a2156424274e2cacc6e257a1a4292..42824bdfe16e877903fd43d8761c7552c63fec8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_PCICORE_H_
 #define LINUX_SSB_PCICORE_H_
 
index 8d8dedff059d8990b17cf166e75c8ca2f1f8cfd5..49604ac3db822e6f31c40807ace85f7d07fdecc0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_EMBEDDED_H_
 #define LINUX_SSB_EMBEDDED_H_
 
index c0f707ac192baf6e1f33612ab5da05d288083259..210f4649406502c2db768a7b1a1e91090a36aa60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SSB_REGS_H_
 #define LINUX_SSB_REGS_H_
 
index 6f3e54c704c00257a4180934bee801b488570d59..03696c729fb4feeff3fc597f0dfc55304d8a8692 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STACKPROTECTOR_H
 #define _LINUX_STACKPROTECTOR_H 1
 
index 4205f71a5f0e99e9900ec47de977aed8f6453aaf..ba29a0613e66ffa83162692f05e367e7dd129d82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_STACKTRACE_H
 #define __LINUX_STACKTRACE_H
 
index d3e5f2756545a1886c1e6ccb8232f5dd186838a5..4b268d86a784c6012a3148b14379cf27c9e4056e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_START_KERNEL_H
 #define _LINUX_START_KERNEL_H
 
index 64b6b3aece21aee52a2b7c9246862afb41d606f1..22484e44544d56c8e069b90861f4ce7699c4db66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STAT_H
 #define _LINUX_STAT_H
 
index 0166d320a75d3565e32fb6c368a36cbb5a6f0596..3142e98546ac9e43b1c35e3649796a77279086b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STATFS_H
 #define _LINUX_STATFS_H
 
index 9c61c7cda9363360595dee03ffe787b81f6c2919..2181719fd907b6cc516f0c02217d0a32d2b7874c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STDDEF_H
 #define _LINUX_STDDEF_H
 
index 108739ff9223ba0ea5b29fe789ca877928c63e63..32feac5bbd75b69714f87e1178789c59a5dbd876 100644 (file)
@@ -126,14 +126,14 @@ struct stmmac_axi {
 
 struct stmmac_rxq_cfg {
        u8 mode_to_use;
-       u8 chan;
+       u32 chan;
        u8 pkt_route;
        bool use_prio;
        u32 prio;
 };
 
 struct stmmac_txq_cfg {
-       u8 weight;
+       u32 weight;
        u8 mode_to_use;
        /* Credit Base Shaper parameters */
        u32 send_slope;
@@ -168,8 +168,8 @@ struct plat_stmmacenet_data {
        int unicast_filter_entries;
        int tx_fifo_size;
        int rx_fifo_size;
-       u8 rx_queues_to_use;
-       u8 tx_queues_to_use;
+       u32 rx_queues_to_use;
+       u32 tx_queues_to_use;
        u8 rx_sched_algorithm;
        u8 tx_sched_algorithm;
        struct stmmac_rxq_cfg rx_queues_cfg[MTL_MAX_RX_QUEUES];
index 3d60275e3ba9717e5142779089ad24bc78cb630a..6d3635c86dbeb03fa8d78fe661993aa3b87f5a52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STOP_MACHINE
 #define _LINUX_STOP_MACHINE
 
index 54d21783e18dd12dd7e2ad563c2debc9e046143d..410ecf17de3ce591017e36a95f28de18ae54dcc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STRING_H_
 #define _LINUX_STRING_H_
 
index 5ce9538f290e5fc27c8eb55a95d3d6d8990b128c..4397c52ec4a496f61f7c26599a515276c0acc3ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_STRING_HELPERS_H_
 #define _LINUX_STRING_HELPERS_H_
 
index 7c2d95170d010254a09d2d06250cbd2f6cc5a65a..e8f0f852968f1326edb7b261708d5a5cee49f030 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_STRINGHASH_H
 #define __LINUX_STRINGHASH_H
 
index bd9be9f59d3a7ad5afc2b8c10af4681bee7d79af..3a11fa41a13184034b7e11723ae83e2c25c121fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUNGEM_PHY_H__
 #define __SUNGEM_PHY_H__
 
index 5c9c6cd08d3b66f33afd21361b41d99cc56c888d..07d454873b6d737fc0bf1910fa6f07291a3822ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/addr.h
  *
index 8fd3504946ad5abbac6e502ea1b3f4ee0e439f48..d9af474a857d9f2c9ff96f2a98a4f6e2519c46af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/auth.h
  *
index cebdf87459014021da16fcffa94bbdd3455fd860..0c9eac351aabab4364be9f3dcc3f6a0bd57fc3d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/auth_gss.h
  *
index 55ef67bea06b99a4bb1684802b6e3b8adf70a468..71c237e8240e1f0c6886baaf6c07b8fd1581d69e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/sunrpc/clnt.h
  *
index 8da0f37f3bdc2622cb378c04acf2ec43c882a3af..f6aeed07fe04e3d51d7f9d23b10fe86d36241b45 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/debug.h
  *
index 68ec78c1aa48e1ec3e4b285420a69732a2b05c6a..5ac5db4d295f9487ced510634c2b2b65c5f7d20b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/gss_api.h
  *
index 694eecb2f1b5dffd8fe7f43c2979528ae2639042..9baed7b355b20894058560ea78e9246cd4e6676a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/sunrpc/metrics.h
  *
index 59cbf16eaeb56c9093d67f38d831526b42251605..4722b28ec36a8ab0abe670fcefbf8453676ab86e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/msg_prot.h
  *
index 7f490bef9e99f9838294bbb674e3014a7128185b..a5704daf5df9706e6d0e7ebef6424f38d19139b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H
 #define _LINUX_SUNRPC_RPC_PIPE_FS_H
 
index c1768f9d993bf25346dcd67215897278172e7b05..d96e74e114c06b18bf022da70f13f02c511faf31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/sched.h
  *
index edc64219f92b1153b5f0c2517d06fa46d1228ea8..84b92b4ad1c0976d8994b8cb59b61948010b3218 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/stats.h
  *
index 38f561b2dda3ccd8f2b4e20ea13f2d8d04d12496..3b9f0d1dbb808587b608c0941edc43e55d002bae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/svc.h
  *
index 6a2ad38f545896352ea91edb10f66ca9d44e7b93..1caf7bc833068db3c0f7e592ebfc6693f18c7a29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/svc_xprt.h
  *
index d03932055328ccef696dd3008dcddc2d5d1c5d70..7c365650584785277dbedb43e619b44e901103ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/svcauth.h
  *
index 726aff1a52011fcdfd3ab1e11b8a82ff1dbea703..a4528b26c8aad78e523c8aa327054cf9c22ccee3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/svcauth_gss.h
  *
index 2e780134f4490ed9386a01d87ba2e507c32ee4b3..119718a922f2c3bb7f42f50cfb61f1cf1b552971 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/svcsock.h
  *
index 697d6e69d61f9152f0590c127503ff19aab31a4e..242dbe00b5ff2ee3663a661703585fe3b9aecdcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/sunrpc/timer.h
  *
index 11a7536c0fd26da049a411bef4131196653354d0..bd3c8e05632b3bc2ed121884b7876581917752c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/include/linux/sunrpc/types.h
  *
index 86b59e3525a516d4eb0b7c80b9324ed50597c642..d950223c64b1c533ebc624ff3337cb40000bad81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * XDR standard data types and function declarations
  *
index 5a7bff41f6b70b3e60908a98f3049ec92ff5a390..7fad83881ce197bd8b629c85fe25b67239e309dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/sunrpc/xprt.h
  *
index 507418c1c69e984e7890ae398c0b0c0e249aad9d..af1257c030d2767913dc93d21650ca6b6345ebbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * RPC client multipathing definitions
  *
index c9959d7e3579b5a4bfe49a74519c4a53cd707132..ae0f99b9b965cca7b2012e527bd7f0413a5e750c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  linux/include/linux/sunrpc/xprtsock.h
  *
index dbe4d7fca1b8d64683911111ae4c0cf33eb76b8c..c12d1c7fa42bedfbbc814908dd542400cf57eb51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* sunserialcore.h
  *
  * Generic SUN serial/kbd/ms layer.  Based entirely
index d10b7980799d5216efdb08566d01d70c1780a5fc..d60b0f5c38d504e52a2c1c2726476def808595c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SUSPEND_H
 #define _LINUX_SUSPEND_H
 
index bfa68e837d6a31a5b5653538ea4ea40da471050f..3bfe4626953daea1ba3178b0e5f1f0b68f34fd51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SVGA_H
 #define _LINUX_SVGA_H
 
index 109ba041c2aeba6c68d2ab47ea1149a258cd966e..3e29f5dcc62b9a60fe90a520b6f6d1a4cf215277 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SW842_H__
 #define __SW842_H__
 
index 9ad3c60f6cae7f24e4ca4aa9a3e842fd22cbc4ae..e466fd159c857d6d7acec6da574c8647067e063a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAB_H
 #define _LINUX_SWAB_H
 
index 73e97a08d3d0a9be1e5467b11d1b0a0ad235b063..c98aaf6774665ea9970968f83bc45707a977757d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAIT_H
 #define _LINUX_SWAIT_H
 
 /*
  * Simple wait queues
  *
- * While these are very similar to the other/complex wait queues (wait.h) the
- * most important difference is that the simple waitqueue allows for
- * deterministic behaviour -- IOW it has strictly bounded IRQ and lock hold
- * times.
+ * While these are very similar to regular wait queues (wait.h) the most
+ * important difference is that the simple waitqueue allows for deterministic
+ * behaviour -- IOW it has strictly bounded IRQ and lock hold times.
  *
- * In order to make this so, we had to drop a fair number of features of the
- * other waitqueue code; notably:
+ * Mainly, this is accomplished by two things. Firstly not allowing swake_up_all
+ * from IRQ disabled, and dropping the lock upon every wakeup, giving a higher
+ * priority task a chance to run.
+ *
+ * Secondly, we had to drop a fair number of features of the other waitqueue
+ * code; notably:
  *
  *  - mixing INTERRUPTIBLE and UNINTERRUPTIBLE sleeps on the same waitqueue;
  *    all wakeups are TASK_NORMAL in order to avoid O(n) lookups for the right
  *  - the exclusive mode; because this requires preserving the list order
  *    and this is hard.
  *
- *  - custom wake functions; because you cannot give any guarantees about
- *    random code.
- *
- * As a side effect of this; the data structures are slimmer.
+ *  - custom wake callback functions; because you cannot give any guarantees
+ *    about random code. This also allows swait to be used in RT, such that
+ *    raw spinlock can be used for the swait queue head.
  *
- * One would recommend using this wait queue where possible.
+ * As a side effect of these; the data structures are slimmer albeit more ad-hoc.
+ * For all the above, note that simple wait queues should _only_ be used under
+ * very specific realtime constraints -- it is best to stick with the regular
+ * wait queues in most cases.
  */
 
 struct task_struct;
index 8a807292037f9ff956980260ba61c0c4c22dd07f..f02fb5db8914bf0731c03ae80e444156ec83a3cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAP_H
 #define _LINUX_SWAP_H
 
@@ -265,6 +266,10 @@ struct swap_info_struct {
                                         * both locks need hold, hold swap_lock
                                         * first.
                                         */
+       spinlock_t cont_lock;           /*
+                                        * protect swap count continuation page
+                                        * list.
+                                        */
        struct work_struct discard_work; /* discard worker */
        struct swap_cluster_list discard_clusters; /* discard clusters list */
 };
index b2b8ec7bda3f7a4b2067a355455884c10e1ac7df..a12dd1c3966c909be0c15ac9b08245f12f739d36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SWAP_CGROUP_H
 #define __LINUX_SWAP_CGROUP_H
 
index 6ef92d17633da7eb1c138a9e79195cf644f9038d..e36b200c2a77831f30d39b7da5145cae424077e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAP_SLOTS_H
 #define _LINUX_SWAP_SLOTS_H
 
index 388293a91e8c99d372a9dde30f9dbdefa40e5d72..06bd7b096167fdc3d4b1c69d3c178d47b26aeb60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAPFILE_H
 #define _LINUX_SWAPFILE_H
 
index 291c4b53465819293aaa9c25bbed1b932f449f1f..9c5a2628d6ce7b4f09e7542505c7b00ed0c8db8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SWAPOPS_H
 #define _LINUX_SWAPOPS_H
 
index 15e7160751a85a4be938f860257d05595b03105d..24ed817082ee590d96a18f4fbf76e289ed439ab5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SWIOTLB_H
 #define __LINUX_SWIOTLB_H
 
index daa6008bfdc8f09e26e37c2e3aa3dd19026faad3..3ebd9812f2e6f258fe6398712e6eaedd8f4e28bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SYS_H
 #define _LINUX_SYS_H
 
index 95606a2d556fd299f487240078922abf408e435d..a78186d826d7963d99f168908f4a5ec386de04e1 100644 (file)
@@ -221,21 +221,25 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
        }                                                               \
        static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
 
-#ifdef TIF_FSCHECK
 /*
  * Called before coming back to user-mode. Returning to user-mode with an
  * address limit different than USER_DS can allow to overwrite kernel memory.
  */
 static inline void addr_limit_user_check(void)
 {
-
+#ifdef TIF_FSCHECK
        if (!test_thread_flag(TIF_FSCHECK))
                return;
+#endif
 
-       BUG_ON(!segment_eq(get_fs(), USER_DS));
+       if (CHECK_DATA_CORRUPTION(!segment_eq(get_fs(), USER_DS),
+                                 "Invalid address limit on user-mode return"))
+               force_sig(SIGKILL, current);
+
+#ifdef TIF_FSCHECK
        clear_thread_flag(TIF_FSCHECK);
-}
 #endif
+}
 
 asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special,
                               qid_t id, void __user *addr);
index 1d4dba490fb6830835bf9a35f5edaf4b14bbe9ce..74f91eefeccfed728e38f0c4c9859fdf001224fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sysctl.h: General linux system control interface
  *
index aa02c328dff5cf3c3be31a7ae0675f8887845a5d..e32dfe098e822f559810d785a685e05054974cc0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * sysfs.h - definitions for the device driver filesystem
  *
index 387fa7d05c982b758942f83395e328949324fc1a..8c71874e84852b5cefb9b9bf0a06a877457eaf86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* -*- linux-c -*-
  *
  *     $Id: sysrq.h,v 1.3 1997/07/17 11:54:33 mj Exp $
index e47d6d90023dbd55794134f8a86035c8e629820e..5cf77dbb8d861778f892af6c7a8ca9a2ca50a697 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_SYSV_FS_H
 #define _LINUX_SYSV_FS_H
 
index 635a3c5706bdeb75378b22d93ce77ba811be0cf3..c6aa8a3c42ed9a0af7f0c6450da5f41992c4cefa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_T10_PI_H
 #define _LINUX_T10_PI_H
 
index bdf855c2856fb2905837d72296394e30d6354ad4..6f6acce064dea535b0a4e6fe84d20a99a3c9a9dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * task_io_accounting: a structure which is used for recording a single task's
  * IO statistics.
index 4d090f9ee60878683b1b3542eda603a975114f4d..bb5498bcdd961d2a998dd302b03074adc5ce29ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Task I/O accounting operations
  */
index ca5a1cf27daeb9487303dd29d9c58a9e571ecfb4..bd9a6a91c097e2c8c0806590353e44ee2a1b9d23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TASK_WORK_H
 #define _LINUX_TASK_WORK_H
 
index e2a5daf8d14f334433116d286792ef946ebee369..dbb4d124c7d7c1b6b928e42105877fd400f574cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* taskstats_kern.h - kernel header for per-task statistics interface
  *
  * Copyright (C) Shailabh Nagar, IBM Corp. 2006
index cfaee869146f6ec6f877681f9b041171ef238806..0494db3fd9e8b6ee743b846db6f8b3f10c0cb2bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_TEXTSEARCH_H
 #define __LINUX_TEXTSEARCH_H
 
index fdfa078c66e591c4a84cbc16ea164f379fac532c..b57231ff652fe7b858c019b235ca2f813d86b59a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_TEXTSEARCH_FSM_H
 #define __LINUX_TEXTSEARCH_FSM_H
 
index 361de59a2285cdecd6a0f3f4a89ba58fb096d772..9fb317970c0128f7ad50a4abba7ac8582207fb8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __THINKPAD_ACPI_H__
 #define __THINKPAD_ACPI_H__
 
index 905d769d8ddcfdbf9657371dda29744bcedb53f5..4bcdf00c110fb177c63fcb75c6c9f4923b681a01 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* thread_info.h: common low-level thread information accessors
  *
  * Copyright (C) 2002  David Howells (dhowells@redhat.com)
@@ -42,7 +43,7 @@ enum {
 #define THREAD_ALIGN   THREAD_SIZE
 #endif
 
-#ifdef CONFIG_DEBUG_STACK_USAGE
+#if IS_ENABLED(CONFIG_DEBUG_STACK_USAGE) || IS_ENABLED(CONFIG_DEBUG_KMEMLEAK)
 # define THREADINFO_GFP                (GFP_KERNEL_ACCOUNT | __GFP_NOTRACK | \
                                 __GFP_ZERO)
 #else
index 383ab9592becae78187d8be345e397a6c816765e..3086dba525e202e30b0060943102633f308d4146 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_THREADS_H
 #define _LINUX_THREADS_H
 
index fe01e68bf520c792f8c06989dd3e811baf8e98b5..cf413b344ddb7912864a12bbb67387fad9367c25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Tick related global functions
  */
index 9bc1f945777cdefb2ce787eacf59abc1dd42e796..87c36cf1cec2cada829e3b04c3531b84aff3a423 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TIME_H
 #define _LINUX_TIME_H
 
index 980c71b3001a535fa8e304030a6fb8002726cebf..ad33260618f766e8c2814530dc177961c8be485e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TIME64_H
 #define _LINUX_TIME64_H
 
index 0a0a53daf2a2206c38d26d133b90a5f069f2c851..97154c61e5d2b3dc9e59f37abb187652f10bb8f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * You SHOULD NOT be including this unless you're vsyscall
  * handling code or timekeeping internal code!
index ddc229ff6d1ee1dbd3e535d7c0a2f16225c29f47..0021575fe871133da5d67e2a5f09c85d0196fccd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TIMEKEEPING_H
 #define _LINUX_TIMEKEEPING_H
 
index e6789b8757d5021439c332751e52726bde83bec1..ac66f29c69169a24d010df022750b488878a85e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TIMER_H
 #define _LINUX_TIMER_H
 
@@ -168,6 +169,20 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
 #define setup_pinned_deferrable_timer_on_stack(timer, fn, data)                \
        __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED)
 
+#define TIMER_DATA_TYPE                unsigned long
+#define TIMER_FUNC_TYPE                void (*)(TIMER_DATA_TYPE)
+
+static inline void timer_setup(struct timer_list *timer,
+                              void (*callback)(struct timer_list *),
+                              unsigned int flags)
+{
+       __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
+                     (TIMER_DATA_TYPE)timer, flags);
+}
+
+#define from_timer(var, callback_timer, timer_fieldname) \
+       container_of(callback_timer, typeof(*var), timer_fieldname)
+
 /**
  * timer_pending - is a timer pending?
  * @timer: the timer in question
index bab0b1ad0613eb7de475b88546cecd7a52645e90..0c33260e5dfbf55d5646a7c2bc44791fe81c47a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/timerfd.h
  *
index 7eec17ad7fa195bba39c06e44817ef3f3a1b0402..78b8cc73f12fc9a9f3ab2aba96c399bd157e76bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TIMERQUEUE_H
 #define _LINUX_TIMERQUEUE_H
 
index 727512e249b5bcfd27742560358467377534e801..f5c03e9c3913ebd95dc91eaf0e507e321d89e48b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_TPM_COMMAND_H__
 #define __LINUX_TPM_COMMAND_H__
 
index 9330a58e26517d0e80111fc435477bda151c3cc7..d24991c1fef33343d7b7bc65d6b9ec67d8d9f575 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TRACE_H
 #define _LINUX_TRACE_H
 
index 1d7ca2739272b750be29f8ba2c898ab8950cd542..00e8f98c940f62f3866d4d7743d761c78b4d1e07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TRACE_CLOCK_H
 #define _LINUX_TRACE_CLOCK_H
 
index 7f11050746aecb21dc6f12e9b9d58e6d05d7d9d9..2bcb4dc6df1a38baf68282abc9505d62a9d8f1e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _LINUX_TRACE_EVENT_H
 #define _LINUX_TRACE_EVENT_H
@@ -272,6 +273,7 @@ struct trace_event_call {
        int                             perf_refcount;
        struct hlist_head __percpu      *perf_events;
        struct bpf_prog                 *prog;
+       struct perf_event               *bpf_prog_owner;
 
        int     (*perf_perm)(struct trace_event_call *,
                             struct perf_event *);
index cfaf5a1d4bad77cac2f76b41c9bc0fe4f7746ff2..6609b39a723261cf9e0dc3afc154f28d66f98ce2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TRACE_SEQ_H
 #define _LINUX_TRACE_SEQ_H
 
index a03192052066813e89b324eb091988569f97c542..64ed7064f1fa6510ed8b8611fd1f0d90ad33c6ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TRACEPOINT_DEFS_H
 #define TRACEPOINT_DEFS_H 1
 
index 3251965bf4cc704378939e7f0080f97625e2cfd3..d8ddce26e1f184bc7c88dab4b9c0c4f5163c7585 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * tsacct_kern.h - kernel header for system accounting over taskstats interface
  *
index cf53eb539f6e4f88fd8da8800ef0cf28840cf5af..7ac8ba208b1fe27570ba3fa6e2576b90bab64927 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TTY_H
 #define _LINUX_TTY_H
 
index fcdc0f5d90988f8d3073eeb91d17857f86b25a62..31c2b5b166deb97179cc501ce44f3d4bde750d25 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TTY_DRIVER_H
 #define _LINUX_TTY_DRIVER_H
 
index d43837f2ce3ae6ae530473d8f6be6ba5c5d1ff9b..767f62086bd9b5d6b1d3b222d90dd9a8f558f8bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TTY_FLIP_H
 #define _LINUX_TTY_FLIP_H
 
index 3971cf0eb467c0e1985011cc76db2e9f9484a274..3bc5144b1c7eb6412223bdbf9bd0106258547875 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TTY_LDISC_H
 #define _LINUX_TTY_LDISC_H
 
index eb5b74a575be84c49197e029a7449420eee353af..20d310331eb51148cb0e6d21d7c693d1e11315a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TYPECHECK_H_INCLUDED
 #define TYPECHECK_H_INCLUDED
 
index 258099a4ed82b1b3dd8199b7c905491c935a73a7..34fce54e4f1b6c42cd817032f5e598c33fa208f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
index 650f3dd6b800f3efa9509a50776649fd048202d7..5bdbd9f49395f883ca2dc5aa0d7bbde11f379063 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_U64_STATS_SYNC_H
 #define _LINUX_U64_STATS_SYNC_H
 
index 20ef8e6ec2db93fc2c160f8697ef810385c5bcf2..251e655d407fadfb43f604c032c2b026a9a1fc38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_UACCESS_H__
 #define __LINUX_UACCESS_H__
 
index bb679b48f408217a422d0cd427ede3e05e2e67bd..cf3ada3e820ed21e794f1f5ab911706e62c068a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UCS2_STRING_H_
 #define _LINUX_UCS2_STRING_H_
 
index 25e9d92163408c38eba7e08d26f508c4335c49de..b0542cd11aeb09f5d0c979e1acf31ad8d550bb6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UIDGID_H
 #define _LINUX_UIDGID_H
 
index a7af21a5524805b47718ef8001eea20e83860647..c7a1810373e39469c065d3f14d350939eb8bcd06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ULPI_DRIVER_H
 #define __LINUX_ULPI_DRIVER_H
 
index a2011a919eb61f39a1d1be6e01159b29b0e71113..e93cfa36c3f7ea96f8cca18ae46093ca7ef4a36e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ULPI_INTERFACE_H
 #define __LINUX_ULPI_INTERFACE_H
 
index b5b8b88045603eb86855ac7278cb7055cc7558c1..9f607872b2f84725a2a6809d7321fd6aeca8dbd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_ULPI_REGS_H
 #define __LINUX_ULPI_REGS_H
 
index 33383ca23837e4c386407d7f8966056a34618962..167aa849c0ce0c9ef84fc9a84ee55f4f3af662af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_ACCESS_OK_H
 #define _LINUX_UNALIGNED_ACCESS_OK_H
 
index 9356b24223ac3505343deaee610509a681ff3e1c..8bdb8fa01bd4cfe8b97359079579596adb38f4d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H
 #define _LINUX_UNALIGNED_BE_BYTESHIFT_H
 
index c2a76c5c9ed0c820c182d68bc2eccaed208f3c1f..7164214a4ba191638a9066cd76b41c1475a7772e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_BE_MEMMOVE_H
 #define _LINUX_UNALIGNED_BE_MEMMOVE_H
 
index 132415836c50687aa895a51c662031a6a7e0e688..15ea503a13fcf4111096e49f6d43ee6a342579e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_BE_STRUCT_H
 #define _LINUX_UNALIGNED_BE_STRUCT_H
 
index 02d97ff3df70ed6836b1c5aa03de4a00d4fa41ae..57d3114656e57b3e6adcc1f87fa075e424dd8522 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_GENERIC_H
 #define _LINUX_UNALIGNED_GENERIC_H
 
index be376fb79b6454a50908f5d5b7cfad66fc083b00..1628b75866f04a8d67ac874d764583a41640b22c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H
 #define _LINUX_UNALIGNED_LE_BYTESHIFT_H
 
index 269849bee4ec9d20f37b9da8855133ba91fdea57..9202e864d026c733b729a2b685f339fdffbbd127 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_LE_MEMMOVE_H
 #define _LINUX_UNALIGNED_LE_MEMMOVE_H
 
index 088c4572faa88660840dad1ff24d1a3f1d6dbad3..9977987883a69fc2577af82fbb44720ee50597d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_LE_STRUCT_H
 #define _LINUX_UNALIGNED_LE_STRUCT_H
 
index eeb5a779a4fdfdd834b7202985be243db00d84f2..ac71b53bc6dcc3fc1f7cd2fa65ca4762dc8c5687 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_MEMMOVE_H
 #define _LINUX_UNALIGNED_MEMMOVE_H
 
index cb9fbd54386e286f58b6332490a8bd8dcb78471e..9c63792a8134f756a66b70eafd48af34a1831f58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_USB_H
 #define __LINUX_USB_H
 
index ba99af275a31faab0e7f101eafb67e9443581908..9bb00df3b53fd73f94c3222f326c7352bd306c5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Platform data definitions for Atmel USBA gadget driver.
  */
index 6cc96bb12ddcf4f02fae841b801b3a9870ca5c2a..523aa088f6abefb559693547f598db50cab4d40e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file holds USB constants and structures that are needed for
  * USB device APIs.  These are used by the USB device model, which is
index d725cff7268de388f3e65fed41381255b2cf43e4..07f99362bc906b67dc4360d4341d23d2b3e0e3b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Platform data for the chipidea USB dual role controller
  */
index 7344d9e591cce044f3281723f16cb30977722160..62ab3805172da02a80b71b625615424ec44fcb65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Standalone EHCI usb debug driver
  *
index 639ee45779fb381edb59a0ae70e1d5ffe0f90f7f..487047162ca8e75664a63a19fe4975ad9e474364 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __EZUSB_H
 #define __EZUSB_H
 
index 71190663f1ee21d03ca001b53e55263090b959c4..570578cc986159c6a5b62f0997127c4843c4bbb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_FUNCTIONFS_H__
 #define __LINUX_FUNCTIONFS_H__ 1
 
index c36e95730de14d577e2a84962dc1c9fa2694f27a..d61aebd68128bfa51af81c16181e438319637eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GADGET_CONFIGFS__
 #define __GADGET_CONFIGFS__
 
index 4fd6513d564c7ccb1362d73a1aa45ba4ee05baaf..56559bc53214f24e3aa8eda7a0cb356a72f07900 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_USB_IOWARRIOR_H
 #define __LINUX_USB_IOWARRIOR_H
 
index e345ceaf72d690de32fa7e495406d8ec04fb5437..396d2b043e6476fe98c578eff331a36aa4d8ba61 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * USB IrDA Bridge Device Definition
  */
index 96ca114e88d0e1b843f1816c55c1bba310ee93ad..1f331c28bfe3f375581c26e92660cbe746a2ec3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Board initialization code should put one of these into dev->platform_data
  * and place the isp116x onto platform_bus.
index 642684bb929276563336d3672d830f819cd6d04b..5356c4ae386ef63ff7bc5c9b133e15ce52e531e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * board initialization code should put one of these into dev->platform_data
  * and place the isp1362 onto platform_bus.
index de7de53c5531bb60c9f38ceffe9d96c187cded9a..b75ded28db816ced912c73081c8f4e451c180925 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * board initialization should put one of these into dev->platform_data
  * and place the isp1760 onto platform_bus named "isp1760-hcd".
index d315c89078698b60e0d76a15940b0c390f0b5f12..5d19e6730475ec8018e89141f860248c5c31ede5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This is used to for host and peripheral modes of the driver for
  * Inventra (Multidrop) Highspeed Dual-Role Controllers:  (M)HDRC.
index 67929df86df5df44ffb3db4fd89ad0a317a6c3cd..69f1b63285323b106491487ed5a1a6105af7339e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* USB OTG (On The Go) defines */
 /*
  *
index 8c6914873a16a735b3ac26a6a1f69499ded12c73..b7a2625947f5bf6062a9728c453e332e84ae1463 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * USB PHY defines
  *
index de2a722fe3cf7c457352eb02548f0351a669ddf5..7cd553a3ce05b50fa1acc54b1311302cb87ff826 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file holds the definitions of quirks found in USB devices.
  * Only quirks that affect the whole device, not an interface,
index 3afe4d16fcef186d2c9f8b415b6c3c8b87c3ca2c..6c97f8e664925b9c81501835bba4bff16a2b063c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * board initialization should put one of these into dev->platform_data
  * and place the sl811hs onto platform_bus named "sl811-hcd".
index ffe7487886ca3ea0855f8c6811e82aa9d5b5fd49..0d44ce6af08f7f9ed2925601817c6f6e2a78f9ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __LINUX_USB_TYPEC_H
 #define __LINUX_USB_TYPEC_H
index 3fc8e8b9f04318528b4513ee927e8db4f72ab8b7..aa3ad39d39dc9548b127d9dcd0550029bfcea48a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USB_UAS_H__
 #define __USB_UAS_H__
 
index c13632d5292eb0dbe36eeb22c1daec6b983cbfb6..7408cf52c7100892144227454756ba1dd8cfbbec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_USB_NOP_XCEIV_H
 #define __LINUX_USB_NOP_XCEIV_H
 
index 0aae1b2ee931effe8ca3bb05c9952a3d98779f3c..000a5954b2e89b1397cee2852d597baf74c82b26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Interface to the libusual.
  *
index 9c4a445bb43c69999eb29303e9d8a0c4c6412c89..c07b386a9e93a2d4ce43e7f2e60aebe70c0307a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_USER_RETURN_NOTIFIER_H
 #define _LINUX_USER_RETURN_NOTIFIER_H
 
index c18e0125234628f4ad6810eb8f6a19cf356a7f46..3fe714da7f5ab3ff7bc582a98f764791c378610e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_USER_NAMESPACE_H
 #define _LINUX_USER_NAMESPACE_H
 
index 48a3483dccb12360e288ffdd97a9bf8d9d9080a4..f2f3b68ba910877a9fe7697f29a6f73f9e8e8221 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  include/linux/userfaultfd_k.h
  *
index f9b2ce58039bd728f0d9274026e44e3ffdf1a076..72299f261b253392ead9e08977d033f43bf6b77c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_HELPER_MACROS_H_
 #define _LINUX_HELPER_MACROS_H_
 
index 6ddbd86377dec3375549f2f02ef5c7c47fa9bfb3..d62829530c2f88dcd9b7ff2a0e07140b3d292a1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UTS_H
 #define _LINUX_UTS_H
 
index da826ed059cfd7de52135a40caafe5589b52d2d6..c8060c2ecd04b574bb2b6a795bb758a34f778f91 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UTSNAME_H
 #define _LINUX_UTSNAME_H
 
index af6c03f7f986290b7efd01f27bdb1b81eae4e7bd..bae807eb2933f9391d42c3d0dd73d98928b91a98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <generated/utsrelease.h>
 
 /* Simply sanity version stamp for modules. */
index e701d0541405ad76d630ef8a95555ba7ecdf9405..33952ac00a195467db0b70be575cd3add961e6ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VFS_H
 #define _LINUX_VFS_H
 
index 86ae3bcdb2bae6e3eb81dc40457dea9633f823d1..38ea9a77426acaa9d9136a7572abd8c62b33f5b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Miscellaneous definitions for VIA chipsets
    Currently used only by drivers/parport/parport_pc.c */
 
index 28b0e965360ff1822a22252b1ecaaab52ca8ab2d..988c7355bc22753373ab3f543cb922962f4451e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_H
 #define _LINUX_VIRTIO_H
 /* Everything a virtio driver needs to work with any particular virtio
index ce63a2c3a612936737ae14236294e93f44a2474b..825aaefac9b14ea107c28a10181dd6169ae8b0dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_BYTEORDER_H
 #define _LINUX_VIRTIO_BYTEORDER_H
 #include <linux/types.h>
index 0133d8a12ccd468514a72fdf8eff64aa7d69551d..5559a2d31c46af9c936f5103f752c35509d0c44b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_CONFIG_H
 #define _LINUX_VIRTIO_CONFIG_H
 
index 32fb046f2173347ad0b72628e84b575e8899f7b9..210034c896e31e725c6de6bfb33b0406c3b1927a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_NET_H
 #define _LINUX_VIRTIO_NET_H
 
index 270cfa81830ee4a69bca0c4ccf914a7a94e5b3e1..bbf32524ab279d8e353ca3d9d854a1ab2a12805c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_RING_H
 #define _LINUX_VIRTIO_RING_H
 
index ab13f0743da8ed095edb3be854f5c4430e828728..e223e2632edddda608c58210652b3dfe81fa2d98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_VSOCK_H
 #define _LINUX_VIRTIO_VSOCK_H
 
index d77bc35278b0e9ced64374475aa084290d988e1c..5c7f010676a74206e06282337ca77b578058f2f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef VM_EVENT_ITEM_H_INCLUDED
 #define VM_EVENT_ITEM_H_INCLUDED
 
index 1081db987391d24d7385dc7550fa137163284dd2..a5b3aa8d281f869ae21a5edd9137e0ee25ef4262 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_VMACACHE_H
 #define __LINUX_VMACACHE_H
 
index 2d92dd002abdaf823d1676be3c1ed5315d18342b..1e5d8c392f156a6625e282e2f741efc81533a472 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VMALLOC_H
 #define _LINUX_VMALLOC_H
 
index 25874da3f2e17965879b44aab7b08fb0ad62af89..7e82bf500f01f616b8b24fd59299126c090cf654 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VME_H_
 #define _VME_H_
 
index 3347cc3ec0ab6b8ab6f43a6977d4512b59febe22..61e6fddfb26fd4c3d6870fd4ee8d451c5e10144c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_VMPRESSURE_H
 #define __LINUX_VMPRESSURE_H
 
index ade7cb5f1359915f0d5036ae7884d99adc20e021..1e0cb72e0598bb668f1207c6e031f2b731321187 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VMSTAT_H
 #define _LINUX_VMSTAT_H
 
index b186e043523969b016fe12508da9c25000ec0223..9820ae4f99ab7def4821e9ccab4dd0a2bc03f065 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VT_H
 #define _LINUX_VT_H
 
index 30b6e0d2a942600e234c8195551a008e4d23c039..848db1b1569ff9be66b4c49e6bd40511aa1a1ef0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     include/linux/vt_buffer.h -- Access to VT screen buffer
  *
index 833fdd4794a0565b1a8797c706682a93247260f1..3fd07912909cddc74a30a5d3983d906563017e66 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VT_KERN_H
 #define _VT_KERN_H
 
index 18b405e3cd93c258b771005ff779f25fe938665e..a26ed10a4eac5dd767dc5923a64fc5e8da314304 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_KERNEL_VTIME_H
 #define _LINUX_KERNEL_VTIME_H
 
index 87c4641023fbec675fd785a2dd721dbf3e5ed251..158715445ffb62f6db0f71808e14f2145e468f6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_WAIT_H
 #define _LINUX_WAIT_H
 /*
index 12b26660d7e9442b63f31b9a53c55ef611c900d4..af0d495430d7755aec389dbaba0881feb2acde54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_WAIT_BIT_H
 #define _LINUX_WAIT_BIT_H
 
index 8198a63cf459626c0ea44365e8a87be866c9c37a..f6358558f9f51755055ebbf80b71f0b1f1298c75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * wanrouter.h Legacy declarations kept around until X25 is removed
  */
index a786e5e8973bff15e47c91b5ba8abbcf7e1bf4c8..44985c4a1e86214dca6579b42bda3c6d666bcdc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Generic watchdog defines. Derived from..
  *
index 56569604278f27277635ce63f1d696a4877f0568..4ca2842d2842d0e321dbbaa0efb7233cc0c36061 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /**
  * lib/minmax.c: windowed min/max tracker by Kathleen Nichols.
  *
index 4ea4c6e2383d92237537ea93784dbdc104f26094..2d1b54556eff4cf38448a4371a72f37d0de2eb19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file define a set of standard wireless extensions
  *
index fd98bb968219f19724b84d19202888b6e564d26d..58e082dadc683ec96763c8d60c93a5dda596b2c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  * Register bits and API for Wolfson WM97xx series of codecs
index 1c49431f31213fcaef9a57dbaaa4d79325c6cb47..0eae11fc7a23fee792e13b4b16e0bf110d491cd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * workqueue.h --- work queue handling for Linux.
  */
index d5815794416c9b8430c7ca9153e3be3271a76899..e12d92808e983c4b6e129c4304ac50f307d20f6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * include/linux/writeback.h
  */
index 5dd9a76822273ec092ea434f0489828155e834a6..39fda195bf788001448398275cf24545c20731c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Wound/Wait Mutexes: blocking mutual exclusion locks with deadlock avoidance
  *
index e77605a0c8da34ec14807fe912d1a5ed45ad999d..d70f77a4b62ab2ca6eeaa18188beb649ce9334c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   File: linux/xattr.h
 
index 7b9750404d226c7ed9e7a73c7eba6f7dc5f0896a..eaba53ff387ccfdbfdbe063549d3b3ed8ac705ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_Z2_BATTERY_H
 #define _LINUX_Z2_BATTERY_H
 
index e183a0a65ac1cb176f60a4131cf5bf0419c3608b..b1eaf6e317350db11c5555eb79b51280f2becd93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ZBUD_H_
 #define _ZBUD_H_
 
index 2e97b7707dffcb9f3067e4c574e3c73700469146..004ba807df967a8772db25e557903742b0c0a10d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * zpool memory storage api
  *
index 56b9ce4472fc0bc04e25666c0373251dc9267d71..a999a3970c6984ab43023b2717d63894a830eeac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BFIN_CAPTURE_H_
 #define _BFIN_CAPTURE_H_
 
index 45294328614dc0f3fa938f5e4d796457cc62bcf3..769c6cf7eb4c6949172ed5d0ce2ab5937f3c0a39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SAA7146__
 #define __SAA7146__
 
index 0da6ccc0615b5aeee2469a0823df2476896edda3..4e89e9f12a1ef7445b5aafc2abf7a47c4e26d85f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SAA7146_VV__
 #define __SAA7146_VV__
 
index 2f43f7d9e28d12628d9ddcee4a1e8ee821ee6b16..555f0ecc0fde7e19246965305ec065c76644a5bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_MOBILE_CEU_H__
 #define __ASM_SH_MOBILE_CEU_H__
 
index 5d0f56054d2698fcaec03b2d39461a1a848faf31..1b6872f5e9703857232f6f3d338abddffa64b113 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     V4L I2C address list
  *
index ac8c55617a79902122882e4b0c2856b9e63f9148..76491c62c254540498c7789072d2aa13321f8a2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IR_I2C
 #define _IR_I2C
 
index 1ba361205af1821dcd5663d73f9eb4e9d6ddfc8d..7c29c53aa988fb61af07f1c48014c2e8701cd6e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MT9P031_H
 #define MT9P031_H
 
index 03fd63edd133264b99c38b650b473e4eb5b97df6..4b10905542703c2691fbc3d6e6aa6b0d962b87de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MEDIA_MT9T001_H
 #define _MEDIA_MT9T001_H
 
index 12175a63c5b2624ca8d2d6cbfbcaecdbc0a40297..83a37ccfb6499a148fa644e5a894c658eb5920cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MEDIA_MT9V032_H
 #define _MEDIA_MT9V032_H
 
index aed539068d2df25ff040ed8712ab2eb296086a03..78f0654d9c3d9006cd336607c5db8e5a84b77b54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * descriptions for simple tuners.
  */
index 630bcf3d8885b9e1eaf9da2a77b076c4a13c4d4e..b56eaee82aa58e52f7f0a978863a2144ab88276b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*
  * tveeprom - Contains structures and functions to work with Hauppauge
index e657614521e31adada542e9261a389a36ea85cb9..28a686eb7d090606cb0a7ab17de3ae42eea2f30a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *     V 4 L 2   D R I V E R   H E L P E R   A P I
index bd5312118013d3fbd2d88c698d15139d0b9155da..a7b3f7c75d628b067b9873f10be8e7c8d6c38544 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *     V 4 L 2   D R I V E R   H E L P E R   A P I
index c3bfa473c3aad2f4bf71b7af9adeab1b5bc2856f..a14ac7711c925adc93ae504f666e312622bf53ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <dvbdev.h>
 #include <dmxdev.h>
 #include <dvb_demux.h>
index 87b559024b4ab0a003d9d1e05bd40b53e6f8cd24..5a31faa24f1a7ac26e12826f9396fb1f3f6b3c3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _VIDEOBUF2_DVB_H_
 #define        _VIDEOBUF2_DVB_H_
 
index 8a32771e4215f337f29e492baecafa4eb42c69ee..27fb5c937c4fd6a698d0e51998d3c9ef3fe2bf21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* A unified ethernet device probe.  This is the easiest way to have every
  * ethernet adaptor have the name "eth[0123...]".
  */
index b944e0eb93be367944673939a943b05c3473f2e9..1e6df0eb058f1eedd5b84a52457273b2020e1c80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_ACT_API_H
 #define __NET_ACT_API_H
 
@@ -13,6 +14,7 @@
 struct tcf_idrinfo {
        spinlock_t      lock;
        struct idr      action_idr;
+       struct net      *net;
 };
 
 struct tc_action_ops;
@@ -104,7 +106,7 @@ struct tc_action_net {
 
 static inline
 int tc_action_net_init(struct tc_action_net *tn,
-                      const struct tc_action_ops *ops)
+                      const struct tc_action_ops *ops, struct net *net)
 {
        int err = 0;
 
@@ -112,6 +114,7 @@ int tc_action_net_init(struct tc_action_net *tn,
        if (!tn->idrinfo)
                return -ENOMEM;
        tn->ops = ops;
+       tn->idrinfo->net = net;
        spin_lock_init(&tn->idrinfo->lock);
        idr_init(&tn->idrinfo->action_idr);
        return err;
@@ -122,7 +125,9 @@ void tcf_idrinfo_destroy(const struct tc_action_ops *ops,
 
 static inline void tc_action_net_exit(struct tc_action_net *tn)
 {
+       rtnl_lock();
        tcf_idrinfo_destroy(tn->ops, tn->idrinfo);
+       rtnl_unlock();
        kfree(tn->idrinfo);
 }
 
index f44ff2476758e27ad9f9cc20d96d96f16e5ee98c..35f5aabd432ff8212b99094e13bb65b64830782f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ADDRCONF_H
 #define _ADDRCONF_H
 
index afb37f83544983c2fe54236f2a3806ecc9b43f53..a5ba41b3b86730ead8efdf8c4f33584949a92b19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NET_AFUNIX_H
 #define __LINUX_NET_AFUNIX_H
 
index 4e2dfa474a7e6e8deaeb56ec2a9115345141ac58..2d2dea521169b5cc7a4c898adbe647e4c9906058 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_AH_H
 #define _NET_AH_H
 
index 17d90e4e8dc5ca8303f78ade32f1621d8a5ca706..dc8cd47f883b8bbb5f1e6875c4d9471920729c36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* linux/net/inet/arp.h */
 #ifndef _ARP_H
 #define _ARP_H
index 5865924d4aace7fd733e368021579099b4961982..70e350e0db3d009378276e63eab5f8a32187595e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/atmarp.h - RFC1577 ATM ARP */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index c4a0cf6f0810951e63c9e477f21e2af957e9a672..76fb39c272a78d614ba0e7176c4f1b9811d437fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Declarations of AX.25 type objects.
  *
index 13de0ccaa0594172a946572bbc04397ab0a89032..a91bea80b9fc7bae2ae6ed3f5c7cd1d2e87a13aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef NET_COMPAT_H
 #define NET_COMPAT_H
 
index 93cb18f729b5bac2185990b3eb36cbe5a1d74144..a9663229b91394aa66c6f4dd9a8358fd8ff45ce5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_INET_DATALINK_H_
 #define _NET_INET_DATALINK_H_
 
index 913b73d239f54a11b87e7b304e0cea825fc7e416..fc0036228d207acbd5793bf1fe47c3fd585ac086 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DN_H
 #define _NET_DN_H
 
index 197886cd7bddad9a5099ce590c64569fdd619753..595b4f6c1eb10aa6615f5fa86796b8505035dc87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DN_DEV_H
 #define _NET_DN_DEV_H
 
index 81210a8b8d7c235c812a8f82973d64f4afcaf86b..6dd2213c5eb216a0cc08f4d2c02b82f0f5abcd20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DN_FIB_H
 #define _NET_DN_FIB_H
 
index 5e902fc3f4ebc54d67329cb1430e5d873b3e15de..2e3e7793973a8beeae42460986cd28e6111368be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DN_NEIGH_H
 #define _NET_DN_NEIGH_H
 
index e1ad903a8d6a0ff2a93106a9a3e430d4f0089558..1a245ee10c95179350f7124ea4b9d6721818e7c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* include/net/dsfield.h - Manipulation of the Differentiated Services field */
 
 /* Written 1998-2000 by Werner Almesberger, EPFL ICA */
index 93568bd0a3520bb7402f04d90cf04ac99c81cfbe..694c2e6ae618df5347e8e54d8741e9985925236d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * net/dst.h   Protocol independent destination cache definitions.
  *
@@ -271,7 +272,7 @@ static inline void dst_use_noref(struct dst_entry *dst, unsigned long time)
 static inline struct dst_entry *dst_clone(struct dst_entry *dst)
 {
        if (dst)
-               atomic_inc(&dst->__refcnt);
+               dst_hold(dst);
        return dst;
 }
 
@@ -311,21 +312,6 @@ static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb
        __skb_dst_copy(nskb, oskb->_skb_refdst);
 }
 
-/**
- * skb_dst_force - makes sure skb dst is refcounted
- * @skb: buffer
- *
- * If dst is not yet refcounted, let's do it
- */
-static inline void skb_dst_force(struct sk_buff *skb)
-{
-       if (skb_dst_is_noref(skb)) {
-               WARN_ON(!rcu_read_lock_held());
-               skb->_skb_refdst &= ~SKB_DST_NOREF;
-               dst_clone(skb_dst(skb));
-       }
-}
-
 /**
  * dst_hold_safe - Take a reference on a dst if possible
  * @dst: pointer to dst entry
@@ -339,16 +325,17 @@ static inline bool dst_hold_safe(struct dst_entry *dst)
 }
 
 /**
- * skb_dst_force_safe - makes sure skb dst is refcounted
+ * skb_dst_force - makes sure skb dst is refcounted
  * @skb: buffer
  *
  * If dst is not yet refcounted and not destroyed, grab a ref on it.
  */
-static inline void skb_dst_force_safe(struct sk_buff *skb)
+static inline void skb_dst_force(struct sk_buff *skb)
 {
        if (skb_dst_is_noref(skb)) {
                struct dst_entry *dst = skb_dst(skb);
 
+               WARN_ON(!rcu_read_lock_held());
                if (!dst_hold_safe(dst))
                        dst = NULL;
 
index 151accae708bc9a06a0ab320ae88c933623fa7cc..72fd5067c35349a7a2cb76f42b2dd4c218e0c091 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DST_CACHE_H
 #define _NET_DST_CACHE_H
 
index a803129a4849f23aeff75f75b1e8f8fd4fb5ec51..91bc7bdf6bf54392ca321c5d0ee0d4c0acef4b30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_DST_METADATA_H
 #define __NET_DST_METADATA_H 1
 
index c84b3287e38b9e80961516b594f0e3b7950ee5e1..5ec645f27ee3841f9a4074c94e5dca37bb86fc2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_DST_OPS_H
 #define _NET_DST_OPS_H
 #include <linux/types.h>
index c41994d1bfef0bce761227828638d466a01d6ebc..117652eb6ea32a836cd269f01e70f0e3c990fbc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_ESP_H
 #define _NET_ESP_H
 
index 3d7f1cefc6f582b328612a7085def93815e288ed..648caf90ec07a3c001415489cb25c8624d729900 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_FIB_RULES_H
 #define __NET_FIB_RULES_H
 
index 31bcbfe7a2207b85c271cc07a1d4c83d304235e4..299e5df385524c07d5c97ae5bead51adb3fe3990 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_FIREWIRE_H
 #define _NET_FIREWIRE_H
 
index eb60cee30b44ae25b7e1c6e044ea67d9a9b1e361..f1624fd5b1d03630c09f34106ba4aa2de45d7e5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *
  *     Generic internet FLOW.
index fc3dce730a6bb245718640066b903cb412299eb0..22aba321282dec4d04b678a2cfea252f1e0f058e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_FLOW_DISSECTOR_H
 #define _NET_FLOW_DISSECTOR_H
 
index f5cc6910a27e25bcf9d124b00cc19806bba5ec21..80f56e275b0871f0ebd9f9c9b2ff3c742a3f6590 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_FOU_H
 #define __NET_FOU_H
 
index 4e6131cd3f43dfb711049a1925abbea6074ec25b..ac1a2317941e7186abd01d3df0bf9ebc055be38b 100644 (file)
@@ -146,6 +146,7 @@ static void fq_tin_enqueue(struct fq *fq,
                           fq_flow_get_default_t get_default_func)
 {
        struct fq_flow *flow;
+       bool oom;
 
        lockdep_assert_held(&fq->lock);
 
@@ -167,8 +168,8 @@ static void fq_tin_enqueue(struct fq *fq,
        }
 
        __skb_queue_tail(&flow->queue, skb);
-
-       if (fq->backlog > fq->limit || fq->memory_usage > fq->memory_limit) {
+       oom = (fq->memory_usage > fq->memory_limit);
+       while (fq->backlog > fq->limit || oom) {
                flow = list_first_entry_or_null(&fq->backlogs,
                                                struct fq_flow,
                                                backlogchain);
@@ -183,8 +184,10 @@ static void fq_tin_enqueue(struct fq *fq,
 
                flow->tin->overlimit++;
                fq->overlimit++;
-               if (fq->memory_usage > fq->memory_limit)
+               if (oom) {
                        fq->overmemory++;
+                       oom = (fq->memory_usage > fq->memory_limit);
+               }
        }
 }
 
index abf33bbd2e6a0413193769d353bb9ce82a10ebec..c41833bd4590c10f556a94cf93b1a6f1338ccd96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_GARP_H
 #define _NET_GARP_H
 
index 8b7aa370e7a4af61fcb71ed751dba72ebead6143..304f7aa9cc01f02beea69e23f4f10def92033eb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_GEN_STATS_H
 #define __NET_GEN_STATS_H
 
index c59a098221db3fcec6f56bf8028f0b7ba80f2473..5ac169a735f4bdfab76d76f2036488bcf5e0347a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_GENERIC_NETLINK_H
 #define __NET_GENERIC_NETLINK_H
 
index ec0327d4331ba453923eb7891391e11c6db0859c..a7600ed55ea31fc680c6ec0952cb7dc86c0dd28f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_GENEVE_H
 #define __NET_GENEVE_H  1
 
index d25d836c129bf196b4b22a3bbb738192c2812ace..f90585decbce647789d145d48c9ccd6615dc8a49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_GRE_H
 #define __LINUX_GRE_H
 
index fcaf8f47913054543e97d606518f78eabf0659e1..596688b67a2a898a513e0e6e85bf349ad2a1ba2c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_GRO_CELLS_H
 #define _NET_GRO_CELLS_H
 
index 6398891b99ba0f82cbbf626b79be651f6fbf4c4f..0e16ebb2a82ddc7070c9004f510e44bfd3f6dfc0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GTP_H_
 #define _GTP_H_
 
index 3f28ec7f1c7f1ccd68bba98880f7f25da50bff95..2fdb29ca74c2ab26068c57e0134e58b35019ac0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_GUE_H
 #define __NET_GUE_H
 
index 47d08662501b7225bca6c17e4738ef0fa21f2264..89085e2e2da5e9d05662cc253758eedeab8c43b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _HWBM_H
 #define _HWBM_H
 
index 2d87d6898b0a99f13ad66c31c53eebbb34e09b86..44b9c00f72232c31d3cf478c901e7b164748bb04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_IFE_H
 #define __NET_IFE_H
 
index f39ae697347f6590459ee4178de84160b43841e2..5a54c9570977ea871c85847315b546e0addc4cb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INET_COMMON_H
 #define _INET_COMMON_H
 
index dce2d586d9cecb9e9de381aa0926f3e3d3ec9568..d30e4c869438cfef881e313832dd40810f054954 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INET_ECN_H_
 #define _INET_ECN_H_
 
index fc59e0775e001fd826e4fc76d82e492cec19d0c3..a6e4edd8d4a254dfa1472d73f911dc1bb3bdaa4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_FRAG_H__
 #define __NET_FRAG_H__
 
index aa95053dfc78d35d04aef276e2a5dce7343f72a0..db8162dd8c0bcbcaffcb1a0f6da1be139a5008d4 100644 (file)
@@ -96,7 +96,7 @@ struct inet_request_sock {
        kmemcheck_bitfield_end(flags);
        u32                     ir_mark;
        union {
-               struct ip_options_rcu   *opt;
+               struct ip_options_rcu __rcu     *ireq_opt;
 #if IS_ENABLED(CONFIG_IPV6)
                struct {
                        struct ipv6_txoptions   *ipv6_opt;
@@ -132,6 +132,12 @@ static inline int inet_request_bound_dev_if(const struct sock *sk,
        return sk->sk_bound_dev_if;
 }
 
+static inline struct ip_options_rcu *ireq_opt_deref(const struct inet_request_sock *ireq)
+{
+       return rcu_dereference_check(ireq->ireq_opt,
+                                    refcount_read(&ireq->req.rsk_refcnt) > 0);
+}
+
 struct inet_cork {
        unsigned int            flags;
        __be32                  addr;
index 950ed182f62f6f2e359b8ead28d903b4c6dc877f..00b5e7825508aab5c72156f7fba889dd166899c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *             INETPEER - A storage for permanent information about peers
  *
index ee96f402cb75ac9b35b7a7180f56367d88d49e47..bee528135cf1c43e0a290a632d8e0705eaa6afd0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_IP6_ROUTE_H
 #define _NET_IP6_ROUTE_H
 
index 08fbc7f7d8d70ffc43f93881b0fbeab5b3fe8abb..d66f70f63734c2d32ad81498bd9439f7783adcb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_IP6_TUNNEL_H
 #define _NET_IP6_TUNNEL_H
 
index 992652856fe8c7c1032e0f5f92ce7ee5aa0119da..eb2321a13506882ebb1daa0e86300d4b5eac5ced 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_IP_TUNNELS_H
 #define __NET_IP_TUNNELS_H 1
 
index 4f4f786255efe16725cbdea7bb29362ea6023185..5d08c1950e7d76891ab244958b70c9d8808d92cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* IP Virtual Server
  * data structure and functionality definitions
  */
index cc4f30cd7315e9778e49102823c03874a67c0ad1..fee6fc451597929a8294896446437de3627f1655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_IPCOMP_H
 #define _NET_IPCOMP_H
 
index c74cc1bd5a0276ef470d650e99b362d5fee7baa7..e3534299bd2aa12692f0fd1c297e308a62b5de98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Copyright (C) 1997 Martin Mares
  *
index af32b97b5ddd282ba3cea8171af20678a3864d48..baf0903909984de0a2ee823f72e3cd673da42961 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_INET_IPX_H_
 #define _NET_INET_IPX_H_
 /*
index 714cc9a54a4c38575f15581cb379a20f6615b3e2..070e93a17c59a49e9c173ac7f2f8cd9f89672581 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright 2006 IBM Corporation
  * IUCV protocol stack for Linux on zSeries
index b867b0cf79e84fc2bb0106e0aa41438591bdb2dd..f9e88401d7da3b5015e89b34f750a7d237d6e089 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  drivers/s390/net/iucv.h
  *    IUCV base support.
index 2509728650bd79f8caabe6de6342c04eae0dd490..725282095840b853fe386cfb3df3eef3dfedea58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file define the new driver API for Wireless Extensions
  *
index 85e773742f4e773c30ca838df9f6ec28bd37a029..ccc3d1f020b0ca480994a05fff675d590059241e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LAPB_H
 #define _LAPB_H 
 #include <linux/lapb.h>
index aab0f427edb58d59a868595bf6e5238a2546f43d..8b47d3a51cf8a4f04eeee4ff7fb0be60025a0670 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * lib80211.h -- common bits for IEEE802.11 wireless drivers
  *
index 7c26863b8cf4f51b31e95ed5e873688cf79d315b..d747ef975cd80a15105288b2c2235b41b71be7b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_LWTUNNEL_H
 #define __NET_LWTUNNEL_H 1
 
index 01d751303498ccdd08fd63d16134fb6a8fd64744..b0f5b3105ef0010147192964d5f4055573671a16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_MLD_H
 #define LINUX_MLD_H
 
index 31912c3be772bfa5971e3f31a11f982cdd22ad2d..ef58b4a071900777170685221cb6d3f261cf709c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_MRP_H
 #define _NET_MRP_H
 
index fdc60ff2511d7ac54f04dae0370c171c4c0a51d1..fbefe80361eea1f1873e4a4ea60291c35b707051 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_NCSI_H
 #define __NET_NCSI_H
 
index 31b1bb11ba3ff29f51d5023a271ee470564ebc3e..ddfbb591e2c568cbaf186417b8cb9ab33a4075e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NDISC_H
 #define _NDISC_H
 
index 9816df225af3b4c29017e6a762315e85b3e2733c..a964366a7ef52fa42f855ac65dc8c245d04d6a4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_NEIGHBOUR_H
 #define _NET_NEIGHBOUR_H
 
index 57faa375eab9c063b98c75d440d10da96d217df8..10f99dafd5acb16f2c477baeab912a730c410344 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Operations on the network namespace
  */
index 7727b4247daf5dbbbd543933a6d762ed298cfb3f..93c1bd5133c2321332ec707f6719557145bd3df6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NET_RATELIMIT_H
 #define _LINUX_NET_RATELIMIT_H
 
index f440df172b5603eb307a4fd0378dcc9f77d05277..f728d9cad170b5cd73bef652924ff4f0dd9709e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_EVENT_H
 #define _NET_EVENT_H
 
index 925524ede6c8fed1a814d8112ec1c33f9e47d8b0..74af19c3a8f744c67e19fe0697414b972eade85c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _BR_NETFILTER_H_
 #define _BR_NETFILTER_H_
 
index 919e4e8af3272b3d66580e4c60c79bdc39b47616..2cc728ef8cd0a42c0e128126d4f4a383edab4312 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IPv4 support for nf_conntrack.
  *
index db405f70e538b446837deb314e77d95dc5cd412a..bcbd724cc048a207eb8d66575051ef8598b21ee5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_DEFRAG_IPV4_H
 #define _NF_DEFRAG_IPV4_H
 
index 0a14733e8b82ce622f0f9ba375bc5aa95aed4986..c962e0be3549003aa37e578cac8fd6319088a189 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_DUP_IPV4_H_
 #define _NF_DUP_IPV4_H_
 
index a9c001c646da25c3b1f71993ed1c3a0d799950f9..ebd869473603af5dc8f6225ff6b3c05008a40e06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_MASQUERADE_IPV4_H_
 #define _NF_NAT_MASQUERADE_IPV4_H_
 
index df7ecd806abaf7d7d2d9417390636df178ae611e..2eb43fcefc5057102db0c2ff2dbf0f3e23a772b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IPV4_NF_REJECT_H
 #define _IPV4_NF_REJECT_H
 
index 67edd50a398ac28a24312735d6e9e5541868d914..c86895bc5eb609ff1cd8c8a5cefd93fe62c9c07a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ICMPv6 tracking.
  *
index eaea968f86570db7010011b1af4a3608f2dee8f9..79a335c0d8b8fc215e1e34d33dde002fd70b31c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_IPV6_H
 #define _NF_CONNTRACK_IPV6_H
 
index 7664efe379741e134de28934ac0ea0b72f147421..9d7e28736da9381b41e088e45097e220593fc877 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_DEFRAG_IPV6_H
 #define _NF_DEFRAG_IPV6_H
 
index fa6237b382a3efced6dcc6b315ebfbe72206fb0c..caf0c2dd8ee701876fe1c9d279271f9fef5bc215 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_DUP_IPV6_H_
 #define _NF_DUP_IPV6_H_
 
index 0a13396cd390fa35b9132ca8c8caf3da3767dd84..1ed4f2631ed6db65e1bc6d427495a8892fabeb99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_MASQUERADE_IPV6_H_
 #define _NF_NAT_MASQUERADE_IPV6_H_
 
index 0ea4fa37db16d87cf5ed9b72feb8c50d24cb05f5..3a5a9a36a0b2d3eadeb4f39dbc57bdd5e7566429 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _IPV6_NF_REJECT_H
 #define _IPV6_NF_REJECT_H
 
index 8f3bd30511def05c91870b2f73bba03e4dc1b04a..792c3f6d30ce8fa336c3c78aebcc4ba991b79b58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Connection state tracking for netfilter.  This is separated from,
  * but required by, the (future) NAT layer; it can also be used by an iptables
index 81d7f8a3094557c3cd518be809c524b4448bbe1b..9b5e7634713e4125b983dd5964c6f196c17f5fdf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header is used to share core functionality between the
  * standalone connection tracking module, and the compatibility layer's use
index 2a10c6570fccfcd633351a3b881bff4d51e2f45c..3f1ce9a8776e6ee449c6cd989780e641308cb733 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * connection tracking event cache.
  */
index 818def0111101cf9d82f9f3ea54b1bb73545f488..006e430d1cdfb7f211e1f655337af7f01367f3e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * connection tracking expectations.
  */
index 4944bc9153cf5d307c4168079d9eb4b6a2c09f21..21f887c5058c5ded57e7b9018aef250612b3caff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_EXTEND_H
 #define _NF_CONNTRACK_EXTEND_H
 
index c519bb5b5bb8806089886caacaca4846fe3eeb98..fc39bbaf107c791bdf75b28db8aef8179eada1a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * connection tracking helpers.
  *
index 6269deecbee775d8ca47c1e6beb70504487f3d34..d5808f3e2715dc949bbd87b118b8e9e81d7e5f76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C)2003,2004 USAGI/WIDE Project
  *
index 738a0307a96bcbc556980e8b28900196e8f72f48..510192eb7e9dced908a7539a2ddf0cc183b24642 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Header for use in defining a given L4 protocol for connection tracking.
  *
index 1723a67c0b0a887d689c58481189f77f723aa400..4eacce6f3bcc72318182f1497de9e3a885f53191 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/types.h>
 #include <net/net_namespace.h>
 #include <linux/netfilter/nf_conntrack_common.h>
index 4b3362991a25f9c9f09b9794c96a0d0e15e89be9..0a10b50537aeedc938778359b0c89af071abb6af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_SEQADJ_H
 #define _NF_CONNTRACK_SEQADJ_H
 
index a2fcb5271726d3f5c9e20ccfb521385b59951610..2c7559a54092724308a0ff3e01677935a910f24e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_SYNPROXY_H
 #define _NF_CONNTRACK_SYNPROXY_H
 
index 483d104fa2541996f03cf587b22d9b5bbcffe424..9468ab4ad12dd78c907206a5a69bf245320e8b04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_TIMEOUT_H
 #define _NF_CONNTRACK_TIMEOUT_H
 
index 300ae2209f251e7e669c8c353b8de7fb50b16f55..3b661986be8f1e174e2ce937bdcb16477d9419cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_TSTAMP_H
 #define _NF_CONNTRACK_TSTAMP_H
 
index aea3f8221be08b2208586900447f363af796440b..bf0444e111a63a3e2b6520a21849a6c9bc83a6b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Definitions and Declarations for tuple.
  *
index 64a718b60839812c4dd7ecae5351e4b0a44e804d..52950baa3ab5456cd339895ea8b6efe944196b0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_CONNTRACK_ZONES_H
 #define _NF_CONNTRACK_ZONES_H
 
index 3e919356bedf00aeabd74e331d5c3070c14e74eb..2a6f6dcad3d927079563724f46a6700dc2e254a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_DUP_NETDEV_H_
 #define _NF_DUP_NETDEV_H_
 
index 42e0696f38d80f0b8b03bc18cf7413aa1893a6de..e811ac07ea94a2c32dd1d36fe59028ec94405571 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_LOG_H
 #define _NF_LOG_H
 
index b71701302e6176720a0ac8faf52b48e23bdb2fa9..207a467e7ca60962bc6572933f4476ba57562ac0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_H
 #define _NF_NAT_H
 #include <linux/netfilter_ipv4.h>
index 186c54138f358261f66aee9a86ec9d365e0c33ad..235bd0e9a5aac5a0ac0a295691c5e5dd8fdb1c70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_CORE_H
 #define _NF_NAT_CORE_H
 #include <linux/list.h>
index fbfa5acf4f14628f6334a36943bd1ab01844bb6f..97d7033e93a4b29a07692f71d6db1302b29397a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_HELPER_H
 #define _NF_NAT_HELPER_H
 /* NAT protocol helper routines. */
index aef3e5fc9fd935970d3bfe7d6ac2c6c65bb58425..ce7c2b4e64bb7bd1dd7575412bd0a2c0918f0bab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_L3PROTO_H
 #define _NF_NAT_L3PROTO_H
 
index 3923150f2a1e1cacfd1084d4c93d069747ffc02b..67835ff8a2d98d4cb8914ee8457f07072962f94b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Header for use in defining a given protocol. */
 #ifndef _NF_NAT_L4PROTO_H
 #define _NF_NAT_L4PROTO_H
index 73b729543309d5660b30cd0955b54349d640c17c..5ddabb08c472da405effc78affee4fa995cd8a3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_NAT_REDIRECT_H_
 #define _NF_NAT_REDIRECT_H_
 
index 39468720fc19226dea5839bf21f5ebb95d689ca6..814058d0f167289948b49290047060b0932dad73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_QUEUE_H
 #define _NF_QUEUE_H
 
index f2fc39c97d430d1ee154c6c422b7d0f8fc14f3e3..8230fefff9f5ebd5143c72d0aac61414c4f21695 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_SOCK_H_
 #define _NF_SOCK_H_
 
index 0f5b12a4ad09f0dd79ceb231e6de037ab830b039..079c69cae2f6d723d306dfbde7fa21f71a131ace 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_NF_TABLES_H
 #define _NET_NF_TABLES_H
 
index 424684c337719683e71213e70ef9f823fb8ece6b..ea5aab568be831d7db6ae68e759a0af05daa880c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_NF_TABLES_CORE_H
 #define _NET_NF_TABLES_CORE_H
 
index 25e33aee91e73600f4709c5633f3f0ad5cf82383..f0896ba456c41eec368ef55b8854890d06b06a35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_TABLES_IPV4_H_
 #define _NF_TABLES_IPV4_H_
 
index 97983d1c05e4d327147110440f4a3925b13f6951..b8065b72f56e8c85c29001c38f49ff3eb5bf249e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_TABLES_IPV6_H_
 #define _NF_TABLES_IPV6_H_
 
index 5ca3f14f0998e9962385821409d32f0ac66dbb43..612cfb63ac682181e65befda355c923a3e84d816 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KER_NFNETLINK_LOG_H
 #define _KER_NFNETLINK_LOG_H
 
index 6b84cf6491a2c491b524eb520a24bbd3c0db5815..4d9d512984b261bd81d12655742a1c4c15968400 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_DUP_H_
 #define _NFT_DUP_H_
 
index 381af9469e6ada01e4acffd4efc3ebc88e66a019..a88f92737308d18c90fd4111ef3f469222454311 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_FIB_H_
 #define _NFT_FIB_H_
 
index a3f3c11b2526efbaa88fb5857364a4e78618365e..e51ab3815797bef3d1c9377403959cded803e851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_MASQ_H_
 #define _NFT_MASQ_H_
 
index 1139cde0fdc590c08de507a66eee1b6de82eea1b..5c69e9b0938879a59b37c4438384371b51a03ef4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_META_H_
 #define _NFT_META_H_
 
index a2d67546afab0d7dbd1d7c7b825e04d8a929dea0..4a970737c03c832fcbe20376cd0b8399dd9a81ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_REDIR_H_
 #define _NFT_REDIR_H_
 
index 02e28c529b29bcb77d24d950af6873d66995ff31..de80c50761f0fa8620980f23be669c58b3f1cf41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NFT_REJECT_H_
 #define _NFT_REJECT_H_
 
index 130e58361f998ecdf361910b196e69778224d955..b1db13772554c66012fd677d6c2e9ff79d29266f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XT_RATEEST_H
 #define _XT_RATEEST_H
 
index e51cf5f815977adcff74d11cdd8ea1b4a5343ce1..0c154f98e987367256a40a1154eeb5ea8923a730 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_NETLINK_H
 #define __NET_NETLINK_H
 
@@ -773,7 +774,10 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
  */
 static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
 {
-       return nla_put(skb, attrtype, sizeof(u8), &value);
+       /* temporary variables to work around GCC PR81715 with asan-stack=1 */
+       u8 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(u8), &tmp);
 }
 
 /**
@@ -784,7 +788,9 @@ static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
  */
 static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
 {
-       return nla_put(skb, attrtype, sizeof(u16), &value);
+       u16 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(u16), &tmp);
 }
 
 /**
@@ -795,7 +801,9 @@ static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
  */
 static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
 {
-       return nla_put(skb, attrtype, sizeof(__be16), &value);
+       __be16 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(__be16), &tmp);
 }
 
 /**
@@ -806,7 +814,9 @@ static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
  */
 static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
 {
-       return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, value);
+       __be16 tmp = value;
+
+       return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
 }
 
 /**
@@ -817,7 +827,9 @@ static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
  */
 static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
 {
-       return nla_put(skb, attrtype, sizeof(__le16), &value);
+       __le16 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(__le16), &tmp);
 }
 
 /**
@@ -828,7 +840,9 @@ static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
  */
 static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
 {
-       return nla_put(skb, attrtype, sizeof(u32), &value);
+       u32 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(u32), &tmp);
 }
 
 /**
@@ -839,7 +853,9 @@ static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
  */
 static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
 {
-       return nla_put(skb, attrtype, sizeof(__be32), &value);
+       __be32 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(__be32), &tmp);
 }
 
 /**
@@ -850,7 +866,9 @@ static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
  */
 static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
 {
-       return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, value);
+       __be32 tmp = value;
+
+       return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
 }
 
 /**
@@ -861,7 +879,9 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
  */
 static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
 {
-       return nla_put(skb, attrtype, sizeof(__le32), &value);
+       __le32 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(__le32), &tmp);
 }
 
 /**
@@ -874,7 +894,9 @@ static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
 static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
                                    u64 value, int padattr)
 {
-       return nla_put_64bit(skb, attrtype, sizeof(u64), &value, padattr);
+       u64 tmp = value;
+
+       return nla_put_64bit(skb, attrtype, sizeof(u64), &tmp, padattr);
 }
 
 /**
@@ -887,7 +909,9 @@ static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
 static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
                               int padattr)
 {
-       return nla_put_64bit(skb, attrtype, sizeof(__be64), &value, padattr);
+       __be64 tmp = value;
+
+       return nla_put_64bit(skb, attrtype, sizeof(__be64), &tmp, padattr);
 }
 
 /**
@@ -900,7 +924,9 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
 static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
                                int padattr)
 {
-       return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, value,
+       __be64 tmp = value;
+
+       return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, tmp,
                            padattr);
 }
 
@@ -914,7 +940,9 @@ static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
 static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
                               int padattr)
 {
-       return nla_put_64bit(skb, attrtype, sizeof(__le64), &value, padattr);
+       __le64 tmp = value;
+
+       return nla_put_64bit(skb, attrtype, sizeof(__le64), &tmp, padattr);
 }
 
 /**
@@ -925,7 +953,9 @@ static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
  */
 static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
 {
-       return nla_put(skb, attrtype, sizeof(s8), &value);
+       s8 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(s8), &tmp);
 }
 
 /**
@@ -936,7 +966,9 @@ static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
  */
 static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
 {
-       return nla_put(skb, attrtype, sizeof(s16), &value);
+       s16 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(s16), &tmp);
 }
 
 /**
@@ -947,7 +979,9 @@ static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
  */
 static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
 {
-       return nla_put(skb, attrtype, sizeof(s32), &value);
+       s32 tmp = value;
+
+       return nla_put(skb, attrtype, sizeof(s32), &tmp);
 }
 
 /**
@@ -960,7 +994,9 @@ static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
 static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
                              int padattr)
 {
-       return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr);
+       s64 tmp = value;
+
+       return nla_put_64bit(skb, attrtype, sizeof(s64), &tmp, padattr);
 }
 
 /**
@@ -1010,7 +1046,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
 static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype,
                                  __be32 addr)
 {
-       return nla_put_be32(skb, attrtype, addr);
+       __be32 tmp = addr;
+
+       return nla_put_be32(skb, attrtype, tmp);
 }
 
 /**
index b106e6ae2e5b46dc119a322ebf22437e88158962..ecf238b8862c4578280137bb6db45e3f8e1fffd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * can in net namespaces
  */
index 17724c62de97c272ccba7960a7187b7f4325b56b..9795d628a127b4bca4af5f454f834429169d9a19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_CONNTRACK_H
 #define __NETNS_CONNTRACK_H
 
index 78eb1ff75475b6f39095d3c5baa118cfc5daf107..0ad4d0c71228aeabab489fff48c782bb58aca246 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_CORE_H__
 #define __NETNS_CORE_H__
 
index 98d2a7ce1f710cb87a3fc723ae1474508cf92518..cdbc4f5b839019347e1674a9c90bc25a987715c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_DCCP_H__
 #define __NETNS_DCCP_H__
 
index f15daaa89385294dcd24efdacda02f6c6fb682ee..8a1ab47c3fb3f9ea9fbadf8c30025a30f27d7eaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * generic net pointers
  */
index 69a6715d9f3fd16c9a6e90f9be403ba0cba1f022..24c78183a4c262e086c29cde1e61b7f397d8bab0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_NS_HASH_H__
 #define __NET_NS_HASH_H__
 
index 8170f8d7052b21f5b8e82d8cb7c1c52a56042378..736aeac52f56c98723901ade68b7adb0f10d2a37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ieee802154 6lowpan in net namespaces
  */
index 20d061c805e31d7df32a258907f8a33eea01c048..8fcff283748444fd561ffe1be00b95dcbb84710d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ipv4 in net namespaces
  */
index 2544f9760a4263b7f1b8d622331ca63038586137..dc825a5ddd7f4cc67ffb2bb51d3e04e2697e5cef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * ipv6 in net namespaces
  */
index d542a4b28ccab0bb92e391b971994b37e0b5077a..830bdf345b1726344137c7d95fc69d032be6f42b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_MIB_H__
 #define __NETNS_MIB_H__
 
index 6608b3693385e771147f78da13afa87cc6355d83..a7bdcfbb0b286aad8fa966c3fd5ac46543c0c7d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * mpls in net namespaces
  */
index 72d66c8763d0378395b160e2887b1d978020f0e0..cc00af2ac2d75190dca49339c93416a852929a8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_NETFILTER_H
 #define __NETNS_NETFILTER_H
 
index c807811460191dd20c1ba13eb5be8e6555c97167..4109b5f3010fd42b0d2f099958b8369313f872a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NETNS_NFTABLES_H_
 #define _NETNS_NFTABLES_H_
 
index 17ec2b95c062d0b0dc13d2c9702c2ab9da831682..aae69bb43cdef95c61d69bb989e8a3ffb5897f3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Packet network namespace
  */
index b7871d0183541c63d53ac9274aa93cf8982bd1fb..ebc813277662454ec25d2562a0782f796fa1bb2a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_SCTP_H__
 #define __NETNS_SCTP_H__
 
index 284649d4dfb47697005e1f6dc1bf43d13c5876f6..91a3d7e3919865f58bf40e528ee75acf714a6989 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Unix network namespace
  */
index c8a7681efa6a5f33b1cb7afd92f48a7766c8ac82..9bc5a12fdbb06df2c6768ab28ba6e681c645e588 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_X_TABLES_H
 #define __NETNS_X_TABLES_H
 
index 611521646dd4daf6eca8843b15dfc1dc38f3888c..9991e5ef52cc5c9b13753caf02f3ddce3238506c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NETNS_XFRM_H
 #define __NETNS_XFRM_H
 
index 443a4ffca7aafd9818c056bbd9aee261bd504a6f..0dad2dd5f9d7623c19e4d72fd595048fe5760e05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Declarations of NET/ROM type objects.
  *
index 3334dbfa5aa4b45ff76338fbd85819e85a7efe8c..36bb794f5cd65cddc60139e7f84024f9f7a1a4cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_NEXTHOP_H
 #define __NET_NEXTHOP_H
 
index 05e41383856bdb0a10db5606c5fbd3040a297a21..c2bacc66bfbc0911e2ca7aff71894570afa53066 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_P8022_H
 #define _NET_P8022_H
 struct datalink_proto *
index e80edd8879efc70f96dc0fbe91714c48714edc54..70ca2437740e41284d7b40b5c202d85fc2e6668b 100644 (file)
@@ -1,7 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_PKT_CLS_H
 #define __NET_PKT_CLS_H
 
 #include <linux/pkt_cls.h>
+#include <linux/workqueue.h>
 #include <net/sch_generic.h>
 #include <net/act_api.h>
 
@@ -17,6 +19,8 @@ struct tcf_walker {
 int register_tcf_proto_ops(struct tcf_proto_ops *ops);
 int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
 
+bool tcf_queue_work(struct work_struct *work);
+
 #ifdef CONFIG_NET_CLS
 struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index,
                                bool create);
index 259bc191ba5942bcb01b5033ef866c22c7608ad8..b3869f97d37d777224c4e925b2f89d853b3211a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_PKT_SCHED_H
 #define __NET_PKT_SCHED_H
 
index 92e9f1fe262844ad6f226c11333211df02954388..383e25ca53a7668a335c313bf0b4b5de62c51dab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_PPTP_H
 #define _NET_PPTP_H
 
index 65ba335b0e7e66bb7f1b4bd279d31e616e0dd31e..4fc75f7ae23beb47674b04df27ac6ef4594679fe 100644 (file)
@@ -39,8 +39,8 @@
 
 /* This is used to register protocols. */
 struct net_protocol {
-       void                    (*early_demux)(struct sk_buff *skb);
-       void                    (*early_demux_handler)(struct sk_buff *skb);
+       int                     (*early_demux)(struct sk_buff *skb);
+       int                     (*early_demux_handler)(struct sk_buff *skb);
        int                     (*handler)(struct sk_buff *skb);
        void                    (*err_handler)(struct sk_buff *skb, u32 info);
        unsigned int            no_policy:1,
index 8888b0e1a82e172fbcbffc95c8ed3b567992120d..9b80f814ab043b733ec3efbcb0c30f9e1f690815 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_PSAMPLE_H
 #define __NET_PSAMPLE_H
 
index 78db4cc1306a147ccb178265f265b9fd8e864ed5..7cb0c8ab4171274ff0a44e388df63891f03ba149 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_PSNAP_H
 #define _NET_PSNAP_H
 
index 4addc5c988e02b6edff192a8b039831ddc5aa47d..53d86b6055e8cceaf9b394e10fcff025b8c1b236 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_RAWV6_H
 #define _NET_RAWV6_H
 
index 208e718e16b96766a231752e5393d36b2ff76a32..9a9347710701458a74953ef0407714865a13298a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_SCHED_RED_H
 #define __NET_SCHED_RED_H
 
index 50811fe2c585b0e9fd8ffb365971229872eb353e..04b72681f2ab7c43931b9217fd4d25c476898983 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Declarations of Rose type objects.
  *
index 1b09a9368c68d46f0c5ee8ce3cefe566000c1ec1..d538e6db1afef1e7ab50d8b491949e8ccdeca4a8 100644 (file)
@@ -175,7 +175,9 @@ static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4
        fl4->fl4_gre_key = gre_key;
        return ip_route_output_key(net, fl4);
 }
-
+int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
+                         u8 tos, struct net_device *dev,
+                         struct in_device *in_dev, u32 *itag);
 int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src,
                         u8 tos, struct net_device *devin);
 int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src,
@@ -190,7 +192,7 @@ static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src,
        rcu_read_lock();
        err = ip_route_input_noref(skb, dst, src, tos, devin);
        if (!err) {
-               skb_dst_force_safe(skb);
+               skb_dst_force(skb);
                if (!skb_dst(skb))
                        err = -EINVAL;
        }
index 21837ca68ecc11f1f6d82a9d08878c335c93975b..7b938fbeebc1cee60cefc9193b6f3f075c4ef877 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_RTNETLINK_H
 #define __NET_RTNETLINK_H
 
index 135f5a2dd93122dd905557028068a31aeea37cb0..236bfe5b2ffe5252ecb1ae9e59251d597315bc6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_SCHED_GENERIC_H
 #define __NET_SCHED_GENERIC_H
 
@@ -10,6 +11,7 @@
 #include <linux/dynamic_queue_limits.h>
 #include <linux/list.h>
 #include <linux/refcount.h>
+#include <linux/workqueue.h>
 #include <net/gen_stats.h>
 #include <net/rtnetlink.h>
 
@@ -271,6 +273,7 @@ struct tcf_chain {
 
 struct tcf_block {
        struct list_head chain_list;
+       struct work_struct work;
 };
 
 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
index 142ea9e7a6d0d88989c2ca0b23548427def59d87..903771c8d4e3398bdd886998d20e564d1f49169e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_NET_SCM_H
 #define __LINUX_NET_SCM_H
 
index 2db3d3a9ce1d2cd053954bff3d66d06a9246e5c1..88233cf8b8d4f1c4d59a7a897b7a4c4af9f8c779 100644 (file)
@@ -261,7 +261,7 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc,
                                    struct sctp_fwdtsn_skip *skiplist);
 struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc);
 struct sctp_chunk *sctp_make_strreset_req(const struct sctp_association *asoc,
-                                         __u16 stream_num, __u16 *stream_list,
+                                         __u16 stream_num, __be16 *stream_list,
                                          bool out, bool in);
 struct sctp_chunk *sctp_make_strreset_tsnreq(
                                        const struct sctp_association *asoc);
index b8c86ec1a8f5a4b3f025de849b8a6da5772b7427..231dc42f1da687b647bcf43d2fb856e252f4b881 100644 (file)
@@ -130,7 +130,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event(
 
 struct sctp_ulpevent *sctp_ulpevent_make_stream_reset_event(
        const struct sctp_association *asoc, __u16 flags,
-       __u16 stream_num, __u16 *stream_list, gfp_t gfp);
+       __u16 stream_num, __be16 *stream_list, gfp_t gfp);
 
 struct sctp_ulpevent *sctp_ulpevent_make_assoc_reset_event(
        const struct sctp_association *asoc, __u16 flags,
index 031bf16d15218329be98b1fb8c3f3e891a6f86e3..d7d2495f83c27cc6707fed26f8e433dd6d1eb295 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_SECURE_SEQ
 #define _NET_SECURE_SEQ
 
index 12d26358ad9fb07cdd07c173e7d10ca7b43738cf..8381d163fefad5b2dd299d5bbc1fd67900bd40e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 03a362568357acc7278a318423dd3873103f90ca..a6b9a8d1a6df3f72df8f1aac0f577257fa6452d0 100644 (file)
@@ -856,7 +856,7 @@ void sk_stream_write_space(struct sock *sk);
 static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
 {
        /* dont let skb dst not refcounted, we are going to leave rcu lock */
-       skb_dst_force_safe(skb);
+       skb_dst_force(skb);
 
        if (!sk->sk_backlog.tail)
                sk->sk_backlog.head = skb;
index aecd30308d500b53a1b46902f2b3d254bcbc39b6..0054b3a9b9239eb47e14ce09460dc0814b5a1ebe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SOCK_REUSEPORT_H
 #define _SOCK_REUSEPORT_H
 
index 3af174d70d9e8ca988122b75358703b99c0b4d4a..2914e6d534904ae4ca53c1425f33edb3a9d86bb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_STP_H
 #define _NET_STP_H
 
index 7dc131d62ad5c3a5a8cb67c91d1f3d86e7207410..d96b59f45ebaac1280f1ca53bb923a0147ade6a9 100644 (file)
@@ -74,10 +74,9 @@ struct strparser {
        u32 unrecov_intr : 1;
 
        struct sk_buff **skb_nextp;
-       struct timer_list msg_timer;
        struct sk_buff *skb_head;
        unsigned int need_bytes;
-       struct delayed_work delayed_work;
+       struct delayed_work msg_timer_work;
        struct work_struct work;
        struct strp_stats stats;
        struct strp_callbacks cb;
index 59b515d32bb45921b58e150038f9a489d2b91e3a..1f4cb477bb5d61562e5c9886b2800eb8659f4114 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_CONNMARK_H
 #define __NET_TC_CONNMARK_H
 
index 3248beaf16b0513283cd3c863695a77d09793cdc..781f3433a0be3c7e63c0a0d38d7cfe73e1e6302c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_CSUM_H
 #define __NET_TC_CSUM_H
 
index d47f040a3bdfe0daacdb296a3bc749fb7fd4a1ce..d7ba0402a7325ed08186d03c26a5df78ecac74ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_DEF_H
 #define __NET_TC_DEF_H
 
index 41afe1ce7b16f9b5841c6010c519470f775e9f35..e82d93346b6352beaa7f14d9b03f5ca4cabdf614 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_GACT_H
 #define __NET_TC_GACT_H
 
index 30ba459ddd34c7e8664abeeafcf3926d39efc17d..ba6667125bcd6f567975af3077faccc6228627d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_IFE_H
 #define __NET_TC_IFE_H
 
index 31309766e379659c891cac317acd2bd6193fc110..4225fcb1c6ba289711dae265fa4fbacf60fa355f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_IPT_H
 #define __NET_TC_IPT_H
 
index 604bc31e23ab1ebc20ddaaa8fa7a94aaf1857281..b2dbbfaefd227876a12aa6283c12bceadd6d1d58 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_MIR_H
 #define __NET_TC_MIR_H
 
index 56681a320612bcc0e15cecfbc2bc2f295308e175..c14407160812878ae7848e3d17aa2280b2d42afa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_NAT_H
 #define __NET_TC_NAT_H
 
index a46c3f2ace702932dc95c3021e7b13d72a2a4777..227a6f1d02f4c4a2c401648071aecd733aa1a5a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_PED_H
 #define __NET_TC_PED_H
 
index 89e9305be88070ae4e5b76cd71dcad3e89a88f60..524cee4f4c817b3583385e9ae9f991503ab934fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_TC_SAMPLE_H
 #define __NET_TC_SAMPLE_H
 
index b510f284427aabc1f508d24d29d0f812e5e0aa61..e6d0002a1b0bc5f28c331a760823c8dc92f8fe24 100644 (file)
@@ -345,7 +345,7 @@ void tcp_v4_err(struct sk_buff *skb, u32);
 
 void tcp_shutdown(struct sock *sk, int how);
 
-void tcp_v4_early_demux(struct sk_buff *skb);
+int tcp_v4_early_demux(struct sk_buff *skb);
 int tcp_v4_rcv(struct sk_buff *skb);
 
 int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
@@ -544,7 +544,6 @@ u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now,
                     int min_tso_segs);
 void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
                               int nonagle);
-bool tcp_may_send_now(struct sock *sk);
 int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
 int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);
 void tcp_retransmit_timer(struct sock *sk);
@@ -841,6 +840,12 @@ struct tcp_skb_cb {
                        struct inet6_skb_parm   h6;
 #endif
                } header;       /* For incoming skbs */
+               struct {
+                       __u32 key;
+                       __u32 flags;
+                       struct bpf_map *map;
+                       void *data_end;
+               } bpf;
        };
 };
 
@@ -1766,12 +1771,12 @@ static inline void tcp_highest_sack_reset(struct sock *sk)
        tcp_sk(sk)->highest_sack = tcp_write_queue_head(sk);
 }
 
-/* Called when old skb is about to be deleted (to be combined with new skb) */
-static inline void tcp_highest_sack_combine(struct sock *sk,
+/* Called when old skb is about to be deleted and replaced by new skb */
+static inline void tcp_highest_sack_replace(struct sock *sk,
                                            struct sk_buff *old,
                                            struct sk_buff *new)
 {
-       if (tcp_sk(sk)->sacked_out && (old == tcp_sk(sk)->highest_sack))
+       if (old == tcp_highest_sack(sk))
                tcp_sk(sk)->highest_sack = new;
 }
 
index 276f9760ab561c52663338af34f3d6803f38b222..c4f5caaf37786d54596ab63aac497b7e06066af8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TRANSP_V6_H
 #define _TRANSP_V6_H
 
index 9a56c39e6d0a4b3f5315026970af025bd7069888..7e166a5703497fadf4662acc474f827b2754da78 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TSO_H
 #define _TSO_H
 
index 12dfbfe2e2d7853427e244f9d6e2e39ca19bd41e..6c759c8594e25c7f9f79dc6bf76325c39e705f94 100644 (file)
@@ -259,7 +259,7 @@ static inline struct sk_buff *skb_recv_udp(struct sock *sk, unsigned int flags,
        return __skb_recv_udp(sk, flags, noblock, &peeked, &off, err);
 }
 
-void udp_v4_early_demux(struct sk_buff *skb);
+int udp_v4_early_demux(struct sk_buff *skb);
 bool udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst);
 int udp_get_port(struct sock *sk, unsigned short snum,
                 int (*saddr_cmp)(const struct sock *,
index 10cce0dd4450353410e55d2b96ffeab6921b1759..b95a6927c7185eae2481d21235fa106e8a7ddb94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_UDP_TUNNEL_H
 #define __NET_UDP_TUNNEL_H
 
index b7a18f63d86d48ddfd99a63c2d66f7d9cbed386e..81bdbf97319b216ad1d7955aa13c7cae2c8ac044 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Definitions for the UDP-Lite (RFC 3828) code.
  */
index 4e3876dde295c8dbb48d8c6483624765037acfa4..13223396dc64abdbcd504b2439214efeb5c6def8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_VXLAN_H
 #define __NET_VXLAN_H 1
 
index 454ff763eeba9b829051862d7cce278be7d77b42..e51f067fdb3a00c56a3c477e30b7c28280abdc32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_WEXT_H
 #define __NET_WEXT_H
 
index 2609b57bd4597d6bb7035c923733e5076076467e..ed1acc3044ace48ecd0db0dfe1b7ac3fce23c3fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     Declarations of X.25 Packet Layer type objects.
  *
index 1fa08b49f1c25d1a3b9a1c930e238b45db52535a..cf749efca24ddf04a750d921e89b1cb114c0a028 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _X25DEVICE_H
 #define _X25DEVICE_H
 
index f002a2c5e33c2c6f5bc8998c73280023e856a51d..e015e164bac0abe458a7301ae315b8c9b6d37b50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NET_XFRM_H
 #define _NET_XFRM_H
 
index 429f46fb61e455776b85a3166044d45a419649d3..9c689868eb4d90869f9400a973f6b7005a0fd927 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM ras
 #define TRACE_INCLUDE_FILE ras_event
index bdb1279a415b39f0597a02a6eb36aa6bd5e7ded5..e8608b2dc844fb27c0e7e5ceb359fe357ecf6553 100644 (file)
@@ -285,7 +285,7 @@ enum ib_tm_cap_flags {
        IB_TM_CAP_RC                = 1 << 0,
 };
 
-struct ib_xrq_caps {
+struct ib_tm_caps {
        /* Max size of RNDV header */
        u32 max_rndv_hdr_size;
        /* Max number of entries in tag matching list */
@@ -358,7 +358,7 @@ struct ib_device_attr {
        struct ib_rss_caps      rss_caps;
        u32                     max_wq_type_rq;
        u32                     raw_packet_caps; /* Use ib_raw_packet_caps enum */
-       struct ib_xrq_caps      xrq_caps;
+       struct ib_tm_caps       tm_caps;
 };
 
 enum ib_mtu {
@@ -1739,7 +1739,7 @@ struct ib_mr {
        u32                lkey;
        u32                rkey;
        u64                iova;
-       u32                length;
+       u64                length;
        unsigned int       page_size;
        bool               need_inval;
        union {
index 2d878596b1e07a41f0e7d75b17b269e88646b9fd..c369703fcd69cd8636f6b2fda8957ac644b28f76 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDMA_NETLINK_H
 #define _RDMA_NETLINK_H
 
index 303ba1118a4d3702dec947011eb4cce96ffee6df..8a6acd054e4e9a97e2383c95be4d665313c737f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __OSD_ATTRIBUTES_H__
 #define __OSD_ATTRIBUTES_H__
 
index a1e1930b7a8722924847d1d1b85b005767d40d61..cb85eddb47ea816347322c728c818f8e7fda0226 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header file contains public constants and structures used by
  * the SCSI initiator code.
index 3d3f8b342e05d14e76d912251a36d6111ab4da88..7fb57e905526ca1ecabe1f51b0ba034eb04a41ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_CMND_H
 #define _SCSI_SCSI_CMND_H
 
index 20bf7eaef05a02959d3cfc6685316ca761c15487..731ac09ed23135abc3d3fd5e3a77bf9fd9891f6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Functions used by both the SCSI initiator code and the SCSI target code.
  */
index 56710e03101c6d854b42685bb529461666ec9800..04e0679767f633f3ba80c962299914ec7f727957 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_DBG_H
 #define _SCSI_SCSI_DBG_H
 
index 82e93ee94708c9f7de073b3e6c47826664525075..571ddb49b92693ef6f5f4eebc11985f51765a8ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_DEVICE_H
 #define _SCSI_SCSI_DEVICE_H
 
@@ -192,6 +193,7 @@ struct scsi_device {
        unsigned no_dif:1;      /* T10 PI (DIF) should be disabled */
        unsigned broken_fua:1;          /* Don't set FUA bit */
        unsigned lun_in_cdb:1;          /* Store LUN bits in CDB[1] */
+       unsigned unmap_limit_for_ws:1;  /* Use the UNMAP limit for WRITE SAME */
 
        atomic_t disk_events_disable_depth; /* disable depth for disk events */
 
index 9592570e092a3bba93065d6e66a21665f8bd52ae..3575693bb62824f1c784f53c1c01e01b8ec90b54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_DEVINFO_H
 #define _SCSI_SCSI_DEVINFO_H
 /*
@@ -29,5 +30,6 @@
 #define BLIST_TRY_VPD_PAGES    0x10000000 /* Attempt to read VPD pages */
 #define BLIST_NO_RSOC          0x20000000 /* don't try to issue RSOC */
 #define BLIST_MAX_1024         0x40000000 /* maximum 1024 sector cdb length */
+#define BLIST_UNMAP_LIMIT_WS   0x80000000 /* Use UNMAP limit for WRITE SAME */
 
 #endif
index a5534ccad859d29069bff2b240ccfca4dd0c9567..fae8b465233ecdfc2f6b82eb61c1b966b2d390a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_DRIVER_H
 #define _SCSI_SCSI_DRIVER_H
 
index 64d30d80dadb5f91ba73f2b020ede8d1e11e7ded..2b7e227960e1602123aecf88b11f9be00e975655 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_EH_H
 #define _SCSI_SCSI_EH_H
 
index 0a804b1a47267d5195deff92dba1f637d9de5bef..a8b7bf879cede4240d921a42f915a230163e5e4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_HOST_H
 #define _SCSI_SCSI_HOST_H
 
index 8d19d1d233c36a59ddc7b15c4fe066cae47f0a48..5101e987c0eff42587200a5625a6ac097463481a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_IOCTL_H
 #define _SCSI_IOCTL_H 
 
index 8c285d9a06d8a0e285e96e379d7864ee53c3673a..1c41dbcfcb35544f03e3557fbf765c81b2c770a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header file contains public constants and structures used by
  * both the SCSI initiator and the SCSI target code.
index e0afa445ee4eb495e67b73c3f0540714de075008..b06f28c749085b0901c809ae506ab3ec9d8dc464 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_REQUEST_H
 #define _SCSI_SCSI_REQUEST_H
 
index 5b416debf101c091874fcd4c94a1ef21433d4abf..e192a0caa8509294de01b851606ebaa3de3145a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_SCSI_TCQ_H
 #define _SCSI_SCSI_TCQ_H
 
index 6183d20a01fbe8f94bff514c8c8caa7585185b62..b266d2a3bcb1d099ed4a16237a8f06ab820714d5 100644 (file)
@@ -434,7 +434,6 @@ extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
                                                unsigned int target_id);
 extern void iscsi_remove_session(struct iscsi_cls_session *session);
 extern void iscsi_free_session(struct iscsi_cls_session *session);
-extern int iscsi_destroy_session(struct iscsi_cls_session *session);
 extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
                                                int dd_size, uint32_t cid);
 extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
index a23304b7fb2e6837003a0d51297f4ebc9b3f0e52..62895b4059330d463d11ba33c9c0bbc3a4ae733a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SCSI_TRANSPORT_SAS_H
 #define SCSI_TRANSPORT_SAS_H
 
index 56ae198acc7378cffe6e8e1cb1c5019ee91c47c1..d22df12584f996ded6810581c24db785d82024d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SCSI_TRANSPORT_SRP_H
 #define SCSI_TRANSPORT_SRP_H
 
index 24ede474752eb7a35aa261e876458e2cca878bcd..57c7292545692bd6dae6caffac3b0f3de827630e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * scsicam.h - SCSI CAM support functions, use for HDIO_GETGEO, etc.
  *
index 20bc71c3e0b81acf07af84fea30d6b530427bb70..f91bcca604e444d259d3814ad92f5d882747bf27 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SCSI_GENERIC_H
 #define _SCSI_GENERIC_H
 
index ee639d355ef06d4be03008de094df5590271df61..6ebbd4223f127f5e971b210e893903db37a5f9df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ACI_H_
 #define _ACI_H_
 
index 422c97d43df3dd78eec9d1d4c5ecb6a6c300709c..0ebb0f6fce54f3321b0c76e1ba75866f16360ed2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _INCLUDE_SOUND_ALC5623_H
 #define _INCLUDE_SOUND_ALC5623_H
 struct alc5623_platform_data {
index bd7246de58e7c4d0cdca0cbd233aece13a311b35..a1f1152bc687613b87d7d4a1f73a3d139ef9f354 100644 (file)
@@ -248,6 +248,9 @@ int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
                             void *private_data);
 void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only);
 #define snd_ctl_sync_vmaster_hook(kctl)        snd_ctl_sync_vmaster(kctl, true)
+int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
+                                int (*func)(struct snd_kcontrol *, void *),
+                                void *arg);
 
 /*
  * Helper functions for jack-detection controls
index babd445c75051fbaa9c18b337d897c75d676e237..e508f319229454c2ad59a8c4516ec04764ee689d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * For multichannel support
  */
index 5ab972e116ecf6690b766bf4cecf437adaa8dd3f..a94f5b6f92ac6bba9476b594d38da22a5a86a8a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HD-Audio helpers to sync with i915 driver
  */
index 15fc6daf909657ac7237c896cbc2de9b4ff04b18..2ab39fb52d7a122b622a033361c647fbac4f14b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HD-audio controller (Azalia) registers and helpers
  *
index ca64f0f50b4533df080a2daa6b1cba2fdf5f0a12..5141f8ffbb12bb150b1148750f93f341beef147c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HD-audio regmap helpers
  */
index d0509db6d0ec56b8034388dcf1d3492c2dd7955e..2a8573a00ea60d4b1b5606e7504b100f53757e46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HD-audio codec verbs
  */
@@ -95,6 +96,7 @@ enum {
 #define AC_VERB_SET_EAPD_BTLENABLE             0x70c
 #define AC_VERB_SET_DIGI_CONVERT_1             0x70d
 #define AC_VERB_SET_DIGI_CONVERT_2             0x70e
+#define AC_VERB_SET_DIGI_CONVERT_3             0x73e
 #define AC_VERB_SET_VOLUME_KNOB_CONTROL                0x70f
 #define AC_VERB_SET_GPIO_DATA                  0x715
 #define AC_VERB_SET_GPIO_MASK                  0x716
index 96546b30e90075f394ed5e8be608ddeb1bec519c..d8afd8a5bd76fa6ee65c5079964c144ecf316d57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * HD-audio core stuff
  */
index 8660a7f10851bfe18815165ab10acad0197e6ed4..ca00130cb0281d6fb9cc472ac0d163490f0a1cb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_HDAUDIO_EXT_H
 #define __SOUND_HDAUDIO_EXT_H
 
index 1471da22adad7a8539bba87c4befc55562f4b0ad..b6f58072237a7eb56d001aba354e1a7eb28a5f05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _L3_H_
 #define _L3_H_ 1
 
index 93357b25d2e275ad03853cd8cd4cfb2add24e5e9..28a55a8beb287ca3b4fbdd945982df3e24544c9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_PCM_DRM_ELD_H
 #define __SOUND_PCM_DRM_ELD_H
 
index 36f023acb201efef62fabd2debcb56cb8b7e1691..0939aa45e2fe3f0ba1d1a4f3321d3e3473da7787 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_PCM_IEC958_H
 #define __SOUND_PCM_IEC958_H
 
index 6ef629bde164c19ebb675e506fec7d98715d4956..5e710d848bd33262bb67100ce4b0e58a3d61d4a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PXA2XX_LIB_H
 #define PXA2XX_LIB_H
 
index ffaf1f098c8e4967eaac91e64af924e8d683cbff..0232b80ff486f2743bb331f70ee8fccba6ed5b93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _S3C24XX_UDA134X_H_
 #define _S3C24XX_UDA134X_H_ 1
 
index a03acd0d398a433d0d93af683416e5eb1e0688e6..695257ae64acccc1df2fc68e8b93b2744d5c98e8 100644 (file)
@@ -60,6 +60,7 @@ struct snd_virmidi_dev {
        int port;                       /* created/attached port */
        unsigned int flags;             /* SNDRV_VIRMIDI_* */
        rwlock_t filelist_lock;
+       struct rw_semaphore filelist_sem;
        struct list_head filelist;
 };
 
index cd0bab1ef6f125f016cc6e4c6d06eeec0b563fb9..6231eb57361f684f05a257d288db738f5e598330 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_SND_WAVEFRONT_H__
 #define __SOUND_SND_WAVEFRONT_H__
 
diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h
new file mode 100644 (file)
index 0000000..1a9191c
--- /dev/null
@@ -0,0 +1,32 @@
+
+/*
+ * Copyright (C) 2017, Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __LINUX_SND_SOC_ACPI_INTEL_MATCH_H
+#define __LINUX_SND_SOC_ACPI_INTEL_MATCH_H
+
+#include <linux/stddef.h>
+#include <linux/acpi.h>
+
+/*
+ * these tables are not constants, some fields can be used for
+ * pdata or machine ops
+ */
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[];
+
+#endif
diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
new file mode 100644 (file)
index 0000000..a7d8d33
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2013-15, Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version
+ * 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef __LINUX_SND_SOC_ACPI_H
+#define __LINUX_SND_SOC_ACPI_H
+
+#include <linux/stddef.h>
+#include <linux/acpi.h>
+
+struct snd_soc_acpi_package_context {
+       char *name;           /* package name */
+       int length;           /* number of elements */
+       struct acpi_buffer *format;
+       struct acpi_buffer *state;
+       bool data_valid;
+};
+
+#if IS_ENABLED(CONFIG_ACPI)
+/* translation fron HID to I2C name, needed for DAI codec_name */
+const char *snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]);
+bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
+                                   struct snd_soc_acpi_package_context *ctx);
+#else
+static inline const char *
+snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
+{
+       return NULL;
+}
+static inline bool
+snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
+                                  struct snd_soc_acpi_package_context *ctx)
+{
+       return false;
+}
+#endif
+
+/* acpi match */
+struct snd_soc_acpi_mach *
+snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines);
+
+/* acpi check hid */
+bool snd_soc_acpi_check_hid(const u8 hid[ACPI_ID_LEN]);
+
+/**
+ * snd_soc_acpi_mach: ACPI-based machine descriptor. Most of the fields are
+ * related to the hardware, except for the firmware and topology file names.
+ * A platform supported by legacy and Sound Open Firmware (SOF) would expose
+ * all firmware/topology related fields.
+ *
+ * @id: ACPI ID (usually the codec's) used to find a matching machine driver.
+ * @drv_name: machine driver name
+ * @fw_filename: firmware file name. Used when SOF is not enabled.
+ * @board: board name
+ * @machine_quirk: pointer to quirk, usually based on DMI information when
+ * ACPI ID alone is not sufficient, wrong or misleading
+ * @quirk_data: data used to uniquely identify a machine, usually a list of
+ * audio codecs whose presence if checked with ACPI
+ * @pdata: intended for platform data or machine specific-ops. This structure
+ *  is not constant since this field may be updated at run-time
+ * @sof_fw_filename: Sound Open Firmware file name, if enabled
+ * @sof_tplg_filename: Sound Open Firmware topology file name, if enabled
+ * @asoc_plat_name: ASoC platform name, used for binding machine drivers
+ * if non NULL
+ * @new_mach_data: machine driver private data fixup
+ */
+/* Descriptor for SST ASoC machine driver */
+struct snd_soc_acpi_mach {
+       const u8 id[ACPI_ID_LEN];
+       const char *drv_name;
+       const char *fw_filename;
+       const char *board;
+       struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
+       const void *quirk_data;
+       void *pdata;
+       const char *sof_fw_filename;
+       const char *sof_tplg_filename;
+       const char *asoc_plat_name;
+       struct platform_device * (*new_mach_data)(void *pdata);
+};
+
+#define SND_SOC_ACPI_MAX_CODECS 3
+
+/**
+ * struct snd_soc_acpi_codecs: Structure to hold secondary codec information
+ * apart from the matched one, this data will be passed to the quirk function
+ * to match with the ACPI detected devices
+ *
+ * @num_codecs: number of secondary codecs used in the platform
+ * @codecs: holds the codec IDs
+ *
+ */
+struct snd_soc_acpi_codecs {
+       int num_codecs;
+       u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN];
+};
+
+/* check all codecs */
+struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg);
+
+#endif
index d22de9712c451d67a9ee068ab8001589f55901bd..1a7323238c495d7d51313f6ccd8780291ff3e9e5 100644 (file)
@@ -468,6 +468,11 @@ int snd_soc_register_codec(struct device *dev,
                const struct snd_soc_codec_driver *codec_drv,
                struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_codec(struct device *dev);
+int snd_soc_add_component(struct device *dev,
+               struct snd_soc_component *component,
+               const struct snd_soc_component_driver *component_driver,
+               struct snd_soc_dai_driver *dai_drv,
+               int num_dai);
 int snd_soc_register_component(struct device *dev,
                         const struct snd_soc_component_driver *component_driver,
                         struct snd_soc_dai_driver *dai_drv, int num_dai);
@@ -475,6 +480,8 @@ int devm_snd_soc_register_component(struct device *dev,
                         const struct snd_soc_component_driver *component_driver,
                         struct snd_soc_dai_driver *dai_drv, int num_dai);
 void snd_soc_unregister_component(struct device *dev);
+struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
+                                                  const char *driver_name);
 int snd_soc_cache_init(struct snd_soc_codec *codec);
 int snd_soc_cache_exit(struct snd_soc_codec *codec);
 
@@ -795,6 +802,10 @@ struct snd_soc_component_driver {
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
 
+       /* pcm creation and destruction */
+       int (*pcm_new)(struct snd_soc_pcm_runtime *);
+       void (*pcm_free)(struct snd_pcm *);
+
        /* component wide operations */
        int (*set_sysclk)(struct snd_soc_component *component,
                          int clk_id, int source, unsigned int freq, int dir);
@@ -812,10 +823,22 @@ struct snd_soc_component_driver {
        void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
                int subseq);
        int (*stream_event)(struct snd_soc_component *, int event);
+       int (*set_bias_level)(struct snd_soc_component *component,
+                             enum snd_soc_bias_level level);
+
+       const struct snd_pcm_ops *ops;
+       const struct snd_compr_ops *compr_ops;
 
        /* probe ordering - for components with runtime dependencies */
        int probe_order;
        int remove_order;
+
+       /* bits */
+       unsigned int idle_bias_on:1;
+       unsigned int suspend_bias_off:1;
+       unsigned int pmdown_time:1; /* care pmdown_time at stop */
+       unsigned int endianness:1;
+       unsigned int non_legacy_dai_naming:1;
 };
 
 struct snd_soc_component {
@@ -872,6 +895,8 @@ struct snd_soc_component {
        void (*remove)(struct snd_soc_component *);
        int (*suspend)(struct snd_soc_component *);
        int (*resume)(struct snd_soc_component *);
+       int (*pcm_new)(struct snd_soc_component *, struct snd_soc_pcm_runtime *);
+       void (*pcm_free)(struct snd_soc_component *, struct snd_pcm *);
 
        int (*set_sysclk)(struct snd_soc_component *component,
                          int clk_id, int source, unsigned int freq, int dir);
@@ -879,6 +904,8 @@ struct snd_soc_component {
                       int source, unsigned int freq_in, unsigned int freq_out);
        int (*set_jack)(struct snd_soc_component *component,
                        struct snd_soc_jack *jack,  void *data);
+       int (*set_bias_level)(struct snd_soc_component *component,
+                             enum snd_soc_bias_level level);
 
        /* machine specific init */
        int (*init)(struct snd_soc_component *component);
@@ -1412,6 +1439,21 @@ static inline void snd_soc_codec_init_bias_level(struct snd_soc_codec *codec,
        snd_soc_dapm_init_bias_level(snd_soc_codec_get_dapm(codec), level);
 }
 
+/**
+ * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level
+ * @component: The COMPONENT for which to initialize the DAPM bias level
+ * @level: The DAPM level to initialize to
+ *
+ * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level().
+ */
+static inline void
+snd_soc_component_init_bias_level(struct snd_soc_component *component,
+                                 enum snd_soc_bias_level level)
+{
+       snd_soc_dapm_init_bias_level(
+               snd_soc_component_get_dapm(component), level);
+}
+
 /**
  * snd_soc_dapm_get_bias_level() - Get current CODEC DAPM bias level
  * @codec: The CODEC for which to get the DAPM bias level
@@ -1424,6 +1466,19 @@ static inline enum snd_soc_bias_level snd_soc_codec_get_bias_level(
        return snd_soc_dapm_get_bias_level(snd_soc_codec_get_dapm(codec));
 }
 
+/**
+ * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level
+ * @component: The COMPONENT for which to get the DAPM bias level
+ *
+ * Returns: The current DAPM bias level of the COMPONENT.
+ */
+static inline enum snd_soc_bias_level
+snd_soc_component_get_bias_level(struct snd_soc_component *component)
+{
+       return snd_soc_dapm_get_bias_level(
+               snd_soc_component_get_dapm(component));
+}
+
 /**
  * snd_soc_codec_force_bias_level() - Set the CODEC DAPM bias level
  * @codec: The CODEC for which to set the level
@@ -1439,6 +1494,23 @@ static inline int snd_soc_codec_force_bias_level(struct snd_soc_codec *codec,
                level);
 }
 
+/**
+ * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level
+ * @component: The COMPONENT for which to set the level
+ * @level: The level to set to
+ *
+ * Forces the COMPONENT bias level to a specific state. See
+ * snd_soc_dapm_force_bias_level().
+ */
+static inline int
+snd_soc_component_force_bias_level(struct snd_soc_component *component,
+                                  enum snd_soc_bias_level level)
+{
+       return snd_soc_dapm_force_bias_level(
+               snd_soc_component_get_dapm(component),
+               level);
+}
+
 /**
  * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol
  * @kcontrol: The kcontrol
@@ -1452,6 +1524,19 @@ static inline struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(
        return snd_soc_dapm_to_codec(snd_soc_dapm_kcontrol_dapm(kcontrol));
 }
 
+/**
+ * snd_soc_dapm_kcontrol_component() - Returns the component associated to a kcontrol
+ * @kcontrol: The kcontrol
+ *
+ * This function must only be used on DAPM contexts that are known to be part of
+ * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined.
+ */
+static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
+       struct snd_kcontrol *kcontrol)
+{
+       return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
+}
+
 /* codec IO */
 unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
 int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,
@@ -1468,9 +1553,23 @@ static inline int snd_soc_cache_sync(struct snd_soc_codec *codec)
        return regcache_sync(codec->component.regmap);
 }
 
+/**
+ * snd_soc_component_cache_sync() - Sync the register cache with the hardware
+ * @component: COMPONENT to sync
+ *
+ * Note: This function will call regcache_sync()
+ */
+static inline int snd_soc_component_cache_sync(
+       struct snd_soc_component *component)
+{
+       return regcache_sync(component->regmap);
+}
+
 /* component IO */
 int snd_soc_component_read(struct snd_soc_component *component,
        unsigned int reg, unsigned int *val);
+unsigned int snd_soc_component_read32(struct snd_soc_component *component,
+                                     unsigned int reg);
 int snd_soc_component_write(struct snd_soc_component *component,
        unsigned int reg, unsigned int val);
 int snd_soc_component_update_bits(struct snd_soc_component *component,
@@ -1487,6 +1586,8 @@ int snd_soc_component_set_sysclk(struct snd_soc_component *component,
 int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
                              int source, unsigned int freq_in,
                              unsigned int freq_out);
+int snd_soc_component_set_jack(struct snd_soc_component *component,
+                              struct snd_soc_jack *jack, void *data);
 
 #ifdef CONFIG_REGMAP
 
@@ -1720,6 +1821,20 @@ struct snd_soc_dai *snd_soc_find_dai(
 
 #include <sound/soc-dai.h>
 
+static inline
+struct snd_soc_dai *snd_soc_card_get_codec_dai(struct snd_soc_card *card,
+                                              const char *dai_name)
+{
+       struct snd_soc_pcm_runtime *rtd;
+
+       list_for_each_entry(rtd, &card->rtd_list, list) {
+               if (!strcmp(rtd->codec_dai->name, dai_name))
+                       return rtd->codec_dai;
+       }
+
+       return NULL;
+}
+
 #ifdef CONFIG_DEBUG_FS
 extern struct dentry *snd_soc_debugfs_root;
 #endif
index aac481b7db8f15f2b9518495cf5b9ad2b6c7e75a..a0a1c380f3592895cf8b56e8ec62950b8f8b3aa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SND_SOC_CODEC_TAS5086_H_
 #define _SND_SOC_CODEC_TAS5086_H_
 
index fb87d32f5e513de3c2a1b7c6f402b5f48e401c45..cf5f3fff1f1a7cb9930753c8abd88347ee66d048 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_CORE_H
 #define ISCSI_TARGET_CORE_H
 
index c27dd471656dc2da4745516d47253b5d06285cf3..b77d579e3ecf37a4c0a597721069063afb5b3009 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ISCSI_TARGET_STAT_H
 #define ISCSI_TARGET_STAT_H
 
index ff1a4f4cd66d068d9fe74b5b1fc4a63e86a75b81..91948bc5b185fe67232d98d9332677715ecc2f40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "iscsi_target_core.h" /* struct iscsi_cmd */
 
 struct sockaddr_storage;
index e150e391878bebb77c77b553e523d2f956dde402..b6b3fb444a9204b6096fdd07d452c07f4d01ff3c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_BACKEND_H
 #define TARGET_CORE_BACKEND_H
 
index 516764febeb78c2c8cb2a34ce6c54aa10ff36c3f..f5db145e68ecae901ed071a70fe95db4045791b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_BASE_H
 #define TARGET_CORE_BASE_H
 
index 33d2e3e5773cf433a6908c5ba3c54385eed57de5..b297aa0d9651dd11f34d9dc6250fbab3a103df82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TARGET_CORE_FABRIC_H
 #define TARGET_CORE_FABRIC_H
 
index 6e3945f64102c275669fc3a0c21f910c3be7be03..d9e3d4aa3f6e3bc6a9fabc50457f30c7bb5f667a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Trace files that want to automate creation of all tracepoints defined
  * in their file should include this file. The following are macros that the
index 633ee9ee97782210e74618a89e3187f41920b48e..78c5608a1648d5cafe26b8f47dad6f5ae2616349 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM 9p
 
index ae4f358dd8e924831088bb05bceeb12c06b2d61c..13483c7ca70b3ddb35f715de4cb2830bf5d8ae85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM alarmtimer
 
index 9130dd5a184a25e7d6c6cf0b633d7d5c0c4fc0f6..ccd1a3bdff46e28bdd363822141d55522ca55543 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM asoc
 
index daf749138ff80c9fb6c12b1940168fa2f33cea7f..2cbd6e42ad835ea22941963b1443a814dcac4d40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM bcache
 
index 1fd7ff1a46f792d3a69a006e2406f86d87100cf3..81b43f5bdf237d3637880224972cc96a25f986e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM block
 
index 52c8425d144b349988a16366ab69d0366bd0c065..cc749d7099fbb5539cbf3c02274522a926a92cab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM bpf
 
index dc1d0df91e0b0ee193f6c0b58184fb1272cf1c70..32d0c1fe2bfa7d177ba63a1ca1613cd4f2144c0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM btrfs
 
index c226f50e88fa2a9bd6de5fd5621773a185744424..d74722c2ac8b18d02dc1c943937144f674212f52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM cgroup
 
index d7cd961720a73e63b48d58dfab6747b96a885385..5017a8829270ac56f5990f4694b317a65898316b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM cma
 
index 0a18ab6483ffefb6e650a5fa8a95fd77ea4808df..6074eff3d766d6bde63975a69df795e23b65bd79 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM compaction
 
index ce8007cf29cf41a104b1864152502178536264c4..0aa6fd68fdf9da26bafb81158f2fe2be1cb613de 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM context_tracking
 
index 996953db91d7dd9469634b8c9095b303cf7b7955..fe1d6e8cd99d29534a70b35eb2612b8a3d45e613 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM cpuhp
 
index 09f1df228f2ce8ce060817b2f80d3a21391371a5..44acfbca12661d817a26ed6b2955ccdbbc60a9bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if IS_ENABLED(CONFIG_NET_DEVLINK)
 
 #undef TRACE_SYSTEM
index 1157cb4c3c6f0c48ce0fd162036cc8935f928727..d61bfddcc621f16ac4ca4a85348c483bf3f30d44 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM dma_fence
 
index 9c3bc3883d2fac1fbd4683d9eb4efbd74282f5c6..4d0e3af4e56174192c3d70a8e698e1b11b89c3b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM ext4
 
index 5d216f7fb05ae05337dde54bfcb8a4e2dcd2983b..7ab40491485bc0b9604aa07fae9fa4a3575509e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM f2fs
 
index 833cfcb6750defa6ba5045102382eef38e7cc99b..81b7e985bb45a2fc26996a4a024cf002eca5bc23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM fib
 
index d60096cddb2a6e0e40961c5a078c14c8f848e529..d46e247027652d4d17a3ce52ba8479b5337cd4f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM fib6
 
index 63a7680347cb4b05b580900a931d9c0742a7a1cd..d1faf3597b9d0a6f54954b27d74ab010a9135aa0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Events for filesystem locks
  *
index ff91325b81239b6e786215fa3a1feb7f78528566..ee05db7ee8d22597899253f45c269ef4ce840de9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM filemap
 
index fbc4a06f7310a0d04fdfbd702d94663edcc04b56..8a8df5423dca8776e595dcd64642a27514a95ced 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM fs_dax
 
index 697ee66788924ad842fd6a565e2ed79d0054fbb1..92e5e89e52edd23551942219a1146f92faea07aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM fsi
index 11b36c119048766c153b2aed3177b08081fb2d09..f95cf3264bf916d24f31c338db5e0262f4c9724b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM fsi_master_gpio
index 2da73b92d47e9566f0d0148e966c398ab6bf8c40..5c189a22c48973a86502710a45886271fe631c21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM gpio
 
index 0f78bbb020029b1327a27413f1ee6ab3d1da04d3..939d7a09d73f4d135c500a2dd0443dd439f050f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM hswadsp
 
index 04f58acda8e851e5f23c4fa340a1d8819ee4abff..dd4db334bd63717d571851441ecd47786fd260da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM huge_memory
 
index edc24e6dea1bab8341b82cf27d42df57e55d29b5..0416e91f81817afbdf1e011a8dbc37db1158d217 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM intel-sst
 
index 92f7d5b23177555338fb90bd0756c2a2caf82e2b..e6d7ff55ee8cdcb9427d874e0e1e9e2ca13a8465 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM intel_ish
 
index 99254ed89212b0036c7afecb1fcd318d6cac3b8b..72b4582322ff501d75a580b36ce3e2528ad06f32 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * iommu trace points
  *
index 834a7362a610c45d803ea5146952f897f6a5df53..0be71dad6ec03a8659b0160b7b021e6c8d43d647 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM ipi
 
index 1c41b74581f725c8b3ce1afbdf8a37a5470aca39..eeceafaaea4c1ca74cf026a966c253331cd980d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM irq
 
index c1d1f3eb242d2738456af4e1bf1443b057030d6c..2310b259329fb53cf3f94417781c98f517facc1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM jbd2
 
index 6b2e154fd23a1bcaa21e07dc578644c7b910e5eb..285feeadac39fb7729d33c6118421d1a340e71ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kmem
 
index dcffedfac43109ae4c898bb57b3c161b49405e57..e4b0b8e099325f2801e4f3af168004c603c23794 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_MAIN_H
 
index 2fbbf990e4b33ea9e40113569e538ac1975de6ff..ab69434e2329e0545b6d32412e11cbc25b0ebf3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM libata
 
index 2821b86de63b9674d6ed3a68c7496f022b3cdff6..d7512129a324e5de49e1cafb8a7856a63324c989 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM lock
 
index 70f02149808c561fccb7dfd11d81051cfedfb944..1391ada0da3b95f4e73ae810ab11e51b69fcfae7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mce
 
index 00d85f5f54e48422671d263e0e092fa013c9e4f0..0f241cbe00aba8a993f1a749fc3fad83c5062909 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mdio
 
index 539b25a76111fc644e1103d744c53ebf78a8fb17..bcf4daccd6be8e564e8d8dd56c23cc76422d3bcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM migrate
 
index f30a99ac65b6a764da1a6b46f0dec2e82b174a64..200f731be557048c779691e3360018acbf4927c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM mmc
 
index fec6291a67036fb6d9b118f53850612e81ab3d54..648cbf60373683c34df11daf3f67bc130efb6ead 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/node.h>
 #include <linux/mmzone.h>
 #include <linux/compaction.h>
index 28c45997e451f4b2cbfcd3aabab15b3e41e13e45..097485c73c01d44a4aff950534e6207395a54eb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Because linux/module.h has tracepoints in the header, and ftrace.h
  * used to include this file, define_trace.h includes linux/module.h
index 0b9e5136a2a3a074dac3fa66bbc4ce4f07304eaf..f3a12566bed057143cbc966530f5df525043a67e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM napi
 
index 49cc7c3de25221f2e014c80f12189bb1edc3b946..9c886739246ae4e91d8369f4c690bccd56f27912 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM net
 
index c7805818fcc6cadfebd3eeeff33c9db08bc26abc..84ee31fc04cc77d9f0943ea7c867643105b86849 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM nilfs2
 
index da3ee96b8d035971c2acfbb99ea8c01fce262f9b..18e0411398ba27b6885932a6c2328adf76bd1f6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM nmi
 
index c3c19d47ae5e3a6c0616b5206f659a9640986aa5..26a11e4a2c361d21e550ea500df01ec3e10d791a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM oom
 
index 8738a78e6bf491a4691ed1dd232463ac78fb80fd..bf4c42e8d6a45bfa0fce9d1c96862c5f49591fb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM page_isolation
 
index 81001f8b0db4aa902d1ce4857977f1662fb020c1..5d2ea93956cec6955feba9317915368e61d6800e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM page_ref
 
index ce0803b8d05f340f42116c1f129d08a645344e23..8fd1babae761b901bc6627bb45e85f3631f4fa48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM pagemap
 
index ad34b1bae04751eff139ccade9868338963e0803..df112a64f6c9b4cf510bb974d39108e17617a3e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM percpu
 
index 54e3aad3280671da3ba8c085632b51cba929cb35..908977d69783b8e4ba1c1f775a5c51bc9f0befd7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM power
 
index f76dd4de625e35e32e3ea029d1ab36451e1d3444..e338810639b41e6368a59e6feb3b36540de71ab7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM power
 
index f350170059c6c274dc951fb7b550272c8bff4df9..13d405b2fd8bc6267a8a7483afee5334fd2d2af9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM printk
 
index 4684de344c5d96d7fb86260d37cadd3d7c76a1fe..0560dfc33f1c34d5f789e09ae54d33ad13d5e0f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM random
 
index e91ae1f2290de4288aa0f70336f8596a4b68f711..59d40c454aa0434478e213ebe7357fe64530dd4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM rcu
 
index 37502a7404b71b5dd7362f02149c852e24316427..b70583c32c08c98c7aa266a4dee5491a45e251bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM regulator
 
index 33f85b68c22c13b0a4492d2b81e180edd837886a..26927a560eabca1a880d9d031b610588bbb6e3ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM rpm
index ae1409ffe99a00817f02a2cc51771840712fc1c3..da10aa21bebc847bd1c71d1ffed177494bcb774e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM sched
 
@@ -114,7 +115,10 @@ static inline long __trace_sched_switch_state(bool preempt, struct task_struct *
         * Preemption ignores task state, therefore preempted tasks are always
         * RUNNING (we will not have dequeued if state != RUNNING).
         */
-       return preempt ? TASK_RUNNING | TASK_STATE_MAX : p->state;
+       if (preempt)
+               return TASK_STATE_MAX;
+
+       return __get_task_state(p);
 }
 #endif /* CREATE_TRACE_POINTS */
 
@@ -152,12 +156,14 @@ TRACE_EVENT(sched_switch,
 
        TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
                __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
-               __entry->prev_state & (TASK_STATE_MAX-1) ?
-                 __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
-                               { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
-                               { 16, "Z" }, { 32, "X" }, { 64, "x" },
-                               { 128, "K" }, { 256, "W" }, { 512, "P" },
-                               { 1024, "N" }) : "R",
+
+               (__entry->prev_state & (TASK_REPORT_MAX - 1)) ?
+                 __print_flags(__entry->prev_state & (TASK_REPORT_MAX - 1), "|",
+                               { 0x01, "S" }, { 0x02, "D" }, { 0x04, "T" },
+                               { 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" },
+                               { 0x40, "P" }, { 0x80, "I" }) :
+                 "R",
+
                __entry->prev_state & TASK_STATE_MAX ? "+" : "",
                __entry->next_comm, __entry->next_pid, __entry->next_prio)
 );
index 9a9b3e2550af87e1d8ad2e38a2a700e90c13aa16..f624969a4f14a34e15b195ef72f013953b8a2970 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM scsi
 
index 39a8a430d90f289b98dd40b360fbfc3056a03d53..86582923d51c92852202dbb3f65dbedb7dbb29eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM signal
 
index 0c68ae22da22f6acefae7ef346d11e0bec42c533..9e92f22eb086c2b89b58d2fd9a37fe9ffc09edd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM skb
 
index 779abb91df81032e28e0249b0d1947d35ac7d492..6d31c0520ef36f89af825acebedfa5dabcaa6f6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM sock
 
index f9f702b6ae2e925ee756a653b19353d52960e078..277bb9d257793c2b7ccfdbd0d48dc38f19c0f71d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM spi
 
index 62f005ef4c7e5964e177cac880675597644cfb25..8b60efe18ba687679565cf9b354f7b5c3ed3db41 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM spmi
 
index 8a707f8a41c3df76b682032cf180eda869a49e1d..25a7739514cd8494409797cfd940764804d8219b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM sunrpc
 
index eb080b267e553c321c68659d042507d904d99894..8d444f1bb10da1a0cb02d3f176e42a5ef4eb024b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM sunvnet
 
index 288c0c54a2b4ace63a94549c136fe255e2982089..705be43b71ab06fff70a449f37bff840abbfac28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM swiotlb
 
index b35533b9427719c3ddcd2c776a20f52d5465aea0..44a3259ed4a5bde50e231a982624b0893e5bb0eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM raw_syscalls
 #undef TRACE_INCLUDE_FILE
index 50fea660c0f89cfd325f6c3c22bf108d534468de..914a872dd34351b8f3bf25cbf4d87c4c9e74e6c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM target
 
index 2cca6cd342d897f90269cf1542df40d4a1858a18..64d160930b0dcb1f0fc9ae510b6610fd64c30d1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM task
 
index 6cde5b3514c2793cbaaffd3420c7217feafbad7a..466c09d882ad3e928447f687b39bebb139f0821f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM thermal
 
index 5afae8fe37951dcb3027d3b80eb8f0aaf3c6afc6..1c8fb95544f93c87e93e68ef3c4ad49905f19556 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM thermal_power_allocator
 
index b59b065e9e5d4252b09eb1366c76d33b26d5fc9e..d7fbbe551841541bd1bbaad2889436e624f0db47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM thp
 
index 80787eafba99f485f4dd5f32dc72e0e7902dd5a1..16e305e69f34ddf1d9a9ed87d70f7e716e052707 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM timer
 
index 9d14b199210832091b3bfc314c019cf918070005..b4d8e7dc38f880d0fe955c59543319edb7d186b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM tlb
 
index a664bb9409730ef872858900e9de461ba1d8ebe6..336fe272889f59c5fe59cda70f0b5a1bff526c97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM udp
 
index b3a85b3df53e4eb0fd4dc62219a99c7dac42e01e..83860de120e30fc9e9464263666f22d2dbc8322d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM v4l2
 
index c1a22416ed0551b36f0467d320d511c8eb95dbf5..a40146dea83d18dbd86bc61822c682d5d65beb40 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM vb2
 
index 27e8a5c775797d4f6bdbc142f44c491e9c8436dd..dc23cf03240348f54df97966bf9372d2684bc249 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM vmscan
 
index b7f1d62782801c40d39d3e7adf97b588a6148ad8..6782213778be96c25745519879168003ceaaa198 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM vsock
 
index 3c518e455680abdacbce8710f38014b75846224f..b048694070e2c20c8a02dc99bc0070e20e02ad02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM wbt
 
index bf0e18ba6cfb0d062b5c0b15a98dff854a5d2ad9..2f057a494d93180dd0e3543b8c43ff7c4de5f629 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM workqueue
 
index 9b57f014d79d033336d7dc63a00972e5e9535230..2e1fa7910306d794abfabf23223d37206cb2e6b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM writeback
 
index 4e16c43fba10ab7ce958582b0b6771473dbe926a..810e94160c12a135c8c3242dd3b161adc3a76a26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM xdp
 
index 1b4fed72f573800c0839eedc4aaa1ca642a2ada0..a7c8b452aab9c7fefaa3908a31d00214b24d5717 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM xen
 
index 04fe68bbe7679f48ef5e58b883b7780a5b6fbbfd..e4b2498216844e2d6ffde7f081ff944191073602 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #undef TRACE_SYSTEM_VAR
 
index 7434f0f5d3f685e881c4f6d239abf9d5d36b743e..dc8ac27d27c1fa987a7c1bcc9ed543f06fd6800d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TRACE_SYSCALL_H
 #define _TRACE_SYSCALL_H
 
index 3976fa1f6e42b91191391a72fb2fe51e4fc6512b..bfda803b0a09319f02156958c40973a978ceba2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Stage 1 of the trace events.
  *
index 23e6c416b85fc14e67470ee46e0b6b4f42f2820e..693d9a40eb7b029c12282527636372e936693204 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG
 #define _UAPI__ASM_GENERIC_BITS_PER_LONG
 
index 65115978510ff2a2a8f6cd3610007b844746be78..9653140bff92dd2ee5a261a66dfe6c5687c3e956 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_GENERIC_ERRNO_BASE_H
 #define _ASM_GENERIC_ERRNO_BASE_H
 
index 88e0914cf2d99795a889c2e7d9f75ba45732bb30..cf9c51ac49f97efd8d5aed07cf4fca2d9a368515 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_GENERIC_ERRNO_H
 #define _ASM_GENERIC_ERRNO_H
 
index e063effe0cc18f0976f01b49cb56c3aeac47bf69..9dc0bf0c5a6ee895edd0f9862923bbd86e4be808 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_GENERIC_FCNTL_H
 #define _ASM_GENERIC_FCNTL_H
 
index 978f21cae2f4c99c49da4d3b2eb79588bac9b431..ed8bcd99c34d78f428f4ab39b71ada031644e486 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * asm-generic/int-l64.h
  *
index a8658b2423baeeebe104a00fa983f11b95779d62..1ed06964257c384b9a8cb0df90a650d043f8f232 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * asm-generic/int-ll64.h
  *
index 749b32fe56236affb495e667db8b640963c206a7..a84f4db8a25050bf4c9fadeff7a881ab75283986 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_GENERIC_IOCTL_H
 #define _UAPI_ASM_GENERIC_IOCTL_H
 
index 14baf9f23a14b952e76e9d4aaa7030e53e5092ed..040651735662983693d51f5645f311f128fe63f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_IOCTLS_H
 #define __ASM_GENERIC_IOCTLS_H
 
index 3dbcc1e771c03509a3c48906c2f7885416d7ec04..7d80dbd336fb926dddc44e42a9b4b8becc07872c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_IPCBUF_H
 #define __ASM_GENERIC_IPCBUF_H
 
index 203268f9231e155d72307995989feab4857defe7..6d319c46fd903436b4d444237ef6a226a393c214 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_MMAN_COMMON_H
 #define __ASM_GENERIC_MMAN_COMMON_H
 
index 7162cd4cca737b5e92e873e31f2c2a3bf50e3029..2dffcbf705b37857d9289dedd2e5807322382984 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_MMAN_H
 #define __ASM_GENERIC_MMAN_H
 
index f55ecc43c60fa6124839c5315a5836093a446ceb..fb306ebdb36f29f405aff9a42b63c615a1a9be0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_MSGBUF_H
 #define __ASM_GENERIC_MSGBUF_H
 
index 5becc84396b8201eeffb6e31126bc546881f5200..baad02ea7f93686ebb6282b968e66aa5c94f5576 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_GENERIC_PARAM_H
 #define _UAPI__ASM_GENERIC_PARAM_H
 
index a9694982689f057bf1ffc6c91efe203792f381ad..fefb3d2c3facfbb068ce7aff2d131b9458605138 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_POLL_H
 #define __ASM_GENERIC_POLL_H
 
index fe74fccf18db75742d240151ec358049861b7406..5e6ea22bd525ff1772ef278d40f5baa350e8387b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_POSIX_TYPES_H
 #define __ASM_GENERIC_POSIX_TYPES_H
 
index c6d10af50123e1c5810aff634400e8c273949221..f12db7a0da643b6488391c955644b8321a707358 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_GENERIC_RESOURCE_H
 #define _UAPI_ASM_GENERIC_RESOURCE_H
 
index 4cb2c13e509075fb40f89cd6724eca229a7b7b4c..cbf9cfe977d605865820d94fe3928077891c6484 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SEMBUF_H
 #define __ASM_GENERIC_SEMBUF_H
 
index 6fc26a51003c32d5e47f6a40bb12f2d4a62e8079..88ac5100df3598f23a7b0159fa91d9f29a24f3da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SETUP_H
 #define __ASM_GENERIC_SETUP_H
 
index 7e9fb2f0853bc0c7544173cd3874586818a46406..2b6c3bb97f9727c7def20ce599abda0f8686c4f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
index 51a3852de7336ba5c930bc9e8eb7f504cc4bc1af..8b78c0ba08b1f4a2326e677827b7e6d95ab39d9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SHMPARAM_H
 #define __ASM_GENERIC_SHMPARAM_H
 
index e5aa6794cea465a69d09b0bae663673365b67909..e447283b8f5225a9f2f365ca1037f977e1d69c7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_GENERIC_SIGINFO_H
 #define _UAPI_ASM_GENERIC_SIGINFO_H
 
index 00f95df5429700a2780062811b712d0e971694d8..e9304c95ceea2a0898d797a2e522219d2e0ef3dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SIGNAL_DEFS_H
 #define __ASM_GENERIC_SIGNAL_DEFS_H
 
index 3094618d382f4d661dd14f9ceb4f4180a8f2c39d..5c716a952cbe34639334ff1745de70bd6a68d54b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__ASM_GENERIC_SIGNAL_H
 #define _UAPI__ASM_GENERIC_SIGNAL_H
 
index e47c9e4362216e96482bde07acb12c9db4703e58..0ae758c90e546b84ff503f8aa1a84809454eccd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SOCKET_H
 #define __ASM_GENERIC_SOCKET_H
 
index 9a61a369b901b2335d9d88d5730496ba32a64ba2..64f658c7cec2a90710394ca8b827bfe257bebc2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_SOCKIOS_H
 #define __ASM_GENERIC_SOCKIOS_H
 
index bd8cad21998e0e41ac88435b55ae9f3d275c0283..0d962ecd166383af34d90d3520d5c6a2dc2ab18a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_STAT_H
 #define __ASM_GENERIC_STAT_H
 
index cb89cc730f0ba159bcb195679bdf84327e9ee672..bd35c7619ca2a672a431d1cf4f8dc29867aca84f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_GENERIC_STATFS_H
 #define _UAPI_GENERIC_STATFS_H
 
index a8e9029d9eba6bd87e0a08cd4bfcb78f3f177dc3..f2da4e4fd4d129c43f904c5f1b6234036b57cc77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_GENERIC_SWAB_H
 #define _ASM_GENERIC_SWAB_H
 
index 232b4781aef311f6eaf1885f0de5768a8517584e..2fbaf9ae89dd9ea3de5b59b55b9d36c736036502 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_TERMBITS_H
 #define __ASM_GENERIC_TERMBITS_H
 
index 088176062133e9bd32aec35ac50c90bf01644268..cf892933a363d89154c25bb91f08252891be3cd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_GENERIC_TERMIOS_H
 #define _UAPI_ASM_GENERIC_TERMIOS_H
 /*
index a3877926b0d45ea26b3026ecdeafbe8979c76961..dfaa50d99d8f3f2b1d78d47c9b2ba7e98d3b3f5a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_GENERIC_TYPES_H
 #define _ASM_GENERIC_TYPES_H
 /*
index ad77343e8a9a3f9bd8184bfdb23273294444040b..351868a7216816291805ed45633e51589767ad6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_UCONTEXT_H
 #define __ASM_GENERIC_UCONTEXT_H
 
index 061185a5eb51390c68edd38f09ea55284df8ae88..8b87de067bc7db613ddb448467b7acfcda8e2731 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm/bitsperlong.h>
 
 /*
index 0cb932416cfea4ac5f24e319bd883cace23ea08b..af1c14c837c5af256ea89e1086d25861cf46970e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 Russell King
  *  With inspiration from the i915 driver
index 76f6f78a352bac46627025769c4e116529d62167..d4463f3fa42743b75fcd74bc3b9c4f8aafb29ae0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2015 Etnaviv Project
  *
index cb3e9f9d029f85f39cbcc3a41b8bef9bd445f56b..d01087b2a651a2908ccfe4091f4815482cf8368d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* exynos_drm.h
  *
  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
index 6e6cf86b75b0f3bb5e8830ef88c2f8cf4fc96a05..d285d5e72e6ae37b104e6508b34666699dd5f012 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _I810_DRM_H_
 #define _I810_DRM_H_
 
index fd5e3ea53f2b63bd212d5db96ed0583094a372c2..1fccffef9e27297e61f59f092c809485f9fb507f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/uapi/drm/omap_drm.h
  *
index 295cd3ef633049cfc5baf00a2668da89e9ffc580..5fafde3798e57cd6bd05b34e9831de392432ea04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__A_OUT_GNU_H__
 #define _UAPI__A_OUT_GNU_H__
 
index df2f9a0bba6ab78ad93f8ceb7aa240bf6cf329ec..0e72172cd23a380234a2e6586dd697e9bdb0029b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  BSD Process Accounting for Linux - Definitions
  *
index 0ea1075fc4a0cb4b0f8bbb2eed10708d0c295606..12b6db148ea9449a0c4f4cde3a7fae29998abcb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for ADB (Apple Desktop Bus) support.
  */
index a1bf43754dddc2061e2189b3f4795ed2b2efa6f9..151d93e27ed4195bde237539ccb755575dfb4901 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ADFS_FS_H
 #define _UAPI_ADFS_FS_H
 
index f1b948c1f5925fd9c495ea0174295021b581cbb6..5e2fb8481252a6e20e5d0b62cfd412e8f932dd9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef        AFFS_HARDBLOCKS_H
 #define        AFFS_HARDBLOCKS_H
 
index d75774317b9b43288ba218b99084fbdda62e1309..beae3521ca91b47d0b88305388838206f83687ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2013 - 2014 Texas Instruments, Inc.
  *
index 84a9a0944e13501e3db7de994a2124e92d88f492..bfaec6903b8bca4b4091a53010dd50e3efeea893 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2008 Google, Inc.
  *
index df79bca1b8987474aadc7f389d2f39b2068665c0..37ee11dba94c85261c7bc0d6bfc38ffefd1c3f10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Include file for the interface to an APM BIOS
  * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
index 721e7654daeb34e142f5971bc2132b8d7e413120..7a9008b365df70f00777d83c761b0924f2193cd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_ARCFB_H__
 #define __LINUX_ARCFB_H__
 
index c328c976c684cb0b5add21c26de7c96c273dc787..53abffcde3c62b49c615b36f483293cf4b49272a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2017 IBM Corp.
  *
index 4bcd596e6388b21a29bc09a80e3c1bad11db1bd9..8b96460b46b181cee0e8dd220f9b75b737f08eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_ATALK_H__
 #define _UAPI__LINUX_ATALK_H__
 
index 88399db602ace8b5a9f98f43ee3e78dd1b9060e1..95ebdcf4fe88796e7c305862ada202115548ffc8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm.h - general ATM declarations */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 34f317972551f6b2377a86e08c56b7968a64b0c8..cf5bfd1a26914f92ab2e72bce77299974e1e99af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm_eni.h - Driver-specific declarations of the ENI driver (for use by
               driver-specific utilities) */
 
index 2a7713b597cf83027a4f603d88a3d718df57ca15..9f4b43293988aaf4fdd4f6b7f73e87a58fe44bd6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm_he.h */
 
 #ifndef LINUX_ATM_HE_H
index 8b724000aa50905baa68098991dc441ba3461f84..f0fd6912a14b3391a4fa9a129c75bbfaf2a75e9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm_idt77105.h - Driver-specific declarations of the IDT77105 driver (for
  * use by driver-specific utilities) */
 
index 577b79f33e8d6d85ba62ff3a942a5b2d6ad1c65c..880d368b5b9a9743a2f9a7edbd1eb78b0a8ffec6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /******************************************************************************
  *
  * atm_nicstar.h
index 914e821da64db86cf4db78b2e10fd702103ea23b..7309e1bc886796c9fd35a4ae99a400deec028841 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm_tcp.h - Driver-specific declarations of the ATMTCP driver (for use by
               driver-specific utilities) */
 
index 9c9c6ad55f1487b9b4cead653fc996930603b259..5135027b93c1c4e4cdfd84fdedbb7503cb39dd23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
                driver-specific utilities) */
 
index 8fe54d90d95b15ebeae963216e1be6e694674650..c9bf5c23a71f631af24c42224c456552e3d2d587 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmapi.h - ATM API user space/kernel compatibility */
  
 /* Written 1999,2000 by Werner Almesberger, EPFL ICA */
index 231f4bdec730e2df575f8a99f9f1906d3ac012fd..8e44d121fde1acb0e2cf38b360a1657464aae590 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmarp.h - ATM ARP protocol and kernel-demon interface definitions */
  
 /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
index fdb2629b61890b0326ef151e53eedc4bfbfad851..a9e2250cd7205a58350a9f08a1b4709f9746cdde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_ATMBR2684_H
 #define _LINUX_ATMBR2684_H
 
index 02c94c448dd65bced3fc5f1e581de6302dc3b69f..c818bb82b4e6a770147fc001c926275bd24b8464 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmclip.h - Classical IP over ATM */
  
 /* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
index 93e0ec008ca898cafff18b4b12c8e6308473654e..a5c15cf23bd78b7bca429783292cd293a9381078 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmdev.h - ATM device driver declarations and various related items */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 37f67aa8f1c1658c450dace374593f0fb97d07e5..cd7655e40c77a7a1efb04c4aa159e0df0639c976 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmioc.h - ranges for ATM-related ioctl numbers */
  
 /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
index 302791e3ab2bea3ca50fdcd4521986e92250b260..c68346bb40e6ac973c7d17a41cb23db627d1e847 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ATM Lan Emulation Daemon driver interface
  *
index 2aba5787fa63b7d8fb32acd830f5a1541782d8a7..cc17f43048391dc182b167765c1f12f4e9516521 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ATMMPC_H_
 #define _ATMMPC_H_
 
index 300dcce0c83f706a4a169502bd3432bcd6b21137..504b9989675b86107c4907c3dc0234d953997ea2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmppp.h - RFC2364 PPPoATM */
 
 /* Written 2000 by Mitchell Blank Jr */
index 799b104515d771ee06602943397137ac27117069..fc052481eae056c607c1f7a998c388681793a39f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmsap.h - ATM Service Access Point addressing definitions */
 
 /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
index aa71583b8da7489911f1fd492513c6450364678c..137b5f8534498b0a6f8f2c8dd63f8da1d581f1f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* atmsvc.h - ATM signaling kernel-demon interface definitions */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 0714a66f0e0cd6018758d991163b1de1f6326dd2..7668582db6ba2dd6302a17307886149c5930d552 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* audit.h -- Auditing support
  *
  * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
index 5558db8e6646bc4abb46471b129331e8d1862b90..374742651c30351dd002852cfa00e14dc7d8ff7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2008 Red Hat, Inc. All rights reserved.
  * Copyright 2008 Ian Kent <raven@themaw.net>
index aa63451ef20aacdf3677dca02b990a3e8e73cdc0..2a4432c7a4b4319bd04884353c80cf8cd04ff15d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *   Copyright 1997 Transmeta Corporation - All Rights Reserved
  *
index 9453e9a07c9d124fd31baf1868473fbb8fe218c2..1f608e27a06f932dcd1dbfdbf8832a923b741a3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy@goop.org>
  *
index 835c065cc7e17d4489729140df35aca1a2b4a45c..abe5f2b6581be7f1b484fb655d33bf1e73e3cac4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_AUXVEC_H
 #define _UAPI_LINUX_AUXVEC_H
 
index 74c89a41732dd08b1cb6b383c0eb500c1369336f..b496b9d8452ff29b7959964e386e33f6656b5c70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * These are the public elements of the Linux kernel AX.25 code. A similar
  * file netrom.h exists for the NET/ROM protocol.
index 713f712685d3d8ac4bf8ec2044a795e5dbb9656f..4ae6ac9950df2f5c20f8da0be73413335877fb42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: b1lli.h,v 1.8.8.3 2001/09/23 22:25:05 kai Exp $
  *
  * ISDN lowlevel-module for AVM B1-card.
index 81249e029dadb258e5194b26133b3ebb17bc7893..478cb565ae524c99cb480c160610e63140584d19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * The Linux BAYCOM driver for the Baycom serial 1200 baud modem
  * and the parallel 9600 baud modem
index e3bb0635e94ae238481fece501d33b9b6c0ed937..90fc490f973f9eb1c8a17d8c4eced4f12452de9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_BCACHE_H
 #define _LINUX_BCACHE_H
 
index d228218315499c0fa9113ea1befaf6bcde3952fc..f9fccf3c36547f46b70c807510ba9c167e0bbbd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Broadcom Cable Modem firmware format
  */
index 1c0b355aa51548174e2b7325c62ab8664d2ae3e3..73445ef07ddada2a20f7309baf9c1e832103f637 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     include/linux/bfs_fs.h - BFS data structures on disk.
  *     Copyright (C) 1999 Tigran Aivazian <tigran@veritas.com>
index 4eb5972867c0a0f477026d59d30eaf10d4eb271c..4abad03a88530574a5b07760b4e194d90eae54b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_BINFMTS_H
 #define _UAPI_LINUX_BINFMTS_H
 
index 63739a035085f9746389853a74839b4ad85aaf1a..ac6474e4f29d5aeb77f7dc2445108fcce2915f4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_BLKPG_H
 #define _UAPI__LINUX_BLKPG_H
 
index 9cdaedeadb84b96f627b7c4d2721a4551a23c6ca..20d1490d63773288d1d91130e96478ee7708bf26 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPIBLKTRACE_H
 #define _UAPIBLKTRACE_H
 
index 40d1d7bff5373e291e75069ddd51e3aede64cc12..e3c70fe6bf0fbb2c672d66e89f424bac513ce08a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Zoned block devices handling.
  *
index 43ab5c402f98f3c2dc15ccc49ec475530a39e401..30f2ce76b5170c8ea04f93a8f8f70f4633e4322b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
  *
  * This program is free software; you can redistribute it and/or
@@ -312,7 +313,7 @@ union bpf_attr {
  *     jump into another BPF program
  *     @ctx: context pointer passed to next program
  *     @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY
- *     @index: index inside array that selects specific program to run
+ *     @index: 32-bit index inside array that selects specific program to run
  *     Return: 0 on success or negative error
  *
  * int bpf_clone_redirect(skb, ifindex, flags)
@@ -575,7 +576,7 @@ union bpf_attr {
  *     @map: pointer to sockmap
  *     @key: key to lookup sock in map
  *     @flags: reserved for future use
- *     Return: SK_REDIRECT
+ *     Return: SK_PASS
  *
  * int bpf_sock_map_update(skops, map, key, flags)
  *     @skops: pointer to bpf_sock_ops
@@ -786,9 +787,8 @@ struct xdp_md {
 };
 
 enum sk_action {
-       SK_ABORTED = 0,
-       SK_DROP,
-       SK_REDIRECT,
+       SK_DROP = 0,
+       SK_PASS,
 };
 
 #define BPF_TAG_SIZE   8
index a5c220e0828f324fb5465deb022066b3bc01a97f..18be90725ab04a4a3fa2691d3eb57067778399d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_BPF_COMMON_H__
 #define _UAPI__LINUX_BPF_COMMON_H__
 
index 0674272598205c300e7f573e38dae6087de94429..af549d4ecf1b6e76522c6a157db98d48e4190b30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (c) 2016 Facebook
  *
  * This program is free software; you can redistribute it and/or
index 05865edaefdae02a0f997eb3bdcc82fd921fb9db..d1d63e2acdeb4cc0e5cb0ed1179650421c890e15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef        __BPQETHER_H
 #define        __BPQETHER_H
 
index 02986cf8b6f12c41f651f896f75b5cabe5f36925..cd6302def5ed720acec704bd811194f3254848a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPIBSG_H
 #define _UAPIBSG_H
 
index d9ec766a63d090de5bec3dfc17c9505b893e2bd5..2ffdccfccc1d3ebca977047dde4d883a97a1f5a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2015-2016, IBM Corporation.
  *
index 378230c163d5ecdf87a1d5062c8a431a7c9c5c45..6cdfd12cd14ccf811a97f5c6a4c584bb30a3e142 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007 Oracle.  All rights reserved.
  *
index 10689e1fdf11d1e232bb3e9dc572a693542dd7b3..8f659bb7badc79b3c2f1a94fa31edb884e3fc3a9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _BTRFS_CTREE_H_
 #define _BTRFS_CTREE_H_
 
index cdab17ab907c1af523c19eb451e490d8a7d9d046..2199adc6a6c20dfbde35e66da619464ef6b95782 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_BYTEORDER_BIG_ENDIAN_H
 #define _UAPI_LINUX_BYTEORDER_BIG_ENDIAN_H
 
index 4b93f2b260dd85e26753072b45c29804ce1e229f..601c904fd5cd92c860d91c01dcd4b21db963d072 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H
 #define _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H
 
index 586e9f98184fcbeadfaef358fc1da99c8d92a08b..10ec1d1cf68e0b0b3b51a2a0837f3fbb544a1d3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* linux/caif_socket.h
  * CAIF Definitions for CAIF socket and network layer
  * Copyright (C) ST-Ericsson AB 2010
index 7618aabe8c6bc0bfb137f06f0974062c5b83943d..74bca19403fa14fe628486b3cb13264dcc14f1a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) ST-Ericsson AB 2010
  * Author:     Sjur Brendeland
index c48d93a28d1acbb905b5d62cb2e8436c20ec8c7e..d7f97ac197a92b2960041ddf9474d74e4f13b9ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * linux/can.h
  *
index cefb304414ba2b01acb9bd87bcd264a15dfc5058..0fb328d931485fdf32587a3f3d2ddcd0ff6fc940 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * linux/can/bcm.h
  *
index 1c508be9687fc593dc4a5baee0e0e443ff4e8e71..bfc4b5d22a5e601107b887c0913d89d94a7ee664 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * linux/can/error.h
  *
index 5079b9d57e315c96e8efe75d6295141cc20f2930..7bee7a0b98001e2df0ca5a0689b75d56d3f29a28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * linux/can/gw.h
  *
index fdf75f74fdaf16424076e33ac4a188525b4b3a58..96710e76d5cedad034f540bed21c706b6ff3f3a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/can/netlink.h
  *
index 8735f1080385d045fff82660fd53c3a79dd98fc8..be3b36e7ff61743a07c901fbc23b557c9df530da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * linux/can/raw.h
  *
index ffb0b7156f7e030b9c65a0b5e96f931fa8187eea..066812d118a2cf8fc05807a79549bc78856e71c3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_CAN_VXCAN_H
 #define _UAPI_CAN_VXCAN_H
 
index 230e05d35191dafe5aa7dfdbc33a247e7e6bd51d..240fdb9a60f6851f4f129b2fbb1af5775841abcb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This is <linux/capability.h>
  *
index 7b145fd7afb6484aef91345274cebf91b5c0460b..31f946f8a88d9aabe3d5a56d657e4fb3b4354d20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: capi.h,v 1.4.6.1 2001/09/23 22:25:05 kai Exp $
  * 
  * CAPI 2.0 Interface for Linux
index 316b670d4e3354d7af46e7a7697ac16062306bcd..5cbdfe9933654d6b6429c8f0caaa1cc49afbd623 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef CCISS_DEFS_H
 #define CCISS_DEFS_H
 
index bb0b9ddf7eeb5df30a6e97ba89faf1edaf563e17..562230199461c47d1373c7c346215ffe33819cb3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPICCISS_IOCTLH
 #define _UAPICCISS_IOCTLH
 
index bd17ad5aa06d3d7f7f3c10777ab30b4da917a73c..2817230148fd20289b26dea86682240e74513241 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * -- <linux/cdrom.h>
  * General header file for linux CD-ROM drivers 
index 270b251a3d9b5edf4f74fbc518a7e10756899116..28e8a2a86e16653c647cb0acc1ce50f3e34f7f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * cec - HDMI Consumer Electronics Control message functions
  *
index 4351c3481aea19720c2c96130f3a642bb5bfb44d..c3114c989e91bb4cd7411243ad0e6b8172f979fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * cec - HDMI Consumer Electronics Control public header
  *
index 3753c33160d116ada0b86b74d786bd04db119039..aa306e4cd6c1f8ab2f7c82f24ba42c56be4ac957 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */
 /* cgroupstats.h - exporting per-cgroup statistics
  *
  * Copyright IBM Corporation, 2007
index d9bac7f97282e3596a5736be5614b606e5c09561..689fc93fafda061192df575199608a081f17fdfa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ioctl interface for the scsi media changer driver
  */
index d7e4c6ce61710fc61b9547ea5de4bb1dc738b7cc..69829205fdb5e8f388488466678261788dd15e9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  *   include/uapi/linux/cifs/cifs_mount.h
  *
index 1217f751a1bc9a3f129f5e97aae8a911a5a59616..c70a62ec8a49acc6ab504cb44f02387eeedf9790 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_CM4000_H_
 #define _UAPI_CM4000_H_
 
index f6c271035bbd2c5eb6deb10cf89b04b6fa0f710a..68ff254147005f5eab04a042f8f0e451287d1423 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */
 /*
  * cn_proc.h - process events connector
  *
index 79d05981fc4b0141b142be053a18616b3df867c1..aa6623efd2dd085e50b899285e1bc2c9a732a03e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__CODA_PSDEV_H
 #define _UAPI__CODA_PSDEV_H
 
index 6354a7fe22b20a53d88d0bead4524ea24a2b6cb0..e4a79f80b9a02f8f0ab866b103edff4865f5e68c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* This file is derived from the GAS 2.1.4 assembler control file.
    The GAS product is under the GNU General Public License, version 2 or later.
    As such, this file is also under that license.
index 4cb283505e457d002e3d3bffb33e1c9b7fb2357b..3738936149a2dc8c45a22df9a53059e12f31a6ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     connector.h
  * 
index c872bfd25e139115014764018072beb171dd23ad..92537757590aa94ec5d76c78d1fbf7c3fdb19de1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* const.h: Macros for dealing with constants.  */
 
 #ifndef _LINUX_CONST_H
index 7e4272cf1fb282f7a7dac2eaaa7018b134342606..aac550a52f801de068a707c9f649d31d469c2374 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UAPI_CORESIGHT_STM_H_
 #define __UAPI_CORESIGHT_STM_H_
 
index e4611a9b9243fbbdbb84067841323aeb68e1196d..5519504199e639ed261034b73c71ecfc48c3f83b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__CRAMFS_H
 #define _UAPI__CRAMFS_H
 
index fdcbb3c29083bb58531f8992bbdd47d5fa0fc23b..19bf0ca6d6353c41d4037c55c005078846ceabb7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Crypto user configuration API.
  *
index 286f9f10fce8623530370b7472d2e22c79d92232..28182557748d96fb896f0f03ace7d3eabab21744 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for talking to the CUDA.  The CUDA is a microcontroller
  * which controls the ADB, system power, RTC, and various other things.
index 12b587aa361c4225a8add0e37d34528d4b728f73..8279bc3d60ca05161e993be64bd55c9bd9661e18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Revision: 3.0 $$Date: 1998/11/02 14:20:59 $
  * linux/include/linux/cyclades.h
  *
index 032d26ed8384b2053f2851504d344d2a010ed0e1..51f541942ff905e4486f29f98e51abd403e6b9c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
 * cycx_cfm.h   Cyclom 2X WAN Link Driver.
 *              Definitions for the Cyclom 2X Firmware Module (CFM).
index 3ea470f35e4058e305ee2eef9e2256ff6e84e24f..b6170a6af7c24dac3f79f815e7ff70217d652f18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2008-2011, Intel Corporation.
  *
index 52a9cd7307e72fd838bf985add906455efe4965a..6e1978dbcf7c7fc332476cb62bd861dbd5f55818 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_DCCP_H
 #define _UAPI_LINUX_DCCP_H
 
index 0cbca96c66b9447cac9c69d6f5b72d4c27d739dd..6665df69e26ae435a4ccec681ee1e8c51ff3986c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * include/uapi/linux/devlink.h - Network physical device Netlink interface
  * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
index 1f73cc06168f7d78c59052241b3cf9279801c298..0d2eca28756762b4b56dc531842ccf8ad137bc85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /******************************************************************************
 *******************************************************************************
 **
index df56c8ff076986567912c1c8f3fd5ccd9374b8f7..f880d28311605cb941bbc53d94ff4921f88e35df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /******************************************************************************
 *******************************************************************************
 **
index ef1e2e08769a0ad35ee7072b4d7866858794ba80..5dc3a67d353d11917da7199475dabbe080f3fdc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007 Red Hat, Inc.  All rights reserved.
  *
index 6ae692c909cba1c52499b864103c9bad0736cffa..63b6c1fd91690be9c1c8c0a8cee96b85eda1be72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2005-2008 Red Hat, Inc.  All rights reserved.
  *
index 2857bdc5b27b871f11f1ee7fba6d16949b7cbe9f..a8ae47c32a374370f65a834af0522a7311cdf2ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /******************************************************************************
 *******************************************************************************
 **
index 412c06a624c83674e02f1d6669c4201d2a6c6e1b..14c44ec8b622291a2c96dea0f1685d6c5f8d05e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
  * Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved.
@@ -269,9 +270,9 @@ enum {
 #define DM_DEV_SET_GEOMETRY    _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
 
 #define DM_VERSION_MAJOR       4
-#define DM_VERSION_MINOR       36
+#define DM_VERSION_MINOR       37
 #define DM_VERSION_PATCHLEVEL  0
-#define DM_VERSION_EXTRA       "-ioctl (2017-06-09)"
+#define DM_VERSION_EXTRA       "-ioctl (2017-09-20)"
 
 /* Status bits */
 #define DM_READONLY_FLAG       (1 << 0) /* In/Out */
index 05e91e14c501a3e3328b202270fc724993e9fb08..5c47a860337654a760de92e0c2d654b8292e0732 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2006-2009 Red Hat, Inc.
  *
index fb0dedb7c1217e862e5d30e135b9deaa43f64e0b..d75df5210a4a597b844f20ab8bcca2da7ddf227b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Framework for buffer objects that can be shared across devices/subsystems.
  *
index 4295c745f342a8a5096ae851d4fad8c95823975e..36ca71bd8bbe233ed11fbbc9d76ad387122e1124 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_DN_H
 #define _LINUX_DN_H
 
index 11b3b31faf1483a46122a67e93b823182b768cb9..03d890b80ebc86f42917289f1822f3b14dc4768e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 1995-2001,2004 Silicon Graphics, Inc.  All Rights Reserved.
  *
index d47bccd604e446bca90d171fd0562844fb46bdd8..69f7a85d81b1ee44b2b53ccc9fbb61acda71d249 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * audio.h
  *
index cb150029fdffab2ece722f7a888ab286a0c310fd..dffa59e95ebbf2f4642720e67f01417c4aa95e9c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * ca.h
  *
index 4aa5f6a1815aa9729193651a4e32a6028261eb45..c10f1324b4ca54ba8ed6abb55ea7b75ad18ae155 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * dmx.h
  *
index 861cacd5711fe2dd8f3a63e1e9b44cd4a2f88edb..f46de499b51beaed9c5176410d766e52e26c3c22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * frontend.h
  *
index 89d805f9a5a6af24ffc2b29800891f631c3e2dec..0c550ef93f2c61be88bb26dd82569ae0e4a825e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * net.h
  *
index 880e68435832b9040de2ba943c68a1f1af3cf837..e163508b9ae8b47d7f35bff07452e8f1156e18fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * osd.h
  *
index e53e2ad4444f19fa06a35984f15819524c264706..02e32ea8398475cdc7cc6c35105340ad2ae52fbe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * version.h
  *
index c83d40b8a8a4037613e2d55cb0bf87fb5f58af28..4d51f98182bbfecbe68c090719c56ef2f4334a4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * video.h
  *
index 89240a04e4c8a1a1f0ea3e562b506759bfcf1fe6..0fe3e02aec653bc013bf2a2565011ea345258fb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/linux/edd.h
  *  Copyright (C) 2002, 2003, 2004 Dell Inc.
index a01be90c58ccfee4a0c78846c754d340c8d458ad..6bad29a10faa482a975a481f238f48a1c6212569 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * efs_fs_sb.h
  *
index 9cd1de954c0aca32718e3f3bd4c95f209cdeb0ae..31aa101783351547469f4efc67b0bb9c9e0f10f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_ELF_EM_H
 #define _LINUX_ELF_EM_H
 
index 3921e33aec8e36da1775c63a6ee4e2998faa313b..4fcc6cfebe185e197499a27daaf8deaff26b6241 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* elf-fdpic.h: FDPIC ELF load map
  *
  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
index b5280db9ef6a8c27f92ee89ffd0432df525e5039..c58627c0d6fb07843f8f50582708011b8f0b87d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_ELF_H
 #define _UAPI_LINUX_ELF_H
 
index 569737cfb55737ee7e63ad3c0088a911f0676616..0b2c9e16e34509da45d0441018e8229e1829fbb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_ELFCORE_H
 #define _UAPI_LINUX_ELFCORE_H
 
index 78fdf52d6b2fcbfad3a8e928807b9b8f86629851..dc64cfaf13da08564a8271e50a4edb89d221b148 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_ERRQUEUE_H
 #define _UAPI_LINUX_ERRQUEUE_H
 
index 9c041dae8e2ca70ee8bf72d734db67c6118096d1..ac71559314e731c079e2a2544290ff1200b3c40b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ethtool.h: Defines for Linux ethtool.
  *
@@ -1753,6 +1754,8 @@ enum ethtool_reset_flags {
  *     %ethtool_link_mode_bit_indices for the link modes, and other
  *     link features that the link partner advertised through
  *     autonegotiation; 0 if unknown or not applicable.  Read-only.
+ * @transceiver: Used to distinguish different possible PHY types,
+ *     reported consistently by PHYLIB.  Read-only.
  *
  * If autonegotiation is disabled, the speed and @duplex represent the
  * fixed link mode and are writable if the driver supports multiple
@@ -1804,7 +1807,9 @@ struct ethtool_link_settings {
        __u8    eth_tp_mdix;
        __u8    eth_tp_mdix_ctrl;
        __s8    link_mode_masks_nwords;
-       __u32   reserved[8];
+       __u8    transceiver;
+       __u8    reserved1[3];
+       __u32   reserved[7];
        __u32   link_mode_masks[0];
        /* layout of link_mode_masks fields:
         * __u32 map_supported[link_mode_masks_nwords];
index f4d5c998cc2bc0b941cc3218a7c512464f450790..63e21be30f150ce6742f76d81640e468c0a467eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  include/linux/eventpoll.h ( Efficient event polling implementation )
  *  Copyright (C) 2001,...,2006         Davide Libenzi
index e8e747139b9a1483897f8c4b0aa9e8b9f4a49588..0862b87434c2b5ab15ca419883759c1d866b5ef3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef FADVISE_H_INCLUDED
 #define FADVISE_H_INCLUDED
 
index b075f601919be12218726180837bc7b0d2eb4655..51398fa57f6cdf65747410a79da53f759eade553 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_FALLOC_H_
 #define _UAPI_FALLOC_H_
 
index 030508d195d30556c22b329b1f2aad528ef76358..f79c4e1a84b9a885e2eede852f74c0eeeea3f496 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FANOTIFY_H
 #define _UAPI_LINUX_FANOTIFY_H
 
index fb795c3b3c178ad3cd7c9e9e4547ffd492bac181..6cd9b198b7c64eb94821f2e3f2c5201e6c6d25eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FB_H
 #define _UAPI_LINUX_FB_H
 
index ec69d55bcec73974d4c44ef1d1555166f28d800f..6448cdd9a350d3a0c6513c7a76aad29a68689bd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FCNTL_H
 #define _UAPI_LINUX_FCNTL_H
 
index 84c517cbce902df6ba75be909c016b2da2fca3d5..90fb94712c41953bce04801efcf46f3006e5ba07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FD_H
 #define _UAPI_LINUX_FD_H
 
index 61ce64169004a84ba753321a8d7a988d3b768259..5e2981d5c523012842ea849b8a0f89b15e585331 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_FDREG_H
 #define _LINUX_FDREG_H
 /*
index bbf02a63a01133351ea49392f1bb06da13b4130d..2b642bf9b5a0ab492c06a4c82392200834059cd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_FIB_RULES_H
 #define __LINUX_FIB_RULES_H
 
index 0c51d617dae9cf131a8c5a009d0ecf3cac5da735..8c0bc24d5d95555754e6bfe56e0ba5543faa460d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * FS_IOC_FIEMAP ioctl infrastructure.
  *
index c97340e43dd6a3d1224c0fba7ee94e4320dd814d..13f5b65a888fb3729cb31f9b09242534765cef3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Linux Socket Filter Data Structures
  */
index 88cd6baba8f371046fff2258db1ae1019c54ed84..27e595e44fb71618eba02c4362ae05a4a948a2a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2002-2003  David McCullough <davidm@snapgear.com>
  * Copyright (C) 1998       Kenneth Albanowski <kjahds@kjahds.com>
index d2947c52dc670f817a661ad1c8ad7925c575c61a..f2ea833a2812561d7b10517a39e695589e8b236b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* fou.h - FOU Interface */
 
 #ifndef _UAPI_LINUX_FOU_H
index 56235dddea7d8674033f71fb85f3468234859d1a..4199f8acbce53f5aab600a03872fc896e370daf9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FS_H
 #define _UAPI_LINUX_FS_H
 
index 1bf04967fec4be6b084957672e1708b888c55f5d..1e237fba951fea70a2b02b5efbca449c7fc192fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * Freescale hypervisor ioctl and kernel interface
  *
index e5213c3e38b2104b28e3f6ea621dbdf757e8efa8..91fd519a3f7ddda7dd06c692377402fe83f77454 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * FS_IOC_GETFSMAP ioctl infrastructure.
  *
index 42fa977e3b14b3e1907fb650e7e9064b77bbeeb8..4b5001c57f4642d57559607e1398492f78bf998b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
     This file defines the kernel interface of FUSE
     Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
index 0b1f716373c71b31136a8be62068eed38862561c..a89eb0accd5e2ee527be1e3e11b1117ff5bf94b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FUTEX_H
 #define _UAPI_LINUX_FUTEX_H
 
index 49b29b068f405d155a06b910a815977c849a423f..8fb40b4930ac4d0aaa66d277eea0df17ad5bb99b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Copyright (c) 1999-2002 Vojtech Pavlik
  *
index 52deccc2128eeb955b412aeef5bdb0ed8098d5f8..24a861c0d29d3d936ef0110b9ec378c4a8cfc4b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_GEN_STATS_H
 #define __LINUX_GEN_STATS_H
 
index adc899381e0d84eb8f206cce51eeb2865fe71397..877f7fa954666f8890123b52d81893260dece8d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_GENERIC_NETLINK_H
 #define _UAPI__LINUX_GENERIC_NETLINK_H
 
index baa93fb4cd4f7da02f1444175af386054aa4a8d3..bc779a5d258dd1fdf228f34b1daee1ade5a4b6d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __GENWQE_CARD_H__
 #define __GENWQE_CARD_H__
 
index 7c4be7711c81352e4c00416fc05d02e8e488a682..5156bad77b47fa6f77bbcbed8e745470f7dd9c15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
  * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
index 258ba82937e7937b47f745a067b90fa46f3721a4..279551af8ebf284812dc1feb568f1712f03ae3f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * interface to user space for the gigaset driver
  *
index 333d3544c964d1512ba3c426fb110cae2d976acb..1bf6e6df084b8a18f9df34e54ed3be82056ffaf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * <linux/gpio.h> - userspace ABI for the GPIO character devices
  *
index ab055d8cddef7a94289f198becb435a56ae37ca3..101d3c469acb37161c2fe270fffcf9195d564cac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_GSMMUX_H
 #define _LINUX_GSMMUX_H
 
index 57d1edb8efd9bae86d0b11779f59de9d18f35f1a..c7d66755d212bfcd9a75e5cde3d4e8fec2376c8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_GTP_H_
 #define _UAPI_LINUX_GTP_H_
 
index ebf8fd885dd59cdd6b7d5a72a3bdcaa8353fc1b5..eea5d02c58dead0966ff088ec9cfc02cd25165a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Hash Info: Hash algorithms information
  *
index 2c5f0aff4cf961ba9b36eaf92b5f422ce4606ffd..d89cb3ee7c7047ad39779e2dd052ce2f06e520d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Generic HDLC support routines for Linux
  *
index 04bc0274a1898936fc19fedf6f282a4da8606709..0fe4238e824624d22b847cca023bec3fbb709324 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __HDLC_IOCTL_H__
 #define __HDLC_IOCTL_H__
 
index ffc79c0b44a888e5e995d28ff258fcaf5396b57d..9fe9499403a61ef58ff853107e60062c8a8de7dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * hdlcdrv.h  -- HDLC packet radio network driver.
  * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
index 29ee2873f4a878026595fe6ac1014a91ec8109d6..aeee62ebf83cd5b7b1ba1fd358033bc81cf9f850 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_HDREG_H
 #define _LINUX_HDREG_H
 
index b60f4842bd97f215cffd4b1f7ec1e70269ea471d..b34492a87a8a46caa06369d7837c7ee40c651b3f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (c) 1999 Andreas Gal
  *  Copyright (c) 2000-2001 Vojtech Pavlik
index 7df7884bf5c47e936c9ce24a813ea7b6019f82c2..53d6cad7a999891d57af02b1e67b41793bc9d5ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (c) 1999-2000 Vojtech Pavlik
  *
index f5b732979a7c99ddc44c88febe4eb4487abb321e..98e2c493de8569ae3772ec946a9e92d3fc760b5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Copyright (c) 2007 Jiri Kosina
  */
index 8af3c70abc8c7e931f6e1103583d8d6391b31507..30e535644b43003e9a6c9bf4ff5ae47a76783110 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__HPET__
 #define _UAPI__HPET__
 
index f153d6ea7c626b1dbba775c33a600f91e1e13e4b..c7f6e7672cb597e573a5cb8a36db49a21545375f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * cmt-speech interface definitions
  *
index c00a463d55f9957a2fd59682a97dfb247453c2bb..91623b0398b1b7c80eb5ee29084fd35348976329 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Part of the HSI character device driver.
  *
index 2475cb8a53af0c391d31d831c7f68d3ca1695a9a..c218ef9c35dd547d3be567f129059cbf206e8c7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2011-2013 Autronica Fire and Security AS
  *
index 2b65efd19a46989e14ff89a7f70975ef56cf3f89..965e4d8606d81aea7792252d93b72dceb0dd7f86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_HW_BREAKPOINT_H
 #define _UAPI_LINUX_HW_BREAKPOINT_H
 
index e347b24ef9fb645cd3d74b4a0e09ca3296c7b58b..991b2b7ada7a3cd88b4b44723e0b5757e4f3c4eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
  * Copyright (c) 2011, Microsoft Corporation.
index 00236ae3b04e0673ae284af098f0840c46b13f81..99f77c517e6d4e2853ee8782daf7e56768a7dcb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: hysdn_if.h,v 1.1.8.3 2001/09/23 22:25:05 kai Exp $
  *
  * Linux driver for HYSDN cards
index 2f05e66de01ed8817be123ef3b13e982c04c5da0..85f8047afcf2ae6f0ba2221dbfb13e30f74c66d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
     i2c-dev.h - i2c-bus driver, char device interface
 
index 009e27bb9abe199b3ee2bc7bcced083cba25c653..fe648032d6b9ff2eb8b60a549c80a7814c776619 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* ------------------------------------------------------------------------- */
 /*                                                                          */
 /* i2c.h - definitions for the i2c-bus interface                            */
index a8093bfec3a65e6fde84a7b3f5cb071d594692b0..b1cd407c47d5a85926130553f0ff16402f79dcc6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * I2O user space accessible structures/APIs
  *
index 133d02f03c259a526dda318459d99ce83169929f..268e6268f6c808f81116d0775f3eeea2e7520287 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * i8k.h -- Linux driver for accessing the SMM BIOS on Dell laptops
  *
index fddd9d736284286a3af284624e4cc257a8abd0cc..5589eeb791ca580bb182e1dc38c05eab1c75adb9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 590beda78ea0ffcaa9c72321c9ba1ea893d0e4d3..caf8dc01925029f585fdb923927ab98a55c861ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_ICMPV6_H
 #define _UAPI_LINUX_ICMPV6_H
 
index 259617a551f25197ddf60d4e812acabad449c6df..7fea0fd7d6f54debe3cd4356a1e7ca04ef9c9c7d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 4318ab1635cedfc65a14f969fdb0077e4b984f74..2ef053d265de83d1972d80877e03b4702010683c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_IF_ADDR_H
 #define __LINUX_IF_ADDR_H
 
index 54580c298187cf1a6c89087a1d79777fd03508b1..d1f5974c76e105a4c4a2c9eff8c3b03f704dd95e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * if_addrlabel.h - netlink interface for address labels
  *
index f2acd2fde1f3abb93b1be11a54005ce10a57e54e..bc2bcdec377b4b75738166b0b047a9c50d6a676d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * if_alg: User-space algorithm interface
  *
index cfb642f8e7bd3b0eb0446fce2d5898eeb04bec4d..683878036d76d7ccdd6fe7a6e907a7977a40067b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET         An implementation of the TCP/IP protocol suite for the LINUX
  *              operating system.  INET is implemented using the  BSD Socket
index a2a63562060050ba4041a86905407f19e3ebd3a8..4605527ca41b40a4bc6ff95ebdcd75f894a5c8db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 9635a62f6f89c781a9086af47df6382c59fea161..61a1bf6e865e8b41aa1f5bd8ce188f513f58e143 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.
  *
index a9e6244ce43803339584f3f6e43757005363e621..e41eda3c71f1efbd0b6bb7845e5d670eeb55eb6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     Linux ethernet bridge
  *
index ee6b3c442baf008cbee2037720bbbca8e1e411d5..1f65130bf2a68185c91cd29611d3e6d5e16c6bb1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _LINUX_CABLEMODEM_H_
 #define _LINUX_CABLEMODEM_H_
 /*
index 06e818c9e7cb087642fd778380242bb4f3ac1c8f..d6865a2d8cddd67180717ecf9acde72d1021b13d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Equalizer Load-balancer for serial network interfaces.
  *
index 9037065e23d0d08f191ac378fb60cceb819afaed..3ee3bf7c85262b034702875b7d356ac7595abea6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 6ed7f1bf35c81b411739c5dce95bdc07e9df5a94..3e3173282cc36faf6306d5f296a40b835a1ebb7a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 1086cd9f675473b21f2c316eac16d591743af777..75eed8b628232db133aa09b31afba6f716ff6296 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the BSD Socket
index f25b08d5eb6b7776d842c61281edb8dd00f095f9..3c6ee85f6262881fa3d1f05a03cf9bd80d8bad8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * DLCI/FRAD   Definitions for Frame Relay Access Devices.  DLCI devices are
  *             created for each DLCI associated with a FRAD.  The FRAD driver
index cdc049f1829a8ca6ccc9aabb2103b1aacd3fb990..785a1452a66c87cfbf3cd91fc3ac59e2300d337d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 7d958475d4acf15e7139f4eab2d9759ef77cd821..050b92dcf8cf4013ae7ac5c76edb13bb990296ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
index 8d062c58d5cbc9e629a190a87926066ceb778488..1f00f0cd67907c43bd801139a255128952f35619 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_IF_LINK_H
 #define _UAPI_LINUX_IF_LINK_H
 
index b92c1fb6ac161f6560acf39dc5ae663bbe86a6fb..fa61e776f598d752b05990075eee44235827712e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_LTALK_H
 #define _UAPI__LINUX_LTALK_H
 
index 02fc49cb72d83f2b46dcfadf3f5a7810756934af..719d243471f4824e11bec716e125d9dcab7dfdd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * include/uapi/linux/if_macsec.h - MACsec device
  *
index 4df96a7dd4fae591d834735046911337221c60d3..67b61d91d89bf4fc8a54e01ffa3ca253a7fc45c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_IF_PACKET_H
 #define __LINUX_IF_PACKET_H
 
index f7ad9e24eb3d8f1e46aaba281a5ac631631b77cd..9c22c969ec69ec3ccc0165b38b2a61e80c12461f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * File: if_phonet.h
  *
index 6298c7e88b2bb14be134f738dca184cc1af85c2e..495a366112f2921fcbb67246b55ce6fa1d8a03f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     NET3    PLIP tuning facilities for the new Niibe PLIP.
  *
index 6418c4d10241c2f57d22a5d95275b55972ca52c9..060b4d1f312967dcbb3abe42ca34be95e951adb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /***************************************************************************
  * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661)
  *
index d37bbb17a007c108f093ac517e4f0d567f3920de..e7a693c28f16560c7d646ca3f954d952428a408b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /***************************************************************************
  * Linux PPP over X - Generic PPP transport layer sockets
  * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516) 
index 1eb4e3a8397ab8d4d3231ddb9cd82ae018db2b7d..65937be53103fc3d4ea4fcfe1fb3b19ceded9be6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     Swansea University Computer Society     NET3
  *     
index 7b8fa339de30348508ab3810c4c1aa3ca1573662..13c61fecb78b8bab238a339024627afa54756fe4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * include/linux/if_team.h - Network team device driver header
  * Copyright (c) 2011 Jiri Pirko <jpirko@redhat.com>
index 3cb5e1d85ddd1894fa3561de99157a25662ea612..47ab4bc62e31732082a5125d56f19b948ec6f0cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Universal TUN/TAP device driver.
  *  Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
index 2e520883c054ce474272471655cea5d119de0be0..383b850aeb88bebd6ccdf4128c54d4da06b65b8d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_IF_TUNNEL_H_
 #define _UAPI_IF_TUNNEL_H_
 
index 7e5e6b397332d628715fabb297c23ad0a5d4bfd6..7a0e8bd65b6b826a76b3c8b47fe7eddce7f18d6a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * VLAN                An implementation of 802.1Q VLAN tagging.
  *
index 897765f5feb80a8ad4b6fcdef1a3ec25e51f4442..5d962448345f38ad85e52c2c0dfe88207be8b5f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Linux X.25 packet to device interface
  *
index 2954da32e012ef7b3b8f5f67e514fbdc8e3d520d..bdd953c67db12e96bbee756a1abfd2e1b6db8f6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UAPI_IFE_H
 #define __UAPI_IFE_H
 
index a97f9a7568cfe54ca3bfea53957cf2e80f8a1a24..7e44ac02ca18c198388f6b49041b5dcdb899a5f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     Linux NET3:     Internet Group Management Protocol  [IGMP]
  *
index 00bbdaed2f97af12611a50d5975953e90c12cc53..6ef413452dce30d3cebe6b48c0f88759f6036fdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* The industrial I/O - event passing to userspace
  *
  * Copyright (c) 2008-2011 Jonathan Cameron
index ffafd6c25a48cf61774606a55e4654fb34153eec..4213cdf88e3cd79cc9005684dbc35c62bfb3df68 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* industrial I/O data types needed both in and out of kernel
  *
  * Copyright (c) 2008 Jonathan Cameron
index 948c0a91e11b5bb50353a90f173cc0999c8f9a32..f54853288f99ce2832c559f44228102d633651a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* ila.h - ILA Interface */
 
 #ifndef _UAPI_LINUX_ILA_H
index 4e557f4e95538a26d19375415437733a9b084c6c..48e8a225b985ae646b4bba2cdcdf62ca9c42a7a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 46444f8fbee4eed8c4aa223ee5ff3ef1be182765..2c002ffa9d6f564fe623e1befc216d77d4d6d71e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     Types and definitions for AF_INET6 
  *     Linux INET6 implementation 
index b261b8c915f01d32663da229a41105a611944042..0cc2c23b47f84279b86dbeab94a9361e044af81d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_IN_ROUTE_H
 #define _LINUX_IN_ROUTE_H
 
index f52ff62bfabe766c262b1ab2f3943f590f69946d..817d807e9481d30d7267a44223fbec0f4360692c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_INET_DIAG_H_
 #define _UAPI_INET_DIAG_H_
 
index e6bf35b2dd343980963c39741c5325072c6983d7..5474461683dbe3a26511a43962371a737aed7da9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Inode based directory notification for Linux
  *
index 179891074b3c24780bb10e5a9a4f8d2183d2c684..f4058bd4c373117e1068ba2d1a20a6f6e47feebc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Input event codes
  *
index f561c0eb7d63645f341f3d75604c075d5e534319..8c5a0bf6ee3520543295c631dc85e996af6ca7bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 1999-2002 Vojtech Pavlik
  *
index aa91eb3951ef6c92dffdaa6155637d9f01c71d7e..b292e8093b24563eeb9db4479107ea33add33083 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_IOCTL_H
 #define _LINUX_IOCTL_H
 
index f291569768ddf22bd4d1b39cc30c8bc7dd8bf408..b24a742beae58974722348255ebe239584661905 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 425926c467d7ac8c30010e4aa3b6f664954d0ad1..51f29308ac6d20c38b51e89a6c43957b3a45a9c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6_TUNNEL_H
 #define _IP6_TUNNEL_H
 
index 22d69894bc92ac63c6f96b7835ff9f1720f518e0..1c916b2f89dc8a31a330cb0979fc1ced992e51c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *      IP Virtual Server
  *      data structure and functionality definitions
index de08dd46ddae5593c14bb6e2f5a650a75bf1445f..5995fc9d675ead46aba5a68f41349c86b5a5f360 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_IPC_H
 #define _UAPI_LINUX_IPC_H
 
index b9095a27a08a55fdf2e029178e1ce472637bd877..b076f7a474078990f3de521030cb80aecd8de1e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * ipmi.h
  *
index df97e6e31e87bf84f87c7fb760186482beb1033c..17f349459587b27a1af893736e3e0a4b3c73f2cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * ipmi_smi.h
  *
index d17a6302a0e96637e1e543a6c25fb4f23d6691e4..50d8ee1791e2a69a72ad90738debe593fd85238f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_IPSEC_H
 #define _LINUX_IPSEC_H
 
index 2ae59178189d7983fb9ed99ae1cd5f40197cfb04..b22a9c4e1b1248d73938fb271e83b516292130a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_IPV6_H
 #define _UAPI_IPV6_H
 
index d496c02e14bc44327fd3ab6c3faad0c1d7ac1e12..a96eb17ad6fc7223ab9457ad6260e93f0a122f3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     Linux INET6 implementation 
  *
index 30f031db12f60c9c5f94a2194b09663f1b20e552..3168137adae8cfbde1183fbe9fd8b20affffa5d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPX_H_
 #define _IPX_H_
 #include <linux/libc-compat.h> /* for compatibility with glibc netipx/ipx.h */
index a014c325231129a226ac4c579f5e42154b447cd5..2105c266aa6e1afc9fc06264fda5f9649942efa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*********************************************************************
  *                
  * Filename:      irda.h
index eb1995fffc396efb51f823889b62d75082f1247d..f371fd52ed75a546692ac7fc6d067e44704a3ecb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: isdn.h,v 1.125.2.3 2004/02/10 01:07:14 keil Exp $
  *
  * Main header for the Linux ISDN subsystem (linklevel).
index b58635f722dace7879713ea36406ede4bb1f4dd4..4941628a4fb9b919720d3fd9a949828f2c397fc0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: capicmd.h,v 1.2.6.2 2001/09/23 22:24:33 kai Exp $
  * 
  * CAPI 2.0 Interface for Linux
index 3e3c2d898416a5db8ad3737df2bc2f3f8fc64be3..0a17bb1bcb1bfcbcfbaae1bdf18fb479082eba8a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: isdn_divertif.h,v 1.4.6.1 2001/09/23 22:25:05 kai Exp $
  *
  * Header for the diversion supplementary interface for i4l.
index e7d7bd2aed3f02785a7aa35f274ceacb328e7e9c..0bdc4efaacb2d6f75cd073de687ae476cd002346 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /* Linux ISDN subsystem, sync PPP, interface to ipppd
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
index 246138c01c4dc7fc19e0f933076d387bec4b579e..611a69196738712bf5ec0ae52425215e37e5af67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /* $Id: isdnif.h,v 1.43.2.2 2004/01/12 23:08:35 keil Exp $
  *
  * Linux ISDN subsystem
index 4688ac4284e22180c8bccf7ad44b02bf4b728ff1..78b4ebcf8ab0237e353115d94fc4ba15d92bfefc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ISOFS_FS_H
 #define _ISOFS_FS_H
 
index 42bf725751af03147498732bdc6c16cfb9919a05..e74f18642b115c3e8f3e2c5a421a6a65e933e579 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
     Public ivtv API header
     Copyright (C) 2003-2004  Kevin Thayer <nufan_wfk at yahoo.com>
index e8b92f67f10d96db8b7daff25b08a97dcc99d803..9e9b072375de91bbb777d5e636992ed2221fa438 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
     On Screen Display cx23415 Framebuffer driver
 
index 94ab5e942e53d3c258600d69a4f28b868b72875d..ba245007cfe71cc878a2b647570f67c505a1b638 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __LINUX_IXJUSER_H
 #define __LINUX_IXJUSER_H
 
index b856fd11c70ebfc7475d74fb698c372bd7910ec9..64aabb84a66d77f406f08c2cf9c82ddcce3ca0a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (C) 1996-2000 Vojtech Pavlik
  *
index a5a530940b99c76e2c78b42b2b5f62b3f6fb23b4..01361ea359c4b6cf5f145adf1e6fb788ca08f722 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Kernel Connection Multiplexor
  *
index 481e103da78ed42a5a76447e836ee8374541d7c7..ef130501092531b23148898efc08b0e521f3354c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_KCMP_H
 #define _UAPI_LINUX_KCMP_H
 
index 574e22ec640dab24b7c182bc93f616c99b7f2cf2..33eabbb8ada11e5376364c5f3db99f90a97ddb10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_KCOV_IOCTLS_H
 #define _LINUX_KCOV_IOCTLS_H
 
index 87b7cc439d7c5adc51a8653630f3d3de1671a1aa..4616b31f84da295fd5147b432d035f05a2a06a7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_KD_H
 #define _UAPI_LINUX_KD_H
 #include <linux/types.h>
index 0d881fa7eb9ccf2e22ea005485eb1c9fce39e00f..e1990f2e97772a8bb798ac9b9a9d2fd3e8790e88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_KDEV_T_H
 #define _UAPI_LINUX_KDEV_T_H
 #ifndef __KERNEL__
index 5da5f8751ce7dc082a4a99cfe29e7d2eb7f6ba5a..fa139841ec182d12b8caf2d850a6f977ca1aac0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPILINUX_KERNEL_PAGE_FLAGS_H
 #define _UAPILINUX_KERNEL_PAGE_FLAGS_H
 
index 466073f0ce46999b96ad90a8a5f809615b3f1f5b..0ff8f7477847ce7293d9e038e981a873f330f670 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_KERNEL_H
 #define _UAPI_LINUX_KERNEL_H
 
index 89bf40d36d2a4d77109a3efccd571029a8b66b96..325a856e0e201d71e27ec533bddb80663d794896 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
  * 
index aae5ebf2022b30abd7cdea7b0021a707d1183e81..6d112868272da25419a1feda5a43ab04e8ad15d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPILINUX_KEXEC_H
 #define _UAPILINUX_KEXEC_H
 
index 5a6849721ab6187667e61bff7300ecee5b16e017..ab4108c8318618af1e156ebf62f16f97f0d0ea52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_KEYBOARD_H
 #define _UAPI__LINUX_KEYBOARD_H
 
index ef16df06642a93462e1bd5d535ec3119af3adc22..7b8c9e19bad1c2bf72c21dcf6b358559d5e4b4ea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* keyctl.h: keyctl command IDs
  *
  * Copyright (C) 2004, 2008 Red Hat, Inc. All Rights Reserved.
index 7b4567bacfc206a02d4e8a680cf8ecd81b87a84a..26283fefdf5fd5f86719fb954c02ae3b2492cd30 100644 (file)
 #ifndef KFD_IOCTL_H_INCLUDED
 #define KFD_IOCTL_H_INCLUDED
 
-#include <linux/types.h>
+#include <drm/drm.h>
 #include <linux/ioctl.h>
 
 #define KFD_IOCTL_MAJOR_VERSION 1
 #define KFD_IOCTL_MINOR_VERSION 1
 
 struct kfd_ioctl_get_version_args {
-       uint32_t major_version; /* from KFD */
-       uint32_t minor_version; /* from KFD */
+       __u32 major_version;    /* from KFD */
+       __u32 minor_version;    /* from KFD */
 };
 
 /* For kfd_ioctl_create_queue_args.queue_type. */
@@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args {
 #define KFD_MAX_QUEUE_PRIORITY         15
 
 struct kfd_ioctl_create_queue_args {
-       uint64_t ring_base_address;     /* to KFD */
-       uint64_t write_pointer_address; /* from KFD */
-       uint64_t read_pointer_address;  /* from KFD */
-       uint64_t doorbell_offset;       /* from KFD */
-
-       uint32_t ring_size;             /* to KFD */
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t queue_type;            /* to KFD */
-       uint32_t queue_percentage;      /* to KFD */
-       uint32_t queue_priority;        /* to KFD */
-       uint32_t queue_id;              /* from KFD */
-
-       uint64_t eop_buffer_address;    /* to KFD */
-       uint64_t eop_buffer_size;       /* to KFD */
-       uint64_t ctx_save_restore_address; /* to KFD */
-       uint64_t ctx_save_restore_size; /* to KFD */
+       __u64 ring_base_address;        /* to KFD */
+       __u64 write_pointer_address;    /* from KFD */
+       __u64 read_pointer_address;     /* from KFD */
+       __u64 doorbell_offset;  /* from KFD */
+
+       __u32 ring_size;                /* to KFD */
+       __u32 gpu_id;           /* to KFD */
+       __u32 queue_type;               /* to KFD */
+       __u32 queue_percentage; /* to KFD */
+       __u32 queue_priority;   /* to KFD */
+       __u32 queue_id;         /* from KFD */
+
+       __u64 eop_buffer_address;       /* to KFD */
+       __u64 eop_buffer_size;  /* to KFD */
+       __u64 ctx_save_restore_address; /* to KFD */
+       __u64 ctx_save_restore_size;    /* to KFD */
 };
 
 struct kfd_ioctl_destroy_queue_args {
-       uint32_t queue_id;              /* to KFD */
-       uint32_t pad;
+       __u32 queue_id;         /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_update_queue_args {
-       uint64_t ring_base_address;     /* to KFD */
+       __u64 ring_base_address;        /* to KFD */
 
-       uint32_t queue_id;              /* to KFD */
-       uint32_t ring_size;             /* to KFD */
-       uint32_t queue_percentage;      /* to KFD */
-       uint32_t queue_priority;        /* to KFD */
+       __u32 queue_id;         /* to KFD */
+       __u32 ring_size;                /* to KFD */
+       __u32 queue_percentage; /* to KFD */
+       __u32 queue_priority;   /* to KFD */
 };
 
 /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
@@ -80,13 +80,13 @@ struct kfd_ioctl_update_queue_args {
 #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
 
 struct kfd_ioctl_set_memory_policy_args {
-       uint64_t alternate_aperture_base;       /* to KFD */
-       uint64_t alternate_aperture_size;       /* to KFD */
+       __u64 alternate_aperture_base;  /* to KFD */
+       __u64 alternate_aperture_size;  /* to KFD */
 
-       uint32_t gpu_id;                        /* to KFD */
-       uint32_t default_policy;                /* to KFD */
-       uint32_t alternate_policy;              /* to KFD */
-       uint32_t pad;
+       __u32 gpu_id;                   /* to KFD */
+       __u32 default_policy;           /* to KFD */
+       __u32 alternate_policy;         /* to KFD */
+       __u32 pad;
 };
 
 /*
@@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args {
  */
 
 struct kfd_ioctl_get_clock_counters_args {
-       uint64_t gpu_clock_counter;     /* from KFD */
-       uint64_t cpu_clock_counter;     /* from KFD */
-       uint64_t system_clock_counter;  /* from KFD */
-       uint64_t system_clock_freq;     /* from KFD */
+       __u64 gpu_clock_counter;        /* from KFD */
+       __u64 cpu_clock_counter;        /* from KFD */
+       __u64 system_clock_counter;     /* from KFD */
+       __u64 system_clock_freq;        /* from KFD */
 
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t pad;
+       __u32 gpu_id;           /* to KFD */
+       __u32 pad;
 };
 
 #define NUM_OF_SUPPORTED_GPUS 7
 
 struct kfd_process_device_apertures {
-       uint64_t lds_base;              /* from KFD */
-       uint64_t lds_limit;             /* from KFD */
-       uint64_t scratch_base;          /* from KFD */
-       uint64_t scratch_limit;         /* from KFD */
-       uint64_t gpuvm_base;            /* from KFD */
-       uint64_t gpuvm_limit;           /* from KFD */
-       uint32_t gpu_id;                /* from KFD */
-       uint32_t pad;
+       __u64 lds_base;         /* from KFD */
+       __u64 lds_limit;                /* from KFD */
+       __u64 scratch_base;             /* from KFD */
+       __u64 scratch_limit;            /* from KFD */
+       __u64 gpuvm_base;               /* from KFD */
+       __u64 gpuvm_limit;              /* from KFD */
+       __u32 gpu_id;           /* from KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_get_process_apertures_args {
@@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args {
                        process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */
 
        /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */
-       uint32_t num_of_nodes;
-       uint32_t pad;
+       __u32 num_of_nodes;
+       __u32 pad;
 };
 
 #define MAX_ALLOWED_NUM_POINTS    100
@@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args {
 #define MAX_ALLOWED_WAC_BUFF_SIZE  128
 
 struct kfd_ioctl_dbg_register_args {
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t pad;
+       __u32 gpu_id;           /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_dbg_unregister_args {
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t pad;
+       __u32 gpu_id;           /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_dbg_address_watch_args {
-       uint64_t content_ptr;           /* a pointer to the actual content */
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t buf_size_in_bytes;     /*including gpu_id and buf_size */
+       __u64 content_ptr;              /* a pointer to the actual content */
+       __u32 gpu_id;           /* to KFD */
+       __u32 buf_size_in_bytes;        /*including gpu_id and buf_size */
 };
 
 struct kfd_ioctl_dbg_wave_control_args {
-       uint64_t content_ptr;           /* a pointer to the actual content */
-       uint32_t gpu_id;                /* to KFD */
-       uint32_t buf_size_in_bytes;     /*including gpu_id and buf_size */
+       __u64 content_ptr;              /* a pointer to the actual content */
+       __u32 gpu_id;           /* to KFD */
+       __u32 buf_size_in_bytes;        /*including gpu_id and buf_size */
 };
 
 /* Matching HSA_EVENTTYPE */
@@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args {
 #define KFD_SIGNAL_EVENT_LIMIT                 256
 
 struct kfd_ioctl_create_event_args {
-       uint64_t event_page_offset;     /* from KFD */
-       uint32_t event_trigger_data;    /* from KFD - signal events only */
-       uint32_t event_type;            /* to KFD */
-       uint32_t auto_reset;            /* to KFD */
-       uint32_t node_id;               /* to KFD - only valid for certain
+       __u64 event_page_offset;        /* from KFD */
+       __u32 event_trigger_data;       /* from KFD - signal events only */
+       __u32 event_type;               /* to KFD */
+       __u32 auto_reset;               /* to KFD */
+       __u32 node_id;          /* to KFD - only valid for certain
                                                        event types */
-       uint32_t event_id;              /* from KFD */
-       uint32_t event_slot_index;      /* from KFD */
+       __u32 event_id;         /* from KFD */
+       __u32 event_slot_index; /* from KFD */
 };
 
 struct kfd_ioctl_destroy_event_args {
-       uint32_t event_id;              /* to KFD */
-       uint32_t pad;
+       __u32 event_id;         /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_set_event_args {
-       uint32_t event_id;              /* to KFD */
-       uint32_t pad;
+       __u32 event_id;         /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_reset_event_args {
-       uint32_t event_id;              /* to KFD */
-       uint32_t pad;
+       __u32 event_id;         /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_memory_exception_failure {
-       uint32_t NotPresent;    /* Page not present or supervisor privilege */
-       uint32_t ReadOnly;      /* Write access to a read-only page */
-       uint32_t NoExecute;     /* Execute access to a page marked NX */
-       uint32_t pad;
+       __u32 NotPresent;       /* Page not present or supervisor privilege */
+       __u32 ReadOnly; /* Write access to a read-only page */
+       __u32 NoExecute;        /* Execute access to a page marked NX */
+       __u32 pad;
 };
 
 /* memory exception data*/
 struct kfd_hsa_memory_exception_data {
        struct kfd_memory_exception_failure failure;
-       uint64_t va;
-       uint32_t gpu_id;
-       uint32_t pad;
+       __u64 va;
+       __u32 gpu_id;
+       __u32 pad;
 };
 
 /* Event data*/
@@ -217,19 +217,19 @@ struct kfd_event_data {
        union {
                struct kfd_hsa_memory_exception_data memory_exception_data;
        };                              /* From KFD */
-       uint64_t kfd_event_data_ext;    /* pointer to an extension structure
+       __u64 kfd_event_data_ext;       /* pointer to an extension structure
                                           for future exception types */
-       uint32_t event_id;              /* to KFD */
-       uint32_t pad;
+       __u32 event_id;         /* to KFD */
+       __u32 pad;
 };
 
 struct kfd_ioctl_wait_events_args {
-       uint64_t events_ptr;            /* pointed to struct
+       __u64 events_ptr;               /* pointed to struct
                                           kfd_event_data array, to KFD */
-       uint32_t num_events;            /* to KFD */
-       uint32_t wait_for_all;          /* to KFD */
-       uint32_t timeout;               /* to KFD */
-       uint32_t wait_result;           /* from KFD */
+       __u32 num_events;               /* to KFD */
+       __u32 wait_for_all;             /* to KFD */
+       __u32 timeout;          /* to KFD */
+       __u32 wait_result;              /* from KFD */
 };
 
 struct kfd_ioctl_set_scratch_backing_va_args {
index 83888758741184f969f3b8fd1738e38bdc24da78..7e99999d6236fa2940fa2b565442e8b1b1331407 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_KVM_H
 #define __LINUX_KVM_H
 
index fed506aeff62f52c585280e8f4da2f96c69be0e9..dcf629dd28896b2010f3fcd4fc8516130a71e80a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_KVM_PARA_H
 #define _UAPI__LINUX_KVM_PARA_H
 
index b23c1914a18217a3e1e185dc0bd47211c98f20a6..d84ce5c1c9aad49dd487cb9a2ae93e4e3890ee53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * L2TP-over-IP socket for L2TPv3.
  *
index 44b8a6bd5fe1128e8c18061e14b9a63486d26e0d..282875cf805657b41eb0b5a797aa77647b889159 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Compatibility interface for userspace libc header coordination:
  *
index c8aec4b9e73b8c85189eb9b62fa98cf1fb6e7bfa..42d1a434af296324c1589a4c123b59a0d4f74bd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2015 CNEX Labs.  All rights reserved.
  *
index 2d0f94162fb341a9986b05124d61d457fe395350..c3547f07605c9e2ca28e4ced0fbba545b55d21a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_LIMITS_H
 #define _LINUX_LIMITS_H
 
index 991ab4570b8ec9f5b505a3c7575fc20a8e183642..c3aef4316fbf65b840af79621f8c52619d6dc11a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * lirc.h - linux infrared remote control header file
  * last modified 2010/07/13 by Jarod Wilson
index a6c17f66ee94584ccb7c5375145e521acc1496ee..cf8806b14d5fc9497a8d139591fff8a044c4bd38 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * IEEE 802.2 User Interface SAPs for Linux, data structures and indicators.
  *
index 23158dbe242483c7d4c35570794dadc2c332bcc0..080a8df134ef3b3cd96018be8a9048947ec09697 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * include/linux/loop.h
  *
index a3406a51f1968c70f0a0b281561397159be812aa..dafcfe4e483481b6f18914c27861d65c0e690fb4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * usr/include/linux/lp.h c.1991-1992 James Wiegand
  * many modifications copyright (C) 1992 Michael K. Johnson
index 7fdd19ca75111809ac4e9078d092d9e194785109..de696ca12f2c274a9fdcf14e5ddc6a37f55cab0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LWTUNNEL_H_
 #define _UAPI_LWTUNNEL_H_
 
index e439565df838a2a7032888bd614ae28fa2359b90..aa50113ebe5b0bec825ac29ddc8a37fc3a9d90b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_MAGIC_H__
 #define __LINUX_MAGIC_H__
 
index 19e195bee990f6cf1392b2180aeea54aa3d57638..7e5fa8e15c43632ec82dfdca82e07318808c9c62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_MAJOR_H
 #define _LINUX_MAJOR_H
 
index 12d62a54d47029383b79bdc3ed9b529fe21f6b90..f9ed18134b8300895f8fb9a15a6c3bd6cc5c3046 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2005 Henk Vergonet <Henk.Vergonet@gmail.com>
  *
index 8c22a89386426359f9a268e2c9d8e831ca3fe66a..23e025b7e3624d0df91c01eeab851db255c1416a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_MATROXFB_H__
 #define __LINUX_MATROXFB_H__
 
index 3ef5d264440f523c1f4fbc407e9ecafedeff55ad..daedc4eb9b6b3c4a08571094680314eb3f61b1b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * max2175.h
  *
index c94a510a577ed1cbfb43e470e98211e88b6bd8f1..d435b00d64ad4bd229aaac54ee8d576d31c1c3f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/mdio.h: definitions for MDIO (clause 45) transceivers
  * Copyright 2006-2009 Solarflare Communications Inc.
index ef6fb307d2cec4bcde9ba175494e2c038c40a800..9e3511742fdc50aa11a6b42fb0778f09b2307529 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Media Bus API header
  *
index 4865f1e713398b63f41fca7a84fae1637fc44385..b9b9446095e97d6cd85f5fea4e0881504c824bd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Multimedia device API
  *
index 7c3b64f6a2158f02f676609ade423fc805ca3564..0f681cbd38d3b402fd2731d7fb39b96d5a55736b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /******************************************************************************
  * Intel Management Engine Interface (Intel MEI) Linux driver
  * Intel MEI Interface Header
index 6d47b3249d8ad84a2fcf2b38585338ccbf05a99f..4e01ad7ffe9831c63f90a46d40445e467365beec 100644 (file)
  *                          (non-running threads are de facto in such a
  *                          state). This only covers threads from the
  *                          same processes as the caller thread. This
- *                          command returns 0. The "expedited" commands
- *                          complete faster than the non-expedited ones,
- *                          they never block, but have the downside of
- *                          causing extra overhead.
+ *                          command returns 0 on success. The
+ *                          "expedited" commands complete faster than
+ *                          the non-expedited ones, they never block,
+ *                          but have the downside of causing extra
+ *                          overhead. A process needs to register its
+ *                          intent to use the private expedited command
+ *                          prior to using it, otherwise this command
+ *                          returns -EPERM.
+ * @MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED:
+ *                          Register the process intent to use
+ *                          MEMBARRIER_CMD_PRIVATE_EXPEDITED. Always
+ *                          returns 0.
  *
  * Command to be passed to the membarrier system call. The commands need to
  * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to
  * the value 0.
  */
 enum membarrier_cmd {
-       MEMBARRIER_CMD_QUERY                    = 0,
-       MEMBARRIER_CMD_SHARED                   = (1 << 0),
+       MEMBARRIER_CMD_QUERY                            = 0,
+       MEMBARRIER_CMD_SHARED                           = (1 << 0),
        /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */
        /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */
-       MEMBARRIER_CMD_PRIVATE_EXPEDITED        = (1 << 3),
+       MEMBARRIER_CMD_PRIVATE_EXPEDITED                = (1 << 3),
+       MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED       = (1 << 4),
 };
 
 #endif /* _UAPI_LINUX_MEMBARRIER_H */
index 7f3a722dbd722b8c515d3dd9176ce1d646a0caac..015a4c0bbb47d6e9cabc6aac2c254e8f6c7ee960 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MEMFD_H
 #define _UAPI_LINUX_MEMFD_H
 
index 2a4d89508fece0518558567ca71cccae1477bfd8..3354774af61e44272f9b30a10dbad465c4270f18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * NUMA memory policies for Linux.
  * Copyright 2003,2004 Andi Kleen SuSE Labs
index 8ff50fe9e4812e9947935b7efade1933db2427a6..de9e3a954f3da398d7bfc868101d181361a54512 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Motion Eye video4linux driver for Sony Vaio PictureBook
  *
index e9686372029df72d72ea348f612c88494afc7c06..504e523f702c1e02e7a64d6e276c2881abb180c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Intel MIC Platform Software Stack (MPSS)
  *
index feb0b4c0814c0ff3ec93318612300d260fdf8442..687b9cd9d3e27119a18abe3e2f9c8ffb5b35923e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Intel MIC Platform Software Stack (MPSS)
  *
index 15d8510cdae0caebbb47bde495be71b44ece37a0..b5c2fdcf23fdb66616fdd17e4060b85e45949728 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/mii.h: definitions for MII-compatible transceivers
  * Originally drivers/net/sunhme.h.
index 13fe09e0576a3c30064a3f81f785d97dd13c3155..95dbcb17eacda219ee215d377d570803a72ee317 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_MINIX_FS_H
 #define _LINUX_MINIX_FS_H
 
index a937480d7cd345f4e1b12c2e409f58c0489e8a4e..bfd5938fede6c1ba3b71d096cd36127da2837042 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MMAN_H
 #define _UAPI_LINUX_MMAN_H
 
index 700a55156eee1f79b2018845b2983528b88008ab..45f369dc0a42620e787982e6c2f1fbe6a17fcb3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef LINUX_MMC_IOCTL_H
 #define LINUX_MMC_IOCTL_H
 
index 884cabf16088e378f98ef757f403a34cd97b2544..409fae1de38373f7e401fae97f4e60cb484018bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Intel Multimedia Timer device interface
  *
index 38da4258b12ffc5404381fd905921724daa182a0..50d98ec5e8668b1379202866d5791bebb6fb685d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MODULE_H
 #define _UAPI_LINUX_MODULE_H
 
index 77a19dfe3990d5deede42363d9511d110032f019..1ef5d6002a4aa9f805ca79ef34ce2040dd96305c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_MPLS_H
 #define _UAPI_MPLS_H
 
index f5e45095b0bb5c17af6515012587d6d805a7d79c..521f2e605f136f37a40dd1926128c373cfe6ea49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     mpls tunnel api
  *
index bbd5116ea7397e4020ecc190b2daebb0dbf53eb0..b516b66840adc8ca7010365b041a938826d33aaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /* Copyright (C) 2003 Krzysztof Benedyczak & Michal Wronski
 
    This program is free software; you can redistribute it and/or
index e8e5041dea8e04ddb66851924f0dd3ecfd61c49e..10f9ff9426a220b700ea4c50219412e6389817d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_MROUTE_H
 #define _UAPI__LINUX_MROUTE_H
 
index e4746816c8550f82d52dd6537529526f02663579..9999cc006390dc32d5def57f5dc66e636f626139 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_MROUTE6_H
 #define _UAPI__LINUX_MROUTE6_H
 
index e956704f5fb1b24ceba1b0157c8d37cf87ee3d15..a45d0754102e00829af76424a0a97fbcf4cd1f0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MSDOS_FS_H
 #define _UAPI_LINUX_MSDOS_FS_H
 
index f51c8001dbe5ed9733e2d1afd945f343d39f0663..5d5ab81dc9be8ec46ad62228807e8e99153b3bf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MSG_H
 #define _UAPI_LINUX_MSG_H
 
index 18543e2db06f202e0c9c2b6dc1d3e6fae1c07fb5..a1191fecc5926b11df424637bc68e197c15029fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* 
  * linux/mtio.h header file for Linux. Written by H. Bergman
  *
index 81337cbf40b7fbed2e56544e99d28c76fe16f1e5..6bbd18520f30a1f86d46ed3d66908dc357eb1599 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /* r3964 linediscipline for linux
  *
  * -----------------------------------------------------------
index 6f7ca3d63a653a113745aa6e1c6fab228c78f610..c5d0ef7aa7d5c25cdf8b0bebe935f353a7231311 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2017 Facebook.  All rights reserved.
  *
index a50527ebf671e010715d542f614331f7c49e4294..85a3fb65e40a6f3941337c7fad17e7fdff3b33d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * 1999 Copyright (C) Pavel Machek, pavel@ucw.cz. This code is GPL.
  * 1999/11/04 Copyright (C) 1999 VMware, Inc. (Regis "HPReg" Duchesne)
index 99f0adeeb3f348e58c65312133217055a6ccf3c0..ca6f3d42c88fac861d6a7bd9f2377dd4aa7beaeb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ncp.h
  *
index e13eefef06534d64500b2c2f4733c9e1ce6943af..e76a44229d2fe84d90802b4c6f9218950a8194ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ncp_fs.h
  *
index dfcbea2d889f78993aee0f6b6b295adb3bdf992e..9bdbcd68c32968120e446f8466abfeae21bedf0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ncp_mount.h
  *
index cddaa48fb182eef600260103aa00762b311edb9e..654d7c7f5d9284b2a9b8eace78722510c7ecf5b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NCP_NO
 #define _NCP_NO
 
index 3199d28980b35442021ed1141151ab957b41c9f9..904db614847667eb4f75584113738d232e069dd6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_NEIGHBOUR_H
 #define __LINUX_NEIGHBOUR_H
 
index 9457239ed219901a8a3d42264cb28210657bbd6f..4dabec6bd957d604dd3f18f7b9896c82a789eb87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * NET         An implementation of the SOCKET network access protocol.
  *             This is the master header file for the Linux NET layer,
index 2a739462caeb3a1550f8df947103a16eda465810..5edbd0a675fd4f01a635cfe8b61e49fb00d77900 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __NET_DROPMON_H
 #define __NET_DROPMON_H
 
index 778cd2c3ebf42eb8f3ce4621326b043b53817b7c..0187c74d88894ade01c6a6bb9b5baba23675d09b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (c) 2015 6WIND S.A.
  * Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
  *
index 3d421d912193481078e015505e572bf2eff368a2..4fe104b2411f0dcda877b8c83b1c0dcfc4e68c7f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Userspace API for hardware time stamping of network packets
  *
index 7e5f0f3e31bfe060f8eca3c3b4ee2d1cc6cc27ab..c84fcdfca862e67887bfe89dc8bea523c9a1d4d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_NETCONF_H_
 #define _UAPI_LINUX_NETCONF_H_
 
index 55818543342d4ec794023977f3c70842ab4917e9..f3770c5b0faca0fa7804e67acc69d93aad7ea6a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index c111a91adcc05ab5de87f561aef99e50fbe94666..cca10e767cd88f5ca9c31bc896bb545ca61b6216 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_NETFILTER_H
 #define _UAPI__LINUX_NETFILTER_H
 
index ebb5154976decef074be170d8b15564a42f3c260..60236f694143215f76bcd7f17401e884cf32583b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
  *                         Patrick Schaaf <bof@bof.de>
  *                         Martin Josefsson <gandalf@wlug.westbo.se>
index fd5024d262697b1d10b75868d4da146f8cd615ee..c6b146db96938ed7752839e9c0eca378b912170f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__IP_SET_BITMAP_H
 #define _UAPI__IP_SET_BITMAP_H
 
index 82deeb883ac480656b8c0c4310a738847c177f7f..880749ace7983eaa0f68cef0ef9aaedd5614f308 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__IP_SET_HASH_H
 #define _UAPI__IP_SET_HASH_H
 
index 84d4303682666f04086f675f6e02da72632854f7..e6d7feb522cdbe6eb8565ec55b8d381545d2d673 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__IP_SET_LIST_H
 #define _UAPI__IP_SET_LIST_H
 
index dc947e59d03a62c5dd6fccf27c1db0a88270ea4f..3fea7709a4412c5e3c7f94daed08576b55bf3bc2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NF_CONNTRACK_COMMON_H
 #define _UAPI_NF_CONNTRACK_COMMON_H
 /* Connection state tracking for netfilter.  This is separated from,
index 1030315a41b58a7a5fc66d3ebbba0b57ef245967..8eb6b9ef2071827a1534e7d08f03d1c81d065aa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NF_CONNTRACK_FTP_H
 #define _UAPI_NF_CONNTRACK_FTP_H
 /* FTP tracking. */
index 2cbc366c3fb4725d06a2def46ac0d54d0dc184f6..edc6ddab0de6afcf7d5cf7284087e959c17d2ad4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NF_CONNTRACK_SCTP_H
 #define _UAPI_NF_CONNTRACK_SCTP_H
 /* SCTP tracking. */
index ef9f80f0f529d156a906b461cc7595c4c83358a6..74b91151d49463f8773f2e16db4710464b5550b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NF_CONNTRACK_TCP_H
 #define _UAPI_NF_CONNTRACK_TCP_H
 /* TCP tracking. */
index 526b42496b7883d55c6b8aac42d8e0ccd8ee76c7..64390fac6f7eacbea0181ac3eb156593f28c876e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NF_CONNTRACK_TUPLE_COMMON_H
 #define _NF_CONNTRACK_TUPLE_COMMON_H
 
index d0b5fa91ff5493fd4af4dbed049102a8c65debf3..2ae00932d3d250c08e118413199a6c7d189de920 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NETFILTER_NF_LOG_H
 #define _NETFILTER_NF_LOG_H
 
index 0880781ad7b699811d5971cbf18f3cd2ccd3082d..a33000da7229cc00a76a1fa27029a366f51086e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NETFILTER_NF_NAT_H
 #define _NETFILTER_NF_NAT_H
 
index 871afa4871bf386ba08cf15f9bdae55f2ec6a68d..a3ee277b17a17885f27c73e8d0f66dc8117817aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NF_TABLES_H
 #define _LINUX_NF_TABLES_H
 
index 8310f5f765519ef6da04664d323fa657f5b97a2a..0e2b9fcb71b767c07d72f0d8cddd965ef6b0c7d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NFT_COMPAT_NFNETLINK_H_
 #define _NFT_COMPAT_NFNETLINK_H_
 
index a09906a30d771699f21c636655e634884110efcf..5bc960f220b334622aa6e1644fab61e729ff4d74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NFNETLINK_H
 #define _UAPI_NFNETLINK_H
 #include <linux/types.h>
index 36047ec70f373099c27e0b880438bf2e2af09035..7cb66d3218fc389ff68a7513cb22a603b76edcfe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_NFNL_ACCT_H_
 #define _UAPI_NFNL_ACCT_H_
 
index ffb95036bbd4956fb19822e1789af146e75884a1..93bcdccef81db15a07029d061c47c2c3ace1efa7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NFNETLINK_COMPAT_H
 #define _NFNETLINK_COMPAT_H
 
index 6deb8867c5fc000f357b959065076fdbf5082486..7397e022ce6e8f456f801b9716489027965f32d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPCONNTRACK_NETLINK_H
 #define _IPCONNTRACK_NETLINK_H
 #include <linux/netfilter/nfnetlink.h>
index 33659f6fad3ee00468def1aa7889b79a1310e9ef..a13137afc42994b75b9730e843d3e3ec59967fbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NFNL_CTHELPER_H_
 #define _NFNL_CTHELPER_H_
 
index f2c10dc140d60934cdaf938ded428a7d517e5a87..6b20fb22717b249bcea8c354ef997ca0e04564b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _CTTIMEOUT_NETLINK_H
 #define _CTTIMEOUT_NETLINK_H
 #include <linux/netfilter/nfnetlink.h>
index fb21f0c717a12ef0dad7dc4ccbb33e2f10e8288b..20983cb195a0f77926c2b7b23c63b5d1ec8417bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NFNETLINK_LOG_H
 #define _NFNETLINK_LOG_H
 
index d42f0396fe30841474082fb708b9e3540b3f5d80..bcb2cb5d40b9f911ece7bc528180965a381e6714 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _NFNETLINK_QUEUE_H
 #define _NFNETLINK_QUEUE_H
 
index c36969b91533471f4ceac8f98b6bc9867689b753..a8283f7dbc51911740202e543be6c2a2354879ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_X_TABLES_H
 #define _UAPI_X_TABLES_H
 #include <linux/kernel.h>
index 38751d2ea52b745c33c77074de178cadde32214d..1b314e2f84ac727397fa5bc167cae33e5203c82b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Header file for iptables xt_AUDIT target
  *
index 9a2e4661654ec4e915530129e9ec1ab7253ec36c..c578088e61b93d33e57c380c8b740a2fb6d1e319 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Header file for iptables ipt_CHECKSUM target
  *
  * (C) 2002 by Harald Welte <laforge@gnumonks.org>
index a813bf14dd632dcb78e2d301a63e73f9e74997f3..fe059a98c1d32609f6c27024535415bf69417519 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CLASSIFY_H
 #define _XT_CLASSIFY_H
 
index 2f2e48ec80238ad5fa0dc26f5d2f5a8355b8d8e5..36cc956ead1ae83177c9fb28313a8df6e852f5e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CONNMARK_H_target
 #define _XT_CONNMARK_H_target
 
index b973ff80fa1e29cbb67dff66bd1d9bc4960e8e1f..ca078bb3c58415d05819d4c19ed46e04c414842b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CONNSECMARK_H_target
 #define _XT_CONNSECMARK_H_target
 
index 9e520418b858d5f5a355ee8514f5f1d3ee4a827f..868fa08e1fbb91e80ab365e23f445104a12b11be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CT_H
 #define _XT_CT_H
 
index 648e0b3bed29a40c753582ed814b9c5f01d736bc..223d635e8b6f77e467c615391b725901e18618ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* x_tables module for setting the IPv4/IPv6 DSCP field
  *
  * (C) 2002 Harald Welte <laforge@gnumonks.org>
index 3fb48c8d8d78f0eb18a09edbac697766d2d9bde7..2d4b751a7115f8d8d88117cf97710d6a0a15ad1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef XT_HMARK_H_
 #define XT_HMARK_H_
 
index 208ae938733143ce0ba2117378423d443a3d8312..3c586a19baeab5ab683c0c6eb03c948f96701710 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/linux/netfilter/xt_IDLETIMER.h
  *
index f5509e7524d3c80b96420ae54c21a3528925e036..4fe0f139580757f465e0c7cc9c819d1381fb456a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_LED_H
 #define _XT_LED_H
 
index cac0790953059f0106e242eed82993f4bfab6100..167d4ddd2476b6aafb9e91d8c9517d88862e124c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_LOG_H
 #define _XT_LOG_H
 
index 41c456deba222e25ab188559fb81605cd42353d5..f1fe2b4be9332cfc455d1b485eb70ad05859c499 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_MARK_H_target
 #define _XT_MARK_H_target
 
index f33070730fc8a757dd67f1aa659afa0d3dcf7188..517809771909aab4672d2a71d999670e48b37e06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_NFLOG_TARGET
 #define _XT_NFLOG_TARGET
 
index 8bb5fe657d34bbeba55f1026cbc667745c52fd42..bb767fd73ed11109a22f0821ded0a17d886ab41a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* iptables module for using NFQUEUE mechanism
  *
  * (C) 2005 Harald Welte <laforge@netfilter.org>
index ec1b57047e03fc003e9204965bd565e1a06ca50f..2b87a71e6266e477853cb38693fdf15dcbbd7a07 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_RATEEST_TARGET_H
 #define _XT_RATEEST_TARGET_H
 
index 989092bd6274b44585ccc0faf4f005a0d7b909b7..1f2a708413f5db0c8c3a9fb0548e5fd991d9b57a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_SECMARK_H_target
 #define _XT_SECMARK_H_target
 
index ca67e61d2a619e6a017e0d254844cbc49ab96629..ea5eba15d4c1be75ad1bf5b0c1234a02826cf90a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_SYNPROXY_H
 #define _XT_SYNPROXY_H
 
index 9a6960afc134f1e4081c499a40781d84ce146f34..65ea6c9dab4b6473314727ea69b98670c17afac2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TCPMSS_H
 #define _XT_TCPMSS_H
 
index 7157318499c27b3c96b0e07ae19413fcbe94a827..6bd51cd6f8dad93f152f7ddf565e3bdde57fd9d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TCPOPTSTRIP_H
 #define _XT_TCPOPTSTRIP_H
 
index 01092023404b9b663b11134953a79c6a9bb46113..eb854917f8281230fa1be870d8b70858d679e726 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TEE_TARGET_H
 #define _XT_TEE_TARGET_H
 
index 8d693eefdc1f9a0fd3d82a969431073060ff86fc..348957b02a8248ebc21c82144d8bb70750103a60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TPROXY_H
 #define _XT_TPROXY_H
 
index b156baa9d55e75fbe66a691ac9c2ee76d8f230af..2102dff74c31307e8dc1a0bc2adbb6ff8506ef09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_ADDRTYPE_H
 #define _XT_ADDRTYPE_H
 
index b97725af2ac0ef14893ec459701a2d1ae4ac76a4..a05adda26d3e61330cf0d169d6ecb921958d4471 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_BPF_H
 #define _XT_BPF_H
 
@@ -23,6 +24,7 @@ enum xt_bpf_modes {
        XT_BPF_MODE_FD_PINNED,
        XT_BPF_MODE_FD_ELF,
 };
+#define XT_BPF_MODE_PATH_PINNED XT_BPF_MODE_FD_PINNED
 
 struct xt_bpf_info_v1 {
        __u16 mode;
index 1e4b37b93befd7a29cf6fe07580f34a855df5156..e96dfa1b34f7ff8a118105b936b2e1324d7ebe94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_XT_CGROUP_H
 #define _UAPI_XT_CGROUP_H
 
index 9b883c8fbf548bb34ab0e97ff48944d85a93d012..ed8e0561f99c6975fe3f9af1483b0ba3d1351790 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CLUSTER_MATCH_H
 #define _XT_CLUSTER_MATCH_H
 
index 0ea5e79f5bd73fade99d020a96b68c55a8c32224..85d2840825426a432fd5722c0e528ceef312dd1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_COMMENT_H
 #define _XT_COMMENT_H
 
index f1d6c15bd9e37edce2efa073424dee386984367e..0bae507db23e6f17ace3d71f35341fce1cca347f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CONNBYTES_H
 #define _XT_CONNBYTES_H
 
index c4bc9ee9b3303ca17c3937525dfb908bc57f613d..2312f0ec07b2791ffaece0a95eebaefa727f14be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <linux/types.h>
 
 #define XT_CONNLABEL_MAXBIT 127
index f1656096121e045ff8dcd8ab4d140e7c9a312396..07e5e9d47882cb82cc0900fc66c50470e065f1db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CONNLIMIT_H
 #define _XT_CONNLIMIT_H
 
index efc17a8305fb71f93741ad1579dae6f9da3075d1..408a9654f05ca19717e58bf0a5f22f298548abdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef _XT_CONNMARK_H
 #define _XT_CONNMARK_H
 
index e5bd3083a8431c320152368885038413f18cb72c..cdd14a83d29db5ae3ee61e25dd6268c62d2b97f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /* Header file for kernel module to match connection tracking information.
  * GPL (C) 2001  Marc Boucher (marc@mbsi.ca).
  */
index 93c7f11d8f421bf70b83a4ba65c8654bebedd898..b442e1f6f598f6dd3b5686fdde7f9e4853c45fd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_CPU_H
 #define _XT_CPU_H
 
index a579e1b6f04080fbb92a2f6ba171c80e50c7283c..564e61c5703f2a7c928f0d55cafac214fb906486 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_DCCP_H_
 #define _XT_DCCP_H_
 
index 1babde0ec900b9a25cfc973797e7f280ffd14626..79ed351a45250551d43c2ca2ab09f0c31856e870 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_DEVGROUP_H
 #define _XT_DEVGROUP_H
 
index 15f8932ad5ce64ea4adceaa6dd764dda9c233bf6..7594e4df8587aef4e818c7cf79ea2c890d775318 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* x_tables module for matching the IPv4/IPv6 DSCP field
  *
  * (C) 2002 Harald Welte <laforge@gnumonks.org>
index 7158fca364f2e6e99d8065c56b96d95181e45f5a..2c301c1cbff2ceeb4ab55d5b7db274b21bcdb538 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* iptables module for matching the ECN header in IPv4 and TCP header
  *
  * (C) 2002 Harald Welte <laforge@gnumonks.org>
index ee68824080003987e31f21f2a86d08b5b3fdaa27..fa57a208f684122a76735a2078831dad9bd4d787 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_ESP_H
 #define _XT_ESP_H
 
index aa98573248b1d0fdfda8794e4dc332c87311d5f8..721a8de6c5b3b6e27717ebb4737e66d43dc20376 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_XT_HASHLIMIT_H
 #define _UAPI_XT_HASHLIMIT_H
 
index 6b42763f999d40e203e58579d40fe338bfb899cf..53aa1458d6b7e3b0959f4e97d3964beb0a8cb029 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_HELPER_H
 #define _XT_HELPER_H
 
index 45c7e40eb8e193e4e042c62b94fdfaaa785070bf..69b12e76eaf7f944c3bd670eff87509c497c19f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_IPCOMP_H
 #define _XT_IPCOMP_H
 
index 25fd7cf851f016805378560b37a57cb350b310f7..551bec7a22fc15ba9c5b5c0372360bc75fc38469 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NETFILTER_XT_IPRANGE_H
 #define _LINUX_NETFILTER_XT_IPRANGE_H 1
 
index e03b9c31a39dd6ec5a93d8091d2680d69bd18b15..925c76996dc424896c299dfbd18fd92f76aaeb63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_IPVS_H
 #define _XT_IPVS_H
 
index 7dccfa0acbfa1728da7b70dd602380aa04ff08c2..990b52a49fabff9d57f0b99db4f0f8171f408ffb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NETFILTER_XT_L2TP_H
 #define _LINUX_NETFILTER_XT_L2TP_H
 
index b82ed7c4b1e0db1a9907ba6c69c6f84439dd4255..513f653e2f6b0908b8a5b9fcbb4441307e14b2a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_LENGTH_H
 #define _XT_LENGTH_H
 
index bb47fc4d2adea1921124d5aa7e9702f179317596..1d6e4ce9a6468cfbd91a78375d0ef7772f811684 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_RATE_H
 #define _XT_RATE_H
 
index 9a19a08a9181ced89c5efd980ad08deb78440eef..c4dd5185cfc416b1590176f6c50fd467bfdfd851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_MAC_H
 #define _XT_MAC_H
 
index ecadc40d5cdedcfc3ec4b17ecdc8273c46395316..9d0526ced8f0dbc3696b8eed59b3d4cf0b711098 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_MARK_H
 #define _XT_MARK_H
 
index 5b7e72dfffc568793d3519d9d6140ffec4bcde59..ffecf696454bd8b0d94616c27e914d149cb99489 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_MULTIPORT_H
 #define _XT_MULTIPORT_H
 
index 3e19c8a8657685a150e5d0b6e0474b5768e9b176..5c8a4d760ee3443c0292112f18852a807b037184 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_NFACCT_MATCH_H
 #define _XT_NFACCT_MATCH_H
 
index e6159958b2fb041ad765567b93bec327d3ffbc24..dad197e2ab99b2cf3a3df707b9934afbe54fe85d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2003+ Evgeniy Polyakov <johnpol@2ka.mxt.ru>
  *
index 2081761714b56cba415b413f7801ef113230407a..fa3ad84957d50d9e236f84aabb05679676b285ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_OWNER_MATCH_H
 #define _XT_OWNER_MATCH_H
 
index ccdde87da2145b71be0afd93034d05c2df33d5db..06ae115e9a91bc96d6b32ae857611417a3409d0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_XT_PHYSDEV_H
 #define _UAPI_XT_PHYSDEV_H
 
index f265cf52faea2bc9df28a1417cda32b96cbaf27c..c31f29d2e723324cfe50d9169e39a4b624d2ef35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_PKTTYPE_H
 #define _XT_PKTTYPE_H
 
index d8a9800dce61378b9bbdebfb47298d9d44093ddb..323bfa3074c59a3e33940be9dd5c8dddc0adbefa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_POLICY_H
 #define _XT_POLICY_H
 
index 9314723f39ca19bb4f257e60f711ffedaaa52ee1..f3ba5d9e58b6da4120db1c87877937315e68bbbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_QUOTA_H
 #define _XT_QUOTA_H
 
index 13fe50d4e4b3a0ebd2702ab7156c3cf9c4494afc..52a37bdc1837a2731e1293a8cb884d819767fd18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_RATEEST_MATCH_H
 #define _XT_RATEEST_MATCH_H
 
index d4a82ee56a0297979f380a1da7990331686d66fc..252aa9f79cf8f5ac0ad5dcc2d3a623bd1f27d7d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_REALM_H
 #define _XT_REALM_H
 
index 955d562031ccb4e21c00ff16bb32e38c215a3404..e2c33996a8024e13d7366ef982752cb57a224c8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NETFILTER_XT_RECENT_H
 #define _LINUX_NETFILTER_XT_RECENT_H 1
 
index 8358d4f71952107e51e29ff1f974963a9ba35873..9b3d0f25a39c92023fe07d2a62d36980b9f30042 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_RPATH_H
 #define _XT_RPATH_H
 
index 58ffcfb7978e7ebaac2973784498e3cbf1c6e8d9..4bc6d1a087816a67a560ccf333af3a8bab1cbfc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_SCTP_H_
 #define _XT_SCTP_H_
 
index d4e02348384c6386163535ff5f1dffdf32ab257d..8c1ca66c8a0607bf49fd8e08f95a71e054ea7619 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_SET_H
 #define _XT_SET_H
 
index 87644f832494997ccc97af831a5fe63b7d183e5f..a7bdc9d882b0a886c6e2c24b49a8466f8b4b4424 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_SOCKET_H
 #define _XT_SOCKET_H
 
index 7b32de88661342f8fe032a018dbb2870ee11c703..fe5670ef6aad62d48492c12faabf7fd980713953 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_STATE_H
 #define _XT_STATE_H
 
index 4e983ef0c968a9e7d789fa89b9e3cfd10f9e859e..bbce6fcb26e3a4c0752007a84563164478dd2896 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_STATISTIC_H
 #define _XT_STATISTIC_H
 
index 235347c02eab523e0d10b7da92027e56685f460c..bedb015d54dd661533715b64d061687d8cecda1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_STRING_H
 #define _XT_STRING_H
 
index fbac56b9e667ec7784d2c3545ba01122fb28a8d4..2268f58b4dec79b76e2405928e416a3c8a954787 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TCPMSS_MATCH_H
 #define _XT_TCPMSS_MATCH_H
 
index 38aa7b399021f49c9548f9f8302855104b54a8ae..658c169998197f7e8c02ca590e4ca8d9661c1336 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TCPUDP_H
 #define _XT_TCPUDP_H
 
index 0958860193963e3b4290c0e053932edc6274ea65..7f707c7ec858b0123f31be7ce715dcd2dce7f807 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_TIME_H
 #define _XT_TIME_H 1
 
index 04d1bfea03c2cbd9ba4a9c2575e44ef1e9766cd1..a88505ca72f85806dbbdad8168610e348553fc0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _XT_U32_H
 #define _XT_U32_H 1
 
index 92bc6ddcbf73221e6ee3c3c70eb9fb1c289fc131..81b6a4cbcb724ea7c357dc12ebb4031a9996c262 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 #ifndef __LINUX_ARP_NETFILTER_H
 #define __LINUX_ARP_NETFILTER_H
 
index ece3ad4eecda2ffcf47ac5e3795472aaf6ff734d..a2a0927d9bd6b70094729ac83b7cc6004a70c832 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     Format of an ARP firewall descriptor
  *
index 8c2b16a1f5a0b3c02dfbb754b0aed1b96f866758..60135d5cc22351a2dcc616151b8ca77cf5b2fc1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ARPT_MANGLE_H
 #define _ARPT_MANGLE_H
 #include <linux/netfilter_arp/arp_tables.h>
index 514519b47651fc446268e708f76fc4fb8dab45e9..12fb77633f83c9bfe0c816d0b9d1ee846f648a87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_BRIDGE_NETFILTER_H
 #define _UAPI__LINUX_BRIDGE_NETFILTER_H
 
index f37522aade24e6b96e4c0c30670dcf833bb896ed..03463e4b0246084adc4188e7958cd63c410f4d36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_BRIDGE_EBT_802_3_H
 #define _UAPI__LINUX_BRIDGE_EBT_802_3_H
 
index bd4e3ad0b7067da89fac177a4de92fb5fcf14533..9acf757bc1f79328c8693b1edac37d1b36b8d225 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_AMONG_H
 #define __LINUX_BRIDGE_EBT_AMONG_H
 
index dd4df25330e8422fdb7005cfa20ef8dcc57ebe45..628b4fdae5425a7b42657ef2685981377724a049 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_ARP_H
 #define __LINUX_BRIDGE_EBT_ARP_H
 
index 6fee3402e30799dd0fae78ac8f7fc0359cf845a2..ed41ae053597eafb7992e56433b8c556f08d25e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H
 #define __LINUX_BRIDGE_EBT_ARPREPLY_H
 
index c4bbc41b0ea47c576d4649262fc337f445fb0601..8e462fb1983f23be907e15f3380c79a39de37e29 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ebt_ip
  *
index a062f0ce95f9558b61a8864633ba246360e077b8..057945dd66bc4a91b6fee08c4c9fa8c9cee2d4dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ebt_ip6
  *
index 66d80b30ba0e2779b4798ec8d0affc3fa0722815..c2ac02e1fab64b16288ba3a706c750a228193219 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_LIMIT_H
 #define __LINUX_BRIDGE_EBT_LIMIT_H
 
index 7e7f1d1fe4946808655c1582b76930dfdf39adb1..f6724155af919980e319509104b3044720f335f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_LOG_H
 #define __LINUX_BRIDGE_EBT_LOG_H
 
index 410f9e5a71d44c44ac5592aee4420e0bdafc1976..098ac78cd1e635590ed8b30136bf6ecfa4855f17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_MARK_M_H
 #define __LINUX_BRIDGE_EBT_MARK_M_H
 
index 7d5a268a43111401644615474570b96a88e295d6..8810f1c12af3572aa6ccb60a12c585162d02978f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_MARK_T_H
 #define __LINUX_BRIDGE_EBT_MARK_T_H
 
index c990d74ee966612c1bcc495bc559cd96436d97db..49da2f9be021de5f461580edf3e5fdbfae8ef234 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_NAT_H
 #define __LINUX_BRIDGE_EBT_NAT_H
 
index df829fce9125d6f3120d7d3e1b5ad367f99c1dbb..f5cdc068c2647828894913d1748251e069ca45f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_NFLOG_H
 #define __LINUX_BRIDGE_EBT_NFLOG_H
 
index c241badcd036a3b403e7e15abc7c010d3a546cbd..32c5d08b31d3b0bb7b674f9a40ea61e0910058c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H
 #define __LINUX_BRIDGE_EBT_PKTTYPE_H
 
index dd9622ce848837f554eb8acabd262366504b3068..dc7a7ce259025049e6538028f1bc4d6b2825a18b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_REDIRECT_H
 #define __LINUX_BRIDGE_EBT_REDIRECT_H
 
index 1025b9f5fb7ddd2657de1b28866f898a0a19bab7..94f68dedc3f6627e3c8f80c848e517f1c3418d62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_STP_H
 #define __LINUX_BRIDGE_EBT_STP_H
 
index 967d1d5cf98d81e88413f0d9dc2f6a1ecdeeff16..fb0d8f604c231b938019ee9341248f06498f61b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_BRIDGE_EBT_VLAN_H
 #define __LINUX_BRIDGE_EBT_VLAN_H
 
index e3cdf9f1a259c3e517bfddeb6dc04ac5d49bf3d7..9ff57c0a019901302421c9ef4f72f7128c7bba1e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  ebtables
  *
index 0b09732aacd5a196721f79243d157339af66a7a1..9089c38f6abeaf8a6a8350ca74aa2a2849ea2c83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_DECNET_NETFILTER_H
 #define __LINUX_DECNET_NETFILTER_H
 
index 91ddd1f6fd4b817dfd628e9e6976c470b44f311e..e6b1a84f5dd31ccd6aceecb1058e76dfa4f3ae0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* IPv4-specific defines for netfilter. 
  * (C)1998 Rusty Russell -- This code is GPL.
  */
index d0da53d96d930cad4d46ad7134d2ee9496aedd5e..6aaeb14bfce1ecf5fac5ffa6fa85c76d4a3b9f30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * 25-Jul-1998 Major changes to allow for ip chain table
  *
index eac0f6548f47f17cd918e50b835cc14078f81df0..ff6599494fe6bbc82bcba27740a241956c7bb7c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPT_CLUSTERIP_H_target
 #define _IPT_CLUSTERIP_H_target
 
index bb88d5315a4dd7bdd793b2b165a153143fcb19b3..e3630fd045b8dd92c003c14f07845e76aeffd252 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Header file for iptables ipt_ECN target
  *
  * (C) 2002 by Harald Welte <laforge@gnumonks.org>
index 5d8152077d7154324d61e5bd8241cdcb450c22d7..6dec14ba851b2e81fb3e23c5b21be57c8e78a1e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPT_LOG_H
 #define _IPT_LOG_H
 
index 4293a1ad1b016046ef55ce89576680b6d2d2b158..ae61ddd328b0d45664acc07b5075bf10269819fe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPT_REJECT_H
 #define _IPT_REJECT_H
 
index f6ac169d92f9bbc6751a930ef0ed64d752dd4542..57d2fc67a94371575691577db0038a076eeb8779 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* TTL modification module for IP tables
  * (C) 2000 by Harald Welte <laforge@netfilter.org> */
 
index 4e02bb0119e3c131575118b6f0cf0d868f7de722..606ce90dbf832d7771ca10bd4a1201b1087108d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPT_AH_H
 #define _IPT_AH_H
 
index 0e0c063dbf60739173dae6d8d97cff16692cbf5d..8121bec470267ad38f9fcbf83c460d985ac2721c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IPT_ECN_H
 #define _IPT_ECN_H
 
index 37bee44424860f19e801f1d431b93c9facf3e1cf..ad0226a8629b217856d1153dac329c73fcb93019 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* IP tables module for matching the value of the TTL
  * (C) 2000 by Harald Welte <laforge@gnumonks.org> */
 
index 12497c6c7949c9c4f5c2741afaac76bdbb988564..2f9724611cc245c3e6b57b4051ed550d0c4c6f19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* IPv6-specific defines for netfilter. 
  * (C)1998 Rusty Russell -- This code is GPL.
  * (C)1999 David Jeffery
index d1b22653daf2cb131c23b67a3f66ed8e1263186d..031d0a43bed26f939d3dd4806af88a408c069823 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * 25-Jul-1998 Major changes to allow for ip chain table
  *
index ebd8ead1bb63e52a81fc73eb847fbb9cf5861273..eaed56a287b47ceb34e3b6c3754d7241a3dd98cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Hop Limit modification module for ip6tables
  * Maciej Soltysiak <solt@dns.toxicfilms.tv>
  * Based on HW's TTL module */
index 3dd0bc4e07358612622e41a30fdc9fd374b5250b..7553a434e4da5bee425dfdd9baed912915cf276b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_LOG_H
 #define _IP6T_LOG_H
 
index f763355481b5db51662cb01c0970f6fdd027da1d..422aef07657a9d3b55ef9122651f17f973f72f88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __NETFILTER_IP6T_NPT
 #define __NETFILTER_IP6T_NPT
 
index cd2e940c8bf531adb6d88f9965f08487d50f7c2f..158ffa5f45b766b8adec9cfba97569191b80eccb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_REJECT_H
 #define _IP6T_REJECT_H
 
index 5da2b65cb3ade90c6ab2c515b86277812ec20a66..9a4174e08f9cf21b4d316c5180a51ab39a668002 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_AH_H
 #define _IP6T_AH_H
 
index dfd8bc2268cf274d71cecad52b4fd068a9724c97..9acac816bba3c2bf1ae3e7166185bb1f87eeb838 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_FRAG_H
 #define _IP6T_FRAG_H
 
index 6e76dbc6c19aa0c7f0d15205535501f0035acdcb..6b62f9418eb213597665dc82e700005b5284fa8b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* ip6tables module for matching the Hop Limit value
  * Maciej Soltysiak <solt@dns.toxicfilms.tv>
  * Based on HW's ttl module */
index efae3a20c2141f9212dcfb37539efdb0f090e599..5a519691476410f356241c9697620eac4cee0d1a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* ipv6header match - matches IPv6 packets based
 on whether they contain certain headers */
 
index a7729a5025cd08a7fee0da40169e5d1d451b1f34..906196283185a566599d21a7d0e7f84b896fafd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_MH_H
 #define _IP6T_MH_H
 
index 17d419a811fdfef99678bf12d9bc060fccb7192b..79f9a477c5ac761bc383653ecd7d463d09b0c58e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_OPTS_H
 #define _IP6T_OPTS_H
 
index 558f81e46fb947ff75f1b211cb60e1d9742a22ab..9c23e8ad20b9d1065804c305041e1c03106877b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _IP6T_RT_H
 #define _IP6T_RT_H
 
index e8af60a7c56dce757ba5557898e1b5ca2ebaf14c..776bc92e91180725e75f0291b1635234d6b6875f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_NETLINK_H
 #define _UAPI__LINUX_NETLINK_H
 
index 6dcd4de3397b393eb64c9da83e898484af65fda9..dfa61be43d2f080fdb5fc1850358a6190411a65a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __NETLINK_DIAG_H__
 #define __NETLINK_DIAG_H__
 
index af7313cc9cb6b2774ec7c7c3edd20d34e0b3a93b..7498ea3c3940520c12b274e68b0f71d906e96984 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * These are the public elements of the Linux kernel NET/ROM implementation.
  * For kernel AX.25 see the file ax25.h. This file requires ax25.h for the
index 5e6296160361cc7b7a7b9d80411ef172c3a453c7..057d22a484169573a372479f3eb53afa21e5c442 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * NFS protocol definitions
  *
index fde24b30cc9e84ff820e3d4873a2f67609e49a16..e0237e0985b9d62ca8d06d17300c8961c621674c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * NFS protocol definitions
  *
index 231ef4e6982957c23b6779be61aa6d3cbcf117cf..37e4b34e6b43568be22a1899050843e692786d5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * NFSv3 protocol definitions
  */
index 4ae62796bfdeec2570811ff4e8c43a332f6a6848..8572930cf5b001b73b6316a11a60b22ad04350b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  include/linux/nfs4.h
  *
index a0dcf66556571762c0715551da7d2023d0cbe980..d20bb869bb99542c0d79bab9d4e7b70890c691fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NFS4_MOUNT_H
 #define _LINUX_NFS4_MOUNT_H
 
index 49142287999c72cbf03679cfa3afbd9e10df12d1..7bcc8cd6831d217170e41406595d0db8cd90db24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  linux/include/linux/nfs_fs.h
  *
index 64b0f22f5c4c6ae96612adf41ed2414751c2315a..e44e00616ab5f6fbbd9027e07d898e36525c741e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_NFS_MOUNT_H
 #define _LINUX_NFS_MOUNT_H
 
index 5527266311624df58f08ae8fec7d531972db2405..ca9a8501ff3049bbdff93a1471164619e4f54624 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * File: linux/nfsacl.h
  *
index ec260274be0ced9fd057cb2d3f78c9c7b6b622e9..f8f5cccad749262bc48d3c8dfafc35774db65485 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Upcall description for nfsdcld communication
  *
index 28ec6c9c421acf689088a2fe00cd5f04e7b6cd1d..7301cdc79a3356455f29ba43f0556800056af211 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/linux/nfsd/debug.h
  *
index c3be256107c6421432e8a63b041306e224874c2e..2124ba904779d3d4c713eb3a743bc8eb621eee94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/linux/nfsd/export.h
  * 
index 20391235d088913e239e974d1c21ce22d73e4fc7..ff0ca88b1c8f64a324ff651e561852d7f0d8bf80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file describes the layout of the file handles as passed
  * over the wire.
index 9fb7a064426352d3843aab65df22bbc24c03b02a..b1a38ae14a0266fe7ac3d5ad06c53e629798141d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/linux/nfsd/stats.h
  *
index ef4c1de89b11c1c7ebab481e6ea821bbb6ebb0a1..8b9b89104f3d2ff0e57211f528ccc02680f574c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * nilfs2_api.h - NILFS2 user space API
  *
index 2a8a3addb6757c6cb8de9f2c4681a00ce7b1f89a..a7e66ab11d1d656d8fb9f861f4b46949a7ac124b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * nilfs2_ondisk.h - NILFS2 on-disk structures
  *
index 1a3ca79f466bb2cd7ea70f3bd1dc38f4fa2d2151..a0c8552b64ee04375cf9409b3a48f1b5230bc11e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_NSFS_H
 #define __LINUX_NSFS_H
 
index ac516064f0ee7882227520a201067e91c648c8e4..f3776cc80f4d02207a5431c3352b2a47a2960e3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
   nubus.h: various definitions and prototypes for NuBus drivers to use.
 
index 50ff21f748b6fed290490573e924f0539e79e85e..6e74b1eaf541e0bec5b30c21861ced0adbc3c1e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for the NVM Express ioctl interface
  * Copyright (c) 2011-2014, Intel Corporation.
index 0986c4337383ce4cbcbedb0ced1a871ac81064ee..4bee8e72dab4acb6fee20dea46c0502be319b5ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_NVRAM_H
 #define _UAPI_LINUX_NVRAM_H
 
index c090cf9249bb68b6d1bcf1dec4d8e70f63e03137..1a920145db04bba0ee8e99f16d50d19b5f57bca8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * omap3isp.h
  *
index 7c97bc00ac6d9682ddd8ae32e7ce69d16f4ad116..44f43af4c699a320e31365c544c1b615fa5dbef6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * File: include/linux/omapfb.h
  *
index b29272d621ce21162dc148217e4b6e89f72304b1..750b1c5a4decfa9f93550952f88ce60ad7712133 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__INCLUDE_LINUX_OOM_H
 #define _UAPI__INCLUDE_LINUX_OOM_H
 
index 156ee4cab82e5e73bc2705a4707c04c1cf788b98..36d0b161e06688a3968f1b8923212928f14fd903 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 
 /*
  * Copyright (c) 2007-2017 Nicira, Inc.
index 0c5d5dd61b6ab1d2039686d25683e6dffa1f634e..349ddf0a96af505d8c823e9c3da7577860fe5581 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __PACKET_DIAG_H__
 #define __PACKET_DIAG_H__
 
index 092e92f67b500704b243b04d74232ebbd662aada..94e0c57a75b7a5cc2b4a26dd324deb6f6deec7c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_PARAM_H
 #define _LINUX_PARAM_H
 
index 1bda0e56bc5ebd0df7fa314b41803c3ed3996794..3eb246e94733f22c137e3b1b7bd97a93dad6dfdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * <linux/patchkey.h> -- definition of _PATCHKEY macro
  *
index 3c292bc0d1c1781cbdb40d78bf12c1a3444553ec..a769eefc513948b65ce39a4d66f533288b32c7fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     pci.h
  *
index f8d58045926ff11d23cd8e575e550badd78e3237..87c2c840b27d41e996e6f2e2160095da35bc8ec3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     pci_regs.h
  *
index a6aa10c45ad169684923f7b9efcc53345a45b98d..953cf036cb26491e0b569ec2559a9e52f5ddfb95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /**
  * pcitest.h - PCI test uapi defines
  *
index 140ae638cfd618b931ec1d298a80d1dffa4c1680..362493a2f950b3024efae42ac321454ab66d845d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Performance events:
  *
index aa169c4339d20de36472c84f6ba3a4732b2276e6..49796b7756af08b4c867882376bfd62f8c5cb355 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_PERSONALITY_H
 #define _UAPI_LINUX_PERSONALITY_H
 
index ada7f0171cccd3174810d1c9c0d6ea566c558c0a..d65b117852604ff00ea34ef1e764fa4a63369c94 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* PF_KEY user interface, this is defined by rfc2367 so
  * do not make arbitrary modifications or else this header
  * file will not be compliant.
index db994bb0c79425eeeea0e355892527b89b1a9363..364c350e85cd346d33ce139c51307595d132c94f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*     pg.h (c) 1998  Grant R. Guenther <grant@torque.net>
                       Under the terms of the GNU General Public License
 
index 94dd6645c60ad942b4996363cecdbce30a032e84..dbef708ab3b4ef250edf9be6c22cfe26aa112fcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (C) 2005-2007 Jiri Slaby <jirislaby@gmail.com>
  *
index a3e1d65b3ed90d48b50b7d4e734fb788f6004f0a..a2f6b37a593723c4186ed553238d808471761a9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /**
  * file phonet.h
  *
index d5e2bf68d0d4038ab51a3799636ac16c1f63cf4f..46c506615f4ad7f103ec7a479bf70911c480fff0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_PKT_CLS_H
 #define __LINUX_PKT_CLS_H
 
index 099bf5528fed30008bfbde3529315be35c0411f9..703cd9df6cefde8e729e0e987ae9a3ccfaa98551 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_PKT_SCHED_H
 #define __LINUX_PKT_SCHED_H
 
index 2640b9d4e2430a43c98237511effe70f1d08eb95..9cbb55d21c94af1f3fb91d8ad346608a7f34d9a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
  * Copyright (C) 2001-2004 Peter Osterlund <petero2@telia.com>
index caead364b6eb3aa651838504cce93d2256d696ba..89cb1acea93a3d54385655d886ee657b31796d8f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for talking to the PMU.  The PMU is a microcontroller
  * which controls battery charging and system power on PowerBook 3400
index 1037cb19aa17cd42ade43546a896e00d98024aec..217e4e26ab608dd26e0d407cd6402bc6eb9d91e5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2002 Andreas Gruenbacher <a.gruenbacher@computer.org>
  * Copyright (C) 2016 Red Hat, Inc.
index 8b579844109bc5e8f22b23f4e744394aea7b6107..506380f0b91b37663d63d240f75763f095c21ad7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2002 Andreas Gruenbacher <a.gruenbacher@computer.org>
  * Copyright (C) 2016 Red Hat, Inc.
index 988f76e636e36912052b4d951173b304a07f476a..9a7a740b35a2c97b178228c291edbe04af84a2a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_POSIX_TYPES_H
 #define _LINUX_POSIX_TYPES_H
 
index dc18c5d23ebe4086518512ca8bb2cd8dfd8157bd..8fe3c64d149e7504df02d6900566f60bc49dd0a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * linux/include/linux/ppdev.h
  *
index 0a15bbb04e195d54db56bc3cbf3128913b2b3c1c..0fb7623e95484bef69ac1de22d54463e61a5d4d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ppp-comp.h - Definitions for doing PPP packet compression.
  *
index 63a23a3b8bb75c47e721688a6a5c0b6e6d36f033..b19a9c249b156f5877a0e8651a1d4d2330f6088d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ppp-ioctl.h - PPP ioctl definitions.
  *
index 283fc05dbbda9eb0a0a99baa8d36197a16c030a2..fff51b91b409034a75c5073b753eddc1d7e63ec7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ppp_defs.h - PPP definitions.
  *
index c29d6b791c0816e35b0e025b80ed8d9f0eb0400a..009ebcd8ced5e2f860486d4d7a537207a7353dad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * PPS API header
  *
index 645ef3cf3dd08a7d0494cfb509a30c42c3b053c2..ccc78cbf1221b95617f5927be44785e35a71a10c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_PR_H
 #define _UAPI_PR_H
 
index a8d0759a9e400c5d472fe37d13a924bc9e9777a6..b640071421f709e783f839b3d4c17344d8c86dac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_PRCTL_H
 #define _LINUX_PRCTL_H
 
index ed48996ec0e83d47f39123f7c2c93034ab7d9fca..ce1116cff53d81ef6d1c831c9708fe31acd90a77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UAPI_PSAMPLE_H
 #define __UAPI_PSAMPLE_H
 
index 3d7a0fc021a75a7b52c725c151dee15eb9fc5830..760e52a9640feb3670404861186939d0bf80e5cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * ARM Power State and Coordination Interface (PSCI) header
  *
index ac6dded80ffa9282506eb8d26a50cb60646014f8..3039bf6a742e1ad0a4bec0a42d2c73768c4080ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * PTP 1588 clock support - user space interface
  *
index fb810650900029cf1a933a7eeec033e6dc7269d6..e3939e00980bb7976b0192a55581df2e8e005b15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_PTRACE_H
 #define _UAPI_LINUX_PTRACE_H
 /* ptrace.h */
index 8b9aee1a9ce3482fe143278f1724739dcf082967..31487325d265739cc4fbaccf83126fca484d3406 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Name                         : qnx4_fs.h
  *  Author                       : Richard Frowijn
index bebbe5cc4fb8f463c0532ac2fc1f44037834f3ec..eacfab10e821f62f2f90367bee8e9aaa80366045 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Name                         : qnxtypes.h
  *  Author                       : Richard Frowijn
index 9d76c566f66e83b67d4abdc295731031e2362377..5d9aab1f1893e4f72096ff5cb9ad3f68a580d3c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
index 8c4bbdecc44fd2af5ce50a69b8869f00f41ebbf1..86eafb805ed903290ef6300dd9dc5696de5e1710 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_RADEONFB_H__
 #define __LINUX_RADEONFB_H__
 
index b9197976b660b41c7e728c361dec5890feee8864..b0d15c73f6d758db858b9ca0489d3e4978b01323 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
    md_p.h : physical layout of Linux RAID devices
           Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
index 36cd8210a5d1ddc478dc36f9fdd68e3bda6cc313..105307244961087860d16d3cf9d800dfed123e20 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
    md_u.h : user <=> kernel API between Linux raidtools and RAID drivers
           Copyright (C) 1998 Ingo Molnar
index 3f93d1695e7f6b0ba27ea5e563126960ea84c6a4..c34f4490d025ff6802aca2ef6bd2237906f889b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/linux/random.h
  *
index 62d543e70603e2837755475babf07b8598fc841f..dc96dda479d64045969a583a8737b8cb0e0884f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_RAW_H
 #define __LINUX_RAW_H
 
index 198892b95f09499d50614c0149990b61fad772e3..e71d4491f225f8f78f80b8f7f5dc10346a2be4c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2008 Oracle.  All rights reserved.
  *
index 09d056d4fc50609329bfcb880238d4fe57b9478d..58e64398efc5d23cd8e88f2a1af4c29c44770aa5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_REBOOT_H
 #define _UAPI_LINUX_REBOOT_H
 
index ea3700cd7367870ef9346c94ecabd5d44a161587..5bb921409f2bdef17be4d922a1f6e75491ed7271 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 1996, 1997, 1998 Hans Reiser, see reiserfs/README for licensing and copyright details
  */
index 38fdd648be214c1e94851686ae308a5a42543cbf..28f10842f047c0f0832ee83b0de9b4c833070988 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
   File: linux/reiserfs_xattr.h
 */
index 36fb3b5fb1817287a86290334a48dcca58801f73..cc00fd07963179e58d7b7d6051a6dc1f0794aebd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_RESOURCE_H
 #define _UAPI_LINUX_RESOURCE_H
 
index 6edb900d318deab4fd9b5c00c07f9c7010a8b0e5..d05dc3226f8eb9fd483f1cae579eac3ca8c3c5bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * Copyright (c) 2015, Integrated Device Technology Inc.
  * Copyright (c) 2015, Prodrive Technologies
index 5796bf1d06ad1f907df533f0d4bbb26940c14245..9bc9f98e353ab072afb0acb1bca9b45b4b14b4ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * Copyright (c) 2015-2016, Integrated Device Technology Inc.
  * Copyright (c) 2015, Prodrive Technologies
index 5f57f93b284f1db41f0594160a4f74bea7b84dc4..a7f1585accefe837d5b742cf711aea97c0ae1605 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_ROMFS_FS_H
 #define __LINUX_ROMFS_FS_H
 
index 1fcfe95893b83016a686f4fec2f179625e763851..19aa4693c8fc2327bb20c5f4df3d65968cfde361 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * These are the public elements of the Linux kernel Rose implementation.
  * For kernel AX.25 see the file ax25.h. This file requires ax25.h for the
index 6600708311c853b8261b44e19f4214be8388998d..a0de9a7331a297735fbfd0cee4acf4d18853e435 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index dedc226e0d3fc35f7b72b0ae01a42a84490de81f..225eb38705dc065271938cbd87a0634be4d45948 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2016, Linaro Ltd.
  *
index f8c82e6f25d5d0413f470c346f0cf4f1ec141780..2ad1788968d09a706aca34f9297111a7f396312e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Generic RTC interface.
  * This version contains the part of the user interface to the Real Time Clock
index dab7dad9e01af4b32cdc587f8a9c149eeae98ec4..a6d37c2ea355634d2dcbd6d7c2ebc603f58d4fac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_RTNETLINK_H
 #define _UAPI__LINUX_RTNETLINK_H
 
index 72b6b81533740495659f5dfc35b3f70f41ccfa4b..c5bc7f747755a277637cb52c1fb537f0896ec696 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* $Id: scc.h,v 1.29 1997/04/02 14:56:45 jreuter Exp jreuter $ */
 
 #ifndef _UAPI_SCC_H
index e2a6c7b3510b4a73a60e36f83739f42c62fad6f5..30a9e51bbb1e583fc5344ba0ef849cd4c464b72f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SCHED_H
 #define _UAPI_LINUX_SCHED_H
 
index 34b81aa1a2f75da3257ebeaeeaa584a913d9597a..10fbb8031930045d4dc04879c4fccf4bf372ac86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SCHED_TYPES_H
 #define _UAPI_LINUX_SCHED_TYPES_H
 
index d9048918be5270edbada7f1b48cfb5271263c605..862a4cc908f78310309c6aed6a1ed4c2235c8a5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * Intel MIC Platform Software Stack (MPSS)
  *
index 8b8d39dfb67f1992bc8e9fa95af34c8c4f05eb3a..87e5c086938ebafb5ee929eddcff68a780d06ab5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_SCREEN_INFO_H
 #define _UAPI_SCREEN_INFO_H
 
index 6217ff8500a1d818fd1002fbd6f81c0c11974665..cfe9712968350263ded68a2702d781685a10de7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* SCTP kernel implementation
  * (C) Copyright IBM Corp. 2001, 2004
  * Copyright (c) 1999-2000 Cisco, Inc.
@@ -376,7 +377,7 @@ struct sctp_remote_error {
        __u16 sre_type;
        __u16 sre_flags;
        __u32 sre_length;
-       __u16 sre_error;
+       __be16 sre_error;
        sctp_assoc_t sre_assoc_id;
        __u8 sre_data[0];
 };
index 95eaff9c9e49b00f7294372effe8358d021b6775..1e3735be6511046e7d779f299ba595659a0ddeae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 0f238a43ff1e7e5ebd8bd746a055fa910c10b51d..2a0bd9dd104dc625f91b7938fa4f128e9a3c4df2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SECCOMP_H
 #define _UAPI_LINUX_SECCOMP_H
 
 #define SECCOMP_MODE_FILTER    2 /* uses user-supplied filter. */
 
 /* Valid operations for seccomp syscall. */
-#define SECCOMP_SET_MODE_STRICT        0
-#define SECCOMP_SET_MODE_FILTER        1
+#define SECCOMP_SET_MODE_STRICT                0
+#define SECCOMP_SET_MODE_FILTER                1
+#define SECCOMP_GET_ACTION_AVAIL       2
 
 /* Valid flags for SECCOMP_SET_MODE_FILTER */
 #define SECCOMP_FILTER_FLAG_TSYNC      1
+#define SECCOMP_FILTER_FLAG_LOG                2
 
 /*
  * All BPF programs must return a 32-bit value.
  * The bottom 16-bits are for optional return data.
- * The upper 16-bits are ordered from least permissive values to most.
+ * The upper 16-bits are ordered from least permissive values to most,
+ * as a signed value (so 0x8000000 is negative).
  *
  * The ordering ensures that a min_t() over composed return values always
  * selects the least permissive choice.
  */
-#define SECCOMP_RET_KILL       0x00000000U /* kill the task immediately */
-#define SECCOMP_RET_TRAP       0x00030000U /* disallow and force a SIGSYS */
-#define SECCOMP_RET_ERRNO      0x00050000U /* returns an errno */
-#define SECCOMP_RET_TRACE      0x7ff00000U /* pass to a tracer or disallow */
-#define SECCOMP_RET_ALLOW      0x7fff0000U /* allow */
+#define SECCOMP_RET_KILL_PROCESS 0x80000000U /* kill the process */
+#define SECCOMP_RET_KILL_THREAD         0x00000000U /* kill the thread */
+#define SECCOMP_RET_KILL        SECCOMP_RET_KILL_THREAD
+#define SECCOMP_RET_TRAP        0x00030000U /* disallow and force a SIGSYS */
+#define SECCOMP_RET_ERRNO       0x00050000U /* returns an errno */
+#define SECCOMP_RET_TRACE       0x7ff00000U /* pass to a tracer or disallow */
+#define SECCOMP_RET_LOG                 0x7ffc0000U /* allow after logging */
+#define SECCOMP_RET_ALLOW       0x7fff0000U /* allow */
 
 /* Masks for the return value sections. */
+#define SECCOMP_RET_ACTION_FULL        0xffff0000U
 #define SECCOMP_RET_ACTION     0x7fff0000U
 #define SECCOMP_RET_DATA       0x0000ffffU
 
index 35ac35cef2170b0a760efd06bbc8b4e1225d5fb8..d6d98877ff1a93d5aa3fd15b6b611123fbbe58c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SECUREBITS_H
 #define _UAPI_LINUX_SECUREBITS_H
 
index c72e0735532d0f0232011152ecad1b00935bd6ba..627624d35030a163bd8e443f01325c8ee3ece76a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright © 2016 Intel Corporation
  *
index 7278511d339ec271f9106c8327bd9b09350809a6..2f6fb0dd613c09198c830c9059ba5f63e62f5de1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  SR-IPv6 implementation
  *
index fcf1c60d7df336f414cec9470f64568fa96e1325..d995d48daebb519b250f8d57026dbe047d0cccda 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SEG6_GENL_H
 #define _UAPI_LINUX_SEG6_GENL_H
 
index e691c753fc3f379645f8ba82e74fcc6d34552881..b877c782158a5dfd31a5a34df099b3bc613e10b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SEG6_HMAC_H
 #define _UAPI_LINUX_SEG6_HMAC_H
 
index b23df9f58354e6e2d0174ddf356494c89a1dbc9b..09fb608a35ec3a15e8f2e3f2c0e33673bc225697 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  SR-IPv6 implementation
  *
index d239797785cf6a0681f39ab277c20819dbfc5deb..2fc0542171cdea85623bcb05ac492fbfda8f12b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Netlink event notifications for SELinux.
  *
index 67eb90361692fba63a0729b188011d02b39596ab..9c3e745b065628d893351139988b0af7024dda77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SEM_H
 #define _UAPI_LINUX_SEM_H
 
index d2667ecd54ac2de813201c387c60bd21034238bc..3fdd0dee8b41bb053c02b8b1ece649e386e7fb95 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * include/linux/serial.h
  *
index 50d71c436323918f2ca2a20dd3d7c1d8016392eb..1c8413f93e3daafc9f138e8a619093ec3fc96cd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  linux/drivers/char/serial_core.h
  *
index 5db76880b4adfc23fc86487d9816ad28df291973..619fe6111dc942815145e25194d5e09ed6517674 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * include/linux/serial_reg.h
  *
index ac217c6f0151063ba759b7895472dcddb11b29c9..a0cac1d8670d8a89320adba86688aee6ef8a63b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 1999-2002 Vojtech Pavlik
 *
index cf23c873719d7d703d8107ef994f19ea8f16b7c5..4de12a39b07506e04fff9d658144b2feee136d50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SHM_H_
 #define _UAPI_LINUX_SHM_H_
 
index cd0804b6bfa2ed0980fe1cec8e01201833cbdaef..e03238f8d478a749894aa188a576e61dcba6eb15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SIGNAL_H
 #define _UAPI_LINUX_SIGNAL_H
 
index 492c6def340da6954b750f1248498a758910df9f..6f0da42fc5ef3a884a2d51dee1fed17ca34bb79f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  include/linux/signalfd.h
  *
index ab1dea8e53eeba5538c04888cb8b69eb016709c9..0e11ca421ca49344fd03763c3123f44bfed2c970 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 87712bfaa9dd00d431cbc1953da0462a52d7e119..0ae5d4685ba369d1a83df4f0feabb065f5dbdd74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_SMC_DIAG_H_
 #define _UAPI_SMC_DIAG_H_
 
index 53938f4412ee9ff088735a3ebe9376732579805b..50438f8d96475d141dd3e2311a281015b8ce6cf5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * include/uapi/linux/smiapp.h
  *
index 758f12b585410b2de6936459c8e296902f7cd1a1..0d941cdd8e8c0533259aa4df53b0e3be92f8cf00 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for MIBs
  *
index 7ff505d8a47ba3a9b060109a395549925da6a0ca..e5925009a6529bee40facfdf332594aee5e156f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SOCK_DIAG_H__
 #define _UAPI__SOCK_DIAG_H__
 
index 76ab0c68561eded34764c2bb29cbdf0c39292320..8eb96021709c8c3ed15f53e7295a6c92dfe77010 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SOCKET_H
 #define _UAPI_LINUX_SOCKET_H
 
index 79d029d2531005167c13869ba3c136c029aa6665..d393e9ed396426125152a0583a6837274e111e0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index cc54acee81ba827676f80e1c3542690e73981a6f..9d02357c6c6fbec7a006a933266f1f5ee7fc5a53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* sonet.h - SONET/SHD physical layer control */
  
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 85078a283573d70f0e80a291b881817739d0bdd9..88f122451776347fd1408be69f2c3e52234809c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Sony Programmable I/O Control Device driver for VAIO
  *
index 014c9117c224bf6491bac29f22fa057959065232..a62d74042f47fb1ac37f6a802978019a975a63e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SOUND_H
 #define _UAPI_LINUX_SOUND_H
 
index dd5f21e758057f0f3ac98ee0f04823aaffeaa53f..c4253f0090d8c45d7221194938c680180e0c3240 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * include/linux/spi/spidev.h
  *
@@ -23,6 +24,7 @@
 #define SPIDEV_H
 
 #include <linux/types.h>
+#include <linux/ioctl.h>
 
 /* User space versions of kernel symbols for SPI clocking modes,
  * matching <linux/spi/spi.h>
index 17b10304c393355da9ed2da743107a5c59748290..7b35e98d3c58b1df9f4315e3f76a2564c25a106b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_STAT_H
 #define _UAPI_LINUX_STAT_H
 
index 621fa8ac44257ced281590206b7dda37b818177f..f65b92e0e1f914fb84b7a4e67a47e5125afb80cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <linux/compiler.h>
 
 #ifndef __always_inline
index 626a8d3f63b573204e1ad8c85d789cf3dae940f0..dbffdc23d80480aa1e0202fc8a146498ec6b556a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * System Trace Module (STM) userspace interfaces
  * Copyright (c) 2014, Intel Corporation.
index e32e545cff5a44298a5dcfa554a4ce64652827b3..9d129c13fe9d4e800fafcbbfbf5fe2188c1b546f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_STRING_H_
 #define _UAPI_LINUX_STRING_H_
 
index 830e34493a8cf086c30925f97af5bc1801c7bf28..ae54af3d3fd67d72df633dfc284f9c671d442703 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * linux/include/linux/sunrpc/debug.h
  *
index 0b30382984fe72da504a1b031ffd09db067a484b..bcce04e21c0dce71a833c1eb5a68b9cf2f08234f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_SUSPEND_IOCTLS_H
 #define _LINUX_SUSPEND_IOCTLS_H
 
index 8f3a8f606fd95b723d9ed26e179c8a741250717f..23cd84868cc3bd8907994664c82407ca49a1d8d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SWAB_H
 #define _UAPI_LINUX_SWAB_H
 
index 5e392968bad209497d94dd598a9431e736cf1d7b..75df44373034a39dc065f7559f5e63b86a8248cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Microsemi Switchtec PCIe Driver
  * Copyright (c) 2017, Microsemi Corporation
index 5b287d6970b3a06677b8f55cfbd0bdc162c61181..ee2dcfb3d66028993ccea134ea93e19f6d925314 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 Google, Inc.
  *
index 7dcb065a5f76dcf502ff62621fa260d66cf37985..62f32d4e1021915feca55bd1d4c6a7e98bef5382 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
 /*
  * SyncLink Multiprotocol Serial Adapter Driver
  *
index e13d48058b8d0e5cf36e458e68e257d73a9a1e8f..0f272818a4d27846ef96881c266d9713bbadb094 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * sysctl.h: General linux system control interface
  *
index 934335a22522c78cb1b5d7503e7464f93560188a..435d5c23f0c0e7f5f07837fae13dec2173521689 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_SYSINFO_H
 #define _LINUX_SYSINFO_H
 
index 24a1c4ec2248ce06e5ef5ec832f204375eef8618..0be80f72646b1f86f40a811c86d1946cd4ea59ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __TARGET_CORE_USER_H
 #define __TARGET_CORE_USER_H
 
index 2466e550a41d40beefe6aa1b5ed4560ac076bc29..b7aa7bb2349f7b72e3a746b3f96aef60266a21e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1 WITH Linux-syscall-note */
 /* taskstats.h - exporting per-task statistics
  *
  * Copyright (C) Shailabh Nagar, IBM Corp. 2006
index 8dc2ac05eecf05650a3ac0751385134559aaeddf..6e89a5df49a46a601cd5b4e82b0a4dcb6af7e23c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
  *
index 62a5e944c55485270820d36187adb6cb4d5c5b28..80caa47b19334fac38b71cf2fb4b114f7fcb45f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UAPI_TC_CONNMARK_H
 #define __UAPI_TC_CONNMARK_H
 
index a11bb355dbfb2ba9b65a2e2b6c2eac9dc3b0e6c0..0ecf4d29e2f31312a08931f5cd760d8a83cc8088 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_CSUM_H
 #define __LINUX_TC_CSUM_H
 
index d2a3abb77aebdef99a9166e60b95a982f06a74f4..e3ecd8bf37de2723dd1b0d8ea4523270add67e1f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_DEF_H
 #define __LINUX_TC_DEF_H
 
index 70b536a8f8b260746faecdb14ffa322f0db5ad1c..94273c3b81b0ba5a8ff8fab6a2865e9e01bdd098 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_GACT_H
 #define __LINUX_TC_GACT_H
 
index 7c2817866c97e2f72f3f72315e42a34443eff022..2f48490ef3867a52b8de029b053cfc2b3eb0d981 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UAPI_TC_IFE_H
 #define __UAPI_TC_IFE_H
 
index 7c6e155dd981d17a9fade88994eb82331a4309a8..b743c8bddd13d32f2de9141276acdc9331195ce4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_IPT_H
 #define __LINUX_TC_IPT_H
 
index 3d7a2b352a62c3dfeb0f077c6207a93d8834481d..020696e073459c34aa7e633c1a42ce368cf9cb67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_MIR_H
 #define __LINUX_TC_MIR_H
 
index 923457c9ebf0caf761bc24c897ba8a20f38e8c22..086be842587bd7cb5d88999746dad12677b41cd5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_NAT_H
 #define __LINUX_TC_NAT_H
 
index 143d2b31a316624fbec24d40b7fb04da2b7eede5..162d1094c41c09ca832c0139474f99b62e6a4aaf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_PED_H
 #define __LINUX_TC_PED_H
 
index edc9058bb30d392e7ed5cca408bde06d2ef9c0e7..bd7e9f03abd2e845c0d6890333ef1905dc87b588 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_SAMPLE_H
 #define __LINUX_TC_SAMPLE_H
 
index 2884425738ce73e3bbbbf8dcfa79c6e345022476..fbcfe27a4e6c4173553fe675655f86c2e4f51045 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2008, Intel Corporation.
  *
index 10fc07da6c6991bf962fb97ddc94d7cefa55b9ba..38c072f66f2fcff17cecc17082203bac038b8078 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2016, Jamal Hadi Salim
  *
index afcd4be953e278f0f36db11cfd997482982ff388..72bbefe5d1d12234fcf34f00fd32acb0a3555fcb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2016, Amir Vadai <amir@vadai.me>
  * Copyright (c) 2016, Mellanox Technologies. All rights reserved.
index bddb272b843f5a2e037de3c0820c3e7b28de569f..0d7b5fd6605b049ecc2d997ed192a6c20611f5dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
  *
index f34bb1bae083ee02bd754536c150a898bc1b91f0..2549d9d6e031063842f68e6b161a8e3deab433cf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_EM_CMP_H
 #define __LINUX_TC_EM_CMP_H
 
index b11f8ce2d3c0a7b055634d21440b8d22c3e3b1d6..cf30b5bc4eaf20e4841454c30900eb1c3caa21a0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_EM_META_H
 #define __LINUX_TC_EM_META_H
 
index 7172cfb999c1595a94b336c4700d80c1f17dc81a..c76333f7f6f265c2127e45bac268988a62668eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_EM_NBYTE_H
 #define __LINUX_TC_EM_NBYTE_H
 
index 5aac4045ba88733265529d8188849c9f16f2907f..b0a92257964e6ab55b79a4c2af67880086b48201 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_TC_EM_TEXT_H
 #define __LINUX_TC_EM_TEXT_H
 
index 15c25eccab2b3beab080c6cb6c6e1f1ffd15d0c1..6a64beeecfad8d26d651f653e361fb56e6b623a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 80ad90d0cfc23b0a67b4c6639eaf6df1d2abca25..7cb4a172feedac9029b7bb9f4dd3abac4cb55004 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* tcp_metrics.h - TCP Metrics Interface */
 
 #ifndef _LINUX_TCP_METRICS_H
index f63afe330addaade67b6d9f3e76e8ce569827ce8..d2c9f7105f4b31a117d4954c04f5d8e4914e97b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /******************************************************************************
  *
  *             telephony.h
index 2acd0c1f8a2a305c8c7fc23895a6cba3cdd35ea8..33961d4e4de0d8642f4a145e379ca8e7925d8b04 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_TERMIOS_H
 #define _LINUX_TERMIOS_H
 
index ac55358559828f746af7c21d87403e341f086f51..96218378dda8c581115b93e640b3d718d3f0f5ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_THERMAL_H
 #define _UAPI_LINUX_THERMAL_H
 
index 09299fcb842a0287a0cdfcd18f122b93ff093922..53f8dd84beb5253e66b53a0497287e910a8b000c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_TIME_H
 #define _UAPI_LINUX_TIME_H
 
index 6fcfaa8da17380f5b3ab596ed43b944696f0db54..dd469944db02c322a5aa3738f916a76b20b5d740 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  include/linux/timerfd.h
  *
index 87b62615cedd171df3ead022010bb28f46951c12..9c72df662f5f7a72be7305b46f135873b36248cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_TIMES_H
 #define _LINUX_TIMES_H
 
index 4756862c4ed4c2a9919d1d1f2be2d70879ee07b7..b32acc229024b39cd2badda4112e9051745aeed5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_TIOCL_H
 #define _LINUX_TIOCL_H
 
index 5351b08c897a22568e586ccbf3da3b28b47aeb8f..77123614e973e3aa85c85537469c677a6a3d6b4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * include/uapi/linux/tipc.h: Header for TIPC socket interface
  *
index 087b0ef82c07677cd8939f1d9ec62cf259408087..3f29e3c8ed0668fd22dd674e6e7654fdb6ea6a45 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * include/uapi/linux/tipc_config.h: Header for TIPC configuration interface
  *
index f9edd20fe9ba8930ad9f6de83e81f4ee97f74893..469aa67a5ecbdbae5671379bfb3180a17ec7cb30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * Copyright (c) 2014, Ericsson AB
  * All rights reserved.
index cc1d21db35d8f64fc665b32836d3cc01a7e21be9..d5e0682ab8371b5f42b573d21bd0e3d2f85640b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2016-2017, Mellanox Technologies. All rights reserved.
  *
index c58bf4b5bb266438c217c46a76b7eb21150bfdc4..7f1941935f98f1c9f3dd9d2330e3bf05f404e29f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops 
  *
  * Copyright (c) 1996-2000  Jonathan A. Buzzard (jonathan@buzzard.org.uk)
index cf1455396df0703b007b9709d298aa0fa9f5e54b..376cccf397be291ebf800be11a698bc77a5c4f03 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_TTY_H
 #define _UAPI_LINUX_TTY_H
 
index 66e4d8bcb16f9ca662d7215e1bd76041d888559a..6ac609a00dea3f8787b387355eddd63ede0959a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_TTY_FLAGS_H
 #define _LINUX_TTY_FLAGS_H
 
index 41e5914f0a8efd5255b733890b80b8e28b491b18..e3d1d0c78f3c3a1b325319fb76ed12d02a4d6888 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_TYPES_H
 #define _UAPI_LINUX_TYPES_H
 
index 3536965913b09262f3bb202088f4ade104fd3417..c50863080399f32bf9ef2aeca6ff2714a1fe7491 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * udf_fs_i.h
  *
index 2c8180f9156faf8c6429bb738e22101ceec11660..efb7b5991c2fd5eaeab64ca0a52074d9f6cd9a11 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index aaa86d6bd1dd921ab0637f232ced8678c60e8849..cef7534d2d19ba7b8876bfb0f304d5b12a50558f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __UHID_H_
 #define __UHID_H_
 
index dc652e224b67ce5373a977b68ee46c3855fe0085..c9e677e3af1d26e71d14949d9f52364ab03b461c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  User level driver support for input subsystem
  *
index 2731d56a548462b2f1c044fe83f8e3fe7bffbdb4..059b1a9147f4fdc9b61414bbdffe166a1e0b8520 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *     Berkeley style UIO structures   -       Alan Cox 1994.
  *
index 95186578c46e1e2affb7fada32248e934bb6bdcc..4d32a39965f83bcd486fdce5e27a15833f70aa18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Userspace driver support for the LED subsystem
  *
index 71339dc531c5e45634951ec0c2e1bbd5c4bb50c2..73305bd1dc5a154a02a862f4a5469927c806af37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ULTRASOUND_H_
 #define _ULTRASOUND_H_
 /*
index 4f0ab3a548ad429963d803c802041b15a1332121..0ad59dc8b6864601c06d3a1b8af5d8dd0c3bc1f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_UN_H
 #define _LINUX_UN_H
 
index aa8d5b5e2e3e0b35b94df5824115640f972ce1d8..a92361f5d32df6b9b076bf64426044534b4d37e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_UNISTD_H_
 #define _LINUX_UNISTD_H_
 
index 1eb0b8dd18308481313b9d13b284f897a56188aa..5c502fdf7a42cf28257cfd45e57d194e9611e120 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __UNIX_DIAG_H__
 #define __UNIX_DIAG_H__
 
index a4680a5bf5dd4724aad4d16743543f3f35b52be3..17a022c5b4144c48f0bb071d53d619f63983fbdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * <linux/usb/audio.h> -- USB Audio definitions.
  *
index 0dc132e7503027cd5f5e3f221e652852afac9363..a927c7f6f68ab9e064f220b5373598496dbeb250 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * USB CDC Device Management userspace API definitions
  *
index e2bc417b243bec21a8889e8397c9a1d19cc32955..6d61550959ef9e15ff45ab23d710e32bee617533 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * USB Communications Device Class (CDC) definitions
  *
index 576c704e3fb8b13f358ae67b3a415417f2c37cb5..29c120c88747b471b719dd9f65705f17382782c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file holds Hub protocol constants and data structures that are
  * defined in chapter 11 (Hub Specification) of the USB 2.0 specification.
index ce1169af39d72c58663e08f4ff7e0c175f467507..cec06625f4076c1772ac4e099fa471ba731654f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file holds USB constants and structures that are needed for
  * USB device APIs.  These are used by the USB device model, which is
@@ -780,6 +781,7 @@ struct usb_interface_assoc_descriptor {
        __u8  iFunction;
 } __attribute__ ((packed));
 
+#define USB_DT_INTERFACE_ASSOCIATION_SIZE      8
 
 /*-------------------------------------------------------------------------*/
 
index f913d08ab7bb0fa732d89b682f3f602f5f648dbc..d77ee6b65328e876baf02a25fc04f4a3d0e72b7b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_FUNCTIONFS_H__
 #define _UAPI__LINUX_FUNCTIONFS_H__
 
index 6178fde50f7404d7639440b8445fa0043f6b1b1b..7fc20e4b82f55b7ffb2326c6f8f2bb1865a5c672 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * g_printer.h -- Header file for USB Printer gadget driver
  *
index 0bb12e0d4f8f580da220eff86c6a3f09a9cf3a6b..835473910a498016a53ffeeeb583eabf3e50997d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Filesystem based user-mode API to USB Gadget controller hardware
  *
index c8c52e3c91de7917087e855f67742110848e7dd8..de6941ef70adeb20f4e3d58982dcd3978a2769f5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * <linux/usb/midi.h> -- USB MIDI definitions.
  *
index 2e59d9c50b8d739855f87989f09e2ed32ce1a4e6..03f6adc8f35ba7181e90946a152b1d71fc741547 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
  * Copyright (C) 2008 Novell, Inc.
index 69ab695fad2e2729bd68921ff934ec095ae07121..ff6cc6cb4227c3536376906f290ac74ecc7f1794 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * USB Video Class definitions.
  *
index 0bbfd4abd2e3b1c2520a2e83bf965ec8128549be..70ed5338d447bb24caab3fdd504d7f75b1f2c4fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*****************************************************************************/
 
 /*
index fa5db30ede36bfb7fd8855ababc0a1df40e5be3b..fd393d908d8a3170c6ff57a431c924fdfd229b18 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     usbip.h
  *
index d6d1f65cb3c37c7b76738f544e6b625ebff39edb..48f1a7c2f1f056117ce80166fdd126d1e32c08b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  include/linux/userfaultfd.h
  *
index 37d147f0a13a72c873931c9f2e7eaf0bdf87c3c8..74c9951d2cd044bfd03f8cee8551b41c060bdaf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */
 /*
  * userio: virtual serio device support
  * Copyright (C) 2015 Red Hat
index 5cdf673afbdb51755a244094a5bbea4c235cf106..fd9aa26b68602db3196e0334191d4d66bf8493bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_UTIME_H
 #define _LINUX_UTIME_H
 
index 872c2df10de7ba4a3ee62d819ff2e270616920d5..c99edc66253620ebaf7999e30c96841c3d6b9d65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_UTSNAME_H
 #define _UAPI_LINUX_UTSNAME_H
 
index 8ef82f433877a53fe1d4fd7cc3f3cd4e27e1a062..5c04130bb524fec55baaad38ec70244bbbac0cb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * UUID/GUID definition
  *
index 3b081862b9e89dcf50ab324fc77dd71ab2dfcdf6..e80b4655d8cd4f7596255f3af51cd0c32e41e715 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_UVCVIDEO_H_
 #define __LINUX_UVCVIDEO_H_
 
index 5b3f685a2d50ca2146e579f81580aecb61f19922..4f7b892377cd6880f0df9ec17edee016888b9851 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  * include/linux/v4l2-common.h
  *
index 31bfc68f86d67534ed050f861ced6252d4cd9b24..a692623e0236f22b70c07a8c25e4083813a95125 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  *  Video for Linux Two controls header file
  *
index da29551543817973c5da622d9ac23e62be673256..b52b67c625625443d8cc307a3f8e1a35c870a09b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * V4L2 DV timings header.
  *
index 9cac6325cc7ea7e8967727685bb95ef024d5af3d..6e20de63ec59a34c37975741d10eac212d8237ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Media Bus API header
  *
index dbce2b554e0268695e382f0a31d2e66394e2da85..c95a53e6743cb04084727dd8cdfc1befa3686667 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * V4L2 subdev userspace API
  *
index 3354c1eb424e6a7813ef1f1f6eb90c899cded6fe..52b58e587e236d30e986ef041fa6ef2854919be7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __NET_VETH_H_
 #define __NET_VETH_H_
 
index ae461050661afc4ea86413cf2c3e384281ad35f1..e3301dbd27d48521912015500604077fa6f4fac8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * VFIO API definition
  *
index 34a7f6f9e0658e7d3e33573df227eb2ba04a5194..2ec5f367ff78fe6e1c8adfb64790b6202c355f5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Interfaces for vfio-ccw
  *
index 60180c0b5dc6a5bce1cec4800050dc5b20df58f7..c51f8e5cc6080c03028727cdb81343fc4cabb6e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_VHOST_H
 #define _LINUX_VHOST_H
 /* Userspace interface for in-kernel virtio accelerators. */
index 185d6a0acc062a956e670e6d241c0f25edafc500..1c095b5a99c582b109ebdae286a567ad56ab76a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  *  Video for Linux Two header file
  *
index b4ed5d89569908ed5fb4407a2eb16ccecf43d4d0..68d57c5e99bc0a4314065d1055ba043f34375236 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * VMware vSockets Driver
  *
index a08b522ef597894b092ecc0fbfe6f35a2580fc1c..4a03b893a957ccea7e18a4c855111b1c35d28e5b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_VSOCKMON_H
 #define _UAPI_VSOCKMON_H
 
index f69034887e687d3a9f1185a8d41348f5e6d526a8..e9d39c48520af18b8a000c28e3e5b73155aa3d4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_VT_H
 #define _UAPI_LINUX_VT_H
 
index 58ac73cd38fe69f493e3589a45c70cf9c6b2a721..31a30f33ac46b7e4643739a35b1c465a6a96976b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for the VTPM proxy driver
  * Copyright (c) 2015, 2016, IBM Corporation
index 9393eead23e2eff9cd6d8c269ad181c998de1e05..ac49a220cf2ad8ee3fa1bfa2b72c9b232c1cf0d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_WAIT_H
 #define _UAPI_LINUX_WAIT_H
 
index 498d6c12c66614a1891a8fa4250c1ae6bfdfdc74..2f1216d00caa40309125aeb39113dca958b57219 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * wanrouter.h Legacy declarations kept around until X25 is removed
  */
index 2babe72870ba8be7b61da1dc858244576c2e1e92..b15cde5c9054d754508b2e784c8c6d3c99ef546e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *     Generic watchdog defines. Derived from..
  *
index d9ecd7c6d691409b424d8df53d02fe37e07cfb96..86eca3208b6beba89fd8462c576c09aa937baf8e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file define a set of standard wireless extensions
  *
index 810cce6737ea91649daaec069555fb267afd80f6..034b7dc5593a49ef90da2413096583f87733f375 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * These are the public elements of the Linux kernel X.25 implementation.
  *
index 1590c49cae572f66a7172c9985b2e4d5e493a8db..a92be0f492a9bef04caf3bcc4108bb134c015474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
   File: linux/xattr.h
 
index 5fe7370a2bef498f00083d2fd9d740403f15b6e5..e3af2859188bb1e52d6f0c49be7a9edb1a91dda7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_XFRM_H
 #define _LINUX_XFRM_H
 
index fb495b91e800656ccd4966224ad57390d6da761c..b6441fe705c5dce60c5a5c2fce7c4c79c19e4783 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Xilinx Controls Header
  *
index 59d021b242ed01216c54183a1c2ad238b510d415..9798d1864fd9e1fd9bf5beae10c83ef1d692a083 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  linux/zorro.h -- Amiga AutoConfig (Zorro) Bus Definitions
  *
index 74bc53bcfdcf6bf6d68ed6e799ca267790c9a66a..6e574d7b7d79cdfbff8adcea7e822e35295e9115 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  Zorro board IDs
  *
index 180d526a55c3ab5b54befbb264279e61d7e5a519..49e8fd08855a68886109890bf7fa7506fd318e5e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright 2014 IBM Corp.
  *
index 8376bd1a9e01d7fcfb2fbfbf9c4a083c6b33cd5a..8d5044e32e53f4ea5a2ea2048a5f68c66092449b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Parts of INFTL headers shared with userspace
  *
index 0ec1da2ef6521658adc2656f120508242348042b..aff5b5e59845a837d038532259673bd56fa49ddd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> et al.
  *
index e71d5558cc23e66e5abae4e2bc3aa05efefd28e3..7eca1b3f6b43bf6fe6f2b911ec60ee72ee1dc8dd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
  *
index bdeabd86ad99efb10590853a357d1088a31a38ac..b23bdc91c9f1b10437f4af7b01853bbc710f576b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
  *
index 1927b0d78a998a1e01c37314884f3531fa6e90d9..5b04a494d139ee5647cea91427f2b69d00d3528b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright © International Business Machines Corp., 2006
  *
index 74018bd18d7216fd0b34cc4d57d06c8138f18881..398a514ee446ee14cbf4e67175bde90890458176 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Broadcom NetXtreme-E RoCE driver.
  *
index d24eee12128fc5cb7d1f5612e85a7fb9b194520f..d5745e43ae857179723a294f1798e87975380fc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2006 Chelsio, Inc. All rights reserved.
  *
index 472b1599089405b619c3192b2f45a198fc7847c1..05f71f1bc1194dc205243d95ce96454370bd5cbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.
  *
index 4791cc8cb09b6bd290209d57ade8bfa338ec1b05..9de78c5ee9139ef27fa14bf50b41d7d2d59a3f2b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
index 3f4ee93ae5ebfd21d6a3f22fa0bbda24cdc3b9ab..791bea2f8297b400fbbb6be18292a23a453cd518 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
 /*
  *
  * This file is provided under a dual BSD/GPLv2 license.  When using or
index 5d7401963e35adf0e33da6432d8d2c513ed9f7a3..a9c03b0eed573fe7c85cf98468d2c65c68e86406 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2016 Hisilicon Limited.
  *
index f79014aa28f9928da0a72904c8cbf2ebe9b7fb36..f4041bdc4d089253d8c8c19ef517ccb25dbb4576 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Intel Corporation.  All rights reserved.
index 5c7abd859e0fda81f677fd6906dea7fb21e048cc..330a3c5f1aa8645c856fdb902fc11f002f43bdc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
index cfc7c9ba781e629d0b30a6b5e3d6d4ead7112479..0d2607f0cd20c38778bb182ad268fbbf484b7f19 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2005 Intel Corporation.  All rights reserved.
  *
index 9a0b6479fe0c626a05cc86da382181c81b1db73f..e0e83a105953ae1ef3df080cf54ae1619884c11c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
@@ -261,7 +262,7 @@ struct ib_uverbs_ex_query_device_resp {
        struct ib_uverbs_rss_caps rss_caps;
        __u32  max_wq_type_rq;
        __u32 raw_packet_caps;
-       struct ib_uverbs_tm_caps xrq_caps;
+       struct ib_uverbs_tm_caps tm_caps;
 };
 
 struct ib_uverbs_query_port {
index c55f60e05f867953a9ed2d134a7e4e67445bb5ca..224b52b6279c974d70a851161fa76139825c2594 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
  * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
index 1791bf123ba96453564ec65fda99c27af062c052..23dba2d40907ecc136bd15e648284c3399a7627d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.
  *
index bcbf4ff2f6d1aee8643abf1fda6233ebb5ebe43d..3020d8a907a74f247e853e01ea7d1bd10572dc0a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
index 6eb3734394a2a5334aba73c139d9c64589c086a2..f5b2437aab2884ed06ccca13ebc0eaf2ea6ac25e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2006 - 2011 Intel Corporation.  All rights reserved.
  * Copyright (c) 2005 Topspin Communications.  All rights reserved.
index 9f28191bef4d7e509615bd0f8be074766aaa1bfc..ad64a3cea1cdab94120f95f65b133abdd76af143 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /* This file is part of the Emulex RoCE Device Driver for
  * RoCE (RDMA over Converged Ethernet) adapters.
  * Copyright (C) 2012-2015 Emulex. All rights reserved.
index 54b64357ab245e97151efeccecd2dde1c83960aa..261c6db4623e2841ae80ed2639a6426ab4168467 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /* QLogic qedr NIC Driver
  * Copyright (c) 2015-2016  QLogic Corporation
  *
index 861440a87e7c50c29b87c94c5ddd6a5691b10be1..cc002e316d092f0245fc6c000a621fd13732b2b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_RDMA_NETLINK_H
 #define _UAPI_RDMA_NETLINK_H
 
index d71da36e3cd674967f5973468a3e42a0bd343067..c83ef0026079c8e427c46e0beaee7e6e56a63311 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2005-2006 Intel Corporation.  All rights reserved.
  *
index 165a27e969d58d96eb88020e72b5491eb8a8bb37..03557b5f9aa6b80031470ba0d317782ffa60f29c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2016 Mellanox Technologies, LTD. All rights reserved.
  *
index 1de99cfdaf7d394bcc4645e49c489899b6231bb0..bdeea948b2f3a428efa5e19bb163e1d2ebd4a41b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.
  *
index c6569b0032ecb2d06612b76d9e5dab09389f38fc..912ea1556a0b0238cfc24bad4ea4c06cc04d73d2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */
 /*
  * Copyright (c) 2012-2016 VMware, Inc.  All rights reserved.
  *
index 48d107e75cf252e5a1c5a42c1e0095c185cbca85..513da47aa5ab8b327df0c6f6daf442b2bb3d4c48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * CXL Flash Device Driver
  *
index 481abbd48e394c096960d3c1f4a894c175e7caba..b7e0a5ed40de7776c9a1ac0d83f016a30a0c623e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright(c) 2007 Intel Corporation. All rights reserved.
  *
index dcf314dc2a27ed0024bac2e5be118c13b7d1b152..8c0a292a61ed828712ebf4a0e26a010a0eed58cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright(c) 2007 Intel Corporation. All rights reserved.
  *
index a37346d47eb1ff541880d7ed2f987e957a39e382..2153f35245558f7afdb39f7e14e8e4b0bc0b7354 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright(c) 2007 Intel Corporation. All rights reserved.
  *
index f7751d53f1d3307fe4bf732a7f990fe8d10d9011..015e5e1ce8f113154368f6ec12b360b51c4c6a02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright(c) 2007 Intel Corporation. All rights reserved.
  *
index 3031b900b087011a18f4a6f321d7ac3d71c7414a..62597d86beed4c6a0c77265e91d0698bc14a3f88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  FC Transport BSG Interface
  *
index 62b4edab15d32ca59871921433f378f1aa842602..5ccc2333acab27a32d49a7f3cc70d0dc50f3b3f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  SCSI Transport Netlink Interface
  *    Used for the posting of outbound SCSI transport events
index cbf76e479761c4378b7b2fa71235064af76a3f8b..060f563c38a2463e87febebde6d7d4986a49d8af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  FC Transport Netlink Interface
  *
index 7b7659a79ac4c79cfac5061defb1af90e5c6f144..a75e14edc957e448ffdc5917880aad0ce8117f37 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Main header file for the ALSA sequencer
  *  Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl>
index 78014ec56357c0d021ed2934a4ce0a78f6f91fd2..69c37ecbff7ee389cb31b7dc49be4021e9a6fd14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM
  *
index 1949923a40bf98bd8cfedc59ff67eca6dc3e1c8a..c227ccba60aee2ab0128c5c529c5f4038577e8fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Advanced Linux Sound Architecture - ALSA - Driver
  *  Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
@@ -93,7 +94,7 @@ enum {
        SNDRV_HWDEP_IFACE_VX,           /* Digigram VX cards */
        SNDRV_HWDEP_IFACE_MIXART,       /* Digigram miXart cards */
        SNDRV_HWDEP_IFACE_USX2Y,        /* Tascam US122, US224 & US428 usb */
-       SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */  
+       SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */
        SNDRV_HWDEP_IFACE_BLUETOOTH,    /* Bluetooth audio */
        SNDRV_HWDEP_IFACE_USX2Y_PCM,    /* Tascam US122, US224 & US428 rawusb pcm */
        SNDRV_HWDEP_IFACE_PCXHR,        /* Digigram PCXHR */
@@ -383,7 +384,7 @@ struct snd_mask {
 
 struct snd_pcm_hw_params {
        unsigned int flags;
-       struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 
+       struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
                               SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
        struct snd_mask mres[5];        /* reserved masks */
        struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
@@ -856,7 +857,7 @@ typedef int __bitwise snd_ctl_elem_iface_t;
 #define SNDRV_CTL_ELEM_ACCESS_INACTIVE         (1<<8)  /* control does actually nothing, but may be updated */
 #define SNDRV_CTL_ELEM_ACCESS_LOCK             (1<<9)  /* write lock */
 #define SNDRV_CTL_ELEM_ACCESS_OWNER            (1<<10) /* write lock owner */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK     (1<<28) /* kernel use a TLV callback */ 
+#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK     (1<<28) /* kernel use a TLV callback */
 #define SNDRV_CTL_ELEM_ACCESS_USER             (1<<29) /* user space element */
 /* bits 30 and 31 are obsoleted (for indirect access) */
 
index c2a4b967d5be9af90002ef0b3458e8759ae8c49b..8471f404ff0b061b6132e327b9b74a74df38814c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __SOUND_ASOUND_FM_H
 #define __SOUND_ASOUND_FM_H
 
index e00d8cbfc6282c9f915147d19226aa8eac518b45..56d95673ce0f029def607edd610bf6126e5d66a7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *  compress_offload.h - compress offload header definations
  *
index 9625484a4a2a2a12e5ad8d00a759e27ea48a96b3..3d4d6de66a17ea91b18cb0ed7d1ba93d1df7367c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) AND MIT) */
 /*
  *  compress_params.h - codec types and parameters for compressed data
  *  streaming interface
index 5175e166987d173fb88ed1279614d89602ac22dc..042c5a6f16ee6e3e0e90471da2db136b9a850b96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
  *                  Creative Labs, Inc.
index 622900488bdcba396f94641d4b7e9a038fc8c462..f0a547d86679792d8a21a3c9a95e320cee71f3d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_SOUND_FIREWIRE_H_INCLUDED
 #define _UAPI_SOUND_FIREWIRE_H_INCLUDED
 
index 0909a3843479222aebc4edcfb6930644366229fd..5dc0c3db0a4c10e49db0f04fa70f8405a28b6f54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __SOUND_HDSP_H
 #define __SOUND_HDSP_H
 
index c4db6f5b306ecb951cfa7cda58ab44add749147b..a38f3f79beb7525747602ce70705dbcf3746a25a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __SOUND_HDSPM_H
 #define __SOUND_HDSPM_H
 /*
index 3b96907e2afbad410a63e266ba8a462a9ccf1caa..e64851481d88b0764f46c0f2966b15ea5229e146 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si>
  *                        Takashi Iwai <tiwai@suse.de>
index 1bce7fd1725f6b4d5a0237fd2410173d6da46344..c9a810a6ef48d8f310d2cb6e4b74e76ea398b035 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 #ifndef __SOUND_SFNT_INFO_H
 #define __SOUND_SFNT_INFO_H
 
index f691e421f5e8730ccb4f1c5a9a04f779d4c972e5..326054a72bc7e9ca240a39128be9585531c025cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * snd_sst_tokens.h - Intel SST tokens definition
  *
index b4df440c015bb963f4df418aa99d60d8a8cb53cd..be5371f09a626b4320d22f3302d9b66502d5e5c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *   This program is free software; you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License as published by
index cfe8fba00714863540e7fed00e1ff676d1fc8407..95419d8bbc168bfbf895ed044dc4aed8e4ce1494 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * Copyright (C) 2007, 2008 Karsten Wiese <fzu@wemgehoertderstaat.de>
  *
index 8c0f032014c9b5e21b49838571ebd6f85eb2a492..c6030dc10d6beae377c600488651f5f61bc46f96 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__linux_video_edid_h__
 #define _UAPI__linux_video_edid_h__
 
index 9250b22b10f81d4bf6b013c11c791d66f0901354..f1e811951288a4444ad03d49c1d22ba57bd68ce4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  * sisfb.h - definitions for the SiS framebuffer driver
  *
index cee063d723add39f977dd805b651d6727b2cb697..a0d5c9213e92a5b4235e99959bef2a6fe2eeed84 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_UVESAFB_H
 #define _UAPI_UVESAFB_H
 
index cb4aa4bb905ecd7b071a9ce84f2b6a68a0323ca3..7fbf732f168f1c1a8d2262b65851a27d41a2057c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */
 /******************************************************************************
  * evtchn.h
  *
index d0661977667e00c57f485954a79119f3cea49ca4..6d1163456c03e138e61a098b3d8fff59e123b1a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */
 /******************************************************************************
  * gntdev.h
  * 
index 63ee95c9dabb44d5943934c122e65c73a4770b81..39d3e7b8e993e94a7472e91518c5f515bafe2d28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */
 /******************************************************************************
  * privcmd.h
  *
index f0851e3bb7cc0124656a4277d73b2da17173812a..cb6721ebfd345851e66e38288a00fdd3d41444ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*  $Id: aty128.h,v 1.1 1999/10/12 11:00:40 geert Exp $
  *  linux/drivers/video/aty128.h
  *  Register definitions for ATI Rage128 boards
index 0cb8b2a92b75b71fc93f00d848560fa5f864d4b6..f614371e9116aec7984a1b382f70508f36dab2d1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __linux_video_edid_h__
 #define __linux_video_edid_h__
 
index 5a48f16578f86dc97773d6451ee2d9dc9701a308..83ca18492e0089b29ae69f8a61cd9f4d70a02b08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: iga.h,v 1.2 1999/09/11 22:56:31 zaitcev Exp $
  * iga1682.h: Sparc/PCI iga1682 driver constants etc.
  *
index ea18961fc5e764dc17a58d9ef7532a46628d5134..35921cb6d1e52d1b168241903777394e4a915de9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MBX_FB_H
 #define __MBX_FB_H
 
index de980a3b60c93a2fe788a9eac8ad6be5bf13b6f3..bcbb3d1b6bf996af1497d3fc13cccad3325fc55c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* $Id: newport.h,v 1.5 1999/08/04 06:01:51 ulfc Exp $
  *
  * newport.h: Defines and register layout for NEWPORT graphics
index 56b188abfb54d5ee72f78c858c955debc5c7ffdf..005eae19ec098e3417b6fedff0f8b8a5c573efa6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RADEON_H
 #define _RADEON_H
 
index 2605fa8adb9c00c74c951ee1e307fd85914dc247..f706b0fed399df1f6aec9dc56580cf3878e8cd72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_SH_MOBILE_LCDC_H__
 #define __ASM_SH_MOBILE_LCDC_H__
 
index 062e6e7f955c42ebfc8d8d98bfc17e8e2755d031..f4efc21e205d3567018de73ec3f2680e38bacee5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __VIDEO_SH_MOBILE_MERAM_H__
 #define __VIDEO_SH_MOBILE_MERAM_H__
 
index c449eace12cda1f65535188588e25d70fc4c1161..28384f35477313e68f66565320cd27a0c2f10843 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/drivers/video/sstfb.h -- voodoo graphics frame buffer
  *
index 69674b94bb684b2271a599fe4d29e273d0084f4f..6144633acc472bf5217ecaef162f2cbccabccada 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TDFX_H
 #define _TDFX_H
 
index b6ce19d1b61be4509b0d6fd2e014ebbb9251cd7e..5ccc0d6a070c7c9c53fd131817c0bcaddb80a925 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef TRIDENTFB_DEBUG
 #define TRIDENTFB_DEBUG 0
index 3ea90aea5617cb359423fefc6140e381d2e78e20..1252a7a89bc02f602473896fc5b7f5e149db5cf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef UDLFB_H
 #define UDLFB_H
 
index 30f53625415ce5bbd74628d86eb2634e7e3269c0..8d2a3bfc8dac2c7a04f234750fdf0f035f1c78f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UVESAFB_H
 #define _UVESAFB_H
 
index 44b587b49904f5f55f40a81a02d6464da8aafed3..2982571f7cc1ba568111ab9e04d99d9104fa7fc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_XEN_HYPERVISOR_H
 #define _ASM_ARM_XEN_HYPERVISOR_H
 
index 75d5968628929b552b88107d279f988b3eda448e..c3eada2642aa9a4de19297005c7bd1a316d0b1e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * Guest OS interface to ARM Xen.
  *
index b1b4ecdf329a7b4fefc623f5276f10f526a8414c..59a260712a5666d19cc617578bde3d4a273bf04d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_XEN_PAGE_COHERENT_H
 #define _ASM_ARM_XEN_PAGE_COHERENT_H
 
index 415dbc6e43fd7ac6c256e2b30b704567ab5966d2..f77dcbcba5a6034b26957bddb0bfd76602d5b63f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_ARM_XEN_PAGE_H
 #define _ASM_ARM_XEN_PAGE_H
 
@@ -84,16 +85,6 @@ static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr)
        BUG();
 }
 
-/* TODO: this shouldn't be here but it is because the frontend drivers
- * are using it (its rolled in headers) even though we won't hit the code path.
- * So for right now just punt with this.
- */
-static inline pte_t *lookup_address(unsigned long address, unsigned int *level)
-{
-       BUG();
-       return NULL;
-}
-
 extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
                                   struct gnttab_map_grant_ref *kmap_ops,
                                   struct page **pages, unsigned int count);
index 8906361bb50ca318fae27126799629210446b3f1..4914b93a23f2bdeb066a4048d7ab749456ae3fe3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * Xen balloon functionality
  */
index f442ca5fcd8225091df5f7fe6e41765e6fd7a6a6..c3e6bc643a7bde4bf770f1c191a472d84c4af945 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_EVENTS_H
 #define _XEN_EVENTS_H
 
index 27292d4d2a6a476769366767ed0a084428e46ccc..e4cb464386a9be2dd3f059cee62b81330449db9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * features.h
  *
index b62dfef15f61ad8d0cdcf53b5d4b8730ec0f9ea5..d8949d5e227d6d48293daaafcfad7760cc365c50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef XEN_HVC_CONSOLE_H
 #define XEN_HVC_CONSOLE_H
 
index 63917a8de3b077db8e944fae48cea0497046e001..0b15f8cb17fcbc3d2b73432ebde976b19864ef67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Simple wrappers around HVM functions */
 #ifndef XEN_HVM_H__
 #define XEN_HVM_H__
index 7e6acef5415b0b8f8c0140bf40056b5689ae503e..45650c9a06d5f55772e435ca872d26302a0056e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * event_channel.h
  *
index 6ad3d110bb81e387ed02153623d60b10182f55d9..9b0eb574f0d155f0ac87893e538c21918b438eaf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * features.h
  *
index 8b8cfadf7833b6f2f29f4c290711d36726b107f9..5e40041c7e954aaced21f39fc4cac6c540c9cb81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * blkif.h
  *
index e563de70f7843b8438b683479e9bd39af8a7b270..85ca8b02695a2002545b40565132bac23b47e93f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * console.h
  *
index 545a14ba0bb3f781bb1136bc093ee278ffa3be4c..6a89dc1bf2258051ee39fe62c1fbf255e7dd3d0d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __XEN_PROTOCOLS_H__
 #define __XEN_PROTOCOLS_H__
 
index e547088ceb0e589b64cb58dff7dcf517b8c6ab82..3f40501fc60b1d9f95a7455ed0d29f97d8bd9571 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * ring.h
  *
index 9fda532973a5fd7dde5e728e640c00b119d45b98..aaf2951b1cce495d0722c2a49ed9a4bb5f1e5bc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*****************************************************************************
  * xenbus.h
  *
index 794deb07eb534c376930f0f9f34ec9c44c73240c..1517c7e93a3af4c93a96a9e1eb5de55ea82d4807 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Details of the "wire" protocol between Xen Store Daemon and client
  * library or guest kernel.
index 9aa8988cb340ea6bbefbfbbdad88be127452e3c8..583dd93b30162236a63cf7656419866ea851de65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * memory.h
  *
index b47d9d06fade6e4eb50c8997b1dc60d80c198e68..73d9b0a2974eb0d6d63751479a7f4217e2f062a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * nmi.h
  *
index 145f12f9ececc0a8821f350cf716b66481559cdd..8772b552c0065f65def954dd4f7a4e16832f61d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /******************************************************************************
  * version.h
  *
index 139efc91bceb50d0d1461462a8da869064173451..ad603eab24b31e0d4118a22ed8d97c45500a424e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __XEN_PUBLIC_XENPMU_H__
 #define __XEN_PUBLIC_XENPMU_H__
 
index 064194f6453ebccc04ffc3cda9e1c1901b7c1728..df6d6b6ec66e9e75774c25d102ce0772b8275cf0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_PAGE_H
 #define _XEN_PAGE_H
 
index 5c52b55839175ffae1f42e62f7d78debdc8907a5..e51e7cb71a8597a35f49fa3d30c96d6e8a298d22 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_PLATFORM_PCI_H
 #define _XEN_PLATFORM_PCI_H
 
index ed2de363da3336f61b66d2feca2bf8c298c5e806..5e4b83f83dbce48006d2b9c7811ed958b8c60a9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SWIOTLB_XEN_H
 #define __LINUX_SWIOTLB_XEN_H
 
index 3930a90045ff2585dcd5bac3df2a353162a16ad9..c80bafe31f14fbff9abe09b5ad7294eecb38d4ba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_TMEM_H
 #define _XEN_TMEM_H
 
index 218e6aae54335bd83238413da8a37d7a740c016d..a95e65ec83c35d5473b5c08fcf5e09b1dcbc2cc1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef INCLUDE_XEN_OPS_H
 #define INCLUDE_XEN_OPS_H
 
index 28c59ca529d74e09b4100201633c4e8b830de459..9d4340c907d17d0c2ecacdd6762e36d7c9d6def5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XEN_XEN_H
 #define _XEN_XEN_H
 
index 78cb2461012ef530f2755a0a6a8458428ed19043..3c1faaa2af4aad761c427a092c929aeb1acb05f6 100644 (file)
@@ -1033,7 +1033,7 @@ endif
 
 choice
        prompt "Compiler optimization level"
-       default CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
+       default CC_OPTIMIZE_FOR_PERFORMANCE
 
 config CC_OPTIMIZE_FOR_PERFORMANCE
        bool "Optimize for performance"
index c4fb45525d08802e721fa8c2c8d67dbb2b296ecf..1dbb23787290081a834162ce35bffbbb96acfaf7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index ce635dccf3d96921249a2e20084d9f67b5361b33..f3831272f11357205a02faed344dc65aa244ce38 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* calibrate.c: default delay calibration
  *
  * Excised from init/main.c
index 282d65bfd6741e51c7f341c9c4fda65a492936c6..5b05c8f93f476c622f7ec95160c1759fee2d2503 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
 #include <linux/init.h>
index a1000ca29fc9971f82609c8cba8d137b01452603..53d4f0f326e74efb1167b6582624b32e74347c02 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Many of the syscalls used in this file expect some of the arguments
  * to be __user pointers not __kernel pointers.  To limit the sparse
index 8cb6db54285ba64f81af9ba2b388a7c216ceec61..3f733c760a8c556fb3a95a741490e56a088899d6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Many of the syscalls used in this file expect some of the arguments
  * to be __user pointers not __kernel pointers.  To limit the sparse
index dd4104c9aa12c6a517ff7066d52ab6057d26e586..99e0b649fc0e90e78c10e57ec27f2aa17624b254 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Many of the syscalls used in this file expect some of the arguments
  * to be __user pointers not __kernel pointers.  To limit the sparse
index 66787e30a4191b9b5187c874f02329885acaa6a4..9325fee7dc821557ca8ee1c056109303cf0e988a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init_task.h>
 #include <linux/export.h>
 #include <linux/mqueue.h>
index e64bf7b4c1ca470d0eec8cd2003d14d2df4ed075..7046feffef6b5852102a8c021afcaeb8420d3a74 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Many of the syscalls used in this file expect some of the arguments
  * to be __user pointers not __kernel pointers.  To limit the sparse
index 9c200e544434761aac1e0d2d9effbcb1c616bd91..c2558c430f51c71dda3aed28f12203b88c8c4313 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux ipc.
 #
index b17bf93d7b49a0a4eff445ab3977041b7221c168..5ab8225923af6c343594d29bba064c9e9398c1a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * 32 bit compatibility code for System V IPC
  *
index 06be5a9adfa41c39fd155f4ebc13ada0142b1bca..bce7ac1c809998762aab36fc84cf8c431184403c 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/ipc/msg.c
  * Copyright (C) 1992 Krishna Balasubramanian
index fc850c526698428fad7e7538e3ba673486553358..f59a89966f923bc1c782504f708969c1e232a806 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/ipc/namespace.c
  * Copyright (C) 2006 Pavel Emelyanov <xemul@openvz.org> OpenVZ, SWsoft Inc.
index f7385bce5fd3bd00a9d3a42b7b61c7e96f5184f3..b2698ebdcb31e65ea2f3e94f64cc567607b8ca2a 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/ipc/sem.c
  * Copyright (C) 1992 Krishna Balasubramanian
index 1b3adfe3c60e259e7366aa76a23b14e7c1a173b5..bd652755d32cc6fee7598b7a8dc257bd65e0c807 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/ipc/shm.c
  * Copyright (C) 1992, 1993 Krishna Balasubramanian
@@ -1154,7 +1155,7 @@ static int put_compat_shm_info(struct shm_info *ip,
        info.shm_swp = ip->shm_swp;
        info.swap_attempts = ip->swap_attempts;
        info.swap_successes = ip->swap_successes;
-       return copy_to_user(up, &info, sizeof(info));
+       return copy_to_user(uip, &info, sizeof(info));
 }
 
 static int copy_compat_shmid_to_user(void __user *buf, struct shmid64_ds *in,
@@ -1237,7 +1238,7 @@ COMPAT_SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, void __user *, uptr)
                err = shmctl_stat(ns, shmid, cmd, &sem64);
                if (err < 0)
                        return err;
-               if (copy_compat_shmid_to_user(&sem64, uptr, version))
+               if (copy_compat_shmid_to_user(uptr, &sem64, version))
                        err = -EFAULT;
                return err;
 
index 667022746ca56914e77fcb0b9a1c23ff4b02d3d6..26b45db2e007325a4303e6edcebf75afe3991d58 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sys_ipc() is the old de-multiplexer for the SysV IPC calls.
  *
index 78755873cc5b9e2dfe28f85e44933c282aa7d91e..79b30eee32cd857c5dae1a71d1cdf37b34b07d0a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/ipc/util.c
  * Copyright (C) 1992 Krishna Balasubramanian
index b21297bc11ebfe4bd65317e59a401a2fcd49e566..579112d90016ce5b07635555fca6c4b1f60fe84e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/ipc/util.h
  * Copyright (C) 1999 Christoph Rohland
index ed470aac53da1e3b47bd98517cb67deefd853588..172d151d429caeb3b49e6c568e4522173eba02ea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux kernel.
 #
index 5e72af29ab738c7134dcc1932ea11c297b027d44..6670fbd3e466d3003ae3c20d5f321b6e0abb2069 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/kernel/acct.c
  *
index 011d46e5f73fb448634c603fc474f479fe3e790b..d4b050d9a66ec74e7e5fa48201514ef0e14841e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "audit.h"
 #include <linux/fsnotify_backend.h>
 #include <linux/namei.h>
index e1d1d1952bfa37eaafd87486e03555051e16283c..c373e887c0664b7206004ea806b1f2a8a00b8b87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generate definitions needed by the preprocessor.
  * This code generates raw asm output which is post-processed
index 897daa005b239d403fd4e3be9d817834dbe4d40a..af3ab6164ff5bd8287c335c701b3c3c128e01ac2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y := core.o
 
 obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o
index 98c0f00c3f5e05007287de1a1636c4e6722beed7..e2636737b69bd8bdd1a690e5453616effb9800d5 100644 (file)
@@ -98,7 +98,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr)
        array_size += (u64) attr->max_entries * elem_size * num_possible_cpus();
 
        if (array_size >= U32_MAX - PAGE_SIZE ||
-           elem_size > PCPU_MIN_UNIT_SIZE || bpf_array_alloc_percpu(array)) {
+           bpf_array_alloc_percpu(array)) {
                bpf_map_area_free(array);
                return ERR_PTR(-ENOMEM);
        }
index 917cc04a0a94083d46f0a927e18f0228bf356c94..7b62df86be1d7e56044f947985b6c67ee5746c0d 100644 (file)
@@ -1022,7 +1022,7 @@ select_insn:
                struct bpf_map *map = (struct bpf_map *) (unsigned long) BPF_R2;
                struct bpf_array *array = container_of(map, struct bpf_array, map);
                struct bpf_prog *prog;
-               u64 index = BPF_R3;
+               u32 index = BPF_R3;
 
                if (unlikely(index >= array->map.max_entries))
                        goto out;
index 959c9a07f318b14f6ab4719973f6010de061aadc..e745d6a88224f5b5e9a8241dc7dee5d35e4832de 100644 (file)
@@ -69,14 +69,17 @@ static LIST_HEAD(dev_map_list);
 
 static u64 dev_map_bitmap_size(const union bpf_attr *attr)
 {
-       return BITS_TO_LONGS(attr->max_entries) * sizeof(unsigned long);
+       return BITS_TO_LONGS((u64) attr->max_entries) * sizeof(unsigned long);
 }
 
 static struct bpf_map *dev_map_alloc(union bpf_attr *attr)
 {
        struct bpf_dtab *dtab;
+       int err = -EINVAL;
        u64 cost;
-       int err;
+
+       if (!capable(CAP_NET_ADMIN))
+               return ERR_PTR(-EPERM);
 
        /* check sanity of attributes */
        if (attr->max_entries == 0 || attr->key_size != 4 ||
@@ -108,9 +111,12 @@ static struct bpf_map *dev_map_alloc(union bpf_attr *attr)
        if (err)
                goto free_dtab;
 
+       err = -ENOMEM;
+
        /* A per cpu bitfield with a bit per possible net device */
-       dtab->flush_needed = __alloc_percpu(dev_map_bitmap_size(attr),
-                                           __alignof__(unsigned long));
+       dtab->flush_needed = __alloc_percpu_gfp(dev_map_bitmap_size(attr),
+                                               __alignof__(unsigned long),
+                                               GFP_KERNEL | __GFP_NOWARN);
        if (!dtab->flush_needed)
                goto free_dtab;
 
@@ -128,7 +134,7 @@ static struct bpf_map *dev_map_alloc(union bpf_attr *attr)
 free_dtab:
        free_percpu(dtab->flush_needed);
        kfree(dtab);
-       return ERR_PTR(-ENOMEM);
+       return ERR_PTR(err);
 }
 
 static void dev_map_free(struct bpf_map *map)
index 431126f31ea3c90648366295e2b77fd3bb79b6e7..6533f08d1238e136895a5cf0665be31d7b23df51 100644 (file)
@@ -317,10 +317,6 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
                 */
                goto free_htab;
 
-       if (percpu && round_up(htab->map.value_size, 8) > PCPU_MIN_UNIT_SIZE)
-               /* make sure the size for pcpu_alloc() is reasonable */
-               goto free_htab;
-
        htab->elem_size = sizeof(struct htab_elem) +
                          round_up(htab->map.key_size, 8);
        if (percpu)
index e833ed91435832dc4d822ad4ed1c4a6a8a5893cf..be1dde967208eb19d1f92872275df5fdce437024 100644 (file)
@@ -363,6 +363,7 @@ out:
        putname(pname);
        return ret;
 }
+EXPORT_SYMBOL_GPL(bpf_obj_get_user);
 
 static void bpf_evict_inode(struct inode *inode)
 {
index 6424ce0e49698abee1da6242a0a8494d8ba0f03f..dbd7b322a86b5c3eb7150d2cc886223da6387b70 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/workqueue.h>
 #include <linux/list.h>
 #include <net/strparser.h>
+#include <net/tcp.h>
 
 struct bpf_stab {
        struct bpf_map map;
@@ -92,21 +93,45 @@ static inline struct smap_psock *smap_psock_sk(const struct sock *sk)
        return rcu_dereference_sk_user_data(sk);
 }
 
+/* compute the linear packet data range [data, data_end) for skb when
+ * sk_skb type programs are in use.
+ */
+static inline void bpf_compute_data_end_sk_skb(struct sk_buff *skb)
+{
+       TCP_SKB_CB(skb)->bpf.data_end = skb->data + skb_headlen(skb);
+}
+
+enum __sk_action {
+       __SK_DROP = 0,
+       __SK_PASS,
+       __SK_REDIRECT,
+};
+
 static int smap_verdict_func(struct smap_psock *psock, struct sk_buff *skb)
 {
        struct bpf_prog *prog = READ_ONCE(psock->bpf_verdict);
        int rc;
 
        if (unlikely(!prog))
-               return SK_DROP;
+               return __SK_DROP;
 
        skb_orphan(skb);
+       /* We need to ensure that BPF metadata for maps is also cleared
+        * when we orphan the skb so that we don't have the possibility
+        * to reference a stale map.
+        */
+       TCP_SKB_CB(skb)->bpf.map = NULL;
        skb->sk = psock->sock;
-       bpf_compute_data_end(skb);
+       bpf_compute_data_end_sk_skb(skb);
+       preempt_disable();
        rc = (*prog->bpf_func)(skb, prog->insnsi);
+       preempt_enable();
        skb->sk = NULL;
 
-       return rc;
+       /* Moving return codes from UAPI namespace into internal namespace */
+       return rc == SK_PASS ?
+               (TCP_SKB_CB(skb)->bpf.map ? __SK_REDIRECT : __SK_PASS) :
+               __SK_DROP;
 }
 
 static void smap_do_verdict(struct smap_psock *psock, struct sk_buff *skb)
@@ -114,17 +139,10 @@ static void smap_do_verdict(struct smap_psock *psock, struct sk_buff *skb)
        struct sock *sk;
        int rc;
 
-       /* Because we use per cpu values to feed input from sock redirect
-        * in BPF program to do_sk_redirect_map() call we need to ensure we
-        * are not preempted. RCU read lock is not sufficient in this case
-        * with CONFIG_PREEMPT_RCU enabled so we must be explicit here.
-        */
-       preempt_disable();
        rc = smap_verdict_func(psock, skb);
        switch (rc) {
-       case SK_REDIRECT:
-               sk = do_sk_redirect_map();
-               preempt_enable();
+       case __SK_REDIRECT:
+               sk = do_sk_redirect_map(skb);
                if (likely(sk)) {
                        struct smap_psock *peer = smap_psock_sk(sk);
 
@@ -139,10 +157,8 @@ static void smap_do_verdict(struct smap_psock *psock, struct sk_buff *skb)
                        }
                }
        /* Fall through and free skb otherwise */
-       case SK_DROP:
+       case __SK_DROP:
        default:
-               if (rc != SK_REDIRECT)
-                       preempt_enable();
                kfree_skb(skb);
        }
 }
@@ -369,7 +385,7 @@ static int smap_parse_func_strparser(struct strparser *strp,
         * any socket yet.
         */
        skb->sk = psock->sock;
-       bpf_compute_data_end(skb);
+       bpf_compute_data_end_sk_skb(skb);
        rc = (*prog->bpf_func)(skb, prog->insnsi);
        skb->sk = NULL;
        rcu_read_unlock();
@@ -487,6 +503,9 @@ static struct bpf_map *sock_map_alloc(union bpf_attr *attr)
        int err = -EINVAL;
        u64 cost;
 
+       if (!capable(CAP_NET_ADMIN))
+               return ERR_PTR(-EPERM);
+
        /* check sanity of attributes */
        if (attr->max_entries == 0 || attr->key_size != 4 ||
            attr->value_size != 4 || attr->map_flags & ~BPF_F_NUMA_NODE)
@@ -840,6 +859,12 @@ static int sock_map_update_elem(struct bpf_map *map,
                return -EINVAL;
        }
 
+       if (skops.sk->sk_type != SOCK_STREAM ||
+           skops.sk->sk_protocol != IPPROTO_TCP) {
+               fput(socket->file);
+               return -EOPNOTSUPP;
+       }
+
        err = sock_map_ctx_update_elem(&skops, map, key, flags);
        fput(socket->file);
        return err;
index cb17e1cd1d434dc2e052a2a9fb0aea967fcf4417..25d074920a009ff682d97bf88e68f466c79bd564 100644 (file)
@@ -186,15 +186,17 @@ static int bpf_map_alloc_id(struct bpf_map *map)
 
 static void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock)
 {
+       unsigned long flags;
+
        if (do_idr_lock)
-               spin_lock_bh(&map_idr_lock);
+               spin_lock_irqsave(&map_idr_lock, flags);
        else
                __acquire(&map_idr_lock);
 
        idr_remove(&map_idr, map->id);
 
        if (do_idr_lock)
-               spin_unlock_bh(&map_idr_lock);
+               spin_unlock_irqrestore(&map_idr_lock, flags);
        else
                __release(&map_idr_lock);
 }
index 799b2451ef2df42b17aadfe679a09dee9a0848c9..c48ca2a34b5e131420f4795c4a0eaf9d9a64861d 100644 (file)
@@ -653,6 +653,10 @@ static void mark_reg_read(const struct bpf_verifier_state *state, u32 regno)
 {
        struct bpf_verifier_state *parent = state->parent;
 
+       if (regno == BPF_REG_FP)
+               /* We don't need to worry about FP liveness because it's read-only */
+               return;
+
        while (parent) {
                /* if read wasn't screened by an earlier write ... */
                if (state->regs[regno].live & REG_LIVE_WRITTEN)
@@ -1112,7 +1116,12 @@ static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regn
                /* ctx accesses must be at a fixed offset, so that we can
                 * determine what type of data were returned.
                 */
-               if (!tnum_is_const(reg->var_off)) {
+               if (reg->off) {
+                       verbose("dereference of modified ctx ptr R%d off=%d+%d, ctx+const is allowed, ctx+const+const is not\n",
+                               regno, reg->off, off - reg->off);
+                       return -EACCES;
+               }
+               if (!tnum_is_const(reg->var_off) || reg->var_off.value) {
                        char tn_buf[48];
 
                        tnum_strn(tn_buf, sizeof(tn_buf), reg->var_off);
@@ -1120,7 +1129,6 @@ static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regn
                                tn_buf, off, size);
                        return -EACCES;
                }
-               off += reg->var_off.value;
                err = check_ctx_access(env, insn_idx, off, size, t, &reg_type);
                if (!err && t == BPF_READ && value_regno >= 0) {
                        /* ctx access returns either a scalar, or a
@@ -2345,6 +2353,7 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
                                 * copy register state to dest reg
                                 */
                                regs[insn->dst_reg] = regs[insn->src_reg];
+                               regs[insn->dst_reg].live |= REG_LIVE_WRITTEN;
                        } else {
                                /* R1 = (u32) R2 */
                                if (is_pointer_value(env, insn->src_reg)) {
@@ -2421,12 +2430,15 @@ static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
 }
 
 static void find_good_pkt_pointers(struct bpf_verifier_state *state,
-                                  struct bpf_reg_state *dst_reg)
+                                  struct bpf_reg_state *dst_reg,
+                                  bool range_right_open)
 {
        struct bpf_reg_state *regs = state->regs, *reg;
+       u16 new_range;
        int i;
 
-       if (dst_reg->off < 0)
+       if (dst_reg->off < 0 ||
+           (dst_reg->off == 0 && range_right_open))
                /* This doesn't give us any range */
                return;
 
@@ -2437,9 +2449,13 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
                 */
                return;
 
-       /* LLVM can generate four kind of checks:
+       new_range = dst_reg->off;
+       if (range_right_open)
+               new_range--;
+
+       /* Examples for register markings:
         *
-        * Type 1/2:
+        * pkt_data in dst register:
         *
         *   r2 = r3;
         *   r2 += 8;
@@ -2456,7 +2472,7 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
         *     r2=pkt(id=n,off=8,r=0)
         *     r3=pkt(id=n,off=0,r=0)
         *
-        * Type 3/4:
+        * pkt_data in src register:
         *
         *   r2 = r3;
         *   r2 += 8;
@@ -2474,7 +2490,9 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
         *     r3=pkt(id=n,off=0,r=0)
         *
         * Find register r3 and mark its range as r3=pkt(id=n,off=0,r=8)
-        * so that range of bytes [r3, r3 + 8) is safe to access.
+        * or r3=pkt(id=n,off=0,r=8-1), so that range of bytes [r3, r3 + 8)
+        * and [r3, r3 + 8-1) respectively is safe to access depending on
+        * the check.
         */
 
        /* If our ids match, then we must have the same max_value.  And we
@@ -2485,14 +2503,14 @@ static void find_good_pkt_pointers(struct bpf_verifier_state *state,
        for (i = 0; i < MAX_BPF_REG; i++)
                if (regs[i].type == PTR_TO_PACKET && regs[i].id == dst_reg->id)
                        /* keep the maximum range already checked */
-                       regs[i].range = max_t(u16, regs[i].range, dst_reg->off);
+                       regs[i].range = max(regs[i].range, new_range);
 
        for (i = 0; i < MAX_BPF_STACK; i += BPF_REG_SIZE) {
                if (state->stack_slot_type[i] != STACK_SPILL)
                        continue;
                reg = &state->spilled_regs[i / BPF_REG_SIZE];
                if (reg->type == PTR_TO_PACKET && reg->id == dst_reg->id)
-                       reg->range = max_t(u16, reg->range, dst_reg->off);
+                       reg->range = max(reg->range, new_range);
        }
 }
 
@@ -2856,19 +2874,43 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env,
        } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
                   dst_reg->type == PTR_TO_PACKET &&
                   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
-               find_good_pkt_pointers(this_branch, dst_reg);
+               /* pkt_data' > pkt_end */
+               find_good_pkt_pointers(this_branch, dst_reg, false);
+       } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGT &&
+                  dst_reg->type == PTR_TO_PACKET_END &&
+                  regs[insn->src_reg].type == PTR_TO_PACKET) {
+               /* pkt_end > pkt_data' */
+               find_good_pkt_pointers(other_branch, &regs[insn->src_reg], true);
+       } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLT &&
+                  dst_reg->type == PTR_TO_PACKET &&
+                  regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+               /* pkt_data' < pkt_end */
+               find_good_pkt_pointers(other_branch, dst_reg, true);
        } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLT &&
+                  dst_reg->type == PTR_TO_PACKET_END &&
+                  regs[insn->src_reg].type == PTR_TO_PACKET) {
+               /* pkt_end < pkt_data' */
+               find_good_pkt_pointers(this_branch, &regs[insn->src_reg], false);
+       } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
                   dst_reg->type == PTR_TO_PACKET &&
                   regs[insn->src_reg].type == PTR_TO_PACKET_END) {
-               find_good_pkt_pointers(other_branch, dst_reg);
+               /* pkt_data' >= pkt_end */
+               find_good_pkt_pointers(this_branch, dst_reg, true);
        } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JGE &&
                   dst_reg->type == PTR_TO_PACKET_END &&
                   regs[insn->src_reg].type == PTR_TO_PACKET) {
-               find_good_pkt_pointers(other_branch, &regs[insn->src_reg]);
+               /* pkt_end >= pkt_data' */
+               find_good_pkt_pointers(other_branch, &regs[insn->src_reg], false);
+       } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLE &&
+                  dst_reg->type == PTR_TO_PACKET &&
+                  regs[insn->src_reg].type == PTR_TO_PACKET_END) {
+               /* pkt_data' <= pkt_end */
+               find_good_pkt_pointers(other_branch, dst_reg, false);
        } else if (BPF_SRC(insn->code) == BPF_X && opcode == BPF_JLE &&
                   dst_reg->type == PTR_TO_PACKET_END &&
                   regs[insn->src_reg].type == PTR_TO_PACKET) {
-               find_good_pkt_pointers(this_branch, &regs[insn->src_reg]);
+               /* pkt_end <= pkt_data' */
+               find_good_pkt_pointers(this_branch, &regs[insn->src_reg], true);
        } else if (is_pointer_value(env, insn->dst_reg)) {
                verbose("R%d pointer comparison prohibited\n", insn->dst_reg);
                return -EACCES;
@@ -4205,7 +4247,12 @@ static int fixup_bpf_calls(struct bpf_verifier_env *env)
                }
 
                if (insn->imm == BPF_FUNC_redirect_map) {
-                       u64 addr = (unsigned long)prog;
+                       /* Note, we cannot use prog directly as imm as subsequent
+                        * rewrites would still change the prog pointer. The only
+                        * stable address we can use is aux, which also works with
+                        * prog clones during blinding.
+                        */
+                       u64 addr = (unsigned long)prog->aux;
                        struct bpf_insn r4_ld[] = {
                                BPF_LD_IMM64(BPF_REG_4, addr),
                                *insn,
index f97fe77ceb88aa39ff3bd01f497586f778c052a2..1e1c0236f55b5b05b54caa49dca62c1b7e2d5819 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/capability.c
  *
index ce693ccb8c58fa4f5be8532790ab8b0ca50a3b9a..ae448f7632cc64753e0e0e4d9c4a0e65d41912a5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y := cgroup.o namespace.o cgroup-v1.o
 
 obj-$(CONFIG_CGROUP_FREEZER) += freezer.o
index 5151ff256c2945ec3a6b274b4eae7c2221d81a98..bf54ade001be4ada1d9ebd45d3a12930828d94e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CGROUP_INTERNAL_H
 #define __CGROUP_INTERNAL_H
 
index d6551cd452380b6c1f398e2410e47d83fb208b53..44857278eb8aa6a2bbf27b7eb12137ef42628170 100644 (file)
@@ -2311,6 +2311,14 @@ out_release_tset:
                list_del_init(&cset->mg_node);
        }
        spin_unlock_irq(&css_set_lock);
+
+       /*
+        * Re-initialize the cgroup_taskset structure in case it is reused
+        * again in another cgroup_migrate_add_task()/cgroup_migrate_execute()
+        * iteration.
+        */
+       tset->nr_tasks = 0;
+       tset->csets    = &tset->src_csets;
        return ret;
 }
 
index f661b4cc5efde99eb804d5b96f2d9e22e07c91f9..5f780d8f6a9d787ed22cf30bd8be66a0ae78f069 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Debug controller
  *
index 66129eb4371d124f97c2a3233549be3673bd93ca..b05f1dd58a6220c5c4231465bee3f461078f171e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "cgroup-internal.h"
 
 #include <linux/sched/task.h>
index acf5308fad51f17706197ca6550ce7ae3c8b5378..04892a82f6ac36c92324806b66a1c1855880c8f7 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/lockdep.h>
 #include <linux/tick.h>
 #include <linux/irq.h>
+#include <linux/nmi.h>
 #include <linux/smpboot.h>
 #include <linux/relay.h>
 #include <linux/slab.h>
  * @bringup:   Single callback bringup or teardown selector
  * @cb_state:  The state for a single callback (install/uninstall)
  * @result:    Result of the operation
- * @done:      Signal completion to the issuer of the task
+ * @done_up:   Signal completion to the issuer of the task for cpu-up
+ * @done_down: Signal completion to the issuer of the task for cpu-down
  */
 struct cpuhp_cpu_state {
        enum cpuhp_state        state;
        enum cpuhp_state        target;
+       enum cpuhp_state        fail;
 #ifdef CONFIG_SMP
        struct task_struct      *thread;
        bool                    should_run;
@@ -58,18 +61,39 @@ struct cpuhp_cpu_state {
        bool                    single;
        bool                    bringup;
        struct hlist_node       *node;
+       struct hlist_node       *last;
        enum cpuhp_state        cb_state;
        int                     result;
-       struct completion       done;
+       struct completion       done_up;
+       struct completion       done_down;
 #endif
 };
 
-static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state);
+static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state) = {
+       .fail = CPUHP_INVALID,
+};
 
 #if defined(CONFIG_LOCKDEP) && defined(CONFIG_SMP)
-static struct lock_class_key cpuhp_state_key;
-static struct lockdep_map cpuhp_state_lock_map =
-       STATIC_LOCKDEP_MAP_INIT("cpuhp_state", &cpuhp_state_key);
+static struct lockdep_map cpuhp_state_up_map =
+       STATIC_LOCKDEP_MAP_INIT("cpuhp_state-up", &cpuhp_state_up_map);
+static struct lockdep_map cpuhp_state_down_map =
+       STATIC_LOCKDEP_MAP_INIT("cpuhp_state-down", &cpuhp_state_down_map);
+
+
+static void inline cpuhp_lock_acquire(bool bringup)
+{
+       lock_map_acquire(bringup ? &cpuhp_state_up_map : &cpuhp_state_down_map);
+}
+
+static void inline cpuhp_lock_release(bool bringup)
+{
+       lock_map_release(bringup ? &cpuhp_state_up_map : &cpuhp_state_down_map);
+}
+#else
+
+static void inline cpuhp_lock_acquire(bool bringup) { }
+static void inline cpuhp_lock_release(bool bringup) { }
+
 #endif
 
 /**
@@ -123,13 +147,16 @@ static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state)
 /**
  * cpuhp_invoke_callback _ Invoke the callbacks for a given state
  * @cpu:       The cpu for which the callback should be invoked
- * @step:      The step in the state machine
+ * @state:     The state to do callbacks for
  * @bringup:   True if the bringup callback should be invoked
+ * @node:      For multi-instance, do a single entry callback for install/remove
+ * @lastp:     For multi-instance rollback, remember how far we got
  *
  * Called from cpu hotplug and from the state register machinery.
  */
 static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
-                                bool bringup, struct hlist_node *node)
+                                bool bringup, struct hlist_node *node,
+                                struct hlist_node **lastp)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
        struct cpuhp_step *step = cpuhp_get_step(state);
@@ -137,7 +164,17 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
        int (*cb)(unsigned int cpu);
        int ret, cnt;
 
+       if (st->fail == state) {
+               st->fail = CPUHP_INVALID;
+
+               if (!(bringup ? step->startup.single : step->teardown.single))
+                       return 0;
+
+               return -EAGAIN;
+       }
+
        if (!step->multi_instance) {
+               WARN_ON_ONCE(lastp && *lastp);
                cb = bringup ? step->startup.single : step->teardown.single;
                if (!cb)
                        return 0;
@@ -152,6 +189,7 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
 
        /* Single invocation for instance add/remove */
        if (node) {
+               WARN_ON_ONCE(lastp && *lastp);
                trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
                ret = cbm(cpu, node);
                trace_cpuhp_exit(cpu, st->state, state, ret);
@@ -161,13 +199,23 @@ static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state,
        /* State transition. Invoke on all instances */
        cnt = 0;
        hlist_for_each(node, &step->list) {
+               if (lastp && node == *lastp)
+                       break;
+
                trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
                ret = cbm(cpu, node);
                trace_cpuhp_exit(cpu, st->state, state, ret);
-               if (ret)
-                       goto err;
+               if (ret) {
+                       if (!lastp)
+                               goto err;
+
+                       *lastp = node;
+                       return ret;
+               }
                cnt++;
        }
+       if (lastp)
+               *lastp = NULL;
        return 0;
 err:
        /* Rollback the instances if one failed */
@@ -178,12 +226,39 @@ err:
        hlist_for_each(node, &step->list) {
                if (!cnt--)
                        break;
-               cbm(cpu, node);
+
+               trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
+               ret = cbm(cpu, node);
+               trace_cpuhp_exit(cpu, st->state, state, ret);
+               /*
+                * Rollback must not fail,
+                */
+               WARN_ON_ONCE(ret);
        }
        return ret;
 }
 
 #ifdef CONFIG_SMP
+static inline void wait_for_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
+{
+       struct completion *done = bringup ? &st->done_up : &st->done_down;
+       wait_for_completion(done);
+}
+
+static inline void complete_ap_thread(struct cpuhp_cpu_state *st, bool bringup)
+{
+       struct completion *done = bringup ? &st->done_up : &st->done_down;
+       complete(done);
+}
+
+/*
+ * The former STARTING/DYING states, ran with IRQs disabled and must not fail.
+ */
+static bool cpuhp_is_atomic_state(enum cpuhp_state state)
+{
+       return CPUHP_AP_IDLE_DEAD <= state && state < CPUHP_AP_ONLINE;
+}
+
 /* Serializes the updates to cpu_online_mask, cpu_present_mask */
 static DEFINE_MUTEX(cpu_add_remove_lock);
 bool cpuhp_tasks_frozen;
@@ -271,14 +346,79 @@ void cpu_hotplug_enable(void)
 EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static void __cpuhp_kick_ap_work(struct cpuhp_cpu_state *st);
+static inline enum cpuhp_state
+cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target)
+{
+       enum cpuhp_state prev_state = st->state;
+
+       st->rollback = false;
+       st->last = NULL;
+
+       st->target = target;
+       st->single = false;
+       st->bringup = st->state < target;
+
+       return prev_state;
+}
+
+static inline void
+cpuhp_reset_state(struct cpuhp_cpu_state *st, enum cpuhp_state prev_state)
+{
+       st->rollback = true;
+
+       /*
+        * If we have st->last we need to undo partial multi_instance of this
+        * state first. Otherwise start undo at the previous state.
+        */
+       if (!st->last) {
+               if (st->bringup)
+                       st->state--;
+               else
+                       st->state++;
+       }
+
+       st->target = prev_state;
+       st->bringup = !st->bringup;
+}
+
+/* Regular hotplug invocation of the AP hotplug thread */
+static void __cpuhp_kick_ap(struct cpuhp_cpu_state *st)
+{
+       if (!st->single && st->state == st->target)
+               return;
+
+       st->result = 0;
+       /*
+        * Make sure the above stores are visible before should_run becomes
+        * true. Paired with the mb() above in cpuhp_thread_fun()
+        */
+       smp_mb();
+       st->should_run = true;
+       wake_up_process(st->thread);
+       wait_for_ap_thread(st, st->bringup);
+}
+
+static int cpuhp_kick_ap(struct cpuhp_cpu_state *st, enum cpuhp_state target)
+{
+       enum cpuhp_state prev_state;
+       int ret;
+
+       prev_state = cpuhp_set_state(st, target);
+       __cpuhp_kick_ap(st);
+       if ((ret = st->result)) {
+               cpuhp_reset_state(st, prev_state);
+               __cpuhp_kick_ap(st);
+       }
+
+       return ret;
+}
 
 static int bringup_wait_for_ap(unsigned int cpu)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
 
        /* Wait for the CPU to reach CPUHP_AP_ONLINE_IDLE */
-       wait_for_completion(&st->done);
+       wait_for_ap_thread(st, true);
        if (WARN_ON_ONCE((!cpu_online(cpu))))
                return -ECANCELED;
 
@@ -286,12 +426,10 @@ static int bringup_wait_for_ap(unsigned int cpu)
        stop_machine_unpark(cpu);
        kthread_unpark(st->thread);
 
-       /* Should we go further up ? */
-       if (st->target > CPUHP_AP_ONLINE_IDLE) {
-               __cpuhp_kick_ap_work(st);
-               wait_for_completion(&st->done);
-       }
-       return st->result;
+       if (st->target <= CPUHP_AP_ONLINE_IDLE)
+               return 0;
+
+       return cpuhp_kick_ap(st, st->target);
 }
 
 static int bringup_cpu(unsigned int cpu)
@@ -317,32 +455,6 @@ static int bringup_cpu(unsigned int cpu)
 /*
  * Hotplug state machine related functions
  */
-static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st)
-{
-       for (st->state++; st->state < st->target; st->state++) {
-               struct cpuhp_step *step = cpuhp_get_step(st->state);
-
-               if (!step->skip_onerr)
-                       cpuhp_invoke_callback(cpu, st->state, true, NULL);
-       }
-}
-
-static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
-                               enum cpuhp_state target)
-{
-       enum cpuhp_state prev_state = st->state;
-       int ret = 0;
-
-       for (; st->state > target; st->state--) {
-               ret = cpuhp_invoke_callback(cpu, st->state, false, NULL);
-               if (ret) {
-                       st->target = prev_state;
-                       undo_cpu_down(cpu, st);
-                       break;
-               }
-       }
-       return ret;
-}
 
 static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st)
 {
@@ -350,7 +462,7 @@ static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st)
                struct cpuhp_step *step = cpuhp_get_step(st->state);
 
                if (!step->skip_onerr)
-                       cpuhp_invoke_callback(cpu, st->state, false, NULL);
+                       cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
        }
 }
 
@@ -362,7 +474,7 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
 
        while (st->state < target) {
                st->state++;
-               ret = cpuhp_invoke_callback(cpu, st->state, true, NULL);
+               ret = cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
                if (ret) {
                        st->target = prev_state;
                        undo_cpu_up(cpu, st);
@@ -379,7 +491,8 @@ static void cpuhp_create(unsigned int cpu)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
 
-       init_completion(&st->done);
+       init_completion(&st->done_up);
+       init_completion(&st->done_down);
 }
 
 static int cpuhp_should_run(unsigned int cpu)
@@ -389,69 +502,90 @@ static int cpuhp_should_run(unsigned int cpu)
        return st->should_run;
 }
 
-/* Execute the teardown callbacks. Used to be CPU_DOWN_PREPARE */
-static int cpuhp_ap_offline(unsigned int cpu, struct cpuhp_cpu_state *st)
-{
-       enum cpuhp_state target = max((int)st->target, CPUHP_TEARDOWN_CPU);
-
-       return cpuhp_down_callbacks(cpu, st, target);
-}
-
-/* Execute the online startup callbacks. Used to be CPU_ONLINE */
-static int cpuhp_ap_online(unsigned int cpu, struct cpuhp_cpu_state *st)
-{
-       return cpuhp_up_callbacks(cpu, st, st->target);
-}
-
 /*
  * Execute teardown/startup callbacks on the plugged cpu. Also used to invoke
  * callbacks when a state gets [un]installed at runtime.
+ *
+ * Each invocation of this function by the smpboot thread does a single AP
+ * state callback.
+ *
+ * It has 3 modes of operation:
+ *  - single: runs st->cb_state
+ *  - up:     runs ++st->state, while st->state < st->target
+ *  - down:   runs st->state--, while st->state > st->target
+ *
+ * When complete or on error, should_run is cleared and the completion is fired.
  */
 static void cpuhp_thread_fun(unsigned int cpu)
 {
        struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
-       int ret = 0;
+       bool bringup = st->bringup;
+       enum cpuhp_state state;
 
        /*
-        * Paired with the mb() in cpuhp_kick_ap_work and
-        * cpuhp_invoke_ap_callback, so the work set is consistent visible.
+        * ACQUIRE for the cpuhp_should_run() load of ->should_run. Ensures
+        * that if we see ->should_run we also see the rest of the state.
         */
        smp_mb();
-       if (!st->should_run)
+
+       if (WARN_ON_ONCE(!st->should_run))
                return;
 
-       st->should_run = false;
+       cpuhp_lock_acquire(bringup);
 
-       lock_map_acquire(&cpuhp_state_lock_map);
-       /* Single callback invocation for [un]install ? */
        if (st->single) {
-               if (st->cb_state < CPUHP_AP_ONLINE) {
-                       local_irq_disable();
-                       ret = cpuhp_invoke_callback(cpu, st->cb_state,
-                                                   st->bringup, st->node);
-                       local_irq_enable();
+               state = st->cb_state;
+               st->should_run = false;
+       } else {
+               if (bringup) {
+                       st->state++;
+                       state = st->state;
+                       st->should_run = (st->state < st->target);
+                       WARN_ON_ONCE(st->state > st->target);
                } else {
-                       ret = cpuhp_invoke_callback(cpu, st->cb_state,
-                                                   st->bringup, st->node);
+                       state = st->state;
+                       st->state--;
+                       st->should_run = (st->state > st->target);
+                       WARN_ON_ONCE(st->state < st->target);
                }
-       } else if (st->rollback) {
-               BUG_ON(st->state < CPUHP_AP_ONLINE_IDLE);
+       }
+
+       WARN_ON_ONCE(!cpuhp_is_ap_state(state));
 
-               undo_cpu_down(cpu, st);
-               st->rollback = false;
+       if (st->rollback) {
+               struct cpuhp_step *step = cpuhp_get_step(state);
+               if (step->skip_onerr)
+                       goto next;
+       }
+
+       if (cpuhp_is_atomic_state(state)) {
+               local_irq_disable();
+               st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
+               local_irq_enable();
+
+               /*
+                * STARTING/DYING must not fail!
+                */
+               WARN_ON_ONCE(st->result);
        } else {
-               /* Cannot happen .... */
-               BUG_ON(st->state < CPUHP_AP_ONLINE_IDLE);
-
-               /* Regular hotplug work */
-               if (st->state < st->target)
-                       ret = cpuhp_ap_online(cpu, st);
-               else if (st->state > st->target)
-                       ret = cpuhp_ap_offline(cpu, st);
+               st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
+       }
+
+       if (st->result) {
+               /*
+                * If we fail on a rollback, we're up a creek without no
+                * paddle, no way forward, no way back. We loose, thanks for
+                * playing.
+                */
+               WARN_ON_ONCE(st->rollback);
+               st->should_run = false;
        }
-       lock_map_release(&cpuhp_state_lock_map);
-       st->result = ret;
-       complete(&st->done);
+
+next:
+       cpuhp_lock_release(bringup);
+
+       if (!st->should_run)
+               complete_ap_thread(st, bringup);
 }
 
 /* Invoke a single callback on a remote cpu */
@@ -460,62 +594,69 @@ cpuhp_invoke_ap_callback(int cpu, enum cpuhp_state state, bool bringup,
                         struct hlist_node *node)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
+       int ret;
 
        if (!cpu_online(cpu))
                return 0;
 
-       lock_map_acquire(&cpuhp_state_lock_map);
-       lock_map_release(&cpuhp_state_lock_map);
+       cpuhp_lock_acquire(false);
+       cpuhp_lock_release(false);
+
+       cpuhp_lock_acquire(true);
+       cpuhp_lock_release(true);
 
        /*
         * If we are up and running, use the hotplug thread. For early calls
         * we invoke the thread function directly.
         */
        if (!st->thread)
-               return cpuhp_invoke_callback(cpu, state, bringup, node);
+               return cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
 
+       st->rollback = false;
+       st->last = NULL;
+
+       st->node = node;
+       st->bringup = bringup;
        st->cb_state = state;
        st->single = true;
-       st->bringup = bringup;
-       st->node = node;
+
+       __cpuhp_kick_ap(st);
 
        /*
-        * Make sure the above stores are visible before should_run becomes
-        * true. Paired with the mb() above in cpuhp_thread_fun()
+        * If we failed and did a partial, do a rollback.
         */
-       smp_mb();
-       st->should_run = true;
-       wake_up_process(st->thread);
-       wait_for_completion(&st->done);
-       return st->result;
-}
+       if ((ret = st->result) && st->last) {
+               st->rollback = true;
+               st->bringup = !bringup;
+
+               __cpuhp_kick_ap(st);
+       }
 
-/* Regular hotplug invocation of the AP hotplug thread */
-static void __cpuhp_kick_ap_work(struct cpuhp_cpu_state *st)
-{
-       st->result = 0;
-       st->single = false;
        /*
-        * Make sure the above stores are visible before should_run becomes
-        * true. Paired with the mb() above in cpuhp_thread_fun()
+        * Clean up the leftovers so the next hotplug operation wont use stale
+        * data.
         */
-       smp_mb();
-       st->should_run = true;
-       wake_up_process(st->thread);
+       st->node = st->last = NULL;
+       return ret;
 }
 
 static int cpuhp_kick_ap_work(unsigned int cpu)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
-       enum cpuhp_state state = st->state;
+       enum cpuhp_state prev_state = st->state;
+       int ret;
+
+       cpuhp_lock_acquire(false);
+       cpuhp_lock_release(false);
+
+       cpuhp_lock_acquire(true);
+       cpuhp_lock_release(true);
 
-       trace_cpuhp_enter(cpu, st->target, state, cpuhp_kick_ap_work);
-       lock_map_acquire(&cpuhp_state_lock_map);
-       lock_map_release(&cpuhp_state_lock_map);
-       __cpuhp_kick_ap_work(st);
-       wait_for_completion(&st->done);
-       trace_cpuhp_exit(cpu, st->state, state, st->result);
-       return st->result;
+       trace_cpuhp_enter(cpu, st->target, prev_state, cpuhp_kick_ap_work);
+       ret = cpuhp_kick_ap(st, st->target);
+       trace_cpuhp_exit(cpu, st->state, prev_state, ret);
+
+       return ret;
 }
 
 static struct smp_hotplug_thread cpuhp_threads = {
@@ -581,6 +722,7 @@ static int take_cpu_down(void *_param)
        struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
        enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
        int err, cpu = smp_processor_id();
+       int ret;
 
        /* Ensure this CPU doesn't handle any more interrupts. */
        err = __cpu_disable();
@@ -594,8 +736,13 @@ static int take_cpu_down(void *_param)
        WARN_ON(st->state != CPUHP_TEARDOWN_CPU);
        st->state--;
        /* Invoke the former CPU_DYING callbacks */
-       for (; st->state > target; st->state--)
-               cpuhp_invoke_callback(cpu, st->state, false, NULL);
+       for (; st->state > target; st->state--) {
+               ret = cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
+               /*
+                * DYING must not fail!
+                */
+               WARN_ON_ONCE(ret);
+       }
 
        /* Give up timekeeping duties */
        tick_handover_do_timer();
@@ -639,7 +786,7 @@ static int takedown_cpu(unsigned int cpu)
         *
         * Wait for the stop thread to go away.
         */
-       wait_for_completion(&st->done);
+       wait_for_ap_thread(st, false);
        BUG_ON(st->state != CPUHP_AP_IDLE_DEAD);
 
        /* Interrupts are moved away from the dying cpu, reenable alloc/free */
@@ -658,7 +805,7 @@ static void cpuhp_complete_idle_dead(void *arg)
 {
        struct cpuhp_cpu_state *st = arg;
 
-       complete(&st->done);
+       complete_ap_thread(st, false);
 }
 
 void cpuhp_report_idle_dead(void)
@@ -676,11 +823,32 @@ void cpuhp_report_idle_dead(void)
                                 cpuhp_complete_idle_dead, st, 0);
 }
 
-#else
-#define takedown_cpu           NULL
-#endif
+static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st)
+{
+       for (st->state++; st->state < st->target; st->state++) {
+               struct cpuhp_step *step = cpuhp_get_step(st->state);
 
-#ifdef CONFIG_HOTPLUG_CPU
+               if (!step->skip_onerr)
+                       cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
+       }
+}
+
+static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
+                               enum cpuhp_state target)
+{
+       enum cpuhp_state prev_state = st->state;
+       int ret = 0;
+
+       for (; st->state > target; st->state--) {
+               ret = cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
+               if (ret) {
+                       st->target = prev_state;
+                       undo_cpu_down(cpu, st);
+                       break;
+               }
+       }
+       return ret;
+}
 
 /* Requires cpu_add_remove_lock to be held */
 static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
@@ -699,13 +867,13 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
 
        cpuhp_tasks_frozen = tasks_frozen;
 
-       prev_state = st->state;
-       st->target = target;
+       prev_state = cpuhp_set_state(st, target);
        /*
         * If the current CPU state is in the range of the AP hotplug thread,
         * then we need to kick the thread.
         */
        if (st->state > CPUHP_TEARDOWN_CPU) {
+               st->target = max((int)target, CPUHP_TEARDOWN_CPU);
                ret = cpuhp_kick_ap_work(cpu);
                /*
                 * The AP side has done the error rollback already. Just
@@ -720,6 +888,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
                 */
                if (st->state > CPUHP_TEARDOWN_CPU)
                        goto out;
+
+               st->target = target;
        }
        /*
         * The AP brought itself down to CPUHP_TEARDOWN_CPU. So we need
@@ -727,13 +897,17 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
         */
        ret = cpuhp_down_callbacks(cpu, st, target);
        if (ret && st->state > CPUHP_TEARDOWN_CPU && st->state < prev_state) {
-               st->target = prev_state;
-               st->rollback = true;
-               cpuhp_kick_ap_work(cpu);
+               cpuhp_reset_state(st, prev_state);
+               __cpuhp_kick_ap(st);
        }
 
 out:
        cpus_write_unlock();
+       /*
+        * Do post unplug cleanup. This is still protected against
+        * concurrent CPU hotplug via cpu_add_remove_lock.
+        */
+       lockup_detector_cleanup();
        return ret;
 }
 
@@ -754,11 +928,15 @@ out:
        cpu_maps_update_done();
        return err;
 }
+
 int cpu_down(unsigned int cpu)
 {
        return do_cpu_down(cpu, CPUHP_OFFLINE);
 }
 EXPORT_SYMBOL(cpu_down);
+
+#else
+#define takedown_cpu           NULL
 #endif /*CONFIG_HOTPLUG_CPU*/
 
 /**
@@ -772,11 +950,16 @@ void notify_cpu_starting(unsigned int cpu)
 {
        struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
        enum cpuhp_state target = min((int)st->target, CPUHP_AP_ONLINE);
+       int ret;
 
        rcu_cpu_starting(cpu);  /* Enables RCU usage on this CPU. */
        while (st->state < target) {
                st->state++;
-               cpuhp_invoke_callback(cpu, st->state, true, NULL);
+               ret = cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
+               /*
+                * STARTING must not fail!
+                */
+               WARN_ON_ONCE(ret);
        }
 }
 
@@ -794,7 +977,7 @@ void cpuhp_online_idle(enum cpuhp_state state)
                return;
 
        st->state = CPUHP_AP_ONLINE_IDLE;
-       complete(&st->done);
+       complete_ap_thread(st, true);
 }
 
 /* Requires cpu_add_remove_lock to be held */
@@ -829,7 +1012,7 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
 
        cpuhp_tasks_frozen = tasks_frozen;
 
-       st->target = target;
+       cpuhp_set_state(st, target);
        /*
         * If the current CPU state is in the range of the AP hotplug thread,
         * then we need to kick the thread once more.
@@ -1296,6 +1479,10 @@ static int cpuhp_issue_call(int cpu, enum cpuhp_state state, bool bringup,
        struct cpuhp_step *sp = cpuhp_get_step(state);
        int ret;
 
+       /*
+        * If there's nothing to do, we done.
+        * Relies on the union for multi_instance.
+        */
        if ((bringup && !sp->startup.single) ||
            (!bringup && !sp->teardown.single))
                return 0;
@@ -1307,9 +1494,9 @@ static int cpuhp_issue_call(int cpu, enum cpuhp_state state, bool bringup,
        if (cpuhp_is_ap_state(state))
                ret = cpuhp_invoke_ap_callback(cpu, state, bringup, node);
        else
-               ret = cpuhp_invoke_callback(cpu, state, bringup, node);
+               ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
 #else
-       ret = cpuhp_invoke_callback(cpu, state, bringup, node);
+       ret = cpuhp_invoke_callback(cpu, state, bringup, node, NULL);
 #endif
        BUG_ON(ret && !bringup);
        return ret;
@@ -1641,9 +1828,55 @@ static ssize_t show_cpuhp_target(struct device *dev,
 }
 static DEVICE_ATTR(target, 0644, show_cpuhp_target, write_cpuhp_target);
 
+
+static ssize_t write_cpuhp_fail(struct device *dev,
+                               struct device_attribute *attr,
+                               const char *buf, size_t count)
+{
+       struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id);
+       struct cpuhp_step *sp;
+       int fail, ret;
+
+       ret = kstrtoint(buf, 10, &fail);
+       if (ret)
+               return ret;
+
+       /*
+        * Cannot fail STARTING/DYING callbacks.
+        */
+       if (cpuhp_is_atomic_state(fail))
+               return -EINVAL;
+
+       /*
+        * Cannot fail anything that doesn't have callbacks.
+        */
+       mutex_lock(&cpuhp_state_mutex);
+       sp = cpuhp_get_step(fail);
+       if (!sp->startup.single && !sp->teardown.single)
+               ret = -EINVAL;
+       mutex_unlock(&cpuhp_state_mutex);
+       if (ret)
+               return ret;
+
+       st->fail = fail;
+
+       return count;
+}
+
+static ssize_t show_cpuhp_fail(struct device *dev,
+                              struct device_attribute *attr, char *buf)
+{
+       struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, dev->id);
+
+       return sprintf(buf, "%d\n", st->fail);
+}
+
+static DEVICE_ATTR(fail, 0644, show_cpuhp_fail, write_cpuhp_fail);
+
 static struct attribute *cpuhp_cpu_attrs[] = {
        &dev_attr_state.attr,
        &dev_attr_target.attr,
+       &dev_attr_fail.attr,
        NULL
 };
 
index 6c6262f86c17785b53928fa1787467040c8d3938..3506fc34a7121424961b88ab265b79f0900f03fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/dma.c: A DMA channel allocator. Inspired by linux/kernel/irq.c.
  *
index e556751d15d944d3ee51706bacb6d431979fe541..fc482c8e0bd880711ef61d654dbd0bfaa6dc784c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/elf.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
index 2925188f50eabe18bd14d2d3752651dcc67b59ef..3c022e33c10916aa44739d11932ab45a0ce7854a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_core.o = $(CC_FLAGS_FTRACE)
 endif
index 3e691b75b2db2eab410208b7312687270e1fe765..10cdb9c26b5d12d41ddacda43e335a9d635c66a7 100644 (file)
@@ -662,7 +662,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event)
        /*
         * Do not update time when cgroup is not active
         */
-       if (cgrp == event->cgrp)
+       if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
                __update_cgrp_time(event->cgrp);
 }
 
@@ -901,9 +901,11 @@ list_update_cgroup_event(struct perf_event *event,
        cpuctx_entry = &cpuctx->cgrp_cpuctx_entry;
        /* cpuctx->cgrp is NULL unless a cgroup event is active in this CPU .*/
        if (add) {
+               struct perf_cgroup *cgrp = perf_cgroup_from_task(current, ctx);
+
                list_add(cpuctx_entry, this_cpu_ptr(&cgrp_cpuctx_list));
-               if (perf_cgroup_from_task(current, ctx) == event->cgrp)
-                       cpuctx->cgrp = event->cgrp;
+               if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
+                       cpuctx->cgrp = cgrp;
        } else {
                list_del(cpuctx_entry);
                cpuctx->cgrp = NULL;
@@ -8171,6 +8173,7 @@ static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd)
                }
        }
        event->tp_event->prog = prog;
+       event->tp_event->bpf_prog_owner = event;
 
        return 0;
 }
@@ -8185,7 +8188,7 @@ static void perf_event_free_bpf_prog(struct perf_event *event)
                return;
 
        prog = event->tp_event->prog;
-       if (prog) {
+       if (prog && event->tp_event->bpf_prog_owner == event) {
                event->tp_event->prog = NULL;
                bpf_prog_put(prog);
        }
@@ -8954,6 +8957,14 @@ static struct perf_cpu_context __percpu *find_pmu_context(int ctxn)
 
 static void free_pmu_context(struct pmu *pmu)
 {
+       /*
+        * Static contexts such as perf_sw_context have a global lifetime
+        * and may be shared between different PMUs. Avoid freeing them
+        * when a single PMU is going away.
+        */
+       if (pmu->task_ctx_nr > perf_invalid_context)
+               return;
+
        mutex_lock(&pmus_lock);
        free_percpu(pmu->pmu_cpu_context);
        mutex_unlock(&pmus_lock);
index 843e9704733551aa7b2cac2c3db3dd35e7618c6d..09b1537ae06cd4645458a12ea111b4cf813038da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KERNEL_EVENTS_INTERNAL_H
 #define _KERNEL_EVENTS_INTERNAL_H
 
index af71a84e12eea343c6047184599fedf7f5592e65..f684d8e5fa2be2fd10e4d5e2f1e65a5c2afeb629 100644 (file)
@@ -412,6 +412,19 @@ err:
        return NULL;
 }
 
+static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
+{
+       if (rb->aux_overwrite)
+               return false;
+
+       if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
+               rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
+               return true;
+       }
+
+       return false;
+}
+
 /*
  * Commit the data written by hardware into the ring buffer by adjusting
  * aux_head and posting a PERF_RECORD_AUX into the perf buffer. It is the
@@ -451,10 +464,8 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size)
        }
 
        rb->user_page->aux_head = rb->aux_head;
-       if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
+       if (rb_need_aux_wakeup(rb))
                wakeup = true;
-               rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
-       }
 
        if (wakeup) {
                if (handle->aux_flags & PERF_AUX_FLAG_TRUNCATED)
@@ -484,9 +495,8 @@ int perf_aux_output_skip(struct perf_output_handle *handle, unsigned long size)
        rb->aux_head += size;
 
        rb->user_page->aux_head = rb->aux_head;
-       if (rb->aux_head - rb->aux_wakeup >= rb->aux_watermark) {
+       if (rb_need_aux_wakeup(rb)) {
                perf_output_wakeup(handle);
-               rb->aux_wakeup = rounddown(rb->aux_head, rb->aux_watermark);
                handle->wakeup = rb->aux_wakeup + rb->aux_watermark;
        }
 
index 6873bb3e6b7e80adcd9cb638b93d530b81881a43..0975b0268545a5e16b4aaadb58963ae651dcb519 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Handling of different ABIs (personalities).
  *
index 3481ababd06aa6cdd2aedd1fee0e56026acddc3b..f6cad39f35dfbe441abc5fc740458a6574e7d529 100644 (file)
@@ -1600,18 +1600,19 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
        struct waitid_info info = {.status = 0};
        long err = kernel_waitid(which, upid, &info, options, ru ? &r : NULL);
        int signo = 0;
+
        if (err > 0) {
                signo = SIGCHLD;
                err = 0;
-       }
-
-       if (!err) {
                if (ru && copy_to_user(ru, &r, sizeof(struct rusage)))
                        return -EFAULT;
        }
        if (!infop)
                return err;
 
+       if (!access_ok(VERIFY_WRITE, infop, sizeof(*infop)))
+               return -EFAULT;
+
        user_access_begin();
        unsafe_put_user(signo, &infop->si_signo, Efault);
        unsafe_put_user(0, &infop->si_errno, Efault);
@@ -1723,21 +1724,23 @@ COMPAT_SYSCALL_DEFINE5(waitid,
        if (err > 0) {
                signo = SIGCHLD;
                err = 0;
-       }
-
-       if (!err && uru) {
-               /* kernel_waitid() overwrites everything in ru */
-               if (COMPAT_USE_64BIT_TIME)
-                       err = copy_to_user(uru, &ru, sizeof(ru));
-               else
-                       err = put_compat_rusage(&ru, uru);
-               if (err)
-                       return -EFAULT;
+               if (uru) {
+                       /* kernel_waitid() overwrites everything in ru */
+                       if (COMPAT_USE_64BIT_TIME)
+                               err = copy_to_user(uru, &ru, sizeof(ru));
+                       else
+                               err = put_compat_rusage(&ru, uru);
+                       if (err)
+                               return -EFAULT;
+               }
        }
 
        if (!infop)
                return err;
 
+       if (!access_ok(VERIFY_WRITE, infop, sizeof(*infop)))
+               return -EFAULT;
+
        user_access_begin();
        unsafe_put_user(signo, &infop->si_signo, Efault);
        unsafe_put_user(0, &infop->si_errno, Efault);
index 38c2412401a1b118d53d3cff92eba24753134aed..9aa1cc41ecf79c8c2cc5fb9dbd3fbd418025c0dd 100644 (file)
@@ -102,15 +102,7 @@ int core_kernel_data(unsigned long addr)
 
 int __kernel_text_address(unsigned long addr)
 {
-       if (core_kernel_text(addr))
-               return 1;
-       if (is_module_text_address(addr))
-               return 1;
-       if (is_ftrace_trampoline(addr))
-               return 1;
-       if (is_kprobe_optinsn_slot(addr) || is_kprobe_insn_slot(addr))
-               return 1;
-       if (is_bpf_text_address(addr))
+       if (kernel_text_address(addr))
                return 1;
        /*
         * There might be init symbols in saved stacktraces.
@@ -127,17 +119,42 @@ int __kernel_text_address(unsigned long addr)
 
 int kernel_text_address(unsigned long addr)
 {
+       bool no_rcu;
+       int ret = 1;
+
        if (core_kernel_text(addr))
                return 1;
+
+       /*
+        * If a stack dump happens while RCU is not watching, then
+        * RCU needs to be notified that it requires to start
+        * watching again. This can happen either by tracing that
+        * triggers a stack trace, or a WARN() that happens during
+        * coming back from idle, or cpu on or offlining.
+        *
+        * is_module_text_address() as well as the kprobe slots
+        * and is_bpf_text_address() require RCU to be watching.
+        */
+       no_rcu = !rcu_is_watching();
+
+       /* Treat this like an NMI as it can happen anywhere */
+       if (no_rcu)
+               rcu_nmi_enter();
+
        if (is_module_text_address(addr))
-               return 1;
+               goto out;
        if (is_ftrace_trampoline(addr))
-               return 1;
+               goto out;
        if (is_kprobe_optinsn_slot(addr) || is_kprobe_insn_slot(addr))
-               return 1;
+               goto out;
        if (is_bpf_text_address(addr))
-               return 1;
-       return 0;
+               goto out;
+       ret = 0;
+out:
+       if (no_rcu)
+               rcu_nmi_exit();
+
+       return ret;
 }
 
 /*
index 10646182440fa4c3a3a8da7d9fdb7b45f01aab26..07cc743698d3668ef7fb4442c6de0e12de7f02f5 100644 (file)
@@ -215,6 +215,10 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
                if (!s)
                        continue;
 
+#ifdef CONFIG_DEBUG_KMEMLEAK
+               /* Clear stale pointers from reused stack. */
+               memset(s->addr, 0, THREAD_SIZE);
+#endif
                tsk->stack_vm_area = s;
                return s->addr;
        }
@@ -946,6 +950,24 @@ void mmput(struct mm_struct *mm)
 }
 EXPORT_SYMBOL_GPL(mmput);
 
+#ifdef CONFIG_MMU
+static void mmput_async_fn(struct work_struct *work)
+{
+       struct mm_struct *mm = container_of(work, struct mm_struct,
+                                           async_put_work);
+
+       __mmput(mm);
+}
+
+void mmput_async(struct mm_struct *mm)
+{
+       if (atomic_dec_and_test(&mm->mm_users)) {
+               INIT_WORK(&mm->async_put_work, mmput_async_fn);
+               schedule_work(&mm->async_put_work);
+       }
+}
+#endif
+
 /**
  * set_mm_exe_file - change a reference to the mm's executable file
  *
index 3d38eaf0549209ddb72e83780df6167a4423e8a2..76ed5921117a24cc347fa3aa79f59c2ba378897f 100644 (file)
@@ -821,8 +821,6 @@ static void get_pi_state(struct futex_pi_state *pi_state)
 /*
  * Drops a reference to the pi_state object and frees or caches it
  * when the last reference is gone.
- *
- * Must be called with the hb lock held.
  */
 static void put_pi_state(struct futex_pi_state *pi_state)
 {
@@ -837,16 +835,22 @@ static void put_pi_state(struct futex_pi_state *pi_state)
         * and has cleaned up the pi_state already
         */
        if (pi_state->owner) {
-               raw_spin_lock_irq(&pi_state->owner->pi_lock);
-               list_del_init(&pi_state->list);
-               raw_spin_unlock_irq(&pi_state->owner->pi_lock);
+               struct task_struct *owner;
 
-               rt_mutex_proxy_unlock(&pi_state->pi_mutex, pi_state->owner);
+               raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
+               owner = pi_state->owner;
+               if (owner) {
+                       raw_spin_lock(&owner->pi_lock);
+                       list_del_init(&pi_state->list);
+                       raw_spin_unlock(&owner->pi_lock);
+               }
+               rt_mutex_proxy_unlock(&pi_state->pi_mutex, owner);
+               raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
        }
 
-       if (current->pi_state_cache)
+       if (current->pi_state_cache) {
                kfree(pi_state);
-       else {
+       else {
                /*
                 * pi_state->list is already empty.
                 * clear pi_state->owner.
@@ -899,22 +903,41 @@ void exit_pi_state_list(struct task_struct *curr)
         */
        raw_spin_lock_irq(&curr->pi_lock);
        while (!list_empty(head)) {
-
                next = head->next;
                pi_state = list_entry(next, struct futex_pi_state, list);
                key = pi_state->key;
                hb = hash_futex(&key);
+
+               /*
+                * We can race against put_pi_state() removing itself from the
+                * list (a waiter going away). put_pi_state() will first
+                * decrement the reference count and then modify the list, so
+                * its possible to see the list entry but fail this reference
+                * acquire.
+                *
+                * In that case; drop the locks to let put_pi_state() make
+                * progress and retry the loop.
+                */
+               if (!atomic_inc_not_zero(&pi_state->refcount)) {
+                       raw_spin_unlock_irq(&curr->pi_lock);
+                       cpu_relax();
+                       raw_spin_lock_irq(&curr->pi_lock);
+                       continue;
+               }
                raw_spin_unlock_irq(&curr->pi_lock);
 
                spin_lock(&hb->lock);
-
-               raw_spin_lock_irq(&curr->pi_lock);
+               raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
+               raw_spin_lock(&curr->pi_lock);
                /*
                 * We dropped the pi-lock, so re-check whether this
                 * task still owns the PI-state:
                 */
                if (head->next != next) {
+                       /* retain curr->pi_lock for the loop invariant */
+                       raw_spin_unlock(&pi_state->pi_mutex.wait_lock);
                        spin_unlock(&hb->lock);
+                       put_pi_state(pi_state);
                        continue;
                }
 
@@ -922,9 +945,9 @@ void exit_pi_state_list(struct task_struct *curr)
                WARN_ON(list_empty(&pi_state->list));
                list_del_init(&pi_state->list);
                pi_state->owner = NULL;
-               raw_spin_unlock_irq(&curr->pi_lock);
 
-               get_pi_state(pi_state);
+               raw_spin_unlock(&curr->pi_lock);
+               raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
                spin_unlock(&hb->lock);
 
                rt_mutex_futex_unlock(&pi_state->pi_mutex);
@@ -1208,6 +1231,10 @@ static int attach_to_pi_owner(u32 uval, union futex_key *key,
 
        WARN_ON(!list_empty(&pi_state->list));
        list_add(&pi_state->list, &p->pi_state_list);
+       /*
+        * Assignment without holding pi_state->pi_mutex.wait_lock is safe
+        * because there is no concurrency as the object is not published yet.
+        */
        pi_state->owner = p;
        raw_spin_unlock_irq(&p->pi_lock);
 
@@ -1560,8 +1587,16 @@ static int futex_atomic_op_inuser(unsigned int encoded_op, u32 __user *uaddr)
        int oldval, ret;
 
        if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) {
-               if (oparg < 0 || oparg > 31)
-                       return -EINVAL;
+               if (oparg < 0 || oparg > 31) {
+                       char comm[sizeof(current->comm)];
+                       /*
+                        * kill this print and return -EINVAL when userspace
+                        * is sane again
+                        */
+                       pr_info_ratelimited("futex_wake_op: %s tries to shift op by %d; fix this program\n",
+                                       get_task_comm(comm, current), oparg);
+                       oparg &= 31;
+               }
                oparg = 1 << oparg;
        }
 
@@ -2878,6 +2913,7 @@ retry:
                raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
                spin_unlock(&hb->lock);
 
+               /* drops pi_state->pi_mutex.wait_lock */
                ret = wake_futex_pi(uaddr, uval, pi_state);
 
                put_pi_state(pi_state);
index 3f409968e4666e7d9252d0b7602253dfc853fc75..83f830acbb5fa1ec4baa8ea54f1069adb59d8695 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/futex_compat.c
  *
index 752d6486b67e15eba9113116972a2cd0450ca0cc..c6c50e5c680e049f6ded431b722852150b2261d2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"'
 
 obj-y := base.o fs.o
index c51a49c9be7064d30638d7ae184a4fcbc2136ec7..9c7c8d5c18f2d5ebdf71f5a6ead7f205bd3b3609 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This code maintains a list of active profiling data structures.
  *
index edf67c493a8e1132b79e24128c8cdea5ca85fe4d..6e40ff6be083dab77ad46edc01dbd95e4c0a854f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This code exports profiling data as debugfs files to userspace.
  *
index 27bc88a35013de7b3a7c3bac5118fefd1c5bf2d5..1e32e66c9563cb9022f5daf7af268fdefff81147 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This code provides functions to handle gcc's profiling data format
  *  introduced with gcc 3.4. Future versions of gcc may change the gcov
index 46a18e72bce614c804fbe958f0a6b4d00d11027a..ca5e5c0ef8536ccded9097e94ebab38d3a868547 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  This code provides functions to handle gcc's profiling data format
  *  introduced with gcc 4.7.
index 92c8e22a29ede59be2c942fda5a07ff1c63849f5..de118ad4a024e172ef621e82801843f6ddc2d85d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Profiling infrastructure declarations.
  *
index 434f6665f187d817cdfc00b928cfd84d33eae258..e357bc800111043ed8d477d758bd245b8aa4c566 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Supplementary group IDs
  */
index 1970cafe8f2ad147e8680006709347a730bc49b7..ed15d142694b8e49e8f2c7f0d9ff3831eab054ef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o
 obj-$(CONFIG_IRQ_TIMINGS) += timings.o
index d69bd77252a76403b11dad5d30a98e35327fda58..e12d351082256be89dc12a5b89ba9c63ce6bc20a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2016 Thomas Gleixner.
  * Copyright (C) 2016-2017 Christoph Hellwig.
index d30a0dd5cc02a3461de425622df59bdc3947387e..befa671fba644917c5b696d4ea5c5199bf6dc318 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/irq/autoprobe.c
  *
index f51b7b6d245177292bb3dbdc2ab25ebc7ddf42b2..5a2ef92c2782c59c177e1f6c2eb5b4b17fb75a49 100644 (file)
@@ -202,7 +202,7 @@ __irq_startup_managed(struct irq_desc *desc, struct cpumask *aff, bool force)
 
        irqd_clr_managed_shutdown(d);
 
-       if (cpumask_any_and(aff, cpu_online_mask) > nr_cpu_ids) {
+       if (cpumask_any_and(aff, cpu_online_mask) >= nr_cpu_ids) {
                /*
                 * Catch code which fiddles with enable_irq() on a managed
                 * and potentially shutdown IRQ. Chained interrupt
@@ -265,8 +265,8 @@ int irq_startup(struct irq_desc *desc, bool resend, bool force)
                        irq_setup_affinity(desc);
                        break;
                case IRQ_STARTUP_MANAGED:
+                       irq_do_set_affinity(d, aff, false);
                        ret = __irq_startup(desc);
-                       irq_set_affinity_locked(d, aff, false);
                        break;
                case IRQ_STARTUP_ABORT:
                        return 0;
index 638eb9c83d9f75b0e73c0d80e2c87f6e4c2e02f3..9eb09aef0313cecaea99844c653016469cc9321f 100644 (file)
 static inline bool irq_needs_fixup(struct irq_data *d)
 {
        const struct cpumask *m = irq_data_get_effective_affinity_mask(d);
+       unsigned int cpu = smp_processor_id();
 
-       return cpumask_test_cpu(smp_processor_id(), m);
+#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
+       /*
+        * The cpumask_empty() check is a workaround for interrupt chips,
+        * which do not implement effective affinity, but the architecture has
+        * enabled the config switch. Use the general affinity mask instead.
+        */
+       if (cpumask_empty(m))
+               m = irq_data_get_affinity_mask(d);
+
+       /*
+        * Sanity check. If the mask is not empty when excluding the outgoing
+        * CPU then it must contain at least one online CPU. The outgoing CPU
+        * has been removed from the online mask already.
+        */
+       if (cpumask_any_but(m, cpu) < nr_cpu_ids &&
+           cpumask_any_and(m, cpu_online_mask) >= nr_cpu_ids) {
+               /*
+                * If this happens then there was a missed IRQ fixup at some
+                * point. Warn about it and enforce fixup.
+                */
+               pr_warn("Eff. affinity %*pbl of IRQ %u contains only offline CPUs after offlining CPU %u\n",
+                       cpumask_pr_args(m), d->irq, cpu);
+               return true;
+       }
+#endif
+       return cpumask_test_cpu(cpu, m);
 }
 
 static bool migrate_one_irq(struct irq_desc *desc)
index e75e29e4434a9073b0d05f39903df2cf7f4c2d10..17f05ef8f575f996f87e614a914bbe21d537f949 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Debugging printout:
  */
index f7086b78ad6e1e1bcb3995537b024d7ed057ef0e..c26c5bb6b491f75f76f1190cdc21989f79d17e09 100644 (file)
@@ -135,17 +135,26 @@ void irq_gc_ack_clr_bit(struct irq_data *d)
 }
 
 /**
- * irq_gc_mask_disable_reg_and_ack - Mask and ack pending interrupt
+ * irq_gc_mask_disable_and_ack_set - Mask and ack pending interrupt
  * @d: irq_data
+ *
+ * This generic implementation of the irq_mask_ack method is for chips
+ * with separate enable/disable registers instead of a single mask
+ * register and where a pending interrupt is acknowledged by setting a
+ * bit.
+ *
+ * Note: This is the only permutation currently used.  Similar generic
+ * functions should be added here if other permutations are required.
  */
-void irq_gc_mask_disable_reg_and_ack(struct irq_data *d)
+void irq_gc_mask_disable_and_ack_set(struct irq_data *d)
 {
        struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
        struct irq_chip_type *ct = irq_data_get_chip_type(d);
        u32 mask = d->mask;
 
        irq_gc_lock(gc);
-       irq_reg_writel(gc, mask, ct->regs.mask);
+       irq_reg_writel(gc, mask, ct->regs.disable);
+       *ct->mask_cache &= ~mask;
        irq_reg_writel(gc, mask, ct->regs.ack);
        irq_gc_unlock(gc);
 }
@@ -322,7 +331,6 @@ int __irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip,
                /* Calc pointer to the next generic chip */
                tmp += sizeof(*gc) + num_ct * sizeof(struct irq_chip_type);
        }
-       d->name = name;
        return 0;
 }
 EXPORT_SYMBOL_GPL(__irq_alloc_domain_generic_chips);
index a4aa39009f0d50d5be26e32b768bc2a2ff9c1f27..44ed5f8c8759051896fcdae2a38ae6eb0c4edd83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * IRQ subsystem internal functions and variables:
  *
index e84b7056bb083349b8326ee5dae71284a4fc22cb..ac4644e92b499949b1a11652ddde3e3bccba8072 100644 (file)
@@ -945,7 +945,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
        struct irq_desc *desc;
        struct irq_domain *domain;
        struct radix_tree_iter iter;
-       void **slot;
+       void __rcu **slot;
        int i;
 
        seq_printf(m, " %-16s  %-6s  %-10s  %-10s  %s\n",
@@ -1453,7 +1453,7 @@ out_free_desc:
 /* The irq_data was moved, fix the revmap to refer to the new location */
 static void irq_domain_fix_revmap(struct irq_data *d)
 {
-       void **slot;
+       void __rcu **slot;
 
        if (d->hwirq < d->domain->revmap_size)
                return; /* Not using radix tree. */
index 573dc52b0806054bc485c1290d0ed58ccfbb5c87..4bff6a10ae8ec7efb76dd8e677e86016ca04355a 100644 (file)
@@ -168,6 +168,19 @@ void irq_set_thread_affinity(struct irq_desc *desc)
                        set_bit(IRQTF_AFFINITY, &action->thread_flags);
 }
 
+static void irq_validate_effective_affinity(struct irq_data *data)
+{
+#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
+       const struct cpumask *m = irq_data_get_effective_affinity_mask(data);
+       struct irq_chip *chip = irq_data_get_irq_chip(data);
+
+       if (!cpumask_empty(m))
+               return;
+       pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n",
+                    chip->name, data->irq);
+#endif
+}
+
 int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
                        bool force)
 {
@@ -175,12 +188,16 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
        struct irq_chip *chip = irq_data_get_irq_chip(data);
        int ret;
 
+       if (!chip || !chip->irq_set_affinity)
+               return -EINVAL;
+
        ret = chip->irq_set_affinity(data, mask, force);
        switch (ret) {
        case IRQ_SET_MASK_OK:
        case IRQ_SET_MASK_OK_DONE:
                cpumask_copy(desc->irq_common_data.affinity, mask);
        case IRQ_SET_MASK_OK_NOCOPY:
+               irq_validate_effective_affinity(data);
                irq_set_thread_affinity(desc);
                ret = 0;
        }
@@ -1643,6 +1660,10 @@ const void *free_irq(unsigned int irq, void *dev_id)
 #endif
 
        action = __free_irq(irq, dev_id);
+
+       if (!action)
+               return NULL;
+
        devname = action->name;
        kfree(action);
        return devname;
index 6ca054a3f91dd6a874d023ce583b574c22178686..86ae0eb80b533f42f4d13f31b3b9f902b5cd8e88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/irq.h>
 #include <linux/interrupt.h>
index 6376b4a598d35247b0c0f95d645e5f319f1d744c..c010cc0daf79a2d8c90048fc784ce1f8181651fe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/irq/proc.c
  *
index b86886beee4f2e21c0f3dacf0aed0370ce79ebcc..1d08f45135c212f368c4f3a856f213d3752e5ccf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/irq/resend.c
  *
index 320579d8909100d1ebb181510dd8ce4433ab5456..e43795cd2ccfba2f848dcaa0f3b37aff562af83b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Internal header to deal with irq_desc->status which will be renamed
  * to irq_desc->settings.
index 061ba7eed4edf77249b0a99df771e3f6d0dc26e0..987d7bca4864ffda66e6fa64d3213aed2082383e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/irq/spurious.c
  *
index ea34ed8bb9529c7b7a2a38b0a4e050995b4ba97e..a0e3d7a0e8b811681991fe532969b3dd9376a14c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/syscalls.h>
 #include <linux/fdtable.h>
@@ -131,7 +132,7 @@ static int kcmp_epoll_target(struct task_struct *task1,
        if (filp_epoll) {
                filp_tgt = get_epoll_tfile_raw_ptr(filp_epoll, slot.tfd, slot.toff);
                fput(filp_epoll);
-       } else
+       }
 
        if (IS_ERR(filp_tgt))
                return PTR_ERR(filp_tgt);
index 3f693a0f6f3edc9e563b681ad47bf168e73d0dca..fc6af9e1308b7a943d8519732a5f83885a0db2b5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) "kcov: " fmt
 
 #define DISABLE_BRANCH_PROFILING
index 50dfcb039a417eb62abfd85ffac6f91266c8f324..48aaf2ac0d0d15d7cd1dca3c42fa9b2f00313c9e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_KEXEC_INTERNAL_H
 #define LINUX_KEXEC_INTERNAL_H
 
index b9628e43c78f60711f8a8c21693aef5c7041f2bb..bf8c8fd72589ddeeae34662a8d76352afa890678 100644 (file)
@@ -830,6 +830,41 @@ int klp_register_patch(struct klp_patch *patch)
 }
 EXPORT_SYMBOL_GPL(klp_register_patch);
 
+/*
+ * Remove parts of patches that touch a given kernel module. The list of
+ * patches processed might be limited. When limit is NULL, all patches
+ * will be handled.
+ */
+static void klp_cleanup_module_patches_limited(struct module *mod,
+                                              struct klp_patch *limit)
+{
+       struct klp_patch *patch;
+       struct klp_object *obj;
+
+       list_for_each_entry(patch, &klp_patches, list) {
+               if (patch == limit)
+                       break;
+
+               klp_for_each_object(patch, obj) {
+                       if (!klp_is_module(obj) || strcmp(obj->name, mod->name))
+                               continue;
+
+                       /*
+                        * Only unpatch the module if the patch is enabled or
+                        * is in transition.
+                        */
+                       if (patch->enabled || patch == klp_transition_patch) {
+                               pr_notice("reverting patch '%s' on unloading module '%s'\n",
+                                         patch->mod->name, obj->mod->name);
+                               klp_unpatch_object(obj);
+                       }
+
+                       klp_free_object_loaded(obj);
+                       break;
+               }
+       }
+}
+
 int klp_module_coming(struct module *mod)
 {
        int ret;
@@ -894,7 +929,7 @@ err:
        pr_warn("patch '%s' failed for module '%s', refusing to load module '%s'\n",
                patch->mod->name, obj->mod->name, obj->mod->name);
        mod->klp_alive = false;
-       klp_free_object_loaded(obj);
+       klp_cleanup_module_patches_limited(mod, patch);
        mutex_unlock(&klp_mutex);
 
        return ret;
@@ -902,9 +937,6 @@ err:
 
 void klp_module_going(struct module *mod)
 {
-       struct klp_patch *patch;
-       struct klp_object *obj;
-
        if (WARN_ON(mod->state != MODULE_STATE_GOING &&
                    mod->state != MODULE_STATE_COMING))
                return;
@@ -917,25 +949,7 @@ void klp_module_going(struct module *mod)
         */
        mod->klp_alive = false;
 
-       list_for_each_entry(patch, &klp_patches, list) {
-               klp_for_each_object(patch, obj) {
-                       if (!klp_is_module(obj) || strcmp(obj->name, mod->name))
-                               continue;
-
-                       /*
-                        * Only unpatch the module if the patch is enabled or
-                        * is in transition.
-                        */
-                       if (patch->enabled || patch == klp_transition_patch) {
-                               pr_notice("reverting patch '%s' on unloading module '%s'\n",
-                                         patch->mod->name, obj->mod->name);
-                               klp_unpatch_object(obj);
-                       }
-
-                       klp_free_object_loaded(obj);
-                       break;
-               }
-       }
+       klp_cleanup_module_patches_limited(mod, NULL);
 
        mutex_unlock(&klp_mutex);
 }
index c74f24c478379fdd6a22f312eb970f8c2ba42a74..a351601d7f761e11e169682a4b4b866e5d90c861 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIVEPATCH_CORE_H
 #define _LIVEPATCH_CORE_H
 
index 0db227170c36a10de1c2774d06dd03aeadeeb07b..e72d8250d04bcbb83c5b4f99313b557a3d340d6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIVEPATCH_PATCH_H
 #define _LIVEPATCH_PATCH_H
 
index ce09b326546cd3bf71f6e0a300bfd865eb1677ca..0f6e27c481f92802785e0664d9e6e0e982966d75 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIVEPATCH_TRANSITION_H
 #define _LIVEPATCH_TRANSITION_H
 
index 760158d9d98d0ff50218a7e617e30171913e9e6c..392c7f23af7651a52dda141740d890b77114cab6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Any varying coverage in these files is non-deterministic
 # and is generally not a function of system call inputs.
 KCOV_INSTRUMENT                := n
index 44c8d0d17170af808ab0f11c4e556d49044a6c78..e36e652d996fe682157c52768949f0b9c7f1e6d1 100644 (file)
@@ -1873,10 +1873,10 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
               struct held_lock *next, int distance, struct stack_trace *trace,
               int (*save)(struct stack_trace *trace))
 {
+       struct lock_list *uninitialized_var(target_entry);
        struct lock_list *entry;
-       int ret;
        struct lock_list this;
-       struct lock_list *uninitialized_var(target_entry);
+       int ret;
 
        /*
         * Prove that the new <prev> -> <next> dependency would not
@@ -1890,8 +1890,17 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
        this.class = hlock_class(next);
        this.parent = NULL;
        ret = check_noncircular(&this, hlock_class(prev), &target_entry);
-       if (unlikely(!ret))
+       if (unlikely(!ret)) {
+               if (!trace->entries) {
+                       /*
+                        * If @save fails here, the printing might trigger
+                        * a WARN but because of the !nr_entries it should
+                        * not do bad things.
+                        */
+                       save(trace);
+               }
                return print_circular_bug(&this, target_entry, next, prev, trace);
+       }
        else if (unlikely(ret < 0))
                return print_bfs_bug(ret);
 
@@ -1938,7 +1947,7 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
                return print_bfs_bug(ret);
 
 
-       if (save && !save(trace))
+       if (!trace->entries && !save(trace))
                return 0;
 
        /*
@@ -1958,20 +1967,6 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
        if (!ret)
                return 0;
 
-       /*
-        * Debugging printouts:
-        */
-       if (verbose(hlock_class(prev)) || verbose(hlock_class(next))) {
-               graph_unlock();
-               printk("\n new dependency: ");
-               print_lock_name(hlock_class(prev));
-               printk(KERN_CONT " => ");
-               print_lock_name(hlock_class(next));
-               printk(KERN_CONT "\n");
-               dump_stack();
-               if (!graph_lock())
-                       return 0;
-       }
        return 2;
 }
 
@@ -1986,8 +1981,12 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
 {
        int depth = curr->lockdep_depth;
        struct held_lock *hlock;
-       struct stack_trace trace;
-       int (*save)(struct stack_trace *trace) = save_trace;
+       struct stack_trace trace = {
+               .nr_entries = 0,
+               .max_entries = 0,
+               .entries = NULL,
+               .skip = 0,
+       };
 
        /*
         * Debugging checks.
@@ -2018,17 +2017,10 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
                         */
                        if (hlock->read != 2 && hlock->check) {
                                int ret = check_prev_add(curr, hlock, next,
-                                                        distance, &trace, save);
+                                                        distance, &trace, save_trace);
                                if (!ret)
                                        return 0;
 
-                               /*
-                                * Stop saving stack_trace if save_trace() was
-                                * called at least once:
-                                */
-                               if (save && ret == 2)
-                                       save = NULL;
-
                                /*
                                 * Stop after the first non-trylock entry,
                                 * as non-trylock entries have added their
index 1da4669d57a7a62c330c8d24ca9d30819a892a2a..d459d624ba2a70f859d16eec8eebf8d9a82b6382 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * kernel/lockdep_internals.h
  *
index 68d9e267ccd46df87d88bef89a809a40a05ed9bd..ad69bbc9bd28fee235d4b25f69149375f31cea34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kernel/lockdep_proc.c
  *
index 6a385aabcce7b1cc606d1b25ec6addfef222c664..f046b7ce9dd624a90d605c57d7ef30d9a04a6929 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * MCS lock defines
  *
index 4174417d53094d55c3e89ef08e6f360c6b41557f..1edd3f45a4ecbad7979f26944a9173b3de028959 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Mutexes: blocking mutual exclusion locks
  *
index 6ebc1902f779fe6d89cc7fe4fe1f78c10610eed6..1c2287d3fa7191589c6d8f0d5f4e67c3282f8dfe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Mutexes: blocking mutual exclusion locks
  *
index a74ee6abd039d0291f136b1b2dd1e5affeba2d06..6ef600aa0f47e7dd2cbc8901ccb6397e098ab759 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/percpu.h>
 #include <linux/sched.h>
 #include <linux/osq_lock.h>
index 43555681c40b496dd6494a0f52240f932b7bef38..15b6a39366c6210d3dc90440fb43b29f8d27a969 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GEN_PV_LOCK_SLOWPATH
 #error "do not include this file"
 #endif
index f4a74e78d4678f767f8d18d801db43dfeb92cece..fd4fe1f5b458dbd7ed3d7bea411b500a1506ed62 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * RT-Mutexes: blocking mutual exclusion locks with PI support
  *
index 5078c6ddf4a53887f6a5521a4c8d07a2b774e7d3..fc549713bba3f4749807cee8964d178cb286080e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * RT-Mutexes: blocking mutual exclusion locks with PI support
  *
index 5c253caffe91c51f491020098fb9c5b992eb9675..732f96abf4623c603998de94cef00e5c1770fb73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * RT-Mutexes: blocking mutual exclusion locks with PI support
  *
index 7453be0485a5e85738aa6de657c111d85494e08b..124e98ca0b174153d14f3c0ddf49109ea8cb8960 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * RT Mutexes: blocking mutual exclusion locks with PI support
  *
index 0848634c5512998ab0fa1d6b495216f4ef305853..a7ffb2a96ede0b9938671e6278647181542f7102 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* rwsem-spinlock.c: R/W semaphores: contention handling functions for
  * generic spinlock implementation
  *
index 02f660666ab8976ea51215427050d1fe3807326f..e795908f36070dd33ed94630bb63b188065f21ca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* rwsem.c: R/W semaphores: contention handling functions
  *
  * Written by David Howells (dhowells@redhat.com).
@@ -612,6 +613,33 @@ struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
        unsigned long flags;
        DEFINE_WAKE_Q(wake_q);
 
+       /*
+       * __rwsem_down_write_failed_common(sem)
+       *   rwsem_optimistic_spin(sem)
+       *     osq_unlock(sem->osq)
+       *   ...
+       *   atomic_long_add_return(&sem->count)
+       *
+       *      - VS -
+       *
+       *              __up_write()
+       *                if (atomic_long_sub_return_release(&sem->count) < 0)
+       *                  rwsem_wake(sem)
+       *                    osq_is_locked(&sem->osq)
+       *
+       * And __up_write() must observe !osq_is_locked() when it observes the
+       * atomic_long_add_return() in order to not miss a wakeup.
+       *
+       * This boils down to:
+       *
+       * [S.rel] X = 1                [RmW] r0 = (Y += 0)
+       *         MB                         RMB
+       * [RmW]   Y += 1               [L]   r1 = X
+       *
+       * exists (r0=1 /\ r1=0)
+       */
+       smp_rmb();
+
        /*
         * If a spinner is present, it is not necessary to do the wakeup.
         * Try to do wakeup only if the trylock succeeds to minimize
index 4d48b1c4870dda0b33c7f93e1aed01fe8b6ceb61..a6c76a4832b40d60dacafaa33490c3a30eb77c70 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* kernel/rwsem.c: R/W semaphores, public implementation
  *
  * Written by David Howells (dhowells@redhat.com).
index a699f4048ba11c76017a32ed0b5bc86b0ce45843..a883b8f1fdc6efbadcab3ca130120cd28130e518 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * The owner field of the rw_semaphore structure will be set to
  * RWSEM_READ_OWNED when a reader grabs the lock. A writer will clear
index 4b082b5cac9eedfd7c31daef7e8dd02974eedbed..6e40fdfba326b9e415dbea410eb7cb2166d51e45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (2004) Linus Torvalds
  *
index 6bcbfbf1a8fdfd2f1008cde707db9a798a68cdc6..403ab9cdb949a0483bd82c811a3383eed77e5246 100644 (file)
@@ -350,7 +350,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
        pgprot_t pgprot = PAGE_KERNEL;
        struct dev_pagemap *pgmap;
        struct page_map *page_map;
-       int error, nid, is_ram;
+       int error, nid, is_ram, i = 0;
 
        align_start = res->start & ~(SECTION_SIZE - 1);
        align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE)
@@ -448,6 +448,8 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
                list_del(&page->lru);
                page->pgmap = pgmap;
                percpu_ref_get(ref);
+               if (!(++i % 1024))
+                       cond_resched();
        }
        devres_add(dev, page_map);
        return __va(res->start);
index 60b2d8101355fedcfd8dfee99f8a2fa467ea99d9..cc9108c2a1fde209f5fe8b41e4cfca2e9e4d1310 100644 (file)
@@ -224,7 +224,7 @@ char *parse_args(const char *doing,
        }                                                               \
        int param_get_##name(char *buffer, const struct kernel_param *kp) \
        {                                                               \
-               return scnprintf(buffer, PAGE_SIZE, format,             \
+               return scnprintf(buffer, PAGE_SIZE, format "\n",        \
                                *((type *)kp->arg));                    \
        }                                                               \
        const struct kernel_param_ops param_ops_##name = {                      \
@@ -236,14 +236,14 @@ char *parse_args(const char *doing,
        EXPORT_SYMBOL(param_ops_##name)
 
 
-STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
-STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
-STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
-STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
-STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
-STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
-STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
-STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull);
+STANDARD_PARAM_DEF(byte,       unsigned char,          "%hhu", kstrtou8);
+STANDARD_PARAM_DEF(short,      short,                  "%hi",  kstrtos16);
+STANDARD_PARAM_DEF(ushort,     unsigned short,         "%hu",  kstrtou16);
+STANDARD_PARAM_DEF(int,                int,                    "%i",   kstrtoint);
+STANDARD_PARAM_DEF(uint,       unsigned int,           "%u",   kstrtouint);
+STANDARD_PARAM_DEF(long,       long,                   "%li",  kstrtol);
+STANDARD_PARAM_DEF(ulong,      unsigned long,          "%lu",  kstrtoul);
+STANDARD_PARAM_DEF(ullong,     unsigned long long,     "%llu", kstrtoull);
 
 int param_set_charp(const char *val, const struct kernel_param *kp)
 {
@@ -270,7 +270,7 @@ EXPORT_SYMBOL(param_set_charp);
 
 int param_get_charp(char *buffer, const struct kernel_param *kp)
 {
-       return scnprintf(buffer, PAGE_SIZE, "%s", *((char **)kp->arg));
+       return scnprintf(buffer, PAGE_SIZE, "%s\n", *((char **)kp->arg));
 }
 EXPORT_SYMBOL(param_get_charp);
 
@@ -301,7 +301,7 @@ EXPORT_SYMBOL(param_set_bool);
 int param_get_bool(char *buffer, const struct kernel_param *kp)
 {
        /* Y and N chosen as being relatively non-coder friendly */
-       return sprintf(buffer, "%c", *(bool *)kp->arg ? 'Y' : 'N');
+       return sprintf(buffer, "%c\n", *(bool *)kp->arg ? 'Y' : 'N');
 }
 EXPORT_SYMBOL(param_get_bool);
 
@@ -360,7 +360,7 @@ EXPORT_SYMBOL(param_set_invbool);
 
 int param_get_invbool(char *buffer, const struct kernel_param *kp)
 {
-       return sprintf(buffer, "%c", (*(bool *)kp->arg) ? 'N' : 'Y');
+       return sprintf(buffer, "%c\n", (*(bool *)kp->arg) ? 'N' : 'Y');
 }
 EXPORT_SYMBOL(param_get_invbool);
 
@@ -460,8 +460,9 @@ static int param_array_get(char *buffer, const struct kernel_param *kp)
        struct kernel_param p = *kp;
 
        for (i = off = 0; i < (arr->num ? *arr->num : arr->max); i++) {
+               /* Replace \n with comma */
                if (i)
-                       buffer[off++] = ',';
+                       buffer[off - 1] = ',';
                p.arg = arr->elem + arr->elemsize * i;
                check_kparam_locked(p.mod);
                ret = arr->ops->get(buffer + off, &p);
@@ -507,7 +508,7 @@ EXPORT_SYMBOL(param_set_copystring);
 int param_get_string(char *buffer, const struct kernel_param *kp)
 {
        const struct kparam_string *kps = kp->str;
-       return strlcpy(buffer, kps->string, kps->maxlen);
+       return scnprintf(buffer, PAGE_SIZE, "%s\n", kps->string);
 }
 EXPORT_SYMBOL(param_get_string);
 
@@ -549,10 +550,6 @@ static ssize_t param_attr_show(struct module_attribute *mattr,
        kernel_param_lock(mk->mod);
        count = attribute->param->ops->get(buf, attribute->param);
        kernel_param_unlock(mk->mod);
-       if (count > 0) {
-               strcat(buf, "\n");
-               ++count;
-       }
        return count;
 }
 
@@ -600,7 +597,7 @@ EXPORT_SYMBOL(kernel_param_unlock);
 /*
  * add_sysfs_param - add a parameter to sysfs
  * @mk: struct module_kobject
- * @kparam: the actual parameter definition to add to sysfs
+ * @kp: the actual parameter definition to add to sysfs
  * @name: name of parameter
  *
  * Create a kobject if for a (per-module) parameter if mp NULL, and
index eb4f717705baeb22ef92c98c113541a8cc1b2a8f..a3f79f0eef3675917752d09b4aff2d0d04ba776a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 ccflags-$(CONFIG_PM_DEBUG)     := -DDEBUG
 
index 9012ecf7b814f9b476abff1ddd40ea508a12f9e1..41e83a779e19992f0097c92622332a05b1c4043e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kernel/power/autosleep.c
  *
index 0e781798b0b364594696f893a79c2659f8c6b7d2..fcdf0e14a47d478c4553de679eb68ad3c1871049 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions for saving/restoring console.
  *
index 1d2d761e3c25008fbacc139e445cbbc8a325c9d9..f29cd178df90a1fbf20586702060e8a3c60a8bd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/suspend.h>
 #include <linux/suspend_ioctls.h>
 #include <linux/utsname.h>
index 50f25cb370c6e10769b3e7ee359113ea5b4013e2..7381d49a44db5a728dcf56bb3aa08a62b49887bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/power/process.c - Functions for starting/stopping processes on 
  *                           suspend transitions.
index 3e2b4f519009709c61b8de20e7f159efd159df04..ccd2d20e6b067f6a7c3bb83a5848e9c0b333fade 100644 (file)
@@ -120,22 +120,26 @@ static void s2idle_loop(void)
                 * frozen processes + suspended devices + idle processors.
                 * Thus s2idle_enter() should be called right after
                 * all devices have been suspended.
+                *
+                * Wakeups during the noirq suspend of devices may be spurious,
+                * so prevent them from terminating the loop right away.
                 */
                error = dpm_noirq_suspend_devices(PMSG_SUSPEND);
                if (!error)
                        s2idle_enter();
+               else if (error == -EBUSY && pm_wakeup_pending())
+                       error = 0;
 
-               dpm_noirq_resume_devices(PMSG_RESUME);
-               if (error && (error != -EBUSY || !pm_wakeup_pending())) {
-                       dpm_noirq_end();
-                       break;
-               }
-
-               if (s2idle_ops && s2idle_ops->wake)
+               if (!error && s2idle_ops && s2idle_ops->wake)
                        s2idle_ops->wake();
 
+               dpm_noirq_resume_devices(PMSG_RESUME);
+
                dpm_noirq_end();
 
+               if (error)
+                       break;
+
                if (s2idle_ops && s2idle_ops->sync)
                        s2idle_ops->sync();
 
index 1896386e16bbe0ddd6173cf7a9e95d42617488a4..dfba59be190b6a7d36495b7dcfc225a9fba2b0f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kernel/power/wakelock.c
  *
index 61d41ca418441a15945b376964f6f3ed07ac84b8..1d21ebacfdb83e906361aede35b76666c26f22cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
index 749a6756843a08e2a5f2a9ae4fa984658b43a65b..123154f86304401c78de042f1e1b607001c2156f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PRINTK_BRAILLE_H
 #define _PRINTK_BRAILLE_H
 
index 2ca4a8b5fe57960c584d74e7dabf76b22bc71613..11f19c466af56c97de893ab14d1e01ea579cada2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CONSOLE_CMDLINE_H
 #define _CONSOLE_CMDLINE_H
 
index 82cfc285b046d8e320559a48cf08007a19742dc0..d84de6766472d5cf0e276bd6eb574c8103efadb2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Range add and subtract
  */
index 13c0fc852767e2272f202f2dbe2c9f08fb97851e..020e8b6a644b4a97ec98d7d529b9fa4018106c62 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Any varying coverage in these files is non-deterministic
 # and is generally not a function of system call inputs.
 KCOV_INSTRUMENT := n
index 729a8706751db4230bf3e3275192475fb44f9c3a..6d5880089ff6b7785db69e0facb432cab4aab5fc 100644 (file)
@@ -854,7 +854,7 @@ void __call_srcu(struct srcu_struct *sp, struct rcu_head *rhp,
 /**
  * call_srcu() - Queue a callback for invocation after an SRCU grace period
  * @sp: srcu_struct in queue the callback
- * @head: structure to be used for queueing the SRCU callback.
+ * @rhp: structure to be used for queueing the SRCU callback.
  * @func: function to be invoked after the SRCU grace period
  *
  * The callback function will be invoked some time after a full SRCU
index 50d1861f7759b40ff0248281e742a6a4fac1e852..3f943efcf61c1e3c31373799f475c80967ae3fd0 100644 (file)
@@ -85,6 +85,9 @@ void rcu_sync_init(struct rcu_sync *rsp, enum rcu_sync_type type)
 }
 
 /**
+ * rcu_sync_enter_start - Force readers onto slow path for multiple updates
+ * @rsp: Pointer to rcu_sync structure to use for synchronization
+ *
  * Must be called after rcu_sync_init() and before first use.
  *
  * Ensures rcu_sync_is_idle() returns false and rcu_sync_{enter,exit}()
@@ -142,7 +145,7 @@ void rcu_sync_enter(struct rcu_sync *rsp)
 
 /**
  * rcu_sync_func() - Callback function managing reader access to fastpath
- * @rsp: Pointer to rcu_sync structure to use for synchronization
+ * @rhp: Pointer to rcu_head in rcu_sync structure to use for synchronization
  *
  * This function is passed to one of the call_rcu() functions by
  * rcu_sync_exit(), so that it is invoked after a grace period following the
@@ -158,9 +161,9 @@ void rcu_sync_enter(struct rcu_sync *rsp)
  * rcu_sync_exit().  Otherwise, set all state back to idle so that readers
  * can again use their fastpaths.
  */
-static void rcu_sync_func(struct rcu_head *rcu)
+static void rcu_sync_func(struct rcu_head *rhp)
 {
-       struct rcu_sync *rsp = container_of(rcu, struct rcu_sync, cb_head);
+       struct rcu_sync *rsp = container_of(rhp, struct rcu_sync, cb_head);
        unsigned long flags;
 
        BUG_ON(rsp->gp_state != GP_PASSED);
index 1250e4bd4b85e690c7db2b061a87599e8651a606..3e3650e94ae6b1dd26fea711a8961d627c16623b 100644 (file)
@@ -882,6 +882,11 @@ void rcu_irq_exit(void)
 
        RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_irq_exit() invoked with irqs enabled!!!");
        rdtp = this_cpu_ptr(&rcu_dynticks);
+
+       /* Page faults can happen in NMI handlers, so check... */
+       if (rdtp->dynticks_nmi_nesting)
+               return;
+
        WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
                     rdtp->dynticks_nesting < 1);
        if (rdtp->dynticks_nesting <= 1) {
@@ -1015,6 +1020,11 @@ void rcu_irq_enter(void)
 
        RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_irq_enter() invoked with irqs enabled!!!");
        rdtp = this_cpu_ptr(&rcu_dynticks);
+
+       /* Page faults can happen in NMI handlers, so check... */
+       if (rdtp->dynticks_nmi_nesting)
+               return;
+
        oldval = rdtp->dynticks_nesting;
        rdtp->dynticks_nesting++;
        WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
@@ -3087,9 +3097,10 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func,
  * read-side critical sections have completed. call_rcu_sched() assumes
  * that the read-side critical sections end on enabling of preemption
  * or on voluntary preemption.
- * RCU read-side critical sections are delimited by :
- *  - rcu_read_lock_sched() and rcu_read_unlock_sched(), OR
- *  - anything that disables preemption.
+ * RCU read-side critical sections are delimited by:
+ *
+ * - rcu_read_lock_sched() and rcu_read_unlock_sched(), OR
+ * - anything that disables preemption.
  *
  *  These may be nested.
  *
@@ -3114,11 +3125,12 @@ EXPORT_SYMBOL_GPL(call_rcu_sched);
  * handler. This means that read-side critical sections in process
  * context must not be interrupted by softirqs. This interface is to be
  * used when most of the read-side critical sections are in softirq context.
- * RCU read-side critical sections are delimited by :
- *  - rcu_read_lock() and  rcu_read_unlock(), if in interrupt context.
- *  OR
- *  - rcu_read_lock_bh() and rcu_read_unlock_bh(), if in process context.
- *  These may be nested.
+ * RCU read-side critical sections are delimited by:
+ *
+ * - rcu_read_lock() and  rcu_read_unlock(), if in interrupt context, OR
+ * - rcu_read_lock_bh() and rcu_read_unlock_bh(), if in process context.
+ *
+ * These may be nested.
  *
  * See the description of call_rcu() for more detailed information on
  * memory ordering guarantees.
index 78f54932ea1d09edfab191763583d565df677adf..a9ee16bbc6931a6e6cb8631f48bc6c19b39215b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifdef CONFIG_FUNCTION_TRACER
 CFLAGS_REMOVE_clock.o = $(CC_FLAGS_FTRACE)
 endif
index de6d7f4dfcb52ce4f7386b052b5ded37a9f30054..a43df51935386fcd48f9fad8905d722880c8f8c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "sched.h"
 
 #include <linux/proc_fs.h>
index ce40c810cd5c346c82e61ea40c0b817c1251c02a..27cd22b8982405c5ef2f07c7c4ff50314d220f36 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_SCHED_AUTOGROUP
 
 #include <linux/kref.h>
index cc873075c3bde5fa8f97403243f1b2754e326675..2ddaec40956f7cf1356e17404e758b9a11924c8d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generic wait-for-completion handler;
  *
index 18a6966567daf30517a9f832e4a88b20ae705401..d17c5da523a0bc817a6b32413ee7e0ba3e7a6b2e 100644 (file)
@@ -5166,6 +5166,28 @@ void sched_show_task(struct task_struct *p)
        put_task_stack(p);
 }
 
+static inline bool
+state_filter_match(unsigned long state_filter, struct task_struct *p)
+{
+       /* no filter, everything matches */
+       if (!state_filter)
+               return true;
+
+       /* filter, but doesn't match */
+       if (!(p->state & state_filter))
+               return false;
+
+       /*
+        * When looking for TASK_UNINTERRUPTIBLE skip TASK_IDLE (allows
+        * TASK_KILLABLE).
+        */
+       if (state_filter == TASK_UNINTERRUPTIBLE && p->state == TASK_IDLE)
+               return false;
+
+       return true;
+}
+
+
 void show_state_filter(unsigned long state_filter)
 {
        struct task_struct *g, *p;
@@ -5188,7 +5210,7 @@ void show_state_filter(unsigned long state_filter)
                 */
                touch_nmi_watchdog();
                touch_all_softlockup_watchdogs();
-               if (!state_filter || (p->state & state_filter))
+               if (state_filter_match(state_filter, p))
                        sched_show_task(p);
        }
 
index f95ab29a45d0515d5651719143b38e335d366f4e..44ab32a4fab6d936c71d03cd02cfd013873fe363 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/cgroup.h>
 #include <linux/slab.h>
 #include <linux/percpu.h>
index ba72807c73d45cf939987ea6440c20510a4b1afa..a8358a57a316d372e1550dfc600ff01614f6494e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_CGROUP_CPUACCT
 
 extern void cpuacct_charge(struct task_struct *tsk, u64 cputime);
index f7da8c55bba03261002c1b8d000233c8dd190a55..b010d26e108eb4dbf067a8116e422dc74232cf6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CPUDL_H
 #define _LINUX_CPUDL_H
 
index 63cbb9ca049698ad1c8a0c0d5430b7911b253baf..bab05001907182815bd1e3922191cd1778deb1e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_CPUPRI_H
 #define _LINUX_CPUPRI_H
 
index 0191ec7667c326d603ed058f9a393af0436b7c76..4ae5c1ea90e26bea2253124a8bc17cc3f84c1ce0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Deadline Scheduling Class (SCHED_DEADLINE)
  *
index 01217fb5a5de9bd007506020cffb5052ab3abba8..2f93e4a2d9f623915d0023f9b3a7d8b7d7b95cf7 100644 (file)
@@ -466,8 +466,6 @@ static char *task_group_path(struct task_group *tg)
 }
 #endif
 
-static const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
-
 static void
 print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
 {
index 70ba32e08a231858326211b7f64a3ae6a3f4dbd3..5c09ddf8c8321ca1aa18a6ff7f78d3d2937ec92e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Completely Fair Scheduling (CFS) Class (SCHED_NORMAL/SCHED_BATCH)
  *
@@ -5356,91 +5357,62 @@ static int wake_wide(struct task_struct *p)
        return 1;
 }
 
-struct llc_stats {
-       unsigned long   nr_running;
-       unsigned long   load;
-       unsigned long   capacity;
-       int             has_capacity;
-};
+/*
+ * The purpose of wake_affine() is to quickly determine on which CPU we can run
+ * soonest. For the purpose of speed we only consider the waking and previous
+ * CPU.
+ *
+ * wake_affine_idle() - only considers 'now', it check if the waking CPU is (or
+ *                     will be) idle.
+ *
+ * wake_affine_weight() - considers the weight to reflect the average
+ *                       scheduling latency of the CPUs. This seems to work
+ *                       for the overloaded case.
+ */
 
-static bool get_llc_stats(struct llc_stats *stats, int cpu)
+static bool
+wake_affine_idle(struct sched_domain *sd, struct task_struct *p,
+                int this_cpu, int prev_cpu, int sync)
 {
-       struct sched_domain_shared *sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));
-
-       if (!sds)
-               return false;
+       if (idle_cpu(this_cpu))
+               return true;
 
-       stats->nr_running       = READ_ONCE(sds->nr_running);
-       stats->load             = READ_ONCE(sds->load);
-       stats->capacity         = READ_ONCE(sds->capacity);
-       stats->has_capacity     = stats->nr_running < per_cpu(sd_llc_size, cpu);
+       if (sync && cpu_rq(this_cpu)->nr_running == 1)
+               return true;
 
-       return true;
+       return false;
 }
 
-/*
- * Can a task be moved from prev_cpu to this_cpu without causing a load
- * imbalance that would trigger the load balancer?
- *
- * Since we're running on 'stale' values, we might in fact create an imbalance
- * but recomputing these values is expensive, as that'd mean iteration 2 cache
- * domains worth of CPUs.
- */
 static bool
-wake_affine_llc(struct sched_domain *sd, struct task_struct *p,
-               int this_cpu, int prev_cpu, int sync)
+wake_affine_weight(struct sched_domain *sd, struct task_struct *p,
+                  int this_cpu, int prev_cpu, int sync)
 {
-       struct llc_stats prev_stats, this_stats;
        s64 this_eff_load, prev_eff_load;
        unsigned long task_load;
 
-       if (!get_llc_stats(&prev_stats, prev_cpu) ||
-           !get_llc_stats(&this_stats, this_cpu))
-               return false;
+       this_eff_load = target_load(this_cpu, sd->wake_idx);
+       prev_eff_load = source_load(prev_cpu, sd->wake_idx);
 
-       /*
-        * If sync wakeup then subtract the (maximum possible)
-        * effect of the currently running task from the load
-        * of the current LLC.
-        */
        if (sync) {
                unsigned long current_load = task_h_load(current);
 
-               /* in this case load hits 0 and this LLC is considered 'idle' */
-               if (current_load > this_stats.load)
+               if (current_load > this_eff_load)
                        return true;
 
-               this_stats.load -= current_load;
+               this_eff_load -= current_load;
        }
 
-       /*
-        * The has_capacity stuff is not SMT aware, but by trying to balance
-        * the nr_running on both ends we try and fill the domain at equal
-        * rates, thereby first consuming cores before siblings.
-        */
-
-       /* if the old cache has capacity, stay there */
-       if (prev_stats.has_capacity && prev_stats.nr_running < this_stats.nr_running+1)
-               return false;
-
-       /* if this cache has capacity, come here */
-       if (this_stats.has_capacity && this_stats.nr_running+1 < prev_stats.nr_running)
-               return true;
-
-       /*
-        * Check to see if we can move the load without causing too much
-        * imbalance.
-        */
        task_load = task_h_load(p);
 
-       this_eff_load = 100;
-       this_eff_load *= prev_stats.capacity;
-
-       prev_eff_load = 100 + (sd->imbalance_pct - 100) / 2;
-       prev_eff_load *= this_stats.capacity;
+       this_eff_load += task_load;
+       if (sched_feat(WA_BIAS))
+               this_eff_load *= 100;
+       this_eff_load *= capacity_of(prev_cpu);
 
-       this_eff_load *= this_stats.load + task_load;
-       prev_eff_load *= prev_stats.load - task_load;
+       prev_eff_load -= task_load;
+       if (sched_feat(WA_BIAS))
+               prev_eff_load *= 100 + (sd->imbalance_pct - 100) / 2;
+       prev_eff_load *= capacity_of(this_cpu);
 
        return this_eff_load <= prev_eff_load;
 }
@@ -5449,22 +5421,13 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p,
                       int prev_cpu, int sync)
 {
        int this_cpu = smp_processor_id();
-       bool affine;
+       bool affine = false;
 
-       /*
-        * Default to no affine wakeups; wake_affine() should not effect a task
-        * placement the load-balancer feels inclined to undo. The conservative
-        * option is therefore to not move tasks when they wake up.
-        */
-       affine = false;
+       if (sched_feat(WA_IDLE) && !affine)
+               affine = wake_affine_idle(sd, p, this_cpu, prev_cpu, sync);
 
-       /*
-        * If the wakeup is across cache domains, try to evaluate if movement
-        * makes sense, otherwise rely on select_idle_siblings() to do
-        * placement inside the cache domain.
-        */
-       if (!cpus_share_cache(prev_cpu, this_cpu))
-               affine = wake_affine_llc(sd, p, this_cpu, prev_cpu, sync);
+       if (sched_feat(WA_WEIGHT) && !affine)
+               affine = wake_affine_weight(sd, p, this_cpu, prev_cpu, sync);
 
        schedstat_inc(p->se.statistics.nr_wakeups_affine_attempts);
        if (affine) {
@@ -7600,7 +7563,6 @@ static inline enum fbq_type fbq_classify_rq(struct rq *rq)
  */
 static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sds)
 {
-       struct sched_domain_shared *shared = env->sd->shared;
        struct sched_domain *child = env->sd->child;
        struct sched_group *sg = env->sd->groups;
        struct sg_lb_stats *local = &sds->local_stat;
@@ -7672,22 +7634,6 @@ next_group:
                if (env->dst_rq->rd->overload != overload)
                        env->dst_rq->rd->overload = overload;
        }
-
-       if (!shared)
-               return;
-
-       /*
-        * Since these are sums over groups they can contain some CPUs
-        * multiple times for the NUMA domains.
-        *
-        * Currently only wake_affine_llc() and find_busiest_group()
-        * uses these numbers, only the last is affected by this problem.
-        *
-        * XXX fix that.
-        */
-       WRITE_ONCE(shared->nr_running,  sds->total_running);
-       WRITE_ONCE(shared->load,        sds->total_load);
-       WRITE_ONCE(shared->capacity,    sds->total_capacity);
 }
 
 /**
@@ -8097,6 +8043,13 @@ static int should_we_balance(struct lb_env *env)
        struct sched_group *sg = env->sd->groups;
        int cpu, balance_cpu = -1;
 
+       /*
+        * Ensure the balancing environment is consistent; can happen
+        * when the softirq triggers 'during' hotplug.
+        */
+       if (!cpumask_test_cpu(env->dst_cpu, env->cpus))
+               return 0;
+
        /*
         * In the newly idle case, we will allow all the cpu's
         * to do the newly idle load balance.
index d3fb15555291e0bfb4ce2e837f38cc1676a664d4..9552fd5854bffc2c07ec77225a1aed9176da53cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Only give sleepers 50% of their service deficit. This allows
  * them to run sooner, but does not allow tons of sleepers to
@@ -81,3 +82,6 @@ SCHED_FEAT(RT_RUNTIME_SHARE, true)
 SCHED_FEAT(LB_MIN, false)
 SCHED_FEAT(ATTACH_AGE_LOAD, true)
 
+SCHED_FEAT(WA_IDLE, true)
+SCHED_FEAT(WA_WEIGHT, true)
+SCHED_FEAT(WA_BIAS, true)
index 0c00172db63e7fa767179c8d6ac31c7573d5870d..d518664cce4f1105376610aa0ec35bc3b4cd49d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "sched.h"
 
 /*
index f14716a3522f796d98d79dc2c623a675725c08d6..89a989e4d75876e38ca704854145dc98c71f2ffe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kernel/sched/loadavg.c
  *
index a92fddc227471e05a77d9f8c4c585b84ba8f28dd..dd7908743dab696facd9dd32f4399ee952228151 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/membarrier.h>
 #include <linux/tick.h>
 #include <linux/cpumask.h>
+#include <linux/atomic.h>
 
 #include "sched.h"     /* for cpu_rq(). */
 
  * except MEMBARRIER_CMD_QUERY.
  */
 #define MEMBARRIER_CMD_BITMASK \
-       (MEMBARRIER_CMD_SHARED | MEMBARRIER_CMD_PRIVATE_EXPEDITED)
+       (MEMBARRIER_CMD_SHARED | MEMBARRIER_CMD_PRIVATE_EXPEDITED       \
+       | MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED)
 
 static void ipi_mb(void *info)
 {
        smp_mb();       /* IPIs should be serializing but paranoid. */
 }
 
-static void membarrier_private_expedited(void)
+static int membarrier_private_expedited(void)
 {
        int cpu;
        bool fallback = false;
        cpumask_var_t tmpmask;
 
+       if (!(atomic_read(&current->mm->membarrier_state)
+                       & MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY))
+               return -EPERM;
+
        if (num_online_cpus() == 1)
-               return;
+               return 0;
 
        /*
         * Matches memory barriers around rq->curr modification in
@@ -94,6 +100,24 @@ static void membarrier_private_expedited(void)
         * rq->curr modification in scheduler.
         */
        smp_mb();       /* exit from system call is not a mb */
+       return 0;
+}
+
+static void membarrier_register_private_expedited(void)
+{
+       struct task_struct *p = current;
+       struct mm_struct *mm = p->mm;
+
+       /*
+        * We need to consider threads belonging to different thread
+        * groups, which use the same mm. (CLONE_VM but not
+        * CLONE_THREAD).
+        */
+       if (atomic_read(&mm->membarrier_state)
+                       & MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY)
+               return;
+       atomic_or(MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY,
+                       &mm->membarrier_state);
 }
 
 /**
@@ -144,7 +168,9 @@ SYSCALL_DEFINE2(membarrier, int, cmd, int, flags)
                        synchronize_sched();
                return 0;
        case MEMBARRIER_CMD_PRIVATE_EXPEDITED:
-               membarrier_private_expedited();
+               return membarrier_private_expedited();
+       case MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED:
+               membarrier_register_private_expedited();
                return 0;
        default:
                return -EINVAL;
index 0af5ca9e3e3f1d3613e69fabba32d909d0a15f3b..3c96c80e0992aff2c3dc0299f709ab16e75d5193 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Real-Time Scheduling Class (mapped to the SCHED_FIFO and SCHED_RR
  * policies)
index cd200d16529efe9ca8cbc56afa5896fde001e654..a26473674fb797411b7c3b1e8790c64dcfd7ed51 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Generated by Documentation/scheduler/sched-pelt; do not modify. */
 
 static const u32 runnable_avg_yN_inv[] = {
index 14db76cd496ffb68641c3cc68a9be72205524e1b..3b448ba82225dfb6f5ce7b221541aa2a6d6b3a6e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <linux/sched.h>
 #include <linux/sched/autogroup.h>
index 87e2c9f0c33e7470252206c893fd5fb1e250790c..940b1fa1d2ce447ab76e8e1ca0fa390dff68a501 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/slab.h>
 #include <linux/fs.h>
index d5710651043b62e0a0eabbbd85729761c1c9cb04..baf500d12b7c9eaa951657598b781b6b67ab8b3e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifdef CONFIG_SCHEDSTATS
 
index 9f69fb6308537b2b7e6b9ba47f6cb17fd17d97ce..45caf90b24cd9693a72b943220ecd0176580f748 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "sched.h"
 
 /*
index 2227e183e202652a164307977503bd271fe4ca16..9ff1555341ed5d47ba6302da0a2e74acfa6bb16c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sched/signal.h>
 #include <linux/swait.h>
 
index f1cf4f306a8285b642c02ebd28e4d0c78e21e9a5..6798276d29af2e72ecc91351b34c9adbf2985099 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Scheduler topology setup/handling methods
  */
index 98b59b5db90baae53b091afe807c133e6027d081..418a1c045933dc57e97de46efe1c71dcc5c879ca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/seccomp.c
  *
 #include <linux/audit.h>
 #include <linux/compat.h>
 #include <linux/coredump.h>
+#include <linux/kmemleak.h>
 #include <linux/sched.h>
 #include <linux/sched/task_stack.h>
 #include <linux/seccomp.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
+#include <linux/sysctl.h>
 
 #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
 #include <asm/syscall.h>
@@ -42,6 +45,7 @@
  *         get/put helpers should be used when accessing an instance
  *         outside of a lifetime-guarded section.  In general, this
  *         is only needed for handling filters shared across tasks.
+ * @log: true if all actions except for SECCOMP_RET_ALLOW should be logged
  * @prev: points to a previously installed, or inherited, filter
  * @prog: the BPF program to evaluate
  *
@@ -57,6 +61,7 @@
  */
 struct seccomp_filter {
        refcount_t usage;
+       bool log;
        struct seccomp_filter *prev;
        struct bpf_prog *prog;
 };
@@ -171,10 +176,15 @@ static int seccomp_check_filter(struct sock_filter *filter, unsigned int flen)
 /**
  * seccomp_run_filters - evaluates all seccomp filters against @sd
  * @sd: optional seccomp data to be passed to filters
+ * @match: stores struct seccomp_filter that resulted in the return value,
+ *         unless filter returned SECCOMP_RET_ALLOW, in which case it will
+ *         be unchanged.
  *
  * Returns valid seccomp BPF response codes.
  */
-static u32 seccomp_run_filters(const struct seccomp_data *sd)
+#define ACTION_ONLY(ret) ((s32)((ret) & (SECCOMP_RET_ACTION_FULL)))
+static u32 seccomp_run_filters(const struct seccomp_data *sd,
+                              struct seccomp_filter **match)
 {
        struct seccomp_data sd_local;
        u32 ret = SECCOMP_RET_ALLOW;
@@ -184,7 +194,7 @@ static u32 seccomp_run_filters(const struct seccomp_data *sd)
 
        /* Ensure unexpected behavior doesn't result in failing open. */
        if (unlikely(WARN_ON(f == NULL)))
-               return SECCOMP_RET_KILL;
+               return SECCOMP_RET_KILL_PROCESS;
 
        if (!sd) {
                populate_seccomp_data(&sd_local);
@@ -198,8 +208,10 @@ static u32 seccomp_run_filters(const struct seccomp_data *sd)
        for (; f; f = f->prev) {
                u32 cur_ret = BPF_PROG_RUN(f->prog, sd);
 
-               if ((cur_ret & SECCOMP_RET_ACTION) < (ret & SECCOMP_RET_ACTION))
+               if (ACTION_ONLY(cur_ret) < ACTION_ONLY(ret)) {
                        ret = cur_ret;
+                       *match = f;
+               }
        }
        return ret;
 }
@@ -444,6 +456,10 @@ static long seccomp_attach_filter(unsigned int flags,
                        return ret;
        }
 
+       /* Set log flag, if present. */
+       if (flags & SECCOMP_FILTER_FLAG_LOG)
+               filter->log = true;
+
        /*
         * If there is an existing filter, make it the prev and don't drop its
         * task reference.
@@ -458,14 +474,19 @@ static long seccomp_attach_filter(unsigned int flags,
        return 0;
 }
 
+static void __get_seccomp_filter(struct seccomp_filter *filter)
+{
+       /* Reference count is bounded by the number of total processes. */
+       refcount_inc(&filter->usage);
+}
+
 /* get_seccomp_filter - increments the reference count of the filter on @tsk */
 void get_seccomp_filter(struct task_struct *tsk)
 {
        struct seccomp_filter *orig = tsk->seccomp.filter;
        if (!orig)
                return;
-       /* Reference count is bounded by the number of total processes. */
-       refcount_inc(&orig->usage);
+       __get_seccomp_filter(orig);
 }
 
 static inline void seccomp_filter_free(struct seccomp_filter *filter)
@@ -476,10 +497,8 @@ static inline void seccomp_filter_free(struct seccomp_filter *filter)
        }
 }
 
-/* put_seccomp_filter - decrements the ref count of tsk->seccomp.filter */
-void put_seccomp_filter(struct task_struct *tsk)
+static void __put_seccomp_filter(struct seccomp_filter *orig)
 {
-       struct seccomp_filter *orig = tsk->seccomp.filter;
        /* Clean up single-reference branches iteratively. */
        while (orig && refcount_dec_and_test(&orig->usage)) {
                struct seccomp_filter *freeme = orig;
@@ -488,6 +507,12 @@ void put_seccomp_filter(struct task_struct *tsk)
        }
 }
 
+/* put_seccomp_filter - decrements the ref count of tsk->seccomp.filter */
+void put_seccomp_filter(struct task_struct *tsk)
+{
+       __put_seccomp_filter(tsk->seccomp.filter);
+}
+
 static void seccomp_init_siginfo(siginfo_t *info, int syscall, int reason)
 {
        memset(info, 0, sizeof(*info));
@@ -514,6 +539,65 @@ static void seccomp_send_sigsys(int syscall, int reason)
 }
 #endif /* CONFIG_SECCOMP_FILTER */
 
+/* For use with seccomp_actions_logged */
+#define SECCOMP_LOG_KILL_PROCESS       (1 << 0)
+#define SECCOMP_LOG_KILL_THREAD                (1 << 1)
+#define SECCOMP_LOG_TRAP               (1 << 2)
+#define SECCOMP_LOG_ERRNO              (1 << 3)
+#define SECCOMP_LOG_TRACE              (1 << 4)
+#define SECCOMP_LOG_LOG                        (1 << 5)
+#define SECCOMP_LOG_ALLOW              (1 << 6)
+
+static u32 seccomp_actions_logged = SECCOMP_LOG_KILL_PROCESS |
+                                   SECCOMP_LOG_KILL_THREAD  |
+                                   SECCOMP_LOG_TRAP  |
+                                   SECCOMP_LOG_ERRNO |
+                                   SECCOMP_LOG_TRACE |
+                                   SECCOMP_LOG_LOG;
+
+static inline void seccomp_log(unsigned long syscall, long signr, u32 action,
+                              bool requested)
+{
+       bool log = false;
+
+       switch (action) {
+       case SECCOMP_RET_ALLOW:
+               break;
+       case SECCOMP_RET_TRAP:
+               log = requested && seccomp_actions_logged & SECCOMP_LOG_TRAP;
+               break;
+       case SECCOMP_RET_ERRNO:
+               log = requested && seccomp_actions_logged & SECCOMP_LOG_ERRNO;
+               break;
+       case SECCOMP_RET_TRACE:
+               log = requested && seccomp_actions_logged & SECCOMP_LOG_TRACE;
+               break;
+       case SECCOMP_RET_LOG:
+               log = seccomp_actions_logged & SECCOMP_LOG_LOG;
+               break;
+       case SECCOMP_RET_KILL_THREAD:
+               log = seccomp_actions_logged & SECCOMP_LOG_KILL_THREAD;
+               break;
+       case SECCOMP_RET_KILL_PROCESS:
+       default:
+               log = seccomp_actions_logged & SECCOMP_LOG_KILL_PROCESS;
+       }
+
+       /*
+        * Force an audit message to be emitted when the action is RET_KILL_*,
+        * RET_LOG, or the FILTER_FLAG_LOG bit was set and the action is
+        * allowed to be logged by the admin.
+        */
+       if (log)
+               return __audit_seccomp(syscall, signr, action);
+
+       /*
+        * Let the audit subsystem decide if the action should be audited based
+        * on whether the current task itself is being audited.
+        */
+       return audit_seccomp(syscall, signr, action);
+}
+
 /*
  * Secure computing mode 1 allows only read/write/exit/sigreturn.
  * To be fully secure this must be combined with rlimit
@@ -539,7 +623,7 @@ static void __secure_computing_strict(int this_syscall)
 #ifdef SECCOMP_DEBUG
        dump_stack();
 #endif
-       audit_seccomp(this_syscall, SIGKILL, SECCOMP_RET_KILL);
+       seccomp_log(this_syscall, SIGKILL, SECCOMP_RET_KILL_THREAD, true);
        do_exit(SIGKILL);
 }
 
@@ -566,6 +650,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
                            const bool recheck_after_trace)
 {
        u32 filter_ret, action;
+       struct seccomp_filter *match = NULL;
        int data;
 
        /*
@@ -574,9 +659,9 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
         */
        rmb();
 
-       filter_ret = seccomp_run_filters(sd);
+       filter_ret = seccomp_run_filters(sd, &match);
        data = filter_ret & SECCOMP_RET_DATA;
-       action = filter_ret & SECCOMP_RET_ACTION;
+       action = filter_ret & SECCOMP_RET_ACTION_FULL;
 
        switch (action) {
        case SECCOMP_RET_ERRNO:
@@ -637,14 +722,25 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
 
                return 0;
 
+       case SECCOMP_RET_LOG:
+               seccomp_log(this_syscall, 0, action, true);
+               return 0;
+
        case SECCOMP_RET_ALLOW:
+               /*
+                * Note that the "match" filter will always be NULL for
+                * this action since SECCOMP_RET_ALLOW is the starting
+                * state in seccomp_run_filters().
+                */
                return 0;
 
-       case SECCOMP_RET_KILL:
+       case SECCOMP_RET_KILL_THREAD:
+       case SECCOMP_RET_KILL_PROCESS:
        default:
-               audit_seccomp(this_syscall, SIGSYS, action);
+               seccomp_log(this_syscall, SIGSYS, action, true);
                /* Dump core only if this is the last remaining thread. */
-               if (get_nr_threads(current) == 1) {
+               if (action == SECCOMP_RET_KILL_PROCESS ||
+                   get_nr_threads(current) == 1) {
                        siginfo_t info;
 
                        /* Show the original registers in the dump. */
@@ -653,13 +749,16 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
                        seccomp_init_siginfo(&info, this_syscall, data);
                        do_coredump(&info);
                }
-               do_exit(SIGSYS);
+               if (action == SECCOMP_RET_KILL_PROCESS)
+                       do_group_exit(SIGSYS);
+               else
+                       do_exit(SIGSYS);
        }
 
        unreachable();
 
 skip:
-       audit_seccomp(this_syscall, 0, action);
+       seccomp_log(this_syscall, 0, action, match ? match->log : false);
        return -1;
 }
 #else
@@ -794,6 +893,29 @@ static inline long seccomp_set_mode_filter(unsigned int flags,
 }
 #endif
 
+static long seccomp_get_action_avail(const char __user *uaction)
+{
+       u32 action;
+
+       if (copy_from_user(&action, uaction, sizeof(action)))
+               return -EFAULT;
+
+       switch (action) {
+       case SECCOMP_RET_KILL_PROCESS:
+       case SECCOMP_RET_KILL_THREAD:
+       case SECCOMP_RET_TRAP:
+       case SECCOMP_RET_ERRNO:
+       case SECCOMP_RET_TRACE:
+       case SECCOMP_RET_LOG:
+       case SECCOMP_RET_ALLOW:
+               break;
+       default:
+               return -EOPNOTSUPP;
+       }
+
+       return 0;
+}
+
 /* Common entry point for both prctl and syscall. */
 static long do_seccomp(unsigned int op, unsigned int flags,
                       const char __user *uargs)
@@ -805,6 +927,11 @@ static long do_seccomp(unsigned int op, unsigned int flags,
                return seccomp_set_mode_strict();
        case SECCOMP_SET_MODE_FILTER:
                return seccomp_set_mode_filter(flags, uargs);
+       case SECCOMP_GET_ACTION_AVAIL:
+               if (flags != 0)
+                       return -EINVAL;
+
+               return seccomp_get_action_avail(uargs);
        default:
                return -EINVAL;
        }
@@ -908,13 +1035,13 @@ long seccomp_get_filter(struct task_struct *task, unsigned long filter_off,
        if (!data)
                goto out;
 
-       get_seccomp_filter(task);
+       __get_seccomp_filter(filter);
        spin_unlock_irq(&task->sighand->siglock);
 
        if (copy_to_user(data, fprog->filter, bpf_classic_proglen(fprog)))
                ret = -EFAULT;
 
-       put_seccomp_filter(task);
+       __put_seccomp_filter(filter);
        return ret;
 
 out:
@@ -922,3 +1049,185 @@ out:
        return ret;
 }
 #endif
+
+#ifdef CONFIG_SYSCTL
+
+/* Human readable action names for friendly sysctl interaction */
+#define SECCOMP_RET_KILL_PROCESS_NAME  "kill_process"
+#define SECCOMP_RET_KILL_THREAD_NAME   "kill_thread"
+#define SECCOMP_RET_TRAP_NAME          "trap"
+#define SECCOMP_RET_ERRNO_NAME         "errno"
+#define SECCOMP_RET_TRACE_NAME         "trace"
+#define SECCOMP_RET_LOG_NAME           "log"
+#define SECCOMP_RET_ALLOW_NAME         "allow"
+
+static const char seccomp_actions_avail[] =
+                               SECCOMP_RET_KILL_PROCESS_NAME   " "
+                               SECCOMP_RET_KILL_THREAD_NAME    " "
+                               SECCOMP_RET_TRAP_NAME           " "
+                               SECCOMP_RET_ERRNO_NAME          " "
+                               SECCOMP_RET_TRACE_NAME          " "
+                               SECCOMP_RET_LOG_NAME            " "
+                               SECCOMP_RET_ALLOW_NAME;
+
+struct seccomp_log_name {
+       u32             log;
+       const char      *name;
+};
+
+static const struct seccomp_log_name seccomp_log_names[] = {
+       { SECCOMP_LOG_KILL_PROCESS, SECCOMP_RET_KILL_PROCESS_NAME },
+       { SECCOMP_LOG_KILL_THREAD, SECCOMP_RET_KILL_THREAD_NAME },
+       { SECCOMP_LOG_TRAP, SECCOMP_RET_TRAP_NAME },
+       { SECCOMP_LOG_ERRNO, SECCOMP_RET_ERRNO_NAME },
+       { SECCOMP_LOG_TRACE, SECCOMP_RET_TRACE_NAME },
+       { SECCOMP_LOG_LOG, SECCOMP_RET_LOG_NAME },
+       { SECCOMP_LOG_ALLOW, SECCOMP_RET_ALLOW_NAME },
+       { }
+};
+
+static bool seccomp_names_from_actions_logged(char *names, size_t size,
+                                             u32 actions_logged)
+{
+       const struct seccomp_log_name *cur;
+       bool append_space = false;
+
+       for (cur = seccomp_log_names; cur->name && size; cur++) {
+               ssize_t ret;
+
+               if (!(actions_logged & cur->log))
+                       continue;
+
+               if (append_space) {
+                       ret = strscpy(names, " ", size);
+                       if (ret < 0)
+                               return false;
+
+                       names += ret;
+                       size -= ret;
+               } else
+                       append_space = true;
+
+               ret = strscpy(names, cur->name, size);
+               if (ret < 0)
+                       return false;
+
+               names += ret;
+               size -= ret;
+       }
+
+       return true;
+}
+
+static bool seccomp_action_logged_from_name(u32 *action_logged,
+                                           const char *name)
+{
+       const struct seccomp_log_name *cur;
+
+       for (cur = seccomp_log_names; cur->name; cur++) {
+               if (!strcmp(cur->name, name)) {
+                       *action_logged = cur->log;
+                       return true;
+               }
+       }
+
+       return false;
+}
+
+static bool seccomp_actions_logged_from_names(u32 *actions_logged, char *names)
+{
+       char *name;
+
+       *actions_logged = 0;
+       while ((name = strsep(&names, " ")) && *name) {
+               u32 action_logged = 0;
+
+               if (!seccomp_action_logged_from_name(&action_logged, name))
+                       return false;
+
+               *actions_logged |= action_logged;
+       }
+
+       return true;
+}
+
+static int seccomp_actions_logged_handler(struct ctl_table *ro_table, int write,
+                                         void __user *buffer, size_t *lenp,
+                                         loff_t *ppos)
+{
+       char names[sizeof(seccomp_actions_avail)];
+       struct ctl_table table;
+       int ret;
+
+       if (write && !capable(CAP_SYS_ADMIN))
+               return -EPERM;
+
+       memset(names, 0, sizeof(names));
+
+       if (!write) {
+               if (!seccomp_names_from_actions_logged(names, sizeof(names),
+                                                      seccomp_actions_logged))
+                       return -EINVAL;
+       }
+
+       table = *ro_table;
+       table.data = names;
+       table.maxlen = sizeof(names);
+       ret = proc_dostring(&table, write, buffer, lenp, ppos);
+       if (ret)
+               return ret;
+
+       if (write) {
+               u32 actions_logged;
+
+               if (!seccomp_actions_logged_from_names(&actions_logged,
+                                                      table.data))
+                       return -EINVAL;
+
+               if (actions_logged & SECCOMP_LOG_ALLOW)
+                       return -EINVAL;
+
+               seccomp_actions_logged = actions_logged;
+       }
+
+       return 0;
+}
+
+static struct ctl_path seccomp_sysctl_path[] = {
+       { .procname = "kernel", },
+       { .procname = "seccomp", },
+       { }
+};
+
+static struct ctl_table seccomp_sysctl_table[] = {
+       {
+               .procname       = "actions_avail",
+               .data           = (void *) &seccomp_actions_avail,
+               .maxlen         = sizeof(seccomp_actions_avail),
+               .mode           = 0444,
+               .proc_handler   = proc_dostring,
+       },
+       {
+               .procname       = "actions_logged",
+               .mode           = 0644,
+               .proc_handler   = seccomp_actions_logged_handler,
+       },
+       { }
+};
+
+static int __init seccomp_sysctl_init(void)
+{
+       struct ctl_table_header *hdr;
+
+       hdr = register_sysctl_paths(seccomp_sysctl_path, seccomp_sysctl_table);
+       if (!hdr)
+               pr_warn("seccomp: sysctl registration failed\n");
+       else
+               kmemleak_not_leak(hdr);
+
+       return 0;
+}
+
+device_initcall(seccomp_sysctl_init)
+
+#endif /* CONFIG_SYSCTL */
index 800a18f77732c14cf49d81bc615b01cd56d11933..8dcd8825b2dedf3f16c108808192f8751aa19c96 100644 (file)
@@ -2698,7 +2698,7 @@ enum siginfo_layout siginfo_layout(int sig, int si_code)
                        [SIGSEGV] = { NSIGSEGV, SIL_FAULT },
                        [SIGBUS]  = { NSIGBUS,  SIL_FAULT },
                        [SIGTRAP] = { NSIGTRAP, SIL_FAULT },
-#if defined(SIGMET) && defined(NSIGEMT)
+#if defined(SIGEMT) && defined(NSIGEMT)
                        [SIGEMT]  = { NSIGEMT,  SIL_FAULT },
 #endif
                        [SIGCHLD] = { NSIGCHLD, SIL_CHLD },
index 1d71c051a9515c6acecd4be823465a4760e7cefa..5043e7433f4b15879a6498ed3d1ca6cfa2876f83 100644 (file)
@@ -344,39 +344,30 @@ EXPORT_SYMBOL_GPL(smpboot_unregister_percpu_thread);
  * by the client, but only by calling this function.
  * This function can only be called on a registered smp_hotplug_thread.
  */
-int smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
-                                        const struct cpumask *new)
+void smpboot_update_cpumask_percpu_thread(struct smp_hotplug_thread *plug_thread,
+                                         const struct cpumask *new)
 {
        struct cpumask *old = plug_thread->cpumask;
-       cpumask_var_t tmp;
+       static struct cpumask tmp;
        unsigned int cpu;
 
-       if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
-               return -ENOMEM;
-
-       get_online_cpus();
+       lockdep_assert_cpus_held();
        mutex_lock(&smpboot_threads_lock);
 
        /* Park threads that were exclusively enabled on the old mask. */
-       cpumask_andnot(tmp, old, new);
-       for_each_cpu_and(cpu, tmp, cpu_online_mask)
+       cpumask_andnot(&tmp, old, new);
+       for_each_cpu_and(cpu, &tmp, cpu_online_mask)
                smpboot_park_thread(plug_thread, cpu);
 
        /* Unpark threads that are exclusively enabled on the new mask. */
-       cpumask_andnot(tmp, new, old);
-       for_each_cpu_and(cpu, tmp, cpu_online_mask)
+       cpumask_andnot(&tmp, new, old);
+       for_each_cpu_and(cpu, &tmp, cpu_online_mask)
                smpboot_unpark_thread(plug_thread, cpu);
 
        cpumask_copy(old, new);
 
        mutex_unlock(&smpboot_threads_lock);
-       put_online_cpus();
-
-       free_cpumask_var(tmp);
-
-       return 0;
 }
-EXPORT_SYMBOL_GPL(smpboot_update_cpumask_percpu_thread);
 
 static DEFINE_PER_CPU(atomic_t, cpu_hotplug_state) = ATOMIC_INIT(CPU_POST_DEAD);
 
index 485b81cfab34fd2189203df091fe494a9d10efbd..34dd3d7ba40bc0a5e3a11d7cf5cea4a641f030ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SMPBOOT_H
 #define SMPBOOT_H
 
index 9aebc293501330ffdfef0b6ad53df155ae6b31ca..524a4cb9bbe25d02d39d82e145c78d0584569d60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/kernel/sys.c
  *
index 8acef8576ce9b211ea3ede4ccf63220466b40e22..b5189762d275c431901add0f680da05016e782d5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/linkage.h>
 #include <linux/errno.h>
index 6648fbbb8157fc12703d02fa0fdc9ff85c527ac4..d9c31bc2eaea2c95a7a7be5a5321700b84d8f640 100644 (file)
@@ -367,7 +367,8 @@ static struct ctl_table kern_table[] = {
                .data           = &sysctl_sched_time_avg,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &one,
        },
 #ifdef CONFIG_SCHEDSTATS
        {
@@ -871,9 +872,9 @@ static struct ctl_table kern_table[] = {
 #if defined(CONFIG_LOCKUP_DETECTOR)
        {
                .procname       = "watchdog",
-               .data           = &watchdog_user_enabled,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
+               .data           = &watchdog_user_enabled,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
                .proc_handler   = proc_watchdog,
                .extra1         = &zero,
                .extra2         = &one,
@@ -889,16 +890,12 @@ static struct ctl_table kern_table[] = {
        },
        {
                .procname       = "nmi_watchdog",
-               .data           = &nmi_watchdog_enabled,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
+               .data           = &nmi_watchdog_user_enabled,
+               .maxlen         = sizeof(int),
+               .mode           = NMI_WATCHDOG_SYSCTL_PERM,
                .proc_handler   = proc_nmi_watchdog,
                .extra1         = &zero,
-#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
                .extra2         = &one,
-#else
-               .extra2         = &zero,
-#endif
        },
        {
                .procname       = "watchdog_cpumask",
@@ -910,9 +907,9 @@ static struct ctl_table kern_table[] = {
 #ifdef CONFIG_SOFTLOCKUP_DETECTOR
        {
                .procname       = "soft_watchdog",
-               .data           = &soft_watchdog_enabled,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
+               .data           = &soft_watchdog_user_enabled,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
                .proc_handler   = proc_soft_watchdog,
                .extra1         = &zero,
                .extra2         = &one,
@@ -2185,8 +2182,6 @@ static int do_proc_douintvec_conv(unsigned long *lvalp,
                                  int write, void *data)
 {
        if (write) {
-               if (*lvalp > UINT_MAX)
-                       return -EINVAL;
                if (*lvalp > UINT_MAX)
                        return -EINVAL;
                *valp = *lvalp;
index 58ea8c03662ef38ac228e60d21e2b21e077b7f94..e8c0dab4fd653a84d316c458a1db767995b02b47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/stat.h>
 #include <linux/sysctl.h>
 #include "../fs/xfs/xfs_sysctl.h"
index 836a72a66fba14ec1b66f941c50f81ea58444b3a..5718b3ea202a3f5dd7186e6454f18fb6be392644 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/spinlock.h>
 #include <linux/task_work.h>
 #include <linux/tracehook.h>
index 938dbf33ef493cfac9f9b9a53b004bfe2420d281..f1e46f338a9c97ab35d8edbee63299374b4e0edf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y += time.o timer.o hrtimer.o
 obj-y += timekeeping.o ntp.o clocksource.o jiffies.o timer_list.o
 obj-y += timeconv.o timecounter.o alarmtimer.o
index 2ef98a02376af2a4ecdd26da46c8d91c9913cc1b..f26acef5d7b485ad397c21bb5466f0a332006087 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/itimer.c
  *
index edf19cc5314043590b988c9b3081c82a9fa60f01..99e03bec68e4cbaa3ba103f3097eeb1e5d38e3ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NTP state machine interfaces and logic.
  *
index d8a7c11fa71a51e09063cf807d6f59959a6119ab..0a53e6ea47b19ac52994222f376b51409f1b3bbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_NTP_INTERNAL_H
 #define _LINUX_NTP_INTERNAL_H
 
index 8585ad6e472a332f90aeb4343f8235b7b347a6c5..5b117110b55b59af25fd1ee1f0a81d9ead5dde87 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement CPU time clocks for the POSIX clock interface.
  */
index fb303c3be4d321c6a0ffbf117de15be2fa78d82e..151e28f5bf304ce134897038639c53998adae4d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define TIMER_RETRY 1
 
 struct k_clock {
index a7bb8f33ae0703b2d0ebd1e65954f433c85dbde2..58045eb976c38fc7c3540f8c0d12db9cf256aa52 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/kernel/time/tick-broadcast-hrtimer.c
  * This file emulates a local clock event device
index be0ac01f2e1225b6d4bb814029854dfdba3cd5cb..f8e1845aa464b2c0b11dead0ad9baa37cae62822 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * tick internal variable and functions used by low/high res code
  */
index 075444e3d48e643549ba5c7fbcc3c792fb90e1db..954b43dbf21cb7f64f31bb6a849a0654a63620a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TICK_SCHED_H
 #define _TICK_SCHED_H
 
index d0914676d4c5b28b2d1828deb0da2361dc9bee34..c9f9af33991498e29fbd49d677882f3ad9137cc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KERNEL_TIME_TIMEKEEPING_H
 #define _KERNEL_TIME_TIMEKEEPING_H
 /*
index 9a18f121f3990b3a635c350506ada940e0c7f922..fdbeeb02dde9fcfc40640648df6eecb910cf95e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TIMEKEEPING_INTERNAL_H
 #define _TIMEKEEPING_INTERNAL_H
 /*
index 90f2701d92a7eee98334f2b10e515b369307df2b..19a15b2f119010f5dd38d2dfe99ff7d2eb81a5f0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 # Do not instrument the tracer itself:
 
index 2a685b45b73be4159bd310d8c4530a87df9e4cec..45a3928544ce599183c415471f4624be0583ea40 100644 (file)
@@ -648,6 +648,12 @@ int blk_trace_startstop(struct request_queue *q, int start)
 }
 EXPORT_SYMBOL_GPL(blk_trace_startstop);
 
+/*
+ * When reading or writing the blktrace sysfs files, the references to the
+ * opened sysfs or device files should prevent the underlying block device
+ * from being removed. So no further delete protection is really needed.
+ */
+
 /**
  * blk_trace_ioctl: - handle the ioctls associated with tracing
  * @bdev:      the block device
@@ -665,7 +671,7 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
        if (!q)
                return -ENXIO;
 
-       mutex_lock(&bdev->bd_mutex);
+       mutex_lock(&q->blk_trace_mutex);
 
        switch (cmd) {
        case BLKTRACESETUP:
@@ -691,7 +697,7 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
                break;
        }
 
-       mutex_unlock(&bdev->bd_mutex);
+       mutex_unlock(&q->blk_trace_mutex);
        return ret;
 }
 
@@ -1727,7 +1733,7 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
        if (q == NULL)
                goto out_bdput;
 
-       mutex_lock(&bdev->bd_mutex);
+       mutex_lock(&q->blk_trace_mutex);
 
        if (attr == &dev_attr_enable) {
                ret = sprintf(buf, "%u\n", !!q->blk_trace);
@@ -1746,7 +1752,7 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
                ret = sprintf(buf, "%llu\n", q->blk_trace->end_lba);
 
 out_unlock_bdev:
-       mutex_unlock(&bdev->bd_mutex);
+       mutex_unlock(&q->blk_trace_mutex);
 out_bdput:
        bdput(bdev);
 out:
@@ -1788,7 +1794,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
        if (q == NULL)
                goto out_bdput;
 
-       mutex_lock(&bdev->bd_mutex);
+       mutex_lock(&q->blk_trace_mutex);
 
        if (attr == &dev_attr_enable) {
                if (value)
@@ -1814,7 +1820,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
        }
 
 out_unlock_bdev:
-       mutex_unlock(&bdev->bd_mutex);
+       mutex_unlock(&q->blk_trace_mutex);
 out_bdput:
        bdput(bdev);
 out:
index 6abfafd7f173c49ab60221768654a7b08f7d7f22..8319e09e15b945f14f9046edeb885e173ef26652 100644 (file)
@@ -4954,9 +4954,6 @@ static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 static char ftrace_graph_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
 static int ftrace_graph_set_hash(struct ftrace_hash *hash, char *buffer);
 
-static unsigned long save_global_trampoline;
-static unsigned long save_global_flags;
-
 static int __init set_graph_function(char *str)
 {
        strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);
@@ -6808,17 +6805,6 @@ void unregister_ftrace_graph(void)
        unregister_pm_notifier(&ftrace_suspend_notifier);
        unregister_trace_sched_switch(ftrace_graph_probe_sched_switch, NULL);
 
-#ifdef CONFIG_DYNAMIC_FTRACE
-       /*
-        * Function graph does not allocate the trampoline, but
-        * other global_ops do. We need to reset the ALLOC_TRAMP flag
-        * if one was used.
-        */
-       global_ops.trampoline = save_global_trampoline;
-       if (save_global_flags & FTRACE_OPS_FL_ALLOC_TRAMP)
-               global_ops.flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
-#endif
-
  out:
        mutex_unlock(&ftrace_lock);
 }
index 0c7dee221dca4747a30eca158d4c01a3deb1c4dc..21bb161c231698aff56c96d5d5908da1ef3af97d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Power trace points
  *
index 4b3b5eaf94d1760a180838922284a130039d462e..25dec0b00280a247ecc07fbff7aff7fa6836fbee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Power trace points
  *
index 5360b7aec57ac1ccd1eea33b090f67ccb4b4e8cf..752e5daf0896fc529876f8801a95e23118713338 100644 (file)
@@ -4020,11 +4020,17 @@ static int tracing_open(struct inode *inode, struct file *file)
        /* If this file was open for write, then erase contents */
        if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_TRUNC)) {
                int cpu = tracing_get_cpu(inode);
+               struct trace_buffer *trace_buf = &tr->trace_buffer;
+
+#ifdef CONFIG_TRACER_MAX_TRACE
+               if (tr->current_trace->print_max)
+                       trace_buf = &tr->max_buffer;
+#endif
 
                if (cpu == RING_BUFFER_ALL_CPUS)
-                       tracing_reset_online_cpus(&tr->trace_buffer);
+                       tracing_reset_online_cpus(trace_buf);
                else
-                       tracing_reset(&tr->trace_buffer, cpu);
+                       tracing_reset(trace_buf, cpu);
        }
 
        if (file->f_mode & FMODE_READ) {
@@ -5358,6 +5364,13 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
        if (t == tr->current_trace)
                goto out;
 
+       /* Some tracers won't work on kernel command line */
+       if (system_state < SYSTEM_RUNNING && t->noboot) {
+               pr_warn("Tracer '%s' is not allowed on command line, ignored\n",
+                       t->name);
+               goto out;
+       }
+
        /* Some tracers are only allowed for the top level buffer */
        if (!trace_ok_for_array(t, tr)) {
                ret = -EINVAL;
@@ -5667,7 +5680,7 @@ static int tracing_wait_pipe(struct file *filp)
                 *
                 * iter->pos will be 0 if we haven't read anything.
                 */
-               if (!tracing_is_on() && iter->pos)
+               if (!tracer_tracing_is_on(iter->tr) && iter->pos)
                        break;
 
                mutex_unlock(&iter->mutex);
index fb5d54d0d1b3f297087e96f03a22003fc887d359..401b0639116f216c78b3dad0ad663c9e74858d52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef _LINUX_KERNEL_TRACE_H
 #define _LINUX_KERNEL_TRACE_H
@@ -444,6 +445,8 @@ struct tracer {
 #ifdef CONFIG_TRACER_MAX_TRACE
        bool                    use_max_tr;
 #endif
+       /* True if tracer cannot be enabled in kernel param */
+       bool                    noboot;
 };
 
 
index 16a8cf02eee96ae4fcac5d0641673b6c38f003fd..79f838a75077286cb571a3c3deaada1d6499025a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/kthread.h>
index ebdbfc2f2a645a90ec821990911f088790a79d41..be1d86ff753d05d8621912ae4ad926454cd270bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM benchmark
 
index 4d8fdf3184dce4a897565b6fb4b3bfeba1a8152d..4ad967453b6fb07a08a69534c8df6eebac1e2868 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * unlikely profiler
  *
index adcdbbeae0108bad436d0af31297dc555ad7f545..e954ae3d82c0f78e2ac5646e84563c6237e23bce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file defines the trace event structures that go into the ring
  * buffer directly. They are created via macros so that changes for them
index bfd4dba0d6033c1692b928cca14be0ab56736c3b..39d7ef4f57cb0678b487276dce5546dcfe550990 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM test
 
index 39aa7aa664686220ca55deca9952faf8528fca22..548e62eb5c46af64896ca3a75ff6e4750d424e66 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * trace_export.c - export basic ftrace utilities to user space
  *
index a0910c0cdf2eabfa690d7cf434a5467faa5e01e4..27f7ad12c4b1b11da86dd161468c1c11944dd8fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ring buffer based function tracer
  *
index b8f1f54731af0ab1190783291ffa1ca9aaf33feb..23c0b0cb5fb95c9875fb35cbd0d22f027430343c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  * Function graph tracer.
index 57149bce6aad679567a65b95eed2b007e19b4d81..d953c163a0794f5cd4578ae6957f0645ff1eaa0d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * kdb helper for dumping the ftrace buffer
  *
index cd7480d0a201e335cd7adc20c9cb0a8dba16f189..b0388016b6870b4add19fad515b85d0ba8eb35e3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory mapped I/O tracing
  *
@@ -282,6 +283,7 @@ static struct tracer mmio_tracer __read_mostly =
        .close          = mmio_close,
        .read           = mmio_read,
        .print_line     = mmio_print_line,
+       .noboot         = true,
 };
 
 __init static int init_mmio_trace(void)
index 49f61fe96a6b302a2bfc85ffdd83d5073cbca835..50523f953a5d62bcd7595bcb0aa65f202ba0f411 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * nop tracer
  *
index bac629af2285748bbdac64b6b5c632f2fcaed49d..c738e764e2a55cfd3303a3262d748c94a917a86d 100644 (file)
@@ -656,15 +656,6 @@ int trace_print_lat_context(struct trace_iterator *iter)
        return !trace_seq_has_overflowed(s);
 }
 
-static const char state_to_char[] = TASK_STATE_TO_CHAR_STR;
-
-static int task_state_char(unsigned long state)
-{
-       int bit = state ? __ffs(state) + 1 : 0;
-
-       return bit < sizeof(state_to_char) - 1 ? state_to_char[bit] : '?';
-}
-
 /**
  * ftrace_find_event - find a registered event
  * @type: the type of event to look for
@@ -930,8 +921,8 @@ static enum print_line_t trace_ctxwake_print(struct trace_iterator *iter,
 
        trace_assign_type(field, iter->ent);
 
-       T = task_state_char(field->next_state);
-       S = task_state_char(field->prev_state);
+       T = __task_state_to_char(field->next_state);
+       S = __task_state_to_char(field->prev_state);
        trace_find_cmdline(field->next_pid, comm);
        trace_seq_printf(&iter->seq,
                         " %5d:%3d:%c %s [%03d] %5d:%3d:%c %s\n",
@@ -966,8 +957,8 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S)
        trace_assign_type(field, iter->ent);
 
        if (!S)
-               S = task_state_char(field->prev_state);
-       T = task_state_char(field->next_state);
+               S = __task_state_to_char(field->prev_state);
+       T = __task_state_to_char(field->next_state);
        trace_seq_printf(&iter->seq, "%d %d %c %d %d %d %c\n",
                         field->prev_pid,
                         field->prev_prio,
@@ -1002,8 +993,8 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S)
        trace_assign_type(field, iter->ent);
 
        if (!S)
-               S = task_state_char(field->prev_state);
-       T = task_state_char(field->next_state);
+               S = __task_state_to_char(field->prev_state);
+       T = __task_state_to_char(field->next_state);
 
        SEQ_PUT_HEX_FIELD(s, field->prev_pid);
        SEQ_PUT_HEX_FIELD(s, field->prev_prio);
index fabc49bcd49398336a0c5397b9a87a58ab85a51d..dbba03ed96dee0dbb947d8c298e10776f6180fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRACE_EVENTS_H
 #define __TRACE_EVENTS_H
 
index b341c02730becc96d2e080bcdcb48206c09bee7f..e288168661e118c07ca5638bb2ddb3dd33fb1acc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * trace context switch
  *
index ddec53b6764617e8fe431d93bf9f970a5015b4be..7d461dcd48318b8c2fd7898d4680f07a068d482d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * trace task wakeup timings
  *
@@ -397,10 +398,10 @@ tracing_sched_switch_trace(struct trace_array *tr,
        entry   = ring_buffer_event_data(event);
        entry->prev_pid                 = prev->pid;
        entry->prev_prio                = prev->prio;
-       entry->prev_state               = prev->state;
+       entry->prev_state               = __get_task_state(prev);
        entry->next_pid                 = next->pid;
        entry->next_prio                = next->prio;
-       entry->next_state               = next->state;
+       entry->next_state               = __get_task_state(next);
        entry->next_cpu = task_cpu(next);
 
        if (!call_filter_check_discard(call, entry, buffer, event))
@@ -425,10 +426,10 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
        entry   = ring_buffer_event_data(event);
        entry->prev_pid                 = curr->pid;
        entry->prev_prio                = curr->prio;
-       entry->prev_state               = curr->state;
+       entry->prev_state               = __get_task_state(curr);
        entry->next_pid                 = wakee->pid;
        entry->next_prio                = wakee->prio;
-       entry->next_state               = wakee->state;
+       entry->next_state               = __get_task_state(wakee);
        entry->next_cpu                 = task_cpu(wakee);
 
        if (!call_filter_check_discard(call, entry, buffer, event))
index b17ec642793bc327e56f14d433a725dcff330f78..cd70eb5df38ecce05eba1bc7a485b6cb59e674f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Include in trace.c */
 
 #include <uapi/linux/sched/types.h>
index b4c475a0a48b8932c2f659beec75ae7d73b1726d..8cda06a10d66e4cc5ae264e781f7a593af377eae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "trace.h"
 
 int DYN_FTRACE_TEST_NAME(void)
index a4df67cbc711459df2aa8b4a313eb449a472ee45..719a52a4064a0f6472ab7e662d00c47b6dd5993d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2008 Steven Rostedt <srostedt@redhat.com>
  *
@@ -96,23 +97,9 @@ check_stack(unsigned long ip, unsigned long *stack)
        if (in_nmi())
                return;
 
-       /*
-        * There's a slight chance that we are tracing inside the
-        * RCU infrastructure, and rcu_irq_enter() will not work
-        * as expected.
-        */
-       if (unlikely(rcu_irq_enter_disabled()))
-               return;
-
        local_irq_save(flags);
        arch_spin_lock(&stack_trace_max_lock);
 
-       /*
-        * RCU may not be watching, make it see us.
-        * The stack trace code uses rcu_sched.
-        */
-       rcu_irq_enter();
-
        /* In case another CPU set the tracer_frame on us */
        if (unlikely(!frame_size))
                this_size -= tracer_frame;
@@ -205,7 +192,6 @@ check_stack(unsigned long ip, unsigned long *stack)
        }
 
  out:
-       rcu_irq_exit();
        arch_spin_unlock(&stack_trace_max_lock);
        local_irq_restore(flags);
 }
index 413ff108fbd058ec26a46af5c7ff322a705cc8ea..75bf1bcb4a8a56164641549f51bbec41584afe24 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Infrastructure for statistic tracing (histogram output).
  *
index 8f03914b9a6a6223622d15da4a3612f6e7e15ed3..76d30b4ebe83efdb97761b7bcd0a6125197e15da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRACE_STAT_H
 #define __TRACE_STAT_H
 
index 696afe72d3b1445738feaa1031a4d7110363d6dd..a2a642f2c64f89dfe60c23af28c605c6df24e371 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <trace/syscall.h>
 #include <trace/events/syscalls.h>
 #include <linux/syscalls.h>
index 618838f5f30acaa3c4ab78c7b19329128e1b56b7..ab0ca77331d0429fbab0e38b8e3525bbaa734bce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRACING_MAP_H
 #define __TRACING_MAP_H
 
index 5c2dc5b2bf4fe8ecd05e2423d1a820e25b16d1ec..ce74a4901d2b058595af031cf6c408c48dc5e1f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Wrapper functions for 16bit uid back compatibility. All nicely tied
  *     together in the faint hope we can take the out in five years time.
index f5d52024f6b72a9d1354b1a44c12c3e3b6af06a9..c8e06703e44c2ce1604aab569d1a9cd4b7faf823 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Detect hard and soft lockups on a system
  *
 #include <linux/kvm_para.h>
 #include <linux/kthread.h>
 
-/* Watchdog configuration */
-static DEFINE_MUTEX(watchdog_proc_mutex);
-
-int __read_mostly nmi_watchdog_enabled;
+static DEFINE_MUTEX(watchdog_mutex);
 
 #if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG)
-unsigned long __read_mostly watchdog_enabled = SOFT_WATCHDOG_ENABLED |
-                                               NMI_WATCHDOG_ENABLED;
+# define WATCHDOG_DEFAULT      (SOFT_WATCHDOG_ENABLED | NMI_WATCHDOG_ENABLED)
+# define NMI_WATCHDOG_DEFAULT  1
 #else
-unsigned long __read_mostly watchdog_enabled = SOFT_WATCHDOG_ENABLED;
+# define WATCHDOG_DEFAULT      (SOFT_WATCHDOG_ENABLED)
+# define NMI_WATCHDOG_DEFAULT  0
 #endif
 
+unsigned long __read_mostly watchdog_enabled;
+int __read_mostly watchdog_user_enabled = 1;
+int __read_mostly nmi_watchdog_user_enabled = NMI_WATCHDOG_DEFAULT;
+int __read_mostly soft_watchdog_user_enabled = 1;
+int __read_mostly watchdog_thresh = 10;
+int __read_mostly nmi_watchdog_available;
+
+struct cpumask watchdog_allowed_mask __read_mostly;
+
+struct cpumask watchdog_cpumask __read_mostly;
+unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask);
+
 #ifdef CONFIG_HARDLOCKUP_DETECTOR
-/* boot commands */
 /*
  * Should we panic when a soft-lockup or hard-lockup occurs:
  */
@@ -56,9 +66,9 @@ unsigned int __read_mostly hardlockup_panic =
  * kernel command line parameters are parsed, because otherwise it is not
  * possible to override this in hardlockup_panic_setup().
  */
-void hardlockup_detector_disable(void)
+void __init hardlockup_detector_disable(void)
 {
-       watchdog_enabled &= ~NMI_WATCHDOG_ENABLED;
+       nmi_watchdog_user_enabled = 0;
 }
 
 static int __init hardlockup_panic_setup(char *str)
@@ -68,48 +78,24 @@ static int __init hardlockup_panic_setup(char *str)
        else if (!strncmp(str, "nopanic", 7))
                hardlockup_panic = 0;
        else if (!strncmp(str, "0", 1))
-               watchdog_enabled &= ~NMI_WATCHDOG_ENABLED;
+               nmi_watchdog_user_enabled = 0;
        else if (!strncmp(str, "1", 1))
-               watchdog_enabled |= NMI_WATCHDOG_ENABLED;
+               nmi_watchdog_user_enabled = 1;
        return 1;
 }
 __setup("nmi_watchdog=", hardlockup_panic_setup);
 
-#endif
-
-#ifdef CONFIG_SOFTLOCKUP_DETECTOR
-int __read_mostly soft_watchdog_enabled;
-#endif
-
-int __read_mostly watchdog_user_enabled;
-int __read_mostly watchdog_thresh = 10;
-
-#ifdef CONFIG_SMP
-int __read_mostly sysctl_softlockup_all_cpu_backtrace;
+# ifdef CONFIG_SMP
 int __read_mostly sysctl_hardlockup_all_cpu_backtrace;
-#endif
-struct cpumask watchdog_cpumask __read_mostly;
-unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask);
 
-/*
- * The 'watchdog_running' variable is set to 1 when the watchdog threads
- * are registered/started and is set to 0 when the watchdog threads are
- * unregistered/stopped, so it is an indicator whether the threads exist.
- */
-static int __read_mostly watchdog_running;
-/*
- * If a subsystem has a need to deactivate the watchdog temporarily, it
- * can use the suspend/resume interface to achieve this. The content of
- * the 'watchdog_suspended' variable reflects this state. Existing threads
- * are parked/unparked by the lockup_detector_{suspend|resume} functions
- * (see comment blocks pertaining to those functions for further details).
- *
- * 'watchdog_suspended' also prevents threads from being registered/started
- * or unregistered/stopped via parameters in /proc/sys/kernel, so the state
- * of 'watchdog_running' cannot change while the watchdog is deactivated
- * temporarily (see related code in 'proc' handlers).
- */
-int __read_mostly watchdog_suspended;
+static int __init hardlockup_all_cpu_backtrace_setup(char *str)
+{
+       sysctl_hardlockup_all_cpu_backtrace = !!simple_strtol(str, NULL, 0);
+       return 1;
+}
+__setup("hardlockup_all_cpu_backtrace=", hardlockup_all_cpu_backtrace_setup);
+# endif /* CONFIG_SMP */
+#endif /* CONFIG_HARDLOCKUP_DETECTOR */
 
 /*
  * These functions can be overridden if an architecture implements its
@@ -121,36 +107,68 @@ int __read_mostly watchdog_suspended;
  */
 int __weak watchdog_nmi_enable(unsigned int cpu)
 {
+       hardlockup_detector_perf_enable();
        return 0;
 }
+
 void __weak watchdog_nmi_disable(unsigned int cpu)
 {
+       hardlockup_detector_perf_disable();
 }
 
-/*
- * watchdog_nmi_reconfigure can be implemented to be notified after any
- * watchdog configuration change. The arch hardlockup watchdog should
- * respond to the following variables:
- * - nmi_watchdog_enabled
+/* Return 0, if a NMI watchdog is available. Error code otherwise */
+int __weak __init watchdog_nmi_probe(void)
+{
+       return hardlockup_detector_perf_init();
+}
+
+/**
+ * watchdog_nmi_stop - Stop the watchdog for reconfiguration
+ *
+ * The reconfiguration steps are:
+ * watchdog_nmi_stop();
+ * update_variables();
+ * watchdog_nmi_start();
+ */
+void __weak watchdog_nmi_stop(void) { }
+
+/**
+ * watchdog_nmi_start - Start the watchdog after reconfiguration
+ *
+ * Counterpart to watchdog_nmi_stop().
+ *
+ * The following variables have been updated in update_variables() and
+ * contain the currently valid configuration:
+ * - watchdog_enabled
  * - watchdog_thresh
  * - watchdog_cpumask
- * - sysctl_hardlockup_all_cpu_backtrace
- * - hardlockup_panic
- * - watchdog_suspended
  */
-void __weak watchdog_nmi_reconfigure(void)
+void __weak watchdog_nmi_start(void) { }
+
+/**
+ * lockup_detector_update_enable - Update the sysctl enable bit
+ *
+ * Caller needs to make sure that the NMI/perf watchdogs are off, so this
+ * can't race with watchdog_nmi_disable().
+ */
+static void lockup_detector_update_enable(void)
 {
+       watchdog_enabled = 0;
+       if (!watchdog_user_enabled)
+               return;
+       if (nmi_watchdog_available && nmi_watchdog_user_enabled)
+               watchdog_enabled |= NMI_WATCHDOG_ENABLED;
+       if (soft_watchdog_user_enabled)
+               watchdog_enabled |= SOFT_WATCHDOG_ENABLED;
 }
 
-
 #ifdef CONFIG_SOFTLOCKUP_DETECTOR
 
-/* Helper for online, unparked cpus. */
-#define for_each_watchdog_cpu(cpu) \
-       for_each_cpu_and((cpu), cpu_online_mask, &watchdog_cpumask)
-
-atomic_t watchdog_park_in_progress = ATOMIC_INIT(0);
+/* Global variables, exported for sysctl */
+unsigned int __read_mostly softlockup_panic =
+                       CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE;
 
+static bool softlockup_threads_initialized __read_mostly;
 static u64 __read_mostly sample_period;
 
 static DEFINE_PER_CPU(unsigned long, watchdog_touch_ts);
@@ -164,50 +182,40 @@ static DEFINE_PER_CPU(struct task_struct *, softlockup_task_ptr_saved);
 static DEFINE_PER_CPU(unsigned long, hrtimer_interrupts_saved);
 static unsigned long soft_lockup_nmi_warn;
 
-unsigned int __read_mostly softlockup_panic =
-                       CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE;
-
 static int __init softlockup_panic_setup(char *str)
 {
        softlockup_panic = simple_strtoul(str, NULL, 0);
-
        return 1;
 }
 __setup("softlockup_panic=", softlockup_panic_setup);
 
 static int __init nowatchdog_setup(char *str)
 {
-       watchdog_enabled = 0;
+       watchdog_user_enabled = 0;
        return 1;
 }
 __setup("nowatchdog", nowatchdog_setup);
 
 static int __init nosoftlockup_setup(char *str)
 {
-       watchdog_enabled &= ~SOFT_WATCHDOG_ENABLED;
+       soft_watchdog_user_enabled = 0;
        return 1;
 }
 __setup("nosoftlockup", nosoftlockup_setup);
 
 #ifdef CONFIG_SMP
+int __read_mostly sysctl_softlockup_all_cpu_backtrace;
+
 static int __init softlockup_all_cpu_backtrace_setup(char *str)
 {
-       sysctl_softlockup_all_cpu_backtrace =
-               !!simple_strtol(str, NULL, 0);
+       sysctl_softlockup_all_cpu_backtrace = !!simple_strtol(str, NULL, 0);
        return 1;
 }
 __setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup);
-#ifdef CONFIG_HARDLOCKUP_DETECTOR
-static int __init hardlockup_all_cpu_backtrace_setup(char *str)
-{
-       sysctl_hardlockup_all_cpu_backtrace =
-               !!simple_strtol(str, NULL, 0);
-       return 1;
-}
-__setup("hardlockup_all_cpu_backtrace=", hardlockup_all_cpu_backtrace_setup);
-#endif
 #endif
 
+static void __lockup_detector_cleanup(void);
+
 /*
  * Hard-lockup warnings should be triggered after just a few seconds. Soft-
  * lockups can have false positives under extreme conditions. So we generally
@@ -278,11 +286,15 @@ void touch_all_softlockup_watchdogs(void)
        int cpu;
 
        /*
-        * this is done lockless
-        * do we care if a 0 races with a timestamp?
-        * all it means is the softlock check starts one cycle later
+        * watchdog_mutex cannpt be taken here, as this might be called
+        * from (soft)interrupt context, so the access to
+        * watchdog_allowed_cpumask might race with a concurrent update.
+        *
+        * The watchdog time stamp can race against a concurrent real
+        * update as well, the only side effect might be a cycle delay for
+        * the softlockup check.
         */
-       for_each_watchdog_cpu(cpu)
+       for_each_cpu(cpu, &watchdog_allowed_mask)
                per_cpu(watchdog_touch_ts, cpu) = 0;
        wq_watchdog_touch(-1);
 }
@@ -322,9 +334,6 @@ static void watchdog_interrupt_count(void)
        __this_cpu_inc(hrtimer_interrupts);
 }
 
-static int watchdog_enable_all_cpus(void);
-static void watchdog_disable_all_cpus(void);
-
 /* watchdog kicker functions */
 static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
 {
@@ -333,7 +342,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
        int duration;
        int softlockup_all_cpu_backtrace = sysctl_softlockup_all_cpu_backtrace;
 
-       if (atomic_read(&watchdog_park_in_progress) != 0)
+       if (!watchdog_enabled)
                return HRTIMER_NORESTART;
 
        /* kick the hardlockup detector */
@@ -447,32 +456,38 @@ static void watchdog_set_prio(unsigned int policy, unsigned int prio)
 
 static void watchdog_enable(unsigned int cpu)
 {
-       struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer);
+       struct hrtimer *hrtimer = this_cpu_ptr(&watchdog_hrtimer);
 
-       /* kick off the timer for the hardlockup detector */
+       /*
+        * Start the timer first to prevent the NMI watchdog triggering
+        * before the timer has a chance to fire.
+        */
        hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        hrtimer->function = watchdog_timer_fn;
-
-       /* Enable the perf event */
-       watchdog_nmi_enable(cpu);
-
-       /* done here because hrtimer_start can only pin to smp_processor_id() */
        hrtimer_start(hrtimer, ns_to_ktime(sample_period),
                      HRTIMER_MODE_REL_PINNED);
 
-       /* initialize timestamp */
-       watchdog_set_prio(SCHED_FIFO, MAX_RT_PRIO - 1);
+       /* Initialize timestamp */
        __touch_watchdog();
+       /* Enable the perf event */
+       if (watchdog_enabled & NMI_WATCHDOG_ENABLED)
+               watchdog_nmi_enable(cpu);
+
+       watchdog_set_prio(SCHED_FIFO, MAX_RT_PRIO - 1);
 }
 
 static void watchdog_disable(unsigned int cpu)
 {
-       struct hrtimer *hrtimer = raw_cpu_ptr(&watchdog_hrtimer);
+       struct hrtimer *hrtimer = this_cpu_ptr(&watchdog_hrtimer);
 
        watchdog_set_prio(SCHED_NORMAL, 0);
-       hrtimer_cancel(hrtimer);
-       /* disable the perf event */
+       /*
+        * Disable the perf event first. That prevents that a large delay
+        * between disabling the timer and disabling the perf event causes
+        * the perf NMI to detect a false positive.
+        */
        watchdog_nmi_disable(cpu);
+       hrtimer_cancel(hrtimer);
 }
 
 static void watchdog_cleanup(unsigned int cpu, bool online)
@@ -499,21 +514,6 @@ static void watchdog(unsigned int cpu)
        __this_cpu_write(soft_lockup_hrtimer_cnt,
                         __this_cpu_read(hrtimer_interrupts));
        __touch_watchdog();
-
-       /*
-        * watchdog_nmi_enable() clears the NMI_WATCHDOG_ENABLED bit in the
-        * failure path. Check for failures that can occur asynchronously -
-        * for example, when CPUs are on-lined - and shut down the hardware
-        * perf event on each CPU accordingly.
-        *
-        * The only non-obvious place this bit can be cleared is through
-        * watchdog_nmi_enable(), so a pr_info() is placed there.  Placing a
-        * pr_info here would be too noisy as it would result in a message
-        * every few seconds if the hardlockup was disabled but the softlockup
-        * enabled.
-        */
-       if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
-               watchdog_nmi_disable(cpu);
 }
 
 static struct smp_hotplug_thread watchdog_threads = {
@@ -527,295 +527,174 @@ static struct smp_hotplug_thread watchdog_threads = {
        .unpark                 = watchdog_enable,
 };
 
-/*
- * park all watchdog threads that are specified in 'watchdog_cpumask'
- *
- * This function returns an error if kthread_park() of a watchdog thread
- * fails. In this situation, the watchdog threads of some CPUs can already
- * be parked and the watchdog threads of other CPUs can still be runnable.
- * Callers are expected to handle this special condition as appropriate in
- * their context.
- *
- * This function may only be called in a context that is protected against
- * races with CPU hotplug - for example, via get_online_cpus().
- */
-static int watchdog_park_threads(void)
+static void softlockup_update_smpboot_threads(void)
 {
-       int cpu, ret = 0;
+       lockdep_assert_held(&watchdog_mutex);
 
-       atomic_set(&watchdog_park_in_progress, 1);
+       if (!softlockup_threads_initialized)
+               return;
 
-       for_each_watchdog_cpu(cpu) {
-               ret = kthread_park(per_cpu(softlockup_watchdog, cpu));
-               if (ret)
-                       break;
-       }
-
-       atomic_set(&watchdog_park_in_progress, 0);
-
-       return ret;
+       smpboot_update_cpumask_percpu_thread(&watchdog_threads,
+                                            &watchdog_allowed_mask);
 }
 
-/*
- * unpark all watchdog threads that are specified in 'watchdog_cpumask'
- *
- * This function may only be called in a context that is protected against
- * races with CPU hotplug - for example, via get_online_cpus().
- */
-static void watchdog_unpark_threads(void)
+/* Temporarily park all watchdog threads */
+static void softlockup_park_all_threads(void)
 {
-       int cpu;
-
-       for_each_watchdog_cpu(cpu)
-               kthread_unpark(per_cpu(softlockup_watchdog, cpu));
+       cpumask_clear(&watchdog_allowed_mask);
+       softlockup_update_smpboot_threads();
 }
 
-static int update_watchdog_all_cpus(void)
+/* Unpark enabled threads */
+static void softlockup_unpark_threads(void)
 {
-       int ret;
-
-       ret = watchdog_park_threads();
-       if (ret)
-               return ret;
-
-       watchdog_unpark_threads();
-
-       return 0;
+       cpumask_copy(&watchdog_allowed_mask, &watchdog_cpumask);
+       softlockup_update_smpboot_threads();
 }
 
-static int watchdog_enable_all_cpus(void)
+static void lockup_detector_reconfigure(void)
 {
-       int err = 0;
-
-       if (!watchdog_running) {
-               err = smpboot_register_percpu_thread_cpumask(&watchdog_threads,
-                                                            &watchdog_cpumask);
-               if (err)
-                       pr_err("Failed to create watchdog threads, disabled\n");
-               else
-                       watchdog_running = 1;
-       } else {
-               /*
-                * Enable/disable the lockup detectors or
-                * change the sample period 'on the fly'.
-                */
-               err = update_watchdog_all_cpus();
-
-               if (err) {
-                       watchdog_disable_all_cpus();
-                       pr_err("Failed to update lockup detectors, disabled\n");
-               }
-       }
-
-       if (err)
-               watchdog_enabled = 0;
-
-       return err;
+       cpus_read_lock();
+       watchdog_nmi_stop();
+       softlockup_park_all_threads();
+       set_sample_period();
+       lockup_detector_update_enable();
+       if (watchdog_enabled && watchdog_thresh)
+               softlockup_unpark_threads();
+       watchdog_nmi_start();
+       cpus_read_unlock();
+       /*
+        * Must be called outside the cpus locked section to prevent
+        * recursive locking in the perf code.
+        */
+       __lockup_detector_cleanup();
 }
 
-static void watchdog_disable_all_cpus(void)
+/*
+ * Create the watchdog thread infrastructure and configure the detector(s).
+ *
+ * The threads are not unparked as watchdog_allowed_mask is empty.  When
+ * the threads are sucessfully initialized, take the proper locks and
+ * unpark the threads in the watchdog_cpumask if the watchdog is enabled.
+ */
+static __init void lockup_detector_setup(void)
 {
-       if (watchdog_running) {
-               watchdog_running = 0;
-               smpboot_unregister_percpu_thread(&watchdog_threads);
-       }
-}
+       int ret;
 
-#ifdef CONFIG_SYSCTL
-static int watchdog_update_cpus(void)
-{
-       return smpboot_update_cpumask_percpu_thread(
-                   &watchdog_threads, &watchdog_cpumask);
-}
-#endif
+       /*
+        * If sysctl is off and watchdog got disabled on the command line,
+        * nothing to do here.
+        */
+       lockup_detector_update_enable();
 
-#else /* SOFTLOCKUP */
-static int watchdog_park_threads(void)
-{
-       return 0;
-}
+       if (!IS_ENABLED(CONFIG_SYSCTL) &&
+           !(watchdog_enabled && watchdog_thresh))
+               return;
 
-static void watchdog_unpark_threads(void)
-{
-}
+       ret = smpboot_register_percpu_thread_cpumask(&watchdog_threads,
+                                                    &watchdog_allowed_mask);
+       if (ret) {
+               pr_err("Failed to initialize soft lockup detector threads\n");
+               return;
+       }
 
-static int watchdog_enable_all_cpus(void)
-{
-       return 0;
+       mutex_lock(&watchdog_mutex);
+       softlockup_threads_initialized = true;
+       lockup_detector_reconfigure();
+       mutex_unlock(&watchdog_mutex);
 }
 
-static void watchdog_disable_all_cpus(void)
+#else /* CONFIG_SOFTLOCKUP_DETECTOR */
+static inline int watchdog_park_threads(void) { return 0; }
+static inline void watchdog_unpark_threads(void) { }
+static inline int watchdog_enable_all_cpus(void) { return 0; }
+static inline void watchdog_disable_all_cpus(void) { }
+static void lockup_detector_reconfigure(void)
 {
+       cpus_read_lock();
+       watchdog_nmi_stop();
+       lockup_detector_update_enable();
+       watchdog_nmi_start();
+       cpus_read_unlock();
 }
-
-#ifdef CONFIG_SYSCTL
-static int watchdog_update_cpus(void)
+static inline void lockup_detector_setup(void)
 {
-       return 0;
+       lockup_detector_reconfigure();
 }
-#endif
+#endif /* !CONFIG_SOFTLOCKUP_DETECTOR */
 
-static void set_sample_period(void)
+static void __lockup_detector_cleanup(void)
 {
+       lockdep_assert_held(&watchdog_mutex);
+       hardlockup_detector_perf_cleanup();
 }
-#endif /* SOFTLOCKUP */
 
-/*
- * Suspend the hard and soft lockup detector by parking the watchdog threads.
+/**
+ * lockup_detector_cleanup - Cleanup after cpu hotplug or sysctl changes
+ *
+ * Caller must not hold the cpu hotplug rwsem.
  */
-int lockup_detector_suspend(void)
+void lockup_detector_cleanup(void)
 {
-       int ret = 0;
-
-       get_online_cpus();
-       mutex_lock(&watchdog_proc_mutex);
-       /*
-        * Multiple suspend requests can be active in parallel (counted by
-        * the 'watchdog_suspended' variable). If the watchdog threads are
-        * running, the first caller takes care that they will be parked.
-        * The state of 'watchdog_running' cannot change while a suspend
-        * request is active (see related code in 'proc' handlers).
-        */
-       if (watchdog_running && !watchdog_suspended)
-               ret = watchdog_park_threads();
-
-       if (ret == 0)
-               watchdog_suspended++;
-       else {
-               watchdog_disable_all_cpus();
-               pr_err("Failed to suspend lockup detectors, disabled\n");
-               watchdog_enabled = 0;
-       }
-
-       watchdog_nmi_reconfigure();
-
-       mutex_unlock(&watchdog_proc_mutex);
-
-       return ret;
+       mutex_lock(&watchdog_mutex);
+       __lockup_detector_cleanup();
+       mutex_unlock(&watchdog_mutex);
 }
 
-/*
- * Resume the hard and soft lockup detector by unparking the watchdog threads.
+/**
+ * lockup_detector_soft_poweroff - Interface to stop lockup detector(s)
+ *
+ * Special interface for parisc. It prevents lockup detector warnings from
+ * the default pm_poweroff() function which busy loops forever.
  */
-void lockup_detector_resume(void)
+void lockup_detector_soft_poweroff(void)
 {
-       mutex_lock(&watchdog_proc_mutex);
-
-       watchdog_suspended--;
-       /*
-        * The watchdog threads are unparked if they were previously running
-        * and if there is no more active suspend request.
-        */
-       if (watchdog_running && !watchdog_suspended)
-               watchdog_unpark_threads();
-
-       watchdog_nmi_reconfigure();
-
-       mutex_unlock(&watchdog_proc_mutex);
-       put_online_cpus();
+       watchdog_enabled = 0;
 }
 
 #ifdef CONFIG_SYSCTL
 
-/*
- * Update the run state of the lockup detectors.
- */
-static int proc_watchdog_update(void)
+/* Propagate any changes to the watchdog threads */
+static void proc_watchdog_update(void)
 {
-       int err = 0;
-
-       /*
-        * Watchdog threads won't be started if they are already active.
-        * The 'watchdog_running' variable in watchdog_*_all_cpus() takes
-        * care of this. If those threads are already active, the sample
-        * period will be updated and the lockup detectors will be enabled
-        * or disabled 'on the fly'.
-        */
-       if (watchdog_enabled && watchdog_thresh)
-               err = watchdog_enable_all_cpus();
-       else
-               watchdog_disable_all_cpus();
-
-       watchdog_nmi_reconfigure();
-
-       return err;
-
+       /* Remove impossible cpus to keep sysctl output clean. */
+       cpumask_and(&watchdog_cpumask, &watchdog_cpumask, cpu_possible_mask);
+       lockup_detector_reconfigure();
 }
 
 /*
  * common function for watchdog, nmi_watchdog and soft_watchdog parameter
  *
- * caller             | table->data points to | 'which' contains the flag(s)
- * -------------------|-----------------------|-----------------------------
- * proc_watchdog      | watchdog_user_enabled | NMI_WATCHDOG_ENABLED or'ed
- *                    |                       | with SOFT_WATCHDOG_ENABLED
- * -------------------|-----------------------|-----------------------------
- * proc_nmi_watchdog  | nmi_watchdog_enabled  | NMI_WATCHDOG_ENABLED
- * -------------------|-----------------------|-----------------------------
- * proc_soft_watchdog | soft_watchdog_enabled | SOFT_WATCHDOG_ENABLED
+ * caller             | table->data points to      | 'which'
+ * -------------------|----------------------------|--------------------------
+ * proc_watchdog      | watchdog_user_enabled      | NMI_WATCHDOG_ENABLED |
+ *                    |                            | SOFT_WATCHDOG_ENABLED
+ * -------------------|----------------------------|--------------------------
+ * proc_nmi_watchdog  | nmi_watchdog_user_enabled  | NMI_WATCHDOG_ENABLED
+ * -------------------|----------------------------|--------------------------
+ * proc_soft_watchdog | soft_watchdog_user_enabled | SOFT_WATCHDOG_ENABLED
  */
 static int proc_watchdog_common(int which, struct ctl_table *table, int write,
                                void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-       int err, old, new;
-       int *watchdog_param = (int *)table->data;
+       int err, old, *param = table->data;
 
-       get_online_cpus();
-       mutex_lock(&watchdog_proc_mutex);
+       mutex_lock(&watchdog_mutex);
 
-       if (watchdog_suspended) {
-               /* no parameter changes allowed while watchdog is suspended */
-               err = -EAGAIN;
-               goto out;
-       }
-
-       /*
-        * If the parameter is being read return the state of the corresponding
-        * bit(s) in 'watchdog_enabled', else update 'watchdog_enabled' and the
-        * run state of the lockup detectors.
-        */
        if (!write) {
-               *watchdog_param = (watchdog_enabled & which) != 0;
+               /*
+                * On read synchronize the userspace interface. This is a
+                * racy snapshot.
+                */
+               *param = (watchdog_enabled & which) != 0;
                err = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
        } else {
+               old = READ_ONCE(*param);
                err = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
-               if (err)
-                       goto out;
-
-               /*
-                * There is a race window between fetching the current value
-                * from 'watchdog_enabled' and storing the new value. During
-                * this race window, watchdog_nmi_enable() can sneak in and
-                * clear the NMI_WATCHDOG_ENABLED bit in 'watchdog_enabled'.
-                * The 'cmpxchg' detects this race and the loop retries.
-                */
-               do {
-                       old = watchdog_enabled;
-                       /*
-                        * If the parameter value is not zero set the
-                        * corresponding bit(s), else clear it(them).
-                        */
-                       if (*watchdog_param)
-                               new = old | which;
-                       else
-                               new = old & ~which;
-               } while (cmpxchg(&watchdog_enabled, old, new) != old);
-
-               /*
-                * Update the run state of the lockup detectors. There is _no_
-                * need to check the value returned by proc_watchdog_update()
-                * and to restore the previous value of 'watchdog_enabled' as
-                * both lockup detectors are disabled if proc_watchdog_update()
-                * returns an error.
-                */
-               if (old == new)
-                       goto out;
-
-               err = proc_watchdog_update();
+               if (!err && old != READ_ONCE(*param))
+                       proc_watchdog_update();
        }
-out:
-       mutex_unlock(&watchdog_proc_mutex);
-       put_online_cpus();
+       mutex_unlock(&watchdog_mutex);
        return err;
 }
 
@@ -835,6 +714,8 @@ int proc_watchdog(struct ctl_table *table, int write,
 int proc_nmi_watchdog(struct ctl_table *table, int write,
                      void __user *buffer, size_t *lenp, loff_t *ppos)
 {
+       if (!nmi_watchdog_available && write)
+               return -ENOTSUPP;
        return proc_watchdog_common(NMI_WATCHDOG_ENABLED,
                                    table, write, buffer, lenp, ppos);
 }
@@ -855,39 +736,17 @@ int proc_soft_watchdog(struct ctl_table *table, int write,
 int proc_watchdog_thresh(struct ctl_table *table, int write,
                         void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-       int err, old, new;
-
-       get_online_cpus();
-       mutex_lock(&watchdog_proc_mutex);
+       int err, old;
 
-       if (watchdog_suspended) {
-               /* no parameter changes allowed while watchdog is suspended */
-               err = -EAGAIN;
-               goto out;
-       }
+       mutex_lock(&watchdog_mutex);
 
-       old = ACCESS_ONCE(watchdog_thresh);
+       old = READ_ONCE(watchdog_thresh);
        err = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 
-       if (err || !write)
-               goto out;
-
-       /*
-        * Update the sample period. Restore on failure.
-        */
-       new = ACCESS_ONCE(watchdog_thresh);
-       if (old == new)
-               goto out;
+       if (!err && write && old != READ_ONCE(watchdog_thresh))
+               proc_watchdog_update();
 
-       set_sample_period();
-       err = proc_watchdog_update();
-       if (err) {
-               watchdog_thresh = old;
-               set_sample_period();
-       }
-out:
-       mutex_unlock(&watchdog_proc_mutex);
-       put_online_cpus();
+       mutex_unlock(&watchdog_mutex);
        return err;
 }
 
@@ -902,45 +761,19 @@ int proc_watchdog_cpumask(struct ctl_table *table, int write,
 {
        int err;
 
-       get_online_cpus();
-       mutex_lock(&watchdog_proc_mutex);
-
-       if (watchdog_suspended) {
-               /* no parameter changes allowed while watchdog is suspended */
-               err = -EAGAIN;
-               goto out;
-       }
+       mutex_lock(&watchdog_mutex);
 
        err = proc_do_large_bitmap(table, write, buffer, lenp, ppos);
-       if (!err && write) {
-               /* Remove impossible cpus to keep sysctl output cleaner. */
-               cpumask_and(&watchdog_cpumask, &watchdog_cpumask,
-                           cpu_possible_mask);
-
-               if (watchdog_running) {
-                       /*
-                        * Failure would be due to being unable to allocate
-                        * a temporary cpumask, so we are likely not in a
-                        * position to do much else to make things better.
-                        */
-                       if (watchdog_update_cpus() != 0)
-                               pr_err("cpumask update failed\n");
-               }
+       if (!err && write)
+               proc_watchdog_update();
 
-               watchdog_nmi_reconfigure();
-       }
-out:
-       mutex_unlock(&watchdog_proc_mutex);
-       put_online_cpus();
+       mutex_unlock(&watchdog_mutex);
        return err;
 }
-
 #endif /* CONFIG_SYSCTL */
 
 void __init lockup_detector_init(void)
 {
-       set_sample_period();
-
 #ifdef CONFIG_NO_HZ_FULL
        if (tick_nohz_full_enabled()) {
                pr_info("Disabling watchdog on nohz_full cores by default\n");
@@ -951,6 +784,7 @@ void __init lockup_detector_init(void)
        cpumask_copy(&watchdog_cpumask, cpu_possible_mask);
 #endif
 
-       if (watchdog_enabled)
-               watchdog_enable_all_cpus();
+       if (!watchdog_nmi_probe())
+               nmi_watchdog_available = true;
+       lockup_detector_setup();
 }
index 3a09ea1b1d3d5e6e284d058052403ac1396804ca..e449a23e9d5982e9069849a5f370c454dfe35383 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Detect hard lockups on a system
  *
@@ -12,6 +13,7 @@
 #define pr_fmt(fmt) "NMI watchdog: " fmt
 
 #include <linux/nmi.h>
+#include <linux/atomic.h>
 #include <linux/module.h>
 #include <linux/sched/debug.h>
 
 static DEFINE_PER_CPU(bool, hard_watchdog_warn);
 static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
 static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
+static DEFINE_PER_CPU(struct perf_event *, dead_event);
+static struct cpumask dead_events_mask;
 
 static unsigned long hardlockup_allcpu_dumped;
+static atomic_t watchdog_cpus = ATOMIC_INIT(0);
 
 void arch_touch_nmi_watchdog(void)
 {
@@ -103,15 +108,12 @@ static struct perf_event_attr wd_hw_attr = {
 
 /* Callback function for perf event subsystem */
 static void watchdog_overflow_callback(struct perf_event *event,
-                struct perf_sample_data *data,
-                struct pt_regs *regs)
+                                      struct perf_sample_data *data,
+                                      struct pt_regs *regs)
 {
        /* Ensure the watchdog never gets throttled */
        event->hw.interrupts = 0;
 
-       if (atomic_read(&watchdog_park_in_progress) != 0)
-               return;
-
        if (__this_cpu_read(watchdog_nmi_touch) == true) {
                __this_cpu_write(watchdog_nmi_touch, false);
                return;
@@ -160,104 +162,134 @@ static void watchdog_overflow_callback(struct perf_event *event,
        return;
 }
 
-/*
- * People like the simple clean cpu node info on boot.
- * Reduce the watchdog noise by only printing messages
- * that are different from what cpu0 displayed.
- */
-static unsigned long firstcpu_err;
-static atomic_t watchdog_cpus;
-
-int watchdog_nmi_enable(unsigned int cpu)
+static int hardlockup_detector_event_create(void)
 {
+       unsigned int cpu = smp_processor_id();
        struct perf_event_attr *wd_attr;
-       struct perf_event *event = per_cpu(watchdog_ev, cpu);
-       int firstcpu = 0;
-
-       /* nothing to do if the hard lockup detector is disabled */
-       if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
-               goto out;
-
-       /* is it already setup and enabled? */
-       if (event && event->state > PERF_EVENT_STATE_OFF)
-               goto out;
-
-       /* it is setup but not enabled */
-       if (event != NULL)
-               goto out_enable;
-
-       if (atomic_inc_return(&watchdog_cpus) == 1)
-               firstcpu = 1;
+       struct perf_event *evt;
 
        wd_attr = &wd_hw_attr;
        wd_attr->sample_period = hw_nmi_get_sample_period(watchdog_thresh);
 
        /* Try to register using hardware perf events */
-       event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, watchdog_overflow_callback, NULL);
+       evt = perf_event_create_kernel_counter(wd_attr, cpu, NULL,
+                                              watchdog_overflow_callback, NULL);
+       if (IS_ERR(evt)) {
+               pr_info("Perf event create on CPU %d failed with %ld\n", cpu,
+                       PTR_ERR(evt));
+               return PTR_ERR(evt);
+       }
+       this_cpu_write(watchdog_ev, evt);
+       return 0;
+}
 
-       /* save the first cpu's error for future comparision */
-       if (firstcpu && IS_ERR(event))
-               firstcpu_err = PTR_ERR(event);
+/**
+ * hardlockup_detector_perf_enable - Enable the local event
+ */
+void hardlockup_detector_perf_enable(void)
+{
+       if (hardlockup_detector_event_create())
+               return;
 
-       if (!IS_ERR(event)) {
-               /* only print for the first cpu initialized */
-               if (firstcpu || firstcpu_err)
-                       pr_info("enabled on all CPUs, permanently consumes one hw-PMU counter.\n");
-               goto out_save;
-       }
+       /* use original value for check */
+       if (!atomic_fetch_inc(&watchdog_cpus))
+               pr_info("Enabled. Permanently consumes one hw-PMU counter.\n");
 
-       /*
-        * Disable the hard lockup detector if _any_ CPU fails to set up
-        * set up the hardware perf event. The watchdog() function checks
-        * the NMI_WATCHDOG_ENABLED bit periodically.
-        *
-        * The barriers are for syncing up watchdog_enabled across all the
-        * cpus, as clear_bit() does not use barriers.
-        */
-       smp_mb__before_atomic();
-       clear_bit(NMI_WATCHDOG_ENABLED_BIT, &watchdog_enabled);
-       smp_mb__after_atomic();
-
-       /* skip displaying the same error again */
-       if (!firstcpu && (PTR_ERR(event) == firstcpu_err))
-               return PTR_ERR(event);
-
-       /* vary the KERN level based on the returned errno */
-       if (PTR_ERR(event) == -EOPNOTSUPP)
-               pr_info("disabled (cpu%i): not supported (no LAPIC?)\n", cpu);
-       else if (PTR_ERR(event) == -ENOENT)
-               pr_warn("disabled (cpu%i): hardware events not enabled\n",
-                        cpu);
-       else
-               pr_err("disabled (cpu%i): unable to create perf event: %ld\n",
-                       cpu, PTR_ERR(event));
-
-       pr_info("Shutting down hard lockup detector on all cpus\n");
-
-       return PTR_ERR(event);
-
-       /* success path */
-out_save:
-       per_cpu(watchdog_ev, cpu) = event;
-out_enable:
-       perf_event_enable(per_cpu(watchdog_ev, cpu));
-out:
-       return 0;
+       perf_event_enable(this_cpu_read(watchdog_ev));
 }
 
-void watchdog_nmi_disable(unsigned int cpu)
+/**
+ * hardlockup_detector_perf_disable - Disable the local event
+ */
+void hardlockup_detector_perf_disable(void)
 {
-       struct perf_event *event = per_cpu(watchdog_ev, cpu);
+       struct perf_event *event = this_cpu_read(watchdog_ev);
 
        if (event) {
                perf_event_disable(event);
-               per_cpu(watchdog_ev, cpu) = NULL;
+               this_cpu_write(watchdog_ev, NULL);
+               this_cpu_write(dead_event, event);
+               cpumask_set_cpu(smp_processor_id(), &dead_events_mask);
+               atomic_dec(&watchdog_cpus);
+       }
+}
+
+/**
+ * hardlockup_detector_perf_cleanup - Cleanup disabled events and destroy them
+ *
+ * Called from lockup_detector_cleanup(). Serialized by the caller.
+ */
+void hardlockup_detector_perf_cleanup(void)
+{
+       int cpu;
+
+       for_each_cpu(cpu, &dead_events_mask) {
+               struct perf_event *event = per_cpu(dead_event, cpu);
 
-               /* should be in cleanup, but blocks oprofile */
-               perf_event_release_kernel(event);
+               /*
+                * Required because for_each_cpu() reports  unconditionally
+                * CPU0 as set on UP kernels. Sigh.
+                */
+               if (event)
+                       perf_event_release_kernel(event);
+               per_cpu(dead_event, cpu) = NULL;
+       }
+       cpumask_clear(&dead_events_mask);
+}
+
+/**
+ * hardlockup_detector_perf_stop - Globally stop watchdog events
+ *
+ * Special interface for x86 to handle the perf HT bug.
+ */
+void __init hardlockup_detector_perf_stop(void)
+{
+       int cpu;
+
+       lockdep_assert_cpus_held();
+
+       for_each_online_cpu(cpu) {
+               struct perf_event *event = per_cpu(watchdog_ev, cpu);
+
+               if (event)
+                       perf_event_disable(event);
+       }
+}
+
+/**
+ * hardlockup_detector_perf_restart - Globally restart watchdog events
+ *
+ * Special interface for x86 to handle the perf HT bug.
+ */
+void __init hardlockup_detector_perf_restart(void)
+{
+       int cpu;
+
+       lockdep_assert_cpus_held();
+
+       if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
+               return;
+
+       for_each_online_cpu(cpu) {
+               struct perf_event *event = per_cpu(watchdog_ev, cpu);
+
+               if (event)
+                       perf_event_enable(event);
+       }
+}
+
+/**
+ * hardlockup_detector_perf_init - Probe whether NMI event is available at all
+ */
+int __init hardlockup_detector_perf_init(void)
+{
+       int ret = hardlockup_detector_event_create();
 
-               /* watchdog_nmi_enable() expects this to be zero initially. */
-               if (atomic_dec_and_test(&watchdog_cpus))
-                       firstcpu_err = 0;
+       if (ret) {
+               pr_info("Perf NMI watchdog permanently disabled\n");
+       } else {
+               perf_event_release_kernel(this_cpu_read(watchdog_ev));
+               this_cpu_write(watchdog_ev, NULL);
        }
+       return ret;
 }
index 64d0edf428f850f2e5cfed94970cb74491eb6b61..a2dccfe1acec34bbda97a292344b997055e56d9a 100644 (file)
@@ -68,6 +68,7 @@ enum {
         * attach_mutex to avoid changing binding state while
         * worker_attach_to_pool() is in progress.
         */
+       POOL_MANAGER_ACTIVE     = 1 << 0,       /* being managed */
        POOL_DISASSOCIATED      = 1 << 2,       /* cpu can't serve workers */
 
        /* worker flags */
@@ -165,7 +166,6 @@ struct worker_pool {
                                                /* L: hash of busy workers */
 
        /* see manage_workers() for details on the two manager mutexes */
-       struct mutex            manager_arb;    /* manager arbitration */
        struct worker           *manager;       /* L: purely informational */
        struct mutex            attach_mutex;   /* attach/detach exclusion */
        struct list_head        workers;        /* A: attached workers */
@@ -299,6 +299,7 @@ static struct workqueue_attrs *wq_update_unbound_numa_attrs_buf;
 
 static DEFINE_MUTEX(wq_pool_mutex);    /* protects pools and workqueues list */
 static DEFINE_SPINLOCK(wq_mayday_lock);        /* protects wq->maydays list */
+static DECLARE_WAIT_QUEUE_HEAD(wq_manager_wait); /* wait for manager to go away */
 
 static LIST_HEAD(workqueues);          /* PR: list of all workqueues */
 static bool workqueue_freezing;                /* PL: have wqs started freezing? */
@@ -801,7 +802,7 @@ static bool need_to_create_worker(struct worker_pool *pool)
 /* Do we have too many workers and should some go away? */
 static bool too_many_workers(struct worker_pool *pool)
 {
-       bool managing = mutex_is_locked(&pool->manager_arb);
+       bool managing = pool->flags & POOL_MANAGER_ACTIVE;
        int nr_idle = pool->nr_idle + managing; /* manager is considered idle */
        int nr_busy = pool->nr_workers - nr_idle;
 
@@ -1980,24 +1981,17 @@ static bool manage_workers(struct worker *worker)
 {
        struct worker_pool *pool = worker->pool;
 
-       /*
-        * Anyone who successfully grabs manager_arb wins the arbitration
-        * and becomes the manager.  mutex_trylock() on pool->manager_arb
-        * failure while holding pool->lock reliably indicates that someone
-        * else is managing the pool and the worker which failed trylock
-        * can proceed to executing work items.  This means that anyone
-        * grabbing manager_arb is responsible for actually performing
-        * manager duties.  If manager_arb is grabbed and released without
-        * actual management, the pool may stall indefinitely.
-        */
-       if (!mutex_trylock(&pool->manager_arb))
+       if (pool->flags & POOL_MANAGER_ACTIVE)
                return false;
+
+       pool->flags |= POOL_MANAGER_ACTIVE;
        pool->manager = worker;
 
        maybe_create_worker(pool);
 
        pool->manager = NULL;
-       mutex_unlock(&pool->manager_arb);
+       pool->flags &= ~POOL_MANAGER_ACTIVE;
+       wake_up(&wq_manager_wait);
        return true;
 }
 
@@ -3248,7 +3242,6 @@ static int init_worker_pool(struct worker_pool *pool)
        setup_timer(&pool->mayday_timer, pool_mayday_timeout,
                    (unsigned long)pool);
 
-       mutex_init(&pool->manager_arb);
        mutex_init(&pool->attach_mutex);
        INIT_LIST_HEAD(&pool->workers);
 
@@ -3318,13 +3311,15 @@ static void put_unbound_pool(struct worker_pool *pool)
        hash_del(&pool->hash_node);
 
        /*
-        * Become the manager and destroy all workers.  Grabbing
-        * manager_arb prevents @pool's workers from blocking on
-        * attach_mutex.
+        * Become the manager and destroy all workers.  This prevents
+        * @pool's workers from blocking on attach_mutex.  We're the last
+        * manager and @pool gets freed with the flag set.
         */
-       mutex_lock(&pool->manager_arb);
-
        spin_lock_irq(&pool->lock);
+       wait_event_lock_irq(wq_manager_wait,
+                           !(pool->flags & POOL_MANAGER_ACTIVE), pool->lock);
+       pool->flags |= POOL_MANAGER_ACTIVE;
+
        while ((worker = first_idle_worker(pool)))
                destroy_worker(worker);
        WARN_ON(pool->nr_workers || pool->nr_idle);
@@ -3338,8 +3333,6 @@ static void put_unbound_pool(struct worker_pool *pool)
        if (pool->detach_completion)
                wait_for_completion(pool->detach_completion);
 
-       mutex_unlock(&pool->manager_arb);
-
        /* shut down the timers */
        del_timer_sync(&pool->idle_timer);
        del_timer_sync(&pool->mayday_timer);
index 8635417c587b7a5ba89d843a31fc5b58d817f777..efdd72e15794eb2fca6afbbe28612d1fdd3288d6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * kernel/workqueue_internal.h
  *
index e0a122bc1cdb06d25c686d5e7fb68c7217169e96..7b1f581a2907302569cace47dabcf9f283ed4ae1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __842_H__
 #define __842_H__
index e7f3bffaf25515e526b4abafc908412c3296e1d2..277e403e8701fc6491695f06275783572a62135d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __842_DEBUGFS_H__
 #define __842_DEBUGFS_H__
index b19c491cbc4e7934ab5bc78549c95423b91b2f7a..dfdad67d8f6cce470171986addcad7b61c09f382 100644 (file)
@@ -219,7 +219,8 @@ config FRAME_WARN
        range 0 8192
        default 0 if KASAN
        default 2048 if GCC_PLUGIN_LATENT_ENTROPY
-       default 1024 if !64BIT
+       default 1280 if (!64BIT && PARISC)
+       default 1024 if (!64BIT && !PARISC)
        default 2048 if 64BIT
        help
          Tell gcc to warn at build time for stack frames larger than this.
@@ -1091,8 +1092,8 @@ config PROVE_LOCKING
        select DEBUG_MUTEXES
        select DEBUG_RT_MUTEXES if RT_MUTEXES
        select DEBUG_LOCK_ALLOC
-       select LOCKDEP_CROSSRELEASE
-       select LOCKDEP_COMPLETIONS
+       select LOCKDEP_CROSSRELEASE if BROKEN
+       select LOCKDEP_COMPLETIONS if BROKEN
        select TRACE_IRQFLAGS
        default n
        help
@@ -1589,6 +1590,54 @@ config LATENCYTOP
 
 source kernel/trace/Kconfig
 
+config PROVIDE_OHCI1394_DMA_INIT
+       bool "Remote debugging over FireWire early on boot"
+       depends on PCI && X86
+       help
+         If you want to debug problems which hang or crash the kernel early
+         on boot and the crashing machine has a FireWire port, you can use
+         this feature to remotely access the memory of the crashed machine
+         over FireWire. This employs remote DMA as part of the OHCI1394
+         specification which is now the standard for FireWire controllers.
+
+         With remote DMA, you can monitor the printk buffer remotely using
+         firescope and access all memory below 4GB using fireproxy from gdb.
+         Even controlling a kernel debugger is possible using remote DMA.
+
+         Usage:
+
+         If ohci1394_dma=early is used as boot parameter, it will initialize
+         all OHCI1394 controllers which are found in the PCI config space.
+
+         As all changes to the FireWire bus such as enabling and disabling
+         devices cause a bus reset and thereby disable remote DMA for all
+         devices, be sure to have the cable plugged and FireWire enabled on
+         the debugging host before booting the debug target for debugging.
+
+         This code (~1k) is freed after boot. By then, the firewire stack
+         in charge of the OHCI-1394 controllers should be used instead.
+
+         See Documentation/debugging-via-ohci1394.txt for more information.
+
+config DMA_API_DEBUG
+       bool "Enable debugging of DMA-API usage"
+       depends on HAVE_DMA_API_DEBUG
+       help
+         Enable this option to debug the use of the DMA API by device drivers.
+         With this option you will be able to detect common bugs in device
+         drivers like double-freeing of DMA mappings or freeing mappings that
+         were never allocated.
+
+         This also attempts to catch cases where a page owned by DMA is
+         accessed by the cpu in a way that could cause data corruption.  For
+         example, this enables cow_user_page() to check that the source page is
+         not undergoing DMA.
+
+         This option causes a performance degradation.  Use only if you want to
+         debug device drivers and dma interactions.
+
+         If unsure, say N.
+
 menu "Runtime Testing"
 
 config LKDTM
@@ -1748,56 +1797,6 @@ config TEST_PARMAN
 
          If unsure, say N.
 
-endmenu # runtime tests
-
-config PROVIDE_OHCI1394_DMA_INIT
-       bool "Remote debugging over FireWire early on boot"
-       depends on PCI && X86
-       help
-         If you want to debug problems which hang or crash the kernel early
-         on boot and the crashing machine has a FireWire port, you can use
-         this feature to remotely access the memory of the crashed machine
-         over FireWire. This employs remote DMA as part of the OHCI1394
-         specification which is now the standard for FireWire controllers.
-
-         With remote DMA, you can monitor the printk buffer remotely using
-         firescope and access all memory below 4GB using fireproxy from gdb.
-         Even controlling a kernel debugger is possible using remote DMA.
-
-         Usage:
-
-         If ohci1394_dma=early is used as boot parameter, it will initialize
-         all OHCI1394 controllers which are found in the PCI config space.
-
-         As all changes to the FireWire bus such as enabling and disabling
-         devices cause a bus reset and thereby disable remote DMA for all
-         devices, be sure to have the cable plugged and FireWire enabled on
-         the debugging host before booting the debug target for debugging.
-
-         This code (~1k) is freed after boot. By then, the firewire stack
-         in charge of the OHCI-1394 controllers should be used instead.
-
-         See Documentation/debugging-via-ohci1394.txt for more information.
-
-config DMA_API_DEBUG
-       bool "Enable debugging of DMA-API usage"
-       depends on HAVE_DMA_API_DEBUG
-       help
-         Enable this option to debug the use of the DMA API by device drivers.
-         With this option you will be able to detect common bugs in device
-         drivers like double-freeing of DMA mappings or freeing mappings that
-         were never allocated.
-
-         This also attempts to catch cases where a page owned by DMA is
-         accessed by the cpu in a way that could cause data corruption.  For
-         example, this enables cow_user_page() to check that the source page is
-         not undergoing DMA.
-
-         This option causes a performance degradation.  Use only if you want to
-         debug device drivers and dma interactions.
-
-         If unsure, say N.
-
 config TEST_LKM
        tristate "Test module loading with 'hello world' module"
        default n
@@ -1872,18 +1871,6 @@ config TEST_UDELAY
 
          If unsure, say N.
 
-config MEMTEST
-       bool "Memtest"
-       depends on HAVE_MEMBLOCK
-       ---help---
-         This option adds a kernel parameter 'memtest', which allows memtest
-         to be set.
-               memtest=0, mean disabled; -- default
-               memtest=1, mean do 1 test pattern;
-               ...
-               memtest=17, mean do 17 test patterns.
-         If you are unsure how to answer this question, answer N.
-
 config TEST_STATIC_KEYS
        tristate "Test static keys"
        default n
@@ -1893,16 +1880,6 @@ config TEST_STATIC_KEYS
 
          If unsure, say N.
 
-config BUG_ON_DATA_CORRUPTION
-       bool "Trigger a BUG when data corruption is detected"
-       select DEBUG_LIST
-       help
-         Select this option if the kernel should BUG when it encounters
-         data corruption in kernel memory structures when they get checked
-         for validity.
-
-         If unsure, say N.
-
 config TEST_KMOD
        tristate "kmod stress tester"
        default n
@@ -1940,6 +1917,29 @@ config TEST_DEBUG_VIRTUAL
 
          If unsure, say N.
 
+endmenu # runtime tests
+
+config MEMTEST
+       bool "Memtest"
+       depends on HAVE_MEMBLOCK
+       ---help---
+         This option adds a kernel parameter 'memtest', which allows memtest
+         to be set.
+               memtest=0, mean disabled; -- default
+               memtest=1, mean do 1 test pattern;
+               ...
+               memtest=17, mean do 17 test patterns.
+         If you are unsure how to answer this question, answer N.
+
+config BUG_ON_DATA_CORRUPTION
+       bool "Trigger a BUG when data corruption is detected"
+       select DEBUG_LIST
+       help
+         Select this option if the kernel should BUG when it encounters
+         data corruption in kernel memory structures when they get checked
+         for validity.
+
+         If unsure, say N.
 
 source "samples/Kconfig"
 
index dafa79613fb47867fb641a71fa05a8f249c2ccd5..b8f2c16fccaa9f4b24b81df833e72f5594776081 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for some libs needed in the kernel.
 #
index e927ed0e18a8382f049e23646a99e1bbce8231ef..5c35752a9414ca004def7ad9c27f34f36bbe9029 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Helper function for splitting a string into an argv-like array.
  */
index 0bd8a611eb83c99aad01fcee01143bbaad490845..fef5d2e114be1eef73b78653ce84a915da3e59d3 100644 (file)
@@ -284,6 +284,9 @@ next_op:
                                if (unlikely(len > datalen - dp))
                                        goto data_overrun_error;
                        }
+               } else {
+                       if (unlikely(len > datalen - dp))
+                               goto data_overrun_error;
                }
 
                if (flags & FLAG_CONS) {
index 155c55d8db5fccb3ded0047d1fb1fcfef7673072..4e53be8bc590dc2030a930aec5a2cac8c4fa6a30 100644 (file)
@@ -598,21 +598,31 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
                if ((edit->segment_cache[ASSOC_ARRAY_FAN_OUT] ^ base_seg) == 0)
                        goto all_leaves_cluster_together;
 
-               /* Otherwise we can just insert a new node ahead of the old
-                * one.
+               /* Otherwise all the old leaves cluster in the same slot, but
+                * the new leaf wants to go into a different slot - so we
+                * create a new node (n0) to hold the new leaf and a pointer to
+                * a new node (n1) holding all the old leaves.
+                *
+                * This can be done by falling through to the node splitting
+                * path.
                 */
-               goto present_leaves_cluster_but_not_new_leaf;
+               pr_devel("present leaves cluster but not new leaf\n");
        }
 
 split_node:
        pr_devel("split node\n");
 
-       /* We need to split the current node; we know that the node doesn't
-        * simply contain a full set of leaves that cluster together (it
-        * contains meta pointers and/or non-clustering leaves).
+       /* We need to split the current node.  The node must contain anything
+        * from a single leaf (in the one leaf case, this leaf will cluster
+        * with the new leaf) and the rest meta-pointers, to all leaves, some
+        * of which may cluster.
+        *
+        * It won't contain the case in which all the current leaves plus the
+        * new leaves want to cluster in the same slot.
         *
         * We need to expel at least two leaves out of a set consisting of the
-        * leaves in the node and the new leaf.
+        * leaves in the node and the new leaf.  The current meta pointers can
+        * just be copied as they shouldn't cluster with any of the leaves.
         *
         * We need a new node (n0) to replace the current one and a new node to
         * take the expelled nodes (n1).
@@ -717,33 +727,6 @@ found_slot_for_multiple_occupancy:
        pr_devel("<--%s() = ok [split node]\n", __func__);
        return true;
 
-present_leaves_cluster_but_not_new_leaf:
-       /* All the old leaves cluster in the same slot, but the new leaf wants
-        * to go into a different slot, so we create a new node to hold the new
-        * leaf and a pointer to a new node holding all the old leaves.
-        */
-       pr_devel("present leaves cluster but not new leaf\n");
-
-       new_n0->back_pointer = node->back_pointer;
-       new_n0->parent_slot = node->parent_slot;
-       new_n0->nr_leaves_on_branch = node->nr_leaves_on_branch;
-       new_n1->back_pointer = assoc_array_node_to_ptr(new_n0);
-       new_n1->parent_slot = edit->segment_cache[0];
-       new_n1->nr_leaves_on_branch = node->nr_leaves_on_branch;
-       edit->adjust_count_on = new_n0;
-
-       for (i = 0; i < ASSOC_ARRAY_FAN_OUT; i++)
-               new_n1->slots[i] = node->slots[i];
-
-       new_n0->slots[edit->segment_cache[0]] = assoc_array_node_to_ptr(new_n0);
-       edit->leaf_p = &new_n0->slots[edit->segment_cache[ASSOC_ARRAY_FAN_OUT]];
-
-       edit->set[0].ptr = &assoc_array_ptr_to_node(node->back_pointer)->slots[node->parent_slot];
-       edit->set[0].to = assoc_array_node_to_ptr(new_n0);
-       edit->excised_meta[0] = assoc_array_node_to_ptr(node);
-       pr_devel("<--%s() = ok [insert node before]\n", __func__);
-       return true;
-
 all_leaves_cluster_together:
        /* All the leaves, new and old, want to cluster together in this node
         * in the same slot, so we have to replace this node with a shortcut to
index b8fb5ee81e26efc3a9a1457b6f4423046750d869..5004bff928a70e74077381a7245d2e86141e688f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/audit.h>
index 40d304efe27281151124a874cdbac864f997a7ee..7e4750b6e801425dd1c3a68402607b189ca6b99d 100644 (file)
--- a/lib/bcd.c
+++ b/lib/bcd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bcd.h>
 #include <linux/export.h>
 
index a6a1137d06db75f94d005a9e646e061847be1c93..1e094408c893db33f42542960406e93eb19a1d87 100644 (file)
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
   Generic support for BUG()
 
index f8e0e536739832bdd05df68647e373788c060fda..ab719495e2cb42ba7b8c85e7ef5dfadff4695946 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * lib/bust_spinlocks.c
  *
index 6b49797980c4f910d3456cbffc328deb82a14a1b..43a7301da7ab2a9587e1c00df0d28bc143d85e2a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/io.h>
 #include <linux/export.h>
 
index 7287b4a991a7aaf9df30f43caacbf9841fb4f235..b6118d09f244b251956f8c53b49902cb12e97dec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 const unsigned char __clz_tab[] = {
        0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
            5, 5, 5, 5, 5, 5, 5, 5,
index 873f75b640abf9d64794cab1e42cf08a4d1a68f8..77eabad69b4a8fcde3edc3d869548a67bbeff383 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/types.h>
 #include <asm/unistd32.h>
index 8b1a1bd77539386a580dc79347518c76beb97e1d..35fe142ebb5e2fefe6803445804b7481a52dded3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/bitops.h>
index 64cba2c3c7008fa1341cc28129c2c0796b935d25..cb275a28a7500232a04e8f1a6b141287603d6208 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * There are multiple 16-bit CRC polynomials in common use, but this is
  * *the* standard CRC-32 polynomial, first popularized by Ethernet.
index c646df91a2f7d058fe2b4478aa77a7e3abe6ad1c..c819fe269eb2b6b60f9b70acf966307b50d45dc0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/lib/ctype.c
  *
index 2edbe27517edf86f2d845f19e32704a0d0ba614f..36daf753293c33777265f6e0bddfecd5a052de34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file exists solely to ensure debug information for some core
  * data structures is included in the final image even for
index e26278576b31148bd021a52c0980f921bfaa233a..347fa7ac2e8a858827415d44725d256d2a9e96a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/spinlock.h>
 #include <linux/atomic.h>
index 62696dff5730be1927edfdafc7bc314e71226a88..857ab1af1ef39aa6b46fe6de62b8aa26279f42ba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * decompress.c
  *
index 555c06bf20daa83190139392597c4622a00a0e5d..63b4b7eee138d27001ce8e96cdbf6c82648566e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef STATIC
 #define PREBOOT
 /* Pre-boot environment: included */
index 78eca713b1d9ad99caa14deb3b688559aaf0fd63..5f2aedd58bc5032eb18e882fbb2e539f0feed550 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/pci.h>
 #include <linux/io.h>
index 03d7c63837aecb36f74037212e9e7dd421e2e4c9..6ba6fcd92dd10cd2c78898b35c65a0540b19bfb3 100644 (file)
@@ -87,6 +87,12 @@ static int digsig_verify_rsa(struct key *key,
        down_read(&key->sem);
        ukp = user_key_payload_locked(key);
 
+       if (!ukp) {
+               /* key was revoked before we acquired its semaphore */
+               err = -EKEYREVOKED;
+               goto err1;
+       }
+
        if (ukp->datalen < sizeof(*pkh))
                goto err1;
 
index 7f345259c32f1e6c96eb5787b3d489f436a03898..58e2a404097e9f5a47269138dcb843d1a39084a8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.com>
  *
index acc4190e2731ec1bf65def9b8dcb250eac8fcaf7..a10185b0c2d4a7977cce282a80275cceca8c4d13 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     lib/dma-noop.c
  *
index 5c4f113297213035fe9e78811800cd12eabbee7c..8e61a02ef9ca06cb2aabfaef7484a44f31610ef1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     lib/dma-virt.c
  *
index 625375e7f11f98f2468002772265e30e753345fb..c5edbedd364dce20f028614c0b7679878e70913d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Provide a default dump_stack() function for architectures
  * which don't implement their own.
index f346715e22557599c796ccd17cdc610a8232de4e..6a406fafb5d611771fd6db769efd584719a0ebc6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Dynamic byte queue limits.  See include/linux/dynamic_queue_limits.h
  *
index 7b900c2a277ad39803db6904d8b8346b08951628..79cc66897db42747db39fcfa35ba4b45fda4739c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/bug.h>
 #include <linux/atomic.h>
index 2cc1f94e03a1dbb789608e2ccad119a927d414fc..7852bfff50b1289005244cd36664dcf185aeccf6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Floating proportions with flexible aging period
  *
index e04d010cfbf59c4df0fbad4e39305a32504e5f5a..d56f02dea83a014afdfce3ac6eab2965d93f47b8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Font handling
 
 font-objs := fonts.o
index 6be72bb218ee4d65e95ad6377b56d6ee5038e88f..532f0ff89a962d389a09efabd37ef81a1c5d8347 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /********************************
  * adapted from font_sun12x22.c *
  * by Jurriaan Kalkman 06-2005  *
index b20620904d314f70eda7dfc349b5a4a101bc43d9..09b2cc03435b938be9f73264d6937cf944149f54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/font.h>
 
 static const unsigned char fontdata_6x10[] = {
index 46e86e67aa6aa8d1411c25403864064bab43adc4..d7136c33f1f018b854a887c58d2da54e7496d27b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**********************************************/
 /*                                            */
 /*       Font file generated by rthelen       */
index 3b7dbf9c060b33eb55d33938ec13c4cfeab03fe9..9ae5b62c8a0dba2f0bb3f7fe61031c2a7eaff558 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**************************************/
 /* this file adapted from font_8x16.c */
 /* by Jurriaan Kalkman 05-2005        */
index 00a0c67a5c7d0e2051b7d273ed75104dfb95b2e3..34292cdfaa23253b41ae6260fb67b0e4a2acc112 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**********************************************/
 /*                                            */
 /*       Font file generated by cpi2fnt       */
index 9f56efe2cee728ffb075c64d9419b093bf66c4f4..751becf3c521e11d01167cd214684cf338b0aa39 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**********************************************/
 /*                                            */
 /*       Font file generated by cpi2fnt       */
index 639e31ae1100ae5511948e6a538b1cbdb75b62e7..0ff0e85d4481ba93a24b4c727b6756c5694e210b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Acorn-like font definition, with PC graphics characters */
 
 #include <linux/font.h>
index dc6ad539ca4e4307c321e4d5b2e374814f04d707..b0514c0a74451f77916942e4f971ad76b8be8de9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**********************************************/
 /*                                            */
 /*       Font file generated by cpi2fnt       */
index d3643853c33af91dd98883d9f0c8b8565a70f5a6..955d6eee3959d7b295047952087b9f357754ebb5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/font.h>
 
 #define FONTDATAMAX 11264
index 268151325b83e00b0e7e36e32ea69ff2e8bfac7e..03d71e53954abddea323add037b8d9d28d8e232a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/font.h>
 
 #define FONTDATAMAX 4096
index d83a372fa76f26fa82a99dbf7af3c4ff40fa0db4..8f26660ea10a4cd47255a46c2cd5ec9113d5d420 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include "../include/generated/autoconf.h"
 #include "crc32defs.h"
index 43273a7d83cf41621221354bc0d1b5680027780e..7660d88fd4960c8571d16f035d4d92b76fd17f2c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/bitops.h>
 #include <asm/types.h>
index f9adf4805fd740c3283c7b5b1361e12052869aba..edd9b2be1651fa99ae3a6274bda38c1bd7159a64 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -146,8 +146,8 @@ EXPORT_SYMBOL(idr_get_next_ext);
  * idr_alloc() and idr_remove() (as long as the ID being removed is not
  * the one being replaced!).
  *
- * Returns: 0 on success.  %-ENOENT indicates that @id was not found.
- * %-EINVAL indicates that @id or @ptr were not valid.
+ * Returns: the old value on success.  %-ENOENT indicates that @id was not
+ * found.  %-EINVAL indicates that @id or @ptr were not valid.
  */
 void *idr_replace(struct idr *idr, void *ptr, int id)
 {
index 013a7619348125b1a9d4de74546d927acf2616c1..fbaf03c1748dddd59b596bb3fcefe2f96f8a216e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define DEBG(x)
 #define DEBG1(x)
 /* inflate.c -- Not copyrighted 1992 by Mark Adler
index 1ef4cc344977cda2886ec1033a0868cec4a8ec41..db0b5aa071fc14e68fc3073e1a41c0d4617e65cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013 Davidlohr Bueso <davidlohr.bueso@hp.com>
  *
index fc3dcb4b238eca1a483c17de5b5706f536d3d444..541d926da95ecc2de6e643110734b02f4e8f2cbe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implement the default iomap interfaces
  *
index 858dc1aae478bad9cb30275cb7fd7905d73f6ede..55b00de106b513c9972f0501e44938b708a06b96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IOMMU mmap management and range allocation functions.
  * Based almost entirely upon the powerpc iommu allocator.
index a816f3a806258c8ea08ac787c8eee9841d3204bc..23633c0fda4a6029260f88e25e571896a2a75444 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IOMMU helper functions for the free area management
  */
index 4bb30206b9426f1fcece4324cc0dfe76b8855c65..b808a390e4c3e32d2789b059ab7752c6d533d7a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Re-map IO memory to kernel address space so that we can access it.
  * This is needed for high PCI addresses that aren't mapped in the
@@ -161,6 +162,7 @@ int ioremap_page_range(unsigned long addr,
        unsigned long next;
        int err;
 
+       might_sleep();
        BUG_ON(addr >= end);
 
        start = addr;
index 52c8dd6d8e8290fa8df614e0017542a600b9c536..1c1c06ddc20a8a961d7d9f73e43d65b695636d5d 100644 (file)
@@ -687,8 +687,10 @@ EXPORT_SYMBOL(_copy_from_iter_full_nocache);
 
 static inline bool page_copy_sane(struct page *page, size_t offset, size_t n)
 {
-       size_t v = n + offset;
-       if (likely(n <= v && v <= (PAGE_SIZE << compound_order(page))))
+       struct page *head = compound_head(page);
+       size_t v = n + offset + page_address(page) - page_address(head);
+
+       if (likely(n <= v && v <= (PAGE_SIZE << compound_order(head))))
                return true;
        WARN_ON(1);
        return false;
index 1d6565e810309eb710523a814983849d76101c6b..86a709954f5a515bc151ddb0ddfdfcdcd3b871ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Functions related to interrupt-poll handling in the block layer. This
  * is similar to NAPI for network devices.
index 7f6c506a494226479af1152f13f99f1870f554d1..bacf7b83ccf0ee6bdc14902bfd400a72b265b5cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/lib/kasprintf.c
  *
index e590523ea4761425df5e112a2c2aab873dbaa90d..f237a09a58627bfd4df2628c173f57afd89a83de 100644 (file)
@@ -294,6 +294,26 @@ static void cleanup_uevent_env(struct subprocess_info *info)
 }
 #endif
 
+static void zap_modalias_env(struct kobj_uevent_env *env)
+{
+       static const char modalias_prefix[] = "MODALIAS=";
+       int i;
+
+       for (i = 0; i < env->envp_idx;) {
+               if (strncmp(env->envp[i], modalias_prefix,
+                           sizeof(modalias_prefix) - 1)) {
+                       i++;
+                       continue;
+               }
+
+               if (i != env->envp_idx - 1)
+                       memmove(&env->envp[i], &env->envp[i + 1],
+                               sizeof(env->envp[i]) * env->envp_idx - 1);
+
+               env->envp_idx--;
+       }
+}
+
 /**
  * kobject_uevent_env - send an uevent with environmental data
  *
@@ -409,16 +429,29 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                }
        }
 
-       /*
-        * Mark "add" and "remove" events in the object to ensure proper
-        * events to userspace during automatic cleanup. If the object did
-        * send an "add" event, "remove" will automatically generated by
-        * the core, if not already done by the caller.
-        */
-       if (action == KOBJ_ADD)
+       switch (action) {
+       case KOBJ_ADD:
+               /*
+                * Mark "add" event so we can make sure we deliver "remove"
+                * event to userspace during automatic cleanup. If
+                * the object did send an "add" event, "remove" will
+                * automatically generated by the core, if not already done
+                * by the caller.
+                */
                kobj->state_add_uevent_sent = 1;
-       else if (action == KOBJ_REMOVE)
+               break;
+
+       case KOBJ_REMOVE:
                kobj->state_remove_uevent_sent = 1;
+               break;
+
+       case KOBJ_UNBIND:
+               zap_modalias_env(env);
+               break;
+
+       default:
+               break;
+       }
 
        mutex_lock(&uevent_sock_mutex);
        /* we will send an event, so request a new sequence number */
index 720144075c1ea06b659ab7a15512ca6b3a1bba24..661a1e807bd1ac89616ee1eff4ac395c05d617d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Convert integer string representation to an integer.
  * If an integer doesn't fit into specified type, -E is returned.
index f13eeeaf441db95ad57ec2659ed8958527bbfdb9..3b4637bcd2540d7c4244363016c8d75ec604fd98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIB_KSTRTOX_H
 #define _LIB_KSTRTOX_H
 
index 9e9acc37652f2814542438f65d20ea9b3aab6539..85759928215b41f7be4ae56089eaaa7007f79659 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/bug.h>
 #include <linux/compiler.h>
index 10d4a150b259c9c4022f2b3542fc8d4ceba1137c..0d144a6d6a96ba8d56a1335319872ada39b8eba3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef IRQ_DISABLE
 #undef IRQ_ENABLE
 #undef IRQ_ENTER
index 68601b6f584b88a189c6c082bd45278756f57fca..7526c7746fb2306fc0aea7fbdc32d5901ae94d99 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           ML
 
index 6789044f4d0efd2cf0773484b9c1a4172cee00da..eccab18f5584ad61d527bcb357e74ab2141da51a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           RL
 
index 62da886680c7aea003b97fb7a72b12be4db3562b..4544858f922e2bd2a6f3935063bb2b24664e2395 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           RSL
 
index e3cb83989d16f8ef9909977e07565122262729a8..fce8714c4170e5444a9aa2f16e56f82113634d05 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           RTL
 
index a83de2a04ace78006db01dd3f1f2025d3c40b606..6adde4867cb8dfbf7e091d846f14befd9517436f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef IRQ_DISABLE
 #undef IRQ_ENABLE
 #undef IRQ_ENTER
index ccd1b4b0975708e770148a30df572729636a8530..6b24d699e502ed5831877bd6f914ef249fe21545 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           L
 
index 0815322d99ed92ca38fef90f930af4054e24199b..0bc51c8cf3c5845072e1ec6c59dcfa7078a49079 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           WL
 
index b88c5f2dc5f0065cbb07bd4261a50fb4b65591bf..5ef18f931c9bcd78a72363aa41f568d170e2c7cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef LOCK
 #define LOCK           WSL
 
index cd0b5c964bd041853a74116780c4446c4dc355f9..b5c1293ce1474fbb7056c1995acb33991cd662af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * lib/locking-selftest.c
  *
@@ -2031,11 +2032,13 @@ void locking_selftest(void)
        print_testname("mixed read-lock/lock-write ABBA");
        pr_cont("             |");
        dotest(rlock_ABBA1, FAILURE, LOCKTYPE_RWLOCK);
+#ifdef CONFIG_PROVE_LOCKING
        /*
         * Lockdep does indeed fail here, but there's nothing we can do about
         * that now.  Don't kill lockdep for it.
         */
        unexpected_testcase_failures--;
+#endif
 
        pr_cont("             |");
        dotest(rwsem_ABBA1, FAILURE, LOCKTYPE_RWSEM);
index c4bfcb8836cdd961761d08ec275616ac80a464b6..47169ed7e964f53dbc7735a3ad5b19c492878f45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/lockref.h>
 
index bd3574312b827c606fe93c8d0a8a8c0ca0c6542d..141734d255e4b941f888e32ee53885c26cfc8fbd 100644 (file)
@@ -85,8 +85,8 @@ static FORCE_INLINE int LZ4_decompress_generic(
        const BYTE * const lowLimit = lowPrefix - dictSize;
 
        const BYTE * const dictEnd = (const BYTE *)dictStart + dictSize;
-       const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
-       const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
+       static const unsigned int dec32table[] = { 0, 1, 2, 1, 4, 4, 4, 4 };
+       static const int dec64table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
 
        const int safeDecode = (endOnInput == endOnInputSize);
        const int checkOffset = ((safeDecode) && (dictSize < (int)(64 * KB)));
index 6710b83ce72ed094113a23fab890b94e43fe1151..4edefd2f540c5946d3b7fa8a1ca516166597b1c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  lzodefs.h -- architecture, OS and compiler specific defines
  *
index e35fc877189302fb880b6339cf8f71ce9668d201..94dd72ccaa7f86235fa3942e4cb734320d6494dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/bug.h>
 #include <linux/bitmap.h>
index 019a68c9014427e9e7e3394062dcbe76003fa760..d5874a7f5ff9792e2e068ee370719c93f90a6239 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # MPI multiprecision maths library (from gpg)
 #
index 148fc6e99ef63b351977bda6a3b4835e9d24083f..af525353395d679001d98f73d1411e2d0dbbecda 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/string.h>
 #include <linux/if_ether.h>
 #include <linux/ctype.h>
index 927c2f19f119e4eb4f21b02987db34e3edc97fa8..3d8295c8550532cea0a6a50409deed23c8a2026b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NETLINK      Netlink attributes
  *
index 0bc0a3535a8acb6e66c7235c934beadf49262194..46e4c749e4eba64da193d0e1f221fa65eee4802a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  NMI backtrace support
  *
index e42a5bf44d33074b4e8400096ea5a310a8edb0e4..3aa454c54c0de676be2d10cd62603d30d88f3253 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/nodemask.h>
 #include <linux/module.h>
 #include <linux/random.h>
index 99b3b6fc470b646bd1740f1f0b05c358d7176de3..fafff5f2ac45b9935427b9272bb284e375e6b789 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/atomic.h>
 #include <linux/debugfs.h>
 #include <linux/notifier.h>
index 05c8604627eb0ae085913a91a17013604e83f359..bfb7420d0de33b118f4dbf1aacbd624f60b45cc5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/once.h>
index 3bf4a9984f4cb094b7d74550be1897c20ac292a6..c72577e472f2f2929f825b0c105a237f54c42971 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Fast batching percpu counters.
  */
index a93adf6dcfb27114950f3403c7d59962213c2cac..4add700ddfe32bc6d86913fd45f2af884d5ace6d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
 
 raid6_pq-y     += algos.o recov.o tables.o int1.o int2.o int4.o \
index b042dac826ccf1650d576c2a132ddd9f458778e2..179eec900cea494f2d2d89a9a4273f0a960764cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * RAID-6 data recovery in dual failure mode based on the XC instruction.
  *
index 7b45191a655f6e6a92efd742c7e3341b3e3d7afa..140fa8bb5c2352daccbd51203fe3517cc02ee07f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * raid6_vx$#.c
  *
index 2c7b60edea049f06b5de9219cbdc5313d8fad79c..be1010bdc43586528352dbb84010ea76cf6811a0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # This is a simple Makefile to test some of the RAID-6 code
 # from userspace.
index fa594b1140e648899410d15920ea5705d7202661..0a90cb0e0fb65f8480c398a7d2e0b42d1c6ef885 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is a maximally equidistributed combined Tausworthe generator
  * based on code from GNU Scientific Library 1.5 (30 Jun 2004)
index 08f8043cac619d4dc59efda9aa2830514ba1c199..d01f4713523904b6c1da5022eb273f227b129095 100644 (file)
@@ -48,7 +48,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
        if (time_is_before_jiffies(rs->begin + rs->interval)) {
                if (rs->missed) {
                        if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
-                               pr_warn("%s: %d callbacks suppressed\n", func, rs->missed);
+                               printk_deferred(KERN_WARNING
+                                               "%s: %d callbacks suppressed\n",
+                                               func, rs->missed);
                                rs->missed = 0;
                        }
                }
index f0aa21c2a762415dd07d7bd9c8432d4ebfcbfe48..ba7443677c9057138ed25bb66a725710053c78da 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * rational fractions
  *
index 464152410c5123e191324a4cfb3ca5ea8ff66687..fcb4ce682c6fae37d71aa6138007b51cd0d8a2b3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <asm/div64.h>
 #include <linux/reciprocal_div.h>
index 5d0582a9480c661b97c83b4b0232cb547f5d7d6b..0eb48353abe30164d4ae564aa21bee901fad72c3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Variant of atomic_t specialized for reference counts.
  *
index 707ca5d677c676a599442604d918c215d7709138..ddd7dde87c3ca0db910d67a567f2a68c8d8e847e 100644 (file)
@@ -735,9 +735,9 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
  * rhashtable_walk_start - Start a hash table walk
  * @iter:      Hash table iterator
  *
- * Start a hash table walk.  Note that we take the RCU lock in all
- * cases including when we return an error.  So you must always call
- * rhashtable_walk_stop to clean up.
+ * Start a hash table walk at the current iterator position.  Note that we take
+ * the RCU lock in all cases including when we return an error.  So you must
+ * always call rhashtable_walk_stop to clean up.
  *
  * Returns zero if successful.
  *
@@ -846,7 +846,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
  * rhashtable_walk_stop - Finish a hash table walk
  * @iter:      Hash table iterator
  *
- * Finish a hash table walk.
+ * Finish a hash table walk.  Does not reset the iterator to the start of the
+ * hash table.
  */
 void rhashtable_walk_stop(struct rhashtable_iter *iter)
        __releases(RCU)
index cb18469e1f490066fe36dcc6e3f8127ddc6a98da..11f2ae0f90996ac0463ae712785c0135e3576fb8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * seq_buf.c
  *
index 5a56dfd7b99de98ca47f75ab528dc8e3196efd3e..1d96d2c02b826972f157d4e436dabf521e44e4af 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SHA1 routine optimized to do word accesses rather than byte accesses,
  * and to avoid unnecessary copies into the context array.
index 2fb007be02125a17f4c3b3345e656773d49209ae..835cc6df27764bac804ab5d373a360b526a3501a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * lib/smp_processor_id.c
  *
index 975c6ef6fec753164de34ee7ce5a508105a41794..d6b7a202b0b648ea4b45bd1b979b2562dddbb8f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * A fast, small, non-recursive O(nlog n) sort for the Linux kernel
  *
index 9921dc202db440a0a1b20aa19b85555e634fe3b5..5e8d410a93df5eb569e15815782be2027ec69d6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/lib/string.c
  *
index 7e35fc450c5bb780121cf3e6df0a87abaa740f5b..b53e1b5d80f429e611cd0be58e9ec1079fb68ead 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/export.h>
 #include <linux/kasan-checks.h>
index a5f567747cedaf411b09a002f2ec242ca57ee571..60d0bbda8f5e581178719e9122b0e9f19b0876a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/export.h>
 #include <linux/uaccess.h>
index 2c6cd1b5c3ea86668bc73196c4aa980c724ad34c..1a7077f20eae4079a25aae3c4d6703edaffd8d65 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ptrace.h>
 #include <linux/sched.h>
 #include <linux/sched/task_stack.h>
index 5696a35184e4a3a086573c6020b9f32fcede5fe2..69557c74ef9f8e4dbe1994dce8d1099456717cf2 100644 (file)
@@ -11,7 +11,7 @@
  * ==========================================================================
  *
  *   A finite state machine consists of n states (struct ts_fsm_token)
- *   representing the pattern as a finite automation. The data is read
+ *   representing the pattern as a finite automaton. The data is read
  *   sequentially on an octet basis. Every state token specifies the number
  *   of recurrences and the type of value accepted which can be either a
  *   specific character or ctype based set of characters. The available
index 632f783e65f1cfef531dba412f0568fd9f7849e8..ffbe66cbb0ed60ce9c602ed3d2dc6e4b643155e3 100644 (file)
@@ -27,7 +27,7 @@
  *
  *   [1] Cormen, Leiserson, Rivest, Stein
  *       Introdcution to Algorithms, 2nd Edition, MIT Press
- *   [2] See finite automation theory
+ *   [2] See finite automaton theory
  */
 
 #include <linux/module.h>
index b2d18d4a53f5a274d73d31bda8cae876ba7ddc34..88f23557edbe16d5a60d691591d4e1981437f7d7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIB_UBSAN_H
 #define _LIB_UBSAN_H
 
index ae8d2491133c9f19b88599999cf14bf0d66fe1c9..d7e06b28de38299ce1a892f8e90b5f0c5d555a28 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ucs2_string.h>
 #include <linux/module.h>
 
index f5d9f08ee032f36a19cafa8a2d83f648d326fd97..15e2e6fb060ef20b35ba8e93f6de932d7db5a0df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/uaccess.h>
 
 /* out-of-line parts */
index c8420d404926d4d7e8a3816a66b06b4257ba9ae8..6bdc1cd15f7614e5f4eb2dba7618ba8a16be2249 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**
  * lib/minmax.c: windowed min/max tracker
  *
index e3ac3aeb533badc264dac11579192acb101a693c..4659b93cba43bbc868bceb606a4e2813528dd332 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux memory manager.
 #
index 9fedb27c6451418035fdf26300fbdf8d9c7fc6c9..6aef64254203d72d0277400e7171a982c2bc06d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  bootmem - A boot-time physical memory allocator and configurator
  *
index c0da318c020e6c6d666ac8cf7cb92b2d4a47ceae..022e52bd83703e50408cc170b5ba91bcdb038aff 100644 (file)
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -460,7 +460,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
 
        trace_cma_alloc(pfn, page, count, align);
 
-       if (ret) {
+       if (ret && !(gfp_mask & __GFP_NOWARN)) {
                pr_info("%s: alloc failed, req-size: %zu pages, ret: %d\n",
                        __func__, count, ret);
                cma_debug_show_areas(cma);
index 49861286279d7dfb52b5643b59557aa0f9341d36..33c0b517733c775a2762996c79198a17c2cf9fa5 100644 (file)
--- a/mm/cma.h
+++ b/mm/cma.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MM_CMA_H__
 #define __MM_CMA_H__
 
index c03ccbc405a066038619361cf995f675dc2efaa1..275df8b5b22e7bdb722e95774a1948d6c69fa4f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * CMA DebugFS Interface
  *
index fb548e4c7bd4b44f426a8e45c5230508c57d36e6..85395dc6eb137f128961a4429ed69b8e030ca816 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/mm/compaction.c
  *
@@ -1999,17 +2000,14 @@ void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
        if (pgdat->kcompactd_max_order < order)
                pgdat->kcompactd_max_order = order;
 
-       /*
-        * Pairs with implicit barrier in wait_event_freezable()
-        * such that wakeups are not missed in the lockless
-        * waitqueue_active() call.
-        */
-       smp_acquire__after_ctrl_dep();
-
        if (pgdat->kcompactd_classzone_idx > classzone_idx)
                pgdat->kcompactd_classzone_idx = classzone_idx;
 
-       if (!waitqueue_active(&pgdat->kcompactd_wait))
+       /*
+        * Pairs with implicit barrier in wait_event_freezable()
+        * such that wakeups are not missed.
+        */
+       if (!wq_has_sleeper(&pgdat->kcompactd_wait))
                return;
 
        if (!kcompactd_node_suitable(pgdat))
index 5715448ab0b53db5d8bd4b64d47706f7deaaf7a6..6726bec731c956e904450a9f67e22fc7be8f049c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mm/debug.c
  *
index 1aef3d562e523524c58ee1fc7edee8259c1cde88..f3b2c9d3ece256a4c2122c2d2df4120e2802c6eb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm_types.h>
 #include <linux/tracepoint.h>
 
index b1dd4a948fc0b3afc375964d23ebcb9f69eaafa3..d04ac1ec05598d64c2acfd7a9b95b4b4a7a81c36 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Provide common bits of early_ioremap() support for architectures needing
  * temporary mappings during boot before ioremap() is available.
index 702f239cd6db534b20276bce62ae1d2176bdb664..ec70d6e4b86d58581f4abdc0aaf1df603f57716d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mm/fadvise.c
  *
index b0fac98cd9388941db02a3985d98b32d37b307dd..8087d976a80936574d6daf999fe86ffc364e259f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/fault-inject.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
index 870971e209670c99a335bc05903f7f12326b9882..594d73fef8b43bae852f4f7ace1e8cfc46b23690 100644 (file)
@@ -620,6 +620,14 @@ int file_check_and_advance_wb_err(struct file *file)
                trace_file_check_and_advance_wb_err(file, old);
                spin_unlock(&file->f_lock);
        }
+
+       /*
+        * We're mostly using this function as a drop in replacement for
+        * filemap_check_errors. Clear AS_EIO/AS_ENOSPC to emulate the effect
+        * that the legacy code would have had on these flags.
+        */
+       clear_bit(AS_EIO, &mapping->flags);
+       clear_bit(AS_ENOSPC, &mapping->flags);
        return err;
 }
 EXPORT_SYMBOL(file_check_and_advance_wb_err);
@@ -2926,9 +2934,15 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from)
         * we're writing.  Either one is a pretty crazy thing to do,
         * so we don't support it 100%.  If this invalidation
         * fails, tough, the write still worked...
+        *
+        * Most of the time we do not need this since dio_complete() will do
+        * the invalidation for us. However there are some file systems that
+        * do not end up with dio_complete() being called, so let's not break
+        * them by removing it completely
         */
-       invalidate_inode_pages2_range(mapping,
-                               pos >> PAGE_SHIFT, end);
+       if (mapping->nrpages)
+               invalidate_inode_pages2_range(mapping,
+                                       pos >> PAGE_SHIFT, end);
 
        if (written > 0) {
                pos += written;
index 72ebec18629c2529fc6d2b6faeb46040adcac611..2f98df0d460eef41f80586544ad98abb66fae60c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/err.h>
index 50b4ca6787f08e75037c81c853bfb5d22b1cbd36..59db3223a5d62a9ea26f506ed3fd9fe6d54d2cf2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * High memory handling common code and variables.
  *
index 269b5df58543e44d6a283c6268036f010aad37c2..1981ed697dabb530b56c9e6b84d9f569428b101c 100644 (file)
@@ -941,6 +941,9 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
                                pmd = pmd_swp_mksoft_dirty(pmd);
                        set_pmd_at(src_mm, addr, src_pmd, pmd);
                }
+               add_mm_counter(dst_mm, MM_ANONPAGES, HPAGE_PMD_NR);
+               atomic_long_inc(&dst_mm->nr_ptes);
+               pgtable_trans_huge_deposit(dst_mm, dst_pmd, pgtable);
                set_pmd_at(dst_mm, addr, dst_pmd, pmd);
                ret = 0;
                goto out_unlock;
index 424b0ef08a60cb616d40e9249e5447287c1705e3..2d2ff5e8bf2bc035eb300ee16dbdaadcdb0279dd 100644 (file)
@@ -3984,6 +3984,9 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
                            unsigned long src_addr,
                            struct page **pagep)
 {
+       struct address_space *mapping;
+       pgoff_t idx;
+       unsigned long size;
        int vm_shared = dst_vma->vm_flags & VM_SHARED;
        struct hstate *h = hstate_vma(dst_vma);
        pte_t _dst_pte;
@@ -4021,13 +4024,24 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
        __SetPageUptodate(page);
        set_page_huge_active(page);
 
+       mapping = dst_vma->vm_file->f_mapping;
+       idx = vma_hugecache_offset(h, dst_vma, dst_addr);
+
        /*
         * If shared, add to page cache
         */
        if (vm_shared) {
-               struct address_space *mapping = dst_vma->vm_file->f_mapping;
-               pgoff_t idx = vma_hugecache_offset(h, dst_vma, dst_addr);
+               size = i_size_read(mapping->host) >> huge_page_shift(h);
+               ret = -EFAULT;
+               if (idx >= size)
+                       goto out_release_nounlock;
 
+               /*
+                * Serialization between remove_inode_hugepages() and
+                * huge_add_to_page_cache() below happens through the
+                * hugetlb_fault_mutex_table that here must be hold by
+                * the caller.
+                */
                ret = huge_add_to_page_cache(page, mapping, idx);
                if (ret)
                        goto out_release_nounlock;
@@ -4036,6 +4050,20 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
        ptl = huge_pte_lockptr(h, dst_mm, dst_pte);
        spin_lock(ptl);
 
+       /*
+        * Recheck the i_size after holding PT lock to make sure not
+        * to leave any page mapped (as page_mapped()) beyond the end
+        * of the i_size (remove_inode_hugepages() is strict about
+        * enforcing that). If we bail out here, we'll also leave a
+        * page in the radix tree in the vm_shared case beyond the end
+        * of the i_size, but remove_inode_hugepages() will take care
+        * of it as soon as we drop the hugetlb_fault_mutex_table.
+        */
+       size = i_size_read(mapping->host) >> huge_page_shift(h);
+       ret = -EFAULT;
+       if (idx >= size)
+               goto out_release_unlock;
+
        ret = -EEXIST;
        if (!huge_pte_none(huge_ptep_get(dst_pte)))
                goto out_release_unlock;
index 975e49f00f34c1b282dee5840740effb9a999bed..f94d5d15ebc07a853cd5b1c5b50d364dfd97d6a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm_types.h>
 #include <linux/rbtree.h>
 #include <linux/rwsem.h>
index 2976a9ee104f9248731dc07c3619e34b79998041..3289db38bc87b600703843369d84b28a55920a55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 KASAN_SANITIZE := n
 UBSAN_SANITIZE_kasan.o := n
 KCOV_INSTRUMENT := n
index 1229298cce646ddc725c4f1ea9d823a0c71e3cd1..c70851a9a6a4b5e8442be287329da105dac59915 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MM_KASAN_KASAN_H
 #define __MM_KASAN_KASAN_H
 
index c01f177a1120a4802fedc63ffc1d9665ea09ec0b..43cb3043311bdab1c302955533d7aee137e5b869 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/mm.h>
index 2d5959c5f7c50469ca3d59da9c62c6c2dd932917..800d64b854ea6695eccf83dee42502bfca74cf45 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/gfp.h>
 #include <linux/mm_types.h>
 #include <linux/mm.h>
index 15dd7415f7b3f1a1b418db0e38b074771d2bec2f..6cb60f46cce55761b0ff9d3523be69a706523972 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1990,6 +1990,7 @@ static void stable_tree_append(struct rmap_item *rmap_item,
  */
 static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
 {
+       struct mm_struct *mm = rmap_item->mm;
        struct rmap_item *tree_rmap_item;
        struct page *tree_page = NULL;
        struct stable_node *stable_node;
@@ -2062,9 +2063,11 @@ static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
        if (ksm_use_zero_pages && (checksum == zero_checksum)) {
                struct vm_area_struct *vma;
 
-               vma = find_mergeable_vma(rmap_item->mm, rmap_item->address);
+               down_read(&mm->mmap_sem);
+               vma = find_mergeable_vma(mm, rmap_item->address);
                err = try_to_merge_one_page(vma, page,
                                            ZERO_PAGE(rmap_item->address));
+               up_read(&mm->mmap_sem);
                /*
                 * In case of failure, the page was not really empty, so we
                 * need to continue. Otherwise we're done.
index 7a40fa2be858acbc79cc79d887c1af575a3d2026..f141f0c80ff338f9c2a5a5244afca23440f9bdc3 100644 (file)
@@ -325,12 +325,12 @@ static int memcg_init_list_lru_node(struct list_lru_node *nlru)
 {
        int size = memcg_nr_cache_ids;
 
-       nlru->memcg_lrus = kmalloc(size * sizeof(void *), GFP_KERNEL);
+       nlru->memcg_lrus = kvmalloc(size * sizeof(void *), GFP_KERNEL);
        if (!nlru->memcg_lrus)
                return -ENOMEM;
 
        if (__memcg_init_list_lru_node(nlru->memcg_lrus, 0, size)) {
-               kfree(nlru->memcg_lrus);
+               kvfree(nlru->memcg_lrus);
                return -ENOMEM;
        }
 
@@ -340,7 +340,7 @@ static int memcg_init_list_lru_node(struct list_lru_node *nlru)
 static void memcg_destroy_list_lru_node(struct list_lru_node *nlru)
 {
        __memcg_destroy_list_lru_node(nlru->memcg_lrus, 0, memcg_nr_cache_ids);
-       kfree(nlru->memcg_lrus);
+       kvfree(nlru->memcg_lrus);
 }
 
 static int memcg_update_list_lru_node(struct list_lru_node *nlru,
@@ -351,12 +351,12 @@ static int memcg_update_list_lru_node(struct list_lru_node *nlru,
        BUG_ON(old_size > new_size);
 
        old = nlru->memcg_lrus;
-       new = kmalloc(new_size * sizeof(void *), GFP_KERNEL);
+       new = kvmalloc(new_size * sizeof(void *), GFP_KERNEL);
        if (!new)
                return -ENOMEM;
 
        if (__memcg_init_list_lru_node(new, old_size, new_size)) {
-               kfree(new);
+               kvfree(new);
                return -ENOMEM;
        }
 
@@ -373,7 +373,7 @@ static int memcg_update_list_lru_node(struct list_lru_node *nlru,
        nlru->memcg_lrus = new;
        spin_unlock_irq(&nlru->lock);
 
-       kfree(old);
+       kvfree(old);
        return 0;
 }
 
index 21261ff0466fb99d1254ee3927dd1730642d5356..375cf32087e4a2da0c42b251a1d5538ffaa1c857 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/mm/madvise.c
  *
@@ -625,18 +626,26 @@ static int madvise_inject_error(int behavior,
 {
        struct page *page;
        struct zone *zone;
+       unsigned int order;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
 
-       for (; start < end; start += PAGE_SIZE <<
-                               compound_order(compound_head(page))) {
+
+       for (; start < end; start += PAGE_SIZE << order) {
                int ret;
 
                ret = get_user_pages_fast(start, 1, 0, &page);
                if (ret != 1)
                        return ret;
 
+               /*
+                * When soft offlining hugepages, after migrating the page
+                * we dissolve it, therefore in the second loop "page" will
+                * no longer be a compound page, and order will be 0.
+                */
+               order = compound_order(compound_head(page));
+
                if (PageHWPoison(page)) {
                        put_page(page);
                        continue;
@@ -749,6 +758,9 @@ madvise_behavior_valid(int behavior)
  *  MADV_DONTFORK - omit this area from child's address space when forking:
  *             typically, to avoid COWing pages pinned by get_user_pages().
  *  MADV_DOFORK - cancel MADV_DONTFORK: no longer omit this area when forking.
+ *  MADV_WIPEONFORK - present the child process with zero-filled memory in this
+ *              range after a fork.
+ *  MADV_KEEPONFORK - undo the effect of MADV_WIPEONFORK
  *  MADV_HWPOISON - trigger memory error handler as if the given memory range
  *             were corrupted by unrecoverable hardware memory failure.
  *  MADV_SOFT_OFFLINE - try to soft-offline the given range of memory.
@@ -769,7 +781,9 @@ madvise_behavior_valid(int behavior)
  *  zero    - success
  *  -EINVAL - start + len < 0, start is not page-aligned,
  *             "behavior" is not a valid value, or application
- *             is attempting to release locked or shared pages.
+ *             is attempting to release locked or shared pages,
+ *             or the specified address range includes file, Huge TLB,
+ *             MAP_SHARED or VMPFNMAP range.
  *  -ENOMEM - addresses in the specified range are not currently
  *             mapped, or are outside the AS of the process.
  *  -EIO    - an I/O error occurred while paging in data.
index 15af3da5af02f6acbccff3551a71461a4f4396d5..661f046ad3181f65eccfd9bf3832e395e27aa226 100644 (file)
@@ -1777,6 +1777,10 @@ static void drain_local_stock(struct work_struct *dummy)
        struct memcg_stock_pcp *stock;
        unsigned long flags;
 
+       /*
+        * The only protection from memory hotplug vs. drain_stock races is
+        * that we always operate on local CPU stock here with IRQ disabled
+        */
        local_irq_save(flags);
 
        stock = this_cpu_ptr(&memcg_stock);
@@ -1821,27 +1825,33 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
        /* If someone's already draining, avoid adding running more workers. */
        if (!mutex_trylock(&percpu_charge_mutex))
                return;
-       /* Notify other cpus that system-wide "drain" is running */
-       get_online_cpus();
+       /*
+        * Notify other cpus that system-wide "drain" is running
+        * We do not care about races with the cpu hotplug because cpu down
+        * as well as workers from this path always operate on the local
+        * per-cpu data. CPU up doesn't touch memcg_stock at all.
+        */
        curcpu = get_cpu();
        for_each_online_cpu(cpu) {
                struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu);
                struct mem_cgroup *memcg;
 
                memcg = stock->cached;
-               if (!memcg || !stock->nr_pages)
+               if (!memcg || !stock->nr_pages || !css_tryget(&memcg->css))
                        continue;
-               if (!mem_cgroup_is_descendant(memcg, root_memcg))
+               if (!mem_cgroup_is_descendant(memcg, root_memcg)) {
+                       css_put(&memcg->css);
                        continue;
+               }
                if (!test_and_set_bit(FLUSHING_CACHED_CHARGE, &stock->flags)) {
                        if (cpu == curcpu)
                                drain_local_stock(&stock->work);
                        else
                                schedule_work_on(cpu, &stock->work);
                }
+               css_put(&memcg->css);
        }
        put_cpu();
-       put_online_cpus();
        mutex_unlock(&percpu_charge_mutex);
 }
 
@@ -5648,7 +5658,8 @@ static void uncharge_batch(const struct uncharge_gather *ug)
 static void uncharge_page(struct page *page, struct uncharge_gather *ug)
 {
        VM_BUG_ON_PAGE(PageLRU(page), page);
-       VM_BUG_ON_PAGE(!PageHWPoison(page) && page_count(page), page);
+       VM_BUG_ON_PAGE(page_count(page) && !is_zone_device_page(page) &&
+                       !PageHWPoison(page) , page);
 
        if (!page->mem_cgroup)
                return;
@@ -5817,21 +5828,6 @@ void mem_cgroup_sk_alloc(struct sock *sk)
        if (!mem_cgroup_sockets_enabled)
                return;
 
-       /*
-        * Socket cloning can throw us here with sk_memcg already
-        * filled. It won't however, necessarily happen from
-        * process context. So the test for root memcg given
-        * the current task's memcg won't help us in this case.
-        *
-        * Respecting the original socket's memcg is a better
-        * decision in this case.
-        */
-       if (sk->sk_memcg) {
-               BUG_ON(mem_cgroup_is_root(sk->sk_memcg));
-               css_get(&sk->sk_memcg->css);
-               return;
-       }
-
        rcu_read_lock();
        memcg = mem_cgroup_from_task(current);
        if (memcg == root_mem_cgroup)
index ec4e15494901665f99329f2ad094cd3ed3ceed2e..a728bed16c206902de6498921a1d130d141ff7b7 100644 (file)
@@ -845,7 +845,7 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
                 * vm_normal_page() so that we do not have to special case all
                 * call site of vm_normal_page().
                 */
-               if (likely(pfn < highest_memmap_pfn)) {
+               if (likely(pfn <= highest_memmap_pfn)) {
                        struct page *page = pfn_to_page(pfn);
 
                        if (is_device_public_page(page)) {
index e882cb6da99425bad30e4017c5feeadacba2e8ce..d4b5f29906b96465207df76897739d2eba518886 100644 (file)
@@ -328,6 +328,7 @@ int __ref __add_pages(int nid, unsigned long phys_start_pfn,
                if (err && (err != -EEXIST))
                        break;
                err = 0;
+               cond_resched();
        }
        vmemmap_populate_print_last();
 out:
@@ -337,7 +338,7 @@ EXPORT_SYMBOL_GPL(__add_pages);
 
 #ifdef CONFIG_MEMORY_HOTREMOVE
 /* find the smallest valid pfn in the range [start_pfn, end_pfn) */
-static int find_smallest_section_pfn(int nid, struct zone *zone,
+static unsigned long find_smallest_section_pfn(int nid, struct zone *zone,
                                     unsigned long start_pfn,
                                     unsigned long end_pfn)
 {
@@ -362,7 +363,7 @@ static int find_smallest_section_pfn(int nid, struct zone *zone,
 }
 
 /* find the biggest valid pfn in the range [start_pfn, end_pfn). */
-static int find_biggest_section_pfn(int nid, struct zone *zone,
+static unsigned long find_biggest_section_pfn(int nid, struct zone *zone,
                                    unsigned long start_pfn,
                                    unsigned long end_pfn)
 {
@@ -550,7 +551,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms,
                return ret;
 
        scn_nr = __section_nr(ms);
-       start_pfn = section_nr_to_pfn(scn_nr);
+       start_pfn = section_nr_to_pfn((unsigned long)scn_nr);
        __remove_zone(zone, start_pfn);
 
        sparse_remove_one_section(zone, ms, map_offset);
index 006ba625c0b8d4edb6b3ed2b20ce307c254b42be..a2af6d58a68fc087feddf1181ecb511bde86cecd 100644 (file)
@@ -1920,8 +1920,11 @@ static struct page *alloc_page_interleave(gfp_t gfp, unsigned order,
        struct page *page;
 
        page = __alloc_pages(gfp, order, nid);
-       if (page && page_to_nid(page) == nid)
-               inc_zone_page_state(page, NUMA_INTERLEAVE_HIT);
+       if (page && page_to_nid(page) == nid) {
+               preempt_disable();
+               __inc_numa_state(page_zone(page), NUMA_INTERLEAVE_HIT);
+               preempt_enable();
+       }
        return page;
 }
 
index 1c0294858527367442c4c3f142e2972451352c5d..c4a23cdae3f0e7cf5d9b87970faa80e7f6f78c59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/mm/mempool.c
  *
index 8eaa4c3a5f65a86bd3f465455960b573b9434273..f53ace709ccd82d207bae22679887c1da1e3b694 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/init.h>
index 6954c1435833133f910a08a9cd8e0e1516084296..1236449b4777be3cf61e8cd68616c2c3faa5fd9f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Memory Migration functionality - linux/mm/migrate.c
  *
@@ -2146,8 +2147,9 @@ static int migrate_vma_collect_hole(unsigned long start,
        unsigned long addr;
 
        for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) {
-               migrate->src[migrate->npages++] = MIGRATE_PFN_MIGRATE;
+               migrate->src[migrate->npages] = MIGRATE_PFN_MIGRATE;
                migrate->dst[migrate->npages] = 0;
+               migrate->npages++;
                migrate->cpages++;
        }
 
index c5687c45c326b3280c7bb7147a5796a8cd80b68d..fc37afe226e65881613e7cd2b5384c521983aef6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/mm/mincore.c
  *
index dfc6f19121768ee85f269a8ddd1d5bc0f7a5b6fe..46af369c13e5de4928c912fec2b5fd6aa87b48d2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/mm/mlock.c
  *
index a51c0a67ea3d3725369c88a23340d2fc745e0e62..4686fdc23bb966223d40a39fa11187f89e582dec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/mm/mmzone.c
  *
index 6d3e2f0822901605aa3554234e3e96838997b0ba..ec39f730a0bfeebcd1d04ec34c5955f48a6f5259 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  mm/mprotect.c
  *
index cfec004c4ff9a95511940039d6975d270bf37996..049470aa1e3eefc88407e9a35f1ca252fd01912d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     mm/mremap.c
  *
index 24e612fefa04dc13eae85af00164d674c0b91940..ef30a429623a2f8191d9364a0c9a8b4aab0ddc8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/mm/msync.c
  *
index 3637809a18d04f9c20d1b00d70687ae1eb00b282..9b02fda0886b8a87152fbdf54eab859899d75195 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  bootmem - A boot-time physical memory allocator and configurator
  *
index 99736e026712c42c73c676c5e1889f86d7d05d53..dee0f75c301337af62156d2ae46d5c5391cc6127 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/ratelimit.h>
 #include <linux/kthread.h>
 #include <linux/init.h>
+#include <linux/mmu_notifier.h>
 
 #include <asm/tlb.h>
 #include "internal.h"
@@ -494,6 +495,21 @@ static bool __oom_reap_task_mm(struct task_struct *tsk, struct mm_struct *mm)
                goto unlock_oom;
        }
 
+       /*
+        * If the mm has notifiers then we would need to invalidate them around
+        * unmap_page_range and that is risky because notifiers can sleep and
+        * what they do is basically undeterministic.  So let's have a short
+        * sleep to give the oom victim some more time.
+        * TODO: we really want to get rid of this ugly hack and make sure that
+        * notifiers cannot block for unbounded amount of time and add
+        * mmu_notifier_invalidate_range_{start,end} around unmap_page_range
+        */
+       if (mm_has_notifiers(mm)) {
+               up_read(&mm->mmap_sem);
+               schedule_timeout_idle(HZ);
+               goto unlock_oom;
+       }
+
        /*
         * MMF_OOM_SKIP is set by exit_mmap when the OOM reaper can't
         * work on the mm anymore. The check for MMF_OOM_SKIP must run
index c841af88836ad63d548a2f007220203e4a8ddf9a..77e4d3c5c57b72dcd7e411a03707c26dc85c7c04 100644 (file)
@@ -1190,7 +1190,7 @@ static void __meminit __init_single_pfn(unsigned long pfn, unsigned long zone,
 }
 
 #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
-static void init_reserved_page(unsigned long pfn)
+static void __meminit init_reserved_page(unsigned long pfn)
 {
        pg_data_t *pgdat;
        int nid, zid;
@@ -5367,6 +5367,7 @@ not_early:
 
                        __init_single_page(page, pfn, zone, nid);
                        set_pageblock_migratetype(page, MIGRATE_MOVABLE);
+                       cond_resched();
                } else {
                        __init_single_pfn(pfn, zone, nid);
                }
index 7c6a63d2c27ff4737afc2f5915edfcffcc356a62..2a8df3ad60a4ecce1b4e4839f1b42033ad759a25 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Lockless hierarchical page accounting & limiting
  *
index 32f18911dedabfa7fc0cda117686f582cc44ebe9..4f0367d472c4922f7a283a9530da63c7f6d9949c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/mmzone.h>
 #include <linux/bootmem.h>
index 4bd03a8d809e9ab2d4044955525ef6c1d28d2f08..0a49374e693194504e715be8e54489f3eb1db2f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/fs.h>
index 21502d341a67c2322054686d8f8adf2267a6ba34..5d882de3fbfd2bf0f94a35d004205ceddc87b817 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/mm/page_io.c
  *
index 757410d9f758a22ca6306b84d00c5929dc3fa79a..44f213935bf68722eb85271520faa6b7581ed3c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/mm/page_isolation.c
  */
index 57abca62d4dba3e8b4302bc19850980e40f7ebcb..4f44b95b9d1e53cb7a8b294f339afea90b885e93 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/debugfs.h>
 #include <linux/mm.h>
 #include <linux/slab.h>
index be19e989ccff51f667c9698c9cb8fea3d5303f8e..e83fd44867deff2bdcdf953329445441eff40f5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/mm.h>
index 6a03946469a99eb535851194f519893a5e8a2d11..d22b84310f6d40903083521fb18a5e858f464d93 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/rmap.h>
 #include <linux/hugetlb.h>
@@ -6,17 +7,6 @@
 
 #include "internal.h"
 
-static inline bool check_pmd(struct page_vma_mapped_walk *pvmw)
-{
-       pmd_t pmde;
-       /*
-        * Make sure we don't re-load pmd between present and !trans_huge check.
-        * We need a consistent view.
-        */
-       pmde = READ_ONCE(*pvmw->pmd);
-       return pmd_present(pmde) && !pmd_trans_huge(pmde);
-}
-
 static inline bool not_found(struct page_vma_mapped_walk *pvmw)
 {
        page_vma_mapped_walk_done(pvmw);
@@ -116,6 +106,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
        pgd_t *pgd;
        p4d_t *p4d;
        pud_t *pud;
+       pmd_t pmde;
 
        /* The only possible pmd mapping has been handled on last iteration */
        if (pvmw->pmd && !pvmw->pte)
@@ -148,7 +139,13 @@ restart:
        if (!pud_present(*pud))
                return false;
        pvmw->pmd = pmd_offset(pud, pvmw->address);
-       if (pmd_trans_huge(*pvmw->pmd) || is_pmd_migration_entry(*pvmw->pmd)) {
+       /*
+        * Make sure the pmd value isn't cached in a register by the
+        * compiler and used as a stale value after we've observed a
+        * subsequent update.
+        */
+       pmde = READ_ONCE(*pvmw->pmd);
+       if (pmd_trans_huge(pmde) || is_pmd_migration_entry(pmde)) {
                pvmw->ptl = pmd_lock(mm, pvmw->pmd);
                if (likely(pmd_trans_huge(*pvmw->pmd))) {
                        if (pvmw->flags & PVMW_MIGRATION)
@@ -167,17 +164,15 @@ restart:
                                                return not_found(pvmw);
                                        return true;
                                }
-                       } else
-                               WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!");
+                       }
                        return not_found(pvmw);
                } else {
                        /* THP pmd was split under us: handle on pte level */
                        spin_unlock(pvmw->ptl);
                        pvmw->ptl = NULL;
                }
-       } else {
-               if (!check_pmd(pvmw))
-                       return false;
+       } else if (!pmd_present(pmde)) {
+               return false;
        }
        if (!map_pte(pvmw))
                goto next_pte;
index 1a41979654150f05514cd25f0da685fe397f1104..8bd4afa83cb89f31ccf823c751cc081dd583a263 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/sched.h>
index 7065faf74b46b20e5f9647cd09d228ad307d711f..b1739dc06b73a8458199827b7c00027ef56165ae 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MM_PERCPU_INTERNAL_H
 #define _MM_PERCPU_INTERNAL_H
 
index 6142484e88f79c3e946b30de136a2886c075ffe7..7a58460bfd27a303c7ab4d3c4f10abac02c15603 100644 (file)
@@ -73,7 +73,7 @@ static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk,
                     last_alloc + 1 : 0;
 
        as_len = 0;
-       start = chunk->start_offset;
+       start = chunk->start_offset / PCPU_MIN_ALLOC_SIZE;
 
        /*
         * If a bit is set in the allocation map, the bound_map identifies
index 59d44d61f5f198b26be07ff264395a6b30cc091d..a0e0c82c1e4cd22324e87a86a5df7301f35b8a83 100644 (file)
@@ -353,6 +353,8 @@ static void pcpu_next_md_free_region(struct pcpu_chunk *chunk, int *bit_off,
                                        block->contig_hint_start);
                        return;
                }
+               /* reset to satisfy the second predicate above */
+               block_off = 0;
 
                *bits = block->right_free;
                *bit_off = (i + 1) * PCPU_BITMAP_BLOCK_BITS - block->right_free;
@@ -407,6 +409,8 @@ static void pcpu_next_fit_region(struct pcpu_chunk *chunk, int alloc_bits,
                        *bit_off = pcpu_block_off_to_off(i, block->first_free);
                        return;
                }
+               /* reset to satisfy the second predicate above */
+               block_off = 0;
 
                *bit_off = ALIGN(PCPU_BITMAP_BLOCK_BITS - block->right_free,
                                 align);
@@ -1325,7 +1329,9 @@ static struct pcpu_chunk *pcpu_chunk_addr_search(void *addr)
  * @gfp: allocation flags
  *
  * Allocate percpu area of @size bytes aligned at @align.  If @gfp doesn't
- * contain %GFP_KERNEL, the allocation is atomic.
+ * contain %GFP_KERNEL, the allocation is atomic. If @gfp has __GFP_NOWARN
+ * then no warning will be triggered on invalid or failed allocation
+ * requests.
  *
  * RETURNS:
  * Percpu pointer to the allocated area on success, NULL on failure.
@@ -1333,10 +1339,11 @@ static struct pcpu_chunk *pcpu_chunk_addr_search(void *addr)
 static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved,
                                 gfp_t gfp)
 {
+       bool is_atomic = (gfp & GFP_KERNEL) != GFP_KERNEL;
+       bool do_warn = !(gfp & __GFP_NOWARN);
        static int warn_limit = 10;
        struct pcpu_chunk *chunk;
        const char *err;
-       bool is_atomic = (gfp & GFP_KERNEL) != GFP_KERNEL;
        int slot, off, cpu, ret;
        unsigned long flags;
        void __percpu *ptr;
@@ -1357,7 +1364,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved,
 
        if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE ||
                     !is_power_of_2(align))) {
-               WARN(true, "illegal size (%zu) or align (%zu) for percpu allocation\n",
+               WARN(do_warn, "illegal size (%zu) or align (%zu) for percpu allocation\n",
                     size, align);
                return NULL;
        }
@@ -1478,7 +1485,7 @@ fail_unlock:
 fail:
        trace_percpu_alloc_percpu_fail(reserved, is_atomic, size, align);
 
-       if (!is_atomic && warn_limit) {
+       if (!is_atomic && do_warn && warn_limit) {
                pr_warn("allocation failed, size=%zu align=%zu atomic=%d, %s\n",
                        size, align, is_atomic, err);
                dump_stack();
@@ -1503,7 +1510,9 @@ fail:
  *
  * Allocate zero-filled percpu area of @size bytes aligned at @align.  If
  * @gfp doesn't contain %GFP_KERNEL, the allocation doesn't block and can
- * be called from any context but is a lot more likely to fail.
+ * be called from any context but is a lot more likely to fail. If @gfp
+ * has __GFP_NOWARN then no warning will be triggered on invalid or failed
+ * allocation requests.
  *
  * RETURNS:
  * Percpu pointer to the allocated area on success, NULL on failure.
index 1175f6a24fdb09d49af7ab93061b56b527d554a1..1e4ee763c1909d472c3d4d485cbd9baeea9d22bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  mm/pgtable-generic.c
  *
index daf6ff6e199a5cbe129a387c2b319c06d62486bc..5e98ac78e410de992c2792b85c1d0b085313da7c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Quicklist support.
  *
index 6bb4deb12e78b8e3724c40446069e2cd0731b4a4..d908c8769b48478b6ba738b5053f0e25a70c0732 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/uaccess.h>
 #include <asm/sections.h>
 
-const int rodata_test_data = 0xC3;
+static const int rodata_test_data = 0xC3;
 
 void rodata_test(void)
 {
index 04dec48c3ed7a12af3fef4958e928d0ddc31b64e..b7095884fd93fa957fa25f40e2bc8c4c6cf1efa8 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/mm/slab.c
  * Written by Mark Hemment, 1996/97.
index 073362816acc8dd4914e610e6a56e2fdb3295f2a..028cdc7df67ec9e08a683ba27e64b17b19e7612e 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MM_SLAB_H
 #define MM_SLAB_H
 /*
index 904a83be82de81a24a73adfac8e573db32f7118a..0d7fe71ff5e4286fad615cd7ff071b1188846256 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Slab allocator functions that are independent of the allocator strategy
  *
@@ -165,9 +166,9 @@ static int init_memcg_params(struct kmem_cache *s,
        if (!memcg_nr_cache_ids)
                return 0;
 
-       arr = kzalloc(sizeof(struct memcg_cache_array) +
-                     memcg_nr_cache_ids * sizeof(void *),
-                     GFP_KERNEL);
+       arr = kvzalloc(sizeof(struct memcg_cache_array) +
+                      memcg_nr_cache_ids * sizeof(void *),
+                      GFP_KERNEL);
        if (!arr)
                return -ENOMEM;
 
@@ -178,15 +179,23 @@ static int init_memcg_params(struct kmem_cache *s,
 static void destroy_memcg_params(struct kmem_cache *s)
 {
        if (is_root_cache(s))
-               kfree(rcu_access_pointer(s->memcg_params.memcg_caches));
+               kvfree(rcu_access_pointer(s->memcg_params.memcg_caches));
+}
+
+static void free_memcg_params(struct rcu_head *rcu)
+{
+       struct memcg_cache_array *old;
+
+       old = container_of(rcu, struct memcg_cache_array, rcu);
+       kvfree(old);
 }
 
 static int update_memcg_params(struct kmem_cache *s, int new_array_size)
 {
        struct memcg_cache_array *old, *new;
 
-       new = kzalloc(sizeof(struct memcg_cache_array) +
-                     new_array_size * sizeof(void *), GFP_KERNEL);
+       new = kvzalloc(sizeof(struct memcg_cache_array) +
+                      new_array_size * sizeof(void *), GFP_KERNEL);
        if (!new)
                return -ENOMEM;
 
@@ -198,7 +207,7 @@ static int update_memcg_params(struct kmem_cache *s, int new_array_size)
 
        rcu_assign_pointer(s->memcg_params.memcg_caches, new);
        if (old)
-               kfree_rcu(old, rcu);
+               call_rcu(&old->rcu, free_memcg_params);
        return 0;
 }
 
index a8bd6fa11a66fae671132d2a17eae201751a5093..10249160b693dd63d4322665fee01f64de5475e3 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SLOB Allocator: Simple List Of Blocks
  *
index 163352c537ab63fb8dec4be269106c3100f86560..1efbb812303748ddf77d2bc3d987876c06ca824e 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SLUB: A slab allocator that limits cache line use instead of queuing
  * objects in per cpu and per node lists.
index d1a39b8051e01b9f979ad93b28bf0295d7a2cea3..478ce6d4a2c4e77141967e82bacaa7b3661e4d34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Virtual Memory Map support
  *
index 83b3bf6461af556698c457627b0bc732725a0300..4900707ae146cf73c1c9ca4d01bd63a9dfc27c8b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sparse memory mappings.
  */
index 9295ae960d6680165f67db4405698c3b48e3b84e..a77d68f2c1b61de1bc8102656e7e482a442963b1 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -575,7 +575,7 @@ static void lru_lazyfree_fn(struct page *page, struct lruvec *lruvec,
                            void *arg)
 {
        if (PageLRU(page) && PageAnon(page) && PageSwapBacked(page) &&
-           !PageUnevictable(page)) {
+           !PageSwapCache(page) && !PageUnevictable(page)) {
                bool active = PageActive(page);
 
                del_page_from_lru_list(page, lruvec,
@@ -665,7 +665,7 @@ void deactivate_file_page(struct page *page)
 void mark_page_lazyfree(struct page *page)
 {
        if (PageLRU(page) && PageAnon(page) && PageSwapBacked(page) &&
-           !PageUnevictable(page)) {
+           !PageSwapCache(page) && !PageUnevictable(page)) {
                struct pagevec *pvec = &get_cpu_var(lru_lazyfree_pvecs);
 
                get_page(page);
index fcd2740f4ed7e6623d62188cf40c7ce406af9630..45affaef3bc6932c80cfad1fb68387304137ecc7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/swap_cgroup.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
index 13a174006b91234c395d186e6bc9e77319470be0..d81cfc5a43d5083c4d3eb7273bcf10e606c2eb79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Manage cache of swap slots to be used for and returned from
  * swap.
index 71ce2d1ccbf7357238306d5e900a8bee7944e1cb..326439428daffd6c1da5e5cd5b50652ead47568d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/mm/swap_state.c
  *
@@ -39,10 +40,6 @@ struct address_space *swapper_spaces[MAX_SWAPFILES];
 static unsigned int nr_swapper_spaces[MAX_SWAPFILES];
 bool swap_vma_readahead = true;
 
-#define SWAP_RA_MAX_ORDER_DEFAULT      3
-
-static int swap_ra_max_order = SWAP_RA_MAX_ORDER_DEFAULT;
-
 #define SWAP_RA_WIN_SHIFT      (PAGE_SHIFT / 2)
 #define SWAP_RA_HITS_MASK      ((1UL << SWAP_RA_WIN_SHIFT) - 1)
 #define SWAP_RA_HITS_MAX       SWAP_RA_HITS_MASK
@@ -242,6 +239,17 @@ int add_to_swap(struct page *page)
                 * clear SWAP_HAS_CACHE flag.
                 */
                goto fail;
+       /*
+        * Normally the page will be dirtied in unmap because its pte should be
+        * dirty. A special case is MADV_FREE page. The page'e pte could have
+        * dirty bit cleared but the page's SwapBacked bit is still set because
+        * clearing the dirty bit and SwapBacked bit has no lock protected. For
+        * such page, unmap will not set dirty bit for it, so page reclaim will
+        * not write the page out. This can cause data corruption when the page
+        * is swap in later. Always setting the dirty bit for the page solves
+        * the problem.
+        */
+       set_page_dirty(page);
 
        return 1;
 
@@ -653,6 +661,13 @@ struct page *swap_readahead_detect(struct vm_fault *vmf,
        pte_t *tpte;
 #endif
 
+       max_win = 1 << min_t(unsigned int, READ_ONCE(page_cluster),
+                            SWAP_RA_ORDER_CEILING);
+       if (max_win == 1) {
+               swap_ra->win = 1;
+               return NULL;
+       }
+
        faddr = vmf->address;
        entry = pte_to_swp_entry(vmf->orig_pte);
        if ((unlikely(non_swap_entry(entry))))
@@ -661,12 +676,6 @@ struct page *swap_readahead_detect(struct vm_fault *vmf,
        if (page)
                return page;
 
-       max_win = 1 << READ_ONCE(swap_ra_max_order);
-       if (max_win == 1) {
-               swap_ra->win = 1;
-               return NULL;
-       }
-
        fpfn = PFN_DOWN(faddr);
        swap_ra_info = GET_SWAP_RA_VAL(vma);
        pfn = PFN_DOWN(SWAP_RA_ADDR(swap_ra_info));
@@ -775,32 +784,8 @@ static struct kobj_attribute vma_ra_enabled_attr =
        __ATTR(vma_ra_enabled, 0644, vma_ra_enabled_show,
               vma_ra_enabled_store);
 
-static ssize_t vma_ra_max_order_show(struct kobject *kobj,
-                                    struct kobj_attribute *attr, char *buf)
-{
-       return sprintf(buf, "%d\n", swap_ra_max_order);
-}
-static ssize_t vma_ra_max_order_store(struct kobject *kobj,
-                                     struct kobj_attribute *attr,
-                                     const char *buf, size_t count)
-{
-       int err, v;
-
-       err = kstrtoint(buf, 10, &v);
-       if (err || v > SWAP_RA_ORDER_CEILING || v <= 0)
-               return -EINVAL;
-
-       swap_ra_max_order = v;
-
-       return count;
-}
-static struct kobj_attribute vma_ra_max_order_attr =
-       __ATTR(vma_ra_max_order, 0644, vma_ra_max_order_show,
-              vma_ra_max_order_store);
-
 static struct attribute *swap_attrs[] = {
        &vma_ra_enabled_attr.attr,
-       &vma_ra_max_order_attr.attr,
        NULL,
 };
 
index bf91dc9e7a791d38b28ab84f10b57892fc0af9dc..e47a21e64764507d65b04285971c3b34fb327a07 100644 (file)
@@ -2869,6 +2869,7 @@ static struct swap_info_struct *alloc_swap_info(void)
        p->flags = SWP_USED;
        spin_unlock(&swap_lock);
        spin_lock_init(&p->lock);
+       spin_lock_init(&p->cont_lock);
 
        return p;
 }
@@ -3545,6 +3546,7 @@ int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask)
        head = vmalloc_to_page(si->swap_map + offset);
        offset &= ~PAGE_MASK;
 
+       spin_lock(&si->cont_lock);
        /*
         * Page allocation does not initialize the page's lru field,
         * but it does always reset its private field.
@@ -3564,7 +3566,7 @@ int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask)
                 * a continuation page, free our allocation and use this one.
                 */
                if (!(count & COUNT_CONTINUED))
-                       goto out;
+                       goto out_unlock_cont;
 
                map = kmap_atomic(list_page) + offset;
                count = *map;
@@ -3575,11 +3577,13 @@ int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask)
                 * free our allocation and use this one.
                 */
                if ((count & ~COUNT_CONTINUED) != SWAP_CONT_MAX)
-                       goto out;
+                       goto out_unlock_cont;
        }
 
        list_add_tail(&page->lru, &head->lru);
        page = NULL;                    /* now it's attached, don't free it */
+out_unlock_cont:
+       spin_unlock(&si->cont_lock);
 out:
        unlock_cluster(ci);
        spin_unlock(&si->lock);
@@ -3604,6 +3608,7 @@ static bool swap_count_continued(struct swap_info_struct *si,
        struct page *head;
        struct page *page;
        unsigned char *map;
+       bool ret;
 
        head = vmalloc_to_page(si->swap_map + offset);
        if (page_private(head) != SWP_CONTINUED) {
@@ -3611,6 +3616,7 @@ static bool swap_count_continued(struct swap_info_struct *si,
                return false;           /* need to add count continuation */
        }
 
+       spin_lock(&si->cont_lock);
        offset &= ~PAGE_MASK;
        page = list_entry(head->lru.next, struct page, lru);
        map = kmap_atomic(page) + offset;
@@ -3631,8 +3637,10 @@ static bool swap_count_continued(struct swap_info_struct *si,
                if (*map == SWAP_CONT_MAX) {
                        kunmap_atomic(map);
                        page = list_entry(page->lru.next, struct page, lru);
-                       if (page == head)
-                               return false;   /* add count continuation */
+                       if (page == head) {
+                               ret = false;    /* add count continuation */
+                               goto out;
+                       }
                        map = kmap_atomic(page) + offset;
 init_map:              *map = 0;               /* we didn't zero the page */
                }
@@ -3645,7 +3653,7 @@ init_map:         *map = 0;               /* we didn't zero the page */
                        kunmap_atomic(map);
                        page = list_entry(page->lru.prev, struct page, lru);
                }
-               return true;                    /* incremented */
+               ret = true;                     /* incremented */
 
        } else {                                /* decrementing */
                /*
@@ -3671,8 +3679,11 @@ init_map:                *map = 0;               /* we didn't zero the page */
                        kunmap_atomic(map);
                        page = list_entry(page->lru.prev, struct page, lru);
                }
-               return count == COUNT_CONTINUED;
+               ret = count == COUNT_CONTINUED;
        }
+out:
+       spin_unlock(&si->cont_lock);
+       return ret;
 }
 
 /*
index 7ffa0ee341b5dab136b34d4d79c54a040569ada0..db7596eb6132e8118b73e9c851563cde4a6d376a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2014 Davidlohr Bueso.
  */
index 8a43db6284ebcb9c40dfc3532d454c783ea61412..673942094328a710b059b2b50e149ce7eb3d5f11 100644 (file)
@@ -1695,11 +1695,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
        for (i = 0; i < area->nr_pages; i++) {
                struct page *page;
 
-               if (fatal_signal_pending(current)) {
-                       area->nr_pages = i;
-                       goto fail_no_warn;
-               }
-
                if (node == NUMA_NO_NODE)
                        page = alloc_page(alloc_mask|highmem_mask);
                else
@@ -1723,7 +1718,6 @@ fail:
        warn_alloc(gfp_mask, NULL,
                          "vmalloc: allocation failure, allocated %ld of %ld bytes",
                          (area->nr_pages*PAGE_SIZE), area->size);
-fail_no_warn:
        vfree(area->addr);
        return NULL;
 }
index 13d711dd87766a71a653c2c9e3efcba80fef3314..eb2f0315b8c0e9549b98e51c2d5e5cd45b9920e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/mm/vmscan.c
  *
index 7119cd745ace859935bc97b9079b6e43ad417d54..b997c9de28f6c4074f1ebc1e2f480bbae8ad1df9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Workingset detection
  *
index 486550df32be8589eea953d739ea30e62876b702..b2ba2ba585f3c0ccb422531ae9dc26909ae463d4 100644 (file)
@@ -250,6 +250,7 @@ static void __release_z3fold_page(struct z3fold_header *zhdr, bool locked)
 
        WARN_ON(!list_empty(&zhdr->buddy));
        set_bit(PAGE_STALE, &page->private);
+       clear_bit(NEEDS_COMPACTING, &page->private);
        spin_lock(&pool->lock);
        if (!list_empty(&page->lru))
                list_del(&page->lru);
@@ -303,7 +304,6 @@ static void free_pages_work(struct work_struct *w)
                list_del(&zhdr->buddy);
                if (WARN_ON(!test_bit(PAGE_STALE, &page->private)))
                        continue;
-               clear_bit(NEEDS_COMPACTING, &page->private);
                spin_unlock(&pool->stale_lock);
                cancel_work_sync(&zhdr->work);
                free_z3fold_page(page);
@@ -624,10 +624,8 @@ lookup:
         * stale pages list. cancel_work_sync() can sleep so we must make
         * sure it won't be called in case we're in atomic context.
         */
-       if (zhdr && (can_sleep || !work_pending(&zhdr->work) ||
-           !unlikely(work_busy(&zhdr->work)))) {
+       if (zhdr && (can_sleep || !work_pending(&zhdr->work))) {
                list_del(&zhdr->buddy);
-               clear_bit(NEEDS_COMPACTING, &page->private);
                spin_unlock(&pool->stale_lock);
                if (can_sleep)
                        cancel_work_sync(&zhdr->work);
@@ -875,16 +873,18 @@ static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
                                goto next;
                }
 next:
+               spin_lock(&pool->lock);
                if (test_bit(PAGE_HEADLESS, &page->private)) {
                        if (ret == 0) {
+                               spin_unlock(&pool->lock);
                                free_z3fold_page(page);
                                return 0;
                        }
                } else if (kref_put(&zhdr->refcount, release_z3fold_page)) {
                        atomic64_dec(&pool->pages_nr);
+                       spin_unlock(&pool->lock);
                        return 0;
                }
-               spin_lock(&pool->lock);
 
                /*
                 * Add to the beginning of LRU.
index a67caee119290c6b6ebf090ac39fbd6845f3d476..53cf446ce2e3a5666b2b39b7a1084db69ca5e0c0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __6LOWPAN_I_H
 #define __6LOWPAN_I_H
 
index 12d131ab2324f1ebf4d5d122341f81333a3c611c..2247b96dbc7504a57c8c48b1df9d69564f6f45bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_6LOWPAN) += 6lowpan.o
 
 6lowpan-y := core.o iphc.o nhc.o ndisc.o
index 8030414001361bbdd7e3bac62d468f1032f61fda..67951c40734ba20df3724973d4997257f27e2ef7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __6LOWPAN_NHC_H
 #define __6LOWPAN_NHC_H
 
index 37e654d6615e0e8cd2a9000e9634c57221f6a19d..19406a87bdaa6033d1d34ee6e5b1bfc90d7893b5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux 802.x protocol layers.
 #
index 7bc8db08d7efc16e48f1b952de302e644062e29d..9b703454b93ec2f4d0710ddec86d94bcfd223c14 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux VLAN layer.
 #
index df8bd65dd370e225c8e410202d8130b9857aac5d..0e7afdf86127d051297f907c928cf7395dbf0549 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BEN_VLAN_802_1Q_INC__
 #define __BEN_VLAN_802_1Q_INC__
 
index e2ed69850489bb79a6a055ee3264456a31acee3e..64aa9f755e1d251e19f1b713acfc163318a9b57d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/if_vlan.h>
@@ -21,6 +22,12 @@ bool vlan_do_receive(struct sk_buff **skbp)
        if (unlikely(!skb))
                return false;
 
+       if (unlikely(!(vlan_dev->flags & IFF_UP))) {
+               kfree_skb(skb);
+               *skbp = NULL;
+               return false;
+       }
+
        skb->dev = vlan_dev;
        if (unlikely(skb->pkt_type == PACKET_OTHERHOST)) {
                /* Our lower layer thinks this is not local, let's make sure.
index 8838a2e92eb696c2ce199692bc2d87856d4a109d..48cd4b4784e86639db9ea6417df3b2156b40269e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BEN_VLAN_PROC_INC__
 #define __BEN_VLAN_PROC_INC__
 
index 697ea7caf46605d2b015200fb1dd126c92caaa30..c0486cfc85d93b8ebb8db58e89e6fbecfffdf279 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NET_9P) := 9pnet.o
 obj-$(CONFIG_NET_9P_XEN) += 9pnet_xen.o
 obj-$(CONFIG_NET_9P_VIRTIO) += 9pnet_virtio.o
index ae2fe2283d2f728aa93df9ebf0ea46592eb9c757..14fede520840e25aa2db28c5d1aeb02a8fc1f2d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the linux networking.
 #
index e4158b8b926d39c725e6fc1b644360e5fe27f965..284c8e585533a2297b0fa9bf0196c3396d4210f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Moved here from drivers/net/net_init.c, which is:
  *     Written 1993,1994,1995 by Donald Becker.
index ebb864361f7a27a713f2dc14194787346557b320..c744a853fa5f7eeee06910e909dd8fa4980db3ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem.
  *
index cc50bd1ff1decba15307628aaa831c879ab10ef1..bfec0f2d83b5c39fdfaf8a7e73a48630a6ac59bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ATM Protocol Families.
 #
index dcda35c66f152015d99e916e4c869637c2ecd08a..0530b63f509abcfd0c10196ecd7a3272841ed8c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/addr.c - Local ATM address registry */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 6837e9e7eb13ff3c7d1f84217a1ce54226667a34..da3f848411a04a8d73ff3dcf054ed5e5644296d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/addr.h - Local ATM address registry */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 876fbe83e2e4db5ded907ea9938c435edc059e0c..a30b83c1cb3fc89ca7c2477fa45c0733a5f164c0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/atm_misc.c - Various functions for use by ATM drivers */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL ICA */
index 350bf62b2ae30023b251070544781328dbd30220..5d2fed9f5710f5c4a35298ead90144cb10a53693 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ATM driver model support. */
 
 #include <linux/kernel.h>
index 959436b871822d0aad8769de9ee0f81e78cc1bfe..d9d583712a91000fff45dfb543e8ece8d8bf766b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/common.h - ATM sockets (common part for PVC and SVC) */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index bbd3b639992e7e1b8bd4fb0e679c17bf2c96bd4d..2ff0e5e470e3d43647bdd6a3b30bdc87bfbf2511 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* ATM ioctl handling */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 4149db1b7885127db5a3518bf5c944ab5ba9728f..be0e2667bd8c3f5474771a20de2b138d90523d62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Lan Emulation client header file
  *
index d923f53812a317c5f049e360bb95594eabbf78e8..1205d8792d289d876b061c755fb1a346a8a981b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Lec arp cache
  *
index cfc7b745aa913a451a4790f98e47654e55ffac18..454abd07651ad87250a71de2dcda9d5441add8da 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MPC_H_
 #define _MPC_H_
 
index 4ccaa16b1eb10fcaad0e409f397b0187e2411e78..e01450bb32d62e36a9bdeabf1ad872c7615329ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <linux/atmmpc.h>
 #include <linux/slab.h>
index 30fe34841cedde62d7093b72670026df7c9cb22a..6a266669ebf400bc17c54f54c6805d9c14809494 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MPOA_CACHES_H
 #define MPOA_CACHES_H
 
index 2df34eb5d65f4c8a9b190fe7eea6f62bfae0a484..8a0c17e1c2036f03431584a1a48479cd99ecca7e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
 
 #ifdef CONFIG_PROC_FS
index 4caca2a90ec4a94fe7819f6b9cfe56b22cb20020..642f9272ab95d565a8b2170bc37a44756c45acd1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/proc.c - ATM /proc interface
  *
  * Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA
index acdfc856222dbde8499082e2ea5cb5a73ffa3584..18d4d008bac330f7aef5138f30a1cc0ac7b5c742 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/protocols.h - ATM protocol handler entry points */
 
 /* Written 1995-1997 by Werner Almesberger, EPFL LRC */
index 040207ec399fb45f5ac317c89f116d3020c8705d..e1140b3bdcaa1984694b5b753732f4cb20cd1a6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/pvc.c - ATM PVC sockets */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 821c0797553daf870d3b9656dccb820506dc1ebc..ee10e8d46185173067f459aa5efdf5a77f8f9f06 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/raw.c - Raw AAL0 and AAL5 transports */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 918244757b7dd0e62e6dc395b0bc5b54231e0d59..bada395ecdb18f28c69414f019e2ad1b6bfe4531 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/resources.c - Statically allocated resources */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 521431e305073acc8c418c56317c09bb13b4731d..048232e4d4c6766cb2c5d63c6830ab6bd9525483 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/resources.h - ATM-related resources */
 
 /* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
index 0a20f6e953ac94136a3cbd5995ca6ea061ec5959..6c11cdf4dd4ce4737dd38bcceccc43dfd272c338 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/signaling.c - ATM signaling */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 08b2a69cc57273acee42a17b140195875baab94b..2df8220f7ab55f7ab9548b7164a4ebc1588cc448 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* net/atm/signaling.h - ATM signaling */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 5589de7086af4eca7634e786918600a81cf6b09c..c458adcbc1770d8b2cf1d2e4352cbb1698d894b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* net/atm/svc.c - ATM SVC sockets */
 
 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
index 43c46d2cafb6567672555ac977d0486066bc07f7..2e53affc85685556a0fd39f7dccce62d024d6fc2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux AX.25 layer.
 #
index c18115d22f00be37f68d9bbdbb04f626de6cf3c4..db82a40875e8da3c9ad39881046d27bd8f0ee596 100644 (file)
@@ -126,14 +126,4 @@ config BT_DEBUGFS
          Provide extensive information about internal Bluetooth states
          in debugfs.
 
-config BT_LEGACY_IOCTL
-       bool "Enable legacy ioctl interfaces"
-       depends on BT && BT_BREDR
-       default y
-       help
-         Enable support for legacy ioctl interfaces.  This is only needed
-         for old and deprecated applications using direct ioctl calls for
-         controller management.  Since Linux 3.4 all configuration and
-         setup is done via mgmt interface and this is no longer needed.
-
 source "drivers/bluetooth/Kconfig"
index 5d0a113e2e4049e6043099ddcf1fdd50c22ce0ab..fda41c0b478189767ba52e52164e8c61354d24f3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Bluetooth subsystem.
 #
index 0bad296fe0af970f5989b8a121039b99863088b9..65d734c165bd6368b8607d0b5078d345b5e642a8 100644 (file)
@@ -878,7 +878,6 @@ static int hci_sock_release(struct socket *sock)
        return 0;
 }
 
-#ifdef CONFIG_BT_LEGACY_IOCTL
 static int hci_sock_blacklist_add(struct hci_dev *hdev, void __user *arg)
 {
        bdaddr_t bdaddr;
@@ -1050,7 +1049,6 @@ done:
        release_sock(sk);
        return err;
 }
-#endif
 
 static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
                         int addr_len)
@@ -1971,11 +1969,7 @@ static const struct proto_ops hci_sock_ops = {
        .getname        = hci_sock_getname,
        .sendmsg        = hci_sock_sendmsg,
        .recvmsg        = hci_sock_recvmsg,
-#ifdef CONFIG_BT_LEGACY_IOCTL
        .ioctl          = hci_sock_ioctl,
-#else
-       .ioctl          = sock_no_ioctl,
-#endif
        .poll           = datagram_poll,
        .listen         = sock_no_listen,
        .shutdown       = sock_no_shutdown,
index aa300f3a0d51bda11c13766abbc536e33f2e0a2d..d5c7c89ec4d632a37cb06b275106286945199b96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Bluetooth HCI driver model support. */
 
 #include <linux/module.h>
index 40b1ede527caedde81bbfea79d807a1af912e29e..f760e62a672afc7c53905c026531faf3ed6124c0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the IEEE 802.1d ethernet bridging layer.
 #
index ca01def49af0666a451599aa6e00ecb55c8286c8..31ddff22563e1e0e7e11e2cccba2d9c36a058c3a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <linux/igmp.h>
 #include <linux/kernel.h>
index 3bc890716c89cb5fdeafcbd3e5062ed9bb6a9882..de21527308093240614481966bed7f43d7af07f3 100644 (file)
@@ -573,7 +573,7 @@ static int br_process_vlan_info(struct net_bridge *br,
                }
                *vinfo_last = NULL;
 
-               return 0;
+               return err;
        }
 
        return br_vlan_info(br, p, cmd, vinfo_curr);
index f6b1c7de059d8053e5820e66ae4bc354f6461b84..9700e0f3307bfac0f65fa34ee1b20ef588802c05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/netdevice.h>
index be4d0cea78cec4c32b947a3bbee02fbc4a051236..2f28e16de6c7f12940bad8435c8d72255cbb5132 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the netfilter modules for Link Layer filtering on a bridge.
 #
index 2585b100ebbbc332a33209c2b0bf3643eb0dd961..276b60262981c95a9fccd508e8d8123212d535de 100644 (file)
@@ -65,8 +65,8 @@ static int ebt_broute(struct sk_buff *skb)
 
 static int __net_init broute_net_init(struct net *net)
 {
-       net->xt.broute_table = ebt_register_table(net, &broute_table, NULL);
-       return PTR_ERR_OR_ZERO(net->xt.broute_table);
+       return ebt_register_table(net, &broute_table, NULL,
+                                 &net->xt.broute_table);
 }
 
 static void __net_exit broute_net_exit(struct net *net)
index 45a00dbdbcad647f2342caa9fc9181f27b7f3a77..c41da5fac84f49a9cf5e58eaab88b3beb2d81fba 100644 (file)
@@ -93,8 +93,8 @@ static const struct nf_hook_ops ebt_ops_filter[] = {
 
 static int __net_init frame_filter_net_init(struct net *net)
 {
-       net->xt.frame_filter = ebt_register_table(net, &frame_filter, ebt_ops_filter);
-       return PTR_ERR_OR_ZERO(net->xt.frame_filter);
+       return ebt_register_table(net, &frame_filter, ebt_ops_filter,
+                                 &net->xt.frame_filter);
 }
 
 static void __net_exit frame_filter_net_exit(struct net *net)
index 57cd5bb154e7071096f3205cb5200e277e04c69d..08df7406ecb3835a664a695a239d73f62eeaf457 100644 (file)
@@ -93,8 +93,8 @@ static const struct nf_hook_ops ebt_ops_nat[] = {
 
 static int __net_init frame_nat_net_init(struct net *net)
 {
-       net->xt.frame_nat = ebt_register_table(net, &frame_nat, ebt_ops_nat);
-       return PTR_ERR_OR_ZERO(net->xt.frame_nat);
+       return ebt_register_table(net, &frame_nat, ebt_ops_nat,
+                                 &net->xt.frame_nat);
 }
 
 static void __net_exit frame_nat_net_exit(struct net *net)
index 83951f978445e5b9daede1eac715cec0d9f42987..3b3dcf719e0783e74ecf9018b3fd1728a31f6393 100644 (file)
@@ -1169,9 +1169,8 @@ static void __ebt_unregister_table(struct net *net, struct ebt_table *table)
        kfree(table);
 }
 
-struct ebt_table *
-ebt_register_table(struct net *net, const struct ebt_table *input_table,
-                  const struct nf_hook_ops *ops)
+int ebt_register_table(struct net *net, const struct ebt_table *input_table,
+                      const struct nf_hook_ops *ops, struct ebt_table **res)
 {
        struct ebt_table_info *newinfo;
        struct ebt_table *t, *table;
@@ -1183,7 +1182,7 @@ ebt_register_table(struct net *net, const struct ebt_table *input_table,
            repl->entries == NULL || repl->entries_size == 0 ||
            repl->counters != NULL || input_table->private != NULL) {
                BUGPRINT("Bad table data for ebt_register_table!!!\n");
-               return ERR_PTR(-EINVAL);
+               return -EINVAL;
        }
 
        /* Don't add one table to multiple lists. */
@@ -1252,16 +1251,18 @@ ebt_register_table(struct net *net, const struct ebt_table *input_table,
        list_add(&table->list, &net->xt.tables[NFPROTO_BRIDGE]);
        mutex_unlock(&ebt_mutex);
 
+       WRITE_ONCE(*res, table);
+
        if (!ops)
-               return table;
+               return 0;
 
        ret = nf_register_net_hooks(net, ops, hweight32(table->valid_hooks));
        if (ret) {
                __ebt_unregister_table(net, table);
-               return ERR_PTR(ret);
+               *res = NULL;
        }
 
-       return table;
+       return ret;
 free_unlock:
        mutex_unlock(&ebt_mutex);
 free_chainstack:
@@ -1276,7 +1277,7 @@ free_newinfo:
 free_table:
        kfree(table);
 out:
-       return ERR_PTR(ret);
+       return ret;
 }
 
 void ebt_unregister_table(struct net *net, struct ebt_table *table,
index cc2b51154d039156c8b0795c4387a4cebdd2cf8c..4f6c0517cdfb2a12e67f16901b37e1d98daec373 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-$(CONFIG_CAIF_DEBUG)     :=      -DDEBUG
 
 caif-y := caif_dev.o \
index 10936754e3f272766cd3b699ee3acc8f58e89bfc..1242bbbfe57f5ab938809477c5e7c610a27ded36 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 #  Makefile for the Linux Controller Area Network core.
 #
index 88edac0f3e366398d0c1e0de023b90b0669498f9..ecd5c703d11e85c32eaee87321af56da03e7e07d 100644 (file)
@@ -78,7 +78,7 @@ MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
 static struct kmem_cache *rcv_cache __read_mostly;
 
 /* table of registered CAN protocols */
-static const struct can_proto *proto_tab[CAN_NPROTO] __read_mostly;
+static const struct can_proto __rcu *proto_tab[CAN_NPROTO] __read_mostly;
 static DEFINE_MUTEX(proto_tab_lock);
 
 static atomic_t skbcounter = ATOMIC_INIT(0);
@@ -788,7 +788,7 @@ int can_proto_register(const struct can_proto *cp)
 
        mutex_lock(&proto_tab_lock);
 
-       if (proto_tab[proto]) {
+       if (rcu_access_pointer(proto_tab[proto])) {
                pr_err("can: protocol %d already registered\n", proto);
                err = -EBUSY;
        } else
@@ -812,7 +812,7 @@ void can_proto_unregister(const struct can_proto *cp)
        int proto = cp->protocol;
 
        mutex_lock(&proto_tab_lock);
-       BUG_ON(proto_tab[proto] != cp);
+       BUG_ON(rcu_access_pointer(proto_tab[proto]) != cp);
        RCU_INIT_POINTER(proto_tab[proto], NULL);
        mutex_unlock(&proto_tab_lock);
 
@@ -875,9 +875,14 @@ static int can_pernet_init(struct net *net)
        spin_lock_init(&net->can.can_rcvlists_lock);
        net->can.can_rx_alldev_list =
                kzalloc(sizeof(struct dev_rcv_lists), GFP_KERNEL);
-
+       if (!net->can.can_rx_alldev_list)
+               goto out;
        net->can.can_stats = kzalloc(sizeof(struct s_stats), GFP_KERNEL);
+       if (!net->can.can_stats)
+               goto out_free_alldev_list;
        net->can.can_pstats = kzalloc(sizeof(struct s_pstats), GFP_KERNEL);
+       if (!net->can.can_pstats)
+               goto out_free_can_stats;
 
        if (IS_ENABLED(CONFIG_PROC_FS)) {
                /* the statistics are updated every second (timer triggered) */
@@ -892,6 +897,13 @@ static int can_pernet_init(struct net *net)
        }
 
        return 0;
+
+ out_free_can_stats:
+       kfree(net->can.can_stats);
+ out_free_alldev_list:
+       kfree(net->can.can_rx_alldev_list);
+ out:
+       return -ENOMEM;
 }
 
 static void can_pernet_exit(struct net *net)
index 47a8748d953afbf460238804d3d7d3d8b087f474..13690334efa31b978cff2ed6432af626f00cab76 100644 (file)
@@ -1493,13 +1493,14 @@ static int bcm_init(struct sock *sk)
 static int bcm_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
-       struct net *net = sock_net(sk);
+       struct net *net;
        struct bcm_sock *bo;
        struct bcm_op *op, *next;
 
-       if (sk == NULL)
+       if (!sk)
                return 0;
 
+       net = sock_net(sk);
        bo = bcm_sk(sk);
 
        /* remove bcm_ops, timer, rx_unregister(), etc. */
index 6a5180903e7bfff4634c1b5ab5bc525c9a65e77f..b4bded4b53960faa19099dbb5c7fd70a31209d83 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for CEPH filesystem.
 #
index 1fc1ee11dfa28088f00becf58d7c22fd2420cb36..0db8065928dfaa7922a1ad2539e161a37f7a17bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/errno.h>
 
index 48bb8d95195b1df91d3f34d20d815d7021e10693..dbde2b3c3c15d5ef8cb94d9d8d2af8c262ee9a3b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/module.h>
index df45e467c81f2f110e2621bfb977685e95570c8d..41d2a0c7223640cce174698882d26bd666c6cfa6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
index 62021535ae4a8f22c922a3c7a8b0d67cb5361eac..860ed9875791aa079ec6ee9cc3a4abc5703b4949 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_AUTH_NONE_H
 #define _FS_CEPH_AUTH_NONE_H
 
index 8757fb87dab871faaaeccaed0ac11d76521ad594..2f4a1baf5f5287065e4c8bc91779c0d6b868f081 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
index 48e9ad41bd2aa70cdf42922a830f052d39e5ea7d..454cb54568aff249856309200bf6ca43054cd679 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_AUTH_X_H
 #define _FS_CEPH_AUTH_X_H
 
index 671d30576c4f5359649b1322033f53cdbc89c9c0..32c13d763b9a4291bc5bbee195542d8e5163f9bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __FS_CEPH_AUTH_X_PROTOCOL
 #define __FS_CEPH_AUTH_X_PROTOCOL
 
index add5f921a0ffbef5149852177412aa02bee95e7b..5622763ad4027b84aaed90be96664d2d1550e008 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
index dcbe67ff3e2b281abc87d791def2f131fdba9fb3..756a2dc10d274be5efda8262296944ef2077d4d3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Some non-inline ceph helpers
  */
index 19b7d8aa915cdc05682192c3fa27c472ba9f7ec1..10e01494993ce77cd1092ce9da5a88c994d9ec26 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Ceph string constants
  */
index 08ada893f01e6acb61b5f91425539a33d7b2c0d4..8d2032b2f2250e174b0bf02cedc4bea28ff47959 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/types.h>
index 4b428f46a8ca42941f6e689175ae4a3def412bc9..3d70244bc1b63ffd6c470f5d425a4c86d959629f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef __KERNEL__
 # include <linux/slab.h>
 # include <linux/crush/crush.h>
index ed123af49eba563a004d5b69e8b08c648480cb59..e5cc603cdb1757061345d050080961d0d975c05b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef __KERNEL__
 # include <linux/crush/hash.h>
 #else
index 46008d5ac504cdc2c4392433dd566a8d0ed4a330..489610ac1cddad2e284515def1bb2185f620d3aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
index 58d83aa7740f64a68fc25dcbde06791f5ce17496..bb45c7d43739a9eb35410b7b16753b7b1c1d3bd1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FS_CEPH_CRYPTO_H
 #define _FS_CEPH_CRYPTO_H
 
index fa5233e0d01cc923de9f960040962e21792d44a8..1eef6806aa1a01e1901f7f57d759a2a52c6cd1df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/device.h>
index a67298c7e0cd4f8f7a441fa938af57e37c4bd4da..ad93342c90d72cad59d4797608940b293f2a71fa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/crc32c.h>
index 63edc6e5f0269f21275d6b7be5673e41ba5a9177..9ae1bab8c05db7005d5c345dcb62f6e4b9e145fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/module.h>
index aaed59a47b1dc6b55987bd33768c54fe656c7b23..72571535883fdd15d43bcb9628bb858bd5cc713d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/err.h>
index e02f01f534e2a582557fb489aefe43d6c05aa0db..2814dba5902d7a862a0ffb42b488af473a43fb59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
index f358d0bfa76b35cb978e9e92b57aea38a4e3b391..0da27c66349a7a378bc1697de00611618f034f1f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <linux/ceph/ceph_debug.h>
 
@@ -2445,19 +2446,34 @@ static void apply_upmap(struct ceph_osdmap *osdmap,
 
        pg = lookup_pg_mapping(&osdmap->pg_upmap_items, pgid);
        if (pg) {
-               for (i = 0; i < raw->size; i++) {
-                       for (j = 0; j < pg->pg_upmap_items.len; j++) {
-                               int from = pg->pg_upmap_items.from_to[j][0];
-                               int to = pg->pg_upmap_items.from_to[j][1];
-
-                               if (from == raw->osds[i]) {
-                                       if (!(to != CRUSH_ITEM_NONE &&
-                                             to < osdmap->max_osd &&
-                                             osdmap->osd_weight[to] == 0))
-                                               raw->osds[i] = to;
+               /*
+                * Note: this approach does not allow a bidirectional swap,
+                * e.g., [[1,2],[2,1]] applied to [0,1,2] -> [0,2,1].
+                */
+               for (i = 0; i < pg->pg_upmap_items.len; i++) {
+                       int from = pg->pg_upmap_items.from_to[i][0];
+                       int to = pg->pg_upmap_items.from_to[i][1];
+                       int pos = -1;
+                       bool exists = false;
+
+                       /* make sure replacement doesn't already appear */
+                       for (j = 0; j < raw->size; j++) {
+                               int osd = raw->osds[j];
+
+                               if (osd == to) {
+                                       exists = true;
                                        break;
                                }
+                               /* ignore mapping if target is marked out */
+                               if (osd == from && pos < 0 &&
+                                   !(to != CRUSH_ITEM_NONE &&
+                                     to < osdmap->max_osd &&
+                                     osdmap->osd_weight[to] == 0)) {
+                                       pos = j;
+                               }
                        }
+                       if (!exists && pos >= 0)
+                               raw->osds[pos] = to;
                }
        }
 }
index ce09f73be759c562cb9ffe093eb1c44350c8adde..2ea0564771d2d4428be2a3e9642056b85d3b306f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 #include <linux/gfp.h>
 #include <linux/slab.h>
index 1a7c9a79a53c22e8e61e3b6e8e1720db71d9f9a9..ee43bc13221c5d7dffcfed609dfffb48107736f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ceph/ceph_debug.h>
 
 #include <linux/module.h>
index 22fb96efcf3467713a9e5430057ead684326e3db..3191d9d160a2c6fa9a81e885788f2182e6a20bfa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/slab.h>
 #include <linux/gfp.h>
 #include <linux/string.h>
index 6ded6c821d7a21f296d14db02552ea1c71643051..22381719718c4fbd5d63b8836e3161026b59a459 100644 (file)
@@ -185,6 +185,13 @@ int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk,
                ucmsg = cmsg_compat_nxthdr(kmsg, ucmsg, ucmlen);
        }
 
+       /*
+        * check the length of messages copied in is the same as the
+        * what we get from the first loop
+        */
+       if ((char *)kcmsg - (char *)kcmsg_base != kcmlen)
+               goto Einval;
+
        /* Ok, looks like we made it.  Hook it up and return success. */
        kmsg->msg_control = kcmsg_base;
        kmsg->msg_controllen = kcmlen;
index 56d771a887b6c7d57eda434a461b6a305f92fa38..1fd0a9c88b1b1517fda3f439c5094c1b06f64125 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux networking core.
 #
index f7fb7e3f2acf33e42e1140372d87dc543a2f2c7c..3964c108b169835990562cec1a62d83ddb0f6725 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     SUCS NET3:
  *
index fb766d906148e7d1e85a654eaf6048c1cdf49364..11596a302a265212cb5dfe40f51b5b01fb20d0ce 100644 (file)
@@ -1147,9 +1147,8 @@ static int dev_alloc_name_ns(struct net *net,
        return ret;
 }
 
-static int dev_get_valid_name(struct net *net,
-                             struct net_device *dev,
-                             const char *name)
+int dev_get_valid_name(struct net *net, struct net_device *dev,
+                      const char *name)
 {
        BUG_ON(!net);
 
@@ -1165,6 +1164,7 @@ static int dev_get_valid_name(struct net *net,
 
        return 0;
 }
+EXPORT_SYMBOL(dev_get_valid_name);
 
 /**
  *     dev_change_name - change name of a device
@@ -1948,8 +1948,12 @@ again:
                goto again;
        }
 out_unlock:
-       if (pt_prev)
-               pt_prev->func(skb2, skb->dev, pt_prev, skb->dev);
+       if (pt_prev) {
+               if (!skb_orphan_frags_rx(skb2, GFP_ATOMIC))
+                       pt_prev->func(skb2, skb->dev, pt_prev, skb->dev);
+               else
+                       kfree_skb(skb2);
+       }
        rcu_read_unlock();
 }
 EXPORT_SYMBOL_GPL(dev_queue_xmit_nit);
@@ -3892,6 +3896,7 @@ static u32 netif_receive_generic_xdp(struct sk_buff *skb,
                __skb_pull(skb, off);
        else if (off < 0)
                __skb_push(skb, -off);
+       skb->mac_header += off;
 
        switch (act) {
        case XDP_REDIRECT:
index 709a4e6fb447fda886046308de5b613a88ff9dfa..7e690d0ccd05a8237cdd678b4768ce5588ac2732 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kmod.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
@@ -303,7 +304,18 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
        case SIOCSIFTXQLEN:
                if (ifr->ifr_qlen < 0)
                        return -EINVAL;
-               dev->tx_queue_len = ifr->ifr_qlen;
+               if (dev->tx_queue_len ^ ifr->ifr_qlen) {
+                       unsigned int orig_len = dev->tx_queue_len;
+
+                       dev->tx_queue_len = ifr->ifr_qlen;
+                       err = call_netdevice_notifiers(
+                                       NETDEV_CHANGE_TX_QUEUE_LEN, dev);
+                       err = notifier_to_errno(err);
+                       if (err) {
+                               dev->tx_queue_len = orig_len;
+                               return err;
+                       }
+               }
                return 0;
 
        case SIOCSIFNAME:
index 6a582ae4c5d972360736a966f02729bf22a64599..9a9a3d77e3274fc3e115fe73470f18bc93be6364 100644 (file)
@@ -436,7 +436,7 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
 EXPORT_SYMBOL(ethtool_convert_link_mode_to_legacy_u32);
 
 /* return false if legacy contained non-0 deprecated fields
- * transceiver/maxtxpkt/maxrxpkt. rest of ksettings always updated
+ * maxtxpkt/maxrxpkt. rest of ksettings always updated
  */
 static bool
 convert_legacy_settings_to_link_ksettings(
@@ -451,8 +451,7 @@ convert_legacy_settings_to_link_ksettings(
         * deprecated legacy fields, and they should not use
         * %ETHTOOL_GLINKSETTINGS/%ETHTOOL_SLINKSETTINGS
         */
-       if (legacy_settings->transceiver ||
-           legacy_settings->maxtxpkt ||
+       if (legacy_settings->maxtxpkt ||
            legacy_settings->maxrxpkt)
                retval = false;
 
@@ -525,6 +524,8 @@ convert_link_ksettings_to_legacy_settings(
                = link_ksettings->base.eth_tp_mdix;
        legacy_settings->eth_tp_mdix_ctrl
                = link_ksettings->base.eth_tp_mdix_ctrl;
+       legacy_settings->transceiver
+               = link_ksettings->base.transceiver;
        return retval;
 }
 
index 24dd33dd9f0452994623e26e3a379f0bf56190ce..6ae94f825f72eb810b5252e10dd89cae66f8cbef 100644 (file)
@@ -989,10 +989,14 @@ static bool __sk_filter_charge(struct sock *sk, struct sk_filter *fp)
 
 bool sk_filter_charge(struct sock *sk, struct sk_filter *fp)
 {
-       bool ret = __sk_filter_charge(sk, fp);
-       if (ret)
-               refcount_inc(&fp->refcnt);
-       return ret;
+       if (!refcount_inc_not_zero(&fp->refcnt))
+               return false;
+
+       if (!__sk_filter_charge(sk, fp)) {
+               sk_filter_release(fp);
+               return false;
+       }
+       return true;
 }
 
 static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
@@ -1794,7 +1798,7 @@ struct redirect_info {
        u32 flags;
        struct bpf_map *map;
        struct bpf_map *map_to_flush;
-       const struct bpf_prog *map_owner;
+       unsigned long   map_owner;
 };
 
 static DEFINE_PER_CPU(struct redirect_info, redirect_info);
@@ -1835,31 +1839,32 @@ static const struct bpf_func_proto bpf_redirect_proto = {
        .arg2_type      = ARG_ANYTHING,
 };
 
-BPF_CALL_3(bpf_sk_redirect_map, struct bpf_map *, map, u32, key, u64, flags)
+BPF_CALL_4(bpf_sk_redirect_map, struct sk_buff *, skb,
+          struct bpf_map *, map, u32, key, u64, flags)
 {
-       struct redirect_info *ri = this_cpu_ptr(&redirect_info);
+       struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
 
+       /* If user passes invalid input drop the packet. */
        if (unlikely(flags))
-               return SK_ABORTED;
+               return SK_DROP;
 
-       ri->ifindex = key;
-       ri->flags = flags;
-       ri->map = map;
+       tcb->bpf.key = key;
+       tcb->bpf.flags = flags;
+       tcb->bpf.map = map;
 
-       return SK_REDIRECT;
+       return SK_PASS;
 }
 
-struct sock *do_sk_redirect_map(void)
+struct sock *do_sk_redirect_map(struct sk_buff *skb)
 {
-       struct redirect_info *ri = this_cpu_ptr(&redirect_info);
+       struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
        struct sock *sk = NULL;
 
-       if (ri->map) {
-               sk = __sock_map_lookup_elem(ri->map, ri->ifindex);
+       if (tcb->bpf.map) {
+               sk = __sock_map_lookup_elem(tcb->bpf.map, tcb->bpf.key);
 
-               ri->ifindex = 0;
-               ri->map = NULL;
-               /* we do not clear flags for future lookup */
+               tcb->bpf.key = 0;
+               tcb->bpf.map = NULL;
        }
 
        return sk;
@@ -1869,9 +1874,10 @@ static const struct bpf_func_proto bpf_sk_redirect_map_proto = {
        .func           = bpf_sk_redirect_map,
        .gpl_only       = false,
        .ret_type       = RET_INTEGER,
-       .arg1_type      = ARG_CONST_MAP_PTR,
-       .arg2_type      = ARG_ANYTHING,
+       .arg1_type      = ARG_PTR_TO_CTX,
+       .arg2_type      = ARG_CONST_MAP_PTR,
        .arg3_type      = ARG_ANYTHING,
+       .arg4_type      = ARG_ANYTHING,
 };
 
 BPF_CALL_1(bpf_get_cgroup_classid, const struct sk_buff *, skb)
@@ -2500,11 +2506,17 @@ void xdp_do_flush_map(void)
 }
 EXPORT_SYMBOL_GPL(xdp_do_flush_map);
 
+static inline bool xdp_map_invalid(const struct bpf_prog *xdp_prog,
+                                  unsigned long aux)
+{
+       return (unsigned long)xdp_prog->aux != aux;
+}
+
 static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp,
                               struct bpf_prog *xdp_prog)
 {
        struct redirect_info *ri = this_cpu_ptr(&redirect_info);
-       const struct bpf_prog *map_owner = ri->map_owner;
+       unsigned long map_owner = ri->map_owner;
        struct bpf_map *map = ri->map;
        struct net_device *fwd = NULL;
        u32 index = ri->ifindex;
@@ -2512,9 +2524,9 @@ static int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp,
 
        ri->ifindex = 0;
        ri->map = NULL;
-       ri->map_owner = NULL;
+       ri->map_owner = 0;
 
-       if (unlikely(map_owner != xdp_prog)) {
+       if (unlikely(xdp_map_invalid(xdp_prog, map_owner))) {
                err = -EFAULT;
                map = NULL;
                goto err;
@@ -2574,7 +2586,7 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
                            struct bpf_prog *xdp_prog)
 {
        struct redirect_info *ri = this_cpu_ptr(&redirect_info);
-       const struct bpf_prog *map_owner = ri->map_owner;
+       unsigned long map_owner = ri->map_owner;
        struct bpf_map *map = ri->map;
        struct net_device *fwd = NULL;
        u32 index = ri->ifindex;
@@ -2583,10 +2595,10 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb,
 
        ri->ifindex = 0;
        ri->map = NULL;
-       ri->map_owner = NULL;
+       ri->map_owner = 0;
 
        if (map) {
-               if (unlikely(map_owner != xdp_prog)) {
+               if (unlikely(xdp_map_invalid(xdp_prog, map_owner))) {
                        err = -EFAULT;
                        map = NULL;
                        goto err;
@@ -2632,7 +2644,7 @@ BPF_CALL_2(bpf_xdp_redirect, u32, ifindex, u64, flags)
        ri->ifindex = ifindex;
        ri->flags = flags;
        ri->map = NULL;
-       ri->map_owner = NULL;
+       ri->map_owner = 0;
 
        return XDP_REDIRECT;
 }
@@ -2646,7 +2658,7 @@ static const struct bpf_func_proto bpf_xdp_redirect_proto = {
 };
 
 BPF_CALL_4(bpf_xdp_redirect_map, struct bpf_map *, map, u32, ifindex, u64, flags,
-          const struct bpf_prog *, map_owner)
+          unsigned long, map_owner)
 {
        struct redirect_info *ri = this_cpu_ptr(&redirect_info);
 
@@ -3673,7 +3685,6 @@ static bool sk_skb_is_valid_access(int off, int size,
 {
        if (type == BPF_WRITE) {
                switch (off) {
-               case bpf_ctx_range(struct __sk_buff, mark):
                case bpf_ctx_range(struct __sk_buff, tc_index):
                case bpf_ctx_range(struct __sk_buff, priority):
                        break;
@@ -3683,6 +3694,7 @@ static bool sk_skb_is_valid_access(int off, int size,
        }
 
        switch (off) {
+       case bpf_ctx_range(struct __sk_buff, mark):
        case bpf_ctx_range(struct __sk_buff, tc_classid):
                return false;
        case bpf_ctx_range(struct __sk_buff, data):
@@ -4232,6 +4244,31 @@ static u32 sock_ops_convert_ctx_access(enum bpf_access_type type,
        return insn - insn_buf;
 }
 
+static u32 sk_skb_convert_ctx_access(enum bpf_access_type type,
+                                    const struct bpf_insn *si,
+                                    struct bpf_insn *insn_buf,
+                                    struct bpf_prog *prog, u32 *target_size)
+{
+       struct bpf_insn *insn = insn_buf;
+       int off;
+
+       switch (si->off) {
+       case offsetof(struct __sk_buff, data_end):
+               off  = si->off;
+               off -= offsetof(struct __sk_buff, data_end);
+               off += offsetof(struct sk_buff, cb);
+               off += offsetof(struct tcp_skb_cb, bpf.data_end);
+               *insn++ = BPF_LDX_MEM(BPF_SIZEOF(void *), si->dst_reg,
+                                     si->src_reg, off);
+               break;
+       default:
+               return bpf_convert_ctx_access(type, si, insn_buf, prog,
+                                             target_size);
+       }
+
+       return insn - insn_buf;
+}
+
 const struct bpf_verifier_ops sk_filter_prog_ops = {
        .get_func_proto         = sk_filter_func_proto,
        .is_valid_access        = sk_filter_is_valid_access,
@@ -4290,7 +4327,7 @@ const struct bpf_verifier_ops sock_ops_prog_ops = {
 const struct bpf_verifier_ops sk_skb_prog_ops = {
        .get_func_proto         = sk_skb_func_proto,
        .is_valid_access        = sk_skb_is_valid_access,
-       .convert_ctx_access     = bpf_convert_ctx_access,
+       .convert_ctx_access     = sk_skb_convert_ctx_access,
        .gen_prologue           = sk_skb_prologue,
 };
 
index 814e58a3ce8b6a16a3fa60917b359f0fd3bf969d..4b54e5f107c6a3a50031a6e19fb249a15086b892 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/skbuff.h>
 #include <linux/slab.h>
 #include <linux/netdevice.h>
index 4847964931df62bd91cbe6057f73cd68081d62fb..615ccab55f387bbd021c040690bae5eefa642b0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/netdevice.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
index 2745a1b51e034a808ae586e29890e686f7ce7833..006876c7b78dae8470bb7aa85ade29922d77f801 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_SYSFS_H__
 #define __NET_SYSFS_H__
 
index 1132820c8e62c362d5437c64a2a53c4b3b8dc381..71f209542364134d018b64a86bc118238b282127 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * consolidates trace point definitions
  *
index a78fd61da0ec50a0cf2f8f6216a15944086d0e89..5ace48926b196666265a7f95b77779cbdd1ff848 100644 (file)
@@ -1483,7 +1483,10 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = {
        [IFLA_LINKINFO]         = { .type = NLA_NESTED },
        [IFLA_NET_NS_PID]       = { .type = NLA_U32 },
        [IFLA_NET_NS_FD]        = { .type = NLA_U32 },
-       [IFLA_IFALIAS]          = { .type = NLA_STRING, .len = IFALIASZ-1 },
+       /* IFLA_IFALIAS is a string, but policy is set to NLA_BINARY to
+        * allow 0-length string (needed to remove an alias).
+        */
+       [IFLA_IFALIAS]          = { .type = NLA_BINARY, .len = IFALIASZ - 1 },
        [IFLA_VFINFO_LIST]      = {. type = NLA_NESTED },
        [IFLA_VF_PORTS]         = { .type = NLA_NESTED },
        [IFLA_PORT_SELF]        = { .type = NLA_NESTED },
@@ -2093,7 +2096,7 @@ static int do_setlink(const struct sk_buff *skb,
                                dev->tx_queue_len = orig_len;
                                goto errout;
                        }
-                       status |= DO_SETLINK_NOTIFY;
+                       status |= DO_SETLINK_MODIFIED;
                }
        }
 
@@ -2248,7 +2251,7 @@ static int do_setlink(const struct sk_buff *skb,
 
 errout:
        if (status & DO_SETLINK_MODIFIED) {
-               if (status & DO_SETLINK_NOTIFY)
+               if ((status & DO_SETLINK_NOTIFY) == DO_SETLINK_NOTIFY)
                        netdev_state_change(dev);
 
                if (err < 0)
@@ -3854,6 +3857,9 @@ static int rtnl_fill_statsinfo(struct sk_buff *skb, struct net_device *dev,
                return -EMSGSIZE;
 
        ifsm = nlmsg_data(nlh);
+       ifsm->family = PF_UNSPEC;
+       ifsm->pad1 = 0;
+       ifsm->pad2 = 0;
        ifsm->ifindex = dev->ifindex;
        ifsm->filter_mask = filter_mask;
 
@@ -4276,13 +4282,17 @@ static int rtnetlink_event(struct notifier_block *this, unsigned long event, voi
 
        switch (event) {
        case NETDEV_REBOOT:
+       case NETDEV_CHANGEMTU:
        case NETDEV_CHANGEADDR:
        case NETDEV_CHANGENAME:
        case NETDEV_FEAT_CHANGE:
        case NETDEV_BONDING_FAILOVER:
+       case NETDEV_POST_TYPE_CHANGE:
        case NETDEV_NOTIFY_PEERS:
+       case NETDEV_CHANGEUPPER:
        case NETDEV_RESEND_IGMP:
        case NETDEV_CHANGEINFODATA:
+       case NETDEV_CHANGE_TX_QUEUE_LEN:
                rtmsg_ifinfo_event(RTM_NEWLINK, dev, 0, rtnl_get_event(event),
                                   GFP_KERNEL);
                break;
index 16982de649b97b92423a4f9f5eac1e98ca803370..24656076906d2a0f3b70b030c977e854caba2487 100644 (file)
@@ -1124,9 +1124,13 @@ int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb,
 
        err = __zerocopy_sg_from_iter(sk, skb, &msg->msg_iter, len);
        if (err == -EFAULT || (err == -EMSGSIZE && skb->len == orig_len)) {
+               struct sock *save_sk = skb->sk;
+
                /* Streams do not free skb on error. Reset to prev state. */
                msg->msg_iter = orig_iter;
+               skb->sk = sk;
                ___pskb_trim(skb, orig_len);
+               skb->sk = save_sk;
                return err;
        }
 
@@ -1896,7 +1900,7 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta)
        }
 
        /* If we need update frag list, we are in troubles.
-        * Certainly, it possible to add an offset to skb data,
+        * Certainly, it is possible to add an offset to skb data,
         * but taking into account that pulling is expected to
         * be very rare operation, it is worth to fight against
         * further bloating skb head and crucify ourselves here instead.
index 9b7b6bbb2a23e7652a1f34a305f29d49de00bc8c..415f441c63b9e2ff8feb010f44ca27303c72aaa1 100644 (file)
@@ -1654,6 +1654,8 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
 
                sock_copy(newsk, sk);
 
+               newsk->sk_prot_creator = sk->sk_prot;
+
                /* SANITY */
                if (likely(newsk->sk_net_refcnt))
                        get_net(sock_net(newsk));
@@ -1675,20 +1677,28 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
                newsk->sk_dst_pending_confirm = 0;
                newsk->sk_wmem_queued   = 0;
                newsk->sk_forward_alloc = 0;
+
+               /* sk->sk_memcg will be populated at accept() time */
+               newsk->sk_memcg = NULL;
+
                atomic_set(&newsk->sk_drops, 0);
                newsk->sk_send_head     = NULL;
                newsk->sk_userlocks     = sk->sk_userlocks & ~SOCK_BINDPORT_LOCK;
                atomic_set(&newsk->sk_zckey, 0);
 
                sock_reset_flag(newsk, SOCK_DONE);
+               cgroup_sk_alloc(&newsk->sk_cgrp_data);
 
-               filter = rcu_dereference_protected(newsk->sk_filter, 1);
+               rcu_read_lock();
+               filter = rcu_dereference(sk->sk_filter);
                if (filter != NULL)
                        /* though it's an empty new sock, the charging may fail
                         * if sysctl_optmem_max was changed between creation of
                         * original socket and cloning
                         */
                        is_charged = sk_filter_charge(newsk, filter);
+               RCU_INIT_POINTER(newsk->sk_filter, filter);
+               rcu_read_unlock();
 
                if (unlikely(!is_charged || xfrm_sk_clone_policy(newsk, sk))) {
                        /* We need to make sure that we don't uncharge the new
@@ -1709,9 +1719,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
                newsk->sk_incoming_cpu = raw_smp_processor_id();
                atomic64_set(&newsk->sk_cookie, 0);
 
-               mem_cgroup_sk_alloc(newsk);
-               cgroup_sk_alloc(&newsk->sk_cgrp_data);
-
                /*
                 * Before updating sk_refcnt, we must commit prior changes to memory
                 * (Documentation/RCU/rculist_nulls.txt for details)
index eed1ebf7f29d0fac552074b127e5636fecede65f..5eeb1d20cc388732c1a58d5a5e13db3b872e7ddd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * To speed up listener socket lookup, create an array to store all sockets
  * listening on the same port.  This allows a decision to be made after finding
@@ -36,9 +37,14 @@ int reuseport_alloc(struct sock *sk)
         * soft irq of receive path or setsockopt from process context
         */
        spin_lock_bh(&reuseport_lock);
-       WARN_ONCE(rcu_dereference_protected(sk->sk_reuseport_cb,
-                                           lockdep_is_held(&reuseport_lock)),
-                 "multiple allocations for the same socket");
+
+       /* Allocation attempts can occur concurrently via the setsockopt path
+        * and the bind/hash path.  Nothing to do when we lose the race.
+        */
+       if (rcu_dereference_protected(sk->sk_reuseport_cb,
+                                     lockdep_is_held(&reuseport_lock)))
+               goto out;
+
        reuse = __reuseport_alloc(INIT_SOCKS);
        if (!reuse) {
                spin_unlock_bh(&reuseport_lock);
@@ -49,6 +55,7 @@ int reuseport_alloc(struct sock *sk)
        reuse->num_socks = 1;
        rcu_assign_pointer(sk->sk_reuseport_cb, reuse);
 
+out:
        spin_unlock_bh(&reuseport_lock);
 
        return 0;
index 20231dbb1da0c65156e36a36aa4eae190b1b7a91..1cff9c6270c6b98472eae26c67e0d5e694af0f31 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     SUCS NET3:
  *
index b7cd9aafe99e9b9216b13cce617133cdf832eeeb..cbc3dde4cfcccae89ba262bb032edbf13639321f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* -*- linux-c -*-
  * sysctl_net_core.c: sysctl interface to net core subsystem.
  *
index 5dca7ce8ee9f58619ba1ac6c0bc85c73f208fe9d..43f4eba6193397cce5d0e87e3de4e37e294b02c7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/if_vlan.h>
 #include <net/ip.h>
index 5c8362b037ed12accc21fd85f58396f75fb2d870..2e7b56097bc4fee1f1941ff6f48b820aff301e9e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IP_DCCP) += dccp.o dccp_ipv4.o
 
 dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o \
index 62b5828acde0906b71fc39955c9f2b36582d395a..d7f265e1f50c85e8e59d0668e786f9f21d5c36c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * TFRC library initialisation
  *
index 001c08696334bba0ceb896c116e595b814af0667..e65fcb45c3f6c1edc70fc9898ebe6404175b102f 100644 (file)
@@ -414,8 +414,7 @@ struct sock *dccp_v4_request_recv_sock(const struct sock *sk,
        sk_daddr_set(newsk, ireq->ir_rmt_addr);
        sk_rcv_saddr_set(newsk, ireq->ir_loc_addr);
        newinet->inet_saddr     = ireq->ir_loc_addr;
-       newinet->inet_opt       = ireq->opt;
-       ireq->opt          = NULL;
+       RCU_INIT_POINTER(newinet->inet_opt, rcu_dereference(ireq->ireq_opt));
        newinet->mc_index  = inet_iif(skb);
        newinet->mc_ttl    = ip_hdr(skb)->ttl;
        newinet->inet_id   = jiffies;
@@ -430,7 +429,10 @@ struct sock *dccp_v4_request_recv_sock(const struct sock *sk,
        if (__inet_inherit_port(sk, newsk) < 0)
                goto put_and_exit;
        *own_req = inet_ehash_nolisten(newsk, req_to_sk(req_unhash));
-
+       if (*own_req)
+               ireq->ireq_opt = NULL;
+       else
+               newinet->inet_opt = NULL;
        return newsk;
 
 exit_overflow:
@@ -441,6 +443,7 @@ exit:
        __NET_INC_STATS(sock_net(sk), LINUX_MIB_LISTENDROPS);
        return NULL;
 put_and_exit:
+       newinet->inet_opt = NULL;
        inet_csk_prepare_forced_close(newsk);
        dccp_done(newsk);
        goto exit;
@@ -492,7 +495,7 @@ static int dccp_v4_send_response(const struct sock *sk, struct request_sock *req
                                                              ireq->ir_rmt_addr);
                err = ip_build_and_send_pkt(skb, sk, ireq->ir_loc_addr,
                                            ireq->ir_rmt_addr,
-                                           ireq->opt);
+                                           ireq_opt_deref(ireq));
                err = net_xmit_eval(err);
        }
 
@@ -548,7 +551,7 @@ out:
 static void dccp_v4_reqsk_destructor(struct request_sock *req)
 {
        dccp_feat_list_purge(&dccp_rsk(req)->dreq_featneg);
-       kfree(inet_rsk(req)->opt);
+       kfree(rcu_dereference_protected(inet_rsk(req)->ireq_opt, 1));
 }
 
 void dccp_syn_ack_timeout(const struct request_sock *req)
index e44003af71f63306a2ffc16943019608a5dc2632..9e38122d942be04dd53d7ec2a7672afcc8a244d9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_DECNET) += decnet.o
 
index 4d339de56862ce5c9bdf7a82f2bc3506553d43a0..df042b6d80b836b953bed41ae5d8a4ae82be3d15 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 3d37464c8b4aa4be97333b95216b89aa9e711e9e..b37a1b833c7723199a4deb3d743d6ca81d4f27a5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 22bf0b95d6edc3c27ef3a99d27cb70a1551e3e0e..528119a5618e4e053f4e8e6b3221792b9d8dff6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 295bbd6a56f2e690435148cd557b39eb4c05fed7..c795c3f509c9494486463f1839c4c9dcadff797c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
index 2326754807563aa8f9cf9ebb36f1f8d1c3c998b0..08667f68e601188d75029daaf4919107576450ec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 1d330fd43dc7e177d162f77796d2142a4e563fdb..f430daed24a0d97a97fe625456fbe8fc7fa22ce3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 6c7da6c29bf0d4cfe8fadbb005853bcb18523204..55bf64a22b59339bdef582d2e7fd297c00d226fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * DECnet       An implementation of the DECnet protocol suite for the LINUX
  *              operating system.  DECnet is implemented using the  BSD Socket
index 8737412c7b27f33125c14c8aa6e64c4ce5cd2dc8..e1d4d898a007df9ba0911fd612caac4a48a50dc2 100644 (file)
@@ -224,7 +224,7 @@ static int dns_resolver_match_preparse(struct key_match_data *match_data)
 static void dns_resolver_describe(const struct key *key, struct seq_file *m)
 {
        seq_puts(m, key->description);
-       if (key_is_instantiated(key)) {
+       if (key_is_positive(key)) {
                int err = PTR_ERR(key->payload.data[dns_key_error]);
 
                if (err)
index fcce25da937c045f1f794eed18d50399fba263e5..3d3c74193d06e027b93b94c72735aa8e93ecbfac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # the core
 obj-$(CONFIG_NET_DSA) += dsa_core.o
 dsa_core-y += dsa.o dsa2.o legacy.o port.o slave.o switch.o
index 873af0108e243fc269f591ec7d7c59a9c8b374fc..045d8a1762793142de2619497da3034f0af55e0c 100644 (file)
@@ -496,14 +496,15 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
                if (!ethernet)
                        return -EINVAL;
                ethernet_dev = of_find_net_device_by_node(ethernet);
+               if (!ethernet_dev)
+                       return -EPROBE_DEFER;
        } else {
                ethernet_dev = dsa_dev_to_net_device(ds->cd->netdev[index]);
+               if (!ethernet_dev)
+                       return -EPROBE_DEFER;
                dev_put(ethernet_dev);
        }
 
-       if (!ethernet_dev)
-               return -EPROBE_DEFER;
-
        if (!dst->cpu_dp) {
                dst->cpu_dp = port;
                dst->cpu_dp->netdev = ethernet_dev;
index 2afa99506f8b4f8ac051c5972acbf5dbd0c9bec3..865e29e62bad87e7fede6599ace0645ebbd2d196 100644 (file)
@@ -1301,28 +1301,33 @@ int dsa_slave_create(struct dsa_port *port, const char *name)
        p->old_duplex = -1;
 
        port->netdev = slave_dev;
-       ret = register_netdev(slave_dev);
-       if (ret) {
-               netdev_err(master, "error %d registering interface %s\n",
-                          ret, slave_dev->name);
-               port->netdev = NULL;
-               free_percpu(p->stats64);
-               free_netdev(slave_dev);
-               return ret;
-       }
 
        netif_carrier_off(slave_dev);
 
        ret = dsa_slave_phy_setup(p, slave_dev);
        if (ret) {
                netdev_err(master, "error %d setting up slave phy\n", ret);
-               unregister_netdev(slave_dev);
-               free_percpu(p->stats64);
-               free_netdev(slave_dev);
-               return ret;
+               goto out_free;
+       }
+
+       ret = register_netdev(slave_dev);
+       if (ret) {
+               netdev_err(master, "error %d registering interface %s\n",
+                          ret, slave_dev->name);
+               goto out_phy;
        }
 
        return 0;
+
+out_phy:
+       phy_disconnect(p->phy);
+       if (of_phy_is_fixed_link(p->dp->dn))
+               of_phy_deregister_fixed_link(p->dp->dn);
+out_free:
+       free_percpu(p->stats64);
+       free_netdev(slave_dev);
+       port->netdev = NULL;
+       return ret;
 }
 
 void dsa_slave_destroy(struct net_device *slave_dev)
index ac7c96b73ad568c17681e0099a86aef92c208a79..d8de3bcfb1032a1133402cb2a4c50a2448133846 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IEEE802154_6LOWPAN_I_H__
 #define __IEEE802154_6LOWPAN_I_H__
 
index 9b92ade687a34015f58bd2e84e37ce50641a11cc..f05b7bdae2aa6c8fcc4da2203528e29ea0e3c372 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_IEEE802154) += ieee802154.o
 obj-$(CONFIG_IEEE802154_SOCKET) += ieee802154_socket.o
 obj-y += 6lowpan/
index 81141f58d079ba935be14afcd6d271308863c013..1c19f575d574d051784ac6070c6b9e651c57f4cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IEEE802154_CORE_H
 #define __IEEE802154_CORE_H
 
index 3846a89d0958ef188a0ee6ff6ad4d8bf627f65a0..8c4b6d08954ca55029545bd4727697d37740e096 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IEEE802154_NL802154_H
 #define __IEEE802154_NL802154_H
 
index 4441c63b3ea64829d1236fab96bf601dfa15cb24..598f5af497753916ce8add52c7b88b4dbd807adf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CFG802154_RDEV_OPS
 #define __CFG802154_RDEV_OPS
 
index aa42e39ecbecac48cc9a61ca525f38cebf598f74..337545b639e9cceab7c02a6d4b1e89b51e18533e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IEEE802154_SYSFS_H
 #define __IEEE802154_SYSFS_H
 
index 9a471e41ec737270a2d9f364564187f2736aaf19..19c2e5d60e765d50f96bb02a033241351627dcf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Based on net/wireless/trace.h */
 
 #undef TRACE_SYSTEM
index f360341c72eb10c05913645456f14ef1797ecff8..7d1ec76e7f433a2525581782a0bf14731548d4a8 100644 (file)
@@ -137,6 +137,6 @@ int ife_tlv_meta_encode(void *skbdata, u16 attrtype, u16 dlen, const void *dval)
 EXPORT_SYMBOL_GPL(ife_tlv_meta_encode);
 
 MODULE_AUTHOR("Jamal Hadi Salim <jhs@mojatatu.com>");
-MODULE_AUTHOR("Yotam Gigi <yotamg@mellanox.com>");
+MODULE_AUTHOR("Yotam Gigi <yotam.gi@gmail.com>");
 MODULE_DESCRIPTION("Inter-FE LFB action");
 MODULE_LICENSE("GPL");
index 91a2557942fa8533564943f1f8e8d9df4d7df141..f48fe6fc7e8c413d7d7e4d7d37d1d859a566e8fb 100644 (file)
@@ -70,11 +70,9 @@ config IP_MULTIPLE_TABLES
          address into account. Furthermore, the TOS (Type-Of-Service) field
          of the packet can be used for routing decisions as well.
 
-         If you are interested in this, please see the preliminary
-         documentation at <http://www.compendium.com.ar/policy-routing.txt>
-         and <ftp://post.tepkom.ru/pub/vol2/Linux/docs/advanced-routing.tex>.
-         You will need supporting software from
-         <ftp://ftp.tux.org/pub/net/ip-routing/>.
+         If you need more information, see the Linux Advanced
+         Routing and Traffic Control documentation at
+         <http://lartc.org/howto/lartc.rpdb.html>
 
          If unsure, say N.
 
index afcb435adfbea32a98a3309c9fd6d1c36811a97f..c6c8ad1d4b6d65eded5571d875fedae4af2bf47b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux TCP/IP (INET) layer.
 #
index 2ae8f54cb32148f2499f78ecbf29259db36bd207..82178cc69c9618bae69c096290a7a96a8b8bade0 100644 (file)
@@ -1951,7 +1951,7 @@ int cipso_v4_req_setattr(struct request_sock *req,
        buf = NULL;
 
        req_inet = inet_rsk(req);
-       opt = xchg(&req_inet->opt, opt);
+       opt = xchg((__force struct ip_options_rcu **)&req_inet->ireq_opt, opt);
        if (opt)
                kfree_rcu(opt, rcu);
 
@@ -1973,11 +1973,13 @@ req_setattr_failure:
  * values on failure.
  *
  */
-static int cipso_v4_delopt(struct ip_options_rcu **opt_ptr)
+static int cipso_v4_delopt(struct ip_options_rcu __rcu **opt_ptr)
 {
+       struct ip_options_rcu *opt = rcu_dereference_protected(*opt_ptr, 1);
        int hdr_delta = 0;
-       struct ip_options_rcu *opt = *opt_ptr;
 
+       if (!opt || opt->opt.cipso == 0)
+               return 0;
        if (opt->opt.srr || opt->opt.rr || opt->opt.ts || opt->opt.router_alert) {
                u8 cipso_len;
                u8 cipso_off;
@@ -2039,14 +2041,10 @@ static int cipso_v4_delopt(struct ip_options_rcu **opt_ptr)
  */
 void cipso_v4_sock_delattr(struct sock *sk)
 {
-       int hdr_delta;
-       struct ip_options_rcu *opt;
        struct inet_sock *sk_inet;
+       int hdr_delta;
 
        sk_inet = inet_sk(sk);
-       opt = rcu_dereference_protected(sk_inet->inet_opt, 1);
-       if (!opt || opt->opt.cipso == 0)
-               return;
 
        hdr_delta = cipso_v4_delopt(&sk_inet->inet_opt);
        if (sk_inet->is_icsk && hdr_delta > 0) {
@@ -2066,15 +2064,7 @@ void cipso_v4_sock_delattr(struct sock *sk)
  */
 void cipso_v4_req_delattr(struct request_sock *req)
 {
-       struct ip_options_rcu *opt;
-       struct inet_request_sock *req_inet;
-
-       req_inet = inet_rsk(req);
-       opt = req_inet->opt;
-       if (!opt || opt->opt.cipso == 0)
-               return;
-
-       cipso_v4_delopt(&req_inet->opt);
+       cipso_v4_delopt(&inet_rsk(req)->ireq_opt);
 }
 
 /**
index 5b2af19cfb5b75e50c80d7e4c647bc790f58368d..e6ff282bb7f42c2a941ae6c3f2785ca989150ad1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _FIB_LOOKUP_H
 #define _FIB_LOOKUP_H
 
index cfd420b0572c98cb99dc9217b668f01be3050acd..b804ccbdb241e6a801ae29cf0664c6a23c0c8d48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/rtnetlink.h>
 #include <linux/notifier.h>
 #include <linux/socket.h>
index 57a5d48acee84b27de00d49640220ae8e5167389..01ed22139ac2b113952dce2c11916ce2439719d6 100644 (file)
@@ -1365,8 +1365,6 @@ int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
            nla_put_in_addr(skb, RTA_PREFSRC, fi->fib_prefsrc))
                goto nla_put_failure;
        if (fi->fib_nhs == 1) {
-               struct in_device *in_dev;
-
                if (fi->fib_nh->nh_gw &&
                    nla_put_in_addr(skb, RTA_GATEWAY, fi->fib_nh->nh_gw))
                        goto nla_put_failure;
@@ -1374,10 +1372,14 @@ int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
                    nla_put_u32(skb, RTA_OIF, fi->fib_nh->nh_oif))
                        goto nla_put_failure;
                if (fi->fib_nh->nh_flags & RTNH_F_LINKDOWN) {
-                       in_dev = __in_dev_get_rtnl(fi->fib_nh->nh_dev);
+                       struct in_device *in_dev;
+
+                       rcu_read_lock();
+                       in_dev = __in_dev_get_rcu(fi->fib_nh->nh_dev);
                        if (in_dev &&
                            IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev))
                                rtm->rtm_flags |= RTNH_F_DEAD;
+                       rcu_read_unlock();
                }
                if (fi->fib_nh->nh_flags & RTNH_F_OFFLOAD)
                        rtm->rtm_flags |= RTNH_F_OFFLOAD;
@@ -1400,18 +1402,20 @@ int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
                        goto nla_put_failure;
 
                for_nexthops(fi) {
-                       struct in_device *in_dev;
-
                        rtnh = nla_reserve_nohdr(skb, sizeof(*rtnh));
                        if (!rtnh)
                                goto nla_put_failure;
 
                        rtnh->rtnh_flags = nh->nh_flags & 0xFF;
                        if (nh->nh_flags & RTNH_F_LINKDOWN) {
-                               in_dev = __in_dev_get_rtnl(nh->nh_dev);
+                               struct in_device *in_dev;
+
+                               rcu_read_lock();
+                               in_dev = __in_dev_get_rcu(nh->nh_dev);
                                if (in_dev &&
                                    IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev))
                                        rtnh->rtnh_flags |= RTNH_F_DEAD;
+                               rcu_read_unlock();
                        }
                        rtnh->rtnh_hops = nh->nh_weight - 1;
                        rtnh->rtnh_ifindex = nh->nh_oif;
index 416bb304a281a41970944e5f979eaf4c8aa1ad03..1859c473b21a862b383edebbcf2c1656f9c58b3b 100644 (file)
@@ -86,7 +86,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
                greh = (struct gre_base_hdr *)skb_transport_header(skb);
                pcsum = (__sum16 *)(greh + 1);
 
-               if (gso_partial) {
+               if (gso_partial && skb_is_gso(skb)) {
                        unsigned int partial_adj;
 
                        /* Adjust checksum to account for the fact that
index b9c64b40a83af1e151f553ba0e624fae5060ffd0..b47a59cb3573b3b77aa5cbb9c2739a12ef37a237 100644 (file)
@@ -266,7 +266,7 @@ static inline int sk_reuseport_match(struct inet_bind_bucket *tb,
 #if IS_ENABLED(CONFIG_IPV6)
        if (tb->fast_sk_family == AF_INET6)
                return ipv6_rcv_saddr_equal(&tb->fast_v6_rcv_saddr,
-                                           &sk->sk_v6_rcv_saddr,
+                                           inet6_rcv_saddr(sk),
                                            tb->fast_rcv_saddr,
                                            sk->sk_rcv_saddr,
                                            tb->fast_ipv6_only,
@@ -321,13 +321,14 @@ tb_found:
                        goto fail_unlock;
        }
 success:
-       if (!hlist_empty(&tb->owners)) {
+       if (hlist_empty(&tb->owners)) {
                tb->fastreuse = reuse;
                if (sk->sk_reuseport) {
                        tb->fastreuseport = FASTREUSEPORT_ANY;
                        tb->fastuid = uid;
                        tb->fast_rcv_saddr = sk->sk_rcv_saddr;
                        tb->fast_ipv6_only = ipv6_only_sock(sk);
+                       tb->fast_sk_family = sk->sk_family;
 #if IS_ENABLED(CONFIG_IPV6)
                        tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
 #endif
@@ -354,6 +355,7 @@ success:
                                tb->fastuid = uid;
                                tb->fast_rcv_saddr = sk->sk_rcv_saddr;
                                tb->fast_ipv6_only = ipv6_only_sock(sk);
+                               tb->fast_sk_family = sk->sk_family;
 #if IS_ENABLED(CONFIG_IPV6)
                                tb->fast_v6_rcv_saddr = sk->sk_v6_rcv_saddr;
 #endif
@@ -473,6 +475,7 @@ struct sock *inet_csk_accept(struct sock *sk, int flags, int *err, bool kern)
                }
                spin_unlock_bh(&queue->fastopenq.lock);
        }
+       mem_cgroup_sk_alloc(newsk);
 out:
        release_sock(sk);
        if (req)
@@ -537,9 +540,11 @@ struct dst_entry *inet_csk_route_req(const struct sock *sk,
 {
        const struct inet_request_sock *ireq = inet_rsk(req);
        struct net *net = read_pnet(&ireq->ireq_net);
-       struct ip_options_rcu *opt = ireq->opt;
+       struct ip_options_rcu *opt;
        struct rtable *rt;
 
+       opt = ireq_opt_deref(ireq);
+
        flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark,
                           RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
                           sk->sk_protocol, inet_sk_flowi_flags(sk),
@@ -573,10 +578,9 @@ struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
        struct flowi4 *fl4;
        struct rtable *rt;
 
+       opt = rcu_dereference(ireq->ireq_opt);
        fl4 = &newinet->cork.fl.u.ip4;
 
-       rcu_read_lock();
-       opt = rcu_dereference(newinet->inet_opt);
        flowi4_init_output(fl4, ireq->ir_iif, ireq->ir_mark,
                           RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE,
                           sk->sk_protocol, inet_sk_flowi_flags(sk),
@@ -589,13 +593,11 @@ struct dst_entry *inet_csk_route_child_sock(const struct sock *sk,
                goto no_route;
        if (opt && opt->opt.is_strictroute && rt->rt_uses_gateway)
                goto route_err;
-       rcu_read_unlock();
        return &rt->dst;
 
 route_err:
        ip_rt_put(rt);
 no_route:
-       rcu_read_unlock();
        __IP_INC_STATS(net, IPSTATS_MIB_OUTNOROUTES);
        return NULL;
 }
index 597bb4cfe805281a5a7cb1f8d1334c2103d34dc8..e7d15fb0d94d9790675356d3144d204b91eab984 100644 (file)
@@ -456,10 +456,7 @@ static int inet_reuseport_add_sock(struct sock *sk,
                        return reuseport_add_sock(sk, sk2);
        }
 
-       /* Initial allocation may have already happened via setsockopt */
-       if (!rcu_access_pointer(sk->sk_reuseport_cb))
-               return reuseport_alloc(sk);
-       return 0;
+       return reuseport_alloc(sk);
 }
 
 int __inet_hash(struct sock *sk, struct sock *osk)
index e7eb590c86ce2b33654c17c61619de74ff07bfd1..b20c8ac640811e1b4c5416134181dd77675db878 100644 (file)
@@ -128,9 +128,9 @@ static struct inet_peer *lookup(const struct inetpeer_addr *daddr,
                        break;
                }
                if (cmp == -1)
-                       pp = &(*pp)->rb_left;
+                       pp = &next->rb_left;
                else
-                       pp = &(*pp)->rb_right;
+                       pp = &next->rb_right;
        }
        *parent_p = parent;
        *pp_p = pp;
index 9f0a7b96646f368021d9cd51bc3f728ba49eed0d..2dd21c3281a1cb4194dbb34dad086b701716220d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 46408c220d9dcb59380b15a17c1ce3f277c9ba8f..df8fe0503de0e5050699be822ce04b383a677aa9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 0162fb955b33abf18514cbfd482e72a0ebce6e48..467e44d7587dcf6dc9eeb3845b1fe069b6c8389e 100644 (file)
@@ -259,7 +259,6 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
        struct ip_tunnel *tunnel;
        struct erspanhdr *ershdr;
        const struct iphdr *iph;
-       __be32 session_id;
        __be32 index;
        int len;
 
@@ -275,8 +274,7 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
        /* The original GRE header does not have key field,
         * Use ERSPAN 10-bit session ID as key.
         */
-       session_id = cpu_to_be32(ntohs(ershdr->session_id));
-       tpi->key = session_id;
+       tpi->key = cpu_to_be32(ntohs(ershdr->session_id) & ID_MASK);
        index = ershdr->md.index;
        tunnel = ip_tunnel_lookup(itn, skb->dev->ifindex,
                                  tpi->flags | TUNNEL_KEY,
@@ -733,7 +731,7 @@ static netdev_tx_t erspan_xmit(struct sk_buff *skb,
        if (skb_cow_head(skb, dev->needed_headroom))
                goto free_skb;
 
-       if (skb->len > dev->mtu) {
+       if (skb->len - dev->hard_header_len > dev->mtu) {
                pskb_trim(skb, dev->mtu);
                truncate = true;
        }
@@ -1223,6 +1221,7 @@ static int gre_tap_init(struct net_device *dev)
 {
        __gre_tunnel_init(dev);
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+       netif_keep_dst(dev);
 
        return ip_tunnel_init(dev);
 }
@@ -1246,13 +1245,16 @@ static int erspan_tunnel_init(struct net_device *dev)
 
        tunnel->tun_hlen = 8;
        tunnel->parms.iph.protocol = IPPROTO_GRE;
-       t_hlen = tunnel->hlen + sizeof(struct iphdr) + sizeof(struct erspanhdr);
+       tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
+                      sizeof(struct erspanhdr);
+       t_hlen = tunnel->hlen + sizeof(struct iphdr);
 
        dev->needed_headroom = LL_MAX_HEADER + t_hlen + 4;
        dev->mtu = ETH_DATA_LEN - t_hlen - 4;
        dev->features           |= GRE_FEATURES;
        dev->hw_features        |= GRE_FEATURES;
        dev->priv_flags         |= IFF_LIVE_ADDR_CHANGE;
+       netif_keep_dst(dev);
 
        return ip_tunnel_init(dev);
 }
index fa2dc8f692c631f1ff7fe814c3ee27f0de2a41d8..57fc13c6ab2b7843a4fdb11680c82fc342f465c7 100644 (file)
@@ -311,9 +311,10 @@ drop:
 static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
 {
        const struct iphdr *iph = ip_hdr(skb);
-       struct rtable *rt;
+       int (*edemux)(struct sk_buff *skb);
        struct net_device *dev = skb->dev;
-       void (*edemux)(struct sk_buff *skb);
+       struct rtable *rt;
+       int err;
 
        /* if ingress device is enslaved to an L3 master device pass the
         * skb to its handler for processing
@@ -331,7 +332,9 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
 
                ipprot = rcu_dereference(inet_protos[protocol]);
                if (ipprot && (edemux = READ_ONCE(ipprot->early_demux))) {
-                       edemux(skb);
+                       err = edemux(skb);
+                       if (unlikely(err))
+                               goto drop_error;
                        /* must reload iph, skb->head might have changed */
                        iph = ip_hdr(skb);
                }
@@ -342,13 +345,10 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
         *      how the packet travels inside Linux networking.
         */
        if (!skb_valid_dst(skb)) {
-               int err = ip_route_input_noref(skb, iph->daddr, iph->saddr,
-                                              iph->tos, dev);
-               if (unlikely(err)) {
-                       if (err == -EXDEV)
-                               __NET_INC_STATS(net, LINUX_MIB_IPRPFILTER);
-                       goto drop;
-               }
+               err = ip_route_input_noref(skb, iph->daddr, iph->saddr,
+                                          iph->tos, dev);
+               if (unlikely(err))
+                       goto drop_error;
        }
 
 #ifdef CONFIG_IP_ROUTE_CLASSID
@@ -399,6 +399,11 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
 drop:
        kfree_skb(skb);
        return NET_RX_DROP;
+
+drop_error:
+       if (err == -EXDEV)
+               __NET_INC_STATS(net, LINUX_MIB_IPRPFILTER);
+       goto drop;
 }
 
 /*
index 525ae88d1e586e0c5d3abf6c64a22e5367a01a8d..ed194d46c00e3292cd741a07cd8954ccdc5a1fd6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index a599aa83fdadfa62f09dbee1038d06fbc3155fd4..60fb1eb7d7d80d918f90bd316ed41977748dee1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
index 5ed63d25095062d44dacfd291e227290d24ea0ed..89453cf62158fbdcb18bf28494e9b54ee143558f 100644 (file)
@@ -168,6 +168,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
        struct ip_tunnel_parm *parms = &tunnel->parms;
        struct dst_entry *dst = skb_dst(skb);
        struct net_device *tdev;        /* Device to other host */
+       int pkt_len = skb->len;
        int err;
        int mtu;
 
@@ -229,7 +230,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
 
        err = dst_output(tunnel->net, skb->sk, skb);
        if (net_xmit_eval(err) == 0)
-               err = skb->len;
+               err = pkt_len;
        iptunnel_xmit_stats(dev, err);
        return NETDEV_TX_OK;
 
index 4c5dfe6bd34d518c827abfaf94282efa25759ae0..abdebca848c977dc3c3c7c0a8fd862100373209e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Automatic Configuration of IP -- use DHCP, BOOTP, RARP, or
  *  user-supplied information to configure own IP address and routes.
index fb1ad22b5e292d5669c70b5640ad3207c353c6bb..cdd627355ed106ae8228ee4a995f5f3b4588a842 100644 (file)
@@ -128,43 +128,68 @@ static struct rtnl_link_ops ipip_link_ops __read_mostly;
 
 static int ipip_err(struct sk_buff *skb, u32 info)
 {
-
-/* All the routers (except for Linux) return only
-   8 bytes of packet payload. It means, that precise relaying of
-   ICMP in the real Internet is absolutely infeasible.
- */
+       /* All the routers (except for Linux) return only
+        * 8 bytes of packet payload. It means, that precise relaying of
+        * ICMP in the real Internet is absolutely infeasible.
+        */
        struct net *net = dev_net(skb->dev);
        struct ip_tunnel_net *itn = net_generic(net, ipip_net_id);
        const struct iphdr *iph = (const struct iphdr *)skb->data;
-       struct ip_tunnel *t;
-       int err;
        const int type = icmp_hdr(skb)->type;
        const int code = icmp_hdr(skb)->code;
+       struct ip_tunnel *t;
+       int err = 0;
+
+       switch (type) {
+       case ICMP_DEST_UNREACH:
+               switch (code) {
+               case ICMP_SR_FAILED:
+                       /* Impossible event. */
+                       goto out;
+               default:
+                       /* All others are translated to HOST_UNREACH.
+                        * rfc2003 contains "deep thoughts" about NET_UNREACH,
+                        * I believe they are just ether pollution. --ANK
+                        */
+                       break;
+               }
+               break;
+
+       case ICMP_TIME_EXCEEDED:
+               if (code != ICMP_EXC_TTL)
+                       goto out;
+               break;
+
+       case ICMP_REDIRECT:
+               break;
+
+       default:
+               goto out;
+       }
 
-       err = -ENOENT;
        t = ip_tunnel_lookup(itn, skb->dev->ifindex, TUNNEL_NO_KEY,
                             iph->daddr, iph->saddr, 0);
-       if (!t)
+       if (!t) {
+               err = -ENOENT;
                goto out;
+       }
 
        if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
-               ipv4_update_pmtu(skb, dev_net(skb->dev), info,
-                                t->parms.link, 0, iph->protocol, 0);
-               err = 0;
+               ipv4_update_pmtu(skb, net, info, t->parms.link, 0,
+                                iph->protocol, 0);
                goto out;
        }
 
        if (type == ICMP_REDIRECT) {
-               ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
-                             iph->protocol, 0);
-               err = 0;
+               ipv4_redirect(skb, net, t->parms.link, 0, iph->protocol, 0);
                goto out;
        }
 
-       if (t->parms.iph.daddr == 0)
+       if (t->parms.iph.daddr == 0) {
+               err = -ENOENT;
                goto out;
+       }
 
-       err = 0;
        if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)
                goto out;
 
index f462fee66ac88548a3f59ae4ed566c61f6648c8d..adcdae35836500c15dd97f9cef4a4d3321f80f20 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the netfilter modules on top of IPv4.
 #
index 811689e523c310dc41b71f6ec9fcff3d2749e590..f75fc6b531152a4d1f4fb96052ad47f3e76c9a21 100644 (file)
@@ -330,7 +330,8 @@ static unsigned int ipv4_synproxy_hook(void *priv,
        if (synproxy == NULL)
                return NF_ACCEPT;
 
-       if (nf_is_loopback_packet(skb))
+       if (nf_is_loopback_packet(skb) ||
+           ip_hdr(skb)->protocol != IPPROTO_TCP)
                return NF_ACCEPT;
 
        thoff = ip_hdrlen(skb);
index eeacbdaf7cdf4918b7c556efa92df1da0f9f63ee..5cd06ba3535df62181e9803f0dfd2407b5e06177 100644 (file)
@@ -132,6 +132,8 @@ void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook)
        if (ip_route_me_harder(net, nskb, RTN_UNSPEC))
                goto free_nskb;
 
+       niph = ip_hdr(nskb);
+
        /* "Never happens" */
        if (nskb->len > dst_mtu(skb_dst(nskb)))
                goto free_nskb;
index 94d4cd2d5ea4f4589783528d8e951d3365078bc6..3d9f1c2f81c58afb45a1445f6ed06a97203606a1 100644 (file)
@@ -1520,43 +1520,56 @@ struct rtable *rt_dst_alloc(struct net_device *dev,
 EXPORT_SYMBOL(rt_dst_alloc);
 
 /* called in rcu_read_lock() section */
-static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
-                               u8 tos, struct net_device *dev, int our)
+int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
+                         u8 tos, struct net_device *dev,
+                         struct in_device *in_dev, u32 *itag)
 {
-       struct rtable *rth;
-       struct in_device *in_dev = __in_dev_get_rcu(dev);
-       unsigned int flags = RTCF_MULTICAST;
-       u32 itag = 0;
        int err;
 
        /* Primary sanity checks. */
-
        if (!in_dev)
                return -EINVAL;
 
        if (ipv4_is_multicast(saddr) || ipv4_is_lbcast(saddr) ||
            skb->protocol != htons(ETH_P_IP))
-               goto e_inval;
+               return -EINVAL;
 
        if (ipv4_is_loopback(saddr) && !IN_DEV_ROUTE_LOCALNET(in_dev))
-               goto e_inval;
+               return -EINVAL;
 
        if (ipv4_is_zeronet(saddr)) {
                if (!ipv4_is_local_multicast(daddr))
-                       goto e_inval;
+                       return -EINVAL;
        } else {
                err = fib_validate_source(skb, saddr, 0, tos, 0, dev,
-                                         in_dev, &itag);
+                                         in_dev, itag);
                if (err < 0)
-                       goto e_err;
+                       return err;
        }
+       return 0;
+}
+
+/* called in rcu_read_lock() section */
+static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
+                            u8 tos, struct net_device *dev, int our)
+{
+       struct in_device *in_dev = __in_dev_get_rcu(dev);
+       unsigned int flags = RTCF_MULTICAST;
+       struct rtable *rth;
+       u32 itag = 0;
+       int err;
+
+       err = ip_mc_validate_source(skb, daddr, saddr, tos, dev, in_dev, &itag);
+       if (err)
+               return err;
+
        if (our)
                flags |= RTCF_LOCAL;
 
        rth = rt_dst_alloc(dev_net(dev)->loopback_dev, flags, RTN_MULTICAST,
                           IN_DEV_CONF_GET(in_dev, NOPOLICY), false, false);
        if (!rth)
-               goto e_nobufs;
+               return -ENOBUFS;
 
 #ifdef CONFIG_IP_ROUTE_CLASSID
        rth->dst.tclassid = itag;
@@ -1572,13 +1585,6 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 
        skb_dst_set(skb, &rth->dst);
        return 0;
-
-e_nobufs:
-       return -ENOBUFS;
-e_inval:
-       return -EINVAL;
-e_err:
-       return err;
 }
 
 
@@ -2507,7 +2513,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
        struct rtable *ort = (struct rtable *) dst_orig;
        struct rtable *rt;
 
-       rt = dst_alloc(&ipv4_dst_blackhole_ops, NULL, 1, DST_OBSOLETE_NONE, 0);
+       rt = dst_alloc(&ipv4_dst_blackhole_ops, NULL, 1, DST_OBSOLETE_DEAD, 0);
        if (rt) {
                struct dst_entry *new = &rt->dst;
 
index b1bb1b3a108232d56aa82383422d68b5ff9da3ed..77cf32a80952fcf3ceff4ada946cc2d0df2411d9 100644 (file)
@@ -355,7 +355,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
        /* We throwed the options of the initial SYN away, so we hope
         * the ACK carries the same options again (see RFC1122 4.2.3.8)
         */
-       ireq->opt = tcp_v4_save_options(sock_net(sk), skb);
+       RCU_INIT_POINTER(ireq->ireq_opt, tcp_v4_save_options(sock_net(sk), skb));
 
        if (security_inet_conn_request(sk, skb, req)) {
                reqsk_free(req);
index 0d3c038d7b0454eb2213ad88eb7ebfe27504b2ee..0989e739d09809ee68db3de48b5c852591f1c31c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
  *
index e3c33220c41810c87d1d6eebdd5de0b71930aed0..fbbeda64777406d16beb0c2905bedb633c28d33a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/crypto.h>
 #include <linux/err.h>
 #include <linux/init.h>
index c5d7656beeee29b3c92e1c8824dbf00d3fa32d28..5a87a00641d3a82bfb78d4f3a2959fe8ea2e119c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * INET                An implementation of the TCP/IP protocol suite for the LINUX
  *             operating system.  INET is implemented using the  BSD Socket
@@ -6196,7 +6197,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
                struct inet_request_sock *ireq = inet_rsk(req);
 
                kmemcheck_annotate_bitfield(ireq, flags);
-               ireq->opt = NULL;
+               ireq->ireq_opt = NULL;
 #if IS_ENABLED(CONFIG_IPV6)
                ireq->pktopts = NULL;
 #endif
index d9416b5162bc1bdd1acd34fcb4da21cb6b62d0ae..5b027c69cbc540d4e933189f9de5baab5472eadb 100644 (file)
@@ -877,7 +877,7 @@ static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst,
 
                err = ip_build_and_send_pkt(skb, sk, ireq->ir_loc_addr,
                                            ireq->ir_rmt_addr,
-                                           ireq->opt);
+                                           ireq_opt_deref(ireq));
                err = net_xmit_eval(err);
        }
 
@@ -889,7 +889,7 @@ static int tcp_v4_send_synack(const struct sock *sk, struct dst_entry *dst,
  */
 static void tcp_v4_reqsk_destructor(struct request_sock *req)
 {
-       kfree(inet_rsk(req)->opt);
+       kfree(rcu_dereference_protected(inet_rsk(req)->ireq_opt, 1));
 }
 
 #ifdef CONFIG_TCP_MD5SIG
@@ -1265,10 +1265,11 @@ static void tcp_v4_init_req(struct request_sock *req,
                            struct sk_buff *skb)
 {
        struct inet_request_sock *ireq = inet_rsk(req);
+       struct net *net = sock_net(sk_listener);
 
        sk_rcv_saddr_set(req_to_sk(req), ip_hdr(skb)->daddr);
        sk_daddr_set(req_to_sk(req), ip_hdr(skb)->saddr);
-       ireq->opt = tcp_v4_save_options(sock_net(sk_listener), skb);
+       RCU_INIT_POINTER(ireq->ireq_opt, tcp_v4_save_options(net, skb));
 }
 
 static struct dst_entry *tcp_v4_route_req(const struct sock *sk,
@@ -1355,10 +1356,9 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,
        sk_daddr_set(newsk, ireq->ir_rmt_addr);
        sk_rcv_saddr_set(newsk, ireq->ir_loc_addr);
        newsk->sk_bound_dev_if = ireq->ir_iif;
-       newinet->inet_saddr           = ireq->ir_loc_addr;
-       inet_opt              = ireq->opt;
-       rcu_assign_pointer(newinet->inet_opt, inet_opt);
-       ireq->opt             = NULL;
+       newinet->inet_saddr   = ireq->ir_loc_addr;
+       inet_opt              = rcu_dereference(ireq->ireq_opt);
+       RCU_INIT_POINTER(newinet->inet_opt, inet_opt);
        newinet->mc_index     = inet_iif(skb);
        newinet->mc_ttl       = ip_hdr(skb)->ttl;
        newinet->rcv_tos      = ip_hdr(skb)->tos;
@@ -1403,9 +1403,12 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,
        if (__inet_inherit_port(sk, newsk) < 0)
                goto put_and_exit;
        *own_req = inet_ehash_nolisten(newsk, req_to_sk(req_unhash));
-       if (*own_req)
+       if (likely(*own_req)) {
                tcp_move_syn(newtp, req);
-
+               ireq->ireq_opt = NULL;
+       } else {
+               newinet->inet_opt = NULL;
+       }
        return newsk;
 
 exit_overflow:
@@ -1416,6 +1419,7 @@ exit:
        tcp_listendrop(sk);
        return NULL;
 put_and_exit:
+       newinet->inet_opt = NULL;
        inet_csk_prepare_forced_close(newsk);
        tcp_done(newsk);
        goto exit;
@@ -1503,23 +1507,23 @@ csum_err:
 }
 EXPORT_SYMBOL(tcp_v4_do_rcv);
 
-void tcp_v4_early_demux(struct sk_buff *skb)
+int tcp_v4_early_demux(struct sk_buff *skb)
 {
        const struct iphdr *iph;
        const struct tcphdr *th;
        struct sock *sk;
 
        if (skb->pkt_type != PACKET_HOST)
-               return;
+               return 0;
 
        if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct tcphdr)))
-               return;
+               return 0;
 
        iph = ip_hdr(skb);
        th = tcp_hdr(skb);
 
        if (th->doff < sizeof(struct tcphdr) / 4)
-               return;
+               return 0;
 
        sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo,
                                       iph->saddr, th->source,
@@ -1538,6 +1542,7 @@ void tcp_v4_early_demux(struct sk_buff *skb)
                                skb_dst_set_noref(skb, dst);
                }
        }
+       return 0;
 }
 
 bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
index 102b2c90bb807d3a88d31b59324baf72cf901cdf..0f0d740f6c8b91dd0636709c1d194170fd3a3863 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/rcupdate.h>
 #include <linux/spinlock.h>
 #include <linux/jiffies.h>
index 1ff73982e28c58ecd0faa787e5ee30793e30dea8..125fc1450b019b4d799f45d1535bba8cce99b5f2 100644 (file)
@@ -252,7 +252,7 @@ static void tcpnv_acked(struct sock *sk, const struct ack_sample *sample)
 
        /* rate in 100's bits per second */
        rate64 = ((u64)sample->in_flight) * 8000000;
-       rate = (u32)div64_u64(rate64, (u64)(avg_rtt * 100));
+       rate = (u32)div64_u64(rate64, (u64)(avg_rtt ?: 1) * 100);
 
        /* Remember the maximum rate seen during this RTT
         * Note: It may be more than one RTT. This function should be
index 1c839c99114cd22bbfbd181cf702acccb3aeb61b..478909f4694d00076c96b7a3be1eda62b6be8bef 100644 (file)
@@ -739,8 +739,10 @@ static void tcp_tsq_handler(struct sock *sk)
                struct tcp_sock *tp = tcp_sk(sk);
 
                if (tp->lost_out > tp->retrans_out &&
-                   tp->snd_cwnd > tcp_packets_in_flight(tp))
+                   tp->snd_cwnd > tcp_packets_in_flight(tp)) {
+                       tcp_mstamp_refresh(tp);
                        tcp_xmit_retransmit_queue(sk);
+               }
 
                tcp_write_xmit(sk, tcp_current_mss(sk), tp->nonagle,
                               0, GFP_ATOMIC);
@@ -1806,40 +1808,6 @@ static bool tcp_snd_wnd_test(const struct tcp_sock *tp,
        return !after(end_seq, tcp_wnd_end(tp));
 }
 
-/* This checks if the data bearing packet SKB (usually tcp_send_head(sk))
- * should be put on the wire right now.  If so, it returns the number of
- * packets allowed by the congestion window.
- */
-static unsigned int tcp_snd_test(const struct sock *sk, struct sk_buff *skb,
-                                unsigned int cur_mss, int nonagle)
-{
-       const struct tcp_sock *tp = tcp_sk(sk);
-       unsigned int cwnd_quota;
-
-       tcp_init_tso_segs(skb, cur_mss);
-
-       if (!tcp_nagle_test(tp, skb, cur_mss, nonagle))
-               return 0;
-
-       cwnd_quota = tcp_cwnd_test(tp, skb);
-       if (cwnd_quota && !tcp_snd_wnd_test(tp, skb, cur_mss))
-               cwnd_quota = 0;
-
-       return cwnd_quota;
-}
-
-/* Test if sending is allowed right now. */
-bool tcp_may_send_now(struct sock *sk)
-{
-       const struct tcp_sock *tp = tcp_sk(sk);
-       struct sk_buff *skb = tcp_send_head(sk);
-
-       return skb &&
-               tcp_snd_test(sk, skb, tcp_current_mss(sk),
-                            (tcp_skb_is_last(sk, skb) ?
-                             tp->nonagle : TCP_NAGLE_PUSH));
-}
-
 /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet
  * which is put after SKB on the list.  It is very much like
  * tcp_fragment() except that it may make several kinds of assumptions
@@ -2094,6 +2062,7 @@ static int tcp_mtu_probe(struct sock *sk)
        nskb->ip_summed = skb->ip_summed;
 
        tcp_insert_write_queue_before(nskb, skb, sk);
+       tcp_highest_sack_replace(sk, skb, nskb);
 
        len = 0;
        tcp_for_write_queue_from_safe(skb, next, sk) {
@@ -2271,6 +2240,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
 
        sent_pkts = 0;
 
+       tcp_mstamp_refresh(tp);
        if (!push_one) {
                /* Do MTU probing. */
                result = tcp_mtu_probe(sk);
@@ -2282,7 +2252,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
        }
 
        max_segs = tcp_tso_segs(sk, mss_now);
-       tcp_mstamp_refresh(tp);
        while ((skb = tcp_send_head(sk))) {
                unsigned int limit;
 
@@ -2697,7 +2666,7 @@ static bool tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
                else if (!skb_shift(skb, next_skb, next_skb_size))
                        return false;
        }
-       tcp_highest_sack_combine(sk, next_skb, skb);
+       tcp_highest_sack_replace(sk, next_skb, skb);
 
        tcp_unlink_write_queue(next_skb, sk);
 
@@ -2875,8 +2844,10 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
                nskb = __pskb_copy(skb, MAX_TCP_HEADER, GFP_ATOMIC);
                err = nskb ? tcp_transmit_skb(sk, nskb, 0, GFP_ATOMIC) :
                             -ENOBUFS;
-               if (!err)
+               if (!err) {
                        skb->skb_mstamp = tp->tcp_mstamp;
+                       tcp_rate_skb_sent(sk, skb);
+               }
        } else {
                err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);
        }
@@ -3209,13 +3180,8 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
        th->source = htons(ireq->ir_num);
        th->dest = ireq->ir_rmt_port;
        skb->mark = ireq->ir_mark;
-       /* Setting of flags are superfluous here for callers (and ECE is
-        * not even correctly set)
-        */
-       tcp_init_nondata_skb(skb, tcp_rsk(req)->snt_isn,
-                            TCPHDR_SYN | TCPHDR_ACK);
-
-       th->seq = htonl(TCP_SKB_CB(skb)->seq);
+       skb->ip_summed = CHECKSUM_PARTIAL;
+       th->seq = htonl(tcp_rsk(req)->snt_isn);
        /* XXX data is queued and acked as is. No buffer/window check */
        th->ack_seq = htonl(tcp_rsk(req)->rcv_nxt);
 
@@ -3423,6 +3389,10 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn)
                goto done;
        }
 
+       /* data was not sent, this is our new send_head */
+       sk->sk_send_head = syn_data;
+       tp->packets_out -= tcp_skb_pcount(syn_data);
+
 fallback:
        /* Send a regular SYN with Fast Open cookie request option */
        if (fo->cookie.len > 0)
@@ -3475,6 +3445,11 @@ int tcp_connect(struct sock *sk)
         */
        tp->snd_nxt = tp->write_seq;
        tp->pushed_seq = tp->write_seq;
+       buff = tcp_send_head(sk);
+       if (unlikely(buff)) {
+               tp->snd_nxt     = TCP_SKB_CB(buff)->seq;
+               tp->pushed_seq  = TCP_SKB_CB(buff)->seq;
+       }
        TCP_INC_STATS(sock_net(sk), TCP_MIB_ACTIVEOPENS);
 
        /* Timer for repeating the SYN until an answer. */
index 449cd914d58e1df8352fd9180fbdb5b0feef683c..be8ef1e5dfef79e9d1bdfef4e2199d45cc5536a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/tcp.h>
 #include <net/tcp.h>
 
index 248cfc0ff9aeb78b146c5c77496031b9014fce67..4f24d0e37d9c1e9d5336e8e99253e660143362c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * TCP Vegas congestion control interface
  */
index ef29df8648e4d388547269fe6f972e8ab473419e..ebfbccae62fde187ec5863670c03cd5b5c96258b 100644 (file)
@@ -231,10 +231,7 @@ static int udp_reuseport_add_sock(struct sock *sk, struct udp_hslot *hslot)
                }
        }
 
-       /* Initial allocation may have already happened via setsockopt */
-       if (!rcu_access_pointer(sk->sk_reuseport_cb))
-               return reuseport_alloc(sk);
-       return 0;
+       return reuseport_alloc(sk);
 }
 
 /**
@@ -1061,7 +1058,7 @@ back_from_confirm:
                /* ... which is an evident application bug. --ANK */
                release_sock(sk);
 
-               net_dbg_ratelimited("cork app bug 2\n");
+               net_dbg_ratelimited("socket already corked\n");
                err = -EINVAL;
                goto out;
        }
@@ -1144,7 +1141,7 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset,
        if (unlikely(!up->pending)) {
                release_sock(sk);
 
-               net_dbg_ratelimited("udp cork app bug 3\n");
+               net_dbg_ratelimited("cork failed\n");
                return -EINVAL;
        }
 
@@ -2221,9 +2218,10 @@ static struct sock *__udp4_lib_demux_lookup(struct net *net,
        return NULL;
 }
 
-void udp_v4_early_demux(struct sk_buff *skb)
+int udp_v4_early_demux(struct sk_buff *skb)
 {
        struct net *net = dev_net(skb->dev);
+       struct in_device *in_dev = NULL;
        const struct iphdr *iph;
        const struct udphdr *uh;
        struct sock *sk = NULL;
@@ -2234,25 +2232,21 @@ void udp_v4_early_demux(struct sk_buff *skb)
 
        /* validate the packet */
        if (!pskb_may_pull(skb, skb_transport_offset(skb) + sizeof(struct udphdr)))
-               return;
+               return 0;
 
        iph = ip_hdr(skb);
        uh = udp_hdr(skb);
 
-       if (skb->pkt_type == PACKET_BROADCAST ||
-           skb->pkt_type == PACKET_MULTICAST) {
-               struct in_device *in_dev = __in_dev_get_rcu(skb->dev);
+       if (skb->pkt_type == PACKET_MULTICAST) {
+               in_dev = __in_dev_get_rcu(skb->dev);
 
                if (!in_dev)
-                       return;
+                       return 0;
 
-               /* we are supposed to accept bcast packets */
-               if (skb->pkt_type == PACKET_MULTICAST) {
-                       ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr,
-                                              iph->protocol);
-                       if (!ours)
-                               return;
-               }
+               ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr,
+                                      iph->protocol);
+               if (!ours)
+                       return 0;
 
                sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr,
                                                   uh->source, iph->saddr,
@@ -2263,7 +2257,7 @@ void udp_v4_early_demux(struct sk_buff *skb)
        }
 
        if (!sk || !refcount_inc_not_zero(&sk->sk_refcnt))
-               return;
+               return 0;
 
        skb->sk = sk;
        skb->destructor = sock_efree;
@@ -2272,12 +2266,23 @@ void udp_v4_early_demux(struct sk_buff *skb)
        if (dst)
                dst = dst_check(dst, 0);
        if (dst) {
+               u32 itag = 0;
+
                /* set noref for now.
                 * any place which wants to hold dst has to call
                 * dst_hold_safe()
                 */
                skb_dst_set_noref(skb, dst);
+
+               /* for unconnected multicast sockets we need to validate
+                * the source on each packet
+                */
+               if (!inet_sk(sk)->inet_daddr && in_dev)
+                       return ip_mc_validate_source(skb, iph->daddr,
+                                                    iph->saddr, iph->tos,
+                                                    skb->dev, in_dev, &itag);
        }
+       return 0;
 }
 
 int udp_rcv(struct sk_buff *skb)
index a8cf8c6fb60ccf532fda1b109f902ead378acf22..e7d18b140287f013d2b8c043a982a44bee8f91dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UDP4_IMPL_H
 #define _UDP4_IMPL_H
 #include <net/udp.h>
index 97658bfc1b58ab8a19026811e3aa917e598e554b..e360d55be5554d1bee56d3f493752ba9ae2c8015 100644 (file)
@@ -120,7 +120,7 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
                 * will be using a length value equal to only one MSS sized
                 * segment instead of the entire frame.
                 */
-               if (gso_partial) {
+               if (gso_partial && skb_is_gso(skb)) {
                        uh->len = htons(skb_shinfo(skb)->gso_size +
                                        SKB_GSO_CB(skb)->data_offset +
                                        skb->head - (unsigned char *)uh);
index 1fc684111ce6afe6798bb21f5dcbcbcab53b9f6b..e50b7fea57ee35c117002463f473ccd41face358 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm4_input.c
  *
index d7bf0b0418858cac8c2689fea8bfe3e83a160a15..05017e2c849c12b43715fe4944759a3c91880ee8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm4_policy.c
  *
index d6660a8c0ea58c971c62e4e888e6256610c011ca..80c40b4981bb51ede84aeb235444538612cfa30b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm4_state.c
  *
index 10e342363793550c6b8ef5a114f73be91f237335..e0026fa1261bcb277586ddbbffde615200d19604 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux TCP/IP (INET6) layer.
 #
index c2e2a78787ec990f4dac2040fb1e26dc150860e2..8a1c846d3df949a4638589f187120db22a3525ba 100644 (file)
@@ -1399,10 +1399,18 @@ static inline int ipv6_saddr_preferred(int type)
        return 0;
 }
 
-static inline bool ipv6_use_optimistic_addr(struct inet6_dev *idev)
+static bool ipv6_use_optimistic_addr(struct net *net,
+                                    struct inet6_dev *idev)
 {
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
-       return idev && idev->cnf.optimistic_dad && idev->cnf.use_optimistic;
+       if (!idev)
+               return false;
+       if (!net->ipv6.devconf_all->optimistic_dad && !idev->cnf.optimistic_dad)
+               return false;
+       if (!net->ipv6.devconf_all->use_optimistic && !idev->cnf.use_optimistic)
+               return false;
+
+       return true;
 #else
        return false;
 #endif
@@ -1472,7 +1480,7 @@ static int ipv6_get_saddr_eval(struct net *net,
                /* Rule 3: Avoid deprecated and optimistic addresses */
                u8 avoid = IFA_F_DEPRECATED;
 
-               if (!ipv6_use_optimistic_addr(score->ifa->idev))
+               if (!ipv6_use_optimistic_addr(net, score->ifa->idev))
                        avoid |= IFA_F_OPTIMISTIC;
                ret = ipv6_saddr_preferred(score->addr_type) ||
                      !(score->ifa->flags & avoid);
@@ -2460,7 +2468,8 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
                int max_addresses = in6_dev->cnf.max_addresses;
 
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
-               if (in6_dev->cnf.optimistic_dad &&
+               if ((net->ipv6.devconf_all->optimistic_dad ||
+                    in6_dev->cnf.optimistic_dad) &&
                    !net->ipv6.devconf_all->forwarding && sllao)
                        addr_flags |= IFA_F_OPTIMISTIC;
 #endif
@@ -3051,7 +3060,8 @@ void addrconf_add_linklocal(struct inet6_dev *idev,
        u32 addr_flags = flags | IFA_F_PERMANENT;
 
 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
-       if (idev->cnf.optimistic_dad &&
+       if ((dev_net(idev->dev)->ipv6.devconf_all->optimistic_dad ||
+            idev->cnf.optimistic_dad) &&
            !dev_net(idev->dev)->ipv6.devconf_all->forwarding)
                addr_flags |= IFA_F_OPTIMISTIC;
 #endif
@@ -3325,6 +3335,7 @@ static void addrconf_permanent_addr(struct net_device *dev)
                if ((ifp->flags & IFA_F_PERMANENT) &&
                    fixup_permanent_addr(idev, ifp) < 0) {
                        write_unlock_bh(&idev->lock);
+                       in6_ifa_hold(ifp);
                        ipv6_del_addr(ifp);
                        write_lock_bh(&idev->lock);
 
@@ -3810,7 +3821,8 @@ static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
                goto out;
 
        if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
-           idev->cnf.accept_dad < 1 ||
+           (dev_net(dev)->ipv6.devconf_all->accept_dad < 1 &&
+            idev->cnf.accept_dad < 1) ||
            !(ifp->flags&IFA_F_TENTATIVE) ||
            ifp->flags & IFA_F_NODAD) {
                bump_id = ifp->flags & IFA_F_TENTATIVE;
@@ -3841,7 +3853,7 @@ static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
         */
        if (ifp->flags & IFA_F_OPTIMISTIC) {
                ip6_ins_rt(ifp->rt);
-               if (ipv6_use_optimistic_addr(idev)) {
+               if (ipv6_use_optimistic_addr(dev_net(dev), idev)) {
                        /* Because optimistic nodes can use this address,
                         * notify listeners. If DAD fails, RTM_DELADDR is sent.
                         */
@@ -3897,7 +3909,9 @@ static void addrconf_dad_work(struct work_struct *w)
                action = DAD_ABORT;
                ifp->state = INET6_IFADDR_STATE_POSTDAD;
 
-               if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6 &&
+               if ((dev_net(idev->dev)->ipv6.devconf_all->accept_dad > 1 ||
+                    idev->cnf.accept_dad > 1) &&
+                   !idev->cnf.disable_ipv6 &&
                    !(ifp->flags & IFA_F_STABLE_PRIVACY)) {
                        struct in6_addr addr;
 
@@ -4940,9 +4954,10 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
 
        /* Don't send DELADDR notification for TENTATIVE address,
         * since NEWADDR notification is sent only after removing
-        * TENTATIVE flag.
+        * TENTATIVE flag, if DAD has not failed.
         */
-       if (ifa->flags & IFA_F_TENTATIVE && event == RTM_DELADDR)
+       if (ifa->flags & IFA_F_TENTATIVE && !(ifa->flags & IFA_F_DADFAILED) &&
+           event == RTM_DELADDR)
                return;
 
        skb = nlmsg_new(inet6_ifaddr_msgsize(), GFP_ATOMIC);
index b055bc79f56d555c89684116c1580984950f77a8..f664871feca666fb6256990c2fc36fc15940a541 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IPv6 Address Label subsystem
  * for the IPv6 "Default" Source Address Selection
index 0c02a09bc3514c0860aa9ff4a56066f31a37a78a..696281b4bca2fb4ccd86d1e047528d7886926325 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/errno.h>
 #include <linux/ip.h>
 #include <linux/kernel.h>
index 5bd419c1abc8b7ba3c564eb33ff6611dabcb47fb..3123b9de91b5eccef3c64e9a8d11e12ddfdcb85f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/jhash.h>
 #include <linux/netfilter.h>
 #include <linux/rcupdate.h>
index c0cbcb259f5a9acf9157d4626c61f532d8077855..ec43d18b5ff91f360869fd348a23a23633cc8e33 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <net/ip.h>
 #include <net/udp.h>
 #include <net/udplite.h>
index 8081bafe441b83f60f414114bfdc3529d6ea0a09..15535ee327c5780e80feb050c2ab4e0d1cc3e99c 100644 (file)
@@ -315,6 +315,7 @@ struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space,
        }
        opt_space->dst1opt = fopt->dst1opt;
        opt_space->opt_flen = fopt->opt_flen;
+       opt_space->tot_len = fopt->tot_len;
        return opt_space;
 }
 EXPORT_SYMBOL_GPL(fl6_merge_options);
index b7a72d40933441f835708f55e2d8af371661a5fb..59c121b932ac5140380e4592568e455caa64287e 100644 (file)
@@ -408,13 +408,16 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
        case ICMPV6_DEST_UNREACH:
                net_dbg_ratelimited("%s: Path to destination invalid or inactive!\n",
                                    t->parms.name);
-               break;
+               if (code != ICMPV6_PORT_UNREACH)
+                       break;
+               return;
        case ICMPV6_TIME_EXCEED:
                if (code == ICMPV6_EXC_HOPLIMIT) {
                        net_dbg_ratelimited("%s: Too small hop limit or routing loop in tunnel!\n",
                                            t->parms.name);
+                       break;
                }
-               break;
+               return;
        case ICMPV6_PARAMPROB:
                teli = 0;
                if (code == ICMPV6_HDR_FIELD)
@@ -430,7 +433,7 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                        net_dbg_ratelimited("%s: Recipient unable to parse tunneled packet!\n",
                                            t->parms.name);
                }
-               break;
+               return;
        case ICMPV6_PKT_TOOBIG:
                mtu = be32_to_cpu(info) - offset - t->tun_hlen;
                if (t->dev->type == ARPHRD_ETHER)
@@ -438,7 +441,7 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
                if (mtu < IPV6_MIN_MTU)
                        mtu = IPV6_MIN_MTU;
                t->dev->mtu = mtu;
-               break;
+               return;
        }
 
        if (time_before(jiffies, t->err_time + IP6TUNNEL_ERR_TIMEO))
@@ -500,8 +503,8 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
                               __u32 *pmtu, __be16 proto)
 {
        struct ip6_tnl *tunnel = netdev_priv(dev);
-       __be16 protocol = (dev->type == ARPHRD_ETHER) ?
-                         htons(ETH_P_TEB) : proto;
+       struct dst_entry *dst = skb_dst(skb);
+       __be16 protocol;
 
        if (dev->type == ARPHRD_ETHER)
                IPCB(skb)->flags = 0;
@@ -515,9 +518,14 @@ static netdev_tx_t __gre6_xmit(struct sk_buff *skb,
                tunnel->o_seqno++;
 
        /* Push GRE header. */
+       protocol = (dev->type == ARPHRD_ETHER) ? htons(ETH_P_TEB) : proto;
        gre_build_header(skb, tunnel->tun_hlen, tunnel->parms.o_flags,
                         protocol, tunnel->parms.o_key, htonl(tunnel->o_seqno));
 
+       /* TooBig packet may have updated dst->dev's mtu */
+       if (dst && dst_mtu(dst) > dst->dev->mtu)
+               dst->ops->update_pmtu(dst, NULL, skb, dst->dev->mtu);
+
        return ip6_tnl_xmit(skb, dev, dsfield, fl6, encap_limit, pmtu,
                            NEXTHDR_GRE);
 }
@@ -940,24 +948,25 @@ done:
 }
 
 static int ip6gre_header(struct sk_buff *skb, struct net_device *dev,
-                       unsigned short type,
-                       const void *daddr, const void *saddr, unsigned int len)
+                        unsigned short type, const void *daddr,
+                        const void *saddr, unsigned int len)
 {
        struct ip6_tnl *t = netdev_priv(dev);
-       struct ipv6hdr *ipv6h = skb_push(skb, t->hlen);
-       __be16 *p = (__be16 *)(ipv6h+1);
+       struct ipv6hdr *ipv6h;
+       __be16 *p;
 
-       ip6_flow_hdr(ipv6h, 0,
-                    ip6_make_flowlabel(dev_net(dev), skb,
-                                       t->fl.u.ip6.flowlabel, true,
-                                       &t->fl.u.ip6));
+       ipv6h = skb_push(skb, t->hlen + sizeof(*ipv6h));
+       ip6_flow_hdr(ipv6h, 0, ip6_make_flowlabel(dev_net(dev), skb,
+                                                 t->fl.u.ip6.flowlabel,
+                                                 true, &t->fl.u.ip6));
        ipv6h->hop_limit = t->parms.hop_limit;
        ipv6h->nexthdr = NEXTHDR_GRE;
        ipv6h->saddr = t->parms.laddr;
        ipv6h->daddr = t->parms.raddr;
 
-       p[0]            = t->parms.o_flags;
-       p[1]            = htons(type);
+       p = (__be16 *)(ipv6h + 1);
+       p[0] = t->parms.o_flags;
+       p[1] = htons(type);
 
        /*
         *      Set the source hardware address.
@@ -1310,6 +1319,7 @@ static void ip6gre_tap_setup(struct net_device *dev)
        dev->features |= NETIF_F_NETNS_LOCAL;
        dev->priv_flags &= ~IFF_TX_SKB_SHARING;
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+       netif_keep_dst(dev);
 }
 
 static bool ip6gre_netlink_encap_parms(struct nlattr *data[],
index 713676f14a0ee2d3478667a846cfa1b536fe511c..02045494c24cccaa8b50af839aae975695319922 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/export.h>
 #include <linux/icmpv6.h>
 #include <linux/mutex.h>
index cdb3728faca7746d91e2430f6024f060a82b24fd..4a87f9428ca519b475f8feaceaaa3a225bcfe6d2 100644 (file)
@@ -105,7 +105,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
 
        for (skb = segs; skb; skb = skb->next) {
                ipv6h = (struct ipv6hdr *)(skb_mac_header(skb) + nhoff);
-               if (gso_partial)
+               if (gso_partial && skb_is_gso(skb))
                        payload_len = skb_shinfo(skb)->gso_size +
                                      SKB_GSO_CB(skb)->data_offset +
                                      skb->head - (unsigned char *)(ipv6h + 1);
index 43ca864327c73015f1724879d7ee8268a0de513b..5110a418cc4d0c1040506394460cb482698d8c15 100644 (file)
@@ -1161,11 +1161,11 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
                if (WARN_ON(v6_cork->opt))
                        return -EINVAL;
 
-               v6_cork->opt = kzalloc(opt->tot_len, sk->sk_allocation);
+               v6_cork->opt = kzalloc(sizeof(*opt), sk->sk_allocation);
                if (unlikely(!v6_cork->opt))
                        return -ENOBUFS;
 
-               v6_cork->opt->tot_len = opt->tot_len;
+               v6_cork->opt->tot_len = sizeof(*opt);
                v6_cork->opt->opt_flen = opt->opt_flen;
                v6_cork->opt->opt_nflen = opt->opt_nflen;
 
index ae73164559d5c4d7f2650ae63c56d76dc93b165c..a1c24443cd9e01de9c6e2d5d68c0f8426e25ceec 100644 (file)
@@ -1043,6 +1043,7 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
        struct dst_entry *dst = NULL, *ndst = NULL;
        struct net_device *tdev;
        int mtu;
+       unsigned int eth_hlen = t->dev->type == ARPHRD_ETHER ? ETH_HLEN : 0;
        unsigned int psh_hlen = sizeof(struct ipv6hdr) + t->encap_hlen;
        unsigned int max_headroom = psh_hlen;
        bool use_cache = false;
@@ -1124,7 +1125,7 @@ route_lookup:
                                     t->parms.name);
                goto tx_err_dst_release;
        }
-       mtu = dst_mtu(dst) - psh_hlen - t->tun_hlen;
+       mtu = dst_mtu(dst) - eth_hlen - psh_hlen - t->tun_hlen;
        if (encap_limit >= 0) {
                max_headroom += 8;
                mtu -= 8;
@@ -1133,7 +1134,7 @@ route_lookup:
                mtu = IPV6_MIN_MTU;
        if (skb_dst(skb) && !t->parms.collect_md)
                skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
-       if (skb->len - t->tun_hlen > mtu && !skb_is_gso(skb)) {
+       if (skb->len - t->tun_hlen - eth_hlen > mtu && !skb_is_gso(skb)) {
                *pmtu = mtu;
                err = -EMSGSIZE;
                goto tx_err_dst_release;
@@ -2259,6 +2260,9 @@ static int __init ip6_tunnel_init(void)
 {
        int  err;
 
+       if (!ipv6_mod_enabled())
+               return -EOPNOTSUPP;
+
        err = register_pernet_device(&ip6_tnl_net_ops);
        if (err < 0)
                goto out_pernet;
index 79444a4bfd6d245b66a7edcefe2b5b32801bf2c0..bcdc2d557de13914b5046dece683614eb5f8f8c8 100644 (file)
@@ -445,6 +445,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
        struct dst_entry *dst = skb_dst(skb);
        struct net_device *tdev;
        struct xfrm_state *x;
+       int pkt_len = skb->len;
        int err = -1;
        int mtu;
 
@@ -502,7 +503,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
                struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
 
                u64_stats_update_begin(&tstats->syncp);
-               tstats->tx_bytes += skb->len;
+               tstats->tx_bytes += pkt_len;
                tstats->tx_packets++;
                u64_stats_update_end(&tstats->syncp);
        } else {
index fe180c96040e28b0e78862ca911678846ea570a7..c6ee0cdd0ba9821e9ae93045aaeac41ae2e4bcc7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the netfilter modules on top of IPv6.
 #
index a5cd43d75393db2152fa5a4edb0b505d20fc2f45..437af8c95277f7a3364f2d0492455a172cc22ab8 100644 (file)
@@ -353,7 +353,7 @@ static unsigned int ipv6_synproxy_hook(void *priv,
        nexthdr = ipv6_hdr(skb)->nexthdr;
        thoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr,
                                 &frag_off);
-       if (thoff < 0)
+       if (thoff < 0 || nexthdr != IPPROTO_TCP)
                return NF_ACCEPT;
 
        th = skb_header_pointer(skb, thoff, sizeof(_th), &_th);
index 26cc9f483b6d282f0a665bfc4c2c206da7981921..a96d5b385d8fa25bab416d3f6bc836e743b3ca99 100644 (file)
@@ -1325,7 +1325,7 @@ struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_ori
        struct dst_entry *new = NULL;
 
        rt = dst_alloc(&ip6_dst_blackhole_ops, loopback_dev, 1,
-                      DST_OBSOLETE_NONE, 0);
+                      DST_OBSOLETE_DEAD, 0);
        if (rt) {
                rt6_info_init(rt);
 
index 6fbf8ae5e52cccd10bca77793a368ee3166bf01e..f7051ba5b8af38d78ae334af8c49a13305dfaae7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysctl_net_ipv6.c: sysctl interface to net IPV6 subsystem.
  *
index e2ecfb137297b931f05eb4d511f8e85cc7633336..40d7234c27b991e54f5cfbacb5d7081e8277ae56 100644 (file)
@@ -1015,6 +1015,7 @@ static void udp6_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb,
                 */
                offset = skb_transport_offset(skb);
                skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
+               csum = skb->csum;
 
                skb->ip_summed = CHECKSUM_NONE;
 
index f180b3d85e3147facb487720bb3d98722ae76a45..7903e21c178b94f1a58faf4362609908b64e5fa3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UDP6_IMPL_H
 #define _UDP6_IMPL_H
 #include <net/udp.h>
index f95943a13abc7a520b4d0ee245e9c846d68eaf6e..fe04e23af9862557fde2a9c214faf3a10b7e5eda 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm6_input.c: based on net/ipv4/xfrm4_input.c
  *
index 11d1314ab6c5c027bdefb6a4283773fd58307bd5..17e95a0386b3631a19aeb771a9efde28f62f0ae7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm6_policy.c: based on xfrm4_policy.c
  *
index 8a1f9c0d2a13b27ae0b67c9eacf802f30e656115..b15075a5c227d29db0171a194f7cd83732e78069 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm6_state.c: based on xfrm4_state.c
  *
index 7d75e4c5c75d883dbdc75ab02d99a443e5050d3b..38a3d51d9eadc0e3f9840af2cc7145cbb3cfd428 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     IPX proc routines
  *
index b5d91447f3dcd67b66463952e00596f153df3e44..3cf93aa9f284f3ed5723d4766e96c4ae1c892147 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     Implements the IPX routing routines.
  *     Code moved from af_ipx.c.
index 32dcd601ab3262b8b634d86613d34f4403aaa89f..ba7d4214bbffdb5fc1670828edb235607843a622 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/in.h>
 #include <linux/mm.h>
 #include <linux/module.h>
index 0dafcc561ed612c550e352ace51187b937fb4bd7..c3eef457db881665d6e3c6625ecc8ccde902a331 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* -*- linux-c -*-
  * sysctl_net_ipx.c: sysctl interface to net IPX subsystem.
  *
index c748e8a6a72caf35a8016255a39a4910386bb72d..bd572331506982a78a7826a3883fbc14b386a163 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/in.h>
 #include <linux/inet.h>
 #include <linux/list.h>
index 2870f41ea44debb6aa95424cb6e2c5d682e0d763..399a7e5db2f4a7a57741fce3d0e503bb479d95a9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the L2TP.
 #
index ee485df73ccdd0f154579741462c19ab68574b4f..02d61101b108dcc6b8360e3184f9432cf2192955 100644 (file)
@@ -1314,6 +1314,9 @@ again:
 
                        hlist_del_init(&session->hlist);
 
+                       if (test_and_set_bit(0, &session->dead))
+                               goto again;
+
                        if (session->ref != NULL)
                                (*session->ref)(session);
 
@@ -1685,14 +1688,12 @@ EXPORT_SYMBOL_GPL(l2tp_tunnel_create);
 
 /* This function is used by the netlink TUNNEL_DELETE command.
  */
-int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)
+void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel)
 {
-       l2tp_tunnel_inc_refcount(tunnel);
-       if (false == queue_work(l2tp_wq, &tunnel->del_work)) {
-               l2tp_tunnel_dec_refcount(tunnel);
-               return 1;
+       if (!test_and_set_bit(0, &tunnel->dead)) {
+               l2tp_tunnel_inc_refcount(tunnel);
+               queue_work(l2tp_wq, &tunnel->del_work);
        }
-       return 0;
 }
 EXPORT_SYMBOL_GPL(l2tp_tunnel_delete);
 
@@ -1750,6 +1751,9 @@ EXPORT_SYMBOL_GPL(__l2tp_session_unhash);
  */
 int l2tp_session_delete(struct l2tp_session *session)
 {
+       if (test_and_set_bit(0, &session->dead))
+               return 0;
+
        if (session->ref)
                (*session->ref)(session);
        __l2tp_session_unhash(session);
index a305e0c5925a2ccb202383642a9f7220282d7489..67c79d9b5c6cb418221f1c06df62c48117405b4c 100644 (file)
@@ -76,6 +76,7 @@ struct l2tp_session_cfg {
 struct l2tp_session {
        int                     magic;          /* should be
                                                 * L2TP_SESSION_MAGIC */
+       long                    dead;
 
        struct l2tp_tunnel      *tunnel;        /* back pointer to tunnel
                                                 * context */
@@ -160,6 +161,9 @@ struct l2tp_tunnel_cfg {
 
 struct l2tp_tunnel {
        int                     magic;          /* Should be L2TP_TUNNEL_MAGIC */
+
+       unsigned long           dead;
+
        struct rcu_head rcu;
        rwlock_t                hlist_lock;     /* protect session_hlist */
        bool                    acpt_newsess;   /* Indicates whether this
@@ -254,7 +258,7 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id,
                       u32 peer_tunnel_id, struct l2tp_tunnel_cfg *cfg,
                       struct l2tp_tunnel **tunnelp);
 void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel);
-int l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
+void l2tp_tunnel_delete(struct l2tp_tunnel *tunnel);
 struct l2tp_session *l2tp_session_create(int priv_size,
                                         struct l2tp_tunnel *tunnel,
                                         u32 session_id, u32 peer_session_id,
index 87da9ef61860886d9bf5cc668524ef8b48a60c31..014a7bc2a872514cf4422302a92b692ecda31c27 100644 (file)
@@ -44,7 +44,6 @@ struct l2tp_eth {
        struct net_device       *dev;
        struct sock             *tunnel_sock;
        struct l2tp_session     *session;
-       struct list_head        list;
        atomic_long_t           tx_bytes;
        atomic_long_t           tx_packets;
        atomic_long_t           tx_dropped;
@@ -58,17 +57,6 @@ struct l2tp_eth_sess {
        struct net_device       *dev;
 };
 
-/* per-net private data for this module */
-static unsigned int l2tp_eth_net_id;
-struct l2tp_eth_net {
-       struct list_head l2tp_eth_dev_list;
-       spinlock_t l2tp_eth_lock;
-};
-
-static inline struct l2tp_eth_net *l2tp_eth_pernet(struct net *net)
-{
-       return net_generic(net, l2tp_eth_net_id);
-}
 
 static int l2tp_eth_dev_init(struct net_device *dev)
 {
@@ -84,12 +72,6 @@ static int l2tp_eth_dev_init(struct net_device *dev)
 
 static void l2tp_eth_dev_uninit(struct net_device *dev)
 {
-       struct l2tp_eth *priv = netdev_priv(dev);
-       struct l2tp_eth_net *pn = l2tp_eth_pernet(dev_net(dev));
-
-       spin_lock(&pn->l2tp_eth_lock);
-       list_del_init(&priv->list);
-       spin_unlock(&pn->l2tp_eth_lock);
        dev_put(dev);
 }
 
@@ -273,7 +255,6 @@ static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel,
        struct l2tp_eth *priv;
        struct l2tp_eth_sess *spriv;
        int rc;
-       struct l2tp_eth_net *pn;
 
        if (cfg->ifname) {
                strlcpy(name, cfg->ifname, IFNAMSIZ);
@@ -305,7 +286,6 @@ static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel,
        priv = netdev_priv(dev);
        priv->dev = dev;
        priv->session = session;
-       INIT_LIST_HEAD(&priv->list);
 
        priv->tunnel_sock = tunnel->sock;
        session->recv_skb = l2tp_eth_dev_recv;
@@ -326,10 +306,6 @@ static int l2tp_eth_create(struct net *net, struct l2tp_tunnel *tunnel,
        strlcpy(session->ifname, dev->name, IFNAMSIZ);
 
        dev_hold(dev);
-       pn = l2tp_eth_pernet(dev_net(dev));
-       spin_lock(&pn->l2tp_eth_lock);
-       list_add(&priv->list, &pn->l2tp_eth_dev_list);
-       spin_unlock(&pn->l2tp_eth_lock);
 
        return 0;
 
@@ -342,22 +318,6 @@ out:
        return rc;
 }
 
-static __net_init int l2tp_eth_init_net(struct net *net)
-{
-       struct l2tp_eth_net *pn = net_generic(net, l2tp_eth_net_id);
-
-       INIT_LIST_HEAD(&pn->l2tp_eth_dev_list);
-       spin_lock_init(&pn->l2tp_eth_lock);
-
-       return 0;
-}
-
-static struct pernet_operations l2tp_eth_net_ops = {
-       .init = l2tp_eth_init_net,
-       .id   = &l2tp_eth_net_id,
-       .size = sizeof(struct l2tp_eth_net),
-};
-
 
 static const struct l2tp_nl_cmd_ops l2tp_eth_nl_cmd_ops = {
        .session_create = l2tp_eth_create,
@@ -371,25 +331,18 @@ static int __init l2tp_eth_init(void)
 
        err = l2tp_nl_register_ops(L2TP_PWTYPE_ETH, &l2tp_eth_nl_cmd_ops);
        if (err)
-               goto out;
-
-       err = register_pernet_device(&l2tp_eth_net_ops);
-       if (err)
-               goto out_unreg;
+               goto err;
 
        pr_info("L2TP ethernet pseudowire support (L2TPv3)\n");
 
        return 0;
 
-out_unreg:
-       l2tp_nl_unregister_ops(L2TP_PWTYPE_ETH);
-out:
+err:
        return err;
 }
 
 static void __exit l2tp_eth_exit(void)
 {
-       unregister_pernet_device(&l2tp_eth_net_ops);
        l2tp_nl_unregister_ops(L2TP_PWTYPE_ETH);
 }
 
index 50e3ee9a9d612e6c033ef761d8dfeb1e6f209541..0c2738349442ba705f4240aed29fc4c1d9be727d 100644 (file)
@@ -437,11 +437,11 @@ static void pppol2tp_session_close(struct l2tp_session *session)
 
        BUG_ON(session->magic != L2TP_SESSION_MAGIC);
 
-       if (sock) {
+       if (sock)
                inet_shutdown(sock, SEND_SHUTDOWN);
-               /* Don't let the session go away before our socket does */
-               l2tp_session_inc_refcount(session);
-       }
+
+       /* Don't let the session go away before our socket does */
+       l2tp_session_inc_refcount(session);
 }
 
 /* Really kill the session socket. (Called from sock_put() if
@@ -584,6 +584,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
        u32 tunnel_id, peer_tunnel_id;
        u32 session_id, peer_session_id;
        bool drop_refcnt = false;
+       bool drop_tunnel = false;
        int ver = 2;
        int fd;
 
@@ -652,7 +653,9 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
        if (tunnel_id == 0)
                goto end;
 
-       tunnel = l2tp_tunnel_find(sock_net(sk), tunnel_id);
+       tunnel = l2tp_tunnel_get(sock_net(sk), tunnel_id);
+       if (tunnel)
+               drop_tunnel = true;
 
        /* Special case: create tunnel context if session_id and
         * peer_session_id is 0. Otherwise look up tunnel using supplied
@@ -781,6 +784,8 @@ out_no_ppp:
 end:
        if (drop_refcnt)
                l2tp_session_dec_refcount(session);
+       if (drop_tunnel)
+               l2tp_tunnel_dec_refcount(tunnel);
        release_sock(sk);
 
        return error;
@@ -988,6 +993,9 @@ static int pppol2tp_session_ioctl(struct l2tp_session *session,
                 session->name, cmd, arg);
 
        sk = ps->sock;
+       if (!sk)
+               return -EBADR;
+
        sock_hold(sk);
 
        switch (cmd) {
index 799bafc2af39ea191e3753c88c3f921e44a77162..8443a6d841b0645859328b73f0740b7872fdcb64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysctl_net_llc.c: sysctl interface to LLC net subsystem.
  *
index 2829122459387d80f225e509d9d64077b2098d2f..80bfe29099f66d6289be1029191ecbc7772a1347 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_MAC80211) += mac80211.o
 
 # mac80211 objects
index a354f1939e49b83a5c04bcebd54952d33e8dae8d..fb15d3b97cb214078f1533f880350fe280b57c69 100644 (file)
@@ -2727,12 +2727,6 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
        if (!ieee80211_sdata_running(sdata))
                return -ENETDOWN;
 
-       if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
-               ret = drv_set_bitrate_mask(local, sdata, mask);
-               if (ret)
-                       return ret;
-       }
-
        /*
         * If active validate the setting and reject it if it doesn't leave
         * at least one basic rate usable, since we really have to be able
@@ -2748,6 +2742,12 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
                        return -EINVAL;
        }
 
+       if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
+               ret = drv_set_bitrate_mask(local, sdata, mask);
+               if (ret)
+                       return ret;
+       }
+
        for (i = 0; i < NUM_NL80211_BANDS; i++) {
                struct ieee80211_supported_band *sband = wiphy->bands[i];
                int j;
index 1956b3115dd5916283a613701cf799108292b7c7..d90a8f9cc3fdafe15c681b0335a1f123c78c24fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MAC80211_DEBUG_H
 #define __MAC80211_DEBUG_H
 #include <net/cfg80211.h>
index 60c35afee29d551727a2969b25b84998ca5501c4..d2c424787463757c7f16fbc44767f660f6b1c71b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MAC80211_DEBUGFS_H
 #define __MAC80211_DEBUGFS_H
 
index 32adc77e9c77cc8019f6a04aee2d3247848a5d7d..1cd7b8bff56c8c8187a0c44b7e6a5374ade49418 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MAC80211_DEBUGFS_KEY_H
 #define __MAC80211_DEBUGFS_KEY_H
 
index 9f5501a9a79506266decdb83d0ad78c9d6e9bdf9..a7e9d8d518f9724bf48dfd5e594a7afe3840ec28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* routines exported for debugfs handling */
 
 #ifndef __IEEE80211_DEBUGFS_NETDEV_H
index 8b608903259f9a89f324f126db7a73ca13bb253c..d2e7c27ad6d1c45f34686c44c3af3a51c5ccfe77 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MAC80211_DEBUGFS_STA_H
 #define __MAC80211_DEBUGFS_STA_H
 
index 09f77e4a8a79d78f5722a85470bfa0862671e43e..c7f93fd9ca7aea5ffbccf0f54cafdd62a7138084 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
 * Portions of this file
 * Copyright(c) 2016 Intel Deutschland GmbH
index a98fc2b5e0dc94664a19ba319099385276212c44..938049395f9073169035ded5f506cb0c192c41f7 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
  * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
- * Copyright 2015      Intel Deutschland GmbH
+ * Copyright 2015-2017 Intel Deutschland GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -19,6 +19,7 @@
 #include <linux/slab.h>
 #include <linux/export.h>
 #include <net/mac80211.h>
+#include <crypto/algapi.h>
 #include <asm/unaligned.h>
 #include "ieee80211_i.h"
 #include "driver-ops.h"
@@ -609,6 +610,39 @@ void ieee80211_key_free_unused(struct ieee80211_key *key)
        ieee80211_key_free_common(key);
 }
 
+static bool ieee80211_key_identical(struct ieee80211_sub_if_data *sdata,
+                                   struct ieee80211_key *old,
+                                   struct ieee80211_key *new)
+{
+       u8 tkip_old[WLAN_KEY_LEN_TKIP], tkip_new[WLAN_KEY_LEN_TKIP];
+       u8 *tk_old, *tk_new;
+
+       if (!old || new->conf.keylen != old->conf.keylen)
+               return false;
+
+       tk_old = old->conf.key;
+       tk_new = new->conf.key;
+
+       /*
+        * In station mode, don't compare the TX MIC key, as it's never used
+        * and offloaded rekeying may not care to send it to the host. This
+        * is the case in iwlwifi, for example.
+        */
+       if (sdata->vif.type == NL80211_IFTYPE_STATION &&
+           new->conf.cipher == WLAN_CIPHER_SUITE_TKIP &&
+           new->conf.keylen == WLAN_KEY_LEN_TKIP &&
+           !(new->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
+               memcpy(tkip_old, tk_old, WLAN_KEY_LEN_TKIP);
+               memcpy(tkip_new, tk_new, WLAN_KEY_LEN_TKIP);
+               memset(tkip_old + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8);
+               memset(tkip_new + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY, 0, 8);
+               tk_old = tkip_old;
+               tk_new = tkip_new;
+       }
+
+       return !crypto_memneq(tk_old, tk_new, new->conf.keylen);
+}
+
 int ieee80211_key_link(struct ieee80211_key *key,
                       struct ieee80211_sub_if_data *sdata,
                       struct sta_info *sta)
@@ -620,9 +654,6 @@ int ieee80211_key_link(struct ieee80211_key *key,
 
        pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
        idx = key->conf.keyidx;
-       key->local = sdata->local;
-       key->sdata = sdata;
-       key->sta = sta;
 
        mutex_lock(&sdata->local->key_mtx);
 
@@ -633,6 +664,20 @@ int ieee80211_key_link(struct ieee80211_key *key,
        else
                old_key = key_mtx_dereference(sdata->local, sdata->keys[idx]);
 
+       /*
+        * Silently accept key re-installation without really installing the
+        * new version of the key to avoid nonce reuse or replay issues.
+        */
+       if (ieee80211_key_identical(sdata, old_key, key)) {
+               ieee80211_key_free_unused(key);
+               ret = 0;
+               goto out;
+       }
+
+       key->local = sdata->local;
+       key->sdata = sdata;
+       key->sta = sta;
+
        increment_tailroom_need_count(sdata);
 
        ieee80211_key_replace(sdata, sta, pairwise, old_key, key);
@@ -648,6 +693,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
                ret = 0;
        }
 
+ out:
        mutex_unlock(&sdata->local->key_mtx);
 
        return ret;
index a87d195c4a615761ed6041296b417ec3c9a8f996..38c45e1dafd8ddd9e7ed3d471924acec88edbf90 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <net/mac80211.h>
 #include <net/rtnetlink.h>
 
index edfe0c170a1c247c6285e5c5413a2150acf0b9d0..837857261b6645572041a12fd66325105bc877b9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* bug in tracepoint.h, it should include this */
 #include <linux/module.h>
 
index 3d9ac17af407a12c4230a1df26f770bd0bd1ab39..591ad02e1fa4f777d2c2f260ff0f00245e2c094c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
 * Portions of this file
 * Copyright(c) 2016 Intel Deutschland GmbH
index 768f7c22a190c64d4b035cee599c5ea251b8afbf..366b9e6f043e2df89eccb4d63a9fb3ab1d7db023 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef CONFIG_MAC80211_MESSAGE_TRACING
 
 #if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
index e2718f981e82d81be46edbda37f5ce2fb6d1b8d2..3bb089685500cf99fd068e1dec7e537ed317a455 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* mac802154 configuration hooks for cfg802154
  */
 
index fd9daf2ecec97a31c375b491739bd241b109b1c5..d23f0db98015a6fdc421f9a0b1b17acb2b1b1da0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __MAC802154_DRIVER_OPS
 #define __MAC802154_DRIVER_OPS
 
index 863e5e6b983dac118f31b23d26b655061c25e288..c36e3d541a428f3967cd31e208c16879655a8448 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/module.h>
 
 #ifndef __CHECKER__
index 6f30e0c93a160f9f58cfd3195e4c35fe22d606cf..2c8a43d3607fcaee5e5dbab1df7ee1b1883defea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Based on net/mac80211/trace.h */
 
 #undef TRACE_SYSTEM
index cf65aec2e551bb32ec307f678977c97204902598..768a302879b4b129512ddf159a1886eb56ce1415 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef MPLS_INTERNAL_H
 #define MPLS_INTERNAL_H
 #include <net/mpls.h>
index af3d636534efb8b81fc47547f2fb027f61f5be34..d30f7bd741d0610cd261b4514baf0b1cbf20c607 100644 (file)
@@ -286,6 +286,7 @@ struct ncsi_dev_priv {
        struct work_struct  work;            /* For channel management     */
        struct packet_type  ptype;           /* NCSI packet Rx handler     */
        struct list_head    node;            /* Form NCSI device list      */
+#define NCSI_MAX_VLAN_VIDS     15
        struct list_head    vlan_vids;       /* List of active VLAN IDs */
 };
 
index 6898e7229285a6720115a37d58673f569d4a9bff..f135938bf781eb9c135648599ce06e535c780390 100644 (file)
@@ -187,7 +187,7 @@ static struct ncsi_aen_handler {
 } ncsi_aen_handlers[] = {
        { NCSI_PKT_AEN_LSC,    12, ncsi_aen_handler_lsc    },
        { NCSI_PKT_AEN_CR,      4, ncsi_aen_handler_cr     },
-       { NCSI_PKT_AEN_HNCDSC,  4, ncsi_aen_handler_hncdsc }
+       { NCSI_PKT_AEN_HNCDSC,  8, ncsi_aen_handler_hncdsc }
 };
 
 int ncsi_aen_handler(struct ncsi_dev_priv *ndp, struct sk_buff *skb)
index 3fd3c39e627836117f250fc7d5037415491ee6f5..28c42b22b7489efa1d7fffd51eee2a146ecad636 100644 (file)
@@ -189,6 +189,7 @@ static void ncsi_channel_monitor(unsigned long data)
        struct ncsi_channel *nc = (struct ncsi_channel *)data;
        struct ncsi_package *np = nc->package;
        struct ncsi_dev_priv *ndp = np->ndp;
+       struct ncsi_channel_mode *ncm;
        struct ncsi_cmd_arg nca;
        bool enabled, chained;
        unsigned int monitor_state;
@@ -202,11 +203,15 @@ static void ncsi_channel_monitor(unsigned long data)
        monitor_state = nc->monitor.state;
        spin_unlock_irqrestore(&nc->lock, flags);
 
-       if (!enabled || chained)
+       if (!enabled || chained) {
+               ncsi_stop_channel_monitor(nc);
                return;
+       }
        if (state != NCSI_CHANNEL_INACTIVE &&
-           state != NCSI_CHANNEL_ACTIVE)
+           state != NCSI_CHANNEL_ACTIVE) {
+               ncsi_stop_channel_monitor(nc);
                return;
+       }
 
        switch (monitor_state) {
        case NCSI_CHANNEL_MONITOR_START:
@@ -217,28 +222,28 @@ static void ncsi_channel_monitor(unsigned long data)
                nca.type = NCSI_PKT_CMD_GLS;
                nca.req_flags = 0;
                ret = ncsi_xmit_cmd(&nca);
-               if (ret) {
+               if (ret)
                        netdev_err(ndp->ndev.dev, "Error %d sending GLS\n",
                                   ret);
-                       return;
-               }
-
                break;
        case NCSI_CHANNEL_MONITOR_WAIT ... NCSI_CHANNEL_MONITOR_WAIT_MAX:
                break;
        default:
-               if (!(ndp->flags & NCSI_DEV_HWA) &&
-                   state == NCSI_CHANNEL_ACTIVE) {
+               if (!(ndp->flags & NCSI_DEV_HWA)) {
                        ncsi_report_link(ndp, true);
                        ndp->flags |= NCSI_DEV_RESHUFFLE;
                }
 
+               ncsi_stop_channel_monitor(nc);
+
+               ncm = &nc->modes[NCSI_MODE_LINK];
                spin_lock_irqsave(&nc->lock, flags);
                nc->state = NCSI_CHANNEL_INVISIBLE;
+               ncm->data[2] &= ~0x1;
                spin_unlock_irqrestore(&nc->lock, flags);
 
                spin_lock_irqsave(&ndp->lock, flags);
-               nc->state = NCSI_CHANNEL_INACTIVE;
+               nc->state = NCSI_CHANNEL_ACTIVE;
                list_add_tail_rcu(&nc->link, &ndp->channel_queue);
                spin_unlock_irqrestore(&ndp->lock, flags);
                ncsi_process_next_channel(ndp);
@@ -732,6 +737,10 @@ static int set_one_vid(struct ncsi_dev_priv *ndp, struct ncsi_channel *nc,
        if (index < 0) {
                netdev_err(ndp->ndev.dev,
                           "Failed to add new VLAN tag, error %d\n", index);
+               if (index == -ENOSPC)
+                       netdev_err(ndp->ndev.dev,
+                                  "Channel %u already has all VLAN filters set\n",
+                                  nc->id);
                return -1;
        }
 
@@ -998,12 +1007,15 @@ static bool ncsi_check_hwa(struct ncsi_dev_priv *ndp)
        struct ncsi_package *np;
        struct ncsi_channel *nc;
        unsigned int cap;
+       bool has_channel = false;
 
        /* The hardware arbitration is disabled if any one channel
         * doesn't support explicitly.
         */
        NCSI_FOR_EACH_PACKAGE(ndp, np) {
                NCSI_FOR_EACH_CHANNEL(np, nc) {
+                       has_channel = true;
+
                        cap = nc->caps[NCSI_CAP_GENERIC].cap;
                        if (!(cap & NCSI_CAP_GENERIC_HWA) ||
                            (cap & NCSI_CAP_GENERIC_HWA_MASK) !=
@@ -1014,8 +1026,13 @@ static bool ncsi_check_hwa(struct ncsi_dev_priv *ndp)
                }
        }
 
-       ndp->flags |= NCSI_DEV_HWA;
-       return true;
+       if (has_channel) {
+               ndp->flags |= NCSI_DEV_HWA;
+               return true;
+       }
+
+       ndp->flags &= ~NCSI_DEV_HWA;
+       return false;
 }
 
 static int ncsi_enable_hwa(struct ncsi_dev_priv *ndp)
@@ -1403,7 +1420,6 @@ static int ncsi_kick_channels(struct ncsi_dev_priv *ndp)
 
 int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
 {
-       struct ncsi_channel_filter *ncf;
        struct ncsi_dev_priv *ndp;
        unsigned int n_vids = 0;
        struct vlan_vid *vlan;
@@ -1420,7 +1436,6 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
        }
 
        ndp = TO_NCSI_DEV_PRIV(nd);
-       ncf = ndp->hot_channel->filters[NCSI_FILTER_VLAN];
 
        /* Add the VLAN id to our internal list */
        list_for_each_entry_rcu(vlan, &ndp->vlan_vids, list) {
@@ -1431,12 +1446,11 @@ int ncsi_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
                        return 0;
                }
        }
-
-       if (n_vids >= ncf->total) {
-               netdev_info(dev,
-                           "NCSI Channel supports up to %u VLAN tags but %u are already set\n",
-                           ncf->total, n_vids);
-               return -EINVAL;
+       if (n_vids >= NCSI_MAX_VLAN_VIDS) {
+               netdev_warn(dev,
+                           "tried to add vlan id %u but NCSI max already registered (%u)\n",
+                           vid, NCSI_MAX_VLAN_VIDS);
+               return -ENOSPC;
        }
 
        vlan = kzalloc(sizeof(*vlan), GFP_KERNEL);
index 265b9a892d4171bc74572891edb631dabac98c41..927dad4759d1c9b23e4037b218152c267bafa7d9 100644 (file)
@@ -959,7 +959,7 @@ static struct ncsi_rsp_handler {
        { NCSI_PKT_RSP_EGMF,    4, ncsi_rsp_handler_egmf    },
        { NCSI_PKT_RSP_DGMF,    4, ncsi_rsp_handler_dgmf    },
        { NCSI_PKT_RSP_SNFC,    4, ncsi_rsp_handler_snfc    },
-       { NCSI_PKT_RSP_GVI,    36, ncsi_rsp_handler_gvi     },
+       { NCSI_PKT_RSP_GVI,    40, ncsi_rsp_handler_gvi     },
        { NCSI_PKT_RSP_GC,     32, ncsi_rsp_handler_gc      },
        { NCSI_PKT_RSP_GP,     -1, ncsi_rsp_handler_gp      },
        { NCSI_PKT_RSP_GCPS,  172, ncsi_rsp_handler_gcps    },
index d3891c93edd6e32a9e3f38e660e2b35f11f427f9..f78ed2470831d54262852aba19a9d98d80cf7c72 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 netfilter-objs := core.o nf_log.o nf_queue.o nf_sockopt.o
 
 nf_conntrack-y := nf_conntrack_core.o nf_conntrack_standalone.o nf_conntrack_expect.o nf_conntrack_helper.o nf_conntrack_proto.o nf_conntrack_l3proto_generic.o nf_conntrack_proto_generic.o nf_conntrack_proto_tcp.o nf_conntrack_proto_udp.o nf_conntrack_extend.o nf_conntrack_acct.o nf_conntrack_seqadj.o
index 28ec148df02d0b094e1cd854b6af575366ae3653..a445a6bf4f111b0c99a98d8bb396018f269593b7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the ipset modules
 #
index e495b5e484b11c03c26674d999e3dc31422efab9..cf84f7b37cd9dfb828892e23b0aa2603827b6427 100644 (file)
@@ -1191,14 +1191,17 @@ static int ip_set_swap(struct net *net, struct sock *ctnl, struct sk_buff *skb,
              from->family == to->family))
                return -IPSET_ERR_TYPE_MISMATCH;
 
-       if (from->ref_netlink || to->ref_netlink)
+       write_lock_bh(&ip_set_ref_lock);
+
+       if (from->ref_netlink || to->ref_netlink) {
+               write_unlock_bh(&ip_set_ref_lock);
                return -EBUSY;
+       }
 
        strncpy(from_name, from->name, IPSET_MAXNAMELEN);
        strncpy(from->name, to->name, IPSET_MAXNAMELEN);
        strncpy(to->name, from_name, IPSET_MAXNAMELEN);
 
-       write_lock_bh(&ip_set_ref_lock);
        swap(from->ref, to->ref);
        ip_set(inst, from_id) = to;
        ip_set(inst, to_id) = from;
@@ -2072,25 +2075,28 @@ static struct pernet_operations ip_set_net_ops = {
 static int __init
 ip_set_init(void)
 {
-       int ret = nfnetlink_subsys_register(&ip_set_netlink_subsys);
+       int ret = register_pernet_subsys(&ip_set_net_ops);
+
+       if (ret) {
+               pr_err("ip_set: cannot register pernet_subsys.\n");
+               return ret;
+       }
 
+       ret = nfnetlink_subsys_register(&ip_set_netlink_subsys);
        if (ret != 0) {
                pr_err("ip_set: cannot register with nfnetlink.\n");
+               unregister_pernet_subsys(&ip_set_net_ops);
                return ret;
        }
+
        ret = nf_register_sockopt(&so_set);
        if (ret != 0) {
                pr_err("SO_SET registry failed: %d\n", ret);
                nfnetlink_subsys_unregister(&ip_set_netlink_subsys);
+               unregister_pernet_subsys(&ip_set_net_ops);
                return ret;
        }
-       ret = register_pernet_subsys(&ip_set_net_ops);
-       if (ret) {
-               pr_err("ip_set: cannot register pernet_subsys.\n");
-               nf_unregister_sockopt(&so_set);
-               nfnetlink_subsys_unregister(&ip_set_netlink_subsys);
-               return ret;
-       }
+
        pr_info("ip_set: protocol %u\n", IPSET_PROTOCOL);
        return 0;
 }
@@ -2098,9 +2104,10 @@ ip_set_init(void)
 static void __exit
 ip_set_fini(void)
 {
-       unregister_pernet_subsys(&ip_set_net_ops);
        nf_unregister_sockopt(&so_set);
        nfnetlink_subsys_unregister(&ip_set_netlink_subsys);
+
+       unregister_pernet_subsys(&ip_set_net_ops);
        pr_debug("these are the famous last words\n");
 }
 
index f236c0bc7b3f3e171e4303dd7c5379f34011812f..51063d9ed0f75d53be7a59738bf859570cd67d9b 100644 (file)
@@ -1041,12 +1041,24 @@ out:
 static int
 mtype_head(struct ip_set *set, struct sk_buff *skb)
 {
-       const struct htype *h = set->data;
+       struct htype *h = set->data;
        const struct htable *t;
        struct nlattr *nested;
        size_t memsize;
        u8 htable_bits;
 
+       /* If any members have expired, set->elements will be wrong
+        * mytype_expire function will update it with the right count.
+        * we do not hold set->lock here, so grab it first.
+        * set->elements can still be incorrect in the case of a huge set,
+        * because elements might time out during the listing.
+        */
+       if (SET_WITH_TIMEOUT(set)) {
+               spin_lock_bh(&set->lock);
+               mtype_expire(set, h);
+               spin_unlock_bh(&set->lock);
+       }
+
        rcu_read_lock_bh();
        t = rcu_dereference_bh_nfnl(h->table);
        memsize = mtype_ahash_memsize(h, t) + set->ext_size;
index 20bfbd315f61822e53e90273356686eb9f1d3648..613eb212cb48896f1c5a45d4f4dfdd2d6a245c29 100644 (file)
@@ -123,13 +123,12 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[],
                return ret;
 
        ip &= ip_set_hostmask(h->netmask);
+       e.ip = htonl(ip);
+       if (e.ip == 0)
+               return -IPSET_ERR_HASH_ELEM;
 
-       if (adt == IPSET_TEST) {
-               e.ip = htonl(ip);
-               if (e.ip == 0)
-                       return -IPSET_ERR_HASH_ELEM;
+       if (adt == IPSET_TEST)
                return adtfn(set, &e, &ext, &ext, flags);
-       }
 
        ip_to = ip;
        if (tb[IPSET_ATTR_IP_TO]) {
@@ -148,17 +147,20 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        hosts = h->netmask == 32 ? 1 : 2 << (32 - h->netmask - 1);
 
-       if (retried)
+       if (retried) {
                ip = ntohl(h->next.ip);
-       for (; !before(ip_to, ip); ip += hosts) {
                e.ip = htonl(ip);
-               if (e.ip == 0)
-                       return -IPSET_ERR_HASH_ELEM;
+       }
+       for (; ip <= ip_to;) {
                ret = adtfn(set, &e, &ext, &ext, flags);
-
                if (ret && !ip_set_eexist(ret, flags))
                        return ret;
 
+               ip += hosts;
+               e.ip = htonl(ip);
+               if (e.ip == 0)
+                       return 0;
+
                ret = 0;
        }
        return ret;
index b64cf14e8352f488588af54fc5c650b27f31a09d..f3ba8348cf9df331ea0f36ba1b1bac99123b0895 100644 (file)
@@ -149,7 +149,7 @@ hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       for (; !before(ip_to, ip); ip++) {
+       for (; ip <= ip_to; ip++) {
                e.ip = htonl(ip);
                ret = adtfn(set, &e, &ext, &ext, flags);
 
index f438740e6c6a4e4ee94d971de8cba7556ea65bec..ddb8039ec1d2736ae21f3160da52e95ff1e022a4 100644 (file)
@@ -178,7 +178,7 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       for (; !before(ip_to, ip); ip++) {
+       for (; ip <= ip_to; ip++) {
                p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port)
                                                       : port;
                for (; p <= port_to; p++) {
index 6215fb898c509ebcd35d555ee2fc7a2371733f0d..a7f4d7a85420991e196f0a12de449ef1c20fa57b 100644 (file)
@@ -185,7 +185,7 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       for (; !before(ip_to, ip); ip++) {
+       for (; ip <= ip_to; ip++) {
                p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port)
                                                       : port;
                for (; p <= port_to; p++) {
index 5ab1b99a53c2b4338837a1fc17e067b9fee6a9d7..a2f19b9906e90ebe4b990f9583ab9f95c7a6b68e 100644 (file)
@@ -271,7 +271,7 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       for (; !before(ip_to, ip); ip++) {
+       for (; ip <= ip_to; ip++) {
                e.ip = htonl(ip);
                p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port)
                                                       : port;
@@ -281,7 +281,7 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
                              ip == ntohl(h->next.ip) &&
                              p == ntohs(h->next.port)
                                ? ntohl(h->next.ip2) : ip2_from;
-                       while (!after(ip2, ip2_to)) {
+                       while (ip2 <= ip2_to) {
                                e.ip2 = htonl(ip2);
                                ip2_last = ip_set_range_to_cidr(ip2, ip2_to,
                                                                &cidr);
index 5d9e895452e744a38c7324bcf37924c977b62727..1c67a1761e458e584b2277b8ae1462cb5fc666bb 100644 (file)
@@ -193,7 +193,7 @@ hash_net4_uadt(struct ip_set *set, struct nlattr *tb[],
        }
        if (retried)
                ip = ntohl(h->next.ip);
-       while (!after(ip, ip_to)) {
+       while (ip <= ip_to) {
                e.ip = htonl(ip);
                last = ip_set_range_to_cidr(ip, ip_to, &e.cidr);
                ret = adtfn(set, &e, &ext, &ext, flags);
index 44cf11939c916473b024d0b3fddaa6dbb1777ed8..d417074f1c1a298c33a324748e3aa274ed66616b 100644 (file)
@@ -255,7 +255,7 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       while (!after(ip, ip_to)) {
+       while (ip <= ip_to) {
                e.ip = htonl(ip);
                last = ip_set_range_to_cidr(ip, ip_to, &e.cidr);
                ret = adtfn(set, &e, &ext, &ext, flags);
index db614e13b193ddb1733bcb098d53d2f12520066f..7f9ae2e9645be84faa6d24f2b7ee8b973ad11b6b 100644 (file)
@@ -250,13 +250,13 @@ hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[],
        if (retried)
                ip = ntohl(h->next.ip[0]);
 
-       while (!after(ip, ip_to)) {
+       while (ip <= ip_to) {
                e.ip[0] = htonl(ip);
                last = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]);
                ip2 = (retried &&
                       ip == ntohl(h->next.ip[0])) ? ntohl(h->next.ip[1])
                                                   : ip2_from;
-               while (!after(ip2, ip2_to)) {
+               while (ip2 <= ip2_to) {
                        e.ip[1] = htonl(ip2);
                        last2 = ip_set_range_to_cidr(ip2, ip2_to, &e.cidr[1]);
                        ret = adtfn(set, &e, &ext, &ext, flags);
index 54b64b6cd0cdb2196e1f507909784096af45e11f..e6ef382febe46e8a4d8af045abcb47ae546c8710 100644 (file)
@@ -241,7 +241,7 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[],
 
        if (retried)
                ip = ntohl(h->next.ip);
-       while (!after(ip, ip_to)) {
+       while (ip <= ip_to) {
                e.ip = htonl(ip);
                last = ip_set_range_to_cidr(ip, ip_to, &cidr);
                e.cidr = cidr - 1;
index aff846960ac4423da8ec5a99f4faccf294a812e0..8602f2595a1a1606f6380d6f00af40fa33759630 100644 (file)
@@ -291,7 +291,7 @@ hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
        if (retried)
                ip = ntohl(h->next.ip[0]);
 
-       while (!after(ip, ip_to)) {
+       while (ip <= ip_to) {
                e.ip[0] = htonl(ip);
                ip_last = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]);
                p = retried && ip == ntohl(h->next.ip[0]) ? ntohs(h->next.port)
@@ -301,7 +301,7 @@ hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
                        ip2 = (retried && ip == ntohl(h->next.ip[0]) &&
                               p == ntohs(h->next.port)) ? ntohl(h->next.ip[1])
                                                         : ip2_from;
-                       while (!after(ip2, ip2_to)) {
+                       while (ip2 <= ip2_to) {
                                e.ip[1] = htonl(ip2);
                                ip2_last = ip_set_range_to_cidr(ip2, ip2_to,
                                                                &e.cidr[1]);
index 67f3f438960270d6d754afb0e4f2598818fde35a..c552993fa4b9181e68e7d9680babec0462288719 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the IPVS modules on top of IPv4.
 #
index 57c8ee66491eb8a66944afa3250396c36b11b218..eff7569824e5b7e568874e9ed25e9ea2310670d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/ip.h>
 #include <linux/sctp.h>
index 0e5b64a75da0521be40831f791eb8f3d7303f70e..13f7408755073b6f43e402975b8450e70ff32873 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IPVS         An implementation of the IP virtual server support for the
  *              LINUX operating system.  IPVS is now implemented as a module
index 90d396814798e15d327aafe89c4bbb5a611da480..4527921b1c3ac97b95a48c62f699b71d8b853be0 100644 (file)
@@ -921,6 +921,7 @@ ip_vs_prepare_tunneled_skb(struct sk_buff *skb, int skb_af,
 {
        struct sk_buff *new_skb = NULL;
        struct iphdr *old_iph = NULL;
+       __u8 old_dsfield;
 #ifdef CONFIG_IP_VS_IPV6
        struct ipv6hdr *old_ipv6h = NULL;
 #endif
@@ -945,7 +946,7 @@ ip_vs_prepare_tunneled_skb(struct sk_buff *skb, int skb_af,
                        *payload_len =
                                ntohs(old_ipv6h->payload_len) +
                                sizeof(*old_ipv6h);
-               *dsfield = ipv6_get_dsfield(old_ipv6h);
+               old_dsfield = ipv6_get_dsfield(old_ipv6h);
                *ttl = old_ipv6h->hop_limit;
                if (df)
                        *df = 0;
@@ -960,12 +961,15 @@ ip_vs_prepare_tunneled_skb(struct sk_buff *skb, int skb_af,
 
                /* fix old IP header checksum */
                ip_send_check(old_iph);
-               *dsfield = ipv4_get_dsfield(old_iph);
+               old_dsfield = ipv4_get_dsfield(old_iph);
                *ttl = old_iph->ttl;
                if (payload_len)
                        *payload_len = ntohs(old_iph->tot_len);
        }
 
+       /* Implement full-functionality option for ECN encapsulation */
+       *dsfield = INET_ECN_encapsulate(old_dsfield, old_dsfield);
+
        return skb;
 error:
        kfree_skb(skb);
index 49f87ec093a3918f8a6a6948ca1cd763222d6999..44284cd2528d3e6911bc8c6f7db3f1a17106fa01 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _NF_INTERNALS_H
 #define _NF_INTERNALS_H
 
index f393a7086025f6c5e16032baeed63fa1cffba168..af8345fc4fbde30adad608b61a4fd293b4554584 100644 (file)
@@ -429,7 +429,7 @@ nf_nat_setup_info(struct nf_conn *ct,
 
                srchash = hash_by_src(net,
                                      &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
-               lock = &nf_nat_locks[srchash % ARRAY_SIZE(nf_nat_locks)];
+               lock = &nf_nat_locks[srchash % CONNTRACK_LOCKS];
                spin_lock_bh(lock);
                hlist_add_head_rcu(&ct->nat_bysource,
                                   &nf_nat_bysource[srchash]);
@@ -532,9 +532,9 @@ static void __nf_nat_cleanup_conntrack(struct nf_conn *ct)
        unsigned int h;
 
        h = hash_by_src(nf_ct_net(ct), &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
-       spin_lock_bh(&nf_nat_locks[h % ARRAY_SIZE(nf_nat_locks)]);
+       spin_lock_bh(&nf_nat_locks[h % CONNTRACK_LOCKS]);
        hlist_del_rcu(&ct->nat_bysource);
-       spin_unlock_bh(&nf_nat_locks[h % ARRAY_SIZE(nf_nat_locks)]);
+       spin_unlock_bh(&nf_nat_locks[h % CONNTRACK_LOCKS]);
 }
 
 static int nf_nat_proto_clean(struct nf_conn *ct, void *data)
@@ -807,8 +807,8 @@ static int __init nf_nat_init(void)
 
        /* Leave them the same for the moment. */
        nf_nat_htable_size = nf_conntrack_htable_size;
-       if (nf_nat_htable_size < ARRAY_SIZE(nf_nat_locks))
-               nf_nat_htable_size = ARRAY_SIZE(nf_nat_locks);
+       if (nf_nat_htable_size < CONNTRACK_LOCKS)
+               nf_nat_htable_size = CONNTRACK_LOCKS;
 
        nf_nat_bysource = nf_ct_alloc_hashtable(&nf_nat_htable_size, 0);
        if (!nf_nat_bysource)
@@ -821,7 +821,7 @@ static int __init nf_nat_init(void)
                return ret;
        }
 
-       for (i = 0; i < ARRAY_SIZE(nf_nat_locks); i++)
+       for (i = 0; i < CONNTRACK_LOCKS; i++)
                spin_lock_init(&nf_nat_locks[i]);
 
        nf_ct_helper_expectfn_register(&follow_master_nat);
index d2a9e6b5d01f7018a8390ed46f4bfe66eb74e9ef..46cb3786e0ec5cde72f5e785ff5dc152f817ae33 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
index 929927171426a6e286bd5cc4412aaa99b77fec77..64e1ee09122582bce81a4ee996064763083bcfa0 100644 (file)
@@ -1048,7 +1048,7 @@ static int nf_tables_fill_chain_info(struct sk_buff *skb, struct net *net,
                if (nla_put_string(skb, NFTA_CHAIN_TYPE, basechain->type->name))
                        goto nla_put_failure;
 
-               if (nft_dump_stats(skb, nft_base_chain(chain)->stats))
+               if (basechain->stats && nft_dump_stats(skb, basechain->stats))
                        goto nla_put_failure;
        }
 
@@ -1487,8 +1487,8 @@ static int nf_tables_updchain(struct nft_ctx *ctx, u8 genmask, u8 policy,
 
                chain2 = nf_tables_chain_lookup(table, nla[NFTA_CHAIN_NAME],
                                                genmask);
-               if (IS_ERR(chain2))
-                       return PTR_ERR(chain2);
+               if (!IS_ERR(chain2))
+                       return -EEXIST;
        }
 
        if (nla[NFTA_CHAIN_COUNTERS]) {
@@ -2741,8 +2741,10 @@ cont:
        list_for_each_entry(i, &ctx->table->sets, list) {
                if (!nft_is_active_next(ctx->net, i))
                        continue;
-               if (!strcmp(set->name, i->name))
+               if (!strcmp(set->name, i->name)) {
+                       kfree(set->name);
                        return -ENFILE;
+               }
        }
        return 0;
 }
index 0fa01d772c5e2c10c76094bdda80193fca155581..9c0d5a7ce5f900c615213094496db11eb0338d03 100644 (file)
@@ -643,7 +643,6 @@ nft_hash_select_ops(const struct nft_ctx *ctx, const struct nft_set_desc *desc,
 {
        if (desc->size) {
                switch (desc->klen) {
-               case 2:
                case 4:
                        return &nft_hash_fast_ops;
                default:
index c83a3b5e1c6c2a91b713b6681a794bd79ab3fa08..d8571f4142080a3c121fc90f0b52d81ee9df6712 100644 (file)
@@ -892,7 +892,7 @@ void *xt_copy_counters_from_user(const void __user *user, unsigned int len,
                if (copy_from_user(&compat_tmp, user, sizeof(compat_tmp)) != 0)
                        return ERR_PTR(-EFAULT);
 
-               strlcpy(info->name, compat_tmp.name, sizeof(info->name));
+               memcpy(info->name, compat_tmp.name, sizeof(info->name) - 1);
                info->num_counters = compat_tmp.num_counters;
                user += sizeof(compat_tmp);
        } else
@@ -905,9 +905,9 @@ void *xt_copy_counters_from_user(const void __user *user, unsigned int len,
                if (copy_from_user(info, user, sizeof(*info)) != 0)
                        return ERR_PTR(-EFAULT);
 
-               info->name[sizeof(info->name) - 1] = '\0';
                user += sizeof(*info);
        }
+       info->name[sizeof(info->name) - 1] = '\0';
 
        size = sizeof(struct xt_counters);
        size *= info->num_counters;
index 38986a95216cd2c3f7a0f83deedcb42153f5a937..29123934887bbfe5081178f9ce2425c5bb618a9c 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/syscalls.h>
 #include <linux/skbuff.h>
 #include <linux/filter.h>
 #include <linux/bpf.h>
@@ -49,6 +50,22 @@ static int __bpf_mt_check_fd(int fd, struct bpf_prog **ret)
        return 0;
 }
 
+static int __bpf_mt_check_path(const char *path, struct bpf_prog **ret)
+{
+       mm_segment_t oldfs = get_fs();
+       int retval, fd;
+
+       set_fs(KERNEL_DS);
+       fd = bpf_obj_get_user(path);
+       set_fs(oldfs);
+       if (fd < 0)
+               return fd;
+
+       retval = __bpf_mt_check_fd(fd, ret);
+       sys_close(fd);
+       return retval;
+}
+
 static int bpf_mt_check(const struct xt_mtchk_param *par)
 {
        struct xt_bpf_info *info = par->matchinfo;
@@ -66,9 +83,10 @@ static int bpf_mt_check_v1(const struct xt_mtchk_param *par)
                return __bpf_mt_check_bytecode(info->bpf_program,
                                               info->bpf_program_num_elem,
                                               &info->filter);
-       else if (info->mode == XT_BPF_MODE_FD_PINNED ||
-                info->mode == XT_BPF_MODE_FD_ELF)
+       else if (info->mode == XT_BPF_MODE_FD_ELF)
                return __bpf_mt_check_fd(info->fd, &info->filter);
+       else if (info->mode == XT_BPF_MODE_PATH_PINNED)
+               return __bpf_mt_check_path(info->path, &info->filter);
        else
                return -EINVAL;
 }
index 8fd324116e6f127e63205339f2bc9345a26d74ea..68ccbe50bb1eaa5515e34fb114261542574e708e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Today's hack: quantum tunneling in structs
  *
index e75ef39669c5a9a5b72c9a1cec8b72020600eae1..575d2153e3b819f32e9a262abddca95a108eee02 100644 (file)
@@ -76,7 +76,7 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par,
                        transparent = nf_sk_is_transparent(sk);
 
                if (info->flags & XT_SOCKET_RESTORESKMARK && !wildcard &&
-                   transparent)
+                   transparent && sk_fullsock(sk))
                        pskb->mark = sk->sk_mark;
 
                if (sk != skb->sk)
@@ -133,7 +133,7 @@ socket_mt6_v1_v2_v3(const struct sk_buff *skb, struct xt_action_param *par)
                        transparent = nf_sk_is_transparent(sk);
 
                if (info->flags & XT_SOCKET_RESTORESKMARK && !wildcard &&
-                   transparent)
+                   transparent && sk_fullsock(sk))
                        pskb->mark = sk->sk_mark;
 
                if (sk != skb->sk)
index d341ede0dca5f6099c0a1c421c2e3ae9ce112fca..5a46381a64e77264e3a75eea0361bcaf6a9cc3df 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the NetLabel subsystem.
 #
index 327807731b441e8f66bc899cced12edb405687e8..b93148e8e9fb2dc9a22cccf34d168e99b55042de 100644 (file)
@@ -2266,14 +2266,18 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
        cb->min_dump_alloc = control->min_dump_alloc;
        cb->skb = skb;
 
+       if (cb->start) {
+               ret = cb->start(cb);
+               if (ret)
+                       goto error_unlock;
+       }
+
        nlk->cb_running = true;
 
        mutex_unlock(nlk->cb_mutex);
 
-       if (cb->start)
-               cb->start(cb);
-
        ret = netlink_dump(sk);
+
        sock_put(sk);
 
        if (ret)
@@ -2303,6 +2307,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
        size_t tlvlen = 0;
        struct netlink_sock *nlk = nlk_sk(NETLINK_CB(in_skb).sk);
        unsigned int flags = 0;
+       bool nlk_has_extack = nlk->flags & NETLINK_F_EXT_ACK;
 
        /* Error messages get the original request appened, unless the user
         * requests to cap the error message, and get extra error data if
@@ -2313,7 +2318,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
                        payload += nlmsg_len(nlh);
                else
                        flags |= NLM_F_CAPPED;
-               if (nlk->flags & NETLINK_F_EXT_ACK && extack) {
+               if (nlk_has_extack && extack) {
                        if (extack->_msg)
                                tlvlen += nla_total_size(strlen(extack->_msg) + 1);
                        if (extack->bad_attr)
@@ -2322,8 +2327,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
        } else {
                flags |= NLM_F_CAPPED;
 
-               if (nlk->flags & NETLINK_F_EXT_ACK &&
-                   extack && extack->cookie_len)
+               if (nlk_has_extack && extack && extack->cookie_len)
                        tlvlen += nla_total_size(extack->cookie_len);
        }
 
@@ -2351,7 +2355,7 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
        errmsg->error = err;
        memcpy(&errmsg->msg, nlh, payload > sizeof(*errmsg) ? nlh->nlmsg_len : sizeof(*nlh));
 
-       if (nlk->flags & NETLINK_F_EXT_ACK && extack) {
+       if (nlk_has_extack && extack) {
                if (err) {
                        if (extack->_msg)
                                WARN_ON(nla_put_string(skb, NLMSGERR_ATTR_MSG,
index 3490f2430532cf753118e14883b52c4af151b18c..028188597eaa9d1801da7f16f43af73624664b4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _AF_NETLINK_H
 #define _AF_NETLINK_H
 
index 10f8b4cff40accd99898ea4d0696a2ba5d90080c..d444daf1ac0458885cf714523f6b11b7f4ec7287 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * NETLINK      Generic Netlink Family
  *
index 2555ff8e7219b19ecdc06da62d5bef6ce555ae20..2ffc69b473fc252214765d4d24cd441cf498ea27 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux NFC subsystem.
 #
index 0ca31d9bf7413e8cadcc2171cb3727f7e26f7893..c3362c499281efc5e473429ca4af12d6607de964 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux NFC NCI layer.
 #
index 60f809085b920bfa95696542c59bf13b4d6a9510..299f4476cf443c4a4fc1b3440572bd871db16820 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Open vSwitch.
 #
index c26172995511f77bf9ed4c36d55fd1f430f6de5e..2986941164b1952b3b6014ff81d2986b504c334a 100644 (file)
@@ -1684,10 +1684,6 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)
 
        mutex_lock(&fanout_mutex);
 
-       err = -EINVAL;
-       if (!po->running)
-               goto out;
-
        err = -EALREADY;
        if (po->fanout)
                goto out;
@@ -1749,7 +1745,10 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)
                list_add(&match->list, &fanout_list);
        }
        err = -EINVAL;
-       if (match->type == type &&
+
+       spin_lock(&po->bind_lock);
+       if (po->running &&
+           match->type == type &&
            match->prot_hook.type == po->prot_hook.type &&
            match->prot_hook.dev == po->prot_hook.dev) {
                err = -ENOSPC;
@@ -1761,9 +1760,16 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)
                        err = 0;
                }
        }
+       spin_unlock(&po->bind_lock);
+
+       if (err && !refcount_read(&match->sk_ref)) {
+               list_del(&match->list);
+               kfree(match);
+       }
+
 out:
        if (err && rollover) {
-               kfree(rollover);
+               kfree_rcu(rollover, rcu);
                po->rollover = NULL;
        }
        mutex_unlock(&fanout_mutex);
@@ -1790,8 +1796,10 @@ static struct packet_fanout *fanout_release(struct sock *sk)
                else
                        f = NULL;
 
-               if (po->rollover)
+               if (po->rollover) {
                        kfree_rcu(po->rollover, rcu);
+                       po->rollover = NULL;
+               }
        }
        mutex_unlock(&fanout_mutex);
 
@@ -2834,6 +2842,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
        struct virtio_net_hdr vnet_hdr = { 0 };
        int offset = 0;
        struct packet_sock *po = pkt_sk(sk);
+       bool has_vnet_hdr = false;
        int hlen, tlen, linear;
        int extra_len = 0;
 
@@ -2877,6 +2886,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
                err = packet_snd_vnet_parse(msg, &len, &vnet_hdr);
                if (err)
                        goto out_unlock;
+               has_vnet_hdr = true;
        }
 
        if (unlikely(sock_flag(sk, SOCK_NOFCS))) {
@@ -2935,7 +2945,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
        skb->priority = sk->sk_priority;
        skb->mark = sockc.mark;
 
-       if (po->has_vnet_hdr) {
+       if (has_vnet_hdr) {
                err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le());
                if (err)
                        goto out_free;
@@ -3063,13 +3073,15 @@ static int packet_do_bind(struct sock *sk, const char *name, int ifindex,
        int ret = 0;
        bool unlisted = false;
 
-       if (po->fanout)
-               return -EINVAL;
-
        lock_sock(sk);
        spin_lock(&po->bind_lock);
        rcu_read_lock();
 
+       if (po->fanout) {
+               ret = -EINVAL;
+               goto out_unlock;
+       }
+
        if (name) {
                dev = dev_get_by_name_rcu(sock_net(sk), name);
                if (!dev) {
@@ -3841,6 +3853,7 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
        void *data = &val;
        union tpacket_stats_u st;
        struct tpacket_rollover_stats rstats;
+       struct packet_rollover *rollover;
 
        if (level != SOL_PACKET)
                return -ENOPROTOOPT;
@@ -3919,13 +3932,18 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
                       0);
                break;
        case PACKET_ROLLOVER_STATS:
-               if (!po->rollover)
+               rcu_read_lock();
+               rollover = rcu_dereference(po->rollover);
+               if (rollover) {
+                       rstats.tp_all = atomic_long_read(&rollover->num);
+                       rstats.tp_huge = atomic_long_read(&rollover->num_huge);
+                       rstats.tp_failed = atomic_long_read(&rollover->num_failed);
+                       data = &rstats;
+                       lv = sizeof(rstats);
+               }
+               rcu_read_unlock();
+               if (!rollover)
                        return -EINVAL;
-               rstats.tp_all = atomic_long_read(&po->rollover->num);
-               rstats.tp_huge = atomic_long_read(&po->rollover->num_huge);
-               rstats.tp_failed = atomic_long_read(&po->rollover->num_failed);
-               data = &rstats;
-               lv = sizeof(rstats);
                break;
        case PACKET_TX_HAS_OFF:
                val = po->tp_tx_has_off;
index 94d1d405a11667ad95e61e49d4b66bdf31a6488a..562fbc155006374862e5bfdd78b65a7f46210bea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PACKET_INTERNAL_H__
 #define __PACKET_INTERNAL_H__
 
index e10b1b182ce3f03c5e6881ab7ce86cdfa633b91f..444f875932b989f5d338411a004885d0706fbe0f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHONET) += phonet.o pn_pep.o
 
 phonet-y := \
index 3a6ad0f438dc6423d450c098bb55001cdb5e83a6..64f95624f21939c946e0bb256a40d825588e0fd2 100644 (file)
@@ -296,6 +296,6 @@ static void __exit psample_module_exit(void)
 module_init(psample_module_init);
 module_exit(psample_module_exit);
 
-MODULE_AUTHOR("Yotam Gigi <yotamg@mellanox.com>");
+MODULE_AUTHOR("Yotam Gigi <yotam.gi@gmail.com>");
 MODULE_DESCRIPTION("netlink channel for packet sampling");
 MODULE_LICENSE("GPL v2");
index 2b848718f8fefe5e13fd9e479298f2c78bca47f1..b81e6953c04b29fee8d1094cd74f580cc82287aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __QRTR_H_
 #define __QRTR_H_
 
index 56c7d27eefee759be0c4dab0f939c84df9c49560..b5d568bd479cb7c7e034ef3eabc1bda1605e556c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_RDS) += rds.o
 rds-y :=       af_rds.o bind.o cong.o connection.o info.o message.o   \
                        recv.o send.o stats.o sysctl.o threads.o transport.o \
index bf4822407567044464b594e4e66a81dade3f0ed3..86a8578d95b86a298e3886b0b48c267c7d78b6d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_IB_H
 #define _RDS_IB_H
 
index 6ab39dbcca0197339cb8c2e9ec5676a778c4d23e..8557a1cae04170496887815a0f41e7c1abd2d979 100644 (file)
@@ -661,13 +661,15 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
                        }
                }
 
-               rds_ib_set_wr_signal_state(ic, send, 0);
+               rds_ib_set_wr_signal_state(ic, send, false);
 
                /*
                 * Always signal the last one if we're stopping due to flow control.
                 */
-               if (ic->i_flowctl && flow_controlled && i == (work_alloc-1))
-                       send->s_wr.send_flags |= IB_SEND_SIGNALED | IB_SEND_SOLICITED;
+               if (ic->i_flowctl && flow_controlled && i == (work_alloc - 1)) {
+                       rds_ib_set_wr_signal_state(ic, send, true);
+                       send->s_wr.send_flags |= IB_SEND_SOLICITED;
+               }
 
                if (send->s_wr.send_flags & IB_SEND_SIGNALED)
                        nr_sig++;
@@ -705,11 +707,8 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
        if (scat == &rm->data.op_sg[rm->data.op_count]) {
                prev->s_op = ic->i_data_op;
                prev->s_wr.send_flags |= IB_SEND_SOLICITED;
-               if (!(prev->s_wr.send_flags & IB_SEND_SIGNALED)) {
-                       ic->i_unsignaled_wrs = rds_ib_sysctl_max_unsig_wrs;
-                       prev->s_wr.send_flags |= IB_SEND_SIGNALED;
-                       nr_sig++;
-               }
+               if (!(prev->s_wr.send_flags & IB_SEND_SIGNALED))
+                       nr_sig += rds_ib_set_wr_signal_state(ic, prev, true);
                ic->i_data_op = NULL;
        }
 
@@ -792,6 +791,7 @@ int rds_ib_xmit_atomic(struct rds_connection *conn, struct rm_atomic_op *op)
                send->s_atomic_wr.compare_add_mask = op->op_m_fadd.nocarry_mask;
                send->s_atomic_wr.swap_mask = 0;
        }
+       send->s_wr.send_flags = 0;
        nr_sig = rds_ib_set_wr_signal_state(ic, send, op->op_notify);
        send->s_atomic_wr.wr.num_sge = 1;
        send->s_atomic_wr.wr.next = NULL;
index b6c052ca7d22361d60934f5fded480b60b6ecd0f..a069b51c467941018fc745fbeddd78305411e941 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_INFO_H
 #define _RDS_INFO_H
 
index f32b0939a04dd6a7578b92ec8a03afed29d5600c..469fa4b2da4f38b5fb62358507cb9d9ca62aa825 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_LOOP_H
 #define _RDS_LOOP_H
 
index ff2010e9d20ce0158a264b4e162270f4dbeea144..d309c44301243cc64fa6ba6f0465afc821e8c08d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDMA_TRANSPORT_H
 #define _RDMA_TRANSPORT_H
 
index 2e0315b159cb99b936d28665b4ae153f9bec2391..c349c71babff45e686d012a09a7d7b3baa30985c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_RDS_H
 #define _RDS_RDS_H
 
index e1241af7c1add4ce6a75c087a3f03baa839dcab5..9521f6e99bef4dc75f7367778420bb3caef73e57 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_RDS_SINGLE_H
 #define _RDS_RDS_SINGLE_H
 
index f8800b7ce79cad1b0f5bfc89a224210841efcc75..1aafbf7c30114155daec203fe8e0980249853ae9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RDS_TCP_H
 #define _RDS_TCP_H
 
index 9c68d2f8ba39e4efd00c4d31fb7401ec26af4b37..6ffb7e9887ce116af440b495012e35a9ddc71779 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Linux kernel RxRPC
 #
index fb17552fd292ef5a67bff1c0da2a19e4ef06c6b8..4b0a8288c98a65195519f60f5162422b6040e9c6 100644 (file)
@@ -308,10 +308,11 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock,
        call = rxrpc_new_client_call(rx, &cp, srx, user_call_ID, tx_total_len,
                                     gfp);
        /* The socket has been unlocked. */
-       if (!IS_ERR(call))
+       if (!IS_ERR(call)) {
                call->notify_rx = notify_rx;
+               mutex_unlock(&call->user_mutex);
+       }
 
-       mutex_unlock(&call->user_mutex);
        _leave(" = %p", call);
        return call;
 }
index 7b915d226de77ab9991997a214bc1716cccf99c9..9e43a4721ef8b4dbe32244ba59d1a0182632ddba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux Traffic Control Unit.
 #
index da6fa82c98a8b7fb0d4e94cdfcaa0198e6972d90..ca2ff0b3123f9d37e4b0549e55254bf46efb5e1a 100644 (file)
@@ -78,6 +78,7 @@ static void tcf_idr_remove(struct tcf_idrinfo *idrinfo, struct tc_action *p)
        spin_lock_bh(&idrinfo->lock);
        idr_remove_ext(&idrinfo->action_idr, p->tcfa_index);
        spin_unlock_bh(&idrinfo->lock);
+       put_net(idrinfo->net);
        gen_kill_estimator(&p->tcfa_rate_est);
        free_tcf(p);
 }
@@ -86,6 +87,8 @@ int __tcf_idr_release(struct tc_action *p, bool bind, bool strict)
 {
        int ret = 0;
 
+       ASSERT_RTNL();
+
        if (p) {
                if (bind)
                        p->tcfa_bindcnt--;
@@ -334,6 +337,7 @@ err3:
        p->idrinfo = idrinfo;
        p->ops = ops;
        INIT_LIST_HEAD(&p->list);
+       get_net(idrinfo->net);
        *a = p;
        return 0;
 }
index c0c707eb2c962520fbc6da655c8b4151bf8a4462..9bce8cc84cbb9cd99fa1812ef0ac99a4405a995a 100644 (file)
@@ -398,7 +398,7 @@ static __net_init int bpf_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, bpf_net_id);
 
-       return tc_action_net_init(tn, &act_bpf_ops);
+       return tc_action_net_init(tn, &act_bpf_ops, net);
 }
 
 static void __net_exit bpf_exit_net(struct net *net)
index 10b7a8855a6c754640c66b21af3df1e4b17de63d..34e52d01a5dde25ab4432979eaac01c730d733fd 100644 (file)
@@ -206,7 +206,7 @@ static __net_init int connmark_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, connmark_net_id);
 
-       return tc_action_net_init(tn, &act_connmark_ops);
+       return tc_action_net_init(tn, &act_connmark_ops, net);
 }
 
 static void __net_exit connmark_exit_net(struct net *net)
index 1c40caadcff959ba0c6cec6b8e32f7b459c42cfa..35171df2ebef38776dfd2f9fe2603de86d341872 100644 (file)
@@ -626,7 +626,7 @@ static __net_init int csum_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, csum_net_id);
 
-       return tc_action_net_init(tn, &act_csum_ops);
+       return tc_action_net_init(tn, &act_csum_ops, net);
 }
 
 static void __net_exit csum_exit_net(struct net *net)
index e29a48ef7fc348aefdc720cf08d1509ac5b53559..ef7f7f39d26d27cff31f929f84dfed549ccb843d 100644 (file)
@@ -232,7 +232,7 @@ static __net_init int gact_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, gact_net_id);
 
-       return tc_action_net_init(tn, &act_gact_ops);
+       return tc_action_net_init(tn, &act_gact_ops, net);
 }
 
 static void __net_exit gact_exit_net(struct net *net)
index 8ccd35825b6b97f48311c1060f88a41a34f18f9a..f65e4b5058e0803d4e2f9a67f2cb1f7978ffc656 100644 (file)
@@ -818,7 +818,7 @@ static __net_init int ife_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, ife_net_id);
 
-       return tc_action_net_init(tn, &act_ife_ops);
+       return tc_action_net_init(tn, &act_ife_ops, net);
 }
 
 static void __net_exit ife_exit_net(struct net *net)
index d9e399a7e3d59c8ec53e46e0862e2ca3c83988bc..dbdf3b2470d53bebbd2f75f32889d4fda47e19fb 100644 (file)
@@ -334,7 +334,7 @@ static __net_init int ipt_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, ipt_net_id);
 
-       return tc_action_net_init(tn, &act_ipt_ops);
+       return tc_action_net_init(tn, &act_ipt_ops, net);
 }
 
 static void __net_exit ipt_exit_net(struct net *net)
@@ -384,7 +384,7 @@ static __net_init int xt_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, xt_net_id);
 
-       return tc_action_net_init(tn, &act_xt_ops);
+       return tc_action_net_init(tn, &act_xt_ops, net);
 }
 
 static void __net_exit xt_exit_net(struct net *net)
index 416627c66f081f26ff9284de86411c3e05390b8e..84759cfd5a3398555cba7012d0cc949b7b7e6033 100644 (file)
@@ -343,7 +343,7 @@ static __net_init int mirred_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, mirred_net_id);
 
-       return tc_action_net_init(tn, &act_mirred_ops);
+       return tc_action_net_init(tn, &act_mirred_ops, net);
 }
 
 static void __net_exit mirred_exit_net(struct net *net)
index c365d01b99c8b7892c16e43742a88744d7d84e54..7eeaaf9217b69faa356a091409bbaa2c70f95242 100644 (file)
@@ -307,7 +307,7 @@ static __net_init int nat_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, nat_net_id);
 
-       return tc_action_net_init(tn, &act_nat_ops);
+       return tc_action_net_init(tn, &act_nat_ops, net);
 }
 
 static void __net_exit nat_exit_net(struct net *net)
index 491fe5deb09ee7f38a6c0f892c43ffe0bce79fd1..b3d82c334a5f5285ad7309e5eb9b573e2f84e229 100644 (file)
@@ -450,7 +450,7 @@ static __net_init int pedit_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, pedit_net_id);
 
-       return tc_action_net_init(tn, &act_pedit_ops);
+       return tc_action_net_init(tn, &act_pedit_ops, net);
 }
 
 static void __net_exit pedit_exit_net(struct net *net)
index 3bb2ebf9e9aec2743033ecdc4f5763ce601bf653..9ec42b26e4b97d298392e60ed7ca0a1eb427b6ea 100644 (file)
@@ -331,7 +331,7 @@ static __net_init int police_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, police_net_id);
 
-       return tc_action_net_init(tn, &act_police_ops);
+       return tc_action_net_init(tn, &act_police_ops, net);
 }
 
 static void __net_exit police_exit_net(struct net *net)
index ec986ae528089081ecdf8528437bbd82b7e840e1..e69a1e3a39bf700a5a729bd9234132397c7e55c7 100644 (file)
@@ -240,7 +240,7 @@ static __net_init int sample_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, sample_net_id);
 
-       return tc_action_net_init(tn, &act_sample_ops);
+       return tc_action_net_init(tn, &act_sample_ops, net);
 }
 
 static void __net_exit sample_exit_net(struct net *net)
@@ -264,12 +264,13 @@ static int __init sample_init_module(void)
 
 static void __exit sample_cleanup_module(void)
 {
+       rcu_barrier();
        tcf_unregister_action(&act_sample_ops, &sample_net_ops);
 }
 
 module_init(sample_init_module);
 module_exit(sample_cleanup_module);
 
-MODULE_AUTHOR("Yotam Gigi <yotamg@mellanox.com>");
+MODULE_AUTHOR("Yotam Gigi <yotam.gi@gmail.com>");
 MODULE_DESCRIPTION("Packet sampling action");
 MODULE_LICENSE("GPL v2");
index e7b57e5071a365743de9d2c5aaa22dca445fa0d9..a8d0ea95f89454826e9d782846543f054a0dc5e5 100644 (file)
@@ -201,7 +201,7 @@ static __net_init int simp_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, simp_net_id);
 
-       return tc_action_net_init(tn, &act_simp_ops);
+       return tc_action_net_init(tn, &act_simp_ops, net);
 }
 
 static void __net_exit simp_exit_net(struct net *net)
index 59949d61f20da1031b8b47712f817c991c6bed60..fbac62472e09cf72c5aac1731f9065843b48455e 100644 (file)
@@ -238,7 +238,7 @@ static __net_init int skbedit_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, skbedit_net_id);
 
-       return tc_action_net_init(tn, &act_skbedit_ops);
+       return tc_action_net_init(tn, &act_skbedit_ops, net);
 }
 
 static void __net_exit skbedit_exit_net(struct net *net)
index b642ad3d39dd414d392e492bae091995b01cbd77..8e12d8897d2ff6449a410e037652a1aa95c63d35 100644 (file)
@@ -263,7 +263,7 @@ static __net_init int skbmod_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, skbmod_net_id);
 
-       return tc_action_net_init(tn, &act_skbmod_ops);
+       return tc_action_net_init(tn, &act_skbmod_ops, net);
 }
 
 static void __net_exit skbmod_exit_net(struct net *net)
index 30c96274c63826520eec062a6a5609b141bab307..c33faa373cf2221c2798509a5f1f70c8bce69240 100644 (file)
@@ -322,7 +322,7 @@ static __net_init int tunnel_key_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, tunnel_key_net_id);
 
-       return tc_action_net_init(tn, &act_tunnel_key_ops);
+       return tc_action_net_init(tn, &act_tunnel_key_ops, net);
 }
 
 static void __net_exit tunnel_key_exit_net(struct net *net)
index 16eb067a8d8fa20c17894db8047571789c0b96e8..115fc33cc6d8b321f9c02febf861b93fe9a85740 100644 (file)
@@ -269,7 +269,7 @@ static __net_init int vlan_init_net(struct net *net)
 {
        struct tc_action_net *tn = net_generic(net, vlan_net_id);
 
-       return tc_action_net_init(tn, &act_vlan_ops);
+       return tc_action_net_init(tn, &act_vlan_ops, net);
 }
 
 static void __net_exit vlan_exit_net(struct net *net)
index 0b2219adf520b33a471dd3b8e2fdf9f46271c3f9..b2d31074548724a3b59defbcd827d6538ac9bea6 100644 (file)
@@ -77,6 +77,8 @@ out:
 }
 EXPORT_SYMBOL(register_tcf_proto_ops);
 
+static struct workqueue_struct *tc_filter_wq;
+
 int unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
 {
        struct tcf_proto_ops *t;
@@ -86,6 +88,7 @@ int unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
         * tcf_proto_ops's destroy() handler.
         */
        rcu_barrier();
+       flush_workqueue(tc_filter_wq);
 
        write_lock(&cls_mod_lock);
        list_for_each_entry(t, &tcf_proto_base, head) {
@@ -100,6 +103,12 @@ int unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
 }
 EXPORT_SYMBOL(unregister_tcf_proto_ops);
 
+bool tcf_queue_work(struct work_struct *work)
+{
+       return queue_work(tc_filter_wq, work);
+}
+EXPORT_SYMBOL(tcf_queue_work);
+
 /* Select new prio value from the range, managed by kernel. */
 
 static inline u32 tcf_auto_prio(struct tcf_proto *tp)
@@ -266,6 +275,23 @@ err_chain_create:
 }
 EXPORT_SYMBOL(tcf_block_get);
 
+static void tcf_block_put_final(struct work_struct *work)
+{
+       struct tcf_block *block = container_of(work, struct tcf_block, work);
+       struct tcf_chain *chain, *tmp;
+
+       rtnl_lock();
+       /* Only chain 0 should be still here. */
+       list_for_each_entry_safe(chain, tmp, &block->chain_list, list)
+               tcf_chain_put(chain);
+       rtnl_unlock();
+       kfree(block);
+}
+
+/* XXX: Standalone actions are not allowed to jump to any chain, and bound
+ * actions should be all removed after flushing. However, filters are now
+ * destroyed in tc filter workqueue with RTNL lock, they can not race here.
+ */
 void tcf_block_put(struct tcf_block *block)
 {
        struct tcf_chain *chain, *tmp;
@@ -273,32 +299,15 @@ void tcf_block_put(struct tcf_block *block)
        if (!block)
                return;
 
-       /* XXX: Standalone actions are not allowed to jump to any chain, and
-        * bound actions should be all removed after flushing. However,
-        * filters are destroyed in RCU callbacks, we have to hold the chains
-        * first, otherwise we would always race with RCU callbacks on this list
-        * without proper locking.
-        */
-
-       /* Wait for existing RCU callbacks to cool down. */
-       rcu_barrier();
-
-       /* Hold a refcnt for all chains, except 0, in case they are gone. */
-       list_for_each_entry(chain, &block->chain_list, list)
-               if (chain->index)
-                       tcf_chain_hold(chain);
-
-       /* No race on the list, because no chain could be destroyed. */
-       list_for_each_entry(chain, &block->chain_list, list)
+       list_for_each_entry_safe(chain, tmp, &block->chain_list, list)
                tcf_chain_flush(chain);
 
-       /* Wait for RCU callbacks to release the reference count. */
+       INIT_WORK(&block->work, tcf_block_put_final);
+       /* Wait for RCU callbacks to release the reference count and make
+        * sure their works have been queued before this.
+        */
        rcu_barrier();
-
-       /* At this point, all the chains should have refcnt == 1. */
-       list_for_each_entry_safe(chain, tmp, &block->chain_list, list)
-               tcf_chain_put(chain);
-       kfree(block);
+       tcf_queue_work(&block->work);
 }
 EXPORT_SYMBOL(tcf_block_put);
 
@@ -879,6 +888,7 @@ void tcf_exts_destroy(struct tcf_exts *exts)
 #ifdef CONFIG_NET_CLS_ACT
        LIST_HEAD(actions);
 
+       ASSERT_RTNL();
        tcf_exts_to_list(exts, &actions);
        tcf_action_destroy(&actions, TCA_ACT_UNBIND);
        kfree(exts->actions);
@@ -1030,6 +1040,10 @@ EXPORT_SYMBOL(tcf_exts_get_dev);
 
 static int __init tc_filter_init(void)
 {
+       tc_filter_wq = alloc_ordered_workqueue("tc_filter_workqueue", 0);
+       if (!tc_filter_wq)
+               return -ENOMEM;
+
        rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL, 0);
        rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL, 0);
        rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter,
index d89ebafd22390238b868425cb5a8bbd8dec2c268..f177649a24192a144f261d4e4a40b52ce7cdc91a 100644 (file)
@@ -34,7 +34,10 @@ struct basic_filter {
        struct tcf_result       res;
        struct tcf_proto        *tp;
        struct list_head        link;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp,
@@ -82,15 +85,26 @@ static int basic_init(struct tcf_proto *tp)
        return 0;
 }
 
-static void basic_delete_filter(struct rcu_head *head)
+static void basic_delete_filter_work(struct work_struct *work)
 {
-       struct basic_filter *f = container_of(head, struct basic_filter, rcu);
+       struct basic_filter *f = container_of(work, struct basic_filter, work);
 
+       rtnl_lock();
        tcf_exts_destroy(&f->exts);
        tcf_em_tree_destroy(&f->ematches);
+       rtnl_unlock();
+
        kfree(f);
 }
 
+static void basic_delete_filter(struct rcu_head *head)
+{
+       struct basic_filter *f = container_of(head, struct basic_filter, rcu);
+
+       INIT_WORK(&f->work, basic_delete_filter_work);
+       tcf_queue_work(&f->work);
+}
+
 static void basic_destroy(struct tcf_proto *tp)
 {
        struct basic_head *head = rtnl_dereference(tp->root);
index 520c5027646aea5146f22d7898acfbc7dee3385a..037a3ae86829946135e2154bd83ddc722b61af17 100644 (file)
@@ -49,7 +49,10 @@ struct cls_bpf_prog {
        struct sock_filter *bpf_ops;
        const char *bpf_name;
        struct tcf_proto *tp;
-       struct rcu_head rcu;
+       union {
+               struct work_struct work;
+               struct rcu_head rcu;
+       };
 };
 
 static const struct nla_policy bpf_policy[TCA_BPF_MAX + 1] = {
@@ -257,9 +260,21 @@ static void __cls_bpf_delete_prog(struct cls_bpf_prog *prog)
        kfree(prog);
 }
 
+static void cls_bpf_delete_prog_work(struct work_struct *work)
+{
+       struct cls_bpf_prog *prog = container_of(work, struct cls_bpf_prog, work);
+
+       rtnl_lock();
+       __cls_bpf_delete_prog(prog);
+       rtnl_unlock();
+}
+
 static void cls_bpf_delete_prog_rcu(struct rcu_head *rcu)
 {
-       __cls_bpf_delete_prog(container_of(rcu, struct cls_bpf_prog, rcu));
+       struct cls_bpf_prog *prog = container_of(rcu, struct cls_bpf_prog, rcu);
+
+       INIT_WORK(&prog->work, cls_bpf_delete_prog_work);
+       tcf_queue_work(&prog->work);
 }
 
 static void __cls_bpf_delete(struct tcf_proto *tp, struct cls_bpf_prog *prog)
index d48452f8797528dd7ada96dae61a82b3905aa0de..a97e069bee89f0010daaa33c610cc1aea7b97811 100644 (file)
@@ -23,7 +23,10 @@ struct cls_cgroup_head {
        struct tcf_exts         exts;
        struct tcf_ematch_tree  ematches;
        struct tcf_proto        *tp;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp,
@@ -57,15 +60,26 @@ static const struct nla_policy cgroup_policy[TCA_CGROUP_MAX + 1] = {
        [TCA_CGROUP_EMATCHES]   = { .type = NLA_NESTED },
 };
 
+static void cls_cgroup_destroy_work(struct work_struct *work)
+{
+       struct cls_cgroup_head *head = container_of(work,
+                                                   struct cls_cgroup_head,
+                                                   work);
+       rtnl_lock();
+       tcf_exts_destroy(&head->exts);
+       tcf_em_tree_destroy(&head->ematches);
+       kfree(head);
+       rtnl_unlock();
+}
+
 static void cls_cgroup_destroy_rcu(struct rcu_head *root)
 {
        struct cls_cgroup_head *head = container_of(root,
                                                    struct cls_cgroup_head,
                                                    rcu);
 
-       tcf_exts_destroy(&head->exts);
-       tcf_em_tree_destroy(&head->ematches);
-       kfree(head);
+       INIT_WORK(&head->work, cls_cgroup_destroy_work);
+       tcf_queue_work(&head->work);
 }
 
 static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
index 2a3a60ec5b8617c48e58d8a9339cda69be68442f..67f3a2af6aab1aadb5b492265d8469a37a1e8fd5 100644 (file)
@@ -57,7 +57,10 @@ struct flow_filter {
        u32                     divisor;
        u32                     baseclass;
        u32                     hashrnd;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 static inline u32 addr_fold(void *addr)
@@ -369,14 +372,24 @@ static const struct nla_policy flow_policy[TCA_FLOW_MAX + 1] = {
        [TCA_FLOW_PERTURB]      = { .type = NLA_U32 },
 };
 
-static void flow_destroy_filter(struct rcu_head *head)
+static void flow_destroy_filter_work(struct work_struct *work)
 {
-       struct flow_filter *f = container_of(head, struct flow_filter, rcu);
+       struct flow_filter *f = container_of(work, struct flow_filter, work);
 
+       rtnl_lock();
        del_timer_sync(&f->perturb_timer);
        tcf_exts_destroy(&f->exts);
        tcf_em_tree_destroy(&f->ematches);
        kfree(f);
+       rtnl_unlock();
+}
+
+static void flow_destroy_filter(struct rcu_head *head)
+{
+       struct flow_filter *f = container_of(head, struct flow_filter, rcu);
+
+       INIT_WORK(&f->work, flow_destroy_filter_work);
+       tcf_queue_work(&f->work);
 }
 
 static int flow_change(struct net *net, struct sk_buff *in_skb,
index 1a267e77c6de93ad58fd609426d3daef27f39c54..5b5722c8b32c1a276f7441fb67baa0d16ba24ff2 100644 (file)
@@ -87,7 +87,10 @@ struct cls_fl_filter {
        struct list_head list;
        u32 handle;
        u32 flags;
-       struct rcu_head rcu;
+       union {
+               struct work_struct work;
+               struct rcu_head rcu;
+       };
        struct net_device *hw_dev;
 };
 
@@ -215,12 +218,22 @@ static int fl_init(struct tcf_proto *tp)
        return 0;
 }
 
-static void fl_destroy_filter(struct rcu_head *head)
+static void fl_destroy_filter_work(struct work_struct *work)
 {
-       struct cls_fl_filter *f = container_of(head, struct cls_fl_filter, rcu);
+       struct cls_fl_filter *f = container_of(work, struct cls_fl_filter, work);
 
+       rtnl_lock();
        tcf_exts_destroy(&f->exts);
        kfree(f);
+       rtnl_unlock();
+}
+
+static void fl_destroy_filter(struct rcu_head *head)
+{
+       struct cls_fl_filter *f = container_of(head, struct cls_fl_filter, rcu);
+
+       INIT_WORK(&f->work, fl_destroy_filter_work);
+       tcf_queue_work(&f->work);
 }
 
 static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f)
@@ -234,6 +247,7 @@ static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f)
        tc_cls_common_offload_init(&cls_flower.common, tp);
        cls_flower.command = TC_CLSFLOWER_DESTROY;
        cls_flower.cookie = (unsigned long) f;
+       cls_flower.egress_dev = f->hw_dev != tp->q->dev_queue->dev;
 
        dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER, &cls_flower);
 }
@@ -289,6 +303,7 @@ static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f)
        cls_flower.command = TC_CLSFLOWER_STATS;
        cls_flower.cookie = (unsigned long) f;
        cls_flower.exts = &f->exts;
+       cls_flower.egress_dev = f->hw_dev != tp->q->dev_queue->dev;
 
        dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_CLSFLOWER,
                                      &cls_flower);
@@ -922,28 +937,28 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
 
                if (!tc_flags_valid(fnew->flags)) {
                        err = -EINVAL;
-                       goto errout;
+                       goto errout_idr;
                }
        }
 
        err = fl_set_parms(net, tp, fnew, &mask, base, tb, tca[TCA_RATE], ovr);
        if (err)
-               goto errout;
+               goto errout_idr;
 
        err = fl_check_assign_mask(head, &mask);
        if (err)
-               goto errout;
+               goto errout_idr;
 
        if (!tc_skip_sw(fnew->flags)) {
                if (!fold && fl_lookup(head, &fnew->mkey)) {
                        err = -EEXIST;
-                       goto errout;
+                       goto errout_idr;
                }
 
                err = rhashtable_insert_fast(&head->ht, &fnew->ht_node,
                                             head->ht_params);
                if (err)
-                       goto errout;
+                       goto errout_idr;
        }
 
        if (!tc_skip_hw(fnew->flags)) {
@@ -952,7 +967,7 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
                                           &mask.key,
                                           fnew);
                if (err)
-                       goto errout;
+                       goto errout_idr;
        }
 
        if (!tc_in_hw(fnew->flags))
@@ -981,6 +996,9 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
        kfree(tb);
        return 0;
 
+errout_idr:
+       if (fnew->handle)
+               idr_remove_ext(&head->handle_idr, fnew->handle);
 errout:
        tcf_exts_destroy(&fnew->exts);
        kfree(fnew);
index 941245ad07fd4b8bb4fd97cd84fac8791c571276..99183b8621ecb0543af91020167d13c193cad214 100644 (file)
@@ -46,7 +46,10 @@ struct fw_filter {
 #endif /* CONFIG_NET_CLS_IND */
        struct tcf_exts         exts;
        struct tcf_proto        *tp;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 static u32 fw_hash(u32 handle)
@@ -119,12 +122,22 @@ static int fw_init(struct tcf_proto *tp)
        return 0;
 }
 
-static void fw_delete_filter(struct rcu_head *head)
+static void fw_delete_filter_work(struct work_struct *work)
 {
-       struct fw_filter *f = container_of(head, struct fw_filter, rcu);
+       struct fw_filter *f = container_of(work, struct fw_filter, work);
 
+       rtnl_lock();
        tcf_exts_destroy(&f->exts);
        kfree(f);
+       rtnl_unlock();
+}
+
+static void fw_delete_filter(struct rcu_head *head)
+{
+       struct fw_filter *f = container_of(head, struct fw_filter, rcu);
+
+       INIT_WORK(&f->work, fw_delete_filter_work);
+       tcf_queue_work(&f->work);
 }
 
 static void fw_destroy(struct tcf_proto *tp)
index 21cc45caf8424a2d9ba75558c11fe1dc8170cd48..c33f711b90198ab8b77bd314c289d09cbfe2d170 100644 (file)
@@ -21,7 +21,10 @@ struct cls_mall_head {
        struct tcf_result res;
        u32 handle;
        u32 flags;
-       struct rcu_head rcu;
+       union {
+               struct work_struct work;
+               struct rcu_head rcu;
+       };
 };
 
 static int mall_classify(struct sk_buff *skb, const struct tcf_proto *tp,
@@ -32,6 +35,7 @@ static int mall_classify(struct sk_buff *skb, const struct tcf_proto *tp,
        if (tc_skip_sw(head->flags))
                return -1;
 
+       *res = head->res;
        return tcf_exts_exec(skb, &head->exts, res);
 }
 
@@ -40,13 +44,23 @@ static int mall_init(struct tcf_proto *tp)
        return 0;
 }
 
+static void mall_destroy_work(struct work_struct *work)
+{
+       struct cls_mall_head *head = container_of(work, struct cls_mall_head,
+                                                 work);
+       rtnl_lock();
+       tcf_exts_destroy(&head->exts);
+       kfree(head);
+       rtnl_unlock();
+}
+
 static void mall_destroy_rcu(struct rcu_head *rcu)
 {
        struct cls_mall_head *head = container_of(rcu, struct cls_mall_head,
                                                  rcu);
 
-       tcf_exts_destroy(&head->exts);
-       kfree(head);
+       INIT_WORK(&head->work, mall_destroy_work);
+       tcf_queue_work(&head->work);
 }
 
 static int mall_replace_hw_filter(struct tcf_proto *tp,
index 9ddde65915d22615aa93036f01ae0368783c94f6..4b14ccd8b8f271aabecb97427fa3fa18f7484747 100644 (file)
@@ -57,7 +57,10 @@ struct route4_filter {
        u32                     handle;
        struct route4_bucket    *bkt;
        struct tcf_proto        *tp;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 #define ROUTE4_FAILURE ((struct route4_filter *)(-1L))
@@ -254,12 +257,22 @@ static int route4_init(struct tcf_proto *tp)
        return 0;
 }
 
-static void route4_delete_filter(struct rcu_head *head)
+static void route4_delete_filter_work(struct work_struct *work)
 {
-       struct route4_filter *f = container_of(head, struct route4_filter, rcu);
+       struct route4_filter *f = container_of(work, struct route4_filter, work);
 
+       rtnl_lock();
        tcf_exts_destroy(&f->exts);
        kfree(f);
+       rtnl_unlock();
+}
+
+static void route4_delete_filter(struct rcu_head *head)
+{
+       struct route4_filter *f = container_of(head, struct route4_filter, rcu);
+
+       INIT_WORK(&f->work, route4_delete_filter_work);
+       tcf_queue_work(&f->work);
 }
 
 static void route4_destroy(struct tcf_proto *tp)
index b1f6ed48bc729b9238d1a3502c147ca856b3a996..bdbc541787f87d6bc0592122acef87a80b0b8d03 100644 (file)
@@ -97,7 +97,10 @@ struct rsvp_filter {
 
        u32                             handle;
        struct rsvp_session             *sess;
-       struct rcu_head                 rcu;
+       union {
+               struct work_struct              work;
+               struct rcu_head                 rcu;
+       };
 };
 
 static inline unsigned int hash_dst(__be32 *dst, u8 protocol, u8 tunnelid)
@@ -282,12 +285,22 @@ static int rsvp_init(struct tcf_proto *tp)
        return -ENOBUFS;
 }
 
-static void rsvp_delete_filter_rcu(struct rcu_head *head)
+static void rsvp_delete_filter_work(struct work_struct *work)
 {
-       struct rsvp_filter *f = container_of(head, struct rsvp_filter, rcu);
+       struct rsvp_filter *f = container_of(work, struct rsvp_filter, work);
 
+       rtnl_lock();
        tcf_exts_destroy(&f->exts);
        kfree(f);
+       rtnl_unlock();
+}
+
+static void rsvp_delete_filter_rcu(struct rcu_head *head)
+{
+       struct rsvp_filter *f = container_of(head, struct rsvp_filter, rcu);
+
+       INIT_WORK(&f->work, rsvp_delete_filter_work);
+       tcf_queue_work(&f->work);
 }
 
 static void rsvp_delete_filter(struct tcf_proto *tp, struct rsvp_filter *f)
index 14a7e08b2fa9e2f8a3551f6dbc1fb38f1e8df579..beaa95e09c25c26ba94155f03375d27156e9cbc4 100644 (file)
 struct tcindex_filter_result {
        struct tcf_exts         exts;
        struct tcf_result       res;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
 };
 
 struct tcindex_filter {
        u16 key;
        struct tcindex_filter_result result;
        struct tcindex_filter __rcu *next;
-       struct rcu_head rcu;
+       union {
+               struct work_struct work;
+               struct rcu_head rcu;
+       };
 };
 
 
@@ -133,12 +139,34 @@ static int tcindex_init(struct tcf_proto *tp)
        return 0;
 }
 
+static void tcindex_destroy_rexts_work(struct work_struct *work)
+{
+       struct tcindex_filter_result *r;
+
+       r = container_of(work, struct tcindex_filter_result, work);
+       rtnl_lock();
+       tcf_exts_destroy(&r->exts);
+       rtnl_unlock();
+}
+
 static void tcindex_destroy_rexts(struct rcu_head *head)
 {
        struct tcindex_filter_result *r;
 
        r = container_of(head, struct tcindex_filter_result, rcu);
-       tcf_exts_destroy(&r->exts);
+       INIT_WORK(&r->work, tcindex_destroy_rexts_work);
+       tcf_queue_work(&r->work);
+}
+
+static void tcindex_destroy_fexts_work(struct work_struct *work)
+{
+       struct tcindex_filter *f = container_of(work, struct tcindex_filter,
+                                               work);
+
+       rtnl_lock();
+       tcf_exts_destroy(&f->result.exts);
+       kfree(f);
+       rtnl_unlock();
 }
 
 static void tcindex_destroy_fexts(struct rcu_head *head)
@@ -146,8 +174,8 @@ static void tcindex_destroy_fexts(struct rcu_head *head)
        struct tcindex_filter *f = container_of(head, struct tcindex_filter,
                                                rcu);
 
-       tcf_exts_destroy(&f->result.exts);
-       kfree(f);
+       INIT_WORK(&f->work, tcindex_destroy_fexts_work);
+       tcf_queue_work(&f->work);
 }
 
 static int tcindex_delete(struct tcf_proto *tp, void *arg, bool *last)
index 10b8d851fc6be96c761bea127776b84d21b4fc05..dadd1b3444970d1be4936e4f1a6cf8fd9a6d14a6 100644 (file)
@@ -68,7 +68,10 @@ struct tc_u_knode {
        u32 __percpu            *pcpu_success;
 #endif
        struct tcf_proto        *tp;
-       struct rcu_head         rcu;
+       union {
+               struct work_struct      work;
+               struct rcu_head         rcu;
+       };
        /* The 'sel' field MUST be the last field in structure to allow for
         * tc_u32_keys allocated at end of structure.
         */
@@ -418,11 +421,21 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n,
  * this the u32_delete_key_rcu variant does not free the percpu
  * statistics.
  */
+static void u32_delete_key_work(struct work_struct *work)
+{
+       struct tc_u_knode *key = container_of(work, struct tc_u_knode, work);
+
+       rtnl_lock();
+       u32_destroy_key(key->tp, key, false);
+       rtnl_unlock();
+}
+
 static void u32_delete_key_rcu(struct rcu_head *rcu)
 {
        struct tc_u_knode *key = container_of(rcu, struct tc_u_knode, rcu);
 
-       u32_destroy_key(key->tp, key, false);
+       INIT_WORK(&key->work, u32_delete_key_work);
+       tcf_queue_work(&key->work);
 }
 
 /* u32_delete_key_freepf_rcu is the rcu callback variant
@@ -432,11 +445,21 @@ static void u32_delete_key_rcu(struct rcu_head *rcu)
  * for the variant that should be used with keys return from
  * u32_init_knode()
  */
+static void u32_delete_key_freepf_work(struct work_struct *work)
+{
+       struct tc_u_knode *key = container_of(work, struct tc_u_knode, work);
+
+       rtnl_lock();
+       u32_destroy_key(key->tp, key, true);
+       rtnl_unlock();
+}
+
 static void u32_delete_key_freepf_rcu(struct rcu_head *rcu)
 {
        struct tc_u_knode *key = container_of(rcu, struct tc_u_knode, rcu);
 
-       u32_destroy_key(key->tp, key, true);
+       INIT_WORK(&key->work, u32_delete_key_freepf_work);
+       tcf_queue_work(&key->work);
 }
 
 static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key)
index c6deb74e3d2f4a007554b9cf78e4ddf7b7b84535..22bc6fc4831116d75027a3871e7854e07b823d71 100644 (file)
@@ -301,6 +301,8 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
 {
        struct Qdisc *q;
 
+       if (!handle)
+               return NULL;
        q = qdisc_match_from_root(dev->qdisc, handle);
        if (q)
                goto out;
index 92237e75dbbc5e3e7dab124fb67baca98ae2160f..bf8c81e07c70457f37eeb167764a2aa33be34ace 100644 (file)
@@ -685,6 +685,7 @@ void qdisc_reset(struct Qdisc *qdisc)
                qdisc->gso_skb = NULL;
        }
        qdisc->q.qlen = 0;
+       qdisc->qstats.backlog = 0;
 }
 EXPORT_SYMBOL(qdisc_reset);
 
index daaf214e5201919ca3681e1670ac1389cb7985a4..3f88b75488b03275b152298bab0e66ea02298caa 100644 (file)
@@ -958,6 +958,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
        }
 
        if (cl != NULL) {
+               int old_flags;
+
                if (parentid) {
                        if (cl->cl_parent &&
                            cl->cl_parent->cl_common.classid != parentid)
@@ -978,6 +980,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
                }
 
                sch_tree_lock(sch);
+               old_flags = cl->cl_flags;
+
                if (rsc != NULL)
                        hfsc_change_rsc(cl, rsc, cur_time);
                if (fsc != NULL)
@@ -986,10 +990,21 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
                        hfsc_change_usc(cl, usc, cur_time);
 
                if (cl->qdisc->q.qlen != 0) {
-                       if (cl->cl_flags & HFSC_RSC)
-                               update_ed(cl, qdisc_peek_len(cl->qdisc));
-                       if (cl->cl_flags & HFSC_FSC)
-                               update_vf(cl, 0, cur_time);
+                       int len = qdisc_peek_len(cl->qdisc);
+
+                       if (cl->cl_flags & HFSC_RSC) {
+                               if (old_flags & HFSC_RSC)
+                                       update_ed(cl, len);
+                               else
+                                       init_ed(cl, len);
+                       }
+
+                       if (cl->cl_flags & HFSC_FSC) {
+                               if (old_flags & HFSC_FSC)
+                                       update_vf(cl, 0, cur_time);
+                               else
+                                       init_vf(cl, len);
+                       }
                }
                sch_tree_unlock(sch);
 
index 70f1b570bab9764d692f1c2e605d76d056cda2cd..8c434af3e68f481f0eccd4bf8545318021c4582d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for SCTP support code.
 #
index 92a07141fd07396a816478569f6de18a2aa13ebb..621b5ca3fd1c17c3d7ef7bb1c7677ab98cebbe77 100644 (file)
@@ -421,7 +421,7 @@ void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t,
 {
        struct dst_entry *dst;
 
-       if (!t)
+       if (sock_owned_by_user(sk) || !t)
                return;
        dst = sctp_transport_dst_check(t);
        if (dst)
@@ -794,7 +794,7 @@ hit:
 struct sctp_hash_cmp_arg {
        const union sctp_addr   *paddr;
        const struct net        *net;
-       u16                     lport;
+       __be16                  lport;
 };
 
 static inline int sctp_hash_cmp(struct rhashtable_compare_arg *arg,
@@ -820,37 +820,37 @@ out:
        return err;
 }
 
-static inline u32 sctp_hash_obj(const void *data, u32 len, u32 seed)
+static inline __u32 sctp_hash_obj(const void *data, u32 len, u32 seed)
 {
        const struct sctp_transport *t = data;
        const union sctp_addr *paddr = &t->ipaddr;
        const struct net *net = sock_net(t->asoc->base.sk);
-       u16 lport = htons(t->asoc->base.bind_addr.port);
-       u32 addr;
+       __be16 lport = htons(t->asoc->base.bind_addr.port);
+       __u32 addr;
 
        if (paddr->sa.sa_family == AF_INET6)
                addr = jhash(&paddr->v6.sin6_addr, 16, seed);
        else
-               addr = paddr->v4.sin_addr.s_addr;
+               addr = (__force __u32)paddr->v4.sin_addr.s_addr;
 
-       return  jhash_3words(addr, ((__u32)paddr->v4.sin_port) << 16 |
+       return  jhash_3words(addr, ((__force __u32)paddr->v4.sin_port) << 16 |
                             (__force __u32)lport, net_hash_mix(net), seed);
 }
 
-static inline u32 sctp_hash_key(const void *data, u32 len, u32 seed)
+static inline __u32 sctp_hash_key(const void *data, u32 len, u32 seed)
 {
        const struct sctp_hash_cmp_arg *x = data;
        const union sctp_addr *paddr = x->paddr;
        const struct net *net = x->net;
-       u16 lport = x->lport;
-       u32 addr;
+       __be16 lport = x->lport;
+       __u32 addr;
 
        if (paddr->sa.sa_family == AF_INET6)
                addr = jhash(&paddr->v6.sin6_addr, 16, seed);
        else
-               addr = paddr->v4.sin_addr.s_addr;
+               addr = (__force __u32)paddr->v4.sin_addr.s_addr;
 
-       return  jhash_3words(addr, ((__u32)paddr->v4.sin_port) << 16 |
+       return  jhash_3words(addr, ((__force __u32)paddr->v4.sin_port) << 16 |
                             (__force __u32)lport, net_hash_mix(net), seed);
 }
 
index 51c4887695909d171285b98ce1be779a3adedbab..a6dfa86c02016e3ff81f10f729a56e6673affc68 100644 (file)
@@ -738,7 +738,7 @@ static int sctp_v6_skb_iif(const struct sk_buff *skb)
 /* Was this packet marked by Explicit Congestion Notification? */
 static int sctp_v6_is_ce(const struct sk_buff *skb)
 {
-       return *((__u32 *)(ipv6_hdr(skb))) & htonl(1 << 20);
+       return *((__u32 *)(ipv6_hdr(skb))) & (__force __u32)htonl(1 << 20);
 }
 
 /* Dump the v6 addr to the seq file. */
@@ -882,8 +882,10 @@ static int sctp_inet6_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
                        net = sock_net(&opt->inet.sk);
                        rcu_read_lock();
                        dev = dev_get_by_index_rcu(net, addr->v6.sin6_scope_id);
-                       if (!dev ||
-                           !ipv6_chk_addr(net, &addr->v6.sin6_addr, dev, 0)) {
+                       if (!dev || !(opt->inet.freebind ||
+                                     net->ipv6.sysctl.ip_nonlocal_bind ||
+                                     ipv6_chk_addr(net, &addr->v6.sin6_addr,
+                                                   dev, 0))) {
                                rcu_read_unlock();
                                return 0;
                        }
index 22ed01a76b19cbd8af715f9a31f5c2d39312ce74..a72a7d925d4631e30cfb0743df392ff4cef456ca 100644 (file)
@@ -463,6 +463,7 @@ static void sctp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
                .r = r,
                .net_admin = netlink_net_capable(cb->skb, CAP_NET_ADMIN),
        };
+       int pos = cb->args[2];
 
        /* eps hashtable dumps
         * args:
@@ -493,7 +494,8 @@ skip:
                goto done;
 
        sctp_for_each_transport(sctp_sock_filter, sctp_sock_dump,
-                               net, (int *)&cb->args[2], &commp);
+                               net, &pos, &commp);
+       cb->args[2] = pos;
 
 done:
        cb->args[1] = cb->args[4];
index ca8f196b6c6c106386a65c75dccd7bc3451798ff..514465b03829b18c18ae3e890e0899138035bd7a 100644 (file)
@@ -2854,7 +2854,7 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *asoc,
                addr_param_len = af->to_addr_param(addr, &addr_param);
                param.param_hdr.type = flags;
                param.param_hdr.length = htons(paramlen + addr_param_len);
-               param.crr_id = i;
+               param.crr_id = htonl(i);
 
                sctp_addto_chunk(retval, paramlen, &param);
                sctp_addto_chunk(retval, addr_param_len, &addr_param);
@@ -2867,7 +2867,7 @@ struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *asoc,
                addr_param_len = af->to_addr_param(addr, &addr_param);
                param.param_hdr.type = SCTP_PARAM_DEL_IP;
                param.param_hdr.length = htons(paramlen + addr_param_len);
-               param.crr_id = i;
+               param.crr_id = htonl(i);
 
                sctp_addto_chunk(retval, paramlen, &param);
                sctp_addto_chunk(retval, addr_param_len, &addr_param);
@@ -3591,7 +3591,7 @@ static struct sctp_chunk *sctp_make_reconf(const struct sctp_association *asoc,
  */
 struct sctp_chunk *sctp_make_strreset_req(
                                        const struct sctp_association *asoc,
-                                       __u16 stream_num, __u16 *stream_list,
+                                       __u16 stream_num, __be16 *stream_list,
                                        bool out, bool in)
 {
        struct sctp_strreset_outreq outreq;
@@ -3788,7 +3788,8 @@ bool sctp_verify_reconf(const struct sctp_association *asoc,
 {
        struct sctp_reconf_chunk *hdr;
        union sctp_params param;
-       __u16 last = 0, cnt = 0;
+       __be16 last = 0;
+       __u16 cnt = 0;
 
        hdr = (struct sctp_reconf_chunk *)chunk->chunk_hdr;
        sctp_walk_params(param, hdr, params) {
index e6a2974e020e1a4232d94e6c2933eebff5f8acb4..e2d9a4b49c9c98061a1c5b358b65ce5285f68de8 100644 (file)
@@ -1607,12 +1607,12 @@ static int sctp_cmd_interpreter(enum sctp_event event_type,
                        break;
 
                case SCTP_CMD_INIT_FAILED:
-                       sctp_cmd_init_failed(commands, asoc, cmd->obj.err);
+                       sctp_cmd_init_failed(commands, asoc, cmd->obj.u32);
                        break;
 
                case SCTP_CMD_ASSOC_FAILED:
                        sctp_cmd_assoc_failed(commands, asoc, event_type,
-                                             subtype, chunk, cmd->obj.err);
+                                             subtype, chunk, cmd->obj.u32);
                        break;
 
                case SCTP_CMD_INIT_COUNTER_INC:
@@ -1680,8 +1680,8 @@ static int sctp_cmd_interpreter(enum sctp_event event_type,
                case SCTP_CMD_PROCESS_CTSN:
                        /* Dummy up a SACK for processing. */
                        sackh.cum_tsn_ack = cmd->obj.be32;
-                       sackh.a_rwnd = asoc->peer.rwnd +
-                                       asoc->outqueue.outstanding_bytes;
+                       sackh.a_rwnd = htonl(asoc->peer.rwnd +
+                                            asoc->outqueue.outstanding_bytes);
                        sackh.num_gap_ack_blocks = 0;
                        sackh.num_dup_tsns = 0;
                        chunk->subh.sack_hdr = &sackh;
index d4730ada7f3233367be7a0e3bb10e286a25602c8..6f45d1713452df982a985e1e882c964259ad9e20 100644 (file)
@@ -170,6 +170,36 @@ static inline void sctp_set_owner_w(struct sctp_chunk *chunk)
        sk_mem_charge(sk, chunk->skb->truesize);
 }
 
+static void sctp_clear_owner_w(struct sctp_chunk *chunk)
+{
+       skb_orphan(chunk->skb);
+}
+
+static void sctp_for_each_tx_datachunk(struct sctp_association *asoc,
+                                      void (*cb)(struct sctp_chunk *))
+
+{
+       struct sctp_outq *q = &asoc->outqueue;
+       struct sctp_transport *t;
+       struct sctp_chunk *chunk;
+
+       list_for_each_entry(t, &asoc->peer.transport_addr_list, transports)
+               list_for_each_entry(chunk, &t->transmitted, transmitted_list)
+                       cb(chunk);
+
+       list_for_each_entry(chunk, &q->retransmit, list)
+               cb(chunk);
+
+       list_for_each_entry(chunk, &q->sacked, list)
+               cb(chunk);
+
+       list_for_each_entry(chunk, &q->abandoned, list)
+               cb(chunk);
+
+       list_for_each_entry(chunk, &q->out_chunk_list, list)
+               cb(chunk);
+}
+
 /* Verify that this is a valid address. */
 static inline int sctp_verify_addr(struct sock *sk, union sctp_addr *addr,
                                   int len)
@@ -4906,6 +4936,10 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
        struct socket *sock;
        int err = 0;
 
+       /* Do not peel off from one netns to another one. */
+       if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
+               return -EINVAL;
+
        if (!asoc)
                return -EINVAL;
 
@@ -8208,7 +8242,9 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
         * paths won't try to lock it and then oldsk.
         */
        lock_sock_nested(newsk, SINGLE_DEPTH_NESTING);
+       sctp_for_each_tx_datachunk(assoc, sctp_clear_owner_w);
        sctp_assoc_migrate(assoc, newsk);
+       sctp_for_each_tx_datachunk(assoc, sctp_set_owner_w);
 
        /* If the association on the newsk is already closed before accept()
         * is called, set RCV_SHUTDOWN flag.
index 63ea1550371493ec8863627c7a43f46a22f4a4c9..fa8371ff05c43f31a7a0c5947161e08508671bcc 100644 (file)
@@ -118,6 +118,7 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
        __u16 i, str_nums, *str_list;
        struct sctp_chunk *chunk;
        int retval = -EINVAL;
+       __be16 *nstr_list;
        bool out, in;
 
        if (!asoc->peer.reconf_capable ||
@@ -148,13 +149,18 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
                        if (str_list[i] >= stream->incnt)
                                goto out;
 
+       nstr_list = kcalloc(str_nums, sizeof(__be16), GFP_KERNEL);
+       if (!nstr_list) {
+               retval = -ENOMEM;
+               goto out;
+       }
+
        for (i = 0; i < str_nums; i++)
-               str_list[i] = htons(str_list[i]);
+               nstr_list[i] = htons(str_list[i]);
 
-       chunk = sctp_make_strreset_req(asoc, str_nums, str_list, out, in);
+       chunk = sctp_make_strreset_req(asoc, str_nums, nstr_list, out, in);
 
-       for (i = 0; i < str_nums; i++)
-               str_list[i] = ntohs(str_list[i]);
+       kfree(nstr_list);
 
        if (!chunk) {
                retval = -ENOMEM;
@@ -305,7 +311,7 @@ out:
 }
 
 static struct sctp_paramhdr *sctp_chunk_lookup_strreset_param(
-                       struct sctp_association *asoc, __u32 resp_seq,
+                       struct sctp_association *asoc, __be32 resp_seq,
                        __be16 type)
 {
        struct sctp_chunk *chunk = asoc->strreset_chunk;
@@ -345,8 +351,9 @@ struct sctp_chunk *sctp_process_strreset_outreq(
 {
        struct sctp_strreset_outreq *outreq = param.v;
        struct sctp_stream *stream = &asoc->stream;
-       __u16 i, nums, flags = 0, *str_p = NULL;
        __u32 result = SCTP_STRRESET_DENIED;
+       __u16 i, nums, flags = 0;
+       __be16 *str_p = NULL;
        __u32 request_seq;
 
        request_seq = ntohl(outreq->request_seq);
@@ -439,8 +446,9 @@ struct sctp_chunk *sctp_process_strreset_inreq(
        struct sctp_stream *stream = &asoc->stream;
        __u32 result = SCTP_STRRESET_DENIED;
        struct sctp_chunk *chunk = NULL;
-       __u16 i, nums, *str_p;
        __u32 request_seq;
+       __u16 i, nums;
+       __be16 *str_p;
 
        request_seq = ntohl(inreq->request_seq);
        if (TSN_lt(asoc->strreset_inseq, request_seq) ||
@@ -769,7 +777,7 @@ struct sctp_chunk *sctp_process_strreset_resp(
 
        if (req->type == SCTP_PARAM_RESET_OUT_REQUEST) {
                struct sctp_strreset_outreq *outreq;
-               __u16 *str_p;
+               __be16 *str_p;
 
                outreq = (struct sctp_strreset_outreq *)req;
                str_p = outreq->list_of_streams;
@@ -794,7 +802,7 @@ struct sctp_chunk *sctp_process_strreset_resp(
                        nums, str_p, GFP_ATOMIC);
        } else if (req->type == SCTP_PARAM_RESET_IN_REQUEST) {
                struct sctp_strreset_inreq *inreq;
-               __u16 *str_p;
+               __be16 *str_p;
 
                /* if the result is performed, it's impossible for inreq */
                if (result == SCTP_STRRESET_PERFORMED)
index 67abc0194f301239fcbf0bd6a1136aeec585e660..5447228bf1a014ad6c95b80355bb1c3827800db7 100644 (file)
@@ -847,7 +847,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_sender_dry_event(
 
 struct sctp_ulpevent *sctp_ulpevent_make_stream_reset_event(
        const struct sctp_association *asoc, __u16 flags, __u16 stream_num,
-       __u16 *stream_list, gfp_t gfp)
+       __be16 *stream_list, gfp_t gfp)
 {
        struct sctp_stream_reset_event *sreset;
        struct sctp_ulpevent *event;
index 8c6d24b2995dd5ced548275acce04d3a6d70f043..745f145d4c4d43316f3cb30083066456497fec3a 100644 (file)
@@ -282,6 +282,7 @@ int smc_netinfo_by_tcpsk(struct socket *clcsock,
                         __be32 *subnet, u8 *prefix_len)
 {
        struct dst_entry *dst = sk_dst_get(clcsock->sk);
+       struct in_device *in_dev;
        struct sockaddr_in addr;
        int rc = -ENOENT;
        int len;
@@ -298,14 +299,17 @@ int smc_netinfo_by_tcpsk(struct socket *clcsock,
        /* get address to which the internal TCP socket is bound */
        kernel_getsockname(clcsock, (struct sockaddr *)&addr, &len);
        /* analyze IPv4 specific data of net_device belonging to TCP socket */
-       for_ifa(dst->dev->ip_ptr) {
-               if (ifa->ifa_address != addr.sin_addr.s_addr)
+       rcu_read_lock();
+       in_dev = __in_dev_get_rcu(dst->dev);
+       for_ifa(in_dev) {
+               if (!inet_ifa_match(addr.sin_addr.s_addr, ifa))
                        continue;
                *prefix_len = inet_mask_len(ifa->ifa_mask);
                *subnet = ifa->ifa_address & ifa->ifa_mask;
                rc = 0;
                break;
-       } endfor_ifa(dst->dev->ip_ptr);
+       } endfor_ifa(in_dev);
+       rcu_read_unlock();
 
 out_rel:
        dst_release(dst);
@@ -509,7 +513,7 @@ decline_rdma:
        /* RDMA setup failed, switch back to TCP */
        smc->use_fallback = true;
        if (reason_code && (reason_code != SMC_CLC_DECL_REPLY)) {
-               rc = smc_clc_send_decline(smc, reason_code, 0);
+               rc = smc_clc_send_decline(smc, reason_code);
                if (rc < sizeof(struct smc_clc_msg_decline))
                        goto out_err;
        }
@@ -804,8 +808,6 @@ static void smc_listen_work(struct work_struct *work)
                rc = local_contact;
                if (rc == -ENOMEM)
                        reason_code = SMC_CLC_DECL_MEM;/* insufficient memory*/
-               else if (rc == -ENOLINK)
-                       reason_code = SMC_CLC_DECL_SYNCERR; /* synchr. error */
                goto decline_rdma;
        }
        link = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK];
@@ -899,7 +901,7 @@ decline_rdma:
        smc_conn_free(&new_smc->conn);
        new_smc->use_fallback = true;
        if (reason_code && (reason_code != SMC_CLC_DECL_REPLY)) {
-               rc = smc_clc_send_decline(new_smc, reason_code, 0);
+               rc = smc_clc_send_decline(new_smc, reason_code);
                if (rc < sizeof(struct smc_clc_msg_decline))
                        goto out_err;
        }
index 6e44313e4467d01fbdc77f07ee7d14c50ab92ce2..0bee9d16cf29c8817b8afb898053aaa354f51702 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -149,7 +150,7 @@ struct smc_connection {
        atomic_t                sndbuf_space;   /* remaining space in sndbuf */
        u16                     tx_cdc_seq;     /* sequence # for CDC send */
        spinlock_t              send_lock;      /* protect wr_sends */
-       struct work_struct      tx_work;        /* retry of smc_cdc_msg_send */
+       struct delayed_work     tx_work;        /* retry of smc_cdc_msg_send */
 
        struct smc_host_cdc_msg local_rx_ctrl;  /* filled during event_handl.
                                                 * .prod cf. TCP rcv_nxt
index a7294edbc22177d2c5b5a21deffaacea1e0855e2..535e72cfc64bfbb6196085008333f19928811d55 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 8e1d76f2600796f7384e39c67ebaed94a984ca28..bea61dadaf3629839f6aa4a46cb20d595eb92923 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 3934913ab835cc791362a6a2ea816e871ce2cee1..1800e16b2a0231347f3dedad3482e0f637ddebd4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -95,9 +96,10 @@ int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
        }
        if (clcm->type == SMC_CLC_DECLINE) {
                reason_code = SMC_CLC_DECL_REPLY;
-               if (ntohl(((struct smc_clc_msg_decline *)buf)->peer_diagnosis)
-                       == SMC_CLC_DECL_SYNCERR)
+               if (((struct smc_clc_msg_decline *)buf)->hdr.flag) {
                        smc->conn.lgr->sync_err = true;
+                       smc_lgr_terminate(smc->conn.lgr);
+               }
        }
 
 out:
@@ -105,8 +107,7 @@ out:
 }
 
 /* send CLC DECLINE message across internal TCP socket */
-int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,
-                        u8 out_of_sync)
+int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info)
 {
        struct smc_clc_msg_decline dclc;
        struct msghdr msg;
@@ -118,7 +119,7 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,
        dclc.hdr.type = SMC_CLC_DECLINE;
        dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline));
        dclc.hdr.version = SMC_CLC_V1;
-       dclc.hdr.flag = out_of_sync ? 1 : 0;
+       dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0;
        memcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid));
        dclc.peer_diagnosis = htonl(peer_diag_info);
        memcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER));
index 13db8ce177c91dd913fac15fdebb5e05875e0ec9..12a9af1539a2c7fdcd094567ee64dd52db19fdce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -106,8 +107,7 @@ struct smc_ib_device;
 
 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
                     u8 expected_type);
-int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info,
-                        u8 out_of_sync);
+int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info);
 int smc_clc_send_proposal(struct smc_sock *smc, struct smc_ib_device *smcibdev,
                          u8 ibport);
 int smc_clc_send_confirm(struct smc_sock *smc);
index 3c2e166b5d222f4c932179ae442cbd88969efc92..2427a1f3d0d12192ea3a148a69f161d3c20cdafd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -174,15 +175,15 @@ int smc_close_active(struct smc_sock *smc)
 {
        struct smc_cdc_conn_state_flags *txflags =
                &smc->conn.local_tx_ctrl.conn_state_flags;
-       long timeout = SMC_MAX_STREAM_WAIT_TIMEOUT;
        struct smc_connection *conn = &smc->conn;
        struct sock *sk = &smc->sk;
        int old_state;
+       long timeout;
        int rc = 0;
 
-       if (sock_flag(sk, SOCK_LINGER) &&
-           !(current->flags & PF_EXITING))
-               timeout = sk->sk_lingertime;
+       timeout = current->flags & PF_EXITING ?
+                 0 : sock_flag(sk, SOCK_LINGER) ?
+                     sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;
 
 again:
        old_state = sk->sk_state;
@@ -208,7 +209,7 @@ again:
        case SMC_ACTIVE:
                smc_close_stream_wait(smc, timeout);
                release_sock(sk);
-               cancel_work_sync(&conn->tx_work);
+               cancel_delayed_work_sync(&conn->tx_work);
                lock_sock(sk);
                if (sk->sk_state == SMC_ACTIVE) {
                        /* send close request */
@@ -234,7 +235,7 @@ again:
                if (!smc_cdc_rxed_any_close(conn))
                        smc_close_stream_wait(smc, timeout);
                release_sock(sk);
-               cancel_work_sync(&conn->tx_work);
+               cancel_delayed_work_sync(&conn->tx_work);
                lock_sock(sk);
                if (sk->sk_err != ECONNABORTED) {
                        /* confirm close from peer */
@@ -263,7 +264,9 @@ again:
                /* peer sending PeerConnectionClosed will cause transition */
                break;
        case SMC_PROCESSABORT:
-               cancel_work_sync(&conn->tx_work);
+               release_sock(sk);
+               cancel_delayed_work_sync(&conn->tx_work);
+               lock_sock(sk);
                smc_close_abort(conn);
                sk->sk_state = SMC_CLOSED;
                smc_close_wait_tx_pends(smc);
@@ -411,13 +414,14 @@ void smc_close_sock_put_work(struct work_struct *work)
 int smc_close_shutdown_write(struct smc_sock *smc)
 {
        struct smc_connection *conn = &smc->conn;
-       long timeout = SMC_MAX_STREAM_WAIT_TIMEOUT;
        struct sock *sk = &smc->sk;
        int old_state;
+       long timeout;
        int rc = 0;
 
-       if (sock_flag(sk, SOCK_LINGER))
-               timeout = sk->sk_lingertime;
+       timeout = current->flags & PF_EXITING ?
+                 0 : sock_flag(sk, SOCK_LINGER) ?
+                     sk->sk_lingertime : SMC_MAX_STREAM_WAIT_TIMEOUT;
 
 again:
        old_state = sk->sk_state;
@@ -425,7 +429,7 @@ again:
        case SMC_ACTIVE:
                smc_close_stream_wait(smc, timeout);
                release_sock(sk);
-               cancel_work_sync(&conn->tx_work);
+               cancel_delayed_work_sync(&conn->tx_work);
                lock_sock(sk);
                /* send close wr request */
                rc = smc_close_wr(conn);
@@ -439,7 +443,7 @@ again:
                if (!smc_cdc_rxed_any_close(conn))
                        smc_close_stream_wait(smc, timeout);
                release_sock(sk);
-               cancel_work_sync(&conn->tx_work);
+               cancel_delayed_work_sync(&conn->tx_work);
                lock_sock(sk);
                /* confirm close from peer */
                rc = smc_close_wr(conn);
index 4a3d99a8d7cbf18598ef74dae61e2be2a0a17b48..ed82506b1b0aa17483810401f7cb1d105cdabbf8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 1a16d51e2330bb43de8bdd67c18f8b03c1e3ee92..413e3868fbf36f57666cf961caed0a7cf5a0e56c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -25,8 +26,9 @@
 #include "smc_cdc.h"
 #include "smc_close.h"
 
-#define SMC_LGR_NUM_INCR       256
-#define SMC_LGR_FREE_DELAY     (600 * HZ)
+#define SMC_LGR_NUM_INCR               256
+#define SMC_LGR_FREE_DELAY_SERV                (600 * HZ)
+#define SMC_LGR_FREE_DELAY_CLNT                (SMC_LGR_FREE_DELAY_SERV + 10)
 
 static u32 smc_lgr_num;                        /* unique link group number */
 
@@ -107,8 +109,15 @@ static void smc_lgr_unregister_conn(struct smc_connection *conn)
                __smc_lgr_unregister_conn(conn);
        }
        write_unlock_bh(&lgr->conns_lock);
-       if (reduced && !lgr->conns_num)
-               schedule_delayed_work(&lgr->free_work, SMC_LGR_FREE_DELAY);
+       if (!reduced || lgr->conns_num)
+               return;
+       /* client link group creation always follows the server link group
+        * creation. For client use a somewhat higher removal delay time,
+        * otherwise there is a risk of out-of-sync link groups.
+        */
+       mod_delayed_work(system_wq, &lgr->free_work,
+                        lgr->role == SMC_CLNT ? SMC_LGR_FREE_DELAY_CLNT :
+                                                SMC_LGR_FREE_DELAY_SERV);
 }
 
 static void smc_lgr_free_work(struct work_struct *work)
index 19c44bf4e39160deeaea80cb71f5ca781d022ab3..fe691bf9af91db175cce87be8a4aa710d143178e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 547e0e113b17b19dc93e2606987a3dc0ff4c9c47..9033b8a36fe17fe9bd72e8fe9bd52c5dcf7e4290 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -380,6 +381,7 @@ static int smc_ib_fill_gid_and_mac(struct smc_ib_device *smcibdev, u8 ibport)
        ndev = smcibdev->ibdev->get_netdev(smcibdev->ibdev, ibport);
        if (ndev) {
                memcpy(&smcibdev->mac, ndev->dev_addr, ETH_ALEN);
+               dev_put(ndev);
        } else if (!rc) {
                memcpy(&smcibdev->mac[ibport - 1][0],
                       &smcibdev->gid[ibport - 1].raw[8], 3);
index 9b927a33d5e6236564aab11d7b1b004958c32f52..e90630dadf8e9565e129e07c0ff8e782acab7fb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index c2f9165d13ef8438886004972f93fe2821b4c070..92fe4cc8c82c2f0e860c40e40e61e1fa1ccea427 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index b472f853953a40761c045f281aa1de25f4948a5d..51b27ce90dbd25dfbbfb23a57e3253021f971bd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 78f7af28ae4f25d71469d54d44f98ef4e2df94eb..74568cdbca7087532c20b891496edeb467b13829 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -181,8 +182,10 @@ static int smc_pnet_enter(struct smc_pnetentry *new_pnetelem)
                             sizeof(new_pnetelem->ndev->name)) ||
                    smc_pnet_same_ibname(pnetelem,
                                         new_pnetelem->smcibdev->ibdev->name,
-                                        new_pnetelem->ib_port))
+                                        new_pnetelem->ib_port)) {
+                       dev_put(pnetelem->ndev);
                        goto found;
+               }
        }
        list_add_tail(&new_pnetelem->list, &smc_pnettable.pnetlist);
        rc = 0;
index c4f1bccd43589c0d2d2591925dfa3053b7fa4aef..5a29519db976f2b1b542e7aacacaed4f3f8ea812 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index b17a333e9bb0733893d9e44d92fc7ddf2f75ffbf..cbf58637ee14679f76a14e1d363cd6215dec2578 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -148,6 +149,8 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len,
                                read_done = sock_intr_errno(timeo);
                                break;
                        }
+                       if (!timeo)
+                               return -EAGAIN;
                }
 
                if (!atomic_read(&conn->bytes_to_rcv)) {
index b5b80e1f8b0f407902db764a768dcd9a3fa40b67..3a32b59bf06c56b52871a3ea51f758d7677dc8b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index 3c656beb8820cb16a28f379ee32f2f39a8ce6631..710ab3fbf6074ff9ce28fbb72b858ff2bb7af4ca 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -24,6 +25,8 @@
 #include "smc_cdc.h"
 #include "smc_tx.h"
 
+#define SMC_TX_WORK_DELAY      HZ
+
 /***************************** sndbuf producer *******************************/
 
 /* callback implementation for sk.sk_write_space()
@@ -406,7 +409,8 @@ int smc_tx_sndbuf_nonempty(struct smc_connection *conn)
                                goto out_unlock;
                        }
                        rc = 0;
-                       schedule_work(&conn->tx_work);
+                       schedule_delayed_work(&conn->tx_work,
+                                             SMC_TX_WORK_DELAY);
                }
                goto out_unlock;
        }
@@ -430,7 +434,7 @@ out_unlock:
  */
 static void smc_tx_work(struct work_struct *work)
 {
-       struct smc_connection *conn = container_of(work,
+       struct smc_connection *conn = container_of(to_delayed_work(work),
                                                   struct smc_connection,
                                                   tx_work);
        struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
@@ -468,7 +472,8 @@ void smc_tx_consumer_update(struct smc_connection *conn)
                if (!rc)
                        rc = smc_cdc_msg_send(conn, wr_buf, pend);
                if (rc < 0) {
-                       schedule_work(&conn->tx_work);
+                       schedule_delayed_work(&conn->tx_work,
+                                             SMC_TX_WORK_DELAY);
                        return;
                }
                smc_curs_write(&conn->rx_curs_confirmed,
@@ -487,6 +492,6 @@ void smc_tx_consumer_update(struct smc_connection *conn)
 void smc_tx_init(struct smc_sock *smc)
 {
        smc->sk.sk_write_space = smc_tx_write_space;
-       INIT_WORK(&smc->conn.tx_work, smc_tx_work);
+       INIT_DELAYED_WORK(&smc->conn.tx_work, smc_tx_work);
        spin_lock_init(&smc->conn.send_lock);
 }
index 1d6a0dcdcfe644404ff39fb34c0cd2c47ad4665e..78255964fa4dc1c69f96548e035e74a167999a62 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index ab56bda667837c3944eebfdfe921a2397fa52414..de4537f66832af7d85b655df6238ae7f3961e1dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
@@ -244,7 +245,7 @@ int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv)
        int rc;
 
        ib_req_notify_cq(link->smcibdev->roce_cq_send,
-                        IB_CQ_SOLICITED_MASK | IB_CQ_REPORT_MISSED_EVENTS);
+                        IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS);
        pend = container_of(priv, struct smc_wr_tx_pend, priv);
        rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx],
                          &failed_wr);
index 45eb53833052f637587cf23e10316b02bf321c1c..2acf12b060639a409e5d5f0ad98e6d48aeab0da9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Shared Memory Communications over RDMA (SMC-R) and RoCE
  *
index d4ea46a5f233b42d56d2884bf1532ca7d9374a94..c5fda15ba3193f811151043ac3675a2ebfb15c38 100644 (file)
@@ -49,7 +49,7 @@ static void strp_abort_strp(struct strparser *strp, int err)
 {
        /* Unrecoverable error in receive */
 
-       del_timer(&strp->msg_timer);
+       cancel_delayed_work(&strp->msg_timer_work);
 
        if (strp->stopped)
                return;
@@ -68,7 +68,7 @@ static void strp_abort_strp(struct strparser *strp, int err)
 static void strp_start_timer(struct strparser *strp, long timeo)
 {
        if (timeo)
-               mod_timer(&strp->msg_timer, timeo);
+               mod_delayed_work(strp_wq, &strp->msg_timer_work, timeo);
 }
 
 /* Lower lock held */
@@ -319,7 +319,7 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
                eaten += (cand_len - extra);
 
                /* Hurray, we have a new message! */
-               del_timer(&strp->msg_timer);
+               cancel_delayed_work(&strp->msg_timer_work);
                strp->skb_head = NULL;
                STRP_STATS_INCR(strp->stats.msgs);
 
@@ -450,9 +450,10 @@ static void strp_work(struct work_struct *w)
        do_strp_work(container_of(w, struct strparser, work));
 }
 
-static void strp_msg_timeout(unsigned long arg)
+static void strp_msg_timeout(struct work_struct *w)
 {
-       struct strparser *strp = (struct strparser *)arg;
+       struct strparser *strp = container_of(w, struct strparser,
+                                             msg_timer_work.work);
 
        /* Message assembly timed out */
        STRP_STATS_INCR(strp->stats.msg_timeouts);
@@ -505,9 +506,7 @@ int strp_init(struct strparser *strp, struct sock *sk,
        strp->cb.read_sock_done = cb->read_sock_done ? : default_read_sock_done;
        strp->cb.abort_parser = cb->abort_parser ? : strp_abort_strp;
 
-       setup_timer(&strp->msg_timer, strp_msg_timeout,
-                   (unsigned long)strp);
-
+       INIT_DELAYED_WORK(&strp->msg_timer_work, strp_msg_timeout);
        INIT_WORK(&strp->work, strp_work);
 
        return 0;
@@ -532,7 +531,7 @@ void strp_done(struct strparser *strp)
 {
        WARN_ON(!strp->stopped);
 
-       del_timer_sync(&strp->msg_timer);
+       cancel_delayed_work_sync(&strp->msg_timer_work);
        cancel_work_sync(&strp->work);
 
        if (strp->skb_head) {
index ea7ffa12e0f9ed66023ba397c9e4d365a1bb1d56..090658c3da122be31f3e6909e5b0187094ddf3ba 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Linux kernel SUN RPC
 #
index 14e9e53e63d51550bba556807fc215865c0c4f59..c374268b008ff261081415c084c153e293cafda5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for Linux kernel rpcsec_gss implementation
 #
index 5f3d527dff65c0d9cf354d0d2488b955bd1452e1..75d72e109a04d2c9c92e8310a7c2852c710b9924 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/net/sunrpc/auth_null.c
  *
index 82337e1ec9cdc76cdcd30fe9fda0684814c95258..dafd6b870ba3946835b8aa00977e1aeeaa116b6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/net/sunrpc/auth_unix.c
  *
index c8fd0b6c16189dfd21aaf2373b3fa72fa6c39860..e980d2a493dec17dcee93db225c59bb7bad187a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /**
  * debugfs interface for sunrpc
  *
index 394ce523174c914c6e381a780af59de00579c0c1..7ec10b92bea149b2d1b15a150302621039182569 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUNRPC_NETNS_H__
 #define __SUNRPC_NETNS_H__
 
index e741ec2b4d8e6ea5d08a8e942e3021e5a20e4c6a..898485e3ece4e82a93d7759af2d77fd509a8676d 100644 (file)
@@ -1333,7 +1333,7 @@ void xprt_release(struct rpc_task *task)
                rpc_count_iostats(task, task->tk_client->cl_metrics);
        spin_lock(&xprt->recv_lock);
        if (!list_empty(&req->rq_list)) {
-               list_del(&req->rq_list);
+               list_del_init(&req->rq_list);
                xprt_wait_on_pinned_rqst(req);
        }
        spin_unlock(&xprt->recv_lock);
@@ -1445,6 +1445,23 @@ out:
        return xprt;
 }
 
+static void xprt_destroy_cb(struct work_struct *work)
+{
+       struct rpc_xprt *xprt =
+               container_of(work, struct rpc_xprt, task_cleanup);
+
+       rpc_xprt_debugfs_unregister(xprt);
+       rpc_destroy_wait_queue(&xprt->binding);
+       rpc_destroy_wait_queue(&xprt->pending);
+       rpc_destroy_wait_queue(&xprt->sending);
+       rpc_destroy_wait_queue(&xprt->backlog);
+       kfree(xprt->servername);
+       /*
+        * Tear down transport state and free the rpc_xprt
+        */
+       xprt->ops->destroy(xprt);
+}
+
 /**
  * xprt_destroy - destroy an RPC transport, killing off all requests.
  * @xprt: transport to destroy
@@ -1454,22 +1471,19 @@ static void xprt_destroy(struct rpc_xprt *xprt)
 {
        dprintk("RPC:       destroying transport %p\n", xprt);
 
-       /* Exclude transport connect/disconnect handlers */
+       /*
+        * Exclude transport connect/disconnect handlers and autoclose
+        */
        wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_UNINTERRUPTIBLE);
 
        del_timer_sync(&xprt->timer);
 
-       rpc_xprt_debugfs_unregister(xprt);
-       rpc_destroy_wait_queue(&xprt->binding);
-       rpc_destroy_wait_queue(&xprt->pending);
-       rpc_destroy_wait_queue(&xprt->sending);
-       rpc_destroy_wait_queue(&xprt->backlog);
-       cancel_work_sync(&xprt->task_cleanup);
-       kfree(xprt->servername);
        /*
-        * Tear down transport state and free the rpc_xprt
+        * Destroy sockets etc from the system workqueue so they can
+        * safely flush receive work running on rpciod.
         */
-       xprt->ops->destroy(xprt);
+       INIT_WORK(&xprt->task_cleanup, xprt_destroy_cb);
+       schedule_work(&xprt->task_cleanup);
 }
 
 static void xprt_destroy_kref(struct kref *kref)
index ae92a9e9ba52fe5424289156cca444887560f4c0..e2d64c7138c3aedb40febb75a6f2936345e3cb11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Multipath support for RPC
  *
index b8213ddce2f2b442a09f7946165b1e3ccaef142f..8bf19e142b6baa6ba690348129761cb4726a45c7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SUNRPC_XPRT_RDMA) += rpcrdma.o
 
 rpcrdma-y := transport.o rpc_rdma.o verbs.o \
index d31d0ac5ada9a6a08fe6760a3b5e2cb4eaa552e9..823a781ec89cf6401f6c4988e5895072579e1ece 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 Oracle.  All rights reserved.
  *
index 6c7151341194635919e31b812223732c4436ba40..fa759dd2b0f3de787d6bc127cd32961646db9f6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 Oracle.  All rights reserved.
  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
index 5a936a6a31a3245cc6ab0f6e9804d268bc198261..35d7517ef0e6e0af54fea8b6c02ad69d4cfb8304 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 Oracle.  All rights reserved.
  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
@@ -401,7 +402,7 @@ frwr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
        if (unlikely(n != mw->mw_nents))
                goto out_mapmr_err;
 
-       dprintk("RPC:       %s: Using frmr %p to map %u segments (%u bytes)\n",
+       dprintk("RPC:       %s: Using frmr %p to map %u segments (%llu bytes)\n",
                __func__, frmr, mw->mw_nents, mr->length);
 
        key = (u8)(mr->rkey & 0x000000FF);
index ec37ad83b068a5067ca6e76585ab817335c51768..992594b7cc6b699d75614ca45bbf4631c5e1ede2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 Oracle.  All rights reserved.
  *
index 7dcda4597057373c3ae17b426e487c47c6c2c2c0..9bd04549a1ad69ec19bafde45382172c3967d3e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2016 Oracle.  All rights reserved.
  *
index 9b5de31aa42939cbc3f6aa4a0a94d7a28f711e84..4dad5da388d6101a25ac3f2d3cbfdb2ac9f311aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * linux/net/sunrpc/xprtsock.c
  *
@@ -2203,7 +2204,7 @@ static void xs_udp_setup_socket(struct work_struct *work)
        struct sock_xprt *transport =
                container_of(work, struct sock_xprt, connect_worker.work);
        struct rpc_xprt *xprt = &transport->xprt;
-       struct socket *sock = transport->sock;
+       struct socket *sock;
        int status = -EIO;
 
        sock = xs_create_sock(xprt, transport,
index 31b9f9c5297421ef0430228c1deb3827d4c537d5..2bfaa9d4b403b51429f36b20770283ae0db356ff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux TIPC layer
 #
index 7d99029df342f15b28c1f8e49d43bc90c709d1b0..a140dd4a84afc44a2574b2fac25969ceba28aaf9 100644 (file)
@@ -233,7 +233,7 @@ static int tipc_bcast_xmit(struct net *net, struct sk_buff_head *pkts,
        struct sk_buff_head xmitq;
        int rc = 0;
 
-       __skb_queue_head_init(&xmitq);
+       skb_queue_head_init(&xmitq);
        tipc_bcast_lock(net);
        if (tipc_link_bc_peers(l))
                rc = tipc_link_xmit(l, pkts, &xmitq);
@@ -263,7 +263,7 @@ static int tipc_rcast_xmit(struct net *net, struct sk_buff_head *pkts,
        u32 dst, selector;
 
        selector = msg_link_selector(buf_msg(skb_peek(pkts)));
-       __skb_queue_head_init(&_pkts);
+       skb_queue_head_init(&_pkts);
 
        list_for_each_entry_safe(n, tmp, &dests->list, list) {
                dst = n->value;
index 6ef379f004ac6da5ef908911368149e10186b5c4..17146c16ee2df5bdefcb949ecb40dd81b00f9940 100644 (file)
@@ -551,7 +551,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
                return false;
        if (msg_errcode(msg))
                return false;
-       *err = -TIPC_ERR_NO_NAME;
+       *err = TIPC_ERR_NO_NAME;
        if (skb_linearize(skb))
                return false;
        msg = buf_msg(skb);
@@ -568,6 +568,14 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
        msg_set_destnode(msg, dnode);
        msg_set_destport(msg, dport);
        *err = TIPC_OK;
+
+       if (!skb_cloned(skb))
+               return true;
+
+       /* Unclone buffer in case it was bundled */
+       if (pskb_expand_head(skb, BUF_HEADROOM, BUF_TAILROOM, GFP_ATOMIC))
+               return false;
+
        return true;
 }
 
index b663c607b1c613e875501cec703a439e1ca0bce3..ffd0a275c3a79ecaba7cd80ae7ef45b427ac3f60 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux unix domain socket layer.
 #
index 4d9679701a6df5113df3e24a1c9b86e2a63b3710..384c84e83462e51d24e469515f4b52f8dcf55877 100644 (file)
@@ -257,6 +257,8 @@ static int unix_diag_get_exact(struct sk_buff *in_skb,
        err = -ENOENT;
        if (sk == NULL)
                goto out_nosk;
+       if (!net_eq(sock_net(sk), net))
+               goto out;
 
        err = sock_diag_check_cookie(sk, req->udiag_cookie);
        if (err)
index e63d574234a98974be767ae9b3a081cf4949d7ff..30a263320e4f51547f5e059b1dddf036c5d6336d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_VSOCKETS) += vsock.o
 obj-$(CONFIG_VMWARE_VMCI_VSOCKETS) += vmw_vsock_vmci_transport.o
 obj-$(CONFIG_VIRTIO_VSOCKETS) += vmw_vsock_virtio_transport.o
index 14ed5a344cdf302ba3f2d8e9dec4fb7c66fdd239..e21991fe883a7c5f03a3d6eefb52518ef9a67d6c 100644 (file)
@@ -310,11 +310,15 @@ static void hvs_close_connection(struct vmbus_channel *chan)
        struct sock *sk = get_per_channel_state(chan);
        struct vsock_sock *vsk = vsock_sk(sk);
 
+       lock_sock(sk);
+
        sk->sk_state = SS_UNCONNECTED;
        sock_set_flag(sk, SOCK_DONE);
        vsk->peer_shutdown |= SEND_SHUTDOWN | RCV_SHUTDOWN;
 
        sk->sk_state_change(sk);
+
+       release_sock(sk);
 }
 
 static void hvs_open_connection(struct vmbus_channel *chan)
@@ -344,6 +348,8 @@ static void hvs_open_connection(struct vmbus_channel *chan)
        if (!sk)
                return;
 
+       lock_sock(sk);
+
        if ((conn_from_host && sk->sk_state != VSOCK_SS_LISTEN) ||
            (!conn_from_host && sk->sk_state != SS_CONNECTING))
                goto out;
@@ -395,9 +401,7 @@ static void hvs_open_connection(struct vmbus_channel *chan)
 
                vsock_insert_connected(vnew);
 
-               lock_sock(sk);
                vsock_enqueue_accept(sk, new);
-               release_sock(sk);
        } else {
                sk->sk_state = SS_CONNECTED;
                sk->sk_socket->state = SS_CONNECTED;
@@ -410,6 +414,8 @@ static void hvs_open_connection(struct vmbus_channel *chan)
 out:
        /* Release refcnt obtained when we called vsock_find_bound_socket() */
        sock_put(sk);
+
+       release_sock(sk);
 }
 
 static u32 hvs_get_local_cid(void)
@@ -476,13 +482,21 @@ out:
 
 static void hvs_release(struct vsock_sock *vsk)
 {
+       struct sock *sk = sk_vsock(vsk);
        struct hvsock *hvs = vsk->trans;
-       struct vmbus_channel *chan = hvs->chan;
+       struct vmbus_channel *chan;
 
+       lock_sock(sk);
+
+       sk->sk_state = SS_DISCONNECTING;
+       vsock_remove_sock(vsk);
+
+       release_sock(sk);
+
+       chan = hvs->chan;
        if (chan)
                hvs_shutdown(vsk, RCV_SHUTDOWN | SEND_SHUTDOWN);
 
-       vsock_remove_sock(vsk);
 }
 
 static void hvs_destruct(struct vsock_sock *vsk)
index 8f1510d0cc2bf54e9723bc6c07172ac4e763b634..eb2db0d3b8805ec0f8db12cf5ac8d410c8b9eb8b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_WIMAX)            += wimax.o
 
index d06e5015751a4ea94dfa51fe437aa8c38f59ceaf..b7c0300e0b087fe774aeb14637db6c9ea15566e9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_CFG80211) += cfg80211.o
 obj-$(CONFIG_LIB80211) += lib80211.o
 obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
index 25666d3009be8be07410f7b0b53c81f62566111a..63682176c96cb969137b5b6e857b8bbe361f3fea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ieee80211.h>
 #include <linux/export.h>
 #include <net/cfg80211.h>
index b8aa5a7d5c77ae8453062de794fee7329e429f75..fad1b5baf8ff0e672419fd0d058ce0c7c8eb88b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains helper code to handle channel
  * settings and keeping track of what is possible at
index 6e809325af3bf090f09fb8fef4356bada3a1beed..705835047f985639de3fb7a94238c4a10928b61f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Wireless configuration interface internals.
  *
index 74fdd3811427e2014974aa6607527fc45b51329c..a8a135d94ab5d0f034d4b3c0bbb862ceebb3f6a4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CFG80211_DEBUGFS_H
 #define __CFG80211_DEBUGFS_H
 
index e9e91298c70de7bdab61b31b795df213c5a71461..a9c0f368db5d27ed72159a2395a4a4ec60234ed0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/utsname.h>
 #include <net/cfg80211.h>
 #include "core.h"
index 10bf040a0982d2f7859f98399c24de26a7fd5383..413d4f4e63345bd561b6c157ea7bdd2bc0c64504 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Some IBSS support code for cfg80211.
  *
index 421a6b80ec62722ce98bc7d354b80a2a36d5f0ad..51aa55618ef755f97a4a61c5a24d2eb016cfba42 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/ieee80211.h>
 #include <linux/export.h>
 #include <net/cfg80211.h>
index d8df7a5180a0473b56e74e8b4eb93b380965ea49..e7c64a8dce54a173f4c688656968c8c8bdd71b11 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cfg80211 MLME SAP interface
  *
index 0df8023f480bb69feb4cc2d3e0df6ea95f384e1a..d396cb61a280d24b6c4bd4733885ff9693f1c673 100644 (file)
@@ -549,6 +549,14 @@ nl80211_nan_srf_policy[NL80211_NAN_SRF_ATTR_MAX + 1] = {
        [NL80211_NAN_SRF_MAC_ADDRS] = { .type = NLA_NESTED },
 };
 
+/* policy for packet pattern attributes */
+static const struct nla_policy
+nl80211_packet_pattern_policy[MAX_NL80211_PKTPAT + 1] = {
+       [NL80211_PKTPAT_MASK] = { .type = NLA_BINARY, },
+       [NL80211_PKTPAT_PATTERN] = { .type = NLA_BINARY, },
+       [NL80211_PKTPAT_OFFSET] = { .type = NLA_U32 },
+};
+
 static int nl80211_prepare_wdev_dump(struct sk_buff *skb,
                                     struct netlink_callback *cb,
                                     struct cfg80211_registered_device **rdev,
@@ -9987,6 +9995,9 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
                if (err)
                        return err;
 
+               if (!setup.chandef.chan)
+                       return -EINVAL;
+
                err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band,
                                              &setup.beacon_rate);
                if (err)
@@ -10529,7 +10540,8 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
                        u8 *mask_pat;
 
                        nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
-                                        NULL, info->extack);
+                                        nl80211_packet_pattern_policy,
+                                        info->extack);
                        err = -EINVAL;
                        if (!pat_tb[NL80211_PKTPAT_MASK] ||
                            !pat_tb[NL80211_PKTPAT_PATTERN])
@@ -10778,7 +10790,8 @@ static int nl80211_parse_coalesce_rule(struct cfg80211_registered_device *rdev,
                            rem) {
                u8 *mask_pat;
 
-               nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat, NULL, NULL);
+               nla_parse_nested(pat_tb, MAX_NL80211_PKTPAT, pat,
+                                nl80211_packet_pattern_policy, NULL);
                if (!pat_tb[NL80211_PKTPAT_MASK] ||
                    !pat_tb[NL80211_PKTPAT_PATTERN])
                        return -EINVAL;
@@ -10903,6 +10916,9 @@ static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info)
        if (err)
                return err;
 
+       if (!tb[NL80211_REKEY_DATA_REPLAY_CTR] || !tb[NL80211_REKEY_DATA_KEK] ||
+           !tb[NL80211_REKEY_DATA_KCK])
+               return -EINVAL;
        if (nla_len(tb[NL80211_REKEY_DATA_REPLAY_CTR]) != NL80211_REPLAY_CTR_LEN)
                return -ERANGE;
        if (nla_len(tb[NL80211_REKEY_DATA_KEK]) != NL80211_KEK_LEN)
index b96933322077c6238dd39c4d990941e85154e757..fc415c8f7aac40f15b0dc526f7b989b87d8264a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NET_WIRELESS_NL80211_H
 #define __NET_WIRELESS_NL80211_H
 
index ce23d7d499605d23f06ed278ba9a69a39cab4264..0c06240d25afc9da33ddd23c09c719cd2c06ebce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CFG80211_RDEV_OPS
 #define __CFG80211_RDEV_OPS
 
index 9f0901f3e42b60db2c6aee7927b2b0ddc0ab7759..f6c5fe4825065ddb0bc99f882d36aa390129d540 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cfg80211 scan result handling
  *
index 0a49b88070d0b2d6a6fbcafe6e8816fded775261..3dd05a08c60a1e2684d8f149ab48592917e8f35b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * SME code for cfg80211
  * both driver SME event handling and the SME implementation
@@ -522,11 +523,6 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
                return -EOPNOTSUPP;
 
        if (wdev->current_bss) {
-               if (!prev_bssid)
-                       return -EALREADY;
-               if (prev_bssid &&
-                   !ether_addr_equal(prev_bssid, wdev->current_bss->pub.bssid))
-                       return -ENOTCONN;
                cfg80211_unhold_bss(wdev->current_bss);
                cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
                wdev->current_bss = NULL;
@@ -1063,11 +1059,35 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
 
        ASSERT_WDEV_LOCK(wdev);
 
-       if (WARN_ON(wdev->connect_keys)) {
-               kzfree(wdev->connect_keys);
-               wdev->connect_keys = NULL;
+       /*
+        * If we have an ssid_len, we're trying to connect or are
+        * already connected, so reject a new SSID unless it's the
+        * same (which is the case for re-association.)
+        */
+       if (wdev->ssid_len &&
+           (wdev->ssid_len != connect->ssid_len ||
+            memcmp(wdev->ssid, connect->ssid, wdev->ssid_len)))
+               return -EALREADY;
+
+       /*
+        * If connected, reject (re-)association unless prev_bssid
+        * matches the current BSSID.
+        */
+       if (wdev->current_bss) {
+               if (!prev_bssid)
+                       return -EALREADY;
+               if (!ether_addr_equal(prev_bssid, wdev->current_bss->pub.bssid))
+                       return -ENOTCONN;
        }
 
+       /*
+        * Reject if we're in the process of connecting with WEP,
+        * this case isn't very interesting and trying to handle
+        * it would make the code much more complex.
+        */
+       if (wdev->connect_keys)
+               return -EINPROGRESS;
+
        cfg80211_oper_and_ht_capa(&connect->ht_capa_mask,
                                  rdev->wiphy.ht_capa_mod_mask);
 
@@ -1118,7 +1138,12 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
 
        if (err) {
                wdev->connect_keys = NULL;
-               wdev->ssid_len = 0;
+               /*
+                * This could be reassoc getting refused, don't clear
+                * ssid_len in that case.
+                */
+               if (!wdev->current_bss)
+                       wdev->ssid_len = 0;
                return err;
        }
 
@@ -1145,6 +1170,14 @@ int cfg80211_disconnect(struct cfg80211_registered_device *rdev,
        else if (wdev->ssid_len)
                err = rdev_disconnect(rdev, dev, reason);
 
+       /*
+        * Clear ssid_len unless we actually were fully connected,
+        * in which case cfg80211_disconnected() will take care of
+        * this later.
+        */
+       if (!wdev->current_bss)
+               wdev->ssid_len = 0;
+
        return err;
 }
 
index b533ed71dafff1d0b3f7c0a6049630d9e2cdda38..7b454c2de9b76e8cf726da3bb35e3f40ad9e067f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __WIRELESS_SYSFS_H
 #define __WIRELESS_SYSFS_H
 
index 0f8db41eaddbf1d47fef0ba4f36f941afff9ade1..f3353fe5b35b89fb1b0572a2890f47133ed146c9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM cfg80211
 
index bcb1284c3415fd91706d35c03a97f3fdc6831f29..c1238d582fd190c4ecb87b3b005d6527ca597dd9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Wireless utility functions
  *
index 5d4a02c7979b0d7478ff2b39f82e24bed97a6e78..7ca04a7de85ae469348449c3f74ddedbec198e8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cfg80211 - wext compat code
  *
index c434f193f39aa6a1215c2791e25a891faed6b573..c67d7a82ab132a50be6305f69df6576fd158a15e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cfg80211 wext compat for managed mode.
  *
index a2c34ab6f194f44ce5ca2bf51c077579adda1caa..5dd544a231f232f33ab4699bdae4f758f63f28bf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the Linux X.25 Packet layer.
 #
index ba078c85f0a1533ffbbadef1ab5789399dd1528a..e9802afa43d0d850b27d0d74afd8e1de077e63bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* -*- linux-c -*-
  * sysctl_net_x25.c: sysctl interface to net X.25 subsystem.
  *
index 55b2ac3009955aacd09db22c7fc4d082807c3ed9..0bd2465a8c5a8e095d87642f9d71a19fbd6572e1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the XFRM subsystem.
 #
index acf00104ef312b563be9f3aa9698fa2a9dbdfea7..30e5746085b8fcfc5aa8abc7a8a23753c510a630 100644 (file)
@@ -91,6 +91,7 @@ int xfrm_dev_state_add(struct net *net, struct xfrm_state *x,
        }
 
        if (!dev->xfrmdev_ops || !dev->xfrmdev_ops->xdo_dev_state_add) {
+               xso->dev = NULL;
                dev_put(dev);
                return 0;
        }
index 1e98bc0fe0a54bbca2a7fc1f94ab9344af0fbded..2ad33ce1ea177cb91069e37254fd56989e3ee70f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* xfrm_hash.c: Common hash table code.
  *
  * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
index eaea9c4fb3b0e6ec8903cfc5456519e8d4e7dcd1..61be810389d8714837f739bbb0375f468e0d32e2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _XFRM_HASH_H
 #define _XFRM_HASH_H
 
index 2515cd2bc5db1a56915856aa5252f2e01592c9e7..82d20ee34581bf8944e004f2b0df10b4bf4580ec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * xfrm_input.c
  *
@@ -429,7 +430,8 @@ resume:
        nf_reset(skb);
 
        if (decaps) {
-               skb->sp->olen = 0;
+               if (skb->sp)
+                       skb->sp->olen = 0;
                skb_dst_drop(skb);
                gro_cells_receive(&gro_cells, skb);
                return 0;
@@ -440,7 +442,8 @@ resume:
 
                err = x->inner_mode->afinfo->transport_finish(skb, xfrm_gro || async);
                if (xfrm_gro) {
-                       skb->sp->olen = 0;
+                       if (skb->sp)
+                               skb->sp->olen = 0;
                        skb_dst_drop(skb);
                        gro_cells_receive(&gro_cells, skb);
                        return err;
index 31a2e6d34dba652dd568d93ae077de3136c252ca..73ad8c8ef344ac4bb6229b49c0b14b099e5fdf13 100644 (file)
@@ -105,6 +105,9 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
                if (xfrm_offload(skb)) {
                        x->type_offload->encap(x, skb);
                } else {
+                       /* Inner headers are invalid now. */
+                       skb->encapsulation = 0;
+
                        err = x->type->output(x, skb);
                        if (err == -EINPROGRESS)
                                goto out;
@@ -208,7 +211,6 @@ int xfrm_output(struct sock *sk, struct sk_buff *skb)
        int err;
 
        secpath_reset(skb);
-       skb->encapsulation = 0;
 
        if (xfrm_dev_offload_ok(skb, x)) {
                struct sec_path *sp;
index f06253969972aa3489e557faf1ef76f54b1eb3d3..8cafb3c0a4ac501348c5227f1450b800fb834c0e 100644 (file)
@@ -1573,6 +1573,14 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
                        goto put_states;
                }
 
+               if (!dst_prev)
+                       dst0 = dst1;
+               else
+                       /* Ref count is taken during xfrm_alloc_dst()
+                        * No need to do dst_clone() on dst1
+                        */
+                       dst_prev->child = dst1;
+
                if (xfrm[i]->sel.family == AF_UNSPEC) {
                        inner_mode = xfrm_ip2inner_mode(xfrm[i],
                                                        xfrm_af2proto(family));
@@ -1584,14 +1592,6 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
                } else
                        inner_mode = xfrm[i]->inner_mode;
 
-               if (!dst_prev)
-                       dst0 = dst1;
-               else
-                       /* Ref count is taken during xfrm_alloc_dst()
-                        * No need to do dst_clone() on dst1
-                        */
-                       dst_prev->child = dst1;
-
                xdst->route = dst;
                dst_copy_metrics(dst1, dst);
 
@@ -2076,7 +2076,6 @@ make_dummy_bundle:
        xdst->num_xfrms = num_xfrms;
        memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols);
 
-       dst_hold(&xdst->u.dst);
        return xdst;
 
 inc_error:
index 0dab1cd79ce4d1afe84ba9422a740689a9ebdf71..1f5cee2269af4296bd41745adec063a4a04faa9f 100644 (file)
@@ -732,12 +732,12 @@ restart:
                        }
                }
        }
+out:
+       spin_unlock_bh(&net->xfrm.xfrm_state_lock);
        if (cnt) {
                err = 0;
                xfrm_policy_cache_flush();
        }
-out:
-       spin_unlock_bh(&net->xfrm.xfrm_state_lock);
        return err;
 }
 EXPORT_SYMBOL(xfrm_state_flush);
@@ -2069,6 +2069,7 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen
        if (err >= 0) {
                xfrm_sk_policy_insert(sk, err, pol);
                xfrm_pol_put(pol);
+               __sk_dst_reset(sk);
                err = 0;
        }
 
index 35a7e794ad04060525029c71a00c8ff5c0eecb15..0c6c5ef65f9dac4342f9d21775568653dfc1bec1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/sysctl.h>
 #include <linux/slab.h>
 #include <net/net_namespace.h>
index 2bfbd9121e3b21b0eb793d2d3a685bd4cebde22b..e44a0fed48dd088ac95a0726a5f2b58b0f07c5bb 100644 (file)
@@ -657,6 +657,7 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
 
        if (err < 0) {
                x->km.state = XFRM_STATE_DEAD;
+               xfrm_dev_state_delete(x);
                __xfrm_state_put(x);
                goto out;
        }
@@ -1692,32 +1693,34 @@ static int dump_one_policy(struct xfrm_policy *xp, int dir, int count, void *ptr
 
 static int xfrm_dump_policy_done(struct netlink_callback *cb)
 {
-       struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *) &cb->args[1];
+       struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *)cb->args;
        struct net *net = sock_net(cb->skb->sk);
 
        xfrm_policy_walk_done(walk, net);
        return 0;
 }
 
+static int xfrm_dump_policy_start(struct netlink_callback *cb)
+{
+       struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *)cb->args;
+
+       BUILD_BUG_ON(sizeof(*walk) > sizeof(cb->args));
+
+       xfrm_policy_walk_init(walk, XFRM_POLICY_TYPE_ANY);
+       return 0;
+}
+
 static int xfrm_dump_policy(struct sk_buff *skb, struct netlink_callback *cb)
 {
        struct net *net = sock_net(skb->sk);
-       struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *) &cb->args[1];
+       struct xfrm_policy_walk *walk = (struct xfrm_policy_walk *)cb->args;
        struct xfrm_dump_info info;
 
-       BUILD_BUG_ON(sizeof(struct xfrm_policy_walk) >
-                    sizeof(cb->args) - sizeof(cb->args[0]));
-
        info.in_skb = cb->skb;
        info.out_skb = skb;
        info.nlmsg_seq = cb->nlh->nlmsg_seq;
        info.nlmsg_flags = NLM_F_MULTI;
 
-       if (!cb->args[0]) {
-               cb->args[0] = 1;
-               xfrm_policy_walk_init(walk, XFRM_POLICY_TYPE_ANY);
-       }
-
        (void) xfrm_policy_walk(net, walk, dump_one_policy, &info);
 
        return skb->len;
@@ -2473,6 +2476,7 @@ static const struct nla_policy xfrma_spd_policy[XFRMA_SPD_MAX+1] = {
 
 static const struct xfrm_link {
        int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **);
+       int (*start)(struct netlink_callback *);
        int (*dump)(struct sk_buff *, struct netlink_callback *);
        int (*done)(struct netlink_callback *);
        const struct nla_policy *nla_pol;
@@ -2486,6 +2490,7 @@ static const struct xfrm_link {
        [XFRM_MSG_NEWPOLICY   - XFRM_MSG_BASE] = { .doit = xfrm_add_policy    },
        [XFRM_MSG_DELPOLICY   - XFRM_MSG_BASE] = { .doit = xfrm_get_policy    },
        [XFRM_MSG_GETPOLICY   - XFRM_MSG_BASE] = { .doit = xfrm_get_policy,
+                                                  .start = xfrm_dump_policy_start,
                                                   .dump = xfrm_dump_policy,
                                                   .done = xfrm_dump_policy_done },
        [XFRM_MSG_ALLOCSPI    - XFRM_MSG_BASE] = { .doit = xfrm_alloc_userspi },
@@ -2538,6 +2543,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
 
                {
                        struct netlink_dump_control c = {
+                               .start = link->start,
                                .dump = link->dump,
                                .done = link->done,
                        };
index 05e471feb6e5f962b4a8f61cf77f48f4bf76b7be..0273bab27233c52aac6196272a343b51983e4f47 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 CFLAGS := -I../../usr/include
 
index cf17c7932a6e16c2d817d24a5b9f09e8900c86be..9b4a66e3363e69a0a2ceeed960ed50718e74cbf1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # kbuild trick to avoid linker error. Can be omitted if a module is built.
 obj- := dummy.o
 
index 6aa50098dfb8e177bd6c74c550a5aac2213148f1..2325d7ad76df83764293cd5b74e473f8cc85426b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 453e3226b4ceb1ac91c96fa761a9402399dce8e1..7d57a42488933e255af2787ee7480d117c4e90b7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BPF_LOAD_H
 #define __BPF_LOAD_H
 
index 9d1be94264019cf1136081389c1139bb2e569d7f..09afaddfc9ba9111442577a9f4dfe3faec3993cc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <sched.h>
 #include <sys/mount.h>
index 78c55207b6bdb7a32895e77a86c3200c3f059ed8..06485e0002b3b797ccfaeadd9c38ce6b8706f61c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CGROUP_HELPERS_H
 #define __CGROUP_HELPERS_H
 #include <errno.h>
index 8ab36a04c174a9c154594b7ef4fe2ef2c5c5dc5e..18bfee5aab6bdb7665d405d08e6fea3b84982f49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* eBPF mini library */
 #ifndef __LIBBPF_H
 #define __LIBBPF_H
index 7d567744c7fab9f70ce25082f58ee33cf4106466..090b96eaf7f76fad556c3d68c03cf1b08080760a 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 NS1=lwt_ns1
 VETH0=tst_lwt1a
index ec8f3bbcbef3dc871177b55cac6f27e54dfaff6f..7fcb94c09112e97eec0d276a7fb6fb0c5434f704 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/unistd.h>
 #include <linux/bpf.h>
 
index f898cfa2b1aa52f71a65db469450d4d001b08b2c..fc6bc0451ab45dc7081d153ac1a4b2f579141940 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 local_dir="$(pwd)"
 root_dir=$local_dir/../..
 mnt_dir=$(mktemp -d --tmp)
index d8014065d479f9b85d96ae3d09664b1b14894467..772d5dad8465af5195c50e63d3393eb20c9d59b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <stdlib.h>
 #include <stdio.h>
 #include <linux/unistd.h>
index 6cd2feb3e9b364aa4ec75c538fe954e581fbd84e..2be935c2627dce639c817b5fc45e6e7421486f07 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <assert.h>
 #include <linux/bpf.h>
index 0e0207c9084130c362b600f6b8cd453d2541c4dc..44fe0805b087db5a8c579e2db2f345cb3ae89846 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <assert.h>
 #include <linux/bpf.h>
index 877ecf8fc5acd956d165c1fff93ba631e73172cd..495ee02e2fb7c71753b3e851a6ce2136bc7a65ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <assert.h>
 #include <linux/bpf.h>
index 80676c25fa5017abd8c91b51f1757c7e53e5df93..3d736219a31c8e5a99f1c9173e9f62344977b286 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <unistd.h>
 #include <linux/bpf.h>
index ce2a30b11248fdf66f73c66ca037d24143d70fe5..516e255cbe8fe2f5ac67b34317bbbadfd69d1535 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <uapi/linux/unistd.h>
 #include <linux/kbuild.h>
 
index 80a05591a140322e3e63d94ca510a45af72cb8d2..37d95ef3c20fe1f7d0945924658521d132111519 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 [[ -z $TC ]] && TC='tc'
 [[ -z $IP ]] && IP='ip'
index a81f38eef417443858ddcaea3bb63711589e9fd4..8ee0371a100af1f82741ff09e49f29b950ccd074 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 # Test various socket options that can be set by attaching programs to cgroups.
 
index db036077b64480b6af3c9f42d6ac61b758384152..e53f1f6f0867de31f513a0671e53d7442001d13b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* eBPF example program:
  *
  * - Loads eBPF program
index 891f12a0e26fd715fe843621e07922654eac7a30..fc4e64d00cb3063a065cc07ec6c02c7184d19626 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 function config_device {
        ip netns add at_ns0
index 0b119eeaf85c3d6118da73d408522001ad8ea269..12faf5847e22c8cae03d9a323d9f57170b1d5f4d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 MY_DIR=$(dirname $0)
 # Details on the bpf prog
index 0365d5ee512cc78a881b23b4116d9416f718b0f6..aaddd67b37ffc8bab85ca39618cc9b519feca8bc 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 function pktgen {
     ../pktgen/pktgen_bench_xmit_mode_netif_receive.sh -i $IFC -s 64 \
index 196925403ab4f307562a92f2303d8c7bd1bcbd65..9e507c305c6e616791367c1d945c304d10389919 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 function config_device {
        ip netns add at_ns0
index a695ae268c40fdf6e0ce09f3637fed95d515a259..65a976058dd3a007322c51e7e91678688179ad2b 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # Uncomment to see generated bytecode
 #VERBOSE=verbose
index b5bf178a6ecc60eb7fa99b28abbe75dca8b06288..bf8e3a9f30673c9d4a0a0a405c218f45f80eba1f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <assert.h>
 #include <linux/bpf.h>
index 410052d9fc37088ccce56123dc746d56957d9124..312e1722a39f26b77d15ff8ba15f5ebe969a6c65 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # In Namespace 0 (at_ns0) using native tunnel
 # Overlay IP: 10.1.1.100
 # local 192.16.1.100 remote 192.16.1.200
index 31a48183beea6185bab62e581c8172429bfe13ca..3dcb475fb135c51fc0d8ebe9786a8d8e8091259a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <linux/bpf.h>
 #include <unistd.h>
index 7321a3f253c991f88e96f2a53e6ffa3e7c5f1719..efb5e61918df62fccdfa1dc72d5d85dae073d008 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
index 36b5925bb137f7a185dab9d4b74fc3c62ab8e4c8..4e2774b731f0422cf224838301af2dc5c2f8a573 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <linux/bpf.h>
 #include <unistd.h>
index a05a99a0752f4f053bc8e2f570166503a494fa3b..a8c22dcf8e4ede79884e33e2c91935694ee5e78a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 
 #include <assert.h>
index 91762d946a53eb08d301be0448f80fcdadafe999..fe3c8542ae4ab49b89c187d49aceec95666425c1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o
 
 # List of programs to build
index a9ab96188fbe011ec3d3337d9dbd936023d0a3ec..f5c3012ffa795b676b7e4ff0bb63626844f1ad2e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # kbuild trick to avoid linker error. Can be omitted if a module is built.
 obj- := dummy.o
 
index 92e6c1511910d06547a59859827d2b6b0800589e..9bfd8ff6de82e654571bc74ec2b6f2c6c5559675 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Hidraw Userspace Example
  *
index 7aac216dc420bcd1e432f01e5104d83db778e587..c7e52e9e92caf313f7c248fdb2091dc589f466f5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 CFLAGS := -I../../usr/include
 
index 3e3ef91fed6b3f741e4f273a1e0fb521ba21ba07..a7a6e0c7042411adce5e8b8a509e231ebb0b6145 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef CROSS_COMPILE
 uname_M := $(shell uname -m 2>/dev/null || echo not)
 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
index 3a6244d5f47a0bbcf21fb04169efbce735aa4385..72fc562876e23b649d51cf0826d94b8925034c09 100644 (file)
@@ -1,4 +1,5 @@
 #
+# SPDX-License-Identifier: GPL-2.0
 # Common parameter parsing for pktgen scripts
 #
 
index 0b9ffd47fd410dab3076b4ee6bfcfa5d29d2fda2..62426afeef8449d9e4faabe20bfd7b2815000c4d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 #modprobe pktgen
 
index ad98e5f40776211fe201da3ea64b24bae4741506..3ac3eb1f35043517eb3ce7ef1d8f4b9d05c5064e 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 #modprobe pktgen
 
index ba4eb26e168d22eafccfea9752cbf088c028f93f..a85552760762431af61421b87ee38f01e672bbfe 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 #modprobe pktgen
 
index e5bfe759a0fb63a9c81dee9ce3000cd1a36a03bd..2839f7d315cf6c2f8aa2f1524b4467c360501dba 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Benchmark script:
 #  - developed for benchmarking ingress qdisc path
index 1ad878e955391de33f9bad4b8da2e4bd8fbb935b..e1ee54465def803bc8f558d9e0781c44d9ef9fac 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Benchmark script:
 #  - developed for benchmarking egress qdisc path, derived (more
index 35b7fe34bda29404d28c2ca9e5923a61edae8d0d..e9ab4edba2d726951311e2fd3c62ca9b35b28700 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Simple example:
 #  * pktgen sending with single thread and single interface
index cbdd3e2bceff384bf3e1b1b03bcc7ed65b93b909..99f740ae985711a804d03ba0e130b106031df65b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Multiqueue: Using pktgen threads for sending on multiple CPUs
 #  * adding devices to kernel threads
index 8d26e0ca683dd6c0c4aec582999fa5d817ccfa50..4c2e4217638a60e633b324bb0f6bac4a7e53f02c 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Script for max single flow performance
 #  - If correctly tuned[1], single CPU 10G wirespeed small pkts is possible[2]
index 497fb7520464c6b44153252e26b46a4202678f5f..4df92b7176da8241e7b1099c14b471dc675adf81 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Script example for many flows testing
 #
index ac9cfd6b2c0a942cf1c8923b498cc2a8b7aeba07..7f8b5e59f01ed36838a8fa18a7bf6f86745308d5 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Script will generate one flow per thread (-t N)
 #  - Same destination IP
index bf7cc6b0dc199c2d5316734fb38c9ce1e21bdef3..19a870eed82b398307404431947e86d727db1674 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # kbuild trick to avoid linker error. Can be omitted if a module is built.
 obj- := dummy.o
 
index 151ec3f52189093e44e9a484d5f583a8b32fa8ee..c09e4a17ac1a71850edbb17f34e9d7d428938f83 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Seccomp filter example for x86 (32-bit and 64-bit) with BPF macros
  *
index e8b24f443709dd04a3df7c541e26075b12bb1048..1ccb435025b678d0f116004dabd7756ee1437a70 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Seccomp BPF example using a macro-based generator.
  *
index 1ef0f4d72898d9945a95fd78b501583fb18d1093..ae260d77a8680e1ad4b19842b11908789d82c43e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Seccomp BPF helper functions
  *
index 1d8de9edd8580776afe209c6c8d31cb1311b7871..0cc9816fe8e8286a92cab65bc9541e0492da4798 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Example wrapper around BPF macros.
  *
index 68325ca5e71c76de39d2cf2d24097d665926a3ea..cc0648eb389e6168800d9542bf24467d7e901a92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Naive system call dropper built on seccomp_filter.
  *
index f9b38ef82dc2449e56094b9c8c0c805673c0a7b0..52b0053274f425a6a07eb70dfbce89ca9c32d4fb 100644 (file)
@@ -62,7 +62,7 @@ int bpf_prog2(struct __sk_buff *skb)
                ret = 1;
 
        bpf_printk("sockmap: %d -> %d @ %d\n", lport, bpf_ntohl(rport), ret);
-       return bpf_sk_redirect_map(&sock_map, ret, 0);
+       return bpf_sk_redirect_map(skb, &sock_map, ret, 0);
 }
 
 SEC("sockops")
index a5c3c4a35ca1479e2cd4739b25dd3a9e5a92512b..f9fa074608029b7efc0e9e8039d751d26f1c95c4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef CROSS_COMPILE
 uname_M := $(shell uname -m 2>/dev/null || echo not)
 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
index 3ab4993d85e0f79ee7c9a22790315028d3af7d52..f1cb622f6ec076e646b563267ec9b68dae137c47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index bc7fcf010a5b4ccb7c25dcfd651e53c61ce80b1a..5522692100ba0d01d3cd669b7ea1bbdf84b0b72e 100644 (file)
@@ -78,29 +78,37 @@ static int simple_thread_fn(void *arg)
 }
 
 static DEFINE_MUTEX(thread_mutex);
+static int simple_thread_cnt;
 
 int foo_bar_reg(void)
 {
+       mutex_lock(&thread_mutex);
+       if (simple_thread_cnt++)
+               goto out;
+
        pr_info("Starting thread for foo_bar_fn\n");
        /*
         * We shouldn't be able to start a trace when the module is
         * unloading (there's other locks to prevent that). But
         * for consistency sake, we still take the thread_mutex.
         */
-       mutex_lock(&thread_mutex);
        simple_tsk_fn = kthread_run(simple_thread_fn, NULL, "event-sample-fn");
+ out:
        mutex_unlock(&thread_mutex);
        return 0;
 }
 
 void foo_bar_unreg(void)
 {
-       pr_info("Killing thread for foo_bar_fn\n");
-       /* protect against module unloading */
        mutex_lock(&thread_mutex);
+       if (--simple_thread_cnt)
+               goto out;
+
+       pr_info("Killing thread for foo_bar_fn\n");
        if (simple_tsk_fn)
                kthread_stop(simple_tsk_fn);
        simple_tsk_fn = NULL;
+ out:
        mutex_unlock(&thread_mutex);
 }
 
index 76a75ab7a60879f5b3de69eedd29cdc22027550e..5bcd91455ec8766f1ef5e32de382fb7152e8f52c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * If TRACE_SYSTEM is defined, that will be the directory created
  * in the ftrace directory under /sys/kernel/tracing/events/<system>
index 7d58a4b8d324caf689ae5d256e1b39c822cd8a52..b72d645ce8285f8cfea7ad036dee4b340469eee0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * UHID Example
  *
index 9b53d89b1ccf2fb86ef9a0dbc71c61f0e6d5c1c1..a9430fa60253dc1a1ad57957a093046137668be8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 PROGS := watchdog-simple
 
index ba45803a2216a88ff406aca0093c32c9d2d109eb..9ce66d2ca2a9c02e56bb338ff1cdf7a4ca24e702 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 57b564c24d61dd42b96e2844312202ce882aa3de..1688c44c2df6f5a717550d65a410545434c83b4f 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
 
index c06f4997d7008e772fce5f8591bb1ed018e8101e..25ab143cbe148b3fcd04432b77ceb929c0dc5d8f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ###
 # scripts contains sources for various helper programs used throughout
 # the kernel for the build process.
index a6c8c17808551aa146102ccb4132f8f5605ea74d..524eeedc8d25d2d5a2233329b8b73acb39fd72ac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # include/asm-generic contains a lot of files that are used
 # verbatim by several architectures.
 #
index 2e3a10e79ca9ed645eaedbf0f8242332e96ba400..bb831d49bcfd5edc41c30383ffab81ef9d51167b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Building
 # ==========================================================================
@@ -265,6 +266,8 @@ objtool_args += --no-fp
 endif
 ifdef CONFIG_GCOV_KERNEL
 objtool_args += --no-unreachable
+else
+objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
 endif
 
 # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory
@@ -417,7 +420,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
 # Linker scripts preprocessor (.lds.S -> .lds)
 # ---------------------------------------------------------------------------
 quiet_cmd_cpp_lds_S = LDS     $@
-      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
+      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \
                             -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
 
 $(obj)/%.lds: $(src)/%.lds.S FORCE
index 50616ea251314b2d44c18184b1a1c5027ca76c76..808d09f27ad4063424211a8264297a0b3945d3c5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Cleaning up
 # ==========================================================================
index 993fb85982df2df2a7f8e20780d0cfbe3cb732e8..c8ba6e7f9868e8d048f3595f2ed7ed5a7674c8be 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Installing dtb files
 #
index ae8a1357d01df7f2220088cdae09dca4fcec43f3..c6ebf4239e640c573a8bdf295c80ff644eb5db15 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 #
 # make W=... settings
index d1f7b0d6be66da15585058dfbdbca4a7b13378ac..b2a95af7df189509c5827bfe7af1d69918d5cfda 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifdef CONFIG_GCC_PLUGINS
   __PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
   PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
index 343d586e566e56e7705db9c556162c6080a282ff..99967948d764259228b50b7e8af8110eda5126a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Installing headers
 #
index 9cfd5c84d76f555e7be0f8fbfae1b60b79fe2831..10e5c3cb89dc09997e49dd341ab81e6086b29c46 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Building binaries on the host system
 # Binaries are used during the compilation of the kernel, for example
index 9576775a86f6418ac2ba6095b37f3e408c5cafca..1ce7115aa499b756abb9e713f41adb99b0fb4997 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifdef CONFIG_KASAN
 ifdef CONFIG_KASAN_INLINE
        call_threshold := 10000
index 5e975fee0f5b44343807d2f4e92954cb521497dc..04b5633df1cfafa316f9086c4bf98a9ecf9d0939 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Backward compatibility
 asflags-y  += $(EXTRA_AFLAGS)
 ccflags-y  += $(EXTRA_CFLAGS)
index 1adb974e6950efb80943f82b1c4ca416b09b5417..a763b4775d062965a82af7761aaa8cb5a28aeb8e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Generating modules.builtin
 # ==========================================================================
index 07650eeaaf06dd85bb5f3439959ed05c36d8a5ff..51ca0244fc8ac4f8e2981fb9dbc9df3efe507861 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Installing modules
 # ==========================================================================
index 16923ba4b5b1005158508b4e0c9d2b3d947c119c..991db7d6e4df8bff58ac0e3b6b7799c0a195bba4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ===========================================================================
 # Module versions
 # ===========================================================================
@@ -97,7 +98,6 @@ vmlinux.o: FORCE
        $(call cmd,kernel-mod)
 
 # Declare generated files as targets for modpost
-$(symverfile):         __modpost ;
 $(modules:.ko=.mod.c): __modpost ;
 
 
index b6ac7084da794842c7e7ae27ae542486230c68c7..171483bc0538d7faa5e4a34c5804a2f8e721f2ea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ==========================================================================
 # Signing modules
 # ==========================================================================
index 3b1b13818d594f9ffa9dcb15206314ab349325a7..8fd4d44fbcd1be6ff5d093a3165cfe66d8ec476b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifdef CONFIG_UBSAN
       CFLAGS_UBSAN += $(call cc-option, -fsanitize=shift)
       CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
index 6ac9527aeddb5e9d284e6f1cc2e0234aa33eb087..aa47f5926c8094557fa451c82eb29c4ae8125a99 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 cd Documentation/
 
index 0fb6b1c97c2779a414774ef36f5a5fce240d5d8b..93af93c7b3468b4bfd46dfe2c6ed59fdb369f164 100755 (executable)
@@ -1,4 +1,5 @@
 #! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # (c) 2015, Quentin Casasnovas <quentin.casasnovas@oracle.com>
 
 obj=$1
index ce9edefd6e0be32ca34b26cb47f61d35a3a2fa9d..b514a956d55012aec21d9ad38af1ddae03fc8c82 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # checkincludes: find/remove files included more than once
 #
index dd2c262aebbf2a43283f38badcf445702c59c9e9..8b80bac055e490219f97d913f33bce165960fe92 100755 (executable)
@@ -6390,7 +6390,7 @@ sub process {
                exit(0);
        }
 
-       if (!$is_patch && $file !~ /cover-letter\.patch$/) {
+       if (!$is_patch && $filename !~ /cover-letter\.patch$/) {
                ERROR("NOT_UNIFIED_DIFF",
                      "Does not appear to be a unified-diff format patch\n");
        }
index 7f4c41717e265e608483304983e71e01237517ef..cb993801e4b238a858dfc9b490c9242686a3e226 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 
 #      Check the stack usage of functions
 #
index 5a387a264201f21aaebf07ee4516d53766d3155f..ee3dfb5be6cd14a9881c8b985953e260a35921c7 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # Check if current architecture are missing any function calls compared
 # to i386.
index 8b4f205234b539b71e748f925b6a8f1254935795..f67b125c5269ed6cd4cdb761396b1db6d237710f 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
 # without including <linux/version.h>, or cases of
index 72e3755327ae0563d07224ba12b8d24347a08d11..c00c69b9171a216046682d8681bfd51fb6d4d4d4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # Clean a text file -- or directory of text files -- of stealth whitespace.
 # WARNING: this can be a highly destructive operation.  Use with caution.
index 3e5a2303dc0e744508804a3b136e0ba681cc9436..9f1755271516e6a3a123cfe25e62ab3b0864a027 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # Clean a patch file -- or directory of patch files -- of stealth whitespace.
 # WARNING: this can be a highly destructive operation.  Use with caution.
index ec487b8e7051e4c0cee49a800a3d63223a7acf9c..28ad1feff9e12d07fbf1ff2369ca1ecf7e76dd85 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # Linux kernel coccicheck
 #
 # Read Documentation/dev-tools/coccinelle.rst
index 9594c9f7eb8d9c5552ea7141138969230f00d691..47e050166f206b387b7b4db9e3c06153ab301652 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Make sure calls to d_find_alias() have a corresponding call to dput().
 //
 // Keywords: d_find_alias, dput
index 85cf5408d3787ca8b3790a9271f3e1a6cd64f981..7c312310547c2132f2f899fb5cafc21ff6037138 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
 /// for debugfs files.
 ///
index 0c7a9265c07e903b70542644ee0d4a445a49fafe..bf1313274f0b647183c726f0039f65dbe1824688 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 ///
 /// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
 /// drm_*_unreference() helpers.
index bd1a2a4ee106d04ff847ec5775a52c644e68c4d8..c121876d54ec9d5cc53c9c4455c7f1c30e5987f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Remove an open coded simple_open() function
 /// and replace file operations references to the function
 /// with simple_open() instead.
index 3e52e11ea1dc8af8b3a77b6f7d4c2dc043ad02d4..10511b9bf35eba966b99810a824dcbf3e57f7f60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 ///
 /// Use vma_pages function on vma object instead of explicit computation.
 ///
index a43c7b0c36ef8000f3baf7e41cf6223e095eb238..29d2bf41e95d17fbc76f574dbd3f5e1b1d19792a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Return statements in functions returning bool should use
 /// true/false instead of 1/0.
 //
index f698d6d0f5d7b06c765eda7a9d8e0ae4d594a678..7b48287b3dc13a2988bb2f86506d0e2efd9e2f01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
 /// threaded IRQs without a primary handler need to be requested with
 /// IRQF_ONESHOT, otherwise the request will fail.
index 2294915a19bc42c70b1cc2c3d510a7412526036b..4693ea744753414451496d3ff189603ad47bfa15 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /// Make sure (of/i2c/platform)_device_id tables are NULL terminated
 //
 // Keywords: of_table i2c_table platform_table
index 026aeb4f32ee3fa056e57c84c1283e2d04181f15..e0e39826dae90ab735d1510e882bd32a9536e005 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # Manipulate options in a .config file from the command line
 
 myname=${0##*/}
index 5206d99ddeb876e0456e6aa0d088e168219005a7..64220e36ce3b92daaf66903360282a47e9dc8818 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # (c) 2014, Sasha Levin <sasha.levin@oracle.com>
 #set -x
 
index d8824f37acce94b964643dfeed57bc32bfe8dc87..438120da1361002833a2014b1ca3fb02cc0aa539 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Disassemble the Code: line in Linux oopses
 # usage: decodecode < oops.file
 #
index 122599b1c13b7d4ca14b4e9ff637ec19789f3e64..9831cca31240b8b9890d701308ed53bcd62c2ccf 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # A depmod wrapper used by the toplevel Makefile
 
index 0db267d0adc9231de508b4cf9ca7068df8362384..89abf777f1973a23a539209c6b151c5fdc9e4e12 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# SPDX-License-Identifier: GPL-2.0
 #
 # diffconfig - a tool to compare .config files.
 #
index 2a48022c41e7d184660c59de87fa7dce0b345d4b..0dc922bb7aea524ca251a5ac345fc00c20c5617e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # scripts/dtc makefile
 
 hostprogs-y    := dtc
index f9a3d8d23c644a536ce0c9aaeed2c04b580af2f4..8c4fbad2055e59e973a82ce8aa6c00a58047e315 100755 (executable)
@@ -86,6 +86,7 @@ eod
 compile_to_dts() {
 
        dtx="$1"
+       dtc_include="$2"
 
        if [ -d "${dtx}" ] ; then
 
@@ -113,7 +114,7 @@ compile_to_dts() {
                # -----  input is DTS (source)
 
                if ( cpp ${cpp_flags} -x assembler-with-cpp ${dtx} \
-                       | ${DTC} -I dts ) ; then
+                       | ${DTC} ${dtc_include} -I dts ) ; then
                        return
                fi
 
@@ -320,18 +321,13 @@ fi
 
 cpp_flags="\
        -nostdinc                                  \
-       -I${srctree}/arch/${ARCH}/boot/dts         \
        -I${srctree}/scripts/dtc/include-prefixes  \
-       -I${srctree}/drivers/of/testcase-data      \
        -undef -D__DTS__"
 
-dtc_flags="\
-       -i ${srctree}/arch/${ARCH}/boot/dts/ \
-       -i ${srctree}/kernel/dts             \
-       ${dtx_path_1_dtc_include}            \
-       ${dtx_path_2_dtc_include}"
-
-DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
+DTC="\
+       ${DTC}                                     \
+       -i ${srctree}/scripts/dtc/include-prefixes \
+       -O dts -qq -f ${dtc_sort} -o -"
 
 
 # -----  do the diff or decompile
@@ -339,11 +335,11 @@ DTC="${DTC} ${dtc_flags} -O dts -qq -f ${dtc_sort} -o -"
 if (( ${cmd_diff} )) ; then
 
        diff ${diff_flags} --label "${dtx_file_1}" --label "${dtx_file_2}" \
-               <(compile_to_dts "${dtx_file_1}") \
-               <(compile_to_dts "${dtx_file_2}")
+               <(compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}") \
+               <(compile_to_dts "${dtx_file_2}" "${dtx_path_2_dtc_include}")
 
 else
 
-       compile_to_dts "${dtx_file_1}"
+       compile_to_dts "${dtx_file_1}" "${dtx_path_1_dtc_include}"
 
 fi
index 207a46d648649622125ad1c166584be68a8ac5b0..7d460a50b513d0557990e6534870bbdd9e000533 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * fdtdump.c - Contributed by Pantelis Antoniou <pantelis.antoniou AT gmail.com>
  */
index b8ebcc6722d2c9fdc56cbbfb101a4ea22093b7e9..62f0d5325fd304d57cc0ea0b826d896d2cf3094e 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Simple script to update the version of DTC carried by the Linux kernel
 #
 # This script assumes that the dtc and the linux git trees are in the
index 0f161ea4126157fd673d755570b107e67357135a..36a2f59c4e41cda2eafe56d020932bb142bb97a2 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # extract-mod-sig <part> <module-file>
 #
index 2aa873b944e0a5666868c91760b4d9829006e759..fa8ab15118ccb75e7affa90a04279ecb17f63181 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 use warnings;
 use strict;
index 29df825d375c6eb4b5f2ac4d15b5f3df90ae38c4..1f5ce959f5965b0249f70786e44f472581625955 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Translate stack dump function offsets.
 #
@@ -103,11 +104,12 @@ __faddr2line() {
 
        # Go through each of the object's symbols which match the func name.
        # In rare cases there might be duplicates.
+       file_end=$(size -Ax $objfile | awk '$1 == ".text" {print $2}')
        while read symbol; do
                local fields=($symbol)
                local sym_base=0x${fields[0]}
                local sym_type=${fields[1]}
-               local sym_end=0x${fields[3]}
+               local sym_end=${fields[3]}
 
                # calculate the size
                local sym_size=$(($sym_end - $sym_base))
@@ -157,7 +159,7 @@ __faddr2line() {
                addr2line -fpie $objfile $addr | sed "s; $dir_prefix\(\./\)*; ;"
                DONE=1
 
-       done < <(nm -n $objfile | awk -v fn=$func '$3 == fn { found=1; line=$0; start=$1; next } found == 1 { found=0; print line, $1 }')
+       done < <(nm -n $objfile | awk -v fn=$func -v end=$file_end '$3 == fn { found=1; line=$0; start=$1; next } found == 1 { found=0; print line, "0x"$1 } END {if (found == 1) print line, end; }')
 }
 
 [[ $# -lt 2 ]] && usage
index c9469d34ecc62115ff7db422561d38c8e2814bb0..083c526073ef9a8d04a1e17875b7498556767c37 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Test for gcc 'asm goto' support
 # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
 
index cadab9a13ed7a7aaa3e6185418ed482a665a8295..997b818c3962646b38c06747197d38e6aa1fa514 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # run gcc with ld options
 # used as a wrapper to execute link time optimizations
 # yes virginia, this is not pretty
index b65224bfb847302db905ed2ac33dc5d598b9b48b..d3caefe53eab992f39e0a5a15e6118db3521298c 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 srctree=$(dirname "$0")
 
 SHOW_ERROR=
index 214eb2335c31183e8fa438dfd6ad4a9ef3497209..e2ff425f4c7ea6958beddb3571ed9ac72a3b9ea8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin)
 
 ifeq ($(PLUGINCC),$(HOSTCC))
index 6948898b3cdf8632e7a2b6c1bbe0530ea042c1ca..ffd1dfaa1cc10b7212e7dade49c2b310a0dbd4a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GCC_COMMON_H_INCLUDED
 #define GCC_COMMON_H_INCLUDED
 
index 526c3c79b68e2e618cd4b00be3f0b8b8f0860ed1..f20797e80b6d2dcc0d860f7234dd50e76d752b0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generator for GIMPLE pass related boilerplate code/data
  *
index 9bd926e072f0d3b19ccf639012956359ab9b65d9..92bb4f3a87a4d70cb6ef5d0dce3b69b76faea31b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generator for IPA pass related boilerplate code/data
  *
index 1dc67a5aeadfe63e06e51fe8a09f3691a5214244..d69cd80b6c102e280b4df18af2269346b6e47145 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generator for RTL pass related boilerplate code/data
  *
index a27e2b36afaaf9487a8794eab8dd7e2fa4f47a99..06800bc477e0c66e55a15d102e09556ec070785c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Generator for SIMPLE_IPA pass related boilerplate code/data
  *
index 7514850f4815b5f7b337d8ec8ccc57b27b2f1026..68af5cc20a641f638166a7b3d3de70d0f16e5613 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if [ ! -f "$1" ]; then
        SEED=`od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n'`
index 7f2126df91f2a876a5c8374339f22a6f6f4387ed..11bb909845e78b623c393e11c39c2077eb2f194c 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # gcc-version [-p] gcc-command
 #
index 12dbd0b11ea4fe8d037107a590bd1f8baff21eab..6b2aeefb9cd3e0884da9ce0cfaaa8d288e03a6ee 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
 if [ "$?" -eq "0" ] ; then
index 17867e723a51a667fdec65194b9033346ff1b786..4a48bdcd4d6be6309eb895f197d370bb7b6c60db 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs"
 if [ "$?" -eq "0" ] ; then
index ab3cfe727a4eeacaadceb1d16c0234dd774bf4be..aba23be985e4da4872b5cc33f299ba0c34d93db6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 always := gdb-scripts
 
 SRCTREE := $(abspath $(srctree))
index 3c23bab3367bf4d389f850098faf7784ec92c004..34d6ab1811a4042ec7aec5ce935dbffc000f86b2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 hostprogs-y    := genksyms
 always         := $(hostprogs-y)
index 86ebb9ee7570782c565d728becb97b66f6c4ffc0..ebfcbef4371c1f4bef745456b37ffdd49a94ca9b 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # Detect cycles in the header file dependency graph
 # Vegard Nossum <vegardno@ifi.uio.no>
index d4dc4de5cea1f9134d810d2bdc3614187187571d..e0f883eb39a2e197bac4da0d97d481361663934f 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Run headers_$1 command for all suitable architectures
 
 # Stop on error
index 3091e4ee6ee1329d6224266ae788f4776f8fe073..b6aec5e4365f9bf2b58c615fd3c7e591da5c20b6 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 #
 # headers_check.pl execute a number of trivial consistency checks
 #
index fdebd66f8fc16c2db0189480318c5f8599aebdf0..4d1ea96e8794c19c99bae029f57377c076ea1f46 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if [ $# -lt 2 ]
 then
index 5d554419170b7d54ec82ddb1d31093d3eab0aa7d..9ee9bf7fd1a2113bfb869cf53b6d26d2f0852455 100644 (file)
@@ -158,7 +158,7 @@ static int read_symbol(FILE *in, struct sym_entry *s)
        else if (str[0] == '$')
                return -1;
        /* exclude debugging symbols */
-       else if (stype == 'N')
+       else if (stype == 'N' || stype == 'n')
                return -1;
 
        /* include the type field in the symbol name, so that it gets
index 8c12c20c55a67345f34689f6a78d1ec355eb43e0..297c1bf35140ac0823e33110350430bd0bec0cdc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ===========================================================================
 # Kernel configuration targets
 # These targets are used from top-level makefile
index 55b79ba1ba2a5e4c84cb6cc3bf5f25dbb92a3e89..97f0fee7d17377d712f7e117c590e6e75a4577a4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Needed for systems without gettext
 $* -x c -o /dev/null - > /dev/null 2>&1 << EOF
 #include <libintl.h>
index 2cf23f002d3f48f6b51ac9898fde7681ea39cf53..45cb237ab7ef7a9f17779647220da6a30afd06fc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LIST_H
 #define LIST_H
 
index d5398718ec2ae3337dac3cb3d19654c8508c3007..5d86e2dfae59da1cc187dbd579b74757075f2280 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <stdarg.h>
 
 /* confdata.c */
index 5075ebf2d3b995bee04c146d942abce4515b4559..a10bd9d6fafd003a57aeb2baf24d4bc6dd04c982 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Check ncurses compatibility
 
 # What library to link
index d135882e2c40936753c0dc7ffb0362d95532d2c3..f2be0ff9a738aca75c014c80b7535833d1eeb1a1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # extract linker version number from stdin and turn into single number
        {
        gsub(".*\\)", "");
index e7b7eee31538e69963874ae3e326a254dac54622..e6818b8e7141e6b9e021d8e781cb94b09293ef1a 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # link vmlinux
 #
index e6581496d820741fe3a80d0de3c4ac57498a2e4f..e432af073a650dda61f0b9f4385a361a74d53e85 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # A script to dump mixed source code & assembly
 # with correct relocations from System.map
 # Requires the following lines in makefile:
index fd8fdb91581dd45ccd9d4849428b8f87a855f26a..959199c3147ec79e2797e0c87cf47b0e03723a25 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 TARGET=$1
 ARCH=$2
index 84af27bf0f99fc8983564eebaf63aed7797e7a30..e19d6565f24570363e0bd464e64f1abc01e25ccb 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Generates a small Makefile used in the root of the output
 # directory, to allow make to be started from there.
 # The Makefile also allow for more convinient build of external modules
index 446739c7843ab0f28b4efcead8574cd5ac5bb3ac..4b1fe09e9042b6251f080638f246f92c69329565 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # Build U-Boot image when `mkimage' tool is available.
diff --git a/scripts/mkversion b/scripts/mkversion
deleted file mode 100644 (file)
index c12addc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-if [ ! -f .version ]
-then
-    echo 1
-else
-    expr 0`cat .version` + 1
-fi
index b497d9764dcf02e0dd1abab386faef3af8b65499..42c5d50f2bccf1d3ed8de3366526ae8279c31eb9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OBJECT_FILES_NON_STANDARD := y
 
 hostprogs-y    := modpost mk_elfconfig
index e4d90e50f6fece5db963af40a395d8ff4a4e8ecc..6d0193a3c5916ee416c3490452a43d23021c39f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kbuild.h>
 #include <linux/mod_devicetable.h>
 
index a4fd71d71d65951756f476dceef3fefa7c1d465c..680eade89be1ec336419dc2a7cc62d2939ab08e8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 6a5e1515123b3b0e38a2036726e890e76d44cf48..8453d6ac2f77ebf46ebcc55eeaa045a1d9d052f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
index 71b4a8af9d4dcdf1dcec434b6be98636f468b2dd..73f9f3192b9fbf8770e6ef632723d23e8efb5b63 100644 (file)
@@ -50,8 +50,6 @@ rpm-pkg rpm: FORCE
        $(MAKE) clean
        $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
        $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
-       $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
-       mv -f $(objtree)/.tmp_version $(objtree)/.version
        rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
        rm $(KERNELPATH).tar.gz kernel.spec
 
@@ -60,9 +58,6 @@ rpm-pkg rpm: FORCE
 binrpm-pkg: FORCE
        $(MAKE) KBUILD_SRC=
        $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
-       $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
-       mv -f $(objtree)/.tmp_version $(objtree)/.version
-
        rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
                $(UTS_MACHINE) -bb $(objtree)/binkernel.spec
        rm binkernel.spec
index aad67000e4dd76796894cbd1975d087c559ecc5c..0bc87473f68f817b81640591f75f18c3b068351c 100755 (executable)
@@ -92,12 +92,10 @@ else
 fi
 sourcename=$KDEB_SOURCENAME
 tmpdir="$objtree/debian/tmp"
-fwdir="$objtree/debian/fwtmp"
 kernel_headers_dir="$objtree/debian/hdrtmp"
 libc_headers_dir="$objtree/debian/headertmp"
 dbg_dir="$objtree/debian/dbgtmp"
 packagename=linux-image-$version
-fwpackagename=linux-firmware-image-$version
 kernel_headers_packagename=linux-headers-$version
 libc_headers_packagename=linux-libc-dev
 dbg_packagename=$packagename-dbg
@@ -126,10 +124,9 @@ esac
 BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
 
 # Setup the directory structure
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files
 mkdir -m 755 -p "$tmpdir/DEBIAN"
 mkdir -p "$tmpdir/lib" "$tmpdir/boot"
-mkdir -p "$fwdir/lib/firmware/$version/"
 mkdir -p "$kernel_headers_dir/lib/modules/$version/"
 
 # Build and install the kernel
@@ -306,7 +303,6 @@ else
        cat <<EOF >> debian/control
 
 Package: $packagename
-Suggests: $fwpackagename
 Architecture: any
 Description: Linux kernel, version $version
  This package contains the Linux kernel, modules and corresponding other
@@ -345,22 +341,6 @@ Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
  This is useful for people who need to build external modules
 EOF
 
-# Do we have firmware? Move it out of the way and build it into a package.
-if [ -e "$tmpdir/lib/firmware" ]; then
-       mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
-       rmdir "$tmpdir/lib/firmware"
-
-       cat <<EOF >> debian/control
-
-Package: $fwpackagename
-Architecture: all
-Description: Linux kernel firmware, version $version
- This package contains firmware from the Linux kernel, version $version.
-EOF
-
-       create_package "$fwpackagename" "$fwdir"
-fi
-
 cat <<EOF >> debian/control
 
 Package: $libc_headers_packagename
index 51f94711825610f1019c53d83ce49e8c38901ed1..e8cc72a51b32e230833ca64a6e48b8cf7a716363 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # buildtar 0.0.4
index bb43f153fd8e70fd48c32a2f92fa6699242501f7..f47f17aae135188eae37db2178db6c9911a80023 100755 (executable)
@@ -27,9 +27,7 @@ __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"`
 echo "Name: kernel"
 echo "Summary: The Linux Kernel"
 echo "Version: $__KERNELRELEASE"
-# we need to determine the NEXT version number so that uname and
-# rpm -q will agree
-echo "Release: `. $srctree/scripts/mkversion`"
+echo "Release: $(cat .version 2>/dev/null || echo 1)"
 echo "License: GPL"
 echo "Group: System Environment/Kernel"
 echo "Vendor: The Linux Community"
@@ -77,7 +75,7 @@ fi
 echo "%build"
 
 if ! $PREBUILT; then
-echo "make clean && make %{?_smp_mflags}"
+echo "make clean && make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}"
 echo ""
 fi
 
@@ -88,11 +86,8 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'
 echo "%else"
 echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'
 echo "%endif"
-echo 'mkdir -p $RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE"
 
-echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= mod-fw= modules_install'
-echo 'INSTALL_FW_PATH=$RPM_BUILD_ROOT'"/lib/firmware/$KERNELRELEASE"
-echo 'make INSTALL_FW_PATH=$INSTALL_FW_PATH' firmware_install
+echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install'
 echo "%ifarch ia64"
 echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
 echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
@@ -119,7 +114,7 @@ if ! $PREBUILT; then
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/build"
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/source"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
-echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
+echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude .config.old --exclude .missing-syscalls.d\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
 echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
@@ -154,7 +149,6 @@ echo '%defattr (-, root, root)'
 echo "/lib/modules/$KERNELRELEASE"
 echo "%exclude /lib/modules/$KERNELRELEASE/build"
 echo "%exclude /lib/modules/$KERNELRELEASE/source"
-echo "/lib/firmware/$KERNELRELEASE"
 echo "/boot/*"
 echo ""
 echo "%files headers"
index e40b53db7f9fdc7c8e3f7094f8b862d66ef7651f..5dbd2faa24494910d75c99c4f054b89715d51ae2 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# SPDX-License-Identifier: GPL-2.0
 
 use strict;
 
index 49b4241e814a90c159cc272e655daa6294c7a2ea..033d5916797d0ce068ded635479403453b7aab33 100755 (executable)
@@ -1,4 +1,5 @@
 #! /bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Script to apply kernel patches.
 #   usage: patch-kernel [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
 #     The source directory defaults to /usr/src/linux, and the patch
index f23d7be943948df09dd037b9679c9cf0de5c6873..316e71918ac86d1c3c69ae2647dfc674d0c2d750 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 
 #
 # Takes a (sorted) output of readprofile and turns it into a list suitable for
index ab5034e1d0812918723e4295b9a27349dd93846a..e8aa940bc0a9adfc7563e8a9c587bde6cd39d011 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # because I use CONFIG_LOCALVERSION_AUTO, not the same version again and
 # again, /boot and /lib/modules/ eventually fill up.
index 6fc2b8789a0bf677f2ca874dab6eaec96ef4ca3b..e8c533140981cf2ab8deec1d37e4f3c7b0539681 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 hostprogs-y    := genheaders
 HOST_EXTRACFLAGS += \
        -I$(srctree)/include/uapi -I$(srctree)/include \
index 672b069dcfea4b2945d07b1de74afc8203c1a6a0..fa48fabcb33047b380b1a8a601917ffdde623766 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 /* NOTE: we really do want to use the kernel headers here */
 #define __EXPORTED_HEADERS__
index f6a0ce71015faa4109597ff002e2b6d31e028a77..0b86c47baf7dafa9dfdd5c00d358a5d73c988ac1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 if [ `id -u` -ne 0 ]; then
        echo "$0: must be root to install the selinux policy"
        exit 1
index d6a83cafe59f46d35df53048005be42a1fca6c90..e9c92db7e2a38f4125769b2e87f29c7b64c98feb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 hostprogs-y    := mdp
 HOST_EXTRACFLAGS += \
        -I$(srctree)/include/uapi -I$(srctree)/include \
index 966dd3924ea9cb34997828f10b68523615fdbf57..71f39410691b6be14774102000507c834c8ad493 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # This scripts adds local version information from the version
 # control systems git, mercurial (hg) and subversion (svn).
index 400ef35169c540426acba1ffbfaf42e44fe95c1a..aa0cc49ad1adc5d07ee4e0f9608809ce2e2de11a 100644 (file)
@@ -53,6 +53,7 @@ acumulator||accumulator
 adapater||adapter
 addional||additional
 additionaly||additionally
+additonal||additional
 addres||address
 adddress||address
 addreses||addresses
@@ -67,6 +68,8 @@ adviced||advised
 afecting||affecting
 againt||against
 agaist||against
+aggreataon||aggregation
+aggreation||aggregation
 albumns||albums
 alegorical||allegorical
 algined||aligned
@@ -80,6 +83,8 @@ aligment||alignment
 alignement||alignment
 allign||align
 alligned||aligned
+alllocate||allocate
+alloated||allocated
 allocatote||allocate
 allocatrd||allocated
 allocte||allocate
@@ -171,6 +176,7 @@ availale||available
 availavility||availability
 availble||available
 availiable||available
+availible||available
 avalable||available
 avaliable||available
 aysnc||async
@@ -203,6 +209,7 @@ broadcat||broadcast
 cacluated||calculated
 caculation||calculation
 calender||calendar
+calescing||coalescing
 calle||called
 callibration||calibration
 calucate||calculate
@@ -210,6 +217,7 @@ calulate||calculate
 cancelation||cancellation
 cancle||cancel
 capabilites||capabilities
+capabilty||capability
 capabitilies||capabilities
 capatibilities||capabilities
 capapbilities||capabilities
@@ -302,6 +310,7 @@ containts||contains
 contaisn||contains
 contant||contact
 contence||contents
+continious||continuous
 continous||continuous
 continously||continuously
 continueing||continuing
@@ -393,6 +402,7 @@ differrence||difference
 diffrent||different
 diffrentiate||differentiate
 difinition||definition
+dimesions||dimensions
 diplay||display
 direectly||directly
 disassocation||disassociation
@@ -449,6 +459,7 @@ equiped||equipped
 equivelant||equivalent
 equivilant||equivalent
 eror||error
+errorr||error
 estbalishment||establishment
 etsablishment||establishment
 etsbalishment||establishment
@@ -481,6 +492,7 @@ failied||failed
 faillure||failure
 failue||failure
 failuer||failure
+failng||failing
 faireness||fairness
 falied||failed
 faliure||failure
@@ -493,6 +505,7 @@ fetaure||feature
 fetaures||features
 fileystem||filesystem
 fimware||firmware
+firware||firmware
 finanize||finalize
 findn||find
 finilizes||finalizes
@@ -502,6 +515,7 @@ folloing||following
 followign||following
 followings||following
 follwing||following
+fonud||found
 forseeable||foreseeable
 forse||force
 fortan||fortran
@@ -532,6 +546,7 @@ grabing||grabbing
 grahical||graphical
 grahpical||graphical
 grapic||graphic
+grranted||granted
 guage||gauge
 guarenteed||guaranteed
 guarentee||guarantee
@@ -543,6 +558,7 @@ happend||happened
 harware||hardware
 heirarchically||hierarchically
 helpfull||helpful
+hybernate||hibernate
 hierachy||hierarchy
 hierarchie||hierarchy
 howver||however
@@ -565,16 +581,19 @@ implemenation||implementation
 implementaiton||implementation
 implementated||implemented
 implemention||implementation
+implementd||implemented
 implemetation||implementation
 implemntation||implementation
 implentation||implementation
 implmentation||implementation
 implmenting||implementing
+incative||inactive
 incomming||incoming
 incompatabilities||incompatibilities
 incompatable||incompatible
 inconsistant||inconsistent
 increas||increase
+incremeted||incremented
 incrment||increment
 indendation||indentation
 indended||intended
@@ -619,6 +638,7 @@ interger||integer
 intermittant||intermittent
 internel||internal
 interoprability||interoperability
+interuupt||interrupt
 interrface||interface
 interrrupt||interrupt
 interrup||interrupt
@@ -638,8 +658,10 @@ intrrupt||interrupt
 intterrupt||interrupt
 intuative||intuitive
 invaid||invalid
+invald||invalid
 invalde||invalid
 invalide||invalid
+invalidiate||invalidate
 invalud||invalid
 invididual||individual
 invokation||invocation
@@ -713,6 +735,7 @@ misformed||malformed
 mispelled||misspelled
 mispelt||misspelt
 mising||missing
+mismactch||mismatch
 missmanaged||mismanaged
 missmatch||mismatch
 miximum||maximum
@@ -731,6 +754,7 @@ multidimensionnal||multidimensional
 multple||multiple
 mumber||number
 muticast||multicast
+mutilcast||multicast
 mutiple||multiple
 mutli||multi
 nams||names
@@ -834,6 +858,7 @@ posible||possible
 positon||position
 possibilites||possibilities
 powerfull||powerful
+preample||preamble
 preapre||prepare
 preceeded||preceded
 preceeding||preceding
@@ -1059,6 +1084,7 @@ sturcture||structure
 subdirectoires||subdirectories
 suble||subtle
 substract||subtract
+submition||submission
 succesfully||successfully
 succesful||successful
 successed||succeeded
@@ -1078,6 +1104,7 @@ suppoted||supported
 suppported||supported
 suppport||support
 supress||suppress
+surpressed||suppressed
 surpresses||suppresses
 susbsystem||subsystem
 suspeneded||suspended
@@ -1091,6 +1118,7 @@ swithced||switched
 swithcing||switching
 swithed||switched
 swithing||switching
+swtich||switch
 symetric||symmetric
 synax||syntax
 synchonized||synchronized
@@ -1111,7 +1139,9 @@ therfore||therefore
 thier||their
 threds||threads
 threshhold||threshold
+thresold||threshold
 throught||through
+troughput||throughput
 thses||these
 tiggered||triggered
 tipically||typically
@@ -1120,6 +1150,7 @@ tmis||this
 torerable||tolerable
 tramsmitted||transmitted
 tramsmit||transmit
+tranasction||transaction
 tranfer||transfer
 transciever||transceiver
 transferd||transferred
@@ -1133,6 +1164,7 @@ trasmission||transmission
 treshold||threshold
 trigerring||triggering
 trun||turn
+tunning||tuning
 ture||true
 tyep||type
 udpate||update
@@ -1199,6 +1231,7 @@ visiters||visitors
 vitual||virtual
 wakeus||wakeups
 wating||waiting
+wiat||wait
 wether||whether
 whataver||whatever
 whcih||which
index 20a79f19a111d7ad319c91c3f53d105524530619..44d2dfd6216fdb092b9a1dd221b9756b79b0fad5 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
 
 # Read two files produced by the stackusage script, and show the
 # delta between them.
index 8cf26640ef8a989a7d667bb6fad67f1afaea9336..56ef1ab670acc06700bf92fc322e0ae87831c511 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 outfile=""
 now=`date +%s`
index 9ff8ac5fc53c218eb25927c448e1a770dd978e65..926701162bc8322149c33d6451c41e53660fd36a 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Here's how to use this:
 #
index b51de8a7e2a314c95d601894fb17116a9c3170ca..545ec7388eb71d3a83cbb508787ca38f5d6601bb 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # Before running this script please ensure that your PATH is
 # typical as you use for compilation/installation. I use
 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
index 676d9226814f40024b80020bccdba324264a1b2e..f18b00843df3ffcf48525386d6108a3c66ad1d59 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 out="$1"
 shift
 in="$@"
index f2d71cdb8e19b16968b5185296dd91ea9120cd39..4d2d3782ddefd3fbdd6d2984a1faa8a2bd6561ae 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for the kernel security code
 #
index a16b195274dec2c48d3ee41e3cdad1b6460138c1..9a6b4033d52b8f5459a7ac49b7d7b05ef38a2967 100644 (file)
@@ -1,10 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for AppArmor Linux Security Module
 #
 obj-$(CONFIG_SECURITY_APPARMOR) += apparmor.o
 
 apparmor-y := apparmorfs.o audit.o capability.o context.o ipc.o lib.o match.o \
               path.o domain.o policy.o policy_unpack.o procattr.o lsm.o \
-              resource.o secid.o file.o policy_ns.o label.o
+              resource.o secid.o file.o policy_ns.o label.o mount.o
 apparmor-$(CONFIG_SECURITY_APPARMOR_HASH) += crypto.o
 
 clean-files := capability_names.h rlim_names.h
index 853c2ec8e0c9521e53fe2c6edecb0b7913cfad26..caaf51dda64812067e07d1c9079c7750c4296e11 100644 (file)
@@ -32,6 +32,7 @@
 #include "include/audit.h"
 #include "include/context.h"
 #include "include/crypto.h"
+#include "include/ipc.h"
 #include "include/policy_ns.h"
 #include "include/label.h"
 #include "include/policy.h"
@@ -248,8 +249,10 @@ static struct dentry *aafs_create(const char *name, umode_t mode,
 
        inode_lock(dir);
        dentry = lookup_one_len(name, parent, strlen(name));
-       if (IS_ERR(dentry))
+       if (IS_ERR(dentry)) {
+               error = PTR_ERR(dentry);
                goto fail_lock;
+       }
 
        if (d_really_is_positive(dentry)) {
                error = -EEXIST;
@@ -1443,6 +1446,10 @@ void __aafs_profile_migrate_dents(struct aa_profile *old,
 {
        int i;
 
+       AA_BUG(!old);
+       AA_BUG(!new);
+       AA_BUG(!mutex_is_locked(&profiles_ns(old)->lock));
+
        for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
                new->dents[i] = old->dents[i];
                if (new->dents[i])
@@ -1506,6 +1513,9 @@ int __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent)
        struct dentry *dent = NULL, *dir;
        int error;
 
+       AA_BUG(!profile);
+       AA_BUG(!mutex_is_locked(&profiles_ns(profile)->lock));
+
        if (!parent) {
                struct aa_profile *p;
                p = aa_deref_parent(profile);
@@ -1731,6 +1741,7 @@ void __aafs_ns_rmdir(struct aa_ns *ns)
 
        if (!ns)
                return;
+       AA_BUG(!mutex_is_locked(&ns->lock));
 
        list_for_each_entry(child, &ns->base.profiles, base.list)
                __aafs_profile_rmdir(child);
@@ -1903,6 +1914,10 @@ static struct aa_ns *__next_ns(struct aa_ns *root, struct aa_ns *ns)
 {
        struct aa_ns *parent, *next;
 
+       AA_BUG(!root);
+       AA_BUG(!ns);
+       AA_BUG(ns != root && !mutex_is_locked(&ns->parent->lock));
+
        /* is next namespace a child */
        if (!list_empty(&ns->sub_ns)) {
                next = list_first_entry(&ns->sub_ns, typeof(*ns), base.list);
@@ -1937,6 +1952,9 @@ static struct aa_ns *__next_ns(struct aa_ns *root, struct aa_ns *ns)
 static struct aa_profile *__first_profile(struct aa_ns *root,
                                          struct aa_ns *ns)
 {
+       AA_BUG(!root);
+       AA_BUG(ns && !mutex_is_locked(&ns->lock));
+
        for (; ns; ns = __next_ns(root, ns)) {
                if (!list_empty(&ns->base.profiles))
                        return list_first_entry(&ns->base.profiles,
@@ -1959,6 +1977,8 @@ static struct aa_profile *__next_profile(struct aa_profile *p)
        struct aa_profile *parent;
        struct aa_ns *ns = p->ns;
 
+       AA_BUG(!mutex_is_locked(&profiles_ns(p)->lock));
+
        /* is next profile a child */
        if (!list_empty(&p->base.profiles))
                return list_first_entry(&p->base.profiles, typeof(*p),
@@ -2127,6 +2147,11 @@ static struct aa_sfs_entry aa_sfs_entry_ptrace[] = {
        { }
 };
 
+static struct aa_sfs_entry aa_sfs_entry_signal[] = {
+       AA_SFS_FILE_STRING("mask", AA_SFS_SIG_MASK),
+       { }
+};
+
 static struct aa_sfs_entry aa_sfs_entry_domain[] = {
        AA_SFS_FILE_BOOLEAN("change_hat",       1),
        AA_SFS_FILE_BOOLEAN("change_hatv",      1),
@@ -2151,9 +2176,14 @@ static struct aa_sfs_entry aa_sfs_entry_policy[] = {
        { }
 };
 
+static struct aa_sfs_entry aa_sfs_entry_mount[] = {
+       AA_SFS_FILE_STRING("mask", "mount umount pivot_root"),
+       { }
+};
+
 static struct aa_sfs_entry aa_sfs_entry_ns[] = {
        AA_SFS_FILE_BOOLEAN("profile",          1),
-       AA_SFS_FILE_BOOLEAN("pivot_root",       1),
+       AA_SFS_FILE_BOOLEAN("pivot_root",       0),
        { }
 };
 
@@ -2172,22 +2202,24 @@ static struct aa_sfs_entry aa_sfs_entry_features[] = {
        AA_SFS_DIR("policy",                    aa_sfs_entry_policy),
        AA_SFS_DIR("domain",                    aa_sfs_entry_domain),
        AA_SFS_DIR("file",                      aa_sfs_entry_file),
+       AA_SFS_DIR("mount",                     aa_sfs_entry_mount),
        AA_SFS_DIR("namespaces",                aa_sfs_entry_ns),
        AA_SFS_FILE_U64("capability",           VFS_CAP_FLAGS_MASK),
        AA_SFS_DIR("rlimit",                    aa_sfs_entry_rlimit),
        AA_SFS_DIR("caps",                      aa_sfs_entry_caps),
        AA_SFS_DIR("ptrace",                    aa_sfs_entry_ptrace),
+       AA_SFS_DIR("signal",                    aa_sfs_entry_signal),
        AA_SFS_DIR("query",                     aa_sfs_entry_query),
        { }
 };
 
 static struct aa_sfs_entry aa_sfs_entry_apparmor[] = {
-       AA_SFS_FILE_FOPS(".access", 0640, &aa_sfs_access),
+       AA_SFS_FILE_FOPS(".access", 0666, &aa_sfs_access),
        AA_SFS_FILE_FOPS(".stacked", 0444, &seq_ns_stacked_fops),
        AA_SFS_FILE_FOPS(".ns_stacked", 0444, &seq_ns_nsstacked_fops),
-       AA_SFS_FILE_FOPS(".ns_level", 0666, &seq_ns_level_fops),
-       AA_SFS_FILE_FOPS(".ns_name", 0640, &seq_ns_name_fops),
-       AA_SFS_FILE_FOPS("profiles", 0440, &aa_sfs_profiles_fops),
+       AA_SFS_FILE_FOPS(".ns_level", 0444, &seq_ns_level_fops),
+       AA_SFS_FILE_FOPS(".ns_name", 0444, &seq_ns_name_fops),
+       AA_SFS_FILE_FOPS("profiles", 0444, &aa_sfs_profiles_fops),
        AA_SFS_DIR("features", aa_sfs_entry_features),
        { }
 };
index 17a601c67b62c93f26246389b0ee8805850bee05..dd754b7850a82b4d129c11de0c55603de19268ba 100644 (file)
@@ -374,8 +374,8 @@ static const char *next_name(int xtype, const char *name)
  *
  * Returns: refcounted label, or NULL on failure (MAYBE NULL)
  */
-static struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
-                                      const char **name)
+struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
+                               const char **name)
 {
        struct aa_label *label = NULL;
        u32 xtype = xindex & AA_X_TYPE_MASK;
index aaf893f4e4f50c8f35f2e74c18a264f5ee583a39..829082c35faac7a932a568745068a2a3a979c124 100644 (file)
@@ -27,7 +27,9 @@
 #define AA_CLASS_NET           4
 #define AA_CLASS_RLIMITS       5
 #define AA_CLASS_DOMAIN                6
+#define AA_CLASS_MOUNT         7
 #define AA_CLASS_PTRACE                9
+#define AA_CLASS_SIGNAL                10
 #define AA_CLASS_LABEL         16
 
 #define AA_CLASS_LAST          AA_CLASS_LABEL
index c68839a44351e9b184951a6535fa574293c55876..620e811696592ddec6fb221e2bec07d436f258b4 100644 (file)
@@ -71,6 +71,10 @@ enum audit_type {
 #define OP_FMPROT "file_mprotect"
 #define OP_INHERIT "file_inherit"
 
+#define OP_PIVOTROOT "pivotroot"
+#define OP_MOUNT "mount"
+#define OP_UMOUNT "umount"
+
 #define OP_CREATE "create"
 #define OP_POST_CREATE "post_create"
 #define OP_BIND "bind"
@@ -86,6 +90,7 @@ enum audit_type {
 #define OP_SHUTDOWN "socket_shutdown"
 
 #define OP_PTRACE "ptrace"
+#define OP_SIGNAL "signal"
 
 #define OP_EXEC "exec"
 
@@ -122,14 +127,22 @@ struct apparmor_audit_data {
                        } fs;
                };
                struct {
-                       const char *name;
-                       long pos;
+                       struct aa_profile *profile;
                        const char *ns;
+                       long pos;
                } iface;
+               int signal;
                struct {
                        int rlim;
                        unsigned long max;
                } rlim;
+               struct {
+                       const char *src_name;
+                       const char *type;
+                       const char *trans;
+                       const char *data;
+                       unsigned long flags;
+               } mnt;
        };
 };
 
index 24c5976d6143fee013882a92b56bc96ec8105429..ac9862ff7cdf5d7bed9a365a30e8d62c1cfc0c1f 100644 (file)
@@ -15,6 +15,8 @@
 #include <linux/binfmts.h>
 #include <linux/types.h>
 
+#include "label.h"
+
 #ifndef __AA_DOMAIN_H
 #define __AA_DOMAIN_H
 
@@ -29,6 +31,9 @@ struct aa_domain {
 #define AA_CHANGE_ONEXEC  4
 #define AA_CHANGE_STACK 8
 
+struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
+                               const char **name);
+
 int apparmor_bprm_set_creds(struct linux_binprm *bprm);
 
 void aa_free_domain_entries(struct aa_domain *domain);
index 656fdb81c8a0a08836b12ed614334222c0648212..5ffc218d1e748aebb6aa777ad129976e87752ddd 100644 (file)
@@ -27,8 +27,14 @@ struct aa_profile;
 
 #define AA_PTRACE_PERM_MASK (AA_PTRACE_READ | AA_PTRACE_TRACE | \
                             AA_MAY_BE_READ | AA_MAY_BE_TRACED)
+#define AA_SIGNAL_PERM_MASK (MAY_READ | MAY_WRITE)
+
+#define AA_SFS_SIG_MASK "hup int quit ill trap abrt bus fpe kill usr1 " \
+       "segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg " \
+       "xcpu xfsz vtalrm prof winch io pwr sys emt lost"
 
 int aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee,
                  u32 request);
+int aa_may_signal(struct aa_label *sender, struct aa_label *target, int sig);
 
 #endif /* __AA_IPC_H */
index 9a283b722755786a2e213e591323d101d7b30816..af22dcbbcb8aa165d16d1769aba7e92eb5965ada 100644 (file)
@@ -310,6 +310,7 @@ bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp);
 #define FLAG_SHOW_MODE 1
 #define FLAG_VIEW_SUBNS 2
 #define FLAG_HIDDEN_UNCONFINED 4
+#define FLAG_ABS_ROOT 8
 int aa_label_snxprint(char *str, size_t size, struct aa_ns *view,
                      struct aa_label *label, int flags);
 int aa_label_asxprint(char **strp, struct aa_ns *ns, struct aa_label *label,
diff --git a/security/apparmor/include/mount.h b/security/apparmor/include/mount.h
new file mode 100644 (file)
index 0000000..25d6067
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * AppArmor security module
+ *
+ * This file contains AppArmor file mediation function definitions.
+ *
+ * Copyright 2017 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ */
+
+#ifndef __AA_MOUNT_H
+#define __AA_MOUNT_H
+
+#include <linux/fs.h>
+#include <linux/path.h>
+
+#include "domain.h"
+#include "policy.h"
+
+/* mount perms */
+#define AA_MAY_PIVOTROOT       0x01
+#define AA_MAY_MOUNT           0x02
+#define AA_MAY_UMOUNT          0x04
+#define AA_AUDIT_DATA          0x40
+#define AA_MNT_CONT_MATCH      0x40
+
+#define AA_MS_IGNORE_MASK (MS_KERNMOUNT | MS_NOSEC | MS_ACTIVE | MS_BORN)
+
+int aa_remount(struct aa_label *label, const struct path *path,
+              unsigned long flags, void *data);
+
+int aa_bind_mount(struct aa_label *label, const struct path *path,
+                 const char *old_name, unsigned long flags);
+
+
+int aa_mount_change_type(struct aa_label *label, const struct path *path,
+                        unsigned long flags);
+
+int aa_move_mount(struct aa_label *label, const struct path *path,
+                 const char *old_name);
+
+int aa_new_mount(struct aa_label *label, const char *dev_name,
+                const struct path *path, const char *type, unsigned long flags,
+                void *data);
+
+int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags);
+
+int aa_pivotroot(struct aa_label *label, const struct path *old_path,
+                const struct path *new_path);
+
+#endif /* __AA_MOUNT_H */
diff --git a/security/apparmor/include/sig_names.h b/security/apparmor/include/sig_names.h
new file mode 100644 (file)
index 0000000..92e62fe
--- /dev/null
@@ -0,0 +1,98 @@
+#include <linux/signal.h>
+
+#define SIGUNKNOWN 0
+#define MAXMAPPED_SIG 35
+/* provide a mapping of arch signal to internal signal # for mediation
+ * those that are always an alias SIGCLD for SIGCLHD and SIGPOLL for SIGIO
+ * map to the same entry those that may/or may not get a separate entry
+ */
+static const int sig_map[MAXMAPPED_SIG] = {
+       [0] = MAXMAPPED_SIG,    /* existence test */
+       [SIGHUP] = 1,
+       [SIGINT] = 2,
+       [SIGQUIT] = 3,
+       [SIGILL] = 4,
+       [SIGTRAP] = 5,          /* -, 5, - */
+       [SIGABRT] = 6,          /*  SIGIOT: -, 6, - */
+       [SIGBUS] = 7,           /* 10, 7, 10 */
+       [SIGFPE] = 8,
+       [SIGKILL] = 9,
+       [SIGUSR1] = 10,         /* 30, 10, 16 */
+       [SIGSEGV] = 11,
+       [SIGUSR2] = 12,         /* 31, 12, 17 */
+       [SIGPIPE] = 13,
+       [SIGALRM] = 14,
+       [SIGTERM] = 15,
+#ifdef SIGSTKFLT
+       [SIGSTKFLT] = 16,       /* -, 16, - */
+#endif
+       [SIGCHLD] = 17,         /* 20, 17, 18.  SIGCHLD -, -, 18 */
+       [SIGCONT] = 18,         /* 19, 18, 25 */
+       [SIGSTOP] = 19,         /* 17, 19, 23 */
+       [SIGTSTP] = 20,         /* 18, 20, 24 */
+       [SIGTTIN] = 21,         /* 21, 21, 26 */
+       [SIGTTOU] = 22,         /* 22, 22, 27 */
+       [SIGURG] = 23,          /* 16, 23, 21 */
+       [SIGXCPU] = 24,         /* 24, 24, 30 */
+       [SIGXFSZ] = 25,         /* 25, 25, 31 */
+       [SIGVTALRM] = 26,       /* 26, 26, 28 */
+       [SIGPROF] = 27,         /* 27, 27, 29 */
+       [SIGWINCH] = 28,        /* 28, 28, 20 */
+       [SIGIO] = 29,           /* SIGPOLL: 23, 29, 22 */
+       [SIGPWR] = 30,          /* 29, 30, 19.  SIGINFO 29, -, - */
+#ifdef SIGSYS
+       [SIGSYS] = 31,          /* 12, 31, 12. often SIG LOST/UNUSED */
+#endif
+#ifdef SIGEMT
+       [SIGEMT] = 32,          /* 7, - , 7 */
+#endif
+#if defined(SIGLOST) && SIGPWR != SIGLOST              /* sparc */
+       [SIGLOST] = 33,         /* unused on Linux */
+#endif
+#if defined(SIGUNUSED) && \
+    defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
+       [SIGUNUSED] = 34,       /* -, 31, - */
+#endif
+};
+
+/* this table is ordered post sig_map[sig] mapping */
+static const char *const sig_names[MAXMAPPED_SIG + 1] = {
+       "unknown",
+       "hup",
+       "int",
+       "quit",
+       "ill",
+       "trap",
+       "abrt",
+       "bus",
+       "fpe",
+       "kill",
+       "usr1",
+       "segv",
+       "usr2",
+       "pipe",
+       "alrm",
+       "term",
+       "stkflt",
+       "chld",
+       "cont",
+       "stop",
+       "stp",
+       "ttin",
+       "ttou",
+       "urg",
+       "xcpu",
+       "xfsz",
+       "vtalrm",
+       "prof",
+       "winch",
+       "io",
+       "pwr",
+       "sys",
+       "emt",
+       "lost",
+       "unused",
+
+       "exists",       /* always last existence test mapped to MAXMAPPED_SIG */
+};
+
index 11e66b5bbc4266c7c9b0f4fa47d13afdf709b47f..66fb9ede9447adc71e3fd27a0b90d306b095c0fe 100644 (file)
@@ -20,6 +20,7 @@
 #include "include/context.h"
 #include "include/policy.h"
 #include "include/ipc.h"
+#include "include/sig_names.h"
 
 /**
  * audit_ptrace_mask - convert mask to permission string
@@ -121,3 +122,101 @@ int aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee,
 }
 
 
+static inline int map_signal_num(int sig)
+{
+       if (sig > SIGRTMAX)
+               return SIGUNKNOWN;
+       else if (sig >= SIGRTMIN)
+               return sig - SIGRTMIN + 128;    /* rt sigs mapped to 128 */
+       else if (sig <= MAXMAPPED_SIG)
+               return sig_map[sig];
+       return SIGUNKNOWN;
+}
+
+/**
+ * audit_file_mask - convert mask to permission string
+ * @buffer: buffer to write string to (NOT NULL)
+ * @mask: permission mask to convert
+ */
+static void audit_signal_mask(struct audit_buffer *ab, u32 mask)
+{
+       if (mask & MAY_READ)
+               audit_log_string(ab, "receive");
+       if (mask & MAY_WRITE)
+               audit_log_string(ab, "send");
+}
+
+/**
+ * audit_cb - call back for signal specific audit fields
+ * @ab: audit_buffer  (NOT NULL)
+ * @va: audit struct to audit values of  (NOT NULL)
+ */
+static void audit_signal_cb(struct audit_buffer *ab, void *va)
+{
+       struct common_audit_data *sa = va;
+
+       if (aad(sa)->request & AA_SIGNAL_PERM_MASK) {
+               audit_log_format(ab, " requested_mask=");
+               audit_signal_mask(ab, aad(sa)->request);
+               if (aad(sa)->denied & AA_SIGNAL_PERM_MASK) {
+                       audit_log_format(ab, " denied_mask=");
+                       audit_signal_mask(ab, aad(sa)->denied);
+               }
+       }
+       if (aad(sa)->signal <= MAXMAPPED_SIG)
+               audit_log_format(ab, " signal=%s", sig_names[aad(sa)->signal]);
+       else
+               audit_log_format(ab, " signal=rtmin+%d",
+                                aad(sa)->signal - 128);
+       audit_log_format(ab, " peer=");
+       aa_label_xaudit(ab, labels_ns(aad(sa)->label), aad(sa)->peer,
+                       FLAGS_NONE, GFP_ATOMIC);
+}
+
+/* TODO: update to handle compound name&name2, conditionals */
+static void profile_match_signal(struct aa_profile *profile, const char *label,
+                                int signal, struct aa_perms *perms)
+{
+       unsigned int state;
+
+       /* TODO: secondary cache check <profile, profile, perm> */
+       state = aa_dfa_next(profile->policy.dfa,
+                           profile->policy.start[AA_CLASS_SIGNAL],
+                           signal);
+       state = aa_dfa_match(profile->policy.dfa, state, label);
+       aa_compute_perms(profile->policy.dfa, state, perms);
+}
+
+static int profile_signal_perm(struct aa_profile *profile,
+                              struct aa_profile *peer, u32 request,
+                              struct common_audit_data *sa)
+{
+       struct aa_perms perms;
+
+       if (profile_unconfined(profile) ||
+           !PROFILE_MEDIATES(profile, AA_CLASS_SIGNAL))
+               return 0;
+
+       aad(sa)->peer = &peer->label;
+       profile_match_signal(profile, peer->base.hname, aad(sa)->signal,
+                            &perms);
+       aa_apply_modes_to_perms(profile, &perms);
+       return aa_check_perms(profile, &perms, request, sa, audit_signal_cb);
+}
+
+static int aa_signal_cross_perm(struct aa_profile *sender,
+                               struct aa_profile *target,
+                               struct common_audit_data *sa)
+{
+       return xcheck(profile_signal_perm(sender, target, MAY_WRITE, sa),
+                     profile_signal_perm(target, sender, MAY_READ, sa));
+}
+
+int aa_may_signal(struct aa_label *sender, struct aa_label *target, int sig)
+{
+       DEFINE_AUDIT_DATA(sa, LSM_AUDIT_DATA_NONE, OP_SIGNAL);
+
+       aad(&sa)->signal = map_signal_num(sig);
+       return xcheck_labels_profiles(sender, target, aa_signal_cross_perm,
+                                     &sa);
+}
index e052eaba1cf6ccb003c1e3ae364798bc44b1d292..c5b99b954580c940d3cc3659a48c10b22752c1f0 100644 (file)
@@ -49,7 +49,7 @@ static void free_proxy(struct aa_proxy *proxy)
                /* p->label will not updated any more as p is dead */
                aa_put_label(rcu_dereference_protected(proxy->label, true));
                memset(proxy, 0, sizeof(*proxy));
-               proxy->label = (struct aa_label *) PROXY_POISON;
+               RCU_INIT_POINTER(proxy->label, (struct aa_label *)PROXY_POISON);
                kfree(proxy);
        }
 }
@@ -1450,9 +1450,11 @@ bool aa_update_label_name(struct aa_ns *ns, struct aa_label *label, gfp_t gfp)
  * cached label name is present and visible
  * @label->hname only exists if label is namespace hierachical
  */
-static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label)
+static inline bool use_label_hname(struct aa_ns *ns, struct aa_label *label,
+                                  int flags)
 {
-       if (label->hname && labels_ns(label) == ns)
+       if (label->hname && (!ns || labels_ns(label) == ns) &&
+           !(flags & ~FLAG_SHOW_MODE))
                return true;
 
        return false;
@@ -1495,7 +1497,7 @@ static int aa_profile_snxprint(char *str, size_t size, struct aa_ns *view,
                view = profiles_ns(profile);
 
        if (view != profile->ns &&
-           (!prev_ns || (prev_ns && *prev_ns != profile->ns))) {
+           (!prev_ns || (*prev_ns != profile->ns))) {
                if (prev_ns)
                        *prev_ns = profile->ns;
                ns_name = aa_ns_name(view, profile->ns,
@@ -1605,8 +1607,13 @@ int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns,
        AA_BUG(!str && size != 0);
        AA_BUG(!label);
 
-       if (!ns)
+       if (flags & FLAG_ABS_ROOT) {
+               ns = root_ns;
+               len = snprintf(str, size, "=");
+               update_for_len(total, len, size, str);
+       } else if (!ns) {
                ns = labels_ns(label);
+       }
 
        label_for_each(i, label, profile) {
                if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {
@@ -1710,10 +1717,8 @@ void aa_label_xaudit(struct audit_buffer *ab, struct aa_ns *ns,
        AA_BUG(!ab);
        AA_BUG(!label);
 
-       if (!ns)
-               ns = labels_ns(label);
-
-       if (!use_label_hname(ns, label) || display_mode(ns, label, flags)) {
+       if (!use_label_hname(ns, label, flags) ||
+           display_mode(ns, label, flags)) {
                len  = aa_label_asxprint(&name, ns, label, flags, gfp);
                if (len == -1) {
                        AA_DEBUG("label print error");
@@ -1738,10 +1743,7 @@ void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns,
        AA_BUG(!f);
        AA_BUG(!label);
 
-       if (!ns)
-               ns = labels_ns(label);
-
-       if (!use_label_hname(ns, label)) {
+       if (!use_label_hname(ns, label, flags)) {
                char *str;
                int len;
 
@@ -1764,10 +1766,7 @@ void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,
 {
        AA_BUG(!label);
 
-       if (!ns)
-               ns = labels_ns(label);
-
-       if (!use_label_hname(ns, label)) {
+       if (!use_label_hname(ns, label, flags)) {
                char *str;
                int len;
 
@@ -1874,6 +1873,9 @@ struct aa_label *aa_label_parse(struct aa_label *base, const char *str,
                if (*str == '&')
                        str++;
        }
+       if (*str == '=')
+               base = &root_ns->unconfined->label;
+
        error = vec_setup(profile, vec, len, gfp);
        if (error)
                return ERR_PTR(error);
index 7a82c0f61452d3fe3e2821bbcbda29a643572500..1346ee5be04f13e4bb64658755605852b8789ab5 100644 (file)
@@ -38,6 +38,7 @@
 #include "include/policy.h"
 #include "include/policy_ns.h"
 #include "include/procattr.h"
+#include "include/mount.h"
 
 /* Flag indicating whether initialization completed */
 int apparmor_initialized;
@@ -511,6 +512,65 @@ static int apparmor_file_mprotect(struct vm_area_struct *vma,
                           !(vma->vm_flags & VM_SHARED) ? MAP_PRIVATE : 0);
 }
 
+static int apparmor_sb_mount(const char *dev_name, const struct path *path,
+                            const char *type, unsigned long flags, void *data)
+{
+       struct aa_label *label;
+       int error = 0;
+
+       /* Discard magic */
+       if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
+               flags &= ~MS_MGC_MSK;
+
+       flags &= ~AA_MS_IGNORE_MASK;
+
+       label = __begin_current_label_crit_section();
+       if (!unconfined(label)) {
+               if (flags & MS_REMOUNT)
+                       error = aa_remount(label, path, flags, data);
+               else if (flags & MS_BIND)
+                       error = aa_bind_mount(label, path, dev_name, flags);
+               else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE |
+                                 MS_UNBINDABLE))
+                       error = aa_mount_change_type(label, path, flags);
+               else if (flags & MS_MOVE)
+                       error = aa_move_mount(label, path, dev_name);
+               else
+                       error = aa_new_mount(label, dev_name, path, type,
+                                            flags, data);
+       }
+       __end_current_label_crit_section(label);
+
+       return error;
+}
+
+static int apparmor_sb_umount(struct vfsmount *mnt, int flags)
+{
+       struct aa_label *label;
+       int error = 0;
+
+       label = __begin_current_label_crit_section();
+       if (!unconfined(label))
+               error = aa_umount(label, mnt, flags);
+       __end_current_label_crit_section(label);
+
+       return error;
+}
+
+static int apparmor_sb_pivotroot(const struct path *old_path,
+                                const struct path *new_path)
+{
+       struct aa_label *label;
+       int error = 0;
+
+       label = aa_get_current_label();
+       if (!unconfined(label))
+               error = aa_pivotroot(label, old_path, new_path);
+       aa_put_label(label);
+
+       return error;
+}
+
 static int apparmor_getprocattr(struct task_struct *task, char *name,
                                char **value)
 {
@@ -656,12 +716,36 @@ static int apparmor_task_setrlimit(struct task_struct *task,
        return error;
 }
 
+static int apparmor_task_kill(struct task_struct *target, struct siginfo *info,
+                             int sig, u32 secid)
+{
+       struct aa_label *cl, *tl;
+       int error;
+
+       if (secid)
+               /* TODO: after secid to label mapping is done.
+                *  Dealing with USB IO specific behavior
+                */
+               return 0;
+       cl = __begin_current_label_crit_section();
+       tl = aa_get_task_label(target);
+       error = aa_may_signal(cl, tl, sig);
+       aa_put_label(tl);
+       __end_current_label_crit_section(cl);
+
+       return error;
+}
+
 static struct security_hook_list apparmor_hooks[] __lsm_ro_after_init = {
        LSM_HOOK_INIT(ptrace_access_check, apparmor_ptrace_access_check),
        LSM_HOOK_INIT(ptrace_traceme, apparmor_ptrace_traceme),
        LSM_HOOK_INIT(capget, apparmor_capget),
        LSM_HOOK_INIT(capable, apparmor_capable),
 
+       LSM_HOOK_INIT(sb_mount, apparmor_sb_mount),
+       LSM_HOOK_INIT(sb_umount, apparmor_sb_umount),
+       LSM_HOOK_INIT(sb_pivotroot, apparmor_sb_pivotroot),
+
        LSM_HOOK_INIT(path_link, apparmor_path_link),
        LSM_HOOK_INIT(path_unlink, apparmor_path_unlink),
        LSM_HOOK_INIT(path_symlink, apparmor_path_symlink),
@@ -696,6 +780,7 @@ static struct security_hook_list apparmor_hooks[] __lsm_ro_after_init = {
        LSM_HOOK_INIT(bprm_committed_creds, apparmor_bprm_committed_creds),
 
        LSM_HOOK_INIT(task_setrlimit, apparmor_task_setrlimit),
+       LSM_HOOK_INIT(task_kill, apparmor_task_kill),
 };
 
 /*
diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
new file mode 100644 (file)
index 0000000..82a64b5
--- /dev/null
@@ -0,0 +1,696 @@
+/*
+ * AppArmor security module
+ *
+ * This file contains AppArmor mediation of files
+ *
+ * Copyright (C) 1998-2008 Novell/SUSE
+ * Copyright 2009-2017 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ */
+
+#include <linux/fs.h>
+#include <linux/mount.h>
+#include <linux/namei.h>
+
+#include "include/apparmor.h"
+#include "include/audit.h"
+#include "include/context.h"
+#include "include/domain.h"
+#include "include/file.h"
+#include "include/match.h"
+#include "include/mount.h"
+#include "include/path.h"
+#include "include/policy.h"
+
+
+static void audit_mnt_flags(struct audit_buffer *ab, unsigned long flags)
+{
+       if (flags & MS_RDONLY)
+               audit_log_format(ab, "ro");
+       else
+               audit_log_format(ab, "rw");
+       if (flags & MS_NOSUID)
+               audit_log_format(ab, ", nosuid");
+       if (flags & MS_NODEV)
+               audit_log_format(ab, ", nodev");
+       if (flags & MS_NOEXEC)
+               audit_log_format(ab, ", noexec");
+       if (flags & MS_SYNCHRONOUS)
+               audit_log_format(ab, ", sync");
+       if (flags & MS_REMOUNT)
+               audit_log_format(ab, ", remount");
+       if (flags & MS_MANDLOCK)
+               audit_log_format(ab, ", mand");
+       if (flags & MS_DIRSYNC)
+               audit_log_format(ab, ", dirsync");
+       if (flags & MS_NOATIME)
+               audit_log_format(ab, ", noatime");
+       if (flags & MS_NODIRATIME)
+               audit_log_format(ab, ", nodiratime");
+       if (flags & MS_BIND)
+               audit_log_format(ab, flags & MS_REC ? ", rbind" : ", bind");
+       if (flags & MS_MOVE)
+               audit_log_format(ab, ", move");
+       if (flags & MS_SILENT)
+               audit_log_format(ab, ", silent");
+       if (flags & MS_POSIXACL)
+               audit_log_format(ab, ", acl");
+       if (flags & MS_UNBINDABLE)
+               audit_log_format(ab, flags & MS_REC ? ", runbindable" :
+                                ", unbindable");
+       if (flags & MS_PRIVATE)
+               audit_log_format(ab, flags & MS_REC ? ", rprivate" :
+                                ", private");
+       if (flags & MS_SLAVE)
+               audit_log_format(ab, flags & MS_REC ? ", rslave" :
+                                ", slave");
+       if (flags & MS_SHARED)
+               audit_log_format(ab, flags & MS_REC ? ", rshared" :
+                                ", shared");
+       if (flags & MS_RELATIME)
+               audit_log_format(ab, ", relatime");
+       if (flags & MS_I_VERSION)
+               audit_log_format(ab, ", iversion");
+       if (flags & MS_STRICTATIME)
+               audit_log_format(ab, ", strictatime");
+       if (flags & MS_NOUSER)
+               audit_log_format(ab, ", nouser");
+}
+
+/**
+ * audit_cb - call back for mount specific audit fields
+ * @ab: audit_buffer  (NOT NULL)
+ * @va: audit struct to audit values of  (NOT NULL)
+ */
+static void audit_cb(struct audit_buffer *ab, void *va)
+{
+       struct common_audit_data *sa = va;
+
+       if (aad(sa)->mnt.type) {
+               audit_log_format(ab, " fstype=");
+               audit_log_untrustedstring(ab, aad(sa)->mnt.type);
+       }
+       if (aad(sa)->mnt.src_name) {
+               audit_log_format(ab, " srcname=");
+               audit_log_untrustedstring(ab, aad(sa)->mnt.src_name);
+       }
+       if (aad(sa)->mnt.trans) {
+               audit_log_format(ab, " trans=");
+               audit_log_untrustedstring(ab, aad(sa)->mnt.trans);
+       }
+       if (aad(sa)->mnt.flags) {
+               audit_log_format(ab, " flags=\"");
+               audit_mnt_flags(ab, aad(sa)->mnt.flags);
+               audit_log_format(ab, "\"");
+       }
+       if (aad(sa)->mnt.data) {
+               audit_log_format(ab, " options=");
+               audit_log_untrustedstring(ab, aad(sa)->mnt.data);
+       }
+}
+
+/**
+ * audit_mount - handle the auditing of mount operations
+ * @profile: the profile being enforced  (NOT NULL)
+ * @op: operation being mediated (NOT NULL)
+ * @name: name of object being mediated (MAYBE NULL)
+ * @src_name: src_name of object being mediated (MAYBE_NULL)
+ * @type: type of filesystem (MAYBE_NULL)
+ * @trans: name of trans (MAYBE NULL)
+ * @flags: filesystem idependent mount flags
+ * @data: filesystem mount flags
+ * @request: permissions requested
+ * @perms: the permissions computed for the request (NOT NULL)
+ * @info: extra information message (MAYBE NULL)
+ * @error: 0 if operation allowed else failure error code
+ *
+ * Returns: %0 or error on failure
+ */
+static int audit_mount(struct aa_profile *profile, const char *op,
+                      const char *name, const char *src_name,
+                      const char *type, const char *trans,
+                      unsigned long flags, const void *data, u32 request,
+                      struct aa_perms *perms, const char *info, int error)
+{
+       int audit_type = AUDIT_APPARMOR_AUTO;
+       DEFINE_AUDIT_DATA(sa, LSM_AUDIT_DATA_NONE, op);
+
+       if (likely(!error)) {
+               u32 mask = perms->audit;
+
+               if (unlikely(AUDIT_MODE(profile) == AUDIT_ALL))
+                       mask = 0xffff;
+
+               /* mask off perms that are not being force audited */
+               request &= mask;
+
+               if (likely(!request))
+                       return 0;
+               audit_type = AUDIT_APPARMOR_AUDIT;
+       } else {
+               /* only report permissions that were denied */
+               request = request & ~perms->allow;
+
+               if (request & perms->kill)
+                       audit_type = AUDIT_APPARMOR_KILL;
+
+               /* quiet known rejects, assumes quiet and kill do not overlap */
+               if ((request & perms->quiet) &&
+                   AUDIT_MODE(profile) != AUDIT_NOQUIET &&
+                   AUDIT_MODE(profile) != AUDIT_ALL)
+                       request &= ~perms->quiet;
+
+               if (!request)
+                       return error;
+       }
+
+       aad(&sa)->name = name;
+       aad(&sa)->mnt.src_name = src_name;
+       aad(&sa)->mnt.type = type;
+       aad(&sa)->mnt.trans = trans;
+       aad(&sa)->mnt.flags = flags;
+       if (data && (perms->audit & AA_AUDIT_DATA))
+               aad(&sa)->mnt.data = data;
+       aad(&sa)->info = info;
+       aad(&sa)->error = error;
+
+       return aa_audit(audit_type, profile, &sa, audit_cb);
+}
+
+/**
+ * match_mnt_flags - Do an ordered match on mount flags
+ * @dfa: dfa to match against
+ * @state: state to start in
+ * @flags: mount flags to match against
+ *
+ * Mount flags are encoded as an ordered match. This is done instead of
+ * checking against a simple bitmask, to allow for logical operations
+ * on the flags.
+ *
+ * Returns: next state after flags match
+ */
+static unsigned int match_mnt_flags(struct aa_dfa *dfa, unsigned int state,
+                                   unsigned long flags)
+{
+       unsigned int i;
+
+       for (i = 0; i <= 31 ; ++i) {
+               if ((1 << i) & flags)
+                       state = aa_dfa_next(dfa, state, i + 1);
+       }
+
+       return state;
+}
+
+/**
+ * compute_mnt_perms - compute mount permission associated with @state
+ * @dfa: dfa to match against (NOT NULL)
+ * @state: state match finished in
+ *
+ * Returns: mount permissions
+ */
+static struct aa_perms compute_mnt_perms(struct aa_dfa *dfa,
+                                          unsigned int state)
+{
+       struct aa_perms perms;
+
+       perms.kill = 0;
+       perms.allow = dfa_user_allow(dfa, state);
+       perms.audit = dfa_user_audit(dfa, state);
+       perms.quiet = dfa_user_quiet(dfa, state);
+       perms.xindex = dfa_user_xindex(dfa, state);
+
+       return perms;
+}
+
+static const char * const mnt_info_table[] = {
+       "match succeeded",
+       "failed mntpnt match",
+       "failed srcname match",
+       "failed type match",
+       "failed flags match",
+       "failed data match"
+};
+
+/*
+ * Returns 0 on success else element that match failed in, this is the
+ * index into the mnt_info_table above
+ */
+static int do_match_mnt(struct aa_dfa *dfa, unsigned int start,
+                       const char *mntpnt, const char *devname,
+                       const char *type, unsigned long flags,
+                       void *data, bool binary, struct aa_perms *perms)
+{
+       unsigned int state;
+
+       AA_BUG(!dfa);
+       AA_BUG(!perms);
+
+       state = aa_dfa_match(dfa, start, mntpnt);
+       state = aa_dfa_null_transition(dfa, state);
+       if (!state)
+               return 1;
+
+       if (devname)
+               state = aa_dfa_match(dfa, state, devname);
+       state = aa_dfa_null_transition(dfa, state);
+       if (!state)
+               return 2;
+
+       if (type)
+               state = aa_dfa_match(dfa, state, type);
+       state = aa_dfa_null_transition(dfa, state);
+       if (!state)
+               return 3;
+
+       state = match_mnt_flags(dfa, state, flags);
+       if (!state)
+               return 4;
+       *perms = compute_mnt_perms(dfa, state);
+       if (perms->allow & AA_MAY_MOUNT)
+               return 0;
+
+       /* only match data if not binary and the DFA flags data is expected */
+       if (data && !binary && (perms->allow & AA_MNT_CONT_MATCH)) {
+               state = aa_dfa_null_transition(dfa, state);
+               if (!state)
+                       return 4;
+
+               state = aa_dfa_match(dfa, state, data);
+               if (!state)
+                       return 5;
+               *perms = compute_mnt_perms(dfa, state);
+               if (perms->allow & AA_MAY_MOUNT)
+                       return 0;
+       }
+
+       /* failed at end of flags match */
+       return 4;
+}
+
+
+static int path_flags(struct aa_profile *profile, const struct path *path)
+{
+       AA_BUG(!profile);
+       AA_BUG(!path);
+
+       return profile->path_flags |
+               (S_ISDIR(path->dentry->d_inode->i_mode) ? PATH_IS_DIR : 0);
+}
+
+/**
+ * match_mnt_path_str - handle path matching for mount
+ * @profile: the confining profile
+ * @mntpath: for the mntpnt (NOT NULL)
+ * @buffer: buffer to be used to lookup mntpath
+ * @devnme: string for the devname/src_name (MAY BE NULL OR ERRPTR)
+ * @type: string for the dev type (MAYBE NULL)
+ * @flags: mount flags to match
+ * @data: fs mount data (MAYBE NULL)
+ * @binary: whether @data is binary
+ * @devinfo: error str if (IS_ERR(@devname))
+ *
+ * Returns: 0 on success else error
+ */
+static int match_mnt_path_str(struct aa_profile *profile,
+                             const struct path *mntpath, char *buffer,
+                             const char *devname, const char *type,
+                             unsigned long flags, void *data, bool binary,
+                             const char *devinfo)
+{
+       struct aa_perms perms = { };
+       const char *mntpnt = NULL, *info = NULL;
+       int pos, error;
+
+       AA_BUG(!profile);
+       AA_BUG(!mntpath);
+       AA_BUG(!buffer);
+
+       error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer,
+                            &mntpnt, &info, profile->disconnected);
+       if (error)
+               goto audit;
+       if (IS_ERR(devname)) {
+               error = PTR_ERR(devname);
+               devname = NULL;
+               info = devinfo;
+               goto audit;
+       }
+
+       error = -EACCES;
+       pos = do_match_mnt(profile->policy.dfa,
+                          profile->policy.start[AA_CLASS_MOUNT],
+                          mntpnt, devname, type, flags, data, binary, &perms);
+       if (pos) {
+               info = mnt_info_table[pos];
+               goto audit;
+       }
+       error = 0;
+
+audit:
+       return audit_mount(profile, OP_MOUNT, mntpnt, devname, type, NULL,
+                          flags, data, AA_MAY_MOUNT, &perms, info, error);
+}
+
+/**
+ * match_mnt - handle path matching for mount
+ * @profile: the confining profile
+ * @mntpath: for the mntpnt (NOT NULL)
+ * @buffer: buffer to be used to lookup mntpath
+ * @devpath: path devname/src_name (MAYBE NULL)
+ * @devbuffer: buffer to be used to lookup devname/src_name
+ * @type: string for the dev type (MAYBE NULL)
+ * @flags: mount flags to match
+ * @data: fs mount data (MAYBE NULL)
+ * @binary: whether @data is binary
+ *
+ * Returns: 0 on success else error
+ */
+static int match_mnt(struct aa_profile *profile, const struct path *path,
+                    char *buffer, struct path *devpath, char *devbuffer,
+                    const char *type, unsigned long flags, void *data,
+                    bool binary)
+{
+       const char *devname = NULL, *info = NULL;
+       int error = -EACCES;
+
+       AA_BUG(!profile);
+       AA_BUG(devpath && !devbuffer);
+
+       if (devpath) {
+               error = aa_path_name(devpath, path_flags(profile, devpath),
+                                    devbuffer, &devname, &info,
+                                    profile->disconnected);
+               if (error)
+                       devname = ERR_PTR(error);
+       }
+
+       return match_mnt_path_str(profile, path, buffer, devname, type, flags,
+                                 data, binary, info);
+}
+
+int aa_remount(struct aa_label *label, const struct path *path,
+              unsigned long flags, void *data)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL;
+       bool binary;
+       int error;
+
+       AA_BUG(!label);
+       AA_BUG(!path);
+
+       binary = path->dentry->d_sb->s_type->fs_flags & FS_BINARY_MOUNTDATA;
+
+       get_buffers(buffer);
+       error = fn_for_each_confined(label, profile,
+                       match_mnt(profile, path, buffer, NULL, NULL, NULL,
+                                 flags, data, binary));
+       put_buffers(buffer);
+
+       return error;
+}
+
+int aa_bind_mount(struct aa_label *label, const struct path *path,
+                 const char *dev_name, unsigned long flags)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL, *old_buffer = NULL;
+       struct path old_path;
+       int error;
+
+       AA_BUG(!label);
+       AA_BUG(!path);
+
+       if (!dev_name || !*dev_name)
+               return -EINVAL;
+
+       flags &= MS_REC | MS_BIND;
+
+       error = kern_path(dev_name, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &old_path);
+       if (error)
+               return error;
+
+       get_buffers(buffer, old_buffer);
+       error = fn_for_each_confined(label, profile,
+                       match_mnt(profile, path, buffer, &old_path, old_buffer,
+                                 NULL, flags, NULL, false));
+       put_buffers(buffer, old_buffer);
+       path_put(&old_path);
+
+       return error;
+}
+
+int aa_mount_change_type(struct aa_label *label, const struct path *path,
+                        unsigned long flags)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL;
+       int error;
+
+       AA_BUG(!label);
+       AA_BUG(!path);
+
+       /* These are the flags allowed by do_change_type() */
+       flags &= (MS_REC | MS_SILENT | MS_SHARED | MS_PRIVATE | MS_SLAVE |
+                 MS_UNBINDABLE);
+
+       get_buffers(buffer);
+       error = fn_for_each_confined(label, profile,
+                       match_mnt(profile, path, buffer, NULL, NULL, NULL,
+                                 flags, NULL, false));
+       put_buffers(buffer);
+
+       return error;
+}
+
+int aa_move_mount(struct aa_label *label, const struct path *path,
+                 const char *orig_name)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL, *old_buffer = NULL;
+       struct path old_path;
+       int error;
+
+       AA_BUG(!label);
+       AA_BUG(!path);
+
+       if (!orig_name || !*orig_name)
+               return -EINVAL;
+
+       error = kern_path(orig_name, LOOKUP_FOLLOW, &old_path);
+       if (error)
+               return error;
+
+       get_buffers(buffer, old_buffer);
+       error = fn_for_each_confined(label, profile,
+                       match_mnt(profile, path, buffer, &old_path, old_buffer,
+                                 NULL, MS_MOVE, NULL, false));
+       put_buffers(buffer, old_buffer);
+       path_put(&old_path);
+
+       return error;
+}
+
+int aa_new_mount(struct aa_label *label, const char *dev_name,
+                const struct path *path, const char *type, unsigned long flags,
+                void *data)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL, *dev_buffer = NULL;
+       bool binary = true;
+       int error;
+       int requires_dev = 0;
+       struct path tmp_path, *dev_path = NULL;
+
+       AA_BUG(!label);
+       AA_BUG(!path);
+
+       if (type) {
+               struct file_system_type *fstype;
+
+               fstype = get_fs_type(type);
+               if (!fstype)
+                       return -ENODEV;
+               binary = fstype->fs_flags & FS_BINARY_MOUNTDATA;
+               requires_dev = fstype->fs_flags & FS_REQUIRES_DEV;
+               put_filesystem(fstype);
+
+               if (requires_dev) {
+                       if (!dev_name || !*dev_name)
+                               return -ENOENT;
+
+                       error = kern_path(dev_name, LOOKUP_FOLLOW, &tmp_path);
+                       if (error)
+                               return error;
+                       dev_path = &tmp_path;
+               }
+       }
+
+       get_buffers(buffer, dev_buffer);
+       if (dev_path) {
+               error = fn_for_each_confined(label, profile,
+                       match_mnt(profile, path, buffer, dev_path, dev_buffer,
+                                 type, flags, data, binary));
+       } else {
+               error = fn_for_each_confined(label, profile,
+                       match_mnt_path_str(profile, path, buffer, dev_name,
+                                          type, flags, data, binary, NULL));
+       }
+       put_buffers(buffer, dev_buffer);
+       if (dev_path)
+               path_put(dev_path);
+
+       return error;
+}
+
+static int profile_umount(struct aa_profile *profile, struct path *path,
+                         char *buffer)
+{
+       struct aa_perms perms = { };
+       const char *name = NULL, *info = NULL;
+       unsigned int state;
+       int error;
+
+       AA_BUG(!profile);
+       AA_BUG(!path);
+
+       error = aa_path_name(path, path_flags(profile, path), buffer, &name,
+                            &info, profile->disconnected);
+       if (error)
+               goto audit;
+
+       state = aa_dfa_match(profile->policy.dfa,
+                            profile->policy.start[AA_CLASS_MOUNT],
+                            name);
+       perms = compute_mnt_perms(profile->policy.dfa, state);
+       if (AA_MAY_UMOUNT & ~perms.allow)
+               error = -EACCES;
+
+audit:
+       return audit_mount(profile, OP_UMOUNT, name, NULL, NULL, NULL, 0, NULL,
+                          AA_MAY_UMOUNT, &perms, info, error);
+}
+
+int aa_umount(struct aa_label *label, struct vfsmount *mnt, int flags)
+{
+       struct aa_profile *profile;
+       char *buffer = NULL;
+       int error;
+       struct path path = { .mnt = mnt, .dentry = mnt->mnt_root };
+
+       AA_BUG(!label);
+       AA_BUG(!mnt);
+
+       get_buffers(buffer);
+       error = fn_for_each_confined(label, profile,
+                       profile_umount(profile, &path, buffer));
+       put_buffers(buffer);
+
+       return error;
+}
+
+/* helper fn for transition on pivotroot
+ *
+ * Returns: label for transition or ERR_PTR. Does not return NULL
+ */
+static struct aa_label *build_pivotroot(struct aa_profile *profile,
+                                       const struct path *new_path,
+                                       char *new_buffer,
+                                       const struct path *old_path,
+                                       char *old_buffer)
+{
+       const char *old_name, *new_name = NULL, *info = NULL;
+       const char *trans_name = NULL;
+       struct aa_perms perms = { };
+       unsigned int state;
+       int error;
+
+       AA_BUG(!profile);
+       AA_BUG(!new_path);
+       AA_BUG(!old_path);
+
+       if (profile_unconfined(profile))
+               return aa_get_newest_label(&profile->label);
+
+       error = aa_path_name(old_path, path_flags(profile, old_path),
+                            old_buffer, &old_name, &info,
+                            profile->disconnected);
+       if (error)
+               goto audit;
+       error = aa_path_name(new_path, path_flags(profile, new_path),
+                            new_buffer, &new_name, &info,
+                            profile->disconnected);
+       if (error)
+               goto audit;
+
+       error = -EACCES;
+       state = aa_dfa_match(profile->policy.dfa,
+                            profile->policy.start[AA_CLASS_MOUNT],
+                            new_name);
+       state = aa_dfa_null_transition(profile->policy.dfa, state);
+       state = aa_dfa_match(profile->policy.dfa, state, old_name);
+       perms = compute_mnt_perms(profile->policy.dfa, state);
+
+       if (AA_MAY_PIVOTROOT & perms.allow)
+               error = 0;
+
+audit:
+       error = audit_mount(profile, OP_PIVOTROOT, new_name, old_name,
+                           NULL, trans_name, 0, NULL, AA_MAY_PIVOTROOT,
+                           &perms, info, error);
+       if (error)
+               return ERR_PTR(error);
+
+       return aa_get_newest_label(&profile->label);
+}
+
+int aa_pivotroot(struct aa_label *label, const struct path *old_path,
+                const struct path *new_path)
+{
+       struct aa_profile *profile;
+       struct aa_label *target = NULL;
+       char *old_buffer = NULL, *new_buffer = NULL, *info = NULL;
+       int error;
+
+       AA_BUG(!label);
+       AA_BUG(!old_path);
+       AA_BUG(!new_path);
+
+       get_buffers(old_buffer, new_buffer);
+       target = fn_label_build(label, profile, GFP_ATOMIC,
+                       build_pivotroot(profile, new_path, new_buffer,
+                                       old_path, old_buffer));
+       if (!target) {
+               info = "label build failed";
+               error = -ENOMEM;
+               goto fail;
+       } else if (!IS_ERR(target)) {
+               error = aa_replace_current_label(target);
+               if (error) {
+                       /* TODO: audit target */
+                       aa_put_label(target);
+                       goto out;
+               }
+       } else
+               /* already audited error */
+               error = PTR_ERR(target);
+out:
+       put_buffers(old_buffer, new_buffer);
+
+       return error;
+
+fail:
+       /* TODO: add back in auditing of new_name and old_name */
+       error = fn_for_each(label, profile,
+                       audit_mount(profile, OP_PIVOTROOT, NULL /*new_name */,
+                                   NULL /* old_name */,
+                                   NULL, NULL,
+                                   0, NULL, AA_MAY_PIVOTROOT, &nullperms, info,
+                                   error));
+       goto out;
+}
index 244ea4a4a8f0f73fdfacccd8c49cd55e1f7c695e..4243b0c3f0e4acc6d66c70ea878f32d548bebdd4 100644 (file)
@@ -289,85 +289,6 @@ fail:
        return NULL;
 }
 
-/**
- * aa_new_null_profile - create or find a null-X learning profile
- * @parent: profile that caused this profile to be created (NOT NULL)
- * @hat: true if the null- learning profile is a hat
- * @base: name to base the null profile off of
- * @gfp: type of allocation
- *
- * Find/Create a null- complain mode profile used in learning mode.  The
- * name of the profile is unique and follows the format of parent//null-XXX.
- * where XXX is based on the @name or if that fails or is not supplied
- * a unique number
- *
- * null profiles are added to the profile list but the list does not
- * hold a count on them so that they are automatically released when
- * not in use.
- *
- * Returns: new refcounted profile else NULL on failure
- */
-struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat,
-                                      const char *base, gfp_t gfp)
-{
-       struct aa_profile *profile;
-       char *name;
-
-       AA_BUG(!parent);
-
-       if (base) {
-               name = kmalloc(strlen(parent->base.hname) + 8 + strlen(base),
-                              gfp);
-               if (name) {
-                       sprintf(name, "%s//null-%s", parent->base.hname, base);
-                       goto name;
-               }
-               /* fall through to try shorter uniq */
-       }
-
-       name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, gfp);
-       if (!name)
-               return NULL;
-       sprintf(name, "%s//null-%x", parent->base.hname,
-               atomic_inc_return(&parent->ns->uniq_null));
-
-name:
-       /* lookup to see if this is a dup creation */
-       profile = aa_find_child(parent, basename(name));
-       if (profile)
-               goto out;
-
-       profile = aa_alloc_profile(name, NULL, gfp);
-       if (!profile)
-               goto fail;
-
-       profile->mode = APPARMOR_COMPLAIN;
-       profile->label.flags |= FLAG_NULL;
-       if (hat)
-               profile->label.flags |= FLAG_HAT;
-       profile->path_flags = parent->path_flags;
-
-       /* released on free_profile */
-       rcu_assign_pointer(profile->parent, aa_get_profile(parent));
-       profile->ns = aa_get_ns(parent->ns);
-       profile->file.dfa = aa_get_dfa(nulldfa);
-       profile->policy.dfa = aa_get_dfa(nulldfa);
-
-       mutex_lock(&profile->ns->lock);
-       __add_profile(&parent->base.profiles, profile);
-       mutex_unlock(&profile->ns->lock);
-
-       /* refcount released by caller */
-out:
-       kfree(name);
-
-       return profile;
-
-fail:
-       aa_free_profile(profile);
-       return NULL;
-}
-
 /* TODO: profile accounting - setup in remove */
 
 /**
@@ -558,6 +479,93 @@ struct aa_profile *aa_fqlookupn_profile(struct aa_label *base,
        return profile;
 }
 
+/**
+ * aa_new_null_profile - create or find a null-X learning profile
+ * @parent: profile that caused this profile to be created (NOT NULL)
+ * @hat: true if the null- learning profile is a hat
+ * @base: name to base the null profile off of
+ * @gfp: type of allocation
+ *
+ * Find/Create a null- complain mode profile used in learning mode.  The
+ * name of the profile is unique and follows the format of parent//null-XXX.
+ * where XXX is based on the @name or if that fails or is not supplied
+ * a unique number
+ *
+ * null profiles are added to the profile list but the list does not
+ * hold a count on them so that they are automatically released when
+ * not in use.
+ *
+ * Returns: new refcounted profile else NULL on failure
+ */
+struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat,
+                                      const char *base, gfp_t gfp)
+{
+       struct aa_profile *p, *profile;
+       const char *bname;
+       char *name;
+
+       AA_BUG(!parent);
+
+       if (base) {
+               name = kmalloc(strlen(parent->base.hname) + 8 + strlen(base),
+                              gfp);
+               if (name) {
+                       sprintf(name, "%s//null-%s", parent->base.hname, base);
+                       goto name;
+               }
+               /* fall through to try shorter uniq */
+       }
+
+       name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, gfp);
+       if (!name)
+               return NULL;
+       sprintf(name, "%s//null-%x", parent->base.hname,
+               atomic_inc_return(&parent->ns->uniq_null));
+
+name:
+       /* lookup to see if this is a dup creation */
+       bname = basename(name);
+       profile = aa_find_child(parent, bname);
+       if (profile)
+               goto out;
+
+       profile = aa_alloc_profile(name, NULL, gfp);
+       if (!profile)
+               goto fail;
+
+       profile->mode = APPARMOR_COMPLAIN;
+       profile->label.flags |= FLAG_NULL;
+       if (hat)
+               profile->label.flags |= FLAG_HAT;
+       profile->path_flags = parent->path_flags;
+
+       /* released on free_profile */
+       rcu_assign_pointer(profile->parent, aa_get_profile(parent));
+       profile->ns = aa_get_ns(parent->ns);
+       profile->file.dfa = aa_get_dfa(nulldfa);
+       profile->policy.dfa = aa_get_dfa(nulldfa);
+
+       mutex_lock(&profile->ns->lock);
+       p = __find_child(&parent->base.profiles, bname);
+       if (p) {
+               aa_free_profile(profile);
+               profile = aa_get_profile(p);
+       } else {
+               __add_profile(&parent->base.profiles, profile);
+       }
+       mutex_unlock(&profile->ns->lock);
+
+       /* refcount released by caller */
+out:
+       kfree(name);
+
+       return profile;
+
+fail:
+       aa_free_profile(profile);
+       return NULL;
+}
+
 /**
  * replacement_allowed - test to see if replacement is allowed
  * @profile: profile to test if it can be replaced  (MAYBE NULL)
index 351d3bab3a3d2565aa970fe7011453c8fb721ea4..62a3589c62ab624156c0c01eaa8cadd72276866a 100644 (file)
@@ -112,6 +112,8 @@ static struct aa_ns *alloc_ns(const char *prefix, const char *name)
        ns->unconfined->label.flags |= FLAG_IX_ON_NAME_ERROR |
                FLAG_IMMUTIBLE | FLAG_NS_COUNT | FLAG_UNCONFINED;
        ns->unconfined->mode = APPARMOR_UNCONFINED;
+       ns->unconfined->file.dfa = aa_get_dfa(nulldfa);
+       ns->unconfined->policy.dfa = aa_get_dfa(nulldfa);
 
        /* ns and ns->unconfined share ns->unconfined refcount */
        ns->unconfined->ns = ns;
index c600f4dd1783252a1fc429379cb1cca8b9728c9b..4ede87c30f8b890a63e1aaae0a75a9ed6ba1045c 100644 (file)
@@ -85,9 +85,9 @@ static void audit_cb(struct audit_buffer *ab, void *va)
                audit_log_format(ab, " ns=");
                audit_log_untrustedstring(ab, aad(sa)->iface.ns);
        }
-       if (aad(sa)->iface.name) {
+       if (aad(sa)->name) {
                audit_log_format(ab, " name=");
-               audit_log_untrustedstring(ab, aad(sa)->iface.name);
+               audit_log_untrustedstring(ab, aad(sa)->name);
        }
        if (aad(sa)->iface.pos)
                audit_log_format(ab, " offset=%ld", aad(sa)->iface.pos);
@@ -114,9 +114,9 @@ static int audit_iface(struct aa_profile *new, const char *ns_name,
                aad(&sa)->iface.pos = e->pos - e->start;
        aad(&sa)->iface.ns = ns_name;
        if (new)
-               aad(&sa)->iface.name = new->base.hname;
+               aad(&sa)->name = new->base.hname;
        else
-               aad(&sa)->iface.name = name;
+               aad(&sa)->name = name;
        aad(&sa)->info = info;
        aad(&sa)->error = error;
 
@@ -448,7 +448,7 @@ fail:
  */
 static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
 {
-       void *pos = e->pos;
+       void *saved_pos = e->pos;
 
        /* exec table is optional */
        if (unpack_nameX(e, AA_STRUCT, "xtable")) {
@@ -511,7 +511,7 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
 
 fail:
        aa_free_domain_entries(&profile->file.trans);
-       e->pos = pos;
+       e->pos = saved_pos;
        return 0;
 }
 
@@ -583,6 +583,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
 {
        struct aa_profile *profile = NULL;
        const char *tmpname, *tmpns = NULL, *name = NULL;
+       const char *info = "failed to unpack profile";
        size_t ns_len;
        struct rhashtable_params params = { 0 };
        char *key = NULL;
@@ -604,8 +605,10 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        tmpname = aa_splitn_fqname(name, strlen(name), &tmpns, &ns_len);
        if (tmpns) {
                *ns_name = kstrndup(tmpns, ns_len, GFP_KERNEL);
-               if (!*ns_name)
+               if (!*ns_name) {
+                       info = "out of memory";
                        goto fail;
+               }
                name = tmpname;
        }
 
@@ -624,12 +627,15 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        if (IS_ERR(profile->xmatch)) {
                error = PTR_ERR(profile->xmatch);
                profile->xmatch = NULL;
+               info = "bad xmatch";
                goto fail;
        }
        /* xmatch_len is not optional if xmatch is set */
        if (profile->xmatch) {
-               if (!unpack_u32(e, &tmp, NULL))
+               if (!unpack_u32(e, &tmp, NULL)) {
+                       info = "missing xmatch len";
                        goto fail;
+               }
                profile->xmatch_len = tmp;
        }
 
@@ -637,8 +643,11 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        (void) unpack_str(e, &profile->disconnected, "disconnected");
 
        /* per profile debug flags (complain, audit) */
-       if (!unpack_nameX(e, AA_STRUCT, "flags"))
+       if (!unpack_nameX(e, AA_STRUCT, "flags")) {
+               info = "profile missing flags";
                goto fail;
+       }
+       info = "failed to unpack profile flags";
        if (!unpack_u32(e, &tmp, NULL))
                goto fail;
        if (tmp & PACKED_FLAG_HAT)
@@ -667,6 +676,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
                /* set a default value if path_flags field is not present */
                profile->path_flags = PATH_MEDIATE_DELETED;
 
+       info = "failed to unpack profile capabilities";
        if (!unpack_u32(e, &(profile->caps.allow.cap[0]), NULL))
                goto fail;
        if (!unpack_u32(e, &(profile->caps.audit.cap[0]), NULL))
@@ -676,6 +686,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        if (!unpack_u32(e, &tmpcap.cap[0], NULL))
                goto fail;
 
+       info = "failed to unpack upper profile capabilities";
        if (unpack_nameX(e, AA_STRUCT, "caps64")) {
                /* optional upper half of 64 bit caps */
                if (!unpack_u32(e, &(profile->caps.allow.cap[1]), NULL))
@@ -690,6 +701,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
                        goto fail;
        }
 
+       info = "failed to unpack extended profile capabilities";
        if (unpack_nameX(e, AA_STRUCT, "capsx")) {
                /* optional extended caps mediation mask */
                if (!unpack_u32(e, &(profile->caps.extended.cap[0]), NULL))
@@ -700,11 +712,14 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
                        goto fail;
        }
 
-       if (!unpack_rlimits(e, profile))
+       if (!unpack_rlimits(e, profile)) {
+               info = "failed to unpack profile rlimits";
                goto fail;
+       }
 
        if (unpack_nameX(e, AA_STRUCT, "policydb")) {
                /* generic policy dfa - optional and may be NULL */
+               info = "failed to unpack policydb";
                profile->policy.dfa = unpack_dfa(e);
                if (IS_ERR(profile->policy.dfa)) {
                        error = PTR_ERR(profile->policy.dfa);
@@ -734,6 +749,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        if (IS_ERR(profile->file.dfa)) {
                error = PTR_ERR(profile->file.dfa);
                profile->file.dfa = NULL;
+               info = "failed to unpack profile file rules";
                goto fail;
        } else if (profile->file.dfa) {
                if (!unpack_u32(e, &profile->file.start, "dfa_start"))
@@ -746,10 +762,13 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
        } else
                profile->file.dfa = aa_get_dfa(nulldfa);
 
-       if (!unpack_trans_table(e, profile))
+       if (!unpack_trans_table(e, profile)) {
+               info = "failed to unpack profile transition table";
                goto fail;
+       }
 
        if (unpack_nameX(e, AA_STRUCT, "data")) {
+               info = "out of memory";
                profile->data = kzalloc(sizeof(*profile->data), GFP_KERNEL);
                if (!profile->data)
                        goto fail;
@@ -761,8 +780,10 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
                params.hashfn = strhash;
                params.obj_cmpfn = datacmp;
 
-               if (rhashtable_init(profile->data, &params))
+               if (rhashtable_init(profile->data, &params)) {
+                       info = "failed to init key, value hash table";
                        goto fail;
+               }
 
                while (unpack_strdup(e, &key, NULL)) {
                        data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -784,12 +805,16 @@ static struct aa_profile *unpack_profile(struct aa_ext *e, char **ns_name)
                                               profile->data->p);
                }
 
-               if (!unpack_nameX(e, AA_STRUCTEND, NULL))
+               if (!unpack_nameX(e, AA_STRUCTEND, NULL)) {
+                       info = "failed to unpack end of key, value data table";
                        goto fail;
+               }
        }
 
-       if (!unpack_nameX(e, AA_STRUCTEND, NULL))
+       if (!unpack_nameX(e, AA_STRUCTEND, NULL)) {
+               info = "failed to unpack end of profile";
                goto fail;
+       }
 
        return profile;
 
@@ -798,8 +823,7 @@ fail:
                name = NULL;
        else if (!name)
                name = "unknown";
-       audit_iface(profile, NULL, name, "failed to unpack profile", e,
-                   error);
+       audit_iface(profile, NULL, name, info, e, error);
        aa_free_profile(profile);
 
        return ERR_PTR(error);
@@ -832,7 +856,7 @@ static int verify_header(struct aa_ext *e, int required, const char **ns)
         * if not specified use previous version
         * Mask off everything that is not kernel abi version
         */
-       if (VERSION_LT(e->version, v5) && VERSION_GT(e->version, v7)) {
+       if (VERSION_LT(e->version, v5) || VERSION_GT(e->version, v7)) {
                audit_iface(NULL, NULL, NULL, "unsupported interface version",
                            e, error);
                return error;
index 6bf72b175b49caf336e7ef8f3d83cf256c955120..fc46f5b85251049265a53929e37d5822240a64e3 100644 (file)
@@ -294,10 +294,10 @@ int cap_capset(struct cred *new,
  *
  * Determine if an inode having a change applied that's marked ATTR_KILL_PRIV
  * affects the security markings on that inode, and if it is, should
- * inode_killpriv() be invoked or the change rejected?
+ * inode_killpriv() be invoked or the change rejected.
  *
- * Returns 0 if granted; +ve if granted, but inode_killpriv() is required; and
- * -ve to deny the change.
+ * Returns 1 if security.capability has a value, meaning inode_killpriv()
+ * is required, 0 otherwise, meaning inode_killpriv() is not required.
  */
 int cap_inode_need_killpriv(struct dentry *dentry)
 {
@@ -585,13 +585,14 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data
        struct vfs_ns_cap_data data, *nscaps = &data;
        struct vfs_cap_data *caps = (struct vfs_cap_data *) &data;
        kuid_t rootkuid;
-       struct user_namespace *fs_ns = inode->i_sb->s_user_ns;
+       struct user_namespace *fs_ns;
 
        memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data));
 
        if (!inode)
                return -ENODATA;
 
+       fs_ns = inode->i_sb->s_user_ns;
        size = __vfs_getxattr((struct dentry *)dentry, inode,
                              XATTR_NAME_CAPS, &data, XATTR_CAPS_SZ);
        if (size == -ENODATA || size == -EOPNOTSUPP)
index 03c1652c9a1f593669b6d9e3a0bd2e65e47da239..5ef7e524056326d045c657a91a8f7fb40f9daac1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * device_cgroup.c - device cgroup subsystem
  *
index 8d1f4bf5108759188ba843e3ef7ba4e4ad5ae1c1..04d6e462b079f0ccb5ba671fd0131679b2f5e106 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for caching inode integrity data (iint)
 #
index 29f198bde02b9ff12fb38b18dfda191b9c3c1e91..d921dc4f9eb015f6ef81b78d05f2dfe537d607cd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for building Trusted Computing Group's(TCG) runtime Integrity
 # Measurement Architecture(IMA).
index a7a23b5541f85a4994e0cc83d7d132e8a5681938..6462e6654ccf46df67db56959f5405b2f7d4e4c2 100644 (file)
@@ -45,10 +45,9 @@ config BIG_KEYS
        bool "Large payload keys"
        depends on KEYS
        depends on TMPFS
-       depends on (CRYPTO_ANSI_CPRNG = y || CRYPTO_DRBG = y)
+       select CRYPTO
        select CRYPTO_AES
-       select CRYPTO_ECB
-       select CRYPTO_RNG
+       select CRYPTO_GCM
        help
          This option provides support for holding large keys within the kernel
          (for example Kerberos ticket caches).  The data may be stored out to
index 57dff0c15809081c8ffd292af73e8b47a26d7fd7..ef1581b337a3dc67dedd2e43cec94d28e5188cbd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for key management
 #
index 6acb00f6f22cdcd223426756a49deebf53b86595..929e14978c421b227e592e937d9157ca2235b2f7 100644 (file)
@@ -1,5 +1,6 @@
 /* Large capacity key type
  *
+ * Copyright (C) 2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
  * Copyright (C) 2013 Red Hat, Inc. All Rights Reserved.
  * Written by David Howells (dhowells@redhat.com)
  *
 #include <linux/shmem_fs.h>
 #include <linux/err.h>
 #include <linux/scatterlist.h>
+#include <linux/random.h>
 #include <keys/user-type.h>
 #include <keys/big_key-type.h>
-#include <crypto/rng.h>
-#include <crypto/skcipher.h>
+#include <crypto/aead.h>
 
 /*
  * Layout of key payload words.
@@ -49,7 +50,12 @@ enum big_key_op {
 /*
  * Key size for big_key data encryption
  */
-#define ENC_KEY_SIZE   16
+#define ENC_KEY_SIZE 32
+
+/*
+ * Authentication tag length
+ */
+#define ENC_AUTHTAG_SIZE 16
 
 /*
  * big_key defined keys take an arbitrary string as the description and an
@@ -64,57 +70,62 @@ struct key_type key_type_big_key = {
        .destroy                = big_key_destroy,
        .describe               = big_key_describe,
        .read                   = big_key_read,
+       /* no ->update(); don't add it without changing big_key_crypt() nonce */
 };
 
 /*
- * Crypto names for big_key data encryption
+ * Crypto names for big_key data authenticated encryption
  */
-static const char big_key_rng_name[] = "stdrng";
-static const char big_key_alg_name[] = "ecb(aes)";
+static const char big_key_alg_name[] = "gcm(aes)";
 
 /*
- * Crypto algorithms for big_key data encryption
+ * Crypto algorithms for big_key data authenticated encryption
  */
-static struct crypto_rng *big_key_rng;
-static struct crypto_skcipher *big_key_skcipher;
+static struct crypto_aead *big_key_aead;
 
 /*
- * Generate random key to encrypt big_key data
+ * Since changing the key affects the entire object, we need a mutex.
  */
-static inline int big_key_gen_enckey(u8 *key)
-{
-       return crypto_rng_get_bytes(big_key_rng, key, ENC_KEY_SIZE);
-}
+static DEFINE_MUTEX(big_key_aead_lock);
 
 /*
  * Encrypt/decrypt big_key data
  */
 static int big_key_crypt(enum big_key_op op, u8 *data, size_t datalen, u8 *key)
 {
-       int ret = -EINVAL;
+       int ret;
        struct scatterlist sgio;
-       SKCIPHER_REQUEST_ON_STACK(req, big_key_skcipher);
-
-       if (crypto_skcipher_setkey(big_key_skcipher, key, ENC_KEY_SIZE)) {
+       struct aead_request *aead_req;
+       /* We always use a zero nonce. The reason we can get away with this is
+        * because we're using a different randomly generated key for every
+        * different encryption. Notably, too, key_type_big_key doesn't define
+        * an .update function, so there's no chance we'll wind up reusing the
+        * key to encrypt updated data. Simply put: one key, one encryption.
+        */
+       u8 zero_nonce[crypto_aead_ivsize(big_key_aead)];
+
+       aead_req = aead_request_alloc(big_key_aead, GFP_KERNEL);
+       if (!aead_req)
+               return -ENOMEM;
+
+       memset(zero_nonce, 0, sizeof(zero_nonce));
+       sg_init_one(&sgio, data, datalen + (op == BIG_KEY_ENC ? ENC_AUTHTAG_SIZE : 0));
+       aead_request_set_crypt(aead_req, &sgio, &sgio, datalen, zero_nonce);
+       aead_request_set_callback(aead_req, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, NULL);
+       aead_request_set_ad(aead_req, 0);
+
+       mutex_lock(&big_key_aead_lock);
+       if (crypto_aead_setkey(big_key_aead, key, ENC_KEY_SIZE)) {
                ret = -EAGAIN;
                goto error;
        }
-
-       skcipher_request_set_tfm(req, big_key_skcipher);
-       skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP,
-                                     NULL, NULL);
-
-       sg_init_one(&sgio, data, datalen);
-       skcipher_request_set_crypt(req, &sgio, &sgio, datalen, NULL);
-
        if (op == BIG_KEY_ENC)
-               ret = crypto_skcipher_encrypt(req);
+               ret = crypto_aead_encrypt(aead_req);
        else
-               ret = crypto_skcipher_decrypt(req);
-
-       skcipher_request_zero(req);
-
+               ret = crypto_aead_decrypt(aead_req);
 error:
+       mutex_unlock(&big_key_aead_lock);
+       aead_request_free(aead_req);
        return ret;
 }
 
@@ -146,16 +157,13 @@ int big_key_preparse(struct key_preparsed_payload *prep)
                 *
                 * File content is stored encrypted with randomly generated key.
                 */
-               size_t enclen = ALIGN(datalen, crypto_skcipher_blocksize(big_key_skcipher));
+               size_t enclen = datalen + ENC_AUTHTAG_SIZE;
                loff_t pos = 0;
 
-               /* prepare aligned data to encrypt */
                data = kmalloc(enclen, GFP_KERNEL);
                if (!data)
                        return -ENOMEM;
-
                memcpy(data, prep->data, datalen);
-               memset(data + datalen, 0x00, enclen - datalen);
 
                /* generate random key */
                enckey = kmalloc(ENC_KEY_SIZE, GFP_KERNEL);
@@ -163,13 +171,12 @@ int big_key_preparse(struct key_preparsed_payload *prep)
                        ret = -ENOMEM;
                        goto error;
                }
-
-               ret = big_key_gen_enckey(enckey);
-               if (ret)
+               ret = get_random_bytes_wait(enckey, ENC_KEY_SIZE);
+               if (unlikely(ret))
                        goto err_enckey;
 
                /* encrypt aligned data */
-               ret = big_key_crypt(BIG_KEY_ENC, data, enclen, enckey);
+               ret = big_key_crypt(BIG_KEY_ENC, data, datalen, enckey);
                if (ret)
                        goto err_enckey;
 
@@ -195,7 +202,7 @@ int big_key_preparse(struct key_preparsed_payload *prep)
                *path = file->f_path;
                path_get(path);
                fput(file);
-               kfree(data);
+               kzfree(data);
        } else {
                /* Just store the data in a buffer */
                void *data = kmalloc(datalen, GFP_KERNEL);
@@ -211,9 +218,9 @@ int big_key_preparse(struct key_preparsed_payload *prep)
 err_fput:
        fput(file);
 err_enckey:
-       kfree(enckey);
+       kzfree(enckey);
 error:
-       kfree(data);
+       kzfree(data);
        return ret;
 }
 
@@ -227,7 +234,7 @@ void big_key_free_preparse(struct key_preparsed_payload *prep)
 
                path_put(path);
        }
-       kfree(prep->payload.data[big_key_data]);
+       kzfree(prep->payload.data[big_key_data]);
 }
 
 /*
@@ -240,7 +247,7 @@ void big_key_revoke(struct key *key)
 
        /* clear the quota */
        key_payload_reserve(key, 0);
-       if (key_is_instantiated(key) &&
+       if (key_is_positive(key) &&
            (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD)
                vfs_truncate(path, 0);
 }
@@ -259,7 +266,7 @@ void big_key_destroy(struct key *key)
                path->mnt = NULL;
                path->dentry = NULL;
        }
-       kfree(key->payload.data[big_key_data]);
+       kzfree(key->payload.data[big_key_data]);
        key->payload.data[big_key_data] = NULL;
 }
 
@@ -272,7 +279,7 @@ void big_key_describe(const struct key *key, struct seq_file *m)
 
        seq_puts(m, key->description);
 
-       if (key_is_instantiated(key))
+       if (key_is_positive(key))
                seq_printf(m, ": %zu [%s]",
                           datalen,
                           datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
@@ -295,7 +302,7 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
                struct file *file;
                u8 *data;
                u8 *enckey = (u8 *)key->payload.data[big_key_data];
-               size_t enclen = ALIGN(datalen, crypto_skcipher_blocksize(big_key_skcipher));
+               size_t enclen = datalen + ENC_AUTHTAG_SIZE;
                loff_t pos = 0;
 
                data = kmalloc(enclen, GFP_KERNEL);
@@ -328,7 +335,7 @@ long big_key_read(const struct key *key, char __user *buffer, size_t buflen)
 err_fput:
                fput(file);
 error:
-               kfree(data);
+               kzfree(data);
        } else {
                ret = datalen;
                if (copy_to_user(buffer, key->payload.data[big_key_data],
@@ -344,47 +351,31 @@ error:
  */
 static int __init big_key_init(void)
 {
-       struct crypto_skcipher *cipher;
-       struct crypto_rng *rng;
        int ret;
 
-       rng = crypto_alloc_rng(big_key_rng_name, 0, 0);
-       if (IS_ERR(rng)) {
-               pr_err("Can't alloc rng: %ld\n", PTR_ERR(rng));
-               return PTR_ERR(rng);
-       }
-
-       big_key_rng = rng;
-
-       /* seed RNG */
-       ret = crypto_rng_reset(rng, NULL, crypto_rng_seedsize(rng));
-       if (ret) {
-               pr_err("Can't reset rng: %d\n", ret);
-               goto error_rng;
-       }
-
        /* init block cipher */
-       cipher = crypto_alloc_skcipher(big_key_alg_name, 0, CRYPTO_ALG_ASYNC);
-       if (IS_ERR(cipher)) {
-               ret = PTR_ERR(cipher);
+       big_key_aead = crypto_alloc_aead(big_key_alg_name, 0, CRYPTO_ALG_ASYNC);
+       if (IS_ERR(big_key_aead)) {
+               ret = PTR_ERR(big_key_aead);
                pr_err("Can't alloc crypto: %d\n", ret);
-               goto error_rng;
+               return ret;
+       }
+       ret = crypto_aead_setauthsize(big_key_aead, ENC_AUTHTAG_SIZE);
+       if (ret < 0) {
+               pr_err("Can't set crypto auth tag len: %d\n", ret);
+               goto free_aead;
        }
-
-       big_key_skcipher = cipher;
 
        ret = register_key_type(&key_type_big_key);
        if (ret < 0) {
                pr_err("Can't register type: %d\n", ret);
-               goto error_cipher;
+               goto free_aead;
        }
 
        return 0;
 
-error_cipher:
-       crypto_free_skcipher(big_key_skcipher);
-error_rng:
-       crypto_free_rng(big_key_rng);
+free_aead:
+       crypto_free_aead(big_key_aead);
        return ret;
 }
 
index d6f8433250a5a37db4543b61c1b73303f92be574..7a44dce6f69d331c6bde087daa6569120d11282a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for encrypted keys
 #
index 69855ba0d3b3fcba2190844ae5665ead90dd38f9..d92cbf9687c33f090865f6d0caa99d9936f49e3a 100644 (file)
@@ -309,6 +309,13 @@ static struct key *request_user_key(const char *master_desc, const u8 **master_k
 
        down_read(&ukey->sem);
        upayload = user_key_payload_locked(ukey);
+       if (!upayload) {
+               /* key was revoked before we acquired its semaphore */
+               up_read(&ukey->sem);
+               key_put(ukey);
+               ukey = ERR_PTR(-EKEYREVOKED);
+               goto error;
+       }
        *master_key = upayload->data;
        *master_keylen = upayload->datalen;
 error:
@@ -847,7 +854,7 @@ static int encrypted_update(struct key *key, struct key_preparsed_payload *prep)
        size_t datalen = prep->datalen;
        int ret = 0;
 
-       if (test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+       if (key_is_negative(key))
                return -ENOKEY;
        if (datalen <= 0 || datalen > 32767 || !prep->data)
                return -EINVAL;
index 47802c0de73567015743e26bebc4af71b3638a02..1809995db452bf9385187f48818ceb6c71cedc6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ENCRYPTED_KEY_H
 #define __ENCRYPTED_KEY_H
 
index 87cb260e4890f3ac464e8d3f3244077653510b74..f01d48cb3de1aac09266b59bcfa732597c6534b4 100644 (file)
@@ -129,15 +129,15 @@ static noinline void key_gc_unused_keys(struct list_head *keys)
        while (!list_empty(keys)) {
                struct key *key =
                        list_entry(keys->next, struct key, graveyard_link);
+               short state = key->state;
+
                list_del(&key->graveyard_link);
 
                kdebug("- %u", key->serial);
                key_check(key);
 
                /* Throw away the key data if the key is instantiated */
-               if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags) &&
-                   !test_bit(KEY_FLAG_NEGATIVE, &key->flags) &&
-                   key->type->destroy)
+               if (state == KEY_IS_POSITIVE && key->type->destroy)
                        key->type->destroy(key);
 
                security_key_free(key);
@@ -151,7 +151,7 @@ static noinline void key_gc_unused_keys(struct list_head *keys)
                }
 
                atomic_dec(&key->user->nkeys);
-               if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
+               if (state != KEY_IS_UNINSTANTIATED)
                        atomic_dec(&key->user->nikeys);
 
                key_user_put(key->user);
index 1c02c65470384aa076e2de6885ecba356eb44342..503adbae7b0dd0b096aa7fd672fddb0d3513d115 100644 (file)
@@ -141,7 +141,7 @@ extern key_ref_t keyring_search_aux(key_ref_t keyring_ref,
 extern key_ref_t search_my_process_keyrings(struct keyring_search_context *ctx);
 extern key_ref_t search_process_keyrings(struct keyring_search_context *ctx);
 
-extern struct key *find_keyring_by_name(const char *name, bool skip_perm_check);
+extern struct key *find_keyring_by_name(const char *name, bool uid_keyring);
 
 extern int install_user_keyrings(void);
 extern int install_thread_keyring_to_cred(struct cred *);
index 83da68d98b40b452a1c8b37121a6ca270387d4f6..83bf4b4afd49d24ba80209a9bff71a558bd01b6c 100644 (file)
@@ -54,10 +54,10 @@ void __key_check(const struct key *key)
 struct key_user *key_user_lookup(kuid_t uid)
 {
        struct key_user *candidate = NULL, *user;
-       struct rb_node *parent = NULL;
-       struct rb_node **p;
+       struct rb_node *parent, **p;
 
 try_again:
+       parent = NULL;
        p = &key_user_tree.rb_node;
        spin_lock(&key_user_lock);
 
@@ -302,6 +302,8 @@ struct key *key_alloc(struct key_type *type, const char *desc,
                key->flags |= 1 << KEY_FLAG_IN_QUOTA;
        if (flags & KEY_ALLOC_BUILT_IN)
                key->flags |= 1 << KEY_FLAG_BUILTIN;
+       if (flags & KEY_ALLOC_UID_KEYRING)
+               key->flags |= 1 << KEY_FLAG_UID_KEYRING;
 
 #ifdef KEY_DEBUGGING
        key->magic = KEY_DEBUG_MAGIC;
@@ -399,6 +401,18 @@ int key_payload_reserve(struct key *key, size_t datalen)
 }
 EXPORT_SYMBOL(key_payload_reserve);
 
+/*
+ * Change the key state to being instantiated.
+ */
+static void mark_key_instantiated(struct key *key, int reject_error)
+{
+       /* Commit the payload before setting the state; barrier versus
+        * key_read_state().
+        */
+       smp_store_release(&key->state,
+                         (reject_error < 0) ? reject_error : KEY_IS_POSITIVE);
+}
+
 /*
  * Instantiate a key and link it into the target keyring atomically.  Must be
  * called with the target keyring's semaphore writelocked.  The target key's
@@ -422,14 +436,14 @@ static int __key_instantiate_and_link(struct key *key,
        mutex_lock(&key_construction_mutex);
 
        /* can't instantiate twice */
-       if (!test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) {
+       if (key->state == KEY_IS_UNINSTANTIATED) {
                /* instantiate the key */
                ret = key->type->instantiate(key, prep);
 
                if (ret == 0) {
                        /* mark the key as being instantiated */
                        atomic_inc(&key->user->nikeys);
-                       set_bit(KEY_FLAG_INSTANTIATED, &key->flags);
+                       mark_key_instantiated(key, 0);
 
                        if (test_and_clear_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags))
                                awaken = 1;
@@ -575,13 +589,10 @@ int key_reject_and_link(struct key *key,
        mutex_lock(&key_construction_mutex);
 
        /* can't instantiate twice */
-       if (!test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) {
+       if (key->state == KEY_IS_UNINSTANTIATED) {
                /* mark the key as being negatively instantiated */
                atomic_inc(&key->user->nikeys);
-               key->reject_error = -error;
-               smp_wmb();
-               set_bit(KEY_FLAG_NEGATIVE, &key->flags);
-               set_bit(KEY_FLAG_INSTANTIATED, &key->flags);
+               mark_key_instantiated(key, -error);
                now = current_kernel_time();
                key->expiry = now.tv_sec + timeout;
                key_schedule_gc(key->expiry + key_gc_delay);
@@ -750,8 +761,8 @@ static inline key_ref_t __key_update(key_ref_t key_ref,
 
        ret = key->type->update(key, prep);
        if (ret == 0)
-               /* updating a negative key instantiates it */
-               clear_bit(KEY_FLAG_NEGATIVE, &key->flags);
+               /* Updating a negative key positively instantiates it */
+               mark_key_instantiated(key, 0);
 
        up_write(&key->sem);
 
@@ -934,6 +945,16 @@ error:
         */
        __key_link_end(keyring, &index_key, edit);
 
+       key = key_ref_to_ptr(key_ref);
+       if (test_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags)) {
+               ret = wait_for_key_construction(key, true);
+               if (ret < 0) {
+                       key_ref_put(key_ref);
+                       key_ref = ERR_PTR(ret);
+                       goto error_free_prep;
+               }
+       }
+
        key_ref = __key_update(key_ref, &prep);
        goto error_free_prep;
 }
@@ -984,8 +1005,8 @@ int key_update(key_ref_t key_ref, const void *payload, size_t plen)
 
        ret = key->type->update(key, &prep);
        if (ret == 0)
-               /* updating a negative key instantiates it */
-               clear_bit(KEY_FLAG_NEGATIVE, &key->flags);
+               /* Updating a negative key positively instantiates it */
+               mark_key_instantiated(key, 0);
 
        up_write(&key->sem);
 
index ab0b337c84b4c02e4856719398edb94d1caf101a..76d22f726ae49d7e112c648c59e9c0d3124063f1 100644 (file)
@@ -766,12 +766,16 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)
 
        key = key_ref_to_ptr(key_ref);
 
+       ret = key_read_state(key);
+       if (ret < 0)
+               goto error2; /* Negatively instantiated */
+
        /* see if we can read it directly */
        ret = key_permission(key_ref, KEY_NEED_READ);
        if (ret == 0)
                goto can_read_key;
        if (ret != -EACCES)
-               goto error;
+               goto error2;
 
        /* we can't; see if it's searchable from this process's keyrings
         * - we automatically take account of the fact that it may be
@@ -896,7 +900,7 @@ long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group)
                atomic_dec(&key->user->nkeys);
                atomic_inc(&newowner->nkeys);
 
-               if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) {
+               if (key->state != KEY_IS_UNINSTANTIATED) {
                        atomic_dec(&key->user->nikeys);
                        atomic_inc(&newowner->nikeys);
                }
@@ -1406,11 +1410,9 @@ long keyctl_assume_authority(key_serial_t id)
        }
 
        ret = keyctl_change_reqkey_auth(authkey);
-       if (ret < 0)
-               goto error;
+       if (ret == 0)
+               ret = authkey->serial;
        key_put(authkey);
-
-       ret = authkey->serial;
 error:
        return ret;
 }
index de81793f9920787101dec77eca28ddfbe91ebbc7..36f842ec87f04580dfd051f4e50d395242a69eb6 100644 (file)
@@ -414,7 +414,7 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m)
        else
                seq_puts(m, "[anon]");
 
-       if (key_is_instantiated(keyring)) {
+       if (key_is_positive(keyring)) {
                if (keyring->keys.nr_leaves_on_tree != 0)
                        seq_printf(m, ": %lu", keyring->keys.nr_leaves_on_tree);
                else
@@ -423,7 +423,7 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m)
 }
 
 struct keyring_read_iterator_context {
-       size_t                  qty;
+       size_t                  buflen;
        size_t                  count;
        key_serial_t __user     *buffer;
 };
@@ -435,9 +435,9 @@ static int keyring_read_iterator(const void *object, void *data)
        int ret;
 
        kenter("{%s,%d},,{%zu/%zu}",
-              key->type->name, key->serial, ctx->count, ctx->qty);
+              key->type->name, key->serial, ctx->count, ctx->buflen);
 
-       if (ctx->count >= ctx->qty)
+       if (ctx->count >= ctx->buflen)
                return 1;
 
        ret = put_user(key->serial, ctx->buffer);
@@ -459,38 +459,33 @@ static long keyring_read(const struct key *keyring,
                         char __user *buffer, size_t buflen)
 {
        struct keyring_read_iterator_context ctx;
-       unsigned long nr_keys;
-       int ret;
+       long ret;
 
        kenter("{%d},,%zu", key_serial(keyring), buflen);
 
        if (buflen & (sizeof(key_serial_t) - 1))
                return -EINVAL;
 
-       nr_keys = keyring->keys.nr_leaves_on_tree;
-       if (nr_keys == 0)
-               return 0;
-
-       /* Calculate how much data we could return */
-       ctx.qty = nr_keys * sizeof(key_serial_t);
-
-       if (!buffer || !buflen)
-               return ctx.qty;
-
-       if (buflen > ctx.qty)
-               ctx.qty = buflen;
-
-       /* Copy the IDs of the subscribed keys into the buffer */
-       ctx.buffer = (key_serial_t __user *)buffer;
-       ctx.count = 0;
-       ret = assoc_array_iterate(&keyring->keys, keyring_read_iterator, &ctx);
-       if (ret < 0) {
-               kleave(" = %d [iterate]", ret);
-               return ret;
+       /* Copy as many key IDs as fit into the buffer */
+       if (buffer && buflen) {
+               ctx.buffer = (key_serial_t __user *)buffer;
+               ctx.buflen = buflen;
+               ctx.count = 0;
+               ret = assoc_array_iterate(&keyring->keys,
+                                         keyring_read_iterator, &ctx);
+               if (ret < 0) {
+                       kleave(" = %ld [iterate]", ret);
+                       return ret;
+               }
        }
 
-       kleave(" = %zu [ok]", ctx.count);
-       return ctx.count;
+       /* Return the size of the buffer needed */
+       ret = keyring->keys.nr_leaves_on_tree * sizeof(key_serial_t);
+       if (ret <= buflen)
+               kleave("= %ld [ok]", ret);
+       else
+               kleave("= %ld [buffer too small]", ret);
+       return ret;
 }
 
 /*
@@ -557,7 +552,8 @@ static int keyring_search_iterator(const void *object, void *iterator_data)
 {
        struct keyring_search_context *ctx = iterator_data;
        const struct key *key = keyring_ptr_to_key(object);
-       unsigned long kflags = key->flags;
+       unsigned long kflags = READ_ONCE(key->flags);
+       short state = READ_ONCE(key->state);
 
        kenter("{%d}", key->serial);
 
@@ -569,6 +565,8 @@ static int keyring_search_iterator(const void *object, void *iterator_data)
 
        /* skip invalidated, revoked and expired keys */
        if (ctx->flags & KEYRING_SEARCH_DO_STATE_CHECK) {
+               time_t expiry = READ_ONCE(key->expiry);
+
                if (kflags & ((1 << KEY_FLAG_INVALIDATED) |
                              (1 << KEY_FLAG_REVOKED))) {
                        ctx->result = ERR_PTR(-EKEYREVOKED);
@@ -576,7 +574,7 @@ static int keyring_search_iterator(const void *object, void *iterator_data)
                        goto skipped;
                }
 
-               if (key->expiry && ctx->now.tv_sec >= key->expiry) {
+               if (expiry && ctx->now.tv_sec >= expiry) {
                        if (!(ctx->flags & KEYRING_SEARCH_SKIP_EXPIRED))
                                ctx->result = ERR_PTR(-EKEYEXPIRED);
                        kleave(" = %d [expire]", ctx->skipped_ret);
@@ -601,9 +599,8 @@ static int keyring_search_iterator(const void *object, void *iterator_data)
 
        if (ctx->flags & KEYRING_SEARCH_DO_STATE_CHECK) {
                /* we set a different error code if we pass a negative key */
-               if (kflags & (1 << KEY_FLAG_NEGATIVE)) {
-                       smp_rmb();
-                       ctx->result = ERR_PTR(key->reject_error);
+               if (state < 0) {
+                       ctx->result = ERR_PTR(state);
                        kleave(" = %d [neg]", ctx->skipped_ret);
                        goto skipped;
                }
@@ -1101,15 +1098,15 @@ found:
 /*
  * Find a keyring with the specified name.
  *
- * All named keyrings in the current user namespace are searched, provided they
- * grant Search permission directly to the caller (unless this check is
- * skipped).  Keyrings whose usage points have reached zero or who have been
- * revoked are skipped.
+ * Only keyrings that have nonzero refcount, are not revoked, and are owned by a
+ * user in the current user namespace are considered.  If @uid_keyring is %true,
+ * the keyring additionally must have been allocated as a user or user session
+ * keyring; otherwise, it must grant Search permission directly to the caller.
  *
  * Returns a pointer to the keyring with the keyring's refcount having being
  * incremented on success.  -ENOKEY is returned if a key could not be found.
  */
-struct key *find_keyring_by_name(const char *name, bool skip_perm_check)
+struct key *find_keyring_by_name(const char *name, bool uid_keyring)
 {
        struct key *keyring;
        int bucket;
@@ -1137,10 +1134,15 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check)
                        if (strcmp(keyring->description, name) != 0)
                                continue;
 
-                       if (!skip_perm_check &&
-                           key_permission(make_key_ref(keyring, 0),
-                                          KEY_NEED_SEARCH) < 0)
-                               continue;
+                       if (uid_keyring) {
+                               if (!test_bit(KEY_FLAG_UID_KEYRING,
+                                             &keyring->flags))
+                                       continue;
+                       } else {
+                               if (key_permission(make_key_ref(keyring, 0),
+                                                  KEY_NEED_SEARCH) < 0)
+                                       continue;
+                       }
 
                        /* we've got a match but we might end up racing with
                         * key_cleanup() if the keyring is currently 'dead'
index 732cc0beffdfc74b74eddbf173ee30bd9d0455db..a72b4dd70c8abfab5d05503415c4a5fcef7b6df3 100644 (file)
@@ -88,7 +88,8 @@ EXPORT_SYMBOL(key_task_permission);
  */
 int key_validate(const struct key *key)
 {
-       unsigned long flags = key->flags;
+       unsigned long flags = READ_ONCE(key->flags);
+       time_t expiry = READ_ONCE(key->expiry);
 
        if (flags & (1 << KEY_FLAG_INVALIDATED))
                return -ENOKEY;
@@ -99,9 +100,9 @@ int key_validate(const struct key *key)
                return -EKEYREVOKED;
 
        /* check it hasn't expired */
-       if (key->expiry) {
+       if (expiry) {
                struct timespec now = current_kernel_time();
-               if (now.tv_sec >= key->expiry)
+               if (now.tv_sec >= expiry)
                        return -EKEYEXPIRED;
        }
 
index bf08d02b6646ae2077b15903471bfb4575b04f5a..6d1fcbba1e0961927c9b3a6027fcd8084a21f80a 100644 (file)
@@ -179,15 +179,18 @@ static int proc_keys_show(struct seq_file *m, void *v)
        struct rb_node *_p = v;
        struct key *key = rb_entry(_p, struct key, serial_node);
        struct timespec now;
+       time_t expiry;
        unsigned long timo;
+       unsigned long flags;
        key_ref_t key_ref, skey_ref;
        char xbuf[16];
+       short state;
        int rc;
 
        struct keyring_search_context ctx = {
                .index_key.type         = key->type,
                .index_key.description  = key->description,
-               .cred                   = current_cred(),
+               .cred                   = m->file->f_cred,
                .match_data.cmp         = lookup_user_key_possessed,
                .match_data.raw_data    = key,
                .match_data.lookup_type = KEYRING_SEARCH_LOOKUP_DIRECT,
@@ -207,11 +210,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
                }
        }
 
-       /* check whether the current task is allowed to view the key (assuming
-        * non-possession)
-        * - the caller holds a spinlock, and thus the RCU read lock, making our
-        *   access to __current_cred() safe
-        */
+       /* check whether the current task is allowed to view the key */
        rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW);
        if (rc < 0)
                return 0;
@@ -221,12 +220,13 @@ static int proc_keys_show(struct seq_file *m, void *v)
        rcu_read_lock();
 
        /* come up with a suitable timeout value */
-       if (key->expiry == 0) {
+       expiry = READ_ONCE(key->expiry);
+       if (expiry == 0) {
                memcpy(xbuf, "perm", 5);
-       } else if (now.tv_sec >= key->expiry) {
+       } else if (now.tv_sec >= expiry) {
                memcpy(xbuf, "expd", 5);
        } else {
-               timo = key->expiry - now.tv_sec;
+               timo = expiry - now.tv_sec;
 
                if (timo < 60)
                        sprintf(xbuf, "%lus", timo);
@@ -240,18 +240,21 @@ static int proc_keys_show(struct seq_file *m, void *v)
                        sprintf(xbuf, "%luw", timo / (60*60*24*7));
        }
 
-#define showflag(KEY, LETTER, FLAG) \
-       (test_bit(FLAG, &(KEY)->flags) ? LETTER : '-')
+       state = key_read_state(key);
+
+#define showflag(FLAGS, LETTER, FLAG) \
+       ((FLAGS & (1 << FLAG)) ? LETTER : '-')
 
+       flags = READ_ONCE(key->flags);
        seq_printf(m, "%08x %c%c%c%c%c%c%c %5d %4s %08x %5d %5d %-9.9s ",
                   key->serial,
-                  showflag(key, 'I', KEY_FLAG_INSTANTIATED),
-                  showflag(key, 'R', KEY_FLAG_REVOKED),
-                  showflag(key, 'D', KEY_FLAG_DEAD),
-                  showflag(key, 'Q', KEY_FLAG_IN_QUOTA),
-                  showflag(key, 'U', KEY_FLAG_USER_CONSTRUCT),
-                  showflag(key, 'N', KEY_FLAG_NEGATIVE),
-                  showflag(key, 'i', KEY_FLAG_INVALIDATED),
+                  state != KEY_IS_UNINSTANTIATED ? 'I' : '-',
+                  showflag(flags, 'R', KEY_FLAG_REVOKED),
+                  showflag(flags, 'D', KEY_FLAG_DEAD),
+                  showflag(flags, 'Q', KEY_FLAG_IN_QUOTA),
+                  showflag(flags, 'U', KEY_FLAG_USER_CONSTRUCT),
+                  state < 0 ? 'N' : '-',
+                  showflag(flags, 'i', KEY_FLAG_INVALIDATED),
                   refcount_read(&key->usage),
                   xbuf,
                   key->perm,
index 86bced9fdbdf22eb60170584d87730e1179a2744..740affd65ee98464e19fc32f830f86a1ad3f24f4 100644 (file)
@@ -77,7 +77,8 @@ int install_user_keyrings(void)
                if (IS_ERR(uid_keyring)) {
                        uid_keyring = keyring_alloc(buf, user->uid, INVALID_GID,
                                                    cred, user_keyring_perm,
-                                                   KEY_ALLOC_IN_QUOTA,
+                                                   KEY_ALLOC_UID_KEYRING |
+                                                       KEY_ALLOC_IN_QUOTA,
                                                    NULL, NULL);
                        if (IS_ERR(uid_keyring)) {
                                ret = PTR_ERR(uid_keyring);
@@ -94,7 +95,8 @@ int install_user_keyrings(void)
                        session_keyring =
                                keyring_alloc(buf, user->uid, INVALID_GID,
                                              cred, user_keyring_perm,
-                                             KEY_ALLOC_IN_QUOTA,
+                                             KEY_ALLOC_UID_KEYRING |
+                                                 KEY_ALLOC_IN_QUOTA,
                                              NULL, NULL);
                        if (IS_ERR(session_keyring)) {
                                ret = PTR_ERR(session_keyring);
@@ -728,7 +730,7 @@ try_again:
 
        ret = -EIO;
        if (!(lflags & KEY_LOOKUP_PARTIAL) &&
-           !test_bit(KEY_FLAG_INSTANTIATED, &key->flags))
+           key_read_state(key) == KEY_IS_UNINSTANTIATED)
                goto invalid_key;
 
        /* check the permissions */
index 63e63a42db3c0aa4b1ed069e03e8e1f8e9139a32..e8036cd0ad5430a87ec2e2ea1496e921ae941b3d 100644 (file)
@@ -595,10 +595,9 @@ int wait_for_key_construction(struct key *key, bool intr)
                          intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
        if (ret)
                return -ERESTARTSYS;
-       if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
-               smp_rmb();
-               return key->reject_error;
-       }
+       ret = key_read_state(key);
+       if (ret < 0)
+               return ret;
        return key_validate(key);
 }
 EXPORT_SYMBOL(wait_for_key_construction);
index afe9d22ab3611f2dc621db0092e1b102e005be78..424e1d90412ea0c40e4e20453f47b566b0b25834 100644 (file)
@@ -73,7 +73,7 @@ static void request_key_auth_describe(const struct key *key,
 
        seq_puts(m, "key:");
        seq_puts(m, key->description);
-       if (key_is_instantiated(key))
+       if (key_is_positive(key))
                seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
 }
 
@@ -120,6 +120,18 @@ static void request_key_auth_revoke(struct key *key)
        }
 }
 
+static void free_request_key_auth(struct request_key_auth *rka)
+{
+       if (!rka)
+               return;
+       key_put(rka->target_key);
+       key_put(rka->dest_keyring);
+       if (rka->cred)
+               put_cred(rka->cred);
+       kfree(rka->callout_info);
+       kfree(rka);
+}
+
 /*
  * Destroy an instantiation authorisation token key.
  */
@@ -129,15 +141,7 @@ static void request_key_auth_destroy(struct key *key)
 
        kenter("{%d}", key->serial);
 
-       if (rka->cred) {
-               put_cred(rka->cred);
-               rka->cred = NULL;
-       }
-
-       key_put(rka->target_key);
-       key_put(rka->dest_keyring);
-       kfree(rka->callout_info);
-       kfree(rka);
+       free_request_key_auth(rka);
 }
 
 /*
@@ -151,22 +155,18 @@ struct key *request_key_auth_new(struct key *target, const void *callout_info,
        const struct cred *cred = current->cred;
        struct key *authkey = NULL;
        char desc[20];
-       int ret;
+       int ret = -ENOMEM;
 
        kenter("%d,", target->serial);
 
        /* allocate a auth record */
-       rka = kmalloc(sizeof(*rka), GFP_KERNEL);
-       if (!rka) {
-               kleave(" = -ENOMEM");
-               return ERR_PTR(-ENOMEM);
-       }
-       rka->callout_info = kmalloc(callout_len, GFP_KERNEL);
-       if (!rka->callout_info) {
-               kleave(" = -ENOMEM");
-               kfree(rka);
-               return ERR_PTR(-ENOMEM);
-       }
+       rka = kzalloc(sizeof(*rka), GFP_KERNEL);
+       if (!rka)
+               goto error;
+       rka->callout_info = kmemdup(callout_info, callout_len, GFP_KERNEL);
+       if (!rka->callout_info)
+               goto error_free_rka;
+       rka->callout_len = callout_len;
 
        /* see if the calling process is already servicing the key request of
         * another process */
@@ -176,8 +176,12 @@ struct key *request_key_auth_new(struct key *target, const void *callout_info,
 
                /* if the auth key has been revoked, then the key we're
                 * servicing is already instantiated */
-               if (test_bit(KEY_FLAG_REVOKED, &cred->request_key_auth->flags))
-                       goto auth_key_revoked;
+               if (test_bit(KEY_FLAG_REVOKED,
+                            &cred->request_key_auth->flags)) {
+                       up_read(&cred->request_key_auth->sem);
+                       ret = -EKEYREVOKED;
+                       goto error_free_rka;
+               }
 
                irka = cred->request_key_auth->payload.data[0];
                rka->cred = get_cred(irka->cred);
@@ -193,8 +197,6 @@ struct key *request_key_auth_new(struct key *target, const void *callout_info,
 
        rka->target_key = key_get(target);
        rka->dest_keyring = key_get(dest_keyring);
-       memcpy(rka->callout_info, callout_info, callout_len);
-       rka->callout_len = callout_len;
 
        /* allocate the auth key */
        sprintf(desc, "%x", target->serial);
@@ -205,32 +207,22 @@ struct key *request_key_auth_new(struct key *target, const void *callout_info,
                            KEY_USR_VIEW, KEY_ALLOC_NOT_IN_QUOTA, NULL);
        if (IS_ERR(authkey)) {
                ret = PTR_ERR(authkey);
-               goto error_alloc;
+               goto error_free_rka;
        }
 
        /* construct the auth key */
        ret = key_instantiate_and_link(authkey, rka, 0, NULL, NULL);
        if (ret < 0)
-               goto error_inst;
+               goto error_put_authkey;
 
        kleave(" = {%d,%d}", authkey->serial, refcount_read(&authkey->usage));
        return authkey;
 
-auth_key_revoked:
-       up_read(&cred->request_key_auth->sem);
-       kfree(rka->callout_info);
-       kfree(rka);
-       kleave("= -EKEYREVOKED");
-       return ERR_PTR(-EKEYREVOKED);
-
-error_inst:
-       key_revoke(authkey);
+error_put_authkey:
        key_put(authkey);
-error_alloc:
-       key_put(rka->target_key);
-       key_put(rka->dest_keyring);
-       kfree(rka->callout_info);
-       kfree(rka);
+error_free_rka:
+       free_request_key_auth(rka);
+error:
        kleave("= %d", ret);
        return ERR_PTR(ret);
 }
index ddfaebf60fc8649cf6159d2cba18e916931a3b4e..98aa89ff7bfd9ed57662116ca455f3a5628ec380 100644 (file)
@@ -1066,7 +1066,7 @@ static int trusted_update(struct key *key, struct key_preparsed_payload *prep)
        char *datablob;
        int ret = 0;
 
-       if (test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+       if (key_is_negative(key))
                return -ENOKEY;
        p = key->payload.data[0];
        if (!p->migratable)
@@ -1147,20 +1147,21 @@ static long trusted_read(const struct key *key, char __user *buffer,
        p = dereference_key_locked(key);
        if (!p)
                return -EINVAL;
-       if (!buffer || buflen <= 0)
-               return 2 * p->blob_len;
-       ascii_buf = kmalloc(2 * p->blob_len, GFP_KERNEL);
-       if (!ascii_buf)
-               return -ENOMEM;
 
-       bufp = ascii_buf;
-       for (i = 0; i < p->blob_len; i++)
-               bufp = hex_byte_pack(bufp, p->blob[i]);
-       if ((copy_to_user(buffer, ascii_buf, 2 * p->blob_len)) != 0) {
+       if (buffer && buflen >= 2 * p->blob_len) {
+               ascii_buf = kmalloc(2 * p->blob_len, GFP_KERNEL);
+               if (!ascii_buf)
+                       return -ENOMEM;
+
+               bufp = ascii_buf;
+               for (i = 0; i < p->blob_len; i++)
+                       bufp = hex_byte_pack(bufp, p->blob[i]);
+               if (copy_to_user(buffer, ascii_buf, 2 * p->blob_len) != 0) {
+                       kzfree(ascii_buf);
+                       return -EFAULT;
+               }
                kzfree(ascii_buf);
-               return -EFAULT;
        }
-       kzfree(ascii_buf);
        return 2 * p->blob_len;
 }
 
index ff001a5dcb2479af78108a0e2451b6ff965cda90..8d5fe9eafb22aef733efc79f09206d3f53567938 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRUSTED_KEY_H
 #define __TRUSTED_KEY_H
 
index 3d8c68eba5160286fa7af79c8da1ead6e6b05236..9f558bedba23a338da5980ab11dd1b716c7b0b67 100644 (file)
@@ -114,7 +114,7 @@ int user_update(struct key *key, struct key_preparsed_payload *prep)
 
        /* attach the new data, displacing the old */
        key->expiry = prep->expiry;
-       if (!test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+       if (key_is_positive(key))
                zap = dereference_key_locked(key);
        rcu_assign_keypointer(key, prep->payload.data[0]);
        prep->payload.data[0] = NULL;
@@ -162,7 +162,7 @@ EXPORT_SYMBOL_GPL(user_destroy);
 void user_describe(const struct key *key, struct seq_file *m)
 {
        seq_puts(m, key->description);
-       if (key_is_instantiated(key))
+       if (key_is_positive(key))
                seq_printf(m, ": %u", key->datalen);
 }
 
index f728728f193bdc0b1a3d578c0f1fa69b016dfabb..94d2b0cf0e7b9cc493e41c3fea9c42376e784268 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/security.h>
index ff5895ede96fec6bb5507b2c6d531e41ca2bed00..c7161f8792b2dc9312df1b600eee8d4adb571482 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for building the SELinux module as part of the kernel tree.
 #
index a5004e9de11a999f56333eed055b9519d7275b39..57d61cf36500f87ad217ccbfec942116f16654f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Access vector cache interface for object managers.
  *
index 37d57dadd476a90d6a1bef5f2104a0057d1dd44f..3bcc72769b87ae10706399c9d84ded642bede79d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Access vector cache interface for the security server.
  *
index 35ffb29a69cb00b34a4de5d722eaee46df310a74..cc35695d97b4a6682702a2405f1ca38a258d9f50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/capability.h>
 
 #define COMMON_FILE_SOCK_PERMS "ioctl", "read", "write", "create", \
index a59b64e3fd02f9d4ca408d29937ddb46b65f63b1..4f93f697f71c5ee0d126de1526ca3259d4ad01f3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* This file is automatically generated.  Do not edit. */
 static const char *initial_sid_to_string[] =
 {
index 28dfb2f93e4dcfcb62fc77e20fe7303295905b48..02f0412d42f24d485ed98bc7ff0c70fd5c7b8f47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Security server interface.
  *
index 36a7ce9e11fff1acb67d1e994ff892dd495175a9..1f173a7a4daa63eb748051897746d17c675592f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * SELinux support for the XFRM LSM hooks
  *
index 33ae2aec4f3617b211c53f96361fd34281dc8005..4e563be9ef5fc1021dc28392209477ff6e3ba4f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A constraint is a condition that must be satisfied in
  * order for one or more permissions to be granted.
index a2c0f37c42aef1ed220dbd3d8dc2088740f548dd..2260c44a568cc4f85bd866491ba2598fa3dd9b49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A security context is a set of security attributes
  * associated with each subject and object controlled
index fc28149a4f2e67ba8293cd0d2863eae484b8a7a3..b6a78b09235c8ac3235191c01375acbf64318f54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the extensible bitmap type.
  *
index da1325dda550e664821e6c33e418227343047dba..edf4fa39c60ab8de0269e609f551ba5041ff8bb8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * An extensible bitmap is a bitmap that supports an
  * arbitrary number of bits.  Extensible bitmaps are
index 686c3917064c5d10dddf7a4c3a6db70136f40624..6bd6dcd954fabaeb36a2561d23c2e4ed58ea4dd5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the hash table type.
  *
index 009fb5e06172d54fafeb1478f43c6251ef8291e4..3e3e42bfd150cbb9f2fd5d5ca4a6aed29c84972b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A hash table (hashtab) maintains associations between
  * key values and datum values.  The type of the key values
index d9dc34f4fadea997902a3e309170a908e89dcbdd..ad982ce8bfa43e1f4b5fa4afa4b44d138b82cb31 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the multi-level security (MLS) policy.
  *
index 0f0a1d65b2ceb3dba1f7fee67dbe1d9841245a9d..131d76266ea545a8124b949c45b3a990d75f0cdb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Multi-level security (MLS) policy operations.
  *
index 47f3702cd596ebcdff6b76b88e776eecadfea2b2..068e0d7809db93cce811462635a4e5bd0caa2873 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Type definitions for the multi-level security (MLS) policy.
  *
index 3d9fa9556b4f97a2f2fa9c1cd252eae3ac2587ad..356bdd36cf6d56a50b2b44d311f92ef3001eaf6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Implementation of the security services.
  *
index 6ae08efc5ae78dfd3a00885dd1ff45bc5952f788..5be31b7af2252fa184a59b2e11750a1ae179b5f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the SID table type.
  *
index de5d0ea583d2535a79a7cde28b4abdc5ad28e9eb..a1a1d2617b6ff7211b0c036007d2bbb25709d794 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A security identifier table (sidtab) is a hash table
  * of security context structures indexed by SID value.
index d1a6745849a7beee47ddc75d372cb26ed3234a1e..dc2ce94165d36a4dd164b4ddacc916f63453236a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Implementation of the symbol table type.
  *
index 0bc12d587d3a20836c41b83d3c0eefd3e230633c..d75fcafe7281f1ab51f7337068c1b1f87c6880ef 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * A symbol table (symtab) maintains associations between symbol
  * strings and datum values.  The type of the datum values
index 319add31b4a4ee7b5464d2a15782289ecb110ce7..286171a16ed255e20c396fca595600488c059c2d 100644 (file)
@@ -1473,7 +1473,7 @@ static int smack_inode_removexattr(struct dentry *dentry, const char *name)
  * @inode: the object
  * @name: attribute name
  * @buffer: where to put the result
- * @alloc: unused
+ * @alloc: duplicate memory
  *
  * Returns the size of the attribute or an error code
  */
@@ -1486,43 +1486,38 @@ static int smack_inode_getsecurity(struct inode *inode,
        struct super_block *sbp;
        struct inode *ip = (struct inode *)inode;
        struct smack_known *isp;
-       int ilen;
-       int rc = 0;
 
-       if (strcmp(name, XATTR_SMACK_SUFFIX) == 0) {
+       if (strcmp(name, XATTR_SMACK_SUFFIX) == 0)
                isp = smk_of_inode(inode);
-               ilen = strlen(isp->smk_known);
-               *buffer = isp->smk_known;
-               return ilen;
-       }
+       else {
+               /*
+                * The rest of the Smack xattrs are only on sockets.
+                */
+               sbp = ip->i_sb;
+               if (sbp->s_magic != SOCKFS_MAGIC)
+                       return -EOPNOTSUPP;
 
-       /*
-        * The rest of the Smack xattrs are only on sockets.
-        */
-       sbp = ip->i_sb;
-       if (sbp->s_magic != SOCKFS_MAGIC)
-               return -EOPNOTSUPP;
+               sock = SOCKET_I(ip);
+               if (sock == NULL || sock->sk == NULL)
+                       return -EOPNOTSUPP;
 
-       sock = SOCKET_I(ip);
-       if (sock == NULL || sock->sk == NULL)
-               return -EOPNOTSUPP;
-
-       ssp = sock->sk->sk_security;
+               ssp = sock->sk->sk_security;
 
-       if (strcmp(name, XATTR_SMACK_IPIN) == 0)
-               isp = ssp->smk_in;
-       else if (strcmp(name, XATTR_SMACK_IPOUT) == 0)
-               isp = ssp->smk_out;
-       else
-               return -EOPNOTSUPP;
+               if (strcmp(name, XATTR_SMACK_IPIN) == 0)
+                       isp = ssp->smk_in;
+               else if (strcmp(name, XATTR_SMACK_IPOUT) == 0)
+                       isp = ssp->smk_out;
+               else
+                       return -EOPNOTSUPP;
+       }
 
-       ilen = strlen(isp->smk_known);
-       if (rc == 0) {
-               *buffer = isp->smk_known;
-               rc = ilen;
+       if (alloc) {
+               *buffer = kstrdup(isp->smk_known, GFP_KERNEL);
+               if (*buffer == NULL)
+                       return -ENOMEM;
        }
 
-       return rc;
+       return strlen(isp->smk_known);
 }
 
 
index 65dbcb2fd850289a192e3b24df50315bf9f3751b..b7c6a7ffc058b42279dd224ca7efc6d42f1859ea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-y = audit.o common.o condition.o domain.o environ.o file.o gc.o group.o load_policy.o memory.o mount.o network.o realpath.o securityfs_if.o tomoyo.o util.o
 
 targets += builtin-policy.h
index 3ffa4f5509d8c873c76cd8a3bb55b517df88537d..d330b060dcff2e7a02c56ca32a0d2973d68ea6e7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/audit.c
  *
index e0fb7505255090069e316e9e9408c34a96f13fe8..21691b99e61f49f1495f0fb49ce15e7c368eeec4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/common.c
  *
index 361e7a284699b519d0a0959bc2b2c88282cd3577..e4097d7994b169746a934243f2db4a51c3ea4a98 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * security/tomoyo/common.h
  *
index 6c4528d4b48f8b5cdfaad0b072fc7afe6f17e1ff..8d0e1b9c9c573b4fac3f8ca78b2c3e715a614eac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/condition.c
  *
index 00d223e9fb37ca2392b98938b2734e14d9e60227..f6758dad981f7f32d8897f4f2c790ea69a168db0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/domain.c
  *
index ad4c6e18a4376f14bf53589b38b531174a098769..7f0a471f19b2b321dfcadafb1d64aa849caa851c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/environ.c
  *
index 223f21ffa632e5f3bb1344f174e75eb50e3d74ab..2a374b4da8f5cec172041876e7dee0c986cd45dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/file.c
  *
index 540bc29e1b5a72ffaba56fab5ca4060a5d5705a1..e22bea811c574b990af47fa583d4fc8a071cb35b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/gc.c
  *
index 944ad77d8fbac2aa376cbd03aeb08001caf9fbfe..21b0cc3a7e1a34ddad1d224826c0edac47ba357d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/group.c
  *
index 078fac0bb4c55d0c5dc4846831b3aed430c1fe52..81b95165205119fb41c6508044c2729e2c48a2b6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/load_policy.c
  *
index 1598b559ac425863f73825303f64d9ab168847b8..12477e0b0a1109f615b0b53c1329f2daeb410452 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/memory.c
  *
index 14b53fb2a0cfef9158ee1eb814349288684ff256..807fd91dbb540605b42bbf7d629586e2f87f684a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/mount.c
  *
index 6c02ac4782477f35c8a79c3289714d3e503cd31d..cd6932e5225c4ff636f16e274c653df37c0b5ce0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/network.c
  *
index a97b275ca3afe476a4ca0d865ef332d3f45aa688..6ff8c21e4fff5edfcfb3fed3bd511d37271120f4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/realpath.c
  *
index 06ab41b1ff286ad4de93e996d15d1b180c48c830..49393c2a3f8bce114eb55eeff40698d44b0514e4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/securityfs_if.c
  *
index d25b705360e068c73922a0d1ca671efe72925636..213b8c593668f260a44e9a6993c42f7a68eb4575 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/tomoyo.c
  *
index 848317fea704feec8d614c09eff8c81ee2612fc0..580b318910f1484f6e3f7e7fdeefc5a5924d36ef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * security/tomoyo/util.c
  *
index 6de45d2c32f759b752e5ec03384915af596bcad4..f2d1d093bcdce876151e1762967c9ba76d1771a2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux sound card driver
 #
 
index c3ee77fc4b2dc4bb5ae60191bea60705edcc4c36..95f4c3849d550cdf2025de590e3de9604101bdea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-aoa-codec-onyx-objs := onyx.o
 snd-aoa-codec-tas-objs := tas.o
 snd-aoa-codec-toonie-objs := toonie.o
index 69b61136fd54c41f3684c689273a7a2341e5feba..770935af66af4d92f9edda22f365e14ffabc659a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This file is only included exactly once!
  *
index 4cfa6757715e34a7310f18e085294806561c289f..77b8e7dc55fd861e6a12f6e290fbfeab82a1dd16 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  This is the program used to generate below table.
 
index a1596e88c718ceb808c15765229a0ddee00cfc51..056d69683b1e94f35990c7d0fc8a31ae4dcaada0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SND_AOA) += snd-aoa.o
 snd-aoa-objs := core.o \
                alsa.o \
index 5b2d51d9976865e3f0b154f0b17f04c0c660a3b1..81da020bddef6ddbfc2d056361302bb36233f0fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/stat.h>
 /* FIX UP */
index 8c0c851d464109819beb296c2624bbec7af131e9..e10d5b1695658085ca50ed09b8763d8103bf337f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 #
index e2066e2ef9f8c10d73297160ef338ea72abffeb0..ee4a4a6b99ba77dab73026df41df852fd48ab559 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 1999,2001 by Jaroslav Kysela <perex@perex.cz>
index fec1dfdb14adfa7c7edc9f7aa2aba35c9e0cb2a5..4490a699030b10725015e323a18a09286ea02db0 100644 (file)
@@ -948,14 +948,13 @@ static const struct file_operations snd_compr_file_ops = {
 static int snd_compress_dev_register(struct snd_device *device)
 {
        int ret = -EINVAL;
-       char str[16];
        struct snd_compr *compr;
 
        if (snd_BUG_ON(!device || !device->device_data))
                return -EBADFD;
        compr = device->device_data;
 
-       pr_debug("reg %s for device %s, direction %d\n", str, compr->name,
+       pr_debug("reg device %s, direction %d\n", compr->name,
                        compr->direction);
        /* register compressed device */
        ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS,
index 10a79453245f3d00d8485dde469984855010791f..ae25edcc3b42ee82e913e50e4a817417622e1622 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
index 3a1cc7b97e468bc19fad2fadfd9fb68053e6bc6d..b719d0bd833ecb6d7560380db5eb3b78a9b040c4 100644 (file)
@@ -547,6 +547,7 @@ struct snd_pcm_mmap_status_x32 {
        u32 pad2; /* alignment */
        struct timespec tstamp;
        s32 suspended_state;
+       s32 pad3;
        struct timespec audio_tstamp;
 } __packed;
 
index 86c8d658a25c05e669374482c0c1ece237b9d14a..08abba3133abddb3f387affa62974e9cc23e7a6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM snd_pcm
 
index 3ddec1b8ae462343d30633929193d352bf56eae3..f18da2050772b81906801cfd46f7044aa1f254bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM snd_pcm
 #define TRACE_INCLUDE_FILE pcm_trace
index 68fd367ac39c034bc41e5486804b58b48a209441..3a2177a7e50c080262c73e40c5109193ace5feaa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
index ea2d0ae85bd367d5ea70068ee74d925a349789c3..d10c780dfd5468137b3b862f6b04e0279d32e3d6 100644 (file)
@@ -663,7 +663,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
        if (atomic)
                read_lock(&grp->list_lock);
        else
-               down_read(&grp->list_mutex);
+               down_read_nested(&grp->list_mutex, hop);
        list_for_each_entry(subs, &grp->list_head, src_list) {
                /* both ports ready? */
                if (atomic_read(&subs->ref_count) != 2)
@@ -1259,6 +1259,7 @@ static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg)
        struct snd_seq_port_info *info = arg;
        struct snd_seq_client_port *port;
        struct snd_seq_port_callback *callback;
+       int port_idx;
 
        /* it is not allowed to create the port for an another client */
        if (info->addr.client != client->number)
@@ -1269,7 +1270,9 @@ static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg)
                return -ENOMEM;
 
        if (client->type == USER_CLIENT && info->kernel) {
-               snd_seq_delete_port(client, port->addr.port);
+               port_idx = port->addr.port;
+               snd_seq_port_unlock(port);
+               snd_seq_delete_port(client, port_idx);
                return -EINVAL;
        }
        if (client->type == KERNEL_CLIENT) {
@@ -1290,6 +1293,7 @@ static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg)
 
        snd_seq_set_port_info(port, info);
        snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port);
+       snd_seq_port_unlock(port);
 
        return 0;
 }
index 0ff7926a5a69ad8dfb2f18a768bf4d9a391c23ee..cda64b489e4200563de5e0bd2f43ea692b8abbce 100644 (file)
@@ -23,8 +23,6 @@
 #include <sound/core.h>
 #include "seq_lock.h"
 
-#if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG)
-
 /* wait until all locks are released */
 void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line)
 {
@@ -41,5 +39,3 @@ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line)
        }
 }
 EXPORT_SYMBOL(snd_use_lock_sync_helper);
-
-#endif
index 54044bc2c9ef24892a7e6747dcd67e92fb01b0f1..a973860ebcd02d52c9c8833bd27a49e9a42276d6 100644 (file)
@@ -1,10 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SND_SEQ_LOCK_H
 #define __SND_SEQ_LOCK_H
 
 #include <linux/sched.h>
 
-#if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG)
-
 typedef atomic_t snd_use_lock_t;
 
 /* initialize lock */
@@ -20,14 +19,4 @@ typedef atomic_t snd_use_lock_t;
 void snd_use_lock_sync_helper(snd_use_lock_t *lock, const char *file, int line);
 #define snd_use_lock_sync(lockp) snd_use_lock_sync_helper(lockp, __BASE_FILE__, __LINE__)
 
-#else /* SMP || CONFIG_SND_DEBUG */
-
-typedef spinlock_t snd_use_lock_t;     /* dummy */
-#define snd_use_lock_init(lockp) /**/
-#define snd_use_lock_use(lockp) /**/
-#define snd_use_lock_free(lockp) /**/
-#define snd_use_lock_sync(lockp) /**/
-
-#endif /* SMP || CONFIG_SND_DEBUG */
-
 #endif /* __SND_SEQ_LOCK_H */
index 0a7020c82bfc76ac295d084fa2d98abe5dc5f647..d21ece9f8d7365e5e621156f1e44b85aa11eb1a1 100644 (file)
@@ -122,7 +122,9 @@ static void port_subs_info_init(struct snd_seq_port_subs_info *grp)
 }
 
 
-/* create a port, port number is returned (-1 on failure) */
+/* create a port, port number is returned (-1 on failure);
+ * the caller needs to unref the port via snd_seq_port_unlock() appropriately
+ */
 struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
                                                int port)
 {
@@ -151,6 +153,7 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
        snd_use_lock_init(&new_port->use_lock);
        port_subs_info_init(&new_port->c_src);
        port_subs_info_init(&new_port->c_dest);
+       snd_use_lock_use(&new_port->use_lock);
 
        num = port >= 0 ? port : 0;
        mutex_lock(&client->ports_mutex);
@@ -165,9 +168,9 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
        list_add_tail(&new_port->list, &p->list);
        client->num_ports++;
        new_port->addr.port = num;      /* store the port number in the port */
+       sprintf(new_port->name, "port-%d", num);
        write_unlock_irqrestore(&client->ports_lock, flags);
        mutex_unlock(&client->ports_mutex);
-       sprintf(new_port->name, "port-%d", num);
 
        return new_port;
 }
index 8d93a4021c78ab58cab236c3b9d170bde8a81cb1..f48a4cd24ffce2d50639e177822bb96b31a93d02 100644 (file)
@@ -77,13 +77,17 @@ static void snd_virmidi_init_event(struct snd_virmidi *vmidi,
  * decode input event and put to read buffer of each opened file
  */
 static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
-                                        struct snd_seq_event *ev)
+                                        struct snd_seq_event *ev,
+                                        bool atomic)
 {
        struct snd_virmidi *vmidi;
        unsigned char msg[4];
        int len;
 
-       read_lock(&rdev->filelist_lock);
+       if (atomic)
+               read_lock(&rdev->filelist_lock);
+       else
+               down_read(&rdev->filelist_sem);
        list_for_each_entry(vmidi, &rdev->filelist, list) {
                if (!vmidi->trigger)
                        continue;
@@ -97,7 +101,10 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
                                snd_rawmidi_receive(vmidi->substream, msg, len);
                }
        }
-       read_unlock(&rdev->filelist_lock);
+       if (atomic)
+               read_unlock(&rdev->filelist_lock);
+       else
+               up_read(&rdev->filelist_sem);
 
        return 0;
 }
@@ -115,7 +122,7 @@ int snd_virmidi_receive(struct snd_rawmidi *rmidi, struct snd_seq_event *ev)
        struct snd_virmidi_dev *rdev;
 
        rdev = rmidi->private_data;
-       return snd_virmidi_dev_receive_event(rdev, ev);
+       return snd_virmidi_dev_receive_event(rdev, ev, true);
 }
 #endif  /*  0  */
 
@@ -130,7 +137,7 @@ static int snd_virmidi_event_input(struct snd_seq_event *ev, int direct,
        rdev = private_data;
        if (!(rdev->flags & SNDRV_VIRMIDI_USE))
                return 0; /* ignored */
-       return snd_virmidi_dev_receive_event(rdev, ev);
+       return snd_virmidi_dev_receive_event(rdev, ev, atomic);
 }
 
 /*
@@ -209,7 +216,6 @@ static int snd_virmidi_input_open(struct snd_rawmidi_substream *substream)
        struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
        struct snd_rawmidi_runtime *runtime = substream->runtime;
        struct snd_virmidi *vmidi;
-       unsigned long flags;
 
        vmidi = kzalloc(sizeof(*vmidi), GFP_KERNEL);
        if (vmidi == NULL)
@@ -223,9 +229,11 @@ static int snd_virmidi_input_open(struct snd_rawmidi_substream *substream)
        vmidi->client = rdev->client;
        vmidi->port = rdev->port;       
        runtime->private_data = vmidi;
-       write_lock_irqsave(&rdev->filelist_lock, flags);
+       down_write(&rdev->filelist_sem);
+       write_lock_irq(&rdev->filelist_lock);
        list_add_tail(&vmidi->list, &rdev->filelist);
-       write_unlock_irqrestore(&rdev->filelist_lock, flags);
+       write_unlock_irq(&rdev->filelist_lock);
+       up_write(&rdev->filelist_sem);
        vmidi->rdev = rdev;
        return 0;
 }
@@ -264,9 +272,11 @@ static int snd_virmidi_input_close(struct snd_rawmidi_substream *substream)
        struct snd_virmidi_dev *rdev = substream->rmidi->private_data;
        struct snd_virmidi *vmidi = substream->runtime->private_data;
 
+       down_write(&rdev->filelist_sem);
        write_lock_irq(&rdev->filelist_lock);
        list_del(&vmidi->list);
        write_unlock_irq(&rdev->filelist_lock);
+       up_write(&rdev->filelist_sem);
        snd_midi_event_free(vmidi->parser);
        substream->runtime->private_data = NULL;
        kfree(vmidi);
@@ -520,6 +530,7 @@ int snd_virmidi_new(struct snd_card *card, int device, struct snd_rawmidi **rrmi
        rdev->rmidi = rmidi;
        rdev->device = device;
        rdev->client = -1;
+       init_rwsem(&rdev->filelist_sem);
        rwlock_init(&rdev->filelist_lock);
        INIT_LIST_HEAD(&rdev->filelist);
        rdev->seq_mode = SNDRV_VIRMIDI_SEQ_DISPATCH;
index 6a437eb661152923b7fc0764850d2fae1f6806b4..59127b6ef39ee97b1abf66767b44a6933fa367e4 100644 (file)
@@ -133,7 +133,8 @@ enum {
 #endif /* CONFIG_X86_X32 */
 };
 
-static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
+static long __snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd,
+                                         unsigned long arg)
 {
        void __user *argp = compat_ptr(arg);
 
@@ -153,7 +154,7 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns
        case SNDRV_TIMER_IOCTL_PAUSE:
        case SNDRV_TIMER_IOCTL_PAUSE_OLD:
        case SNDRV_TIMER_IOCTL_NEXT_DEVICE:
-               return snd_timer_user_ioctl(file, cmd, (unsigned long)argp);
+               return __snd_timer_user_ioctl(file, cmd, (unsigned long)argp);
        case SNDRV_TIMER_IOCTL_GPARAMS32:
                return snd_timer_user_gparams_compat(file, argp);
        case SNDRV_TIMER_IOCTL_INFO32:
@@ -167,3 +168,15 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns
        }
        return -ENOIOCTLCMD;
 }
+
+static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd,
+                                       unsigned long arg)
+{
+       struct snd_timer_user *tu = file->private_data;
+       long ret;
+
+       mutex_lock(&tu->ioctl_lock);
+       ret = __snd_timer_user_ioctl_compat(file, cmd, arg);
+       mutex_unlock(&tu->ioctl_lock);
+       return ret;
+}
index 6c58e6f73a013bd33e47cc9a7ea8c1b46b7f17df..e43af18d43836367e263356eb2377cc4e08e8368 100644 (file)
@@ -484,3 +484,34 @@ void snd_ctl_sync_vmaster(struct snd_kcontrol *kcontrol, bool hook_only)
                master->hook(master->hook_private_data, master->val);
 }
 EXPORT_SYMBOL_GPL(snd_ctl_sync_vmaster);
+
+/**
+ * snd_ctl_apply_vmaster_slaves - Apply function to each vmaster slave
+ * @kctl: vmaster kctl element
+ * @func: function to apply
+ * @arg: optional function argument
+ *
+ * Apply the function @func to each slave kctl of the given vmaster kctl.
+ * Returns 0 if successful, or a negative error code.
+ */
+int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
+                                int (*func)(struct snd_kcontrol *, void *),
+                                void *arg)
+{
+       struct link_master *master;
+       struct link_slave *slave;
+       int err;
+
+       master = snd_kcontrol_chip(kctl);
+       err = master_init(master);
+       if (err < 0)
+               return err;
+       list_for_each_entry(slave, &master->slaves, list) {
+               err = func(&slave->slave, arg);
+               if (err < 0)
+                       return err;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(snd_ctl_apply_vmaster_slaves);
index 1a8440c8b1386e5ef4f413c8826b1f80ca93a951..615558a281c8f7f08f422babd4c31c366326a9a6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index d72b1e7b51c4a9cd2180540871e18df1448075d6..83bca9f1fbdf341756494c7e72715f9d4b481e5e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index c8eaa433d71a787256f0396972ba6170ac5907f8..6e86a4092b4c1bf8fc61f1017b2bce3aaf60e4d5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index fc7a2dc410a1b6577e380e5bd869430edac69130..036ad3c99a4341ce3bfff264054b2c39d67c6476 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PC-Speaker driver for Linux
  *
index d692749b8c9b00338526a4958839eafd3343fbf0..e80079b38a56b69a857f76b5c42b7c7e6230db72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * PC-Speaker driver for Linux
  *
index 2f5a35f38ce1b3b1c3426cecff3d714a9dae74de..8f0f05bbc0819e7f187975e6a1c4ddd4c4672f4c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PC-Speaker driver for Linux
  *
index f1e1defc09b1e70beaf32921a3e6124aeab06747..be2990451bcd4e659000f2edcb312b96aa22db51 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * PC-Speaker driver for Linux
  *
index 1b98fa3fa3d460602b3a15871fa8f5bca68c8d1d..44a7b510b75bfc7c485c8d60d32324a52a497014 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # To find a header included by define_trace.h.
 CFLAGS_amdtp-stream.o  := -I$(src)
 
index b56e61fc997d3808ab8460b4efe1567425c0ab78..06d2807835818e90238c31a09d947dcd8ff988c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_AMDTP_AM824_H_INCLUDED
 #define SOUND_FIREWIRE_AMDTP_AM824_H_INCLUDED
 
index ed6eafd109924013dbeaa231999899b7030e0008..a608dae8334870ac2d83aae5ef5808a278a87bc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_AMDTP_H_INCLUDED
 #define SOUND_FIREWIRE_AMDTP_H_INCLUDED
 
index dd454867240d27ce21a62a5553657b002793aae3..14bc84c51ef5822af89e172e50498173453af23c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \
                  bebob_pcm.o bebob_hwdep.o bebob_terratec.o \
                  bebob_yamaha_terratec.o bebob_focusrite.o bebob_maudio.o \
index ebcb48484fca30ec8f906720032a1146590ada1d..b60b415caa8fdd5d6392de4d98100e5b7bb151e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_CMP_H_INCLUDED
 #define SOUND_FIREWIRE_CMP_H_INCLUDED
 
index 47f2c0a6f5d9b3b566fdc95757145acadaccec16..15a484b0529837ba9b197a86121391a2650bda0b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_DICE_INTERFACE_H_INCLUDED
 #define SOUND_FIREWIRE_DICE_INTERFACE_H_INCLUDED
 
index 63ae4f7ce3af9b72ee3a7edfc969585044444719..512f7c40903ace761bafd7b5eb5af346d824c28c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_FCP_H_INCLUDED
 #define SOUND_FIREWIRE_FCP_H_INCLUDED
 
index 5a9af7c61657e5429f35a0dd6c844d3af6d069c6..34f85e9e8830d90236d402865f8467bad3e68401 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_ISO_RESOURCES_H_INCLUDED
 #define SOUND_FIREWIRE_ISO_RESOURCES_H_INCLUDED
 
index eef70922ed89b2f0fd1ec86c87272f69e0080571..dc815dc3933e81cc51981544399b411ff6100af4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_LIB_H_INCLUDED
 #define SOUND_FIREWIRE_LIB_H_INCLUDED
 
index 728f586e754b64437ba05db96e70e0c0b66a6292..7c502d35103c0671c7fd7958f2c8211d06ac5751 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS_amdtp-motu.o    := -I$(src)
 
 snd-firewire-motu-objs := motu.o amdtp-motu.o motu-transaction.o motu-stream.o \
index 6513c5cb6ea92aa86fdd36e3972bddf9f0081053..99e963c271e13f06e3ac9114be584a2670666347 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
 #define SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
 
index 3b9bedee2fa45051641cd2e97d2163309e2e4e44..e4e726f2ce98b69a75ed81f38293bf7ad65f1749 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o hdac_sysfs.o \
        hdac_regmap.o hdac_controller.o hdac_stream.o array.o hdmi_chmap.o
 
index 978dc1801b3aceb8e2245b819097954c76595d77..f6d2985b2520cf1130a9a6c7d05781b6eafd44fb 100644 (file)
@@ -284,6 +284,11 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus)
                dev_dbg(bus->dev, "HDA capability ID: 0x%x\n",
                        (cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF);
 
+               if (cur_cap == -1) {
+                       dev_dbg(bus->dev, "Invalid capability reg read\n");
+                       break;
+               }
+
                switch ((cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF) {
                case AZX_ML_CAP_ID:
                        dev_dbg(bus->dev, "Found ML capability\n");
index 42d61bf41969c2176f1e10842e0c8e651d202a23..3c2d45ee6ab8f8e2c7cb8d2d925052ad8474e2d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * sysfs support for HD-audio core device
  */
index 0d5bb159d538ef53dcddb1914a3b4068c90f4795..7258fa8ce26829e4597834c2a51b70a1d26c5277 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Local helper macros and functions for HD-audio core drivers
  */
index e27e2c0b7b17f456601111c5c748e3025bd9a15e..70af6c8150898e2633e2ea9b55e796f3b974018c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM hda
 
index 36879bf88700bbed235aca6a13577ee5ed106038..09978855e08e060d5d25f3f651163a43eecf97f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 5526b03b95a2e786b8539e609c23bb58de61f453..1a4ce1236146665de8199014e1b9d4c63f29d5d6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
index 9a15f1497b1081cf1a785acd8b8ffbbd0170cd33..5eaddbf4a71236ff1349c9650a4414ac653df7ed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 6cd4ee03754a1c1f9488eca10978dbd4f37f0efd..c6f32ffd342058afa2542ea9c582d162d76567d5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 2171c0aa2f6256f3877c6da4722ca24ddc5f1e92..ec231a7b1d5e7c6980049f4cf1b6df49f52ade76 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 snd-msnd-lib-objs := msnd.o msnd_midi.o msnd_pinnacle_mixer.o
 snd-msnd-pinnacle-objs := msnd_pinnacle.o
index b4d894db257a02869ccaf22cddad24a6e11a72c2..a9dcdeb502bd9da4201e57996c84f164923670d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 08b9fb9746584e3e31b4abde1077e859b1f0f7eb..f174a5b3c8e4a7f6a3f18268a2492a1c598e986c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 9bdbbde2173e4fd36948c0dcbd50d5ed2804ffab..6564eace474961359ddbe16a780311221b9bbcb9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for the Linux sound card driver
 #
 # 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
index b95ebe28d42609a15b78f96a26461278f334c8ab..390f03e13d095c3af6dbc8ac8edb9b76ad2a4f48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #include <linux/interrupt.h>
 
index b59109eb0db49fb693083f5fccf4d3a942cdcab8..26c04ce04d71866ed6fc737247e8840bf206f31b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
index 01019f06fa91f21a954abe6d8fe195bd305d6143..c1c52b479da264904353d7a7532008885c7d4b12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _dmasound_h_
 /*
  *  linux/sound/oss/dmasound/dmasound.h
index 041ef5c52bc269389fd3249dbcff0e0bc5ffdd43..f76d729b0196065602eef9e8844ace48f5230281 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * hex2hex reads stdin in Intel HEX format and produces an
  * (unsigned char) array which contains the bytes and writes it
index 3353e5a67c248dfcd041a7413357cb4d6aeaaa35..240d0c719f1ea979d55d82b5e7abd4fd06ec39b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static unsigned char ctrl_def_values[128] =
 {
        0x40,0x00,0x40,0x40,  0x40,0x40,0x40,0x7f,      /*   0 to   7 */
index b64ddd6c4abc045706b0fa81d24864962dc78ee2..1cf676c7510e5d60c51c616bb7c4668b52014038 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 int midi_synth_ioctl (int dev,
            unsigned int cmd, void __user * arg);
 int midi_synth_kill_note (int dev, int channel, int note, int velocity);
index 0ad1e9ee74f7f4b5b1c983761a6c562072b22eee..6beb8c2ae4056a00967cf52b3c5485db3a955ef0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*     From uart401.c */
 int probe_uart401 (struct address_info *hw_config, struct module *owner);
index 0bf89e1d679c07f5688d445305ab0f614044f82f..16f3a069b85c78865929c7bd302b163a79feb36b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define ALLOW_SELECT
 #undef NO_INLINE_ASM
 #define SHORT_BANNERS
index d19f757dbd79676ab48d1667c8ed38d7a98434b1..57f4762383091cb4cff7ba3f95f7639be4f6d111 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /*     From pas_card.c */
 int pas_set_intr(int mask);
index 77e8891ce33376b30cce8a86d4ca1aafc0ef6e4d..bb1d18709b3649008203828cc22c2f793ce3be9f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define DSP_RESET      (devc->base + 0x6)
 #define DSP_READ       (devc->base + 0xA)
 #define DSP_WRITE      (devc->base + 0xC)
index 57f7d25a2cd30004446b99659be0943d02d19e3c..17e3f14318cda985c5e934e73744804e23dac7f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef FKS_LOGGING
 #undef FKS_TEST
 
index 38aa072e01f29270cb3a97389f165c66cf245d17..1c741212bcfc0aa9b51b791fe399804e9a48d03c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Created: 9-Jan-1999 Rolf Fokkens
  */
index a20fc925a5cea142889d24e7dc71c8341a724125..fd17d44d13dd00d47ced8085db4943205d4eae50 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/wait.h>
 
 /*
index 87d8ad4a0340e763a018254886a1484c8696606a..bcd3f7340ef7c0e2701280133c1d9051566ac9b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  *     DMA buffer calls
  */
index 2be465277ba0fd48ec9a75d26f2cce4d6c8a7dd4..ebcbded0e8c244e0a839b9bc4cb592b08611d854 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/fs.h>
 
 /**
index a73e3dd39f9a558bee683e1de5316a3e1329d9ef..9535399312374183ee3f3c9588efe253fe3d4a8c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static unsigned short semitone_tuning[24] =
 {
 /*   0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983, 
index 0ff8c0a3bda07e9264204493978fc79a0c8df3b3..ee898a0f78cec2d58f3da2d28b21778d8bdb1f3d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 static unsigned char ulaw_dsp[] = {
      3,    7,   11,   15,   19,   23,   27,   31,
     35,   39,   43,   47,   51,   55,   59,   63,
index 08e2185ee816794656f8cf9a83a80706859aec84..f4fc2bed07f81c818e277f8eccb594d6e11c8000 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 typedef struct vmidi_devc {
           int dev;
 
index dac4ca910d951070e789edfe6a13ee1964ba4764..f18d74b26483bb31ac11f73603b51c4a597641fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * linux/sound/oss/waveartist.h
  *
index 2e434523fedff673c4c130ec91e71cf1b1a96c94..f4c29a2e32e82efd22f02338b4fcee24f7b899f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Hewlett-Packard Harmony audio driver
  * Copyright (C) 2004, Kyle McMartin <kyle@parisc-linux.org>
  */
index 54fe325e3aa5160267e2ac83ba5d8efd255f08fc..04cac746913982d5c30701c121d8d0c7ff333768 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 5e6dad5341a1eb7822fdd0596e90be27507ae416..d6e8d6c19adc1cb3e5418636ae62b150b1a9b066 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Analog Devices 1889 audio driver
  * Copyright (C) 2004, Kyle McMartin <kyle@parisc-linux.org>
  */
index 6623ab11003814fe8ebafcee1f08f4184370a46a..016bc55457e39538fd2e3cac4736fa3418e17585 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /** HPI Version Definitions
 Development releases have odd minor version.
 Production releases have even minor version.
index f9b57647b3197de7eaa8b8268bf8aa960bcf64db..1de05383126aabf9ef7c6286f37158ff0e56d494 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include "hpi_internal.h"
 #include "hpimsginit.h"
index 7e3aa50b21f9d2d2f5ca49f3f9a779ab1276ee4a..5badd08e1d69cc12657410359255ab691eff62f0 100644 (file)
@@ -103,6 +103,7 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        void __user *puhr;
        union hpi_message_buffer_v1 *hm;
        union hpi_response_buffer_v1 *hr;
+       u16 msg_size;
        u16 res_max_size;
        u32 uncopied_bytes;
        int err = 0;
@@ -127,22 +128,25 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        }
 
        /* Now read the message size and data from user space.  */
-       if (get_user(hm->h.size, (u16 __user *)puhm)) {
+       if (get_user(msg_size, (u16 __user *)puhm)) {
                err = -EFAULT;
                goto out;
        }
-       if (hm->h.size > sizeof(*hm))
-               hm->h.size = sizeof(*hm);
+       if (msg_size > sizeof(*hm))
+               msg_size = sizeof(*hm);
 
        /* printk(KERN_INFO "message size %d\n", hm->h.wSize); */
 
-       uncopied_bytes = copy_from_user(hm, puhm, hm->h.size);
+       uncopied_bytes = copy_from_user(hm, puhm, msg_size);
        if (uncopied_bytes) {
                HPI_DEBUG_LOG(ERROR, "uncopied bytes %d\n", uncopied_bytes);
                err = -EFAULT;
                goto out;
        }
 
+       /* Override h.size in case it is changed between two userspace fetches */
+       hm->h.size = msg_size;
+
        if (get_user(res_max_size, (u16 __user *)puhr)) {
                err = -EFAULT;
                goto out;
index d0a66bc5d4a7e3c45d6aa56e404da0e0e491da2e..78ab11562f4dea3588df9ac1ce8c8bc3fb78ee5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-au8810-objs := au8810.o
 snd-au8820-objs := au8820.o
 snd-au8830-objs := au8830.o
index 1b2e34069eb3a6f53cba42cf7ac77d6f24591c8c..b2bfa50bfe30e18bdf19e4b36e243b24b37149f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "au8810.h"
 #include "au88x0.h"
 static const struct pci_device_id snd_vortex_ids[] = {
index 79fbee3845ebb4f1b8a471620308c821ac44e9c1..94f11032067ea1f7b32fc9e9214a85aa59a0e357 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
     Aureal Advantage Soundcard driver.
  */
index 74c53fa5f06bd93e1b6e36f48cb432f79b6e750a..dbc2263b49c6e41cd4c44f495480cb248cb6c6dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "au8820.h"
 #include "au88x0.h"
 static const struct pci_device_id snd_vortex_ids[] = {
index cafdb9668a341de9c7ec75816b7edd65e06e584d..8a128e8febbbd241f85212e807b00fb9b80d88b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
     Aureal Vortex Soundcard driver.
 
index 56f675aad3ad9b1d8a2160b8587477336a2a99c2..e963c4e2f026c4c51fc20527e4fca5898b8415cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "au8830.h"
 #include "au88x0.h"
 static const struct pci_device_id snd_vortex_ids[] = {
index 999b29ab34ad4d7ad38db5e7e720b0dd201d5a7b..40f671ffd45a97887eb88bb0843b7aa550a9d578 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
     Aureal Vortex Soundcard driver.
 
index 474cd0046294e2bbec8da83abf84a1f91d95d40f..797cdae1db986005d3bad50e7fcb26deca6c284a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AU88X0_EQ_H
 #define AU88X0_EQ_H
 
index ce8dca8ce1e2ddd7963bbb5522a178683ab844d5..49a52d298b1af8ec88cb37494fe748c297ddaa7a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Data structs */
 
 static u16 asEqCoefsZeros[50] = {
index a58298cfe7e04f03ce681b4d73540ef688929b9d..60dd8a091bc39fdd7d4090344f0205f609612ab6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Vortex Mixer support.
  *
index 38d98f88a95c06c9c017abe2ebe33030869c178b..7b2cffad8643539d2f42d7ed122febbe761e7bc4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /***************************************************************************
  *           WT register offsets.
  *
index 6f46b97650cca39d45beaaa40680123b40f9bfb3..6f902278449941ad09472c6c7d2849d56e7e37e6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_AZT3328_H
 #define __SOUND_AZT3328_H
 
index 0579daa6221571581d7c869aa7248c86529d7b3a..f4fcdf93f3c8ed15c77283bca997d36276e2434d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_CS5535AUDIO_H
 #define __SOUND_CS5535AUDIO_H
 
index 979348229291165eb4ded2c5a66efe273a79e712..9c5cb403b64635466ac2aea5b18293328899a491 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Timer handling
  */
index 1361de77e0cd2edd61574776e85da80e03208f53..4865b8fe743438907402be99d88ffcaa118bea40 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA Echoaudio soundcard drivers
 # Copyright (c) 2003 by Giuliano Pochini <pochini@shiny.it>
index 7326695bca3371d192904d6d351dd4a87144e720..d68f99e076a879def2241365e0dd78b3aeaa5611 100644 (file)
@@ -1272,11 +1272,11 @@ static int snd_echo_mixer_info(struct snd_kcontrol *kcontrol,
 
        chip = snd_kcontrol_chip(kcontrol);
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 1;
        uinfo->value.integer.min = ECHOGAIN_MINOUT;
        uinfo->value.integer.max = ECHOGAIN_MAXOUT;
        uinfo->dimen.d[0] = num_busses_out(chip);
        uinfo->dimen.d[1] = num_busses_in(chip);
-       uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1];
        return 0;
 }
 
@@ -1344,11 +1344,11 @@ static int snd_echo_vmixer_info(struct snd_kcontrol *kcontrol,
 
        chip = snd_kcontrol_chip(kcontrol);
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 1;
        uinfo->value.integer.min = ECHOGAIN_MINOUT;
        uinfo->value.integer.max = ECHOGAIN_MAXOUT;
        uinfo->dimen.d[0] = num_busses_out(chip);
        uinfo->dimen.d[1] = num_pipes_out(chip);
-       uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1];
        return 0;
 }
 
@@ -1728,6 +1728,7 @@ static int snd_echo_vumeters_info(struct snd_kcontrol *kcontrol,
                                  struct snd_ctl_elem_info *uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
+       uinfo->count = 96;
        uinfo->value.integer.min = ECHOGAIN_MINOUT;
        uinfo->value.integer.max = 0;
 #ifdef ECHOCARD_HAS_VMIXER
@@ -1737,7 +1738,6 @@ static int snd_echo_vumeters_info(struct snd_kcontrol *kcontrol,
 #endif
        uinfo->dimen.d[1] = 16; /* 16 channels */
        uinfo->dimen.d[2] = 2;  /* 0=level, 1=peak */
-       uinfo->count = uinfo->dimen.d[0] * uinfo->dimen.d[1] * uinfo->dimen.d[2];
        return 0;
 }
 
index 29b44ca2701056a6f56310d8e55c0c856215afed..17d5527be319430bf7120a062ce73b5f915d59bb 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 6d83c6e0396aebfcdc57b644b6c2af4e5d0449b4..b57432f000568eb1b40f5131464218ba1f07bcff 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-hda-intel-objs := hda_intel.o
 snd-hda-tegra-objs := hda_tegra.o
 
index 44b1e15682b92ca6e794b19c50dce3780921ed7d..1b48a8c19d28e36ba6cf27da78a8c5dc33fe3ebe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Helper functions for Dell Mic Mute LED control;
  * to be included from codec driver
  */
index 3db26c451837cf0e2893d1071c1a699465d89e1b..a0989d231fd00fa94259ccea2ddc397336d633b4 100644 (file)
@@ -1803,36 +1803,6 @@ static int check_slave_present(struct hda_codec *codec,
        return 1;
 }
 
-/* guess the value corresponding to 0dB */
-static int get_kctl_0dB_offset(struct hda_codec *codec,
-                              struct snd_kcontrol *kctl, int *step_to_check)
-{
-       int _tlv[4];
-       const int *tlv = NULL;
-       int val = -1;
-
-       if ((kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) &&
-           kctl->tlv.c == snd_hda_mixer_amp_tlv) {
-               get_ctl_amp_tlv(kctl, _tlv);
-               tlv = _tlv;
-       } else if (kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_READ)
-               tlv = kctl->tlv.p;
-       if (tlv && tlv[0] == SNDRV_CTL_TLVT_DB_SCALE) {
-               int step = tlv[3];
-               step &= ~TLV_DB_SCALE_MUTE;
-               if (!step)
-                       return -1;
-               if (*step_to_check && *step_to_check != step) {
-                       codec_err(codec, "Mismatching dB step for vmaster slave (%d!=%d)\n",
--                                 *step_to_check, step);
-                       return -1;
-               }
-               *step_to_check = step;
-               val = -tlv[2] / step;
-       }
-       return val;
-}
-
 /* call kctl->put with the given value(s) */
 static int put_kctl_with_value(struct snd_kcontrol *kctl, int val)
 {
@@ -1847,19 +1817,58 @@ static int put_kctl_with_value(struct snd_kcontrol *kctl, int val)
        return 0;
 }
 
-/* initialize the slave volume with 0dB */
-static int init_slave_0dB(struct hda_codec *codec,
-                         void *data, struct snd_kcontrol *slave)
+struct slave_init_arg {
+       struct hda_codec *codec;
+       int step;
+};
+
+/* initialize the slave volume with 0dB via snd_ctl_apply_vmaster_slaves() */
+static int init_slave_0dB(struct snd_kcontrol *kctl, void *_arg)
 {
-       int offset = get_kctl_0dB_offset(codec, slave, data);
-       if (offset > 0)
-               put_kctl_with_value(slave, offset);
+       struct slave_init_arg *arg = _arg;
+       int _tlv[4];
+       const int *tlv = NULL;
+       int step;
+       int val;
+
+       if (kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
+               if (kctl->tlv.c != snd_hda_mixer_amp_tlv) {
+                       codec_err(arg->codec,
+                                 "Unexpected TLV callback for slave %s:%d\n",
+                                 kctl->id.name, kctl->id.index);
+                       return 0; /* ignore */
+               }
+               get_ctl_amp_tlv(kctl, _tlv);
+               tlv = _tlv;
+       } else if (kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_READ)
+               tlv = kctl->tlv.p;
+
+       if (!tlv || tlv[0] != SNDRV_CTL_TLVT_DB_SCALE)
+               return 0;
+
+       step = tlv[3];
+       step &= ~TLV_DB_SCALE_MUTE;
+       if (!step)
+               return 0;
+       if (arg->step && arg->step != step) {
+               codec_err(arg->codec,
+                         "Mismatching dB step for vmaster slave (%d!=%d)\n",
+                         arg->step, step);
+               return 0;
+       }
+
+       arg->step = step;
+       val = -tlv[2] / step;
+       if (val > 0) {
+               put_kctl_with_value(kctl, val);
+               return val;
+       }
+
        return 0;
 }
 
-/* unmute the slave */
-static int init_slave_unmute(struct hda_codec *codec,
-                            void *data, struct snd_kcontrol *slave)
+/* unmute the slave via snd_ctl_apply_vmaster_slaves() */
+static int init_slave_unmute(struct snd_kcontrol *slave, void *_arg)
 {
        return put_kctl_with_value(slave, 1);
 }
@@ -1919,9 +1928,13 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
        /* init with master mute & zero volume */
        put_kctl_with_value(kctl, 0);
        if (init_slave_vol) {
-               int step = 0;
-               map_slaves(codec, slaves, suffix,
-                          tlv ? init_slave_0dB : init_slave_unmute, &step);
+               struct slave_init_arg arg = {
+                       .codec = codec,
+                       .step = 0,
+               };
+               snd_ctl_apply_vmaster_slaves(kctl,
+                                            tlv ? init_slave_0dB : init_slave_unmute,
+                                            &arg);
        }
 
        if (ctl_ret)
index 3e18d99bfb70fb4e82bbf81b38745991ef350845..bf48304e230aa90df0386f0d065033bf926b47e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM hda_controller
 #define TRACE_INCLUDE_FILE hda_controller_trace
index 0922d8b1b17d0cc33929abb695b7d8e5e77b9241..73a7adfa192d00ed65c033ed338bd7d60ccaf483 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM hda_intel
 #define TRACE_INCLUDE_FILE hda_intel_trace
index 28cb7f98982ec7b4145c6056d2d5266f21c442bd..3b8b7d78f9e0d77187299ae6a1f6657a456816d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  */
 
index 2b64fabd5faa5f1e85681592910fd61ad2aa89f9..c19c81d230bd7423b4153d2266a45e09333f8714 100644 (file)
@@ -906,6 +906,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
                              hda_nid_t pin_nid, u32 stream_tag, int format)
 {
        struct hdmi_spec *spec = codec->spec;
+       unsigned int param;
        int err;
 
        err = spec->ops.pin_hbr_setup(codec, pin_nid, is_hbr_format(format));
@@ -915,6 +916,26 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
                return err;
        }
 
+       if (is_haswell_plus(codec)) {
+
+               /*
+                * on recent platforms IEC Coding Type is required for HBR
+                * support, read current Digital Converter settings and set
+                * ICT bitfield if needed.
+                */
+               param = snd_hda_codec_read(codec, cvt_nid, 0,
+                                          AC_VERB_GET_DIGI_CONVERT_1, 0);
+
+               param = (param >> 16) & ~(AC_DIG3_ICT);
+
+               /* on recent platforms ICT mode is required for HBR support */
+               if (is_hbr_format(format))
+                       param |= 0x1;
+
+               snd_hda_codec_write(codec, cvt_nid, 0,
+                                   AC_VERB_SET_DIGI_CONVERT_3, param);
+       }
+
        snd_hda_codec_setup_stream(codec, cvt_nid, stream_tag, 0, format);
        return 0;
 }
index 0ce71111b4e3ec0fd58940b27a0638cc9d483fd1..546d515f3c1fb810641375e5fcf548ef4e360807 100644 (file)
@@ -327,6 +327,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
        case 0x10ec0215:
        case 0x10ec0225:
        case 0x10ec0233:
+       case 0x10ec0236:
        case 0x10ec0255:
        case 0x10ec0256:
        case 0x10ec0282:
@@ -911,6 +912,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
        { 0x10ec0275, 0x1028, 0, "ALC3260" },
        { 0x10ec0899, 0x1028, 0, "ALC3861" },
        { 0x10ec0298, 0x1028, 0, "ALC3266" },
+       { 0x10ec0236, 0x1028, 0, "ALC3204" },
        { 0x10ec0256, 0x1028, 0, "ALC3246" },
        { 0x10ec0225, 0x1028, 0, "ALC3253" },
        { 0x10ec0295, 0x1028, 0, "ALC3254" },
@@ -3930,6 +3932,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
                alc_process_coef_fw(codec, coef0255_1);
                alc_process_coef_fw(codec, coef0255);
                break;
+       case 0x10ec0236:
        case 0x10ec0256:
                alc_process_coef_fw(codec, coef0256);
                alc_process_coef_fw(codec, coef0255);
@@ -4028,6 +4031,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
        };
 
        switch (codec->core.vendor_id) {
+       case 0x10ec0236:
        case 0x10ec0255:
        case 0x10ec0256:
                alc_write_coef_idx(codec, 0x45, 0xc489);
@@ -4160,6 +4164,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
                alc_process_coef_fw(codec, alc225_pre_hsmode);
                alc_process_coef_fw(codec, coef0225);
                break;
+       case 0x10ec0236:
        case 0x10ec0255:
        case 0x10ec0256:
                alc_process_coef_fw(codec, coef0255);
@@ -4256,6 +4261,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
        case 0x10ec0255:
                alc_process_coef_fw(codec, coef0255);
                break;
+       case 0x10ec0236:
        case 0x10ec0256:
                alc_process_coef_fw(codec, coef0256);
                break;
@@ -4366,6 +4372,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
        case 0x10ec0255:
                alc_process_coef_fw(codec, coef0255);
                break;
+       case 0x10ec0236:
        case 0x10ec0256:
                alc_process_coef_fw(codec, coef0256);
                break;
@@ -4451,6 +4458,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
        };
 
        switch (codec->core.vendor_id) {
+       case 0x10ec0236:
        case 0x10ec0255:
        case 0x10ec0256:
                alc_process_coef_fw(codec, coef0255);
@@ -4705,6 +4713,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
        case 0x10ec0255:
                alc_process_coef_fw(codec, alc255fw);
                break;
+       case 0x10ec0236:
        case 0x10ec0256:
                alc_process_coef_fw(codec, alc256fw);
                break;
@@ -6419,6 +6428,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
                ALC225_STANDARD_PINS,
                {0x12, 0xb7a60130},
                {0x1b, 0x90170110}),
+       SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+               {0x12, 0x90a60140},
+               {0x14, 0x90170110},
+               {0x21, 0x02211020}),
+       SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+               {0x12, 0x90a60140},
+               {0x14, 0x90170150},
+               {0x21, 0x02211020}),
        SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
                {0x14, 0x90170110},
                {0x21, 0x02211020}),
@@ -6806,6 +6823,7 @@ static int patch_alc269(struct hda_codec *codec)
        case 0x10ec0255:
                spec->codec_variant = ALC269_TYPE_ALC255;
                break;
+       case 0x10ec0236:
        case 0x10ec0256:
                spec->codec_variant = ALC269_TYPE_ALC256;
                spec->shutup = alc256_shutup;
@@ -7857,6 +7875,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
        HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
        HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
        HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269),
+       HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
        HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
        HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
        HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),
index 4d9d320a79711f5e95deac5f32c2ac0f741ff21d..65bb3ac6af4cd6d95561414560d7e8116c2cc6cb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Helper functions for Thinkpad LED control;
  * to be included from codec driver
  */
index 7e50c1324556df83e7dbb2f3cd8a7a11ed5eb7f4..1196f22a9b452eb8be68bd464a4e003b52c9b2bd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index d9f8534fd92ee527f12e337fd0cca53ed7a77004..9c22d4e73ee3b625bea4f1dc59c3d4f8e2c55cce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_JULI_H
 #define __SOUND_JULI_H
 
index eafd03a8f4b5edea4416abd3d18318da2e861538..f5a97d987a6ff00689adb64d01a2f26da50c2ba6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_MAYA44_H
 #define __SOUND_MAYA44_H
 
index 16a53b459c728a6833744ad704e93dc9bc8a3ef9..7bfd769ba98262536d898b79fbbb927373a4df09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_PRODIGY192_H
 #define __SOUND_PRODIGY192_H
 
index 858e5fd0eebb4767c06eafaf5dcfa5297c0d1a79..e6ce335ae87e5a84689c7de565f6d32b7fb5106b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_PSC724_H
 #define __SOUND_PSC724_H
 
index 80809b72439abb5b018d2d6bd8bafab92a232ae0..a1c2fe27185dc723230fbcd172cd8d9b027e039b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_QTET_H
 #define __SOUND_QTET_H
 
index 0b0a9dabdcfbd77e4916f492b95f384a5f73a639..61348ecef1e09e5606385b5b7fe1920d1bef3658 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_SE_H
 #define __SOUND_SE_H
 
index 5b390952d0e4dcdf6fffd562c9c26a02da9407d9..58f9f17a258ad7679e313eba07704a74230ca919 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_STAC946X_H
 #define __SOUND_STAC946X_H
 
index 423c1a204c0bb9e1ee799aed303b8c7706c97fc9..1cfcbde15f42710102597481cdb687896ffe1a83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SOUND_WTM_H
 #define __SOUND_WTM_H
 
index 747d5d6ccfa0aea6aaa46d36d6cfaffb55f0a963..c757252119b1dbe93dd9310aa3dfa7ddbb9f9006 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define NM_TOTAL_COEFF_COUNT 0x3158
 
 static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { 
index ab085d7536616fb3bb3dab86ed88a69432e841ea..0dfc4f8409922c9074f9febd02985ad01845d318 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-oxygen-lib-objs := oxygen_io.o oxygen_lib.o oxygen_mixer.o oxygen_pcm.o
 snd-oxygen-objs := oxygen.o xonar_dg_mixer.o xonar_dg.o
 snd-se6x-objs := se6x.o
index 551c1cf8e2e063dc2245a0126364c66790a6748c..a51223461b11df5ffda6c9a2aa78905dd5070362 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef AK4396_H_INCLUDED
 #define AK4396_H_INCLUDED
 
index 1445967996763039f391575844353bee414ebe56..7efb119d17637a99a80163498c7b2fb281469fd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CM9780_H_INCLUDED
 #define CM9780_H_INCLUDED
 
index c3501bdb5edc8de5b98686fa90a63e8424aada3f..aca04794ce283442809d707398a4617f34deeec4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CS2000_H_INCLUDED
 #define CS2000_H_INCLUDED
 
index 99098657695a4f4748bfb8cdac7a8984cc39ce98..bb9f2c5b58190b09fb04a721bddc5471bdd06429 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define CS4245_CHIP_ID         0x01
 #define CS4245_POWER_CTRL      0x02
 #define CS4245_DAC_CTRL_1      0x03
index 6a4fedf5e1ec9817a78059eea446c242344a8e7b..1aef15e04dfbe69de2996cfa04a5f31f92225565 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* register 01h */
 #define CS4362A_PDN            0x01
 #define CS4362A_DAC1_DIS       0x02
index 5faf5efc8826a0335050d96b69bde85c99d173c0..76cb9d7af0d7d68bebe6dc5d2a6199047491b71b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* register 1 */
 #define CS4398_REV_MASK                0x07
 #define CS4398_PART_MASK       0xf8
index 293d0b9a50c3fbdde4ec73a93939b80286dc648d..06bf7e5744d03dd705863c7a22c647ec8b1b9e2b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef OXYGEN_H_INCLUDED
 #define OXYGEN_H_INCLUDED
 
index 8c191badaae8cf5077ed55fd6849aab52fbf448b..eca9d943f5c79d1b560e97f9aedd670adc355385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef OXYGEN_REGS_H_INCLUDED
 #define OXYGEN_REGS_H_INCLUDED
 
index 698bf46c710c88c873f1b112bf7b383d4ca3bbfb..34d07dd2d22e506562f28587f5c17791b93ab2ac 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PCM1796_H_INCLUDED
 #define PCM1796_H_INCLUDED
 
index e0e849a7eaeb3c246055c57eac93aa6d3245015f..be83ad49dbb1359c89633fe1d51fbaa33e8b39e0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WM8766_H_INCLUDED
 #define WM8766_H_INCLUDED
 
index 8c23e315ae66d69a11c128d536c10d83b272cc22..21b932566598f9d3647d43e90c86bb5efd83958b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WM8785_H_INCLUDED
 #define WM8785_H_INCLUDED
 
index 0434c207e811a00e51b4c465617e7e299defbb9a..3e373880c1878eea64da61490b2b7af759e9cb0f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef XONAR_H_INCLUDED
 #define XONAR_H_INCLUDED
 
index d461df357aa15f203b2b60e5de98d5da864d79ea..7a1e8f9c48e7641f3c8d28e88fb6946bf92b0c33 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef XONAR_DG_H_INCLUDED
 #define XONAR_DG_H_INCLUDED
 
index dcba560402058e2153d5935db01ac84a21eabd5d..a3351447ddc00a3d4bc6d5ecc74e4a034976e121 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index ef8d85d58b02f21ca71cfbd6d832c701caecae12..549ec6a31a98df8c19986ceec7cde88d0fcc4467 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* volume tables, taken from TAS3001c data manual */
 /* volume gain values */
 /* 0 = -70 dB, 175 = 18.0 dB in 0.5 dB step */
index c0abad2067e14a07feb3eee54209a3467517040c..d22758165496c966e7797e5ac2a2b446cd21d972 100644 (file)
@@ -36,6 +36,9 @@ config SND_SOC_COMPRESS
 config SND_SOC_TOPOLOGY
        bool
 
+config SND_SOC_ACPI
+       tristate
+
 # All the supported SoCs
 source "sound/soc/adi/Kconfig"
 source "sound/soc/amd/Kconfig"
index 39c27a58158db38c3f4db2a72af842747f7ef830..5327f4d6c668b6e6180849cd60e5d7de969089e1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o
 snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o
 snd-soc-core-$(CONFIG_SND_SOC_COMPRESS) += soc-compress.o
@@ -14,6 +15,12 @@ ifneq ($(CONFIG_SND_SOC_AC97_BUS),)
 snd-soc-core-objs += soc-ac97.o
 endif
 
+ifneq ($(CONFIG_SND_SOC_ACPI),)
+snd-soc-acpi-objs := soc-acpi.o
+endif
+
+obj-$(CONFIG_SND_SOC_ACPI) += snd-soc-acpi.o
+
 obj-$(CONFIG_SND_SOC)  += snd-soc-core.o
 obj-$(CONFIG_SND_SOC)  += codecs/
 obj-$(CONFIG_SND_SOC)  += generic/
index 330832ef4e5e57e8c66114d6cc2c4773e64f7b53..9d338216c5ae8f9b16979beffa74230f33b075cd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ACP_HW_H
 #define __ACP_HW_H
 
index 67e10cbd4ed70a39c536371f3be977022a5673e0..4440646416e8754271f25d365ea9f43cc4e9c17c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # AT91 Platform Support
 snd-soc-atmel-pcm-pdc-objs := atmel-pcm-pdc.o
 snd-soc-atmel-pcm-dma-objs := atmel-pcm-dma.o
index 73f8fdd1ca830db8f76d4dd90b634dbbaa3bd041..0f2e25aeb458972e95720cec67b728165a391789 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_CLASSD_H_
 #define __ATMEL_CLASSD_H_
 
index 4527ac741919298f881e2b6f9a7b7f3f9221e9cf..1dd35187102c12df4374777dcfb23721d7b387d4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ATMEL_PDMIC_H_
 #define __ATMEL_PDMIC_H_
 
index 920710514ea07baaaa734fb55fefe1a96ca92215..33183d7fe0577b20a80275d2e631d65b66bf56d3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Au1200/Au1550 PSC audio
 snd-soc-au1xpsc-dbdma-objs := dbdma2.o
 snd-soc-au1xpsc-i2s-objs := psc-i2s.o
index f21e948b2e9b0223128df261fd5d880afdb13642..ebeb6a9cedd2af6784228d5a09ede5e3c3b41365 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Blackfin Platform Support
 snd-bf5xx-ac97-objs := bf5xx-ac97-pcm.o
 snd-bf5xx-i2s-objs := bf5xx-i2s-pcm.o
index 5514146cbdf0ebd5dd4fc7499680745eab8b36aa..bfb8dc409f534e36db3a7cb356001990ee8cf991 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # EP93xx Platform Support
 snd-soc-ep93xx-objs                            := ep93xx-pcm.o
 snd-soc-ep93xx-i2s-objs                                := ep93xx-i2s.o
index 77c18189c9adb72244b91a5e657fb0393afc9117..05018b7ca72bdd7219cd64ba91525df7fc1c6e2f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-88pm860x-objs := 88pm860x-codec.o
 snd-soc-ab8500-codec-objs := ab8500-codec.o
 snd-soc-ac97-objs := ac97.o
index 939b5f37762f1fde4884738e0f11f37039214093..bf5947b35390bbc9d9dbbdd662ae974e01ab2455 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SOUND_SOC_CODECS_ADAU_PLL_H
 #define SOUND_SOC_CODECS_ADAU_PLL_H
 
index c6ab5530760cda8cab40fb8d87c0647c3f377f73..56320d5e32d82c761ebe8235467b7b748a64f244 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ADAU1373_H__
 #define __ADAU1373_H__
 
index 2c1bd27638648796dd89e117613578655429232d..6758f789b712cd32af6940ef501619a5af6b8502 100644 (file)
@@ -90,6 +90,27 @@ static int adau17x1_pll_event(struct snd_soc_dapm_widget *w,
        return 0;
 }
 
+static int adau17x1_adc_fixup(struct snd_soc_dapm_widget *w,
+       struct snd_kcontrol *kcontrol, int event)
+{
+       struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+       struct adau *adau = snd_soc_codec_get_drvdata(codec);
+
+       /*
+        * If we are capturing, toggle the ADOSR bit in Converter Control 0 to
+        * avoid losing SNR (workaround from ADI). This must be done after
+        * the ADC(s) have been enabled. According to the data sheet, it is
+        * normally illegal to set this bit when the sampling rate is 96 kHz,
+        * but according to ADI it is acceptable for this workaround.
+        */
+       regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
+               ADAU17X1_CONVERTER0_ADOSR, ADAU17X1_CONVERTER0_ADOSR);
+       regmap_update_bits(adau->regmap, ADAU17X1_CONVERTER0,
+               ADAU17X1_CONVERTER0_ADOSR, 0);
+
+       return 0;
+}
+
 static const char * const adau17x1_mono_stereo_text[] = {
        "Stereo",
        "Mono Left Channel (L+R)",
@@ -121,7 +142,8 @@ static const struct snd_soc_dapm_widget adau17x1_dapm_widgets[] = {
        SND_SOC_DAPM_MUX("Right DAC Mode Mux", SND_SOC_NOPM, 0, 0,
                &adau17x1_dac_mode_mux),
 
-       SND_SOC_DAPM_ADC("Left Decimator", NULL, ADAU17X1_ADC_CONTROL, 0, 0),
+       SND_SOC_DAPM_ADC_E("Left Decimator", NULL, ADAU17X1_ADC_CONTROL, 0, 0,
+                          adau17x1_adc_fixup, SND_SOC_DAPM_POST_PMU),
        SND_SOC_DAPM_ADC("Right Decimator", NULL, ADAU17X1_ADC_CONTROL, 1, 0),
        SND_SOC_DAPM_DAC("Left DAC", NULL, ADAU17X1_DAC_CONTROL0, 0, 0),
        SND_SOC_DAPM_DAC("Right DAC", NULL, ADAU17X1_DAC_CONTROL0, 1, 0),
index bf04b7efee4084cf77fa934eadf6ab7a3506b1ad..eaf8f933bab8ae60c22475dbaaf6adf771474654 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ADAU17X1_H__
 #define __ADAU17X1_H__
 
@@ -129,5 +130,7 @@ bool adau17x1_has_dsp(struct adau *adau);
 
 #define ADAU17X1_CONVERTER0_CONVSR_MASK                0x7
 
+#define ADAU17X1_CONVERTER0_ADOSR              BIT(3)
+
 
 #endif
index 9adad8eefdc9ff5081c636efa3ca61a4ebd2d4ad..290283a9149efe63994a95cae171a4b651f304cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _CS4271_PRIV_H
 #define _CS4271_PRIV_H
 
index 8930322d712b7a60def8148c3cceab7a17a03f22..9109f6b5b045a80f9812c41aa64f4d1b12336c12 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * es8328.h  --  ES8328 ALSA SoC Audio driver
  */
index e824d47cc22b0fd3cc2cfe8de4491530cd182bd5..f3b4f4dfae6ad29cd9e7b34b38b54580ddea43b6 100644 (file)
@@ -942,7 +942,8 @@ static int hdac_hdmi_create_pin_port_muxs(struct hdac_ext_device *edev,
        if (!se)
                return -ENOMEM;
 
-       sprintf(kc_name, "Pin %d port %d Input", pin->nid, port->id);
+       snprintf(kc_name, NAME_SIZE, "Pin %d port %d Input",
+                                               pin->nid, port->id);
        kc->name = devm_kstrdup(&edev->hdac.dev, kc_name, GFP_KERNEL);
        if (!kc->name)
                return -ENOMEM;
@@ -1452,6 +1453,8 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
        int i, num_nodes;
        struct hdac_device *hdac = &edev->hdac;
        struct hdac_hdmi_priv *hdmi = edev->private_data;
+       struct hdac_hdmi_cvt *temp_cvt, *cvt_next;
+       struct hdac_hdmi_pin *temp_pin, *pin_next;
        int ret;
 
        hdac_hdmi_skl_enable_all_pins(hdac);
@@ -1481,32 +1484,54 @@ static int hdac_hdmi_parse_and_map_nid(struct hdac_ext_device *edev,
                case AC_WID_AUD_OUT:
                        ret = hdac_hdmi_add_cvt(edev, nid);
                        if (ret < 0)
-                               return ret;
+                               goto free_widgets;
                        break;
 
                case AC_WID_PIN:
                        ret = hdac_hdmi_add_pin(edev, nid);
                        if (ret < 0)
-                               return ret;
+                               goto free_widgets;
                        break;
                }
        }
 
        hdac->end_nid = nid;
 
-       if (!hdmi->num_pin || !hdmi->num_cvt)
-               return -EIO;
+       if (!hdmi->num_pin || !hdmi->num_cvt) {
+               ret = -EIO;
+               goto free_widgets;
+       }
 
        ret = hdac_hdmi_create_dais(hdac, dais, hdmi, hdmi->num_cvt);
        if (ret) {
                dev_err(&hdac->dev, "Failed to create dais with err: %d\n",
                                                        ret);
-               return ret;
+               goto free_widgets;
        }
 
        *num_dais = hdmi->num_cvt;
+       ret = hdac_hdmi_init_dai_map(edev);
+       if (ret < 0)
+               goto free_widgets;
+
+       return ret;
+
+free_widgets:
+       list_for_each_entry_safe(temp_cvt, cvt_next, &hdmi->cvt_list, head) {
+               list_del(&temp_cvt->head);
+               kfree(temp_cvt->name);
+               kfree(temp_cvt);
+       }
+
+       list_for_each_entry_safe(temp_pin, pin_next, &hdmi->pin_list, head) {
+               for (i = 0; i < temp_pin->num_ports; i++)
+                       temp_pin->ports[i].pin = NULL;
+               kfree(temp_pin->ports);
+               list_del(&temp_pin->head);
+               kfree(temp_pin);
+       }
 
-       return hdac_hdmi_init_dai_map(edev);
+       return ret;
 }
 
 static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
@@ -1894,6 +1919,9 @@ static void hdac_hdmi_set_chmap(struct hdac_device *hdac, int pcm_idx,
        struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
        struct hdac_hdmi_port *port;
 
+       if (!pcm)
+               return;
+
        if (list_empty(&pcm->port_list))
                return;
 
@@ -1912,6 +1940,9 @@ static bool is_hdac_hdmi_pcm_attached(struct hdac_device *hdac, int pcm_idx)
        struct hdac_hdmi_priv *hdmi = edev->private_data;
        struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
 
+       if (!pcm)
+               return false;
+
        if (list_empty(&pcm->port_list))
                return false;
 
@@ -1925,6 +1956,9 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
        struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
        struct hdac_hdmi_port *port;
 
+       if (!pcm)
+               return 0;
+
        if (list_empty(&pcm->port_list))
                return 0;
 
@@ -1978,6 +2012,9 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
        hdmi_priv->chmap.ops.is_pcm_attached = is_hdac_hdmi_pcm_attached;
        hdmi_priv->chmap.ops.get_spk_alloc = hdac_hdmi_get_spk_alloc;
 
+       if (!hdac_id)
+               return -ENODEV;
+
        if (hdac_id->driver_data)
                hdmi_priv->drv_data =
                        (struct hdac_hdmi_drv_data *)hdac_id->driver_data;
index dfc3a9cf719963a3fdb3bbda7293895609638016..b5b57a5cbbfdaa3d09e689785652972c7212459d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __HDAC_HDMI_H__
 #define __HDAC_HDMI_H__
 
index da759c6c7501ade051b6889d0901a80bce56b175..44bb2404198dac7312a602d6d462515efa5cb240 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Driver of Inno Codec for rk3036 by Rockchip Inc.
  *
index 13bcfb1ef9b423ceb5fa2ae222340eccaed2ed69..f5075d1f79e6360abef58526908f351b341546b1 100644 (file)
@@ -2115,7 +2115,7 @@ static void max98090_pll_work(struct work_struct *work)
        if (!snd_soc_codec_is_active(codec))
                return;
 
-       dev_info(codec->dev, "PLL unlocked\n");
+       dev_info_ratelimited(codec->dev, "PLL unlocked\n");
 
        /* Toggle shutdown OFF then ON */
        snd_soc_update_bits(codec, M98090_REG_DEVICE_SHUTDOWN,
index 549c269acc7dfd0a084c333f08076b77390d1c79..a42f8ebb96701d1a5e392465ad00db73a3b83f00 100644 (file)
 #define CDC_A_MICB_1_VAL               (0xf141)
 #define MICB_MIN_VAL 1600
 #define MICB_STEP_SIZE 50
-#define MICB_VOLTAGE_REGVAL(v)         ((v - MICB_MIN_VAL)/MICB_STEP_SIZE)
+#define MICB_VOLTAGE_REGVAL(v)         (((v - MICB_MIN_VAL)/MICB_STEP_SIZE) << 3)
 #define MICB_1_VAL_MICB_OUT_VAL_MASK   GENMASK(7, 3)
 #define MICB_1_VAL_MICB_OUT_VAL_V2P70V ((0x16)  << 3)
 #define MICB_1_VAL_MICB_OUT_VAL_V1P80V ((0x4)  << 3)
@@ -349,8 +349,9 @@ static void pm8916_wcd_analog_micbias_enable(struct snd_soc_codec *codec)
                            | MICB_1_CTL_EXT_PRECHARG_EN_ENABLE);
 
        if (wcd->micbias_mv) {
-               snd_soc_write(codec, CDC_A_MICB_1_VAL,
-                             MICB_VOLTAGE_REGVAL(wcd->micbias_mv));
+               snd_soc_update_bits(codec, CDC_A_MICB_1_VAL,
+                                   MICB_1_VAL_MICB_OUT_VAL_MASK,
+                                   MICB_VOLTAGE_REGVAL(wcd->micbias_mv));
                /*
                 * Special headset needs MICBIAS as 2.7V so wait for
                 * 50 msec for the MICBIAS to reach 2.7 volts.
index 66df8f810f0d740772a62d965466358012d91d4f..a10a724eb448f4d06bffb034fbc86c68ccecb94d 100644 (file)
@@ -238,7 +238,7 @@ static const struct soc_enum rx_mix2_inp1_chain_enum = SOC_ENUM_SINGLE(
 static const struct soc_enum rx2_mix1_inp_enum[] = {
        SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B1_CTL, 0, 6, rx_mix1_text),
        SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B1_CTL, 3, 6, rx_mix1_text),
-       SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B1_CTL, 0, 6, rx_mix1_text),
+       SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B2_CTL, 0, 6, rx_mix1_text),
 };
 
 /* RX2 MIX2 */
@@ -249,7 +249,7 @@ static const struct soc_enum rx2_mix2_inp1_chain_enum = SOC_ENUM_SINGLE(
 static const struct soc_enum rx3_mix1_inp_enum[] = {
        SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B1_CTL, 0, 6, rx_mix1_text),
        SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B1_CTL, 3, 6, rx_mix1_text),
-       SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B1_CTL, 0, 6, rx_mix1_text),
+       SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B2_CTL, 0, 6, rx_mix1_text),
 };
 
 /* DEC */
index ed6e5373916c390fb15dfc9efd943c9c55f7d819..12f2ecf3a4feeb3a6133012b33b5b10cad33999f 100644 (file)
@@ -145,9 +145,8 @@ done:
        mutex_unlock(&rt5514_dsp->dma_lock);
 }
 
-static irqreturn_t rt5514_spi_irq(int irq, void *data)
+static void rt5514_schedule_copy(struct rt5514_dsp *rt5514_dsp)
 {
-       struct rt5514_dsp *rt5514_dsp = data;
        u8 buf[8];
 
        rt5514_dsp->get_size = 0;
@@ -180,6 +179,13 @@ static irqreturn_t rt5514_spi_irq(int irq, void *data)
        if (rt5514_dsp->buf_base && rt5514_dsp->buf_limit &&
                rt5514_dsp->buf_rp && rt5514_dsp->buf_size)
                schedule_delayed_work(&rt5514_dsp->copy_work, 0);
+}
+
+static irqreturn_t rt5514_spi_irq(int irq, void *data)
+{
+       struct rt5514_dsp *rt5514_dsp = data;
+
+       rt5514_schedule_copy(rt5514_dsp);
 
        return IRQ_HANDLED;
 }
@@ -199,12 +205,19 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream,
        struct rt5514_dsp *rt5514_dsp =
                        snd_soc_platform_get_drvdata(rtd->platform);
        int ret;
+       u8 buf[8];
 
        mutex_lock(&rt5514_dsp->dma_lock);
        ret = snd_pcm_lib_alloc_vmalloc_buffer(substream,
                        params_buffer_bytes(hw_params));
        rt5514_dsp->substream = substream;
        rt5514_dsp->dma_offset = 0;
+
+       /* Read IRQ status and schedule copy accordingly. */
+       rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, sizeof(buf));
+       if (buf[0] & RT5514_IRQ_STATUS_BIT)
+               rt5514_schedule_copy(rt5514_dsp);
+
        mutex_unlock(&rt5514_dsp->dma_lock);
 
        return ret;
index a6434ee6ff037c11c945a3358a90070de316b09c..c1a36647c1197f925985a623ffe52336fd167c68 100644 (file)
@@ -20,6 +20,9 @@
 #define RT5514_BUFFER_VOICE_BASE       0x18000200
 #define RT5514_BUFFER_VOICE_LIMIT      0x18000204
 #define RT5514_BUFFER_VOICE_WP         0x1800020c
+#define RT5514_IRQ_CTRL                        0x18002094
+
+#define RT5514_IRQ_STATUS_BIT          (0x1 << 5)
 
 /* SPI Command */
 enum {
index 0945d212b8dca9d34d19b273d9075977075964e1..d7956ababd11775b0b9d04552faa68f2fadd2545 100644 (file)
@@ -338,39 +338,6 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
                                fw = NULL;
                        }
 
-                       if (rt5514->model_buf && rt5514->model_len) {
-#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
-                               int ret;
-
-                               ret = rt5514_spi_burst_write(0x4ff80000,
-                                       rt5514->model_buf,
-                                       ((rt5514->model_len / 8) + 1) * 8);
-                               if (ret) {
-                                       dev_err(codec->dev,
-                                               "Model load failed %d\n", ret);
-                                       return ret;
-                               }
-#else
-                               dev_err(codec->dev,
-                                       "No SPI driver for loading firmware\n");
-#endif
-                       } else {
-                               request_firmware(&fw, RT5514_FIRMWARE3,
-                                                codec->dev);
-                               if (fw) {
-#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
-                                       rt5514_spi_burst_write(0x4ff80000,
-                                               fw->data,
-                                               ((fw->size/8)+1)*8);
-#else
-                                       dev_err(codec->dev,
-                                               "No SPI driver to load fw\n");
-#endif
-                                       release_firmware(fw);
-                                       fw = NULL;
-                               }
-                       }
-
                        /* DSP run */
                        regmap_write(rt5514->i2c_regmap, 0x18002f00,
                                0x00055148);
@@ -385,34 +352,6 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-static int rt5514_hotword_model_put(struct snd_kcontrol *kcontrol,
-               const unsigned int __user *bytes, unsigned int size)
-{
-       struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
-       struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component);
-       struct snd_soc_codec *codec = rt5514->codec;
-       int ret = 0;
-
-       if (rt5514->model_buf || rt5514->model_len < size) {
-               if (rt5514->model_buf)
-                       devm_kfree(codec->dev, rt5514->model_buf);
-               rt5514->model_buf = devm_kmalloc(codec->dev, size, GFP_KERNEL);
-               if (!rt5514->model_buf) {
-                       ret = -ENOMEM;
-                       goto done;
-               }
-       }
-
-       /* Skips the TLV header. */
-       bytes += 2;
-
-       if (copy_from_user(rt5514->model_buf, bytes, size))
-               ret = -EFAULT;
-done:
-       rt5514->model_len = (ret ? 0 : size);
-       return ret;
-}
-
 static const struct snd_kcontrol_new rt5514_snd_controls[] = {
        SOC_DOUBLE_TLV("MIC Boost Volume", RT5514_ANA_CTRL_MICBST,
                RT5514_SEL_BSTL_SFT, RT5514_SEL_BSTR_SFT, 8, 0, bst_tlv),
@@ -424,8 +363,6 @@ static const struct snd_kcontrol_new rt5514_snd_controls[] = {
                adc_vol_tlv),
        SOC_SINGLE_EXT("DSP Voice Wake Up", SND_SOC_NOPM, 0, 1, 0,
                rt5514_dsp_voice_wake_up_get, rt5514_dsp_voice_wake_up_put),
-       SND_SOC_BYTES_TLV("Hotword Model", 0x8504,
-               NULL, rt5514_hotword_model_put),
 };
 
 /* ADC Mixer*/
index 803311cb7e2a075aa405847a673b31cac66afc6a..2dc40e6d8b3f69835ded69ac71012cb765ac0a36 100644 (file)
 
 #define RT5514_FIRMWARE1       "rt5514_dsp_fw1.bin"
 #define RT5514_FIRMWARE2       "rt5514_dsp_fw2.bin"
-#define RT5514_FIRMWARE3       "rt5514_dsp_fw3.bin"
 
 /* System Clock Source */
 enum {
@@ -282,8 +281,6 @@ struct rt5514_priv {
        int pll_in;
        int pll_out;
        int dsp_enabled;
-       u8 *model_buf;
-       unsigned int model_len;
 };
 
 #endif /* __RT5514_H__ */
index c94e94fe8297877c75f929498628b5d5adf4b654..0e5f54a9bc7efdf1db73307030310b21472c862c 100644 (file)
@@ -98,7 +98,7 @@ static const struct reg_default rt5616_reg[] = {
        { 0x8e, 0x0004 },
        { 0x8f, 0x1100 },
        { 0x90, 0x0000 },
-       { 0x91, 0x0000 },
+       { 0x91, 0x0c00 },
        { 0x92, 0x0000 },
        { 0x93, 0x2000 },
        { 0x94, 0x0200 },
index 13401581b0dfb18c6ed094e45e2155e871ac1982..8a6b99a48c7c0f215aad8b6ead15759b2517f2b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __RTCODEC5631_H__
 #define __RTCODEC5631_H__
 
index 71216db15eab8811775275575b573754b85889b5..fa66b11df8d447d1a41af835d085d76afca2ba5e 100644 (file)
@@ -2744,7 +2744,8 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
                SND_SOC_DAPM_PRE_PMU),
        SND_SOC_DAPM_PGA_S("HP Amp", 1, SND_SOC_NOPM, 0, 0, rt5659_hp_event,
                SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
-       SND_SOC_DAPM_PGA("LOUT Amp", SND_SOC_NOPM, 0, 0, NULL, 0),
+       SND_SOC_DAPM_PGA_S("LOUT Amp", 1,  RT5659_PWR_ANLG_1, RT5659_PWR_LM_BIT,
+               0,  NULL, 0),
 
        SND_SOC_DAPM_SUPPLY("Charge Pump", SND_SOC_NOPM, 0, 0,
                rt5659_charge_pump_event, SND_SOC_DAPM_PRE_PMU |
@@ -3208,6 +3209,7 @@ static const struct snd_soc_dapm_route rt5659_dapm_routes[] = {
        { "LOUT R MIX", "OUTVOL R Switch", "OUTVOL R" },
        { "LOUT Amp", NULL, "LOUT L MIX" },
        { "LOUT Amp", NULL, "LOUT R MIX" },
+       { "LOUT Amp", NULL, "Charge Pump" },
        { "LOUT Amp", NULL, "SYS CLK DET" },
        { "LOUT L Playback", "Switch", "LOUT Amp" },
        { "LOUT R Playback", "Switch", "LOUT Amp" },
index ab9e0ebff5a7ffe8c24a026441538c6bd877a733..e45b895d8279e42ea8bbac880f5be31a669f0206 100644 (file)
@@ -1639,7 +1639,8 @@ static irqreturn_t rt5663_irq(int irq, void *data)
 {
        struct rt5663_priv *rt5663 = data;
 
-       dev_dbg(rt5663->codec->dev, "%s IRQ queue work\n", __func__);
+       dev_dbg(regmap_get_device(rt5663->regmap), "%s IRQ queue work\n",
+               __func__);
 
        queue_delayed_work(system_wq, &rt5663->jack_detect_work,
                msecs_to_jiffies(250));
index 629b85e75409383df910d448eabb97b2e8b5dc8e..1f2879b7a080fb3da354442fca099f828d03c801 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Texas Instruments TLV320AIC26 low power audio CODEC
  * register definitions
index e41ab38c6f69bfbebcb1ce24e145e2f6020c2dd2..664618c2571cf74ddcdacf0431f856231cd42794 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UDA134X_CODEC_H
 #define _UDA134X_CODEC_H
 
index 4478b40c86e3191ccdad133c33b2d0b1f17272b7..91811aa158d804fc70429824757cb92e2d5d213b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WM8993_H
 #define WM8993_H
 
index 44f447136e224d3206839cbf1dee1a62143cae9f..4b64bb46eb21bb426d153e3dc119fc3396e16fbf 100644 (file)
@@ -101,7 +101,7 @@ static int wm8998_asrc_ev(struct snd_soc_dapm_widget *w,
        return 0;
 }
 
-static int wm8998_in1mux_put(struct snd_kcontrol *kcontrol,
+static int wm8998_inmux_put(struct snd_kcontrol *kcontrol,
                            struct snd_ctl_elem_value *ucontrol)
 {
        struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol);
@@ -109,84 +109,38 @@ static int wm8998_in1mux_put(struct snd_kcontrol *kcontrol,
        struct wm8998_priv *wm8998 = snd_soc_codec_get_drvdata(codec);
        struct arizona *arizona = wm8998->core.arizona;
        struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
-       unsigned int mux, inmode;
-       unsigned int mode_val, src_val;
+       unsigned int mode_reg, mode_index;
+       unsigned int mux, inmode, src_val, mode_val;
 
        mux = ucontrol->value.enumerated.item[0];
        if (mux > 1)
                return -EINVAL;
 
-       /* L and R registers have same shift and mask */
-       inmode = arizona->pdata.inmode[2 * mux];
-       src_val = mux << ARIZONA_IN1L_SRC_SHIFT;
-       if (inmode & ARIZONA_INMODE_SE)
-               src_val |= 1 << ARIZONA_IN1L_SRC_SE_SHIFT;
-
-       switch (arizona->pdata.inmode[0]) {
-       case ARIZONA_INMODE_DMIC:
-               if (mux)
-                       mode_val = 0;   /* B always analogue */
-               else
-                       mode_val = 1 << ARIZONA_IN1_MODE_SHIFT;
-
-               snd_soc_update_bits(codec, ARIZONA_IN1L_CONTROL,
-                                   ARIZONA_IN1_MODE_MASK, mode_val);
-
-               /* IN1A is digital so L and R must change together */
-               /* src_val setting same for both registers */
-               snd_soc_update_bits(codec,
-                                   ARIZONA_ADC_DIGITAL_VOLUME_1L,
-                                   ARIZONA_IN1L_SRC_MASK |
-                                   ARIZONA_IN1L_SRC_SE_MASK, src_val);
-               snd_soc_update_bits(codec,
-                                   ARIZONA_ADC_DIGITAL_VOLUME_1R,
-                                   ARIZONA_IN1R_SRC_MASK |
-                                   ARIZONA_IN1R_SRC_SE_MASK, src_val);
+       switch (e->reg) {
+       case ARIZONA_ADC_DIGITAL_VOLUME_2L:
+               mode_reg = ARIZONA_IN2L_CONTROL;
+               mode_index = 1 + (2 * mux);
                break;
        default:
-               /* both analogue */
-               snd_soc_update_bits(codec,
-                                   e->reg,
-                                   ARIZONA_IN1L_SRC_MASK |
-                                   ARIZONA_IN1L_SRC_SE_MASK,
-                                   src_val);
+               mode_reg = ARIZONA_IN1L_CONTROL;
+               mode_index = (2 * mux);
                break;
        }
 
-       return snd_soc_dapm_mux_update_power(dapm, kcontrol,
-                                            ucontrol->value.enumerated.item[0],
-                                            e, NULL);
-}
-
-static int wm8998_in2mux_put(struct snd_kcontrol *kcontrol,
-                           struct snd_ctl_elem_value *ucontrol)
-{
-       struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol);
-       struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
-       struct wm8998_priv *wm8998 = snd_soc_codec_get_drvdata(codec);
-       struct arizona *arizona = wm8998->core.arizona;
-       struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
-       unsigned int mux, inmode, src_val, mode_val;
-
-       mux = ucontrol->value.enumerated.item[0];
-       if (mux > 1)
-               return -EINVAL;
-
-       inmode = arizona->pdata.inmode[1 + (2 * mux)];
+       inmode = arizona->pdata.inmode[mode_index];
        if (inmode & ARIZONA_INMODE_DMIC)
-               mode_val = 1 << ARIZONA_IN2_MODE_SHIFT;
+               mode_val = 1 << ARIZONA_IN1_MODE_SHIFT;
        else
                mode_val = 0;
 
-       src_val = mux << ARIZONA_IN2L_SRC_SHIFT;
+       src_val = mux << ARIZONA_IN1L_SRC_SHIFT;
        if (inmode & ARIZONA_INMODE_SE)
-               src_val |= 1 << ARIZONA_IN2L_SRC_SE_SHIFT;
+               src_val |= 1 << ARIZONA_IN1L_SRC_SE_SHIFT;
 
-       snd_soc_update_bits(codec, ARIZONA_IN2L_CONTROL,
-                           ARIZONA_IN2_MODE_MASK, mode_val);
+       snd_soc_update_bits(codec, mode_reg, ARIZONA_IN1_MODE_MASK, mode_val);
 
-       snd_soc_update_bits(codec, ARIZONA_ADC_DIGITAL_VOLUME_2L,
-                           ARIZONA_IN2L_SRC_MASK | ARIZONA_IN2L_SRC_SE_MASK,
+       snd_soc_update_bits(codec, e->reg,
+                           ARIZONA_IN1L_SRC_MASK | ARIZONA_IN1L_SRC_SE_MASK,
                            src_val);
 
        return snd_soc_dapm_mux_update_power(dapm, kcontrol,
@@ -216,14 +170,14 @@ static SOC_ENUM_SINGLE_DECL(wm8998_in2mux_enum,
 
 static const struct snd_kcontrol_new wm8998_in1mux[2] = {
        SOC_DAPM_ENUM_EXT("IN1L Mux", wm8998_in1muxl_enum,
-                         snd_soc_dapm_get_enum_double, wm8998_in1mux_put),
+                         snd_soc_dapm_get_enum_double, wm8998_inmux_put),
        SOC_DAPM_ENUM_EXT("IN1R Mux", wm8998_in1muxr_enum,
-                         snd_soc_dapm_get_enum_double, wm8998_in1mux_put),
+                         snd_soc_dapm_get_enum_double, wm8998_inmux_put),
 };
 
 static const struct snd_kcontrol_new wm8998_in2mux =
        SOC_DAPM_ENUM_EXT("IN2 Mux", wm8998_in2mux_enum,
-                         snd_soc_dapm_get_enum_double, wm8998_in2mux_put);
+                         snd_soc_dapm_get_enum_double, wm8998_inmux_put);
 
 static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
 static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
index 7ecffc563016fb7a66b72470188833e5698786dd..f0800dcca9b81043e5e7870cba9047b25490604c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * wm9713.h  --  WM9713 Soc Audio driver
  */
index f883933c1a194d8a6631b919f91b52cb4c7acf9e..23c6592eb31a83133f1546139882c1f179a51785 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # DAVINCI Platform Support
 snd-soc-edma-objs := edma-pcm.o
 snd-soc-davinci-i2s-objs := davinci-i2s.o
index f395bbc7c354549d089ecfbb8a633e0d4e2aadac..23b0da7df1f28a0a71b948f50a665869ae378969 100644 (file)
@@ -1982,8 +1982,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
                             GFP_KERNEL);
 
        if (!mcasp->chconstr[SNDRV_PCM_STREAM_PLAYBACK].list ||
-           !mcasp->chconstr[SNDRV_PCM_STREAM_CAPTURE].list)
-               return -ENOMEM;
+           !mcasp->chconstr[SNDRV_PCM_STREAM_CAPTURE].list) {
+               ret = -ENOMEM;
+               goto err;
+       }
 
        ret = davinci_mcasp_set_ch_constraints(mcasp);
        if (ret)
index d28dc25c9375fd813e0f14d2c48a5d4d0e08576c..c67bf1139e1e83fb6268b55e4a6e82c7b8a47c67 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # MPC8610 HPCD Machine Support
 snd-soc-mpc8610-hpcd-objs := mpc8610_hpcd.o
 obj-$(CONFIG_SND_SOC_MPC8610_HPCD) += snd-soc-mpc8610-hpcd.o
index 38a4209af7c6f6e43e5ebe4cd74aae9895e09896..f75b4d3aeacc26f173ebe15b885ca644e1b0145e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __IMX_AUDMUX_H
 #define __IMX_AUDMUX_H
 
index dff253fde29a98268185e715b2425134099eb296..d7ee33b5b9a8d805f1b62f249af0c79febc9032b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Freescale MPC5200 Audio DMA driver
  */
index 9e000523a3b49a4b0dbf10e77fea3f07c5030262..9dec293a4c4de941d2cfc689f048bb38e7a31846 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-simple-card-utils-objs := simple-card-utils.o
 snd-soc-simple-card-objs       := simple-card.o
 snd-soc-simple-scu-card-objs   := simple-scu-card.o
index 0508c1ced63612d29c0598f015a048b5923f418a..3e7b0fd4fcbfd5a1f190a65014f02870fbed03fa 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SND_SOC_IMG_I2S_IN) += img-i2s-in.o
 obj-$(CONFIG_SND_SOC_IMG_I2S_OUT) += img-i2s-out.o
 obj-$(CONFIG_SND_SOC_IMG_PARALLEL_OUT) += img-parallel-out.o
index b3c7f554ec30efb4b66603e17b714777ededc215..bb8be10b843701f3ad8ea5bf22b194b40dbe24c8 100644 (file)
@@ -1,19 +1,3 @@
-config SND_MFLD_MACHINE
-       tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-       depends on INTEL_SCU_IPC
-       select SND_SOC_SN95031
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_PCI
-       help
-          This adds support for ASoC machine driver for Intel(R) MID Medfield platform
-          used as alsa device in audio substem in Intel(R) MID devices
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SST_ATOM_HIFI2_PLATFORM
-       tristate
-       select SND_SOC_COMPRESS
-
 config SND_SST_IPC
        tristate
 
@@ -27,10 +11,12 @@ config SND_SST_IPC_ACPI
        select SND_SOC_INTEL_SST
        select IOSF_MBI
 
+config SND_SOC_INTEL_COMMON
+       tristate
+
 config SND_SOC_INTEL_SST
        tristate
        select SND_SOC_INTEL_SST_ACPI if ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
 
 config SND_SOC_INTEL_SST_FIRMWARE
        tristate
@@ -39,280 +25,42 @@ config SND_SOC_INTEL_SST_FIRMWARE
 config SND_SOC_INTEL_SST_ACPI
        tristate
 
-config SND_SOC_INTEL_SST_MATCH
+config SND_SOC_ACPI_INTEL_MATCH
        tristate
+       select SND_SOC_ACPI if ACPI
+
+config SND_SOC_INTEL_SST_TOPLEVEL
+       tristate "Intel ASoC SST drivers"
+       depends on X86 || COMPILE_TEST
+       select SND_SOC_INTEL_MACH
+       select SND_SOC_INTEL_COMMON
 
 config SND_SOC_INTEL_HASWELL
-       tristate
+       tristate "Intel ASoC SST driver for Haswell/Broadwell"
+       depends on SND_SOC_INTEL_SST_TOPLEVEL && SND_DMA_SGBUF
+       depends on DMADEVICES
        select SND_SOC_INTEL_SST
        select SND_SOC_INTEL_SST_FIRMWARE
 
 config SND_SOC_INTEL_BAYTRAIL
-       tristate
-       select SND_SOC_INTEL_SST
-       select SND_SOC_INTEL_SST_FIRMWARE
-
-config SND_SOC_INTEL_HASWELL_MACH
-       tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
-       depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-       depends on DMADEVICES
-       select SND_SOC_INTEL_HASWELL
-       select SND_SOC_RT5640
-       help
-         This adds support for the Lynxpoint Audio DSP on Intel(R) Haswell
-         Ultrabook platforms.
-         Say Y if you have such a device.
-         If unsure select "N".
-
-config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
-       tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
-       depends on X86 && ACPI && I2C
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_DA7219
-       select SND_SOC_MAX98357A
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       select SND_HDA_DSP_LOADER
-       help
-          This adds support for ASoC machine driver for Broxton-P platforms
-          with DA7219 + MAX98357A I2S audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_BXT_RT298_MACH
-       tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
-       depends on X86 && ACPI && I2C
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_RT298
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       select SND_HDA_DSP_LOADER
-       help
-          This adds support for ASoC machine driver for Broxton platforms
-          with RT286 I2S audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_BYT_RT5640_MACH
-       tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
-       depends on X86_INTEL_LPSS && I2C
+       tristate "Intel ASoC SST driver for Baytrail (legacy)"
+       depends on SND_SOC_INTEL_SST_TOPLEVEL
        depends on DMADEVICES
-       depends on SND_SST_IPC_ACPI = n
-       select SND_SOC_INTEL_BAYTRAIL
-       select SND_SOC_RT5640
-       help
-         This adds audio driver for Intel Baytrail platform based boards
-         with the RT5640 audio codec. This driver is deprecated, use
-         SND_SOC_INTEL_BYTCR_RT5640_MACH instead for better functionality.
-
-config SND_SOC_INTEL_BYT_MAX98090_MACH
-       tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
-       depends on X86_INTEL_LPSS && I2C
-       depends on DMADEVICES
-       depends on SND_SST_IPC_ACPI = n
-       select SND_SOC_INTEL_BAYTRAIL
-       select SND_SOC_MAX98090
-       help
-         This adds audio driver for Intel Baytrail platform based boards
-         with the MAX98090 audio codec.
-
-config SND_SOC_INTEL_BDW_RT5677_MACH
-       tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
-       depends on X86_INTEL_LPSS && GPIOLIB && I2C
-       depends on DMADEVICES
-       select SND_SOC_INTEL_HASWELL
-       select SND_SOC_RT5677
-       help
-         This adds support for Intel Broadwell platform based boards with
-         the RT5677 audio codec.
-
-config SND_SOC_INTEL_BROADWELL_MACH
-       tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
-       depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
-       depends on DMADEVICES
-       select SND_SOC_INTEL_HASWELL
-       select SND_SOC_RT286
-       help
-         This adds support for the Wilcatpoint Audio DSP on Intel(R) Broadwell
-         Ultrabook platforms.
-         Say Y if you have such a device.
-         If unsure select "N".
-
-config SND_SOC_INTEL_BYTCR_RT5640_MACH
-        tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
-       depends on X86 && I2C && ACPI
-       select SND_SOC_RT5640
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-          This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
-          platforms with RT5640 audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_BYTCR_RT5651_MACH
-        tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
-       depends on X86 && I2C && ACPI
-       select SND_SOC_RT5651
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-          This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
-          platforms with RT5651 audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
-        tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
-        depends on X86_INTEL_LPSS && I2C && ACPI
-        select SND_SOC_RT5670
-        select SND_SST_ATOM_HIFI2_PLATFORM
-        select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-        help
-          This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
-          platforms with RT5672 audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
-       tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
-       depends on X86_INTEL_LPSS && I2C && ACPI
-       select SND_SOC_RT5645
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-         This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
-         platforms with RT5645/5650 audio codec.
-         If unsure select "N".
-
-config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
-       tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
-       depends on X86_INTEL_LPSS && I2C && ACPI
-       select SND_SOC_MAX98090
-       select SND_SOC_TS3A227E
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-         This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
-         platforms with MAX98090 audio codec it also can support TI jack chip as aux device.
-         If unsure select "N".
-
-config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
-       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
-       depends on X86_INTEL_LPSS && I2C && ACPI
-       select SND_SOC_DA7213
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-         This adds support for ASoC machine driver for Intel(R) Baytrail & CherryTrail
-         platforms with DA7212/7213 audio codec.
-         If unsure select "N".
-
-config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
-       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
-       depends on X86_INTEL_LPSS && I2C && ACPI
-       select SND_SOC_ES8316
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-         This adds support for ASoC machine driver for Intel(R) Baytrail &
-         Cherrytrail platforms with ES8316 audio codec.
-         If unsure select "N".
-
-config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
-       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
-       depends on X86_INTEL_LPSS && I2C && ACPI
-       select SND_SST_ATOM_HIFI2_PLATFORM
-       select SND_SST_IPC_ACPI
-       select SND_SOC_INTEL_SST_MATCH if ACPI
-       help
-         This adds support for ASoC machine driver for the MinnowBoard Max or
-         Up boards and provides access to I2S signals on the Low-Speed
-         connector
-         If unsure select "N".
-
-config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
-       tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
-       depends on X86_INTEL_LPSS && I2C
        select SND_SOC_INTEL_SST
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_RT5663
-       select SND_SOC_MAX98927
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       help
-         This adds support for ASoC Onboard Codec I2S machine driver. This will
-         create an alsa sound card for RT5663 + MAX98927.
-         Say Y if you have such a device.
-         If unsure select "N".
+       select SND_SOC_INTEL_SST_FIRMWARE
 
-config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
-        tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
-        depends on X86_INTEL_LPSS && I2C && SPI
-        select SND_SOC_INTEL_SST
-        select SND_SOC_INTEL_SKYLAKE
-        select SND_SOC_RT5663
-        select SND_SOC_RT5514
-        select SND_SOC_RT5514_SPI
-        select SND_SOC_MAX98927
-        select SND_SOC_HDAC_HDMI
-        help
-          This adds support for ASoC Onboard Codec I2S machine driver. This will
-          create an alsa sound card for RT5663 + RT5514 + MAX98927.
-          Say Y if you have such a device.
-          If unsure select "N".
+config SND_SST_ATOM_HIFI2_PLATFORM
+       tristate "Intel ASoC SST driver for HiFi2 platforms (*field, *trail)"
+       depends on SND_SOC_INTEL_SST_TOPLEVEL && X86
+       select SND_SOC_COMPRESS
 
 config SND_SOC_INTEL_SKYLAKE
-       tristate
+       tristate "Intel ASoC SST driver for SKL/BXT/KBL/GLK/CNL"
+       depends on SND_SOC_INTEL_SST_TOPLEVEL && PCI && ACPI
        select SND_HDA_EXT_CORE
        select SND_HDA_DSP_LOADER
        select SND_SOC_TOPOLOGY
        select SND_SOC_INTEL_SST
 
-config SND_SOC_INTEL_SKL_RT286_MACH
-       tristate "ASoC Audio driver for SKL with RT286 I2S mode"
-       depends on X86 && ACPI && I2C
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_RT286
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       help
-          This adds support for ASoC machine driver for Skylake platforms
-          with RT286 I2S audio codec.
-          Say Y if you have such a device.
-          If unsure select "N".
-
-config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
-       tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
-       depends on X86_INTEL_LPSS && I2C
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_NAU8825
-       select SND_SOC_SSM4567
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       help
-         This adds support for ASoC Onboard Codec I2S machine driver. This will
-         create an alsa sound card for NAU88L25 + SSM4567.
-         Say Y if you have such a device.
-         If unsure select "N".
-
-config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
-       tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
-       depends on X86_INTEL_LPSS && I2C
-       select SND_SOC_INTEL_SKYLAKE
-       select SND_SOC_NAU8825
-       select SND_SOC_MAX98357A
-       select SND_SOC_DMIC
-       select SND_SOC_HDAC_HDMI
-       help
-         This adds support for ASoC Onboard Codec I2S machine driver. This will
-         create an alsa sound card for NAU88L25 + MAX98357A.
-         Say Y if you have such a device.
-         If unsure select "N".
+# ASoC codec drivers
+source "sound/soc/intel/boards/Kconfig"
index cdd495f7ee2c46e6ec4831a97ce88f2d69ec7f8a..b973d457e834a7719ed47fd737d5b216ab4285dd 100644 (file)
@@ -1,5 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
 # Core support
-obj-$(CONFIG_SND_SOC_INTEL_SST) += common/
+obj-$(CONFIG_SND_SOC_INTEL_COMMON) += common/
 
 # Platform Support
 obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
index aa6548c6feab0a530e805e08b965637fbe9e5407..1dc60471b399f9ae3a85c56d7119c58feb4df928 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-sst-atom-hifi2-platform-objs :=        sst-mfld-platform-pcm.o \
                                        sst-mfld-platform-compress.o \
                                        sst-atom-controls.o
index 1bead81bb5106b590259780d4bcdef86dba5fc03..1dbcab5a6ff0bf1fdf509a837f5e23125abc86bd 100644 (file)
@@ -259,7 +259,7 @@ static int sst_platform_compr_set_metadata(struct snd_compr_stream *cstream,
        return stream->compr_ops->set_metadata(sst->dev, stream->id, metadata);
 }
 
-struct snd_compr_ops sst_platform_compr_ops = {
+const struct snd_compr_ops sst_platform_compr_ops = {
 
        .open = sst_platform_compr_open,
        .free = sst_platform_compr_free,
index cb32cc7e5ec1f17484dc94f73a0a72cae38d9903..31a58c25472cb51be10c83143a0fac237fec9293 100644 (file)
@@ -25,7 +25,7 @@
 #include "sst-atom-controls.h"
 
 extern struct sst_device *sst;
-extern struct snd_compr_ops sst_platform_compr_ops;
+extern const struct snd_compr_ops sst_platform_compr_ops;
 
 #define SST_MONO               1
 #define SST_STEREO             2
index fd21726361b527bc9e09e8fc74412936861a1280..795d1cf8f3868259bde01904356592ee7d4b64fe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-intel-sst-core-objs := sst.o sst_ipc.o sst_stream.o sst_drv_interface.o sst_loader.o sst_pvt.o
 snd-intel-sst-pci-objs += sst_pci.o
 snd-intel-sst-acpi-objs += sst_acpi.o
index 0e928d54305dad366586c6d2ec56829e5bb75ed2..32d6e02e21049719feb32691ee0ded359b5a4572 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/io.h>
-#include <linux/miscdevice.h>
 #include <linux/platform_device.h>
 #include <linux/firmware.h>
 #include <linux/pm_runtime.h>
 #include <acpi/acpi_bus.h>
 #include <asm/cpu_device_id.h>
 #include <asm/iosf_mbi.h>
+#include <sound/soc-acpi.h>
+#include <sound/soc-acpi-intel-match.h>
 #include "../sst-mfld-platform.h"
 #include "../../common/sst-dsp.h"
-#include "../../common/sst-acpi.h"
 #include "sst.h"
 
 /* LPE viewpoint addresses */
@@ -239,19 +239,26 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
        return 0;
 }
 
+static int is_byt(void)
+{
+       bool status = false;
+       static const struct x86_cpu_id cpu_ids[] = {
+               { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
+               {}
+       };
+       if (x86_match_cpu(cpu_ids))
+               status = true;
+       return status;
+}
 
 static int is_byt_cr(struct device *dev, bool *bytcr)
 {
        int status = 0;
 
        if (IS_ENABLED(CONFIG_IOSF_MBI)) {
-               static const struct x86_cpu_id cpu_ids[] = {
-                       { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
-                       {}
-               };
                u32 bios_status;
 
-               if (!x86_match_cpu(cpu_ids) || !iosf_mbi_available()) {
+               if (!is_byt() || !iosf_mbi_available()) {
                        /* bail silently */
                        return status;
                }
@@ -285,7 +292,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
        int ret = 0;
        struct intel_sst_drv *ctx;
        const struct acpi_device_id *id;
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
        struct platform_device *mdev;
        struct platform_device *plat_dev;
        struct sst_platform_info *pdata;
@@ -297,13 +304,17 @@ static int sst_acpi_probe(struct platform_device *pdev)
                return -ENODEV;
        dev_dbg(dev, "for %s\n", id->id);
 
-       mach = (struct sst_acpi_mach *)id->driver_data;
-       mach = sst_acpi_find_machine(mach);
+       mach = (struct snd_soc_acpi_mach *)id->driver_data;
+       mach = snd_soc_acpi_find_machine(mach);
        if (mach == NULL) {
                dev_err(dev, "No matching machine driver found\n");
                return -ENODEV;
        }
 
+       if (is_byt())
+               mach->pdata = &byt_rvp_platform_data;
+       else
+               mach->pdata = &chv_platform_data;
        pdata = mach->pdata;
 
        ret = kstrtouint(id->id, 16, &dev_id);
@@ -381,286 +392,9 @@ static int sst_acpi_remove(struct platform_device *pdev)
        return 0;
 }
 
-static unsigned long cht_machine_id;
-
-#define CHT_SURFACE_MACH 1
-#define BYT_THINKPAD_10  2
-
-static int cht_surface_quirk_cb(const struct dmi_system_id *id)
-{
-       cht_machine_id = CHT_SURFACE_MACH;
-       return 1;
-}
-
-static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
-{
-       cht_machine_id = BYT_THINKPAD_10;
-       return 1;
-}
-
-
-static const struct dmi_system_id byt_table[] = {
-       {
-               .callback = byt_thinkpad10_quirk_cb,
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
-               },
-       },
-       {
-               .callback = byt_thinkpad10_quirk_cb,
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
-               },
-       },
-       {
-               .callback = byt_thinkpad10_quirk_cb,
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-                       DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
-               },
-       },
-       { }
-};
-
-static const struct dmi_system_id cht_table[] = {
-       {
-               .callback = cht_surface_quirk_cb,
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
-               },
-       },
-       { }
-};
-
-
-static struct sst_acpi_mach cht_surface_mach = {
-       .id = "10EC5640",
-       .drv_name = "cht-bsw-rt5645",
-       .fw_filename = "intel/fw_sst_22a8.bin",
-       .board = "cht-bsw",
-       .pdata = &chv_platform_data,
-};
-
-static struct sst_acpi_mach byt_thinkpad_10 = {
-       .id = "10EC5640",
-       .drv_name = "cht-bsw-rt5672",
-       .fw_filename = "intel/fw_sst_0f28.bin",
-       .board = "cht-bsw",
-       .pdata = &byt_rvp_platform_data,
-};
-
-static struct sst_acpi_mach *cht_quirk(void *arg)
-{
-       struct sst_acpi_mach *mach = arg;
-
-       dmi_check_system(cht_table);
-
-       if (cht_machine_id == CHT_SURFACE_MACH)
-               return &cht_surface_mach;
-       else
-               return mach;
-}
-
-static struct sst_acpi_mach *byt_quirk(void *arg)
-{
-       struct sst_acpi_mach *mach = arg;
-
-       dmi_check_system(byt_table);
-
-       if (cht_machine_id == BYT_THINKPAD_10)
-               return &byt_thinkpad_10;
-       else
-               return mach;
-}
-
-
-static struct sst_acpi_mach sst_acpi_bytcr[] = {
-       {
-               .id = "10EC5640",
-               .drv_name = "bytcr_rt5640",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcr_rt5640",
-               .machine_quirk = byt_quirk,
-               .pdata = &byt_rvp_platform_data,
-       },
-       {
-               .id = "10EC5642",
-               .drv_name = "bytcr_rt5640",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcr_rt5640",
-               .pdata = &byt_rvp_platform_data
-       },
-       {
-               .id = "INTCCFFD",
-               .drv_name = "bytcr_rt5640",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcr_rt5640",
-               .pdata = &byt_rvp_platform_data
-       },
-       {
-               .id = "10EC5651",
-               .drv_name = "bytcr_rt5651",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcr_rt5651",
-               .pdata = &byt_rvp_platform_data
-       },
-       {
-               .id = "DLGS7212",
-               .drv_name = "bytcht_da7213",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcht_da7213",
-               .pdata = &byt_rvp_platform_data
-       },
-       {
-               .id = "DLGS7213",
-               .drv_name = "bytcht_da7213",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcht_da7213",
-               .pdata = &byt_rvp_platform_data
-       },
-       /* some Baytrail platforms rely on RT5645, use CHT machine driver */
-       {
-               .id = "10EC5645",
-               .drv_name = "cht-bsw-rt5645",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "cht-bsw",
-               .pdata = &byt_rvp_platform_data
-       },
-       {
-               .id = "10EC5648",
-               .drv_name = "cht-bsw-rt5645",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "cht-bsw",
-               .pdata = &byt_rvp_platform_data
-       },
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
-       /*
-        * This is always last in the table so that it is selected only when
-        * enabled explicitly and there is no codec-related information in SSDT
-        */
-       {
-               .id = "80860F28",
-               .drv_name = "bytcht_nocodec",
-               .fw_filename = "intel/fw_sst_0f28.bin",
-               .board = "bytcht_nocodec",
-               .pdata = &byt_rvp_platform_data
-       },
-#endif
-       {},
-};
-
-/* Cherryview-based platforms: CherryTrail and Braswell */
-static struct sst_acpi_mach sst_acpi_chv[] = {
-       {
-               .id = "10EC5670",
-               .drv_name = "cht-bsw-rt5672",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "10EC5672",
-               .drv_name = "cht-bsw-rt5672",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "10EC5645",
-               .drv_name = "cht-bsw-rt5645",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "10EC5650",
-               .drv_name = "cht-bsw-rt5645",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "10EC3270",
-               .drv_name = "cht-bsw-rt5645",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-
-       {
-               .id = "193C9890",
-               .drv_name = "cht-bsw-max98090",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "cht-bsw",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "DLGS7212",
-               .drv_name = "bytcht_da7213",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcht_da7213",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "DLGS7213",
-               .drv_name = "bytcht_da7213",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcht_da7213",
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "ESSX8316",
-               .drv_name = "bytcht_es8316",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcht_es8316",
-               .pdata = &chv_platform_data
-       },
-       /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
-       {
-               .id = "10EC5640",
-               .drv_name = "bytcr_rt5640",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcr_rt5640",
-               .machine_quirk = cht_quirk,
-               .pdata = &chv_platform_data
-       },
-       {
-               .id = "10EC3276",
-               .drv_name = "bytcr_rt5640",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcr_rt5640",
-               .pdata = &chv_platform_data
-       },
-       /* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
-       {
-               .id = "10EC5651",
-               .drv_name = "bytcr_rt5651",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcr_rt5651",
-               .pdata = &chv_platform_data
-       },
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
-       /*
-        * This is always last in the table so that it is selected only when
-        * enabled explicitly and there is no codec-related information in SSDT
-        */
-       {
-               .id = "808622A8",
-               .drv_name = "bytcht_nocodec",
-               .fw_filename = "intel/fw_sst_22a8.bin",
-               .board = "bytcht_nocodec",
-               .pdata = &chv_platform_data
-       },
-#endif
-       {},
-};
-
 static const struct acpi_device_id sst_acpi_ids[] = {
-       { "80860F28", (unsigned long)&sst_acpi_bytcr},
-       { "808622A8", (unsigned long) &sst_acpi_chv},
+       { "80860F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines},
+       { "808622A8", (unsigned long)&snd_soc_acpi_intel_cherrytrail_machines},
        { },
 };
 
index 33917146d9c445d9919c3dacad2bf904f04b1d9a..a686eef2cf7f7a1a4a7f7f23a00808122734a850 100644 (file)
@@ -415,7 +415,6 @@ int sst_load_fw(struct intel_sst_drv *sst_drv_ctx)
                        return ret_val;
        }
 
-       BUG_ON(!sst_drv_ctx->fw_in_mem);
        block = sst_create_block(sst_drv_ctx, 0, FW_DWNL_ID);
        if (block == NULL)
                return -ENOMEM;
index 83d8dda152331054650f6fca0d5d09d160d73108..65e257b17a7efe69ecf8810622db647f373b820a 100644 (file)
@@ -45,7 +45,6 @@ int sst_alloc_stream_mrfld(struct intel_sst_drv *sst_drv_ctx, void *params)
        void *data = NULL;
 
        dev_dbg(sst_drv_ctx->dev, "Enter\n");
-       BUG_ON(!params);
 
        str_params = (struct snd_sst_params *)params;
        memset(&alloc_param, 0, sizeof(alloc_param));
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
new file mode 100644 (file)
index 0000000..6f75470
--- /dev/null
@@ -0,0 +1,265 @@
+config SND_SOC_INTEL_MACH
+       tristate "Intel Audio machine drivers"
+       depends on SND_SOC_INTEL_SST_TOPLEVEL
+       select SND_SOC_ACPI_INTEL_MATCH if ACPI
+
+if SND_SOC_INTEL_MACH
+
+config SND_MFLD_MACHINE
+       tristate "SOC Machine Audio driver for Intel Medfield MID platform"
+       depends on INTEL_SCU_IPC
+       select SND_SOC_SN95031
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_PCI
+       help
+          This adds support for ASoC machine driver for Intel(R) MID Medfield platform
+          used as alsa device in audio substem in Intel(R) MID devices
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_HASWELL_MACH
+       tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
+       depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
+       depends on SND_SOC_INTEL_HASWELL
+       select SND_SOC_RT5640
+       help
+         This adds support for the Lynxpoint Audio DSP on Intel(R) Haswell
+         Ultrabook platforms.
+         Say Y if you have such a device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BDW_RT5677_MACH
+       tristate "ASoC Audio driver for Intel Broadwell with RT5677 codec"
+       depends on X86_INTEL_LPSS && GPIOLIB && I2C
+       depends on SND_SOC_INTEL_HASWELL
+       select SND_SOC_RT5677
+       help
+         This adds support for Intel Broadwell platform based boards with
+         the RT5677 audio codec.
+
+config SND_SOC_INTEL_BROADWELL_MACH
+       tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
+       depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
+       depends on SND_SOC_INTEL_HASWELL
+       select SND_SOC_RT286
+       help
+         This adds support for the Wilcatpoint Audio DSP on Intel(R) Broadwell
+         Ultrabook platforms.
+         Say Y if you have such a device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BYT_MAX98090_MACH
+       tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
+       depends on X86_INTEL_LPSS && I2C
+       depends on SND_SST_IPC_ACPI = n
+       depends on SND_SOC_INTEL_BAYTRAIL
+       select SND_SOC_MAX98090
+       help
+         This adds audio driver for Intel Baytrail platform based boards
+         with the MAX98090 audio codec.
+
+config SND_SOC_INTEL_BYT_RT5640_MACH
+       tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
+       depends on X86_INTEL_LPSS && I2C
+       depends on SND_SST_IPC_ACPI = n
+       depends on SND_SOC_INTEL_BAYTRAIL
+       select SND_SOC_RT5640
+       help
+         This adds audio driver for Intel Baytrail platform based boards
+         with the RT5640 audio codec. This driver is deprecated, use
+         SND_SOC_INTEL_BYTCR_RT5640_MACH instead for better functionality.
+
+config SND_SOC_INTEL_BYTCR_RT5640_MACH
+        tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
+       depends on X86 && I2C && ACPI
+       select SND_SOC_RT5640
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+          This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
+          platforms with RT5640 audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_BYTCR_RT5651_MACH
+        tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
+       depends on X86 && I2C && ACPI
+       select SND_SOC_RT5651
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+          This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
+          platforms with RT5651 audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
+        tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+        select SND_SOC_RT5670
+        depends on SND_SST_ATOM_HIFI2_PLATFORM
+        select SND_SST_IPC_ACPI
+        help
+          This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
+          platforms with RT5672 audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_CHT_BSW_RT5645_MACH
+       tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5645/5650 codec"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+       select SND_SOC_RT5645
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+         This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
+         platforms with RT5645/5650 audio codec.
+         If unsure select "N".
+
+config SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
+       tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with MAX98090 & TI codec"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+       select SND_SOC_MAX98090
+       select SND_SOC_TS3A227E
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+         This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell
+         platforms with MAX98090 audio codec it also can support TI jack chip as aux device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BYT_CHT_DA7213_MACH
+       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with DA7212/7213 codec"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+       select SND_SOC_DA7213
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+         This adds support for ASoC machine driver for Intel(R) Baytrail & CherryTrail
+         platforms with DA7212/7213 audio codec.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BYT_CHT_ES8316_MACH
+       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail with ES8316 codec"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+       select SND_SOC_ES8316
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+         This adds support for ASoC machine driver for Intel(R) Baytrail &
+         Cherrytrail platforms with ES8316 audio codec.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH
+       tristate "ASoC Audio driver for Intel Baytrail & Cherrytrail platform with no codec (MinnowBoard MAX, Up)"
+       depends on X86_INTEL_LPSS && I2C && ACPI
+       depends on SND_SST_ATOM_HIFI2_PLATFORM
+       select SND_SST_IPC_ACPI
+       help
+         This adds support for ASoC machine driver for the MinnowBoard Max or
+         Up boards and provides access to I2S signals on the Low-Speed
+         connector
+         If unsure select "N".
+
+config SND_SOC_INTEL_SKL_RT286_MACH
+       tristate "ASoC Audio driver for SKL with RT286 I2S mode"
+       depends on X86 && ACPI && I2C
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_RT286
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       help
+          This adds support for ASoC machine driver for Skylake platforms
+          with RT286 I2S audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
+       tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
+       depends on X86_INTEL_LPSS && I2C
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_NAU8825
+       select SND_SOC_SSM4567
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       help
+         This adds support for ASoC Onboard Codec I2S machine driver. This will
+         create an alsa sound card for NAU88L25 + SSM4567.
+         Say Y if you have such a device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
+       tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
+       depends on X86_INTEL_LPSS && I2C
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_NAU8825
+       select SND_SOC_MAX98357A
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       help
+         This adds support for ASoC Onboard Codec I2S machine driver. This will
+         create an alsa sound card for NAU88L25 + MAX98357A.
+         Say Y if you have such a device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH
+       tristate "ASoC Audio driver for Broxton with DA7219 and MAX98357A in I2S Mode"
+       depends on X86 && ACPI && I2C
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_DA7219
+       select SND_SOC_MAX98357A
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       select SND_HDA_DSP_LOADER
+       help
+          This adds support for ASoC machine driver for Broxton-P platforms
+          with DA7219 + MAX98357A I2S audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_BXT_RT298_MACH
+       tristate "ASoC Audio driver for Broxton with RT298 I2S mode"
+       depends on X86 && ACPI && I2C
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_RT298
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       select SND_HDA_DSP_LOADER
+       help
+          This adds support for ASoC machine driver for Broxton platforms
+          with RT286 I2S audio codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
+       tristate "ASoC Audio driver for KBL with RT5663 and MAX98927 in I2S Mode"
+       depends on X86_INTEL_LPSS && I2C
+       select SND_SOC_INTEL_SST
+       depends on SND_SOC_INTEL_SKYLAKE
+       select SND_SOC_RT5663
+       select SND_SOC_MAX98927
+       select SND_SOC_DMIC
+       select SND_SOC_HDAC_HDMI
+       help
+         This adds support for ASoC Onboard Codec I2S machine driver. This will
+         create an alsa sound card for RT5663 + MAX98927.
+         Say Y if you have such a device.
+         If unsure select "N".
+
+config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
+        tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
+        depends on X86_INTEL_LPSS && I2C && SPI
+        select SND_SOC_INTEL_SST
+        depends on SND_SOC_INTEL_SKYLAKE
+        select SND_SOC_RT5663
+        select SND_SOC_RT5514
+        select SND_SOC_RT5514_SPI
+        select SND_SOC_MAX98927
+        select SND_SOC_HDAC_HDMI
+        help
+          This adds support for ASoC Onboard Codec I2S machine driver. This will
+          create an alsa sound card for RT5663 + RT5514 + MAX98927.
+          Say Y if you have such a device.
+          If unsure select "N".
+
+endif
index a5c5bc5732a2fc62c559fcf194827fce75da2bff..69d2dfaeb00c2ff3a19852884ee5b24e7c9d7d55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-sst-haswell-objs := haswell.o
 snd-soc-sst-byt-rt5640-mach-objs := byt-rt5640.o
 snd-soc-sst-byt-max98090-mach-objs := byt-max98090.o
index ce35ec7884d1e59873e184d3dd8f5bf0711806a6..f8a91a6f2a17af51c68e69ec88b907e718e72952 100644 (file)
@@ -55,20 +55,6 @@ enum {
        BXT_DPCM_AUDIO_HDMI3_PB,
 };
 
-static inline struct snd_soc_dai *bxt_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-
-               if (!strncmp(rtd->codec_dai->name, BXT_DIALOG_CODEC_DAI,
-                            strlen(BXT_DIALOG_CODEC_DAI)))
-                       return rtd->codec_dai;
-       }
-
-       return NULL;
-}
-
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *k, int  event)
 {
@@ -77,7 +63,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct snd_soc_card *card = dapm->card;
        struct snd_soc_dai *codec_dai;
 
-       codec_dai = bxt_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, BXT_DIALOG_CODEC_DAI);
        if (!codec_dai) {
                dev_err(card->dev, "Codec dai not found; Unable to set/unset codec pll\n");
                return -EIO;
index 18873e23f404b1aec4f5ef05a8483887529fc309..c4d82ad41bd70b432ee82b327f6ce5ccd76024e5 100644 (file)
@@ -27,9 +27,9 @@
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
+#include <sound/soc-acpi.h>
 #include "../../codecs/da7213.h"
 #include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
 
 static const struct snd_kcontrol_new controls[] = {
        SOC_DAPM_PIN_SWITCH("Headphone Jack"),
@@ -185,19 +185,11 @@ static struct snd_soc_dai_link dailink[] = {
                .dpcm_playback = 1,
                .ops = &aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
        /* CODEC<->CODEC link */
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -231,19 +223,18 @@ static char codec_name[16]; /* i2c-<HID>:00 with HID being 8 chars */
 
 static int bytcht_da7213_probe(struct platform_device *pdev)
 {
-       int ret_val = 0;
-       int i;
        struct snd_soc_card *card;
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
        const char *i2c_name = NULL;
        int dai_index = 0;
+       int ret_val = 0;
+       int i;
 
        mach = (&pdev->dev)->platform_data;
        card = &bytcht_da7213_card;
        card->dev = &pdev->dev;
 
        /* fix index of codec dai */
-       dai_index = MERR_DPCM_COMPR + 1;
        for (i = 0; i < ARRAY_SIZE(dailink); i++) {
                if (!strcmp(dailink[i].codec_name, "i2c-DLGS7213:00")) {
                        dai_index = i;
@@ -252,8 +243,8 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
        }
 
        /* fixup codec name based on HID */
-       i2c_name = sst_acpi_find_name_from_hid(mach->id);
-       if (i2c_name != NULL) {
+       i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
+       if (i2c_name) {
                snprintf(codec_name, sizeof(codec_name),
                        "%s%s", "i2c-", i2c_name);
                dailink[dai_index].codec_name = codec_name;
index 52635462dac63ec3dbb1f61bf6d0d33ee14b0d0e..8088396717e35b1133306bc6f4a95feac2b3aa7e 100644 (file)
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
+#include <sound/soc-acpi.h>
 #include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
 #include "../common/sst-dsp.h"
 
 struct byt_cht_es8316_private {
        struct clk *mclk;
 };
 
-#define CODEC_DAI1     "ES8316 HiFi"
-
-static inline struct snd_soc_dai *get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-               if (!strncmp(rtd->codec_dai->name, CODEC_DAI1,
-                            strlen(CODEC_DAI1)))
-                       return rtd->codec_dai;
-       }
-       return NULL;
-}
-
 static const struct snd_soc_dapm_widget byt_cht_es8316_widgets[] = {
        SND_SOC_DAPM_HP("Headphone", NULL),
 
@@ -208,22 +194,13 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = {
                .ops = &byt_cht_es8316_aif1_ops,
        },
 
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
-
                /* back ends */
        {
                /* Only SSP2 has been tested here, so BYT-CR platforms that
                 * require SSP0 will not work.
                 */
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 1dd9441806fa31d02c7d3808a35d2d3e8fd304f1..b80ec027a0e82b5d33411d7398dcd7cdeb9da7fa 100644 (file)
@@ -133,19 +133,11 @@ static struct snd_soc_dai_link dais[] = {
                .dpcm_playback = 1,
                .ops = &aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
        /* CODEC<->CODEC link */
        /* back ends */
        {
                .name = "SSP2-LowSpeed Connector",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
index 4a76b099a508954c4cd3e6b3a3bfdfda1755b0fe..f2c0fc415e52fccfb138597f0ff5c3ef6f6136ef 100644 (file)
 #include <linux/moduleparam.h>
 #include <linux/platform_device.h>
 #include <linux/acpi.h>
+#include <linux/clk.h>
 #include <linux/device.h>
 #include <linux/dmi.h>
 #include <linux/slab.h>
 #include <asm/cpu_device_id.h>
 #include <asm/platform_sst_audio.h>
-#include <linux/clk.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
+#include <sound/soc-acpi.h>
 #include "../../codecs/rt5640.h"
 #include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
 #include "../common/sst-dsp.h"
 
 enum {
@@ -44,13 +44,13 @@ enum {
        BYT_RT5640_IN3_MAP,
 };
 
-#define BYT_RT5640_MAP(quirk)  ((quirk) & 0xff)
+#define BYT_RT5640_MAP(quirk)  ((quirk) &  GENMASK(7, 0))
 #define BYT_RT5640_DMIC_EN     BIT(16)
 #define BYT_RT5640_MONO_SPEAKER BIT(17)
 #define BYT_RT5640_DIFF_MIC     BIT(18) /* defaut is single-ended */
-#define BYT_RT5640_SSP2_AIF2     BIT(19) /* default is using AIF1  */
-#define BYT_RT5640_SSP0_AIF1     BIT(20)
-#define BYT_RT5640_SSP0_AIF2     BIT(21)
+#define BYT_RT5640_SSP2_AIF2    BIT(19) /* default is using AIF1  */
+#define BYT_RT5640_SSP0_AIF1    BIT(20)
+#define BYT_RT5640_SSP0_AIF2    BIT(21)
 #define BYT_RT5640_MCLK_EN     BIT(22)
 #define BYT_RT5640_MCLK_25MHZ  BIT(23)
 
@@ -145,22 +145,6 @@ static void log_quirks(struct device *dev)
 #define BYT_CODEC_DAI1 "rt5640-aif1"
 #define BYT_CODEC_DAI2 "rt5640-aif2"
 
-static inline struct snd_soc_dai *byt_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-               if (!strncmp(rtd->codec_dai->name, BYT_CODEC_DAI1,
-                            strlen(BYT_CODEC_DAI1)))
-                       return rtd->codec_dai;
-               if (!strncmp(rtd->codec_dai->name, BYT_CODEC_DAI2,
-                               strlen(BYT_CODEC_DAI2)))
-                       return rtd->codec_dai;
-
-       }
-       return NULL;
-}
-
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
                                  struct snd_kcontrol *k, int  event)
 {
@@ -170,7 +154,10 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card);
        int ret;
 
-       codec_dai = byt_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, BYT_CODEC_DAI1);
+       if (!codec_dai)
+               codec_dai = snd_soc_card_get_codec_dai(card, BYT_CODEC_DAI2);
+
        if (!codec_dai) {
                dev_err(card->dev,
                        "Codec dai not found; Unable to set platform clock\n");
@@ -178,7 +165,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        }
 
        if (SND_SOC_DAPM_EVENT_ON(event)) {
-               if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && priv->mclk) {
+               if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) {
                        ret = clk_prepare_enable(priv->mclk);
                        if (ret < 0) {
                                dev_err(card->dev,
@@ -199,7 +186,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
                                             48000 * 512,
                                             SND_SOC_CLOCK_IN);
                if (!ret) {
-                       if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && priv->mclk)
+                       if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN)
                                clk_disable_unprepare(priv->mclk);
                }
        }
@@ -376,8 +363,8 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
                        DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TA"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
-                                                BYT_RT5640_MCLK_EN),
+               .driver_data = (void *)(BYT_RT5640_IN1_MAP |
+                                       BYT_RT5640_MCLK_EN),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -385,12 +372,11 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
                        DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100TAF"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
-                                                BYT_RT5640_MONO_SPEAKER |
-                                                BYT_RT5640_DIFF_MIC |
-                                                BYT_RT5640_SSP0_AIF2 |
-                                                BYT_RT5640_MCLK_EN
-                                                ),
+               .driver_data = (void *)(BYT_RT5640_IN1_MAP |
+                                       BYT_RT5640_MONO_SPEAKER |
+                                       BYT_RT5640_DIFF_MIC |
+                                       BYT_RT5640_SSP0_AIF2 |
+                                       BYT_RT5640_MCLK_EN),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -398,9 +384,9 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_EXACT_MATCH(DMI_SYS_VENDOR, "DellInc."),
                        DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Venue 8 Pro 5830"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_DMIC2_MAP |
-                                                BYT_RT5640_DMIC_EN |
-                                                BYT_RT5640_MCLK_EN),
+               .driver_data = (void *)(BYT_RT5640_DMIC2_MAP |
+                                       BYT_RT5640_DMIC_EN |
+                                       BYT_RT5640_MCLK_EN),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -408,8 +394,8 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
                        DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ElitePad 1000 G2"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
-                                                BYT_RT5640_MCLK_EN),
+               .driver_data = (void *)(BYT_RT5640_IN1_MAP |
+                                       BYT_RT5640_MCLK_EN),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -417,8 +403,8 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_DMIC1_MAP |
-                                                BYT_RT5640_DMIC_EN),
+               .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+                                       BYT_RT5640_DMIC_EN),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -426,9 +412,9 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
                        DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN3_MAP |
-                                               BYT_RT5640_MCLK_EN |
-                                               BYT_RT5640_SSP0_AIF1),
+               .driver_data = (void *)(BYT_RT5640_IN3_MAP |
+                                       BYT_RT5640_MCLK_EN |
+                                       BYT_RT5640_SSP0_AIF1),
        },
        {
                .callback = byt_rt5640_quirk_cb,
@@ -436,7 +422,7 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
+               .driver_data = (void *)(BYT_RT5640_IN1_MAP |
                                                 BYT_RT5640_MCLK_EN |
                                                 BYT_RT5640_SSP0_AIF1),
 
@@ -446,9 +432,9 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
                },
-               .driver_data = (unsigned long *)(BYT_RT5640_IN3_MAP |
-                                                BYT_RT5640_MCLK_EN |
-                                                BYT_RT5640_SSP0_AIF1),
+               .driver_data = (void *)(BYT_RT5640_IN3_MAP |
+                                       BYT_RT5640_MCLK_EN |
+                                       BYT_RT5640_SSP0_AIF1),
 
        },
        {}
@@ -456,12 +442,12 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 
 static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
 {
-       int ret;
-       struct snd_soc_codec *codec = runtime->codec;
        struct snd_soc_card *card = runtime->card;
-       const struct snd_soc_dapm_route *custom_map;
        struct byt_rt5640_private *priv = snd_soc_card_get_drvdata(card);
+       struct snd_soc_codec *codec = runtime->codec;
+       const struct snd_soc_dapm_route *custom_map;
        int num_routes;
+       int ret;
 
        card->dapm.idle_bias_off = true;
 
@@ -549,7 +535,7 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
        snd_soc_dapm_ignore_suspend(&card->dapm, "Headphone");
        snd_soc_dapm_ignore_suspend(&card->dapm, "Speaker");
 
-       if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && priv->mclk) {
+       if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) {
                /*
                 * The firmware might enable the clock at
                 * boot (this information may or may not
@@ -692,19 +678,11 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
                .dynamic = 1,
                .dpcm_playback = 1,
                .ops = &byt_rt5640_aif1_ops,
-       },
-       [MERR_DPCM_COMPR] = {
-               .name = "Baytrail Compressed Port",
-               .stream_name = "Baytrail Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
        },
                /* back ends */
        {
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port", /* overwritten for ssp0 routing */
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -758,12 +736,12 @@ struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 
 static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 {
-       int ret_val = 0;
-       struct sst_acpi_mach *mach;
+       struct byt_rt5640_private *priv;
+       struct snd_soc_acpi_mach *mach;
        const char *i2c_name = NULL;
+       int ret_val = 0;
+       int dai_index = 0;
        int i;
-       int dai_index;
-       struct byt_rt5640_private *priv;
 
        is_bytcr = false;
        priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_ATOMIC);
@@ -776,7 +754,6 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
        snd_soc_card_set_drvdata(&byt_rt5640_card, priv);
 
        /* fix index of codec dai */
-       dai_index = MERR_DPCM_COMPR + 1;
        for (i = 0; i < ARRAY_SIZE(byt_rt5640_dais); i++) {
                if (!strcmp(byt_rt5640_dais[i].codec_name, "i2c-10EC5640:00")) {
                        dai_index = i;
@@ -785,8 +762,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
        }
 
        /* fixup codec name based on HID */
-       i2c_name = sst_acpi_find_name_from_hid(mach->id);
-       if (i2c_name != NULL) {
+       i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
+       if (i2c_name) {
                snprintf(byt_rt5640_codec_name, sizeof(byt_rt5640_codec_name),
                        "%s%s", "i2c-", i2c_name);
 
@@ -819,7 +796,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
                /* format specified: 2 64-bit integers */
                struct acpi_buffer format = {sizeof("NN"), "NN"};
                struct acpi_buffer state = {0, NULL};
-               struct sst_acpi_package_context pkg_ctx;
+               struct snd_soc_acpi_package_context pkg_ctx;
                bool pkg_found = false;
 
                state.length = sizeof(chan_package);
@@ -831,7 +808,8 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
                pkg_ctx.state = &state;
                pkg_ctx.data_valid = false;
 
-               pkg_found = sst_acpi_find_package_from_hid(mach->id, &pkg_ctx);
+               pkg_found = snd_soc_acpi_find_package_from_hid(mach->id,
+                                                              &pkg_ctx);
                if (pkg_found) {
                        if (chan_package.aif_value == 1) {
                                dev_info(&pdev->dev, "BIOS Routing: AIF1 connected\n");
@@ -891,7 +869,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
                        byt_rt5640_cpu_dai_name;
        }
 
-       if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && (is_valleyview())) {
+       if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) {
                priv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
                if (IS_ERR(priv->mclk)) {
                        ret_val = PTR_ERR(priv->mclk);
index 4a3516b38c2c9727f7138054cee367ab5ede1205..d955836c6870a8ad7d6cbe4939fbc3c457738c77 100644 (file)
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/acpi.h>
+#include <linux/clk.h>
 #include <linux/device.h>
 #include <linux/dmi.h>
 #include <linux/slab.h>
+#include <asm/platform_sst_audio.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
+#include <sound/soc-acpi.h>
 #include "../../codecs/rt5651.h"
 #include "../atom/sst-atom-controls.h"
 
+enum {
+       BYT_RT5651_DMIC_MAP,
+       BYT_RT5651_IN1_MAP,
+       BYT_RT5651_IN2_MAP,
+};
+
+#define BYT_RT5651_MAP(quirk)  ((quirk) & GENMASK(7, 0))
+#define BYT_RT5651_DMIC_EN     BIT(16)
+#define BYT_RT5651_MCLK_EN     BIT(17)
+#define BYT_RT5651_MCLK_25MHZ  BIT(18)
+
+struct byt_rt5651_private {
+       struct clk *mclk;
+       struct snd_soc_jack jack;
+};
+
+static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC_MAP |
+                                       BYT_RT5651_DMIC_EN |
+                                       BYT_RT5651_MCLK_EN;
+
+static void log_quirks(struct device *dev)
+{
+       if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_DMIC_MAP)
+               dev_info(dev, "quirk DMIC_MAP enabled");
+       if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN1_MAP)
+               dev_info(dev, "quirk IN1_MAP enabled");
+       if (BYT_RT5651_MAP(byt_rt5651_quirk) == BYT_RT5651_IN2_MAP)
+               dev_info(dev, "quirk IN2_MAP enabled");
+       if (byt_rt5651_quirk & BYT_RT5651_DMIC_EN)
+               dev_info(dev, "quirk DMIC enabled");
+       if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
+               dev_info(dev, "quirk MCLK_EN enabled");
+       if (byt_rt5651_quirk & BYT_RT5651_MCLK_25MHZ)
+               dev_info(dev, "quirk MCLK_25MHZ enabled");
+}
+
+#define BYT_CODEC_DAI1 "rt5651-aif1"
+
+static int platform_clock_control(struct snd_soc_dapm_widget *w,
+                                 struct snd_kcontrol *k, int  event)
+{
+       struct snd_soc_dapm_context *dapm = w->dapm;
+       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dai *codec_dai;
+       struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card);
+       int ret;
+
+       codec_dai = snd_soc_card_get_codec_dai(card, BYT_CODEC_DAI1);
+       if (!codec_dai) {
+               dev_err(card->dev,
+                       "Codec dai not found; Unable to set platform clock\n");
+               return -EIO;
+       }
+
+       if (SND_SOC_DAPM_EVENT_ON(event)) {
+               if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN) {
+                       ret = clk_prepare_enable(priv->mclk);
+                       if (ret < 0) {
+                               dev_err(card->dev,
+                                       "could not configure MCLK state");
+                               return ret;
+                       }
+               }
+               ret = snd_soc_dai_set_sysclk(codec_dai, RT5651_SCLK_S_PLL1,
+                                            48000 * 512,
+                                            SND_SOC_CLOCK_IN);
+       } else {
+               /*
+                * Set codec clock source to internal clock before
+                * turning off the platform clock. Codec needs clock
+                * for Jack detection and button press
+                */
+               ret = snd_soc_dai_set_sysclk(codec_dai, RT5651_SCLK_S_RCCLK,
+                                            48000 * 512,
+                                            SND_SOC_CLOCK_IN);
+               if (!ret)
+                       if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)
+                               clk_disable_unprepare(priv->mclk);
+       }
+
+       if (ret < 0) {
+               dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
+               return ret;
+       }
+
+       return 0;
+}
+
 static const struct snd_soc_dapm_widget byt_rt5651_widgets[] = {
        SND_SOC_DAPM_HP("Headphone", NULL),
        SND_SOC_DAPM_MIC("Headset Mic", NULL),
        SND_SOC_DAPM_MIC("Internal Mic", NULL),
        SND_SOC_DAPM_SPK("Speaker", NULL),
+       SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
+                           platform_clock_control, SND_SOC_DAPM_PRE_PMU |
+                           SND_SOC_DAPM_POST_PMD),
+
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
+       {"Headphone", NULL, "Platform Clock"},
+       {"Headset Mic", NULL, "Platform Clock"},
+       {"Internal Mic", NULL, "Platform Clock"},
+       {"Speaker", NULL, "Platform Clock"},
+
        {"AIF1 Playback", NULL, "ssp2 Tx"},
        {"ssp2 Tx", NULL, "codec_out0"},
        {"ssp2 Tx", NULL, "codec_out1"},
@@ -47,38 +147,30 @@ static const struct snd_soc_dapm_route byt_rt5651_audio_map[] = {
        {"ssp2 Rx", NULL, "AIF1 Capture"},
 
        {"Headset Mic", NULL, "micbias1"}, /* lowercase for rt5651 */
-       {"IN2P", NULL, "Headset Mic"},
        {"Headphone", NULL, "HPOL"},
        {"Headphone", NULL, "HPOR"},
        {"Speaker", NULL, "LOUTL"},
        {"Speaker", NULL, "LOUTR"},
 };
 
-static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic1_map[] = {
-       {"DMIC1", NULL, "Internal Mic"},
-};
-
-static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic2_map[] = {
-       {"DMIC2", NULL, "Internal Mic"},
+static const struct snd_soc_dapm_route byt_rt5651_intmic_dmic_map[] = {
+       {"IN2P", NULL, "Headset Mic"},
+       {"DMIC L1", NULL, "Internal Mic"},
+       {"DMIC R1", NULL, "Internal Mic"},
 };
 
 static const struct snd_soc_dapm_route byt_rt5651_intmic_in1_map[] = {
        {"Internal Mic", NULL, "micbias1"},
+       {"IN2P", NULL, "Headset Mic"},
        {"IN1P", NULL, "Internal Mic"},
 };
 
-enum {
-       BYT_RT5651_DMIC1_MAP,
-       BYT_RT5651_DMIC2_MAP,
-       BYT_RT5651_IN1_MAP,
+static const struct snd_soc_dapm_route byt_rt5651_intmic_in2_map[] = {
+       {"Internal Mic", NULL, "micbias1"},
+       {"IN1P", NULL, "Headset Mic"},
+       {"IN2P", NULL, "Internal Mic"},
 };
 
-#define BYT_RT5651_MAP(quirk)  ((quirk) & 0xff)
-#define BYT_RT5651_DMIC_EN     BIT(16)
-
-static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC1_MAP |
-                                       BYT_RT5651_DMIC_EN;
-
 static const struct snd_kcontrol_new byt_rt5651_controls[] = {
        SOC_DAPM_PIN_SWITCH("Headphone"),
        SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -86,6 +178,17 @@ static const struct snd_kcontrol_new byt_rt5651_controls[] = {
        SOC_DAPM_PIN_SWITCH("Speaker"),
 };
 
+static struct snd_soc_jack_pin bytcr_jack_pins[] = {
+       {
+               .pin    = "Headphone",
+               .mask   = SND_JACK_HEADPHONE,
+       },
+       {
+               .pin    = "Headset Mic",
+               .mask   = SND_JACK_MICROPHONE,
+       },
+};
+
 static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream,
                                        struct snd_pcm_hw_params *params)
 {
@@ -103,9 +206,26 @@ static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream,
                return ret;
        }
 
-       ret = snd_soc_dai_set_pll(codec_dai, 0, RT5651_PLL1_S_BCLK1,
-                                 params_rate(params) * 50,
-                                 params_rate(params) * 512);
+       if (!(byt_rt5651_quirk & BYT_RT5651_MCLK_EN)) {
+               /* 2x25 bit slots on SSP2 */
+               ret = snd_soc_dai_set_pll(codec_dai, 0,
+                                       RT5651_PLL1_S_BCLK1,
+                                       params_rate(params) * 50,
+                                       params_rate(params) * 512);
+       } else {
+               if (byt_rt5651_quirk & BYT_RT5651_MCLK_25MHZ) {
+                       ret = snd_soc_dai_set_pll(codec_dai, 0,
+                                               RT5651_PLL1_S_MCLK,
+                                               25000000,
+                                               params_rate(params) * 512);
+               } else {
+                       ret = snd_soc_dai_set_pll(codec_dai, 0,
+                                               RT5651_PLL1_S_MCLK,
+                                               19200000,
+                                               params_rate(params) * 512);
+               }
+       }
+
        if (ret < 0) {
                dev_err(rtd->dev, "can't set codec pll: %d\n", ret);
                return ret;
@@ -114,33 +234,60 @@ static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
+static int byt_rt5651_quirk_cb(const struct dmi_system_id *id)
+{
+       byt_rt5651_quirk = (unsigned long)id->driver_data;
+       return 1;
+}
+
 static const struct dmi_system_id byt_rt5651_quirk_table[] = {
+       {
+               .callback = byt_rt5651_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Circuitco"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Minnowboard Max B3 PLATFORM"),
+               },
+               .driver_data = (void *)(BYT_RT5651_DMIC_MAP |
+                                       BYT_RT5651_DMIC_EN),
+       },
+       {
+               .callback = byt_rt5651_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "KIANO"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "KIANO SlimNote 14.2"),
+               },
+               .driver_data = (void *)(BYT_RT5651_IN2_MAP),
+       },
        {}
 };
 
 static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
 {
-       int ret;
        struct snd_soc_card *card = runtime->card;
+       struct snd_soc_codec *codec = runtime->codec;
+       struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card);
        const struct snd_soc_dapm_route *custom_map;
        int num_routes;
+       int ret;
 
        card->dapm.idle_bias_off = true;
 
-       dmi_check_system(byt_rt5651_quirk_table);
        switch (BYT_RT5651_MAP(byt_rt5651_quirk)) {
        case BYT_RT5651_IN1_MAP:
                custom_map = byt_rt5651_intmic_in1_map;
                num_routes = ARRAY_SIZE(byt_rt5651_intmic_in1_map);
                break;
-       case BYT_RT5651_DMIC2_MAP:
-               custom_map = byt_rt5651_intmic_dmic2_map;
-               num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic2_map);
+       case BYT_RT5651_IN2_MAP:
+               custom_map = byt_rt5651_intmic_in2_map;
+               num_routes = ARRAY_SIZE(byt_rt5651_intmic_in2_map);
                break;
        default:
-               custom_map = byt_rt5651_intmic_dmic1_map;
-               num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic1_map);
+               custom_map = byt_rt5651_intmic_dmic_map;
+               num_routes = ARRAY_SIZE(byt_rt5651_intmic_dmic_map);
        }
+       ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes);
+       if (ret)
+               return ret;
 
        ret = snd_soc_add_card_controls(card, byt_rt5651_controls,
                                        ARRAY_SIZE(byt_rt5651_controls));
@@ -151,6 +298,40 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
        snd_soc_dapm_ignore_suspend(&card->dapm, "Headphone");
        snd_soc_dapm_ignore_suspend(&card->dapm, "Speaker");
 
+       if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN) {
+               /*
+                * The firmware might enable the clock at
+                * boot (this information may or may not
+                * be reflected in the enable clock register).
+                * To change the rate we must disable the clock
+                * first to cover these cases. Due to common
+                * clock framework restrictions that do not allow
+                * to disable a clock that has not been enabled,
+                * we need to enable the clock first.
+                */
+               ret = clk_prepare_enable(priv->mclk);
+               if (!ret)
+                       clk_disable_unprepare(priv->mclk);
+
+               if (byt_rt5651_quirk & BYT_RT5651_MCLK_25MHZ)
+                       ret = clk_set_rate(priv->mclk, 25000000);
+               else
+                       ret = clk_set_rate(priv->mclk, 19200000);
+
+               if (ret)
+                       dev_err(card->dev, "unable to set MCLK rate\n");
+       }
+
+       ret = snd_soc_card_jack_new(runtime->card, "Headset",
+                                   SND_JACK_HEADSET, &priv->jack,
+                                   bytcr_jack_pins, ARRAY_SIZE(bytcr_jack_pins));
+       if (ret) {
+               dev_err(runtime->dev, "Headset jack creation failed %d\n", ret);
+               return ret;
+       }
+
+       rt5651_set_jack_detect(codec, &priv->jack);
+
        return ret;
 }
 
@@ -253,19 +434,11 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
                .dpcm_playback = 1,
                .ops = &byt_rt5651_aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
        /* CODEC<->CODEC link */
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -296,13 +469,65 @@ static struct snd_soc_card byt_rt5651_card = {
        .fully_routed = true,
 };
 
+static char byt_rt5651_codec_name[16]; /* i2c-<HID>:00 with HID being 8 chars */
+
 static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 {
+       struct byt_rt5651_private *priv;
+       struct snd_soc_acpi_mach *mach;
+       const char *i2c_name = NULL;
        int ret_val = 0;
+       int dai_index = 0;
+       int i;
+
+       priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_ATOMIC);
+       if (!priv)
+               return -ENOMEM;
 
        /* register the soc card */
        byt_rt5651_card.dev = &pdev->dev;
 
+       mach = byt_rt5651_card.dev->platform_data;
+       snd_soc_card_set_drvdata(&byt_rt5651_card, priv);
+
+       /* fix index of codec dai */
+       for (i = 0; i < ARRAY_SIZE(byt_rt5651_dais); i++) {
+               if (!strcmp(byt_rt5651_dais[i].codec_name, "i2c-10EC5651:00")) {
+                       dai_index = i;
+                       break;
+               }
+       }
+
+       /* fixup codec name based on HID */
+       i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
+       if (i2c_name) {
+               snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
+                       "%s%s", "i2c-", i2c_name);
+
+               byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name;
+       }
+
+       /* check quirks before creating card */
+       dmi_check_system(byt_rt5651_quirk_table);
+       log_quirks(&pdev->dev);
+
+       if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN) {
+               priv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+               if (IS_ERR(priv->mclk)) {
+                       dev_err(&pdev->dev,
+                               "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
+                               PTR_ERR(priv->mclk));
+                       /*
+                        * Fall back to bit clock usage for -ENOENT (clock not
+                        * available likely due to missing dependencies), bail
+                        * for all other errors, including -EPROBE_DEFER
+                        */
+                       if (ret_val != -ENOENT)
+                               return ret_val;
+                       byt_rt5651_quirk &= ~BYT_RT5651_MCLK_EN;
+               }
+       }
+
        ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card);
 
        if (ret_val) {
index 20755ecc7f9ea7e17d1fcdd5096f577929bb1957..d3e1c7e12004dded46fd24ac9345758cea556233 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/acpi.h>
+#include <linux/clk.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #define CHT_CODEC_DAI  "HiFi"
 
 struct cht_mc_private {
+       struct clk *mclk;
        struct snd_soc_jack jack;
        bool ts3a227e_present;
 };
 
+static int platform_clock_control(struct snd_soc_dapm_widget *w,
+                                         struct snd_kcontrol *k, int  event)
+{
+       struct snd_soc_dapm_context *dapm = w->dapm;
+       struct snd_soc_card *card = dapm->card;
+       struct snd_soc_dai *codec_dai;
+       struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
+       int ret;
+
+       codec_dai = snd_soc_card_get_codec_dai(card, CHT_CODEC_DAI);
+       if (!codec_dai) {
+               dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");
+               return -EIO;
+       }
+
+       if (SND_SOC_DAPM_EVENT_ON(event)) {
+               ret = clk_prepare_enable(ctx->mclk);
+               if (ret < 0) {
+                       dev_err(card->dev,
+                               "could not configure MCLK state");
+                       return ret;
+               }
+       } else {
+               clk_disable_unprepare(ctx->mclk);
+       }
+
+       return 0;
+}
+
 static const struct snd_soc_dapm_widget cht_dapm_widgets[] = {
        SND_SOC_DAPM_HP("Headphone", NULL),
        SND_SOC_DAPM_MIC("Headset Mic", NULL),
        SND_SOC_DAPM_MIC("Int Mic", NULL),
        SND_SOC_DAPM_SPK("Ext Spk", NULL),
+       SND_SOC_DAPM_SUPPLY("Platform Clock", SND_SOC_NOPM, 0, 0,
+                           platform_clock_control, SND_SOC_DAPM_PRE_PMU |
+                           SND_SOC_DAPM_POST_PMD),
 };
 
 static const struct snd_soc_dapm_route cht_audio_map[] = {
@@ -60,6 +94,10 @@ static const struct snd_soc_dapm_route cht_audio_map[] = {
        {"codec_in0", NULL, "ssp2 Rx" },
        {"codec_in1", NULL, "ssp2 Rx" },
        {"ssp2 Rx", NULL, "HiFi Capture"},
+       {"Headphone", NULL, "Platform Clock"},
+       {"Headset Mic", NULL, "Platform Clock"},
+       {"Int Mic", NULL, "Platform Clock"},
+       {"Ext Spk", NULL, "Platform Clock"},
 };
 
 static const struct snd_kcontrol_new cht_mc_controls[] = {
@@ -109,6 +147,40 @@ static struct notifier_block cht_jack_nb = {
        .notifier_call = cht_ti_jack_event,
 };
 
+static struct snd_soc_jack_pin hs_jack_pins[] = {
+       {
+               .pin    = "Headphone",
+               .mask   = SND_JACK_HEADPHONE,
+       },
+       {
+               .pin    = "Headset Mic",
+               .mask   = SND_JACK_MICROPHONE,
+       },
+};
+
+static struct snd_soc_jack_gpio hs_jack_gpios[] = {
+       {
+               .name           = "hp",
+               .report         = SND_JACK_HEADPHONE | SND_JACK_LINEOUT,
+               .debounce_time  = 200,
+       },
+       {
+               .name           = "mic",
+               .invert         = 1,
+               .report         = SND_JACK_MICROPHONE,
+               .debounce_time  = 200,
+       },
+};
+
+static const struct acpi_gpio_params hp_gpios = { 0, 0, false };
+static const struct acpi_gpio_params mic_gpios = { 1, 0, false };
+
+static const struct acpi_gpio_mapping acpi_max98090_gpios[] = {
+       { "hp-gpios", &hp_gpios, 1 },
+       { "mic-gpios", &mic_gpios, 1 },
+       {},
+};
+
 static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
        int ret;
@@ -116,30 +188,55 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
        struct snd_soc_jack *jack = &ctx->jack;
 
-       /**
-       * TI supports 4 butons headset detection
-       * KEY_MEDIA
-       * KEY_VOICECOMMAND
-       * KEY_VOLUMEUP
-       * KEY_VOLUMEDOWN
-       */
-       if (ctx->ts3a227e_present)
-               jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
-                                       SND_JACK_BTN_0 | SND_JACK_BTN_1 |
-                                       SND_JACK_BTN_2 | SND_JACK_BTN_3;
-       else
-               jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE;
+       if (ctx->ts3a227e_present) {
+               /*
+                * The jack has already been created in the
+                * cht_max98090_headset_init() function.
+                */
+               snd_soc_jack_notifier_register(jack, &cht_jack_nb);
+               return 0;
+       }
 
-       ret = snd_soc_card_jack_new(runtime->card, "Headset Jack",
-                                       jack_type, jack, NULL, 0);
+       jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE;
 
+       ret = snd_soc_card_jack_new(runtime->card, "Headset Jack",
+                                   jack_type, jack,
+                                   hs_jack_pins, ARRAY_SIZE(hs_jack_pins));
        if (ret) {
                dev_err(runtime->dev, "Headset Jack creation failed %d\n", ret);
                return ret;
        }
 
-       if (ctx->ts3a227e_present)
-               snd_soc_jack_notifier_register(jack, &cht_jack_nb);
+       ret = snd_soc_jack_add_gpiods(runtime->card->dev->parent, jack,
+                                     ARRAY_SIZE(hs_jack_gpios),
+                                     hs_jack_gpios);
+       if (ret) {
+               /*
+                * flag error but don't bail if jack detect is broken
+                * due to platform issues or bad BIOS/configuration
+                */
+               dev_err(runtime->dev,
+                       "jack detection gpios not added, error %d\n", ret);
+       }
+
+       /*
+        * The firmware might enable the clock at
+        * boot (this information may or may not
+        * be reflected in the enable clock register).
+        * To change the rate we must disable the clock
+        * first to cover these cases. Due to common
+        * clock framework restrictions that do not allow
+        * to disable a clock that has not been enabled,
+        * we need to enable the clock first.
+        */
+       ret = clk_prepare_enable(ctx->mclk);
+       if (!ret)
+               clk_disable_unprepare(ctx->mclk);
+
+       ret = clk_set_rate(ctx->mclk, CHT_PLAT_CLK_3_HZ);
+
+       if (ret)
+               dev_err(runtime->dev, "unable to set MCLK rate\n");
 
        return ret;
 }
@@ -160,7 +257,7 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
                return ret;
        }
 
-       fmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF
+       fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBS_CFS;
 
        ret = snd_soc_dai_set_fmt(rtd->cpu_dai, fmt);
@@ -173,8 +270,8 @@ static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        rate->min = rate->max = 48000;
        channels->min = channels->max = 2;
 
-       /* set SSP2 to 24-bit */
-       params_set_format(params, SNDRV_PCM_FORMAT_S24_LE);
+       /* set SSP2 to 16-bit */
+       params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
        return 0;
 }
 
@@ -188,8 +285,29 @@ static int cht_max98090_headset_init(struct snd_soc_component *component)
 {
        struct snd_soc_card *card = component->card;
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
+       struct snd_soc_jack *jack = &ctx->jack;
+       int jack_type;
+       int ret;
 
-       return ts3a227e_enable_jack_detect(component, &ctx->jack);
+       /*
+        * TI supports 4 butons headset detection
+        * KEY_MEDIA
+        * KEY_VOICECOMMAND
+        * KEY_VOLUMEUP
+        * KEY_VOLUMEDOWN
+        */
+       jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
+                   SND_JACK_BTN_0 | SND_JACK_BTN_1 |
+                   SND_JACK_BTN_2 | SND_JACK_BTN_3;
+
+       ret = snd_soc_card_jack_new(card, "Headset Jack", jack_type,
+                                   jack, NULL, 0);
+       if (ret) {
+               dev_err(card->dev, "Headset Jack creation failed %d\n", ret);
+               return ret;
+       }
+
+       return ts3a227e_enable_jack_detect(component, jack);
 }
 
 static const struct snd_soc_ops cht_aif1_ops = {
@@ -232,18 +350,10 @@ static struct snd_soc_dai_link cht_dailink[] = {
                .dpcm_playback = 1,
                .ops = &cht_aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -277,6 +387,7 @@ static struct snd_soc_card snd_soc_card_cht = {
 
 static int snd_cht_mc_probe(struct platform_device *pdev)
 {
+       struct device *dev = &pdev->dev;
        int ret_val = 0;
        struct cht_mc_private *drv;
 
@@ -289,11 +400,25 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                /* no need probe TI jack detection chip */
                snd_soc_card_cht.aux_dev = NULL;
                snd_soc_card_cht.num_aux_devs = 0;
+
+               ret_val = devm_acpi_dev_add_driver_gpios(dev->parent,
+                                                        acpi_max98090_gpios);
+               if (ret_val)
+                       dev_dbg(dev, "Unable to add GPIO mapping table\n");
        }
 
        /* register the soc card */
        snd_soc_card_cht.dev = &pdev->dev;
        snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
+
+       drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+       if (IS_ERR(drv->mclk)) {
+               dev_err(&pdev->dev,
+                       "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
+                       PTR_ERR(drv->mclk));
+               return PTR_ERR(drv->mclk);
+       }
+
        ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
        if (ret_val) {
                dev_err(&pdev->dev,
index 5bcde01d15e68d31dd6292ba9a7a8deedf7f0161..18d129caa974f7c905930d6381f7673820b0323f 100644 (file)
  */
 
 #include <linux/module.h>
-#include <linux/acpi.h>
 #include <linux/platform_device.h>
+#include <linux/acpi.h>
+#include <linux/clk.h>
 #include <linux/dmi.h>
 #include <linux/slab.h>
 #include <asm/cpu_device_id.h>
 #include <asm/platform_sst_audio.h>
-#include <linux/clk.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
+#include <sound/soc-acpi.h>
 #include "../../codecs/rt5645.h"
 #include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
 
 #define CHT_PLAT_CLK_3_HZ      19200000
 #define CHT_CODEC_DAI1 "rt5645-aif1"
@@ -53,7 +53,7 @@ struct cht_mc_private {
        struct clk *mclk;
 };
 
-#define CHT_RT5645_MAP(quirk)  ((quirk) & 0xff)
+#define CHT_RT5645_MAP(quirk)  ((quirk) & GENMASK(7, 0))
 #define CHT_RT5645_SSP2_AIF2     BIT(16) /* default is using AIF1  */
 #define CHT_RT5645_SSP0_AIF1     BIT(17)
 #define CHT_RT5645_SSP0_AIF2     BIT(18)
@@ -70,21 +70,6 @@ static void log_quirks(struct device *dev)
                dev_info(dev, "quirk SSP0_AIF2 enabled");
 }
 
-static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-               if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI1,
-                            strlen(CHT_CODEC_DAI1)))
-                       return rtd->codec_dai;
-               if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI2,
-                            strlen(CHT_CODEC_DAI2)))
-                       return rtd->codec_dai;
-       }
-       return NULL;
-}
-
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
                struct snd_kcontrol *k, int  event)
 {
@@ -94,20 +79,21 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
        int ret;
 
-       codec_dai = cht_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, CHT_CODEC_DAI1);
+       if (!codec_dai)
+               codec_dai = snd_soc_card_get_codec_dai(card, CHT_CODEC_DAI2);
+
        if (!codec_dai) {
                dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");
                return -EIO;
        }
 
        if (SND_SOC_DAPM_EVENT_ON(event)) {
-               if (ctx->mclk) {
-                       ret = clk_prepare_enable(ctx->mclk);
-                       if (ret < 0) {
-                               dev_err(card->dev,
-                                       "could not configure MCLK state");
-                               return ret;
-                       }
+               ret = clk_prepare_enable(ctx->mclk);
+               if (ret < 0) {
+                       dev_err(card->dev,
+                               "could not configure MCLK state");
+                       return ret;
                }
        } else {
                /* Set codec sysclk source to its internal clock because codec PLL will
@@ -122,8 +108,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
                        return ret;
                }
 
-               if (ctx->mclk)
-                       clk_disable_unprepare(ctx->mclk);
+               clk_disable_unprepare(ctx->mclk);
        }
 
        return 0;
@@ -258,11 +243,11 @@ static const struct dmi_system_id cht_rt5645_quirk_table[] = {
 
 static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
-       int ret;
-       int jack_type;
-       struct snd_soc_codec *codec = runtime->codec;
        struct snd_soc_card *card = runtime->card;
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
+       struct snd_soc_codec *codec = runtime->codec;
+       int jack_type;
+       int ret;
 
        if ((cht_rt5645_quirk & CHT_RT5645_SSP2_AIF2) ||
            (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2)) {
@@ -320,26 +305,26 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 
        rt5645_set_jack_detect(codec, &ctx->jack, &ctx->jack, &ctx->jack);
 
-       if (ctx->mclk) {
-               /*
-                * The firmware might enable the clock at
-                * boot (this information may or may not
-                * be reflected in the enable clock register).
-                * To change the rate we must disable the clock
-                * first to cover these cases. Due to common
-                * clock framework restrictions that do not allow
-                * to disable a clock that has not been enabled,
-                * we need to enable the clock first.
-                */
-               ret = clk_prepare_enable(ctx->mclk);
-               if (!ret)
-                       clk_disable_unprepare(ctx->mclk);
 
-               ret = clk_set_rate(ctx->mclk, CHT_PLAT_CLK_3_HZ);
+       /*
+        * The firmware might enable the clock at
+        * boot (this information may or may not
+        * be reflected in the enable clock register).
+        * To change the rate we must disable the clock
+        * first to cover these cases. Due to common
+        * clock framework restrictions that do not allow
+        * to disable a clock that has not been enabled,
+        * we need to enable the clock first.
+        */
+       ret = clk_prepare_enable(ctx->mclk);
+       if (!ret)
+               clk_disable_unprepare(ctx->mclk);
+
+       ret = clk_set_rate(ctx->mclk, CHT_PLAT_CLK_3_HZ);
+
+       if (ret)
+               dev_err(runtime->dev, "unable to set MCLK rate\n");
 
-               if (ret)
-                       dev_err(runtime->dev, "unable to set MCLK rate\n");
-       }
        return ret;
 }
 
@@ -460,19 +445,11 @@ static struct snd_soc_dai_link cht_dailink[] = {
                .dpcm_playback = 1,
                .ops = &cht_aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
        /* CODEC<->CODEC link */
        /* back ends */
        {
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -545,15 +522,15 @@ struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 
 static int snd_cht_mc_probe(struct platform_device *pdev)
 {
-       int ret_val = 0;
-       int i;
-       struct cht_mc_private *drv;
        struct snd_soc_card *card = snd_soc_cards[0].soc_card;
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
+       struct cht_mc_private *drv;
        const char *i2c_name = NULL;
-       int dai_index = 0;
        bool found = false;
        bool is_bytcr = false;
+       int dai_index = 0;
+       int ret_val = 0;
+       int i;
 
        drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC);
        if (!drv)
@@ -589,8 +566,8 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                }
 
        /* fixup codec name based on HID */
-       i2c_name = sst_acpi_find_name_from_hid(mach->id);
-       if (i2c_name != NULL) {
+       i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
+       if (i2c_name) {
                snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name),
                        "%s%s", "i2c-", i2c_name);
                cht_dailink[dai_index].codec_name = cht_rt5645_codec_name;
@@ -622,7 +599,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                /* format specified: 2 64-bit integers */
                struct acpi_buffer format = {sizeof("NN"), "NN"};
                struct acpi_buffer state = {0, NULL};
-               struct sst_acpi_package_context pkg_ctx;
+               struct snd_soc_acpi_package_context pkg_ctx;
                bool pkg_found = false;
 
                state.length = sizeof(chan_package);
@@ -634,7 +611,8 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                pkg_ctx.state = &state;
                pkg_ctx.data_valid = false;
 
-               pkg_found = sst_acpi_find_package_from_hid(mach->id, &pkg_ctx);
+               pkg_found = snd_soc_acpi_find_package_from_hid(mach->id,
+                                                              &pkg_ctx);
                if (pkg_found) {
                        if (chan_package.aif_value == 1) {
                                dev_info(&pdev->dev, "BIOS Routing: AIF1 connected\n");
@@ -682,14 +660,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                        cht_rt5645_cpu_dai_name;
        }
 
-       if (is_valleyview()) {
-               drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
-               if (IS_ERR(drv->mclk)) {
-                       dev_err(&pdev->dev,
-                               "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
-                               PTR_ERR(drv->mclk));
-                       return PTR_ERR(drv->mclk);
-               }
+       drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+       if (IS_ERR(drv->mclk)) {
+               dev_err(&pdev->dev,
+                       "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
+                       PTR_ERR(drv->mclk));
+               return PTR_ERR(drv->mclk);
        }
 
        snd_soc_card_set_drvdata(card, drv);
index f597d558222388e0b52302395ecfbf22a5a127d7..f8f21eee9b2d373e4d8c60e8d696286e598e0ad0 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/clk.h>
-#include <asm/cpu_device_id.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/jack.h>
+#include <sound/soc-acpi.h>
 #include "../../codecs/rt5670.h"
 #include "../atom/sst-atom-controls.h"
-#include "../common/sst-acpi.h"
+
 
 /* The platform clock #3 outputs 19.2Mhz clock to codec as I2S MCLK */
 #define CHT_PLAT_CLK_3_HZ      19200000
@@ -51,18 +51,6 @@ static struct snd_soc_jack_pin cht_bsw_headset_pins[] = {
        },
 };
 
-static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-               if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI,
-                            strlen(CHT_CODEC_DAI)))
-                       return rtd->codec_dai;
-       }
-       return NULL;
-}
-
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
                struct snd_kcontrol *k, int  event)
 {
@@ -72,7 +60,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
        int ret;
 
-       codec_dai = cht_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, CHT_CODEC_DAI);
        if (!codec_dai) {
                dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");
                return -EIO;
@@ -315,20 +303,12 @@ static struct snd_soc_dai_link cht_dailink[] = {
                .dpcm_playback = 1,
                .ops = &cht_aif1_ops,
        },
-       [MERR_DPCM_COMPR] = {
-               .name = "Compressed Port",
-               .stream_name = "Compress",
-               .cpu_dai_name = "compress-cpu-dai",
-               .codec_dai_name = "snd-soc-dummy-dai",
-               .codec_name = "snd-soc-dummy",
-               .platform_name = "sst-mfld-platform",
-       },
 
        /* Back End DAI links */
        {
                /* SSP2 - Codec */
                .name = "SSP2-Codec",
-               .id = 1,
+               .id = 0,
                .cpu_dai_name = "ssp2-port",
                .platform_name = "sst-mfld-platform",
                .no_pcm = 1,
@@ -348,9 +328,11 @@ static struct snd_soc_dai_link cht_dailink[] = {
 static int cht_suspend_pre(struct snd_soc_card *card)
 {
        struct snd_soc_component *component;
+       struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
 
        list_for_each_entry(component, &card->component_dev_list, card_list) {
-               if (!strcmp(component->name, "i2c-10EC5670:00")) {
+               if (!strncmp(component->name,
+                            ctx->codec_name, sizeof(ctx->codec_name))) {
                        struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 
                        dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n");
@@ -364,9 +346,11 @@ static int cht_suspend_pre(struct snd_soc_card *card)
 static int cht_resume_post(struct snd_soc_card *card)
 {
        struct snd_soc_component *component;
+       struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
 
        list_for_each_entry(component, &card->component_dev_list, card_list) {
-               if (!strcmp(component->name, "i2c-10EC5670:00")) {
+               if (!strncmp(component->name,
+                            ctx->codec_name, sizeof(ctx->codec_name))) {
                        struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 
                        dev_dbg(codec->dev, "enabling jack detect for resume.\n");
@@ -380,7 +364,7 @@ static int cht_resume_post(struct snd_soc_card *card)
 
 /* SoC card */
 static struct snd_soc_card snd_soc_card_cht = {
-       .name = "cherrytrailcraudio",
+       .name = "cht-bsw-rt5672",
        .owner = THIS_MODULE,
        .dai_link = cht_dailink,
        .num_links = ARRAY_SIZE(cht_dailink),
@@ -394,25 +378,13 @@ static struct snd_soc_card snd_soc_card_cht = {
        .resume_post = cht_resume_post,
 };
 
-static bool is_valleyview(void)
-{
-       static const struct x86_cpu_id cpu_ids[] = {
-               { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
-               {}
-       };
-
-       if (!x86_match_cpu(cpu_ids))
-               return false;
-       return true;
-}
-
 #define RT5672_I2C_DEFAULT     "i2c-10EC5670:00"
 
 static int snd_cht_mc_probe(struct platform_device *pdev)
 {
        int ret_val = 0;
        struct cht_mc_private *drv;
-       struct sst_acpi_mach *mach = pdev->dev.platform_data;
+       struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
        const char *i2c_name;
        int i;
 
@@ -424,7 +396,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 
        /* fixup codec name based on HID */
        if (mach) {
-               i2c_name = sst_acpi_find_name_from_hid(mach->id);
+               i2c_name = snd_soc_acpi_find_name_from_hid(mach->id);
                if (i2c_name) {
                        snprintf(drv->codec_name, sizeof(drv->codec_name),
                                 "i2c-%s", i2c_name);
@@ -439,14 +411,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
                }
        }
 
-       if (is_valleyview()) {
-               drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
-               if (IS_ERR(drv->mclk)) {
-                       dev_err(&pdev->dev,
-                               "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
-                               PTR_ERR(drv->mclk));
-                       return PTR_ERR(drv->mclk);
-               }
+       drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
+       if (IS_ERR(drv->mclk)) {
+               dev_err(&pdev->dev,
+                       "Failed to get MCLK from pmc_plt_clk_3: %ld\n",
+                       PTR_ERR(drv->mclk));
+               return PTR_ERR(drv->mclk);
        }
        snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
 
index 7f76074207063a5da6ad8c9874002646d42c88c1..6f9a8bcf20f3ebb4407a2452eed8870a11b40c02 100644 (file)
@@ -17,6 +17,7 @@
  * GNU General Public License for more details.
  */
 
+#include <linux/input.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <sound/core.h>
@@ -208,6 +209,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
        int ret;
        struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card);
        struct snd_soc_codec *codec = rtd->codec;
+       struct snd_soc_jack *jack;
 
        /*
         * Headset buttons map to the google Reference headset.
@@ -221,6 +223,13 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
                dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret);
                return ret;
        }
+
+       jack = &ctx->kabylake_headset;
+       snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
+       snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
+       snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
+       snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
+
        rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
        return ret;
 }
@@ -341,13 +350,28 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
        struct snd_interval *channels = hw_param_interval(params,
                        SNDRV_PCM_HW_PARAM_CHANNELS);
        struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+       struct snd_soc_dpcm *dpcm = container_of(
+                       params, struct snd_soc_dpcm, hw_params);
+       struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link;
+       struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link;
 
-       /* The ADSP will convert the FE rate to 48k, stereo */
-       rate->min = rate->max = 48000;
-       channels->min = channels->max = 2;
-       /* set SSP1 to 24 bit */
-       snd_mask_none(fmt);
-       snd_mask_set(fmt, SNDRV_PCM_FORMAT_S24_LE);
+       /*
+        * The ADSP will convert the FE rate to 48k, stereo, 24 bit
+        */
+       if (!strcmp(fe_dai_link->name, "Kbl Audio Port") ||
+           !strcmp(fe_dai_link->name, "Kbl Audio Headset Playback") ||
+           !strcmp(fe_dai_link->name, "Kbl Audio Capture Port")) {
+               rate->min = rate->max = 48000;
+               channels->min = channels->max = 2;
+               snd_mask_none(fmt);
+               snd_mask_set(fmt, SNDRV_PCM_FORMAT_S24_LE);
+       }
+       /*
+        * The speaker on the SSP0 supports S16_LE and not S24_LE.
+        * thus changing the mask here
+        */
+       if (!strcmp(be_dai_link->name, "SSP0-Codec"))
+               snd_mask_set(fmt, SNDRV_PCM_FORMAT_S16_LE);
 
        return 0;
 }
@@ -390,6 +414,43 @@ static int kabylake_dmic_fixup(struct snd_soc_pcm_runtime *rtd,
        return 0;
 }
 
+static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
+                                       struct snd_pcm_hw_params *params)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       int ret = 0, j;
+
+       for (j = 0; j < rtd->num_codecs; j++) {
+               struct snd_soc_dai *codec_dai = rtd->codec_dais[j];
+
+               if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME)) {
+                       /*
+                        * Use channel 4 and 5 for the first amp
+                        */
+                       ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x30, 3, 8, 16);
+                       if (ret < 0) {
+                               dev_err(rtd->dev, "set TDM slot err:%d\n", ret);
+                               return ret;
+                       }
+               }
+               if (!strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) {
+                       /*
+                        * Use channel 6 and 7 for the second amp
+                        */
+                       ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xC0, 3, 8, 16);
+                       if (ret < 0) {
+                               dev_err(rtd->dev, "set TDM slot err:%d\n", ret);
+                               return ret;
+                       }
+               }
+       }
+       return ret;
+}
+
+static struct snd_soc_ops kabylake_ssp0_ops = {
+       .hw_params = kabylake_ssp0_hw_params,
+};
+
 static unsigned int channels_dmic[] = {
        2, 4,
 };
@@ -593,12 +654,13 @@ static struct snd_soc_dai_link kabylake_dais[] = {
                .no_pcm = 1,
                .codecs = max98927_codec_components,
                .num_codecs = ARRAY_SIZE(max98927_codec_components),
-               .dai_fmt = SND_SOC_DAIFMT_I2S |
+               .dai_fmt = SND_SOC_DAIFMT_DSP_B |
                        SND_SOC_DAIFMT_NB_NF |
                        SND_SOC_DAIFMT_CBS_CFS,
                .ignore_pmdown_time = 1,
                .be_hw_params_fixup = kabylake_ssp_fixup,
                .dpcm_playback = 1,
+               .ops = &kabylake_ssp0_ops,
        },
        {
                /* SSP1 - Codec */
index 88ff542200075634e9a6b6e0fd0a7f1ba1dbaf7a..6072164f2d43db7c7f8f50000892f6e61e80d79c 100644 (file)
@@ -302,6 +302,7 @@ static int kabylake_ssp_fixup(struct snd_soc_pcm_runtime *rtd,
         * The ADSP will convert the FE rate to 48k, stereo, 24 bit
         */
        if (!strcmp(fe_dai_link->name, "Kbl Audio Port") ||
+           !strcmp(fe_dai_link->name, "Kbl Audio Headset Playback") ||
            !strcmp(fe_dai_link->name, "Kbl Audio Capture Port")) {
                rate->min = rate->max = 48000;
                channels->min = channels->max = 2;
@@ -604,6 +605,8 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
 
        list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
                codec = pcm->codec_dai->codec;
+               snprintf(jack_name, sizeof(jack_name),
+                       "HDMI/DP,pcm=%d Jack", pcm->device);
                err = snd_soc_card_jack_new(card, jack_name,
                                SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
                                NULL, 0);
index 5ed0aa27b467d0e4807a6fefecfb216334d49daf..1b5a689dc99bb4810194a0bd068fea8f75c99426 100644 (file)
@@ -54,20 +54,6 @@ enum {
        SKL_DPCM_AUDIO_HDMI3_PB,
 };
 
-static inline struct snd_soc_dai *skl_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-
-               if (!strncmp(rtd->codec_dai->name, SKL_NUVOTON_CODEC_DAI,
-                            strlen(SKL_NUVOTON_CODEC_DAI)))
-                       return rtd->codec_dai;
-       }
-
-       return NULL;
-}
-
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *k, int  event)
 {
@@ -76,7 +62,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct snd_soc_dai *codec_dai;
        int ret;
 
-       codec_dai = skl_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, SKL_NUVOTON_CODEC_DAI);
        if (!codec_dai) {
                dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");
                return -EIO;
index 01b8b140bb0874af87fa3ef98a4213bf7f6c74a5..7bea4bc774815a83e7d4f9490398fda08d4a48d8 100644 (file)
@@ -57,20 +57,6 @@ enum {
        SKL_DPCM_AUDIO_HDMI3_PB,
 };
 
-static inline struct snd_soc_dai *skl_get_codec_dai(struct snd_soc_card *card)
-{
-       struct snd_soc_pcm_runtime *rtd;
-
-       list_for_each_entry(rtd, &card->rtd_list, list) {
-
-               if (!strncmp(rtd->codec_dai->name, SKL_NUVOTON_CODEC_DAI,
-                            strlen(SKL_NUVOTON_CODEC_DAI)))
-                       return rtd->codec_dai;
-       }
-
-       return NULL;
-}
-
 static const struct snd_kcontrol_new skylake_controls[] = {
        SOC_DAPM_PIN_SWITCH("Headphone Jack"),
        SOC_DAPM_PIN_SWITCH("Headset Mic"),
@@ -86,7 +72,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
        struct snd_soc_dai *codec_dai;
        int ret;
 
-       codec_dai = skl_get_codec_dai(card);
+       codec_dai = snd_soc_card_get_codec_dai(card, SKL_NUVOTON_CODEC_DAI);
        if (!codec_dai) {
                dev_err(card->dev, "Codec dai not found\n");
                return -EIO;
index 1a35149bcad7d5e33b21f3c15da26ba6ee45c733..7379d8830c391e422ec89d0c15f0e0d1fcc94ff4 100644 (file)
@@ -1,10 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-sst-dsp-objs := sst-dsp.o
 snd-soc-sst-acpi-objs := sst-acpi.o
-snd-soc-sst-match-objs := sst-match-acpi.o
 snd-soc-sst-ipc-objs := sst-ipc.o
 snd-soc-sst-firmware-objs := sst-firmware.o
+snd-soc-acpi-intel-match-objs := soc-acpi-intel-byt-match.o soc-acpi-intel-cht-match.o soc-acpi-intel-hsw-bdw-match.o
 
 obj-$(CONFIG_SND_SOC_INTEL_SST) += snd-soc-sst-dsp.o snd-soc-sst-ipc.o
 obj-$(CONFIG_SND_SOC_INTEL_SST_ACPI) += snd-soc-sst-acpi.o
-obj-$(CONFIG_SND_SOC_INTEL_SST_MATCH) += snd-soc-sst-match.o
 obj-$(CONFIG_SND_SOC_INTEL_SST_FIRMWARE) += snd-soc-sst-firmware.o
+obj-$(CONFIG_SND_SOC_ACPI_INTEL_MATCH) += snd-soc-acpi-intel-match.o
diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
new file mode 100644 (file)
index 0000000..bfe1ca6
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * soc-apci-intel-byt-match.c - tables and support for BYT ACPI enumeration.
+ *
+ * Copyright (c) 2017, Intel Corporation.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/dmi.h>
+#include <sound/soc-acpi.h>
+#include <sound/soc-acpi-intel-match.h>
+
+static unsigned long byt_machine_id;
+
+#define BYT_THINKPAD_10  1
+
+static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
+{
+       byt_machine_id = BYT_THINKPAD_10;
+       return 1;
+}
+
+
+static const struct dmi_system_id byt_table[] = {
+       {
+               .callback = byt_thinkpad10_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad 10"),
+               },
+       },
+       {
+               .callback = byt_thinkpad10_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Tablet B"),
+               },
+       },
+       {
+               .callback = byt_thinkpad10_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"),
+               },
+       },
+       { }
+};
+
+static struct snd_soc_acpi_mach byt_thinkpad_10 = {
+       .id = "10EC5640",
+       .drv_name = "cht-bsw-rt5672",
+       .fw_filename = "intel/fw_sst_0f28.bin",
+       .board = "cht-bsw",
+       .sof_fw_filename = "intel/reef-byt.ri",
+       .sof_tplg_filename = "intel/reef-byt-rt5670.tplg",
+       .asoc_plat_name = "sst-mfld-platform",
+};
+
+static struct snd_soc_acpi_mach *byt_quirk(void *arg)
+{
+       struct snd_soc_acpi_mach *mach = arg;
+
+       dmi_check_system(byt_table);
+
+       if (byt_machine_id == BYT_THINKPAD_10)
+               return &byt_thinkpad_10;
+       else
+               return mach;
+}
+
+struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[] = {
+       {
+               .id = "10EC5640",
+               .drv_name = "byt-rt5640",
+               .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
+       },
+       {
+               .id = "193C9890",
+               .drv_name = "byt-max98090",
+               .fw_filename = "intel/fw_sst_0f28.bin-48kHz_i2s_master",
+       },
+       {}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_legacy_machines);
+
+struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {
+       {
+               .id = "10EC5640",
+               .drv_name = "bytcr_rt5640",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcr_rt5640",
+               .machine_quirk = byt_quirk,
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5640.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5642",
+               .drv_name = "bytcr_rt5640",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcr_rt5640",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5640.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "INTCCFFD",
+               .drv_name = "bytcr_rt5640",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcr_rt5640",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5640.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5651",
+               .drv_name = "bytcr_rt5651",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcr_rt5651",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5651.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "DLGS7212",
+               .drv_name = "bytcht_da7213",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcht_da7213",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-da7213.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "DLGS7213",
+               .drv_name = "bytcht_da7213",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcht_da7213",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-da7213.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       /* some Baytrail platforms rely on RT5645, use CHT machine driver */
+       {
+               .id = "10EC5645",
+               .drv_name = "cht-bsw-rt5645",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5645.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5648",
+               .drv_name = "cht-bsw-rt5645",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-rt5645.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       /* use CHT driver to Baytrail Chromebooks */
+       {
+               .id = "193C9890",
+               .drv_name = "cht-bsw-max98090",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-byt.ri",
+               .sof_tplg_filename = "intel/reef-byt-max98090.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
+       /*
+        * This is always last in the table so that it is selected only when
+        * enabled explicitly and there is no codec-related information in SSDT
+        */
+       {
+               .id = "80860F28",
+               .drv_name = "bytcht_nocodec",
+               .fw_filename = "intel/fw_sst_0f28.bin",
+               .board = "bytcht_nocodec",
+       },
+#endif
+       {},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_baytrail_machines);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Intel Common ACPI Match module");
diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
new file mode 100644 (file)
index 0000000..b50a0d5
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+ * soc-apci-intel-cht-match.c - tables and support for CHT ACPI enumeration.
+ *
+ * Copyright (c) 2017, Intel Corporation.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/dmi.h>
+#include <sound/soc-acpi.h>
+#include <sound/soc-acpi-intel-match.h>
+
+static unsigned long cht_machine_id;
+
+#define CHT_SURFACE_MACH 1
+
+static int cht_surface_quirk_cb(const struct dmi_system_id *id)
+{
+       cht_machine_id = CHT_SURFACE_MACH;
+       return 1;
+}
+
+static const struct dmi_system_id cht_table[] = {
+       {
+               .callback = cht_surface_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
+               },
+       },
+       { }
+};
+
+static struct snd_soc_acpi_mach cht_surface_mach = {
+       .id = "10EC5640",
+       .drv_name = "cht-bsw-rt5645",
+       .fw_filename = "intel/fw_sst_22a8.bin",
+       .board = "cht-bsw",
+       .sof_fw_filename = "intel/reef-cht.ri",
+       .sof_tplg_filename = "intel/reef-cht-rt5645.tplg",
+       .asoc_plat_name = "sst-mfld-platform",
+};
+
+static struct snd_soc_acpi_mach *cht_quirk(void *arg)
+{
+       struct snd_soc_acpi_mach *mach = arg;
+
+       dmi_check_system(cht_table);
+
+       if (cht_machine_id == CHT_SURFACE_MACH)
+               return &cht_surface_mach;
+       else
+               return mach;
+}
+
+/* Cherryview-based platforms: CherryTrail and Braswell */
+struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {
+       {
+               .id = "10EC5670",
+               .drv_name = "cht-bsw-rt5672",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5670.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5672",
+               .drv_name = "cht-bsw-rt5672",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5670.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5645",
+               .drv_name = "cht-bsw-rt5645",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5645.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC5650",
+               .drv_name = "cht-bsw-rt5645",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5645.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC3270",
+               .drv_name = "cht-bsw-rt5645",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5645.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "193C9890",
+               .drv_name = "cht-bsw-max98090",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "cht-bsw",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-max98090.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "DLGS7212",
+               .drv_name = "bytcht_da7213",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcht_da7213",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-da7213.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "DLGS7213",
+               .drv_name = "bytcht_da7213",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcht_da7213",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-da7213.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "ESSX8316",
+               .drv_name = "bytcht_es8316",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcht_es8316",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-es8316.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
+       {
+               .id = "10EC5640",
+               .drv_name = "bytcr_rt5640",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcr_rt5640",
+               .machine_quirk = cht_quirk,
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5640.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       {
+               .id = "10EC3276",
+               .drv_name = "bytcr_rt5640",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcr_rt5640",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5640.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+       /* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
+       {
+               .id = "10EC5651",
+               .drv_name = "bytcr_rt5651",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcr_rt5651",
+               .sof_fw_filename = "intel/reef-cht.ri",
+               .sof_tplg_filename = "intel/reef-cht-rt5651.tplg",
+               .asoc_plat_name = "sst-mfld-platform",
+       },
+#if IS_ENABLED(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH)
+       /*
+        * This is always last in the table so that it is selected only when
+        * enabled explicitly and there is no codec-related information in SSDT
+        */
+       {
+               .id = "808622A8",
+               .drv_name = "bytcht_nocodec",
+               .fw_filename = "intel/fw_sst_22a8.bin",
+               .board = "bytcht_nocodec",
+       },
+#endif
+       {},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cherrytrail_machines);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Intel Common ACPI Match module");
diff --git a/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c b/sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c
new file mode 100644 (file)
index 0000000..e0e8c8c
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * soc-apci-intel-hsw-bdw-match.c - tables and support for ACPI enumeration.
+ *
+ * Copyright (c) 2017, Intel Corporation.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/dmi.h>
+#include <sound/soc-acpi.h>
+#include <sound/soc-acpi-intel-match.h>
+
+struct snd_soc_acpi_mach snd_soc_acpi_intel_haswell_machines[] = {
+       {
+               .id = "INT33CA",
+               .drv_name = "haswell-audio",
+               .fw_filename = "intel/IntcSST1.bin",
+               .sof_fw_filename = "intel/reef-hsw.ri",
+               .sof_tplg_filename = "intel/reef-hsw.tplg",
+               .asoc_plat_name = "haswell-pcm-audio",
+       },
+       {}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_haswell_machines);
+
+struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[] = {
+       {
+               .id = "INT343A",
+               .drv_name = "broadwell-audio",
+               .fw_filename =  "intel/IntcSST2.bin",
+               .sof_fw_filename = "intel/reef-bdw.ri",
+               .sof_tplg_filename = "intel/reef-bdw-rt286.tplg",
+               .asoc_plat_name = "haswell-pcm-audio",
+       },
+       {
+               .id = "RT5677CE",
+               .drv_name = "bdw-rt5677",
+               .fw_filename =  "intel/IntcSST2.bin",
+               .sof_fw_filename = "intel/reef-bdw.ri",
+               .sof_tplg_filename = "intel/reef-bdw-rt286.tplg",
+               .asoc_plat_name = "haswell-pcm-audio",
+       },
+       {
+               .id = "INT33CA",
+               .drv_name = "haswell-audio",
+               .fw_filename = "intel/IntcSST2.bin",
+               .sof_fw_filename = "intel/reef-bdw.ri",
+               .sof_tplg_filename = "intel/reef-bdw-rt5640.tplg",
+               .asoc_plat_name = "haswell-pcm-audio",
+       },
+       {}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_broadwell_machines);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Intel Common ACPI Match module");
index 1285cc597b6b36b3959ca715f978fa0faca97d0c..cf6fbbd4e3786623808308d0a28d3f54658dfbe4 100644 (file)
@@ -21,7 +21,8 @@
 #include <linux/platform_device.h>
 
 #include "sst-dsp.h"
-#include "sst-acpi.h"
+#include <sound/soc-acpi.h>
+#include <sound/soc-acpi-intel-match.h>
 
 #define SST_LPT_DSP_DMA_ADDR_OFFSET    0x0F0000
 #define SST_WPT_DSP_DMA_ADDR_OFFSET    0x0FE000
@@ -30,7 +31,7 @@
 /* Descriptor for setting up SST platform data */
 struct sst_acpi_desc {
        const char *drv_name;
-       struct sst_acpi_mach *machines;
+       struct snd_soc_acpi_mach *machines;
        /* Platform resource indexes. Must set to -1 if not used */
        int resindex_lpe_base;
        int resindex_pcicfg_base;
@@ -49,7 +50,7 @@ struct sst_acpi_priv {
        struct platform_device *pdev_pcm;
        struct sst_pdata sst_pdata;
        struct sst_acpi_desc *desc;
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
 };
 
 static void sst_acpi_fw_cb(const struct firmware *fw, void *context)
@@ -59,7 +60,7 @@ static void sst_acpi_fw_cb(const struct firmware *fw, void *context)
        struct sst_acpi_priv *sst_acpi = platform_get_drvdata(pdev);
        struct sst_pdata *sst_pdata = &sst_acpi->sst_pdata;
        struct sst_acpi_desc *desc = sst_acpi->desc;
-       struct sst_acpi_mach *mach = sst_acpi->mach;
+       struct snd_soc_acpi_mach *mach = sst_acpi->mach;
 
        sst_pdata->fw = fw;
        if (!fw) {
@@ -85,7 +86,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct sst_acpi_priv *sst_acpi;
        struct sst_pdata *sst_pdata;
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
        struct sst_acpi_desc *desc;
        struct resource *mmio;
        int ret = 0;
@@ -99,7 +100,7 @@ static int sst_acpi_probe(struct platform_device *pdev)
                return -ENODEV;
 
        desc = (struct sst_acpi_desc *)id->driver_data;
-       mach = sst_acpi_find_machine(desc->machines);
+       mach = snd_soc_acpi_find_machine(desc->machines);
        if (mach == NULL) {
                dev_err(dev, "No matching ASoC machine driver found\n");
                return -ENODEV;
@@ -179,14 +180,9 @@ static int sst_acpi_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct sst_acpi_mach haswell_machines[] = {
-       { "INT33CA", "haswell-audio", "intel/IntcSST1.bin", NULL, NULL, NULL },
-       {}
-};
-
 static struct sst_acpi_desc sst_acpi_haswell_desc = {
        .drv_name = "haswell-pcm-audio",
-       .machines = haswell_machines,
+       .machines = snd_soc_acpi_intel_haswell_machines,
        .resindex_lpe_base = 0,
        .resindex_pcicfg_base = 1,
        .resindex_fw_base = -1,
@@ -197,15 +193,9 @@ static struct sst_acpi_desc sst_acpi_haswell_desc = {
        .dma_size = SST_LPT_DSP_DMA_SIZE,
 };
 
-static struct sst_acpi_mach broadwell_machines[] = {
-       { "INT343A", "broadwell-audio", "intel/IntcSST2.bin", NULL, NULL, NULL },
-       { "RT5677CE", "bdw-rt5677", "intel/IntcSST2.bin", NULL, NULL, NULL },
-       {}
-};
-
 static struct sst_acpi_desc sst_acpi_broadwell_desc = {
        .drv_name = "haswell-pcm-audio",
-       .machines = broadwell_machines,
+       .machines = snd_soc_acpi_intel_broadwell_machines,
        .resindex_lpe_base = 0,
        .resindex_pcicfg_base = 1,
        .resindex_fw_base = -1,
@@ -217,15 +207,9 @@ static struct sst_acpi_desc sst_acpi_broadwell_desc = {
 };
 
 #if !IS_ENABLED(CONFIG_SND_SST_IPC_ACPI)
-static struct sst_acpi_mach baytrail_machines[] = {
-       { "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master", NULL, NULL, NULL },
-       { "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-48kHz_i2s_master", NULL, NULL, NULL },
-       {}
-};
-
 static struct sst_acpi_desc sst_acpi_baytrail_desc = {
        .drv_name = "baytrail-pcm-audio",
-       .machines = baytrail_machines,
+       .machines = snd_soc_acpi_intel_baytrail_legacy_machines,
        .resindex_lpe_base = 0,
        .resindex_pcicfg_base = 1,
        .resindex_fw_base = 2,
diff --git a/sound/soc/intel/common/sst-acpi.h b/sound/soc/intel/common/sst-acpi.h
deleted file mode 100644 (file)
index afe9b87..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2013-15, Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version
- * 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/stddef.h>
-#include <linux/acpi.h>
-
-struct sst_acpi_package_context {
-       char *name;           /* package name */
-       int length;           /* number of elements */
-       struct acpi_buffer *format;
-       struct acpi_buffer *state;
-       bool data_valid;
-};
-
-#if IS_ENABLED(CONFIG_ACPI)
-/* translation fron HID to I2C name, needed for DAI codec_name */
-const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]);
-bool sst_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
-                                   struct sst_acpi_package_context *ctx);
-#else
-static inline const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
-{
-       return NULL;
-}
-static inline bool sst_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
-                                          struct sst_acpi_package_context *ctx)
-{
-       return false;
-}
-#endif
-
-/* acpi match */
-struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines);
-
-/* acpi check hid */
-bool sst_acpi_check_hid(const u8 hid[ACPI_ID_LEN]);
-
-/* Descriptor for SST ASoC machine driver */
-struct sst_acpi_mach {
-       /* ACPI ID for the matching machine driver. Audio codec for instance */
-       const u8 id[ACPI_ID_LEN];
-       /* machine driver name */
-       const char *drv_name;
-       /* firmware file name */
-       const char *fw_filename;
-
-       /* board name */
-       const char *board;
-       struct sst_acpi_mach * (*machine_quirk)(void *arg);
-       const void *quirk_data;
-       void *pdata;
-};
-
-#define SST_ACPI_MAX_CODECS 3
-
-/**
- * struct sst_codecs: Structure to hold secondary codec information apart from
- * the matched one, this data will be passed to the quirk function to match
- * with the ACPI detected devices
- *
- * @num_codecs: number of secondary codecs used in the platform
- * @codecs: holds the codec IDs
- *
- */
-struct sst_codecs {
-       int num_codecs;
-       u8 codecs[SST_ACPI_MAX_CODECS][ACPI_ID_LEN];
-};
-
-/* check all codecs */
-struct sst_acpi_mach *sst_acpi_codec_list(void *arg);
index a086c35f91bb94bfe879ebc743fc81177e787118..657afc02f1c47813b55cffa4bd2f53465539f0b8 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/sched.h>
 #include <linux/firmware.h>
 #include <linux/export.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
@@ -274,7 +275,6 @@ int sst_dma_new(struct sst_dsp *sst)
        struct sst_pdata *sst_pdata = sst->pdata;
        struct sst_dma *dma;
        struct resource mem;
-       const char *dma_dev_name;
        int ret = 0;
 
        if (sst->pdata->resindex_dma_base == -1)
@@ -285,7 +285,6 @@ int sst_dma_new(struct sst_dsp *sst)
        * is attached to the ADSP IP. */
        switch (sst->pdata->dma_engine) {
        case SST_DMA_TYPE_DW:
-               dma_dev_name = "dw_dmac";
                break;
        default:
                dev_err(sst->dev, "error: invalid DMA engine %d\n",
index 3380deb81015a95fec9a4ccff0b32166e7b8819c..d1ccbecd141f92b612e71d822e3d2496db4a4af9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-skl-objs := skl.o skl-pcm.o skl-nhlt.o skl-messages.o \
 skl-topology.o
 
index 89f70133c8e4e344ea5f8365dd257a0ef47de56e..61b5bfa79d1325b5a42e69119ccb1e39c20c0b6c 100644 (file)
@@ -613,8 +613,10 @@ skip_buf_size_calc:
 }
 
 #define DMA_CONTROL_ID 5
+#define DMA_I2S_BLOB_SIZE 21
 
-int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
+int skl_dsp_set_dma_control(struct skl_sst *ctx, u32 *caps,
+                               u32 caps_size, u32 node_id)
 {
        struct skl_dma_control *dma_ctrl;
        struct skl_ipc_large_config_msg msg = {0};
@@ -624,24 +626,27 @@ int skl_dsp_set_dma_control(struct skl_sst *ctx, struct skl_module_cfg *mconfig)
        /*
         * if blob size zero, then return
         */
-       if (mconfig->formats_config.caps_size == 0)
+       if (caps_size == 0)
                return 0;
 
        msg.large_param_id = DMA_CONTROL_ID;
-       msg.param_data_size = sizeof(struct skl_dma_control) +
-                               mconfig->formats_config.caps_size;
+       msg.param_data_size = sizeof(struct skl_dma_control) + caps_size;
 
        dma_ctrl = kzalloc(msg.param_data_size, GFP_KERNEL);
        if (dma_ctrl == NULL)
                return -ENOMEM;
 
-       dma_ctrl->node_id = skl_get_node_id(ctx, mconfig);
+       dma_ctrl->node_id = node_id;
 
-       /* size in dwords */
-       dma_ctrl->config_length = mconfig->formats_config.caps_size / 4;
+       /*
+        * NHLT blob may contain additional configs along with i2s blob.
+        * firmware expects only the i2s blob size as the config_length.
+        * So fix to i2s blob size.
+        * size in dwords.
+        */
+       dma_ctrl->config_length = DMA_I2S_BLOB_SIZE;
 
-       memcpy(dma_ctrl->config_data, mconfig->formats_config.caps,
-                               mconfig->formats_config.caps_size);
+       memcpy(dma_ctrl->config_data, caps, caps_size);
 
        err = skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)dma_ctrl);
 
@@ -702,18 +707,11 @@ static void skl_set_updown_mixer_format(struct skl_sst *ctx,
        struct skl_module *module = mconfig->module;
        struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx];
        struct skl_module_fmt *fmt = &iface->outputs[0].fmt;
-       int i = 0;
 
        skl_set_base_module_format(ctx, mconfig,
                (struct skl_base_cfg *)mixer_mconfig);
        mixer_mconfig->out_ch_cfg = fmt->ch_cfg;
-
-       /* Select F/W default coefficient */
-       mixer_mconfig->coeff_sel = 0x0;
-
-       /* User coeff, don't care since we are selecting F/W defaults */
-       for (i = 0; i < UP_DOWN_MIXER_MAX_COEFF; i++)
-               mixer_mconfig->coeff[i] = 0xDEADBEEF;
+       mixer_mconfig->ch_map = fmt->ch_map;
 }
 
 /*
index e7d766d56c8e7dc60d12b39172f63c3a54f27b49..d14c50a602894c4ad8aa76f2259839552aff2f6a 100644 (file)
@@ -20,6 +20,8 @@
 #include <linux/pci.h>
 #include "skl.h"
 
+#define NHLT_ACPI_HEADER_SIG   "NHLT"
+
 /* Unique identification for getting NHLT blobs */
 static guid_t osc_guid =
        GUID_INIT(0xA69F886E, 0x6CEB, 0x4594,
@@ -45,6 +47,13 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
                                memremap(nhlt_ptr->min_addr, nhlt_ptr->length,
                                MEMREMAP_WB);
                ACPI_FREE(obj);
+               if (nhlt_table && (strncmp(nhlt_table->header.signature,
+                                       NHLT_ACPI_HEADER_SIG,
+                                       strlen(NHLT_ACPI_HEADER_SIG)) != 0)) {
+                       memunmap(nhlt_table);
+                       dev_err(dev, "NHLT ACPI header signature incorrect\n");
+                       return NULL;
+               }
                return nhlt_table;
        }
 
index 2b1e513b1680e4c73130710c318e8fe50855c59c..1dd97479e0c014bf1f814f16dd419268529454e0 100644 (file)
@@ -355,7 +355,8 @@ static void skl_pcm_close(struct snd_pcm_substream *substream,
        }
 
        mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
-       skl_tplg_d0i3_put(skl, mconfig->d0i3_caps);
+       if (mconfig)
+               skl_tplg_d0i3_put(skl, mconfig->d0i3_caps);
 
        kfree(dma_params);
 }
@@ -652,7 +653,7 @@ static const struct snd_soc_dai_ops skl_link_dai_ops = {
        .trigger = skl_link_pcm_trigger,
 };
 
-static struct snd_soc_dai_driver skl_platform_dai[] = {
+static struct snd_soc_dai_driver skl_fe_dai[] = {
 {
        .name = "System Pin",
        .ops = &skl_pcm_dai_ops,
@@ -796,8 +797,10 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
                .sig_bits = 32,
        },
 },
+};
 
 /* BE CPU  Dais */
+static struct snd_soc_dai_driver skl_platform_dai[] = {
 {
        .name = "SSP0 Pin",
        .ops = &skl_be_ssp_dai_ops,
@@ -975,6 +978,14 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
 },
 };
 
+int skl_dai_load(struct snd_soc_component *cmp,
+                struct snd_soc_dai_driver *pcm_dai)
+{
+       pcm_dai->ops = &skl_pcm_dai_ops;
+
+       return 0;
+}
+
 static int skl_platform_open(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -1362,6 +1373,8 @@ int skl_platform_register(struct device *dev)
        int ret;
        struct hdac_ext_bus *ebus = dev_get_drvdata(dev);
        struct skl *skl = ebus_to_skl(ebus);
+       struct snd_soc_dai_driver *dais;
+       int num_dais = ARRAY_SIZE(skl_platform_dai);
 
        INIT_LIST_HEAD(&skl->ppl_list);
        INIT_LIST_HEAD(&skl->bind_list);
@@ -1371,14 +1384,38 @@ int skl_platform_register(struct device *dev)
                dev_err(dev, "soc platform registration failed %d\n", ret);
                return ret;
        }
+
+       skl->dais = kmemdup(skl_platform_dai, sizeof(skl_platform_dai),
+                           GFP_KERNEL);
+       if (!skl->dais) {
+               ret = -ENOMEM;
+               goto err;
+       }
+
+       if (!skl->use_tplg_pcm) {
+               dais = krealloc(skl->dais, sizeof(skl_fe_dai) +
+                               sizeof(skl_platform_dai), GFP_KERNEL);
+               if (!dais) {
+                       ret = -ENOMEM;
+                       goto err;
+               }
+
+               skl->dais = dais;
+               memcpy(&skl->dais[ARRAY_SIZE(skl_platform_dai)], skl_fe_dai,
+                      sizeof(skl_fe_dai));
+               num_dais += ARRAY_SIZE(skl_fe_dai);
+       }
+
        ret = snd_soc_register_component(dev, &skl_component,
-                               skl_platform_dai,
-                               ARRAY_SIZE(skl_platform_dai));
+                                        skl->dais, num_dais);
        if (ret) {
                dev_err(dev, "soc component registration failed %d\n", ret);
-               snd_soc_unregister_platform(dev);
+               goto err;
        }
 
+       return 0;
+err:
+       snd_soc_unregister_platform(dev);
        return ret;
 
 }
@@ -1398,5 +1435,7 @@ int skl_platform_unregister(struct device *dev)
 
        snd_soc_unregister_component(dev);
        snd_soc_unregister_platform(dev);
+       kfree(skl->dais);
+
        return 0;
 }
index 369ef7ce981c799b8fab344ab4f3bfdfa34ed829..8ff89280d9fd44f11e34121f1dddd7647004c688 100644 (file)
@@ -251,6 +251,7 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
        struct uuid_module *module;
        struct firmware stripped_fw;
        unsigned int safe_file;
+       int ret = 0;
 
        /* Get the FW pointer to derive ADSP header */
        stripped_fw.data = fw->data;
@@ -299,8 +300,10 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
 
        for (i = 0; i < num_entry; i++, mod_entry++) {
                module = kzalloc(sizeof(*module), GFP_KERNEL);
-               if (!module)
-                       return -ENOMEM;
+               if (!module) {
+                       ret = -ENOMEM;
+                       goto free_uuid_list;
+               }
 
                uuid_bin = (uuid_le *)mod_entry->uuid.id;
                memcpy(&module->uuid, uuid_bin, sizeof(module->uuid));
@@ -311,8 +314,8 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
                size = sizeof(int) * mod_entry->instance_max_count;
                module->instance_id = devm_kzalloc(ctx->dev, size, GFP_KERNEL);
                if (!module->instance_id) {
-                       kfree(module);
-                       return -ENOMEM;
+                       ret = -ENOMEM;
+                       goto free_uuid_list;
                }
 
                list_add_tail(&module->list, &skl->uuid_list);
@@ -323,6 +326,10 @@ int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
        }
 
        return 0;
+
+free_uuid_list:
+       skl_freeup_uuid_list(skl);
+       return ret;
 }
 
 void skl_freeup_uuid_list(struct skl_sst *ctx)
index 22f768ca3c73be752b208ac52b06ed52be53bada..a072bcf209d2aa4c9c72503466e027e6867cd9bb 100644 (file)
@@ -2036,21 +2036,45 @@ static int skl_tplg_add_pipe(struct device *dev,
        return 0;
 }
 
-static int skl_tplg_fill_pin(struct device *dev, u32 tkn,
+static int skl_tplg_get_uuid(struct device *dev, u8 *guid,
+             struct snd_soc_tplg_vendor_uuid_elem *uuid_tkn)
+{
+       if (uuid_tkn->token == SKL_TKN_UUID) {
+               memcpy(guid, &uuid_tkn->uuid, 16);
+               return 0;
+       }
+
+       dev_err(dev, "Not an UUID token %d\n", uuid_tkn->token);
+
+       return -EINVAL;
+}
+
+static int skl_tplg_fill_pin(struct device *dev,
+                       struct snd_soc_tplg_vendor_value_elem *tkn_elem,
                        struct skl_module_pin *m_pin,
-                       int pin_index, u32 value)
+                       int pin_index)
 {
-       switch (tkn) {
+       int ret;
+
+       switch (tkn_elem->token) {
        case SKL_TKN_U32_PIN_MOD_ID:
-               m_pin[pin_index].id.module_id = value;
+               m_pin[pin_index].id.module_id = tkn_elem->value;
                break;
 
        case SKL_TKN_U32_PIN_INST_ID:
-               m_pin[pin_index].id.instance_id = value;
+               m_pin[pin_index].id.instance_id = tkn_elem->value;
+               break;
+
+       case SKL_TKN_UUID:
+               ret = skl_tplg_get_uuid(dev, m_pin[pin_index].id.mod_uuid.b,
+                       (struct snd_soc_tplg_vendor_uuid_elem *)tkn_elem);
+               if (ret < 0)
+                       return ret;
+
                break;
 
        default:
-               dev_err(dev, "%d Not a pin token\n", value);
+               dev_err(dev, "%d Not a pin token\n", tkn_elem->token);
                return -EINVAL;
        }
 
@@ -2083,9 +2107,7 @@ static int skl_tplg_fill_pins_info(struct device *dev,
                return -EINVAL;
        }
 
-       ret = skl_tplg_fill_pin(dev, tkn_elem->token,
-                       m_pin, pin_count, tkn_elem->value);
-
+       ret = skl_tplg_fill_pin(dev, tkn_elem, m_pin, pin_count);
        if (ret < 0)
                return ret;
 
@@ -2170,19 +2192,6 @@ static int skl_tplg_widget_fill_fmt(struct device *dev,
        return skl_tplg_fill_fmt(dev, dst_fmt, tkn, val);
 }
 
-static int skl_tplg_get_uuid(struct device *dev, struct skl_module_cfg *mconfig,
-             struct snd_soc_tplg_vendor_uuid_elem *uuid_tkn)
-{
-       if (uuid_tkn->token == SKL_TKN_UUID)
-               memcpy(&mconfig->guid, &uuid_tkn->uuid, 16);
-       else {
-               dev_err(dev, "Not an UUID token tkn %d\n", uuid_tkn->token);
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
 static void skl_tplg_fill_pin_dynamic_val(
                struct skl_module_pin *mpin, u32 pin_count, u32 value)
 {
@@ -2382,7 +2391,7 @@ static int skl_tplg_get_token(struct device *dev,
        case SKL_TKN_U32_MAX_MCPS:
        case SKL_TKN_U32_OBS:
        case SKL_TKN_U32_IBS:
-               ret = skl_tplg_fill_res_tkn(dev, tkn_elem, res, dir, pin_index);
+               ret = skl_tplg_fill_res_tkn(dev, tkn_elem, res, pin_index, dir);
                if (ret < 0)
                        return ret;
 
@@ -2488,6 +2497,7 @@ static int skl_tplg_get_token(struct device *dev,
 
        case SKL_TKN_U32_PIN_MOD_ID:
        case SKL_TKN_U32_PIN_INST_ID:
+       case SKL_TKN_UUID:
                ret = skl_tplg_fill_pins_info(dev,
                                mconfig, tkn_elem, dir,
                                pin_index);
@@ -2550,6 +2560,7 @@ static int skl_tplg_get_tokens(struct device *dev,
        struct snd_soc_tplg_vendor_value_elem *tkn_elem;
        int tkn_count = 0, ret;
        int off = 0, tuple_size = 0;
+       bool is_module_guid = true;
 
        if (block_size <= 0)
                return -EINVAL;
@@ -2565,7 +2576,15 @@ static int skl_tplg_get_tokens(struct device *dev,
                        continue;
 
                case SND_SOC_TPLG_TUPLE_TYPE_UUID:
-                       ret = skl_tplg_get_uuid(dev, mconfig, array->uuid);
+                       if (is_module_guid) {
+                               ret = skl_tplg_get_uuid(dev, mconfig->guid,
+                                                       array->uuid);
+                               is_module_guid = false;
+                       } else {
+                               ret = skl_tplg_get_token(dev, array->value, skl,
+                                                        mconfig);
+                       }
+
                        if (ret < 0)
                                return ret;
 
@@ -3331,6 +3350,7 @@ static struct snd_soc_tplg_ops skl_tplg_ops  = {
        .io_ops = skl_tplg_kcontrol_ops,
        .io_ops_count = ARRAY_SIZE(skl_tplg_kcontrol_ops),
        .manifest = skl_manifest_load,
+       .dai_load = skl_dai_load,
 };
 
 /*
@@ -3404,7 +3424,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
 
        ret = request_firmware(&fw, skl->tplg_name, bus->dev);
        if (ret < 0) {
-               dev_err(bus->dev, "tplg fw %s load failed with %d\n",
+               dev_info(bus->dev, "tplg fw %s load failed with %d, falling back to dfw_sst.bin",
                                skl->tplg_name, ret);
                ret = request_firmware(&fw, "dfw_sst.bin", bus->dev);
                if (ret < 0) {
index 2717db92036b4cc58ac7148904b41d00d16d4805..b6496513fe555d476c6796f9cc5e40f2e29f4caf 100644 (file)
@@ -34,7 +34,7 @@
 #define MAX_FIXED_DMIC_PARAMS_SIZE 727
 
 /* Maximum number of coefficients up down mixer module */
-#define UP_DOWN_MIXER_MAX_COEFF                6
+#define UP_DOWN_MIXER_MAX_COEFF                8
 
 #define MODULE_MAX_IN_PINS     8
 #define MODULE_MAX_OUT_PINS    8
@@ -161,6 +161,7 @@ struct skl_up_down_mixer_cfg {
        u32 coeff_sel;
        /* Pass the user coeff in this array */
        s32 coeff[UP_DOWN_MIXER_MAX_COEFF];
+       u32 ch_map;
 } __packed;
 
 struct skl_algo_cfg {
@@ -455,8 +456,8 @@ static inline struct skl *get_skl_ctx(struct device *dev)
 
 int skl_tplg_be_update_params(struct snd_soc_dai *dai,
        struct skl_pipe_params *params);
-int skl_dsp_set_dma_control(struct skl_sst *ctx,
-               struct skl_module_cfg *mconfig);
+int skl_dsp_set_dma_control(struct skl_sst *ctx, u32 *caps,
+                       u32 caps_size, u32 node_id);
 void skl_tplg_set_be_dmic_config(struct snd_soc_dai *dai,
        struct skl_pipe_params *params, int stream);
 int skl_tplg_init(struct snd_soc_platform *platform,
@@ -501,4 +502,7 @@ int skl_pcm_host_dma_prepare(struct device *dev,
                        struct skl_pipe_params *params);
 int skl_pcm_link_dma_prepare(struct device *dev,
                        struct skl_pipe_params *params);
+
+int skl_dai_load(struct snd_soc_component *cmp,
+                struct snd_soc_dai_driver *pcm_dai);
 #endif
index f94b484abb992e92c156e10f9144b1368d93d969..31d8634e8aa1c4f71e7f089bd1da0545e1345ab0 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/firmware.h>
 #include <linux/delay.h>
 #include <sound/pcm.h>
-#include "../common/sst-acpi.h"
+#include <sound/soc-acpi.h>
 #include <sound/hda_register.h>
 #include <sound/hdaudio.h>
 #include <sound/hda_i915.h>
@@ -439,10 +439,10 @@ static int skl_machine_device_register(struct skl *skl, void *driver_data)
 {
        struct hdac_bus *bus = ebus_to_hbus(&skl->ebus);
        struct platform_device *pdev;
-       struct sst_acpi_mach *mach = driver_data;
+       struct snd_soc_acpi_mach *mach = driver_data;
        int ret;
 
-       mach = sst_acpi_find_machine(mach);
+       mach = snd_soc_acpi_find_machine(mach);
        if (mach == NULL) {
                dev_err(bus->dev, "No matching machine driver found\n");
                return -ENODEV;
@@ -462,8 +462,11 @@ static int skl_machine_device_register(struct skl *skl, void *driver_data)
                return -EIO;
        }
 
-       if (mach->pdata)
+       if (mach->pdata) {
+               skl->use_tplg_pcm =
+                       ((struct skl_machine_pdata *)mach->pdata)->use_tplg_pcm;
                dev_set_drvdata(&pdev->dev, mach->pdata);
+       }
 
        skl->i2s_dev = pdev;
 
@@ -875,33 +878,36 @@ static void skl_remove(struct pci_dev *pci)
        dev_set_drvdata(&pci->dev, NULL);
 }
 
-static struct sst_codecs skl_codecs = {
+static struct snd_soc_acpi_codecs skl_codecs = {
        .num_codecs = 1,
        .codecs = {"10508825"}
 };
 
-static struct sst_codecs kbl_codecs = {
+static struct snd_soc_acpi_codecs kbl_codecs = {
        .num_codecs = 1,
        .codecs = {"10508825"}
 };
 
-static struct sst_codecs bxt_codecs = {
+static struct snd_soc_acpi_codecs bxt_codecs = {
        .num_codecs = 1,
        .codecs = {"MX98357A"}
 };
 
-static struct sst_codecs kbl_poppy_codecs = {
+static struct snd_soc_acpi_codecs kbl_poppy_codecs = {
        .num_codecs = 1,
        .codecs = {"10EC5663"}
 };
 
-static struct sst_codecs kbl_5663_5514_codecs = {
+static struct snd_soc_acpi_codecs kbl_5663_5514_codecs = {
        .num_codecs = 2,
        .codecs = {"10EC5663", "10EC5514"}
 };
 
+static struct skl_machine_pdata cnl_pdata = {
+       .use_tplg_pcm = true,
+};
 
-static struct sst_acpi_mach sst_skl_devdata[] = {
+static struct snd_soc_acpi_mach sst_skl_devdata[] = {
        {
                .id = "INT343A",
                .drv_name = "skl_alc286s_i2s",
@@ -911,7 +917,7 @@ static struct sst_acpi_mach sst_skl_devdata[] = {
                .id = "INT343B",
                .drv_name = "skl_n88l25_s4567",
                .fw_filename = "intel/dsp_fw_release.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &skl_codecs,
                .pdata = &skl_dmic_data
        },
@@ -919,14 +925,14 @@ static struct sst_acpi_mach sst_skl_devdata[] = {
                .id = "MX98357A",
                .drv_name = "skl_n88l25_m98357a",
                .fw_filename = "intel/dsp_fw_release.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &skl_codecs,
                .pdata = &skl_dmic_data
        },
        {}
 };
 
-static struct sst_acpi_mach sst_bxtp_devdata[] = {
+static struct snd_soc_acpi_mach sst_bxtp_devdata[] = {
        {
                .id = "INT343A",
                .drv_name = "bxt_alc298s_i2s",
@@ -936,13 +942,13 @@ static struct sst_acpi_mach sst_bxtp_devdata[] = {
                .id = "DLGS7219",
                .drv_name = "bxt_da7219_max98357a_i2s",
                .fw_filename = "intel/dsp_fw_bxtn.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &bxt_codecs,
        },
        {}
 };
 
-static struct sst_acpi_mach sst_kbl_devdata[] = {
+static struct snd_soc_acpi_mach sst_kbl_devdata[] = {
        {
                .id = "INT343A",
                .drv_name = "kbl_alc286s_i2s",
@@ -952,7 +958,7 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
                .id = "INT343B",
                .drv_name = "kbl_n88l25_s4567",
                .fw_filename = "intel/dsp_fw_kbl.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &kbl_codecs,
                .pdata = &skl_dmic_data
        },
@@ -960,7 +966,7 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
                .id = "MX98357A",
                .drv_name = "kbl_n88l25_m98357a",
                .fw_filename = "intel/dsp_fw_kbl.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &kbl_codecs,
                .pdata = &skl_dmic_data
        },
@@ -968,7 +974,7 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
                .id = "MX98927",
                .drv_name = "kbl_r5514_5663_max",
                .fw_filename = "intel/dsp_fw_kbl.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &kbl_5663_5514_codecs,
                .pdata = &skl_dmic_data
        },
@@ -976,7 +982,7 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
                .id = "MX98927",
                .drv_name = "kbl_rt5663_m98927",
                .fw_filename = "intel/dsp_fw_kbl.bin",
-               .machine_quirk = sst_acpi_codec_list,
+               .machine_quirk = snd_soc_acpi_codec_list,
                .quirk_data = &kbl_poppy_codecs,
                .pdata = &skl_dmic_data
        },
@@ -989,7 +995,7 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
        {}
 };
 
-static struct sst_acpi_mach sst_glk_devdata[] = {
+static struct snd_soc_acpi_mach sst_glk_devdata[] = {
        {
                .id = "INT343A",
                .drv_name = "glk_alc298s_i2s",
@@ -998,12 +1004,14 @@ static struct sst_acpi_mach sst_glk_devdata[] = {
        {}
 };
 
-static const struct sst_acpi_mach sst_cnl_devdata[] = {
+static const struct snd_soc_acpi_mach sst_cnl_devdata[] = {
        {
                .id = "INT34C2",
                .drv_name = "cnl_rt274",
                .fw_filename = "intel/dsp_fw_cnl.bin",
+               .pdata = &cnl_pdata,
        },
+       {}
 };
 
 /* PCI IDs */
index 8d9d6899f761b2a55991ebea505a0e9f9a964fd8..e00cde8200ddd186cea76aeec8442891ad4107a9 100644 (file)
@@ -53,6 +53,7 @@ struct skl {
        struct platform_device *dmic_dev;
        struct platform_device *i2s_dev;
        struct snd_soc_platform *platform;
+       struct snd_soc_dai_driver *dais;
 
        struct nhlt_acpi_table *nhlt; /* nhlt ptr */
        struct skl_sst *skl_sst; /* sst skl ctx */
@@ -73,6 +74,7 @@ struct skl {
        struct skl_debug *debugfs;
        u8 nr_modules;
        struct skl_module **modules;
+       bool use_tplg_pcm;
 };
 
 #define skl_to_ebus(s) (&(s)->ebus)
@@ -85,9 +87,9 @@ struct skl_dma_params {
        u8 stream_tag;
 };
 
-/* to pass dmic data */
 struct skl_machine_pdata {
        u32 dmic_num;
+       bool use_tplg_pcm; /* use dais and dai links from topology */
 };
 
 struct skl_dsp_ops {
index 0357b27d29f2cc97a8b69be686ef999ae4c1025c..c1eed0d2653ba85be1386cbb76013397080a2f2a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # MTK Platform Support
 obj-$(CONFIG_SND_SOC_MT8173) += mt8173-afe-pcm.o
 # Machine support
index 565b5b51e8b709335ad8ac1d42c84d43270b5ab7..ab0a9a553702ba30ea145c4aa7327ea3563feb0c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # MXS Platform Support
 snd-soc-mxs-objs := mxs-saif.o
 snd-soc-mxs-pcm-objs := mxs-pcm.o
index 7e46c71503168403d57da2e774f3be2097698ece..c7ba2b9549d20902b59ca2eabe3b4dcf4377c537 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # NUC900 series audio
 snd-soc-nuc900-pcm-objs := nuc900-pcm.o
 snd-soc-nuc900-ac97-objs := nuc900-ac97.o
index db36fbd5d1a08a9be7c18bcccff7673e6de3a41e..a6785dc4fc9008499f3126f55398d584a6fc74e9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # OMAP Platform Support
 snd-soc-omap-objs := omap-pcm.o
 snd-soc-omap-dmic-objs := omap-dmic.o
index 2cff67b61dc368b3d5559ecd6d0973c2be63a6c3..5b265662f04fea8a2f1aae31669b3718e8956ee9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # PXA Platform Support
 snd-soc-pxa2xx-objs := pxa2xx-pcm.o
 snd-soc-pxa2xx-ac97-objs := pxa2xx-ac97.o
index 79e5c50a8f71b85a1ae4d2e118fea62a6c5b7e82..d5280355c24f32c0a823eb627aacac2045a6b111 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Platform
 snd-soc-lpass-cpu-objs := lpass-cpu.o
 snd-soc-lpass-platform-objs := lpass-platform.o
index 105f0e14a4ab2e13a27ac89b97089f0958920ee8..05b078e7b87f9ba75e3901fec4cd7239626cff76 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # ROCKCHIP Platform Support
 snd-soc-rockchip-i2s-objs := rockchip_i2s.o
 snd-soc-rockchip-pdm-objs := rockchip_pdm.o
index b6590467fd140c9cbfa8e802af70a5fe390da9f4..908211e1d6fcb46eb8e0d7d8401a892967ba156a 100644 (file)
@@ -692,7 +692,6 @@ static int rockchip_i2s_remove(struct platform_device *pdev)
        if (!pm_runtime_status_suspended(&pdev->dev))
                i2s_runtime_suspend(&pdev->dev);
 
-       clk_disable_unprepare(i2s->mclk);
        clk_disable_unprepare(i2s->hclk);
 
        return 0;
index b6c2ee35833306d66ac3dc483f3aadbc2feb8565..030949e1e434229430eb66bfc132a3446bd73688 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # S3c24XX Platform Support
 snd-soc-s3c-dma-objs := dmaengine.o
 snd-soc-idma-objs := idma.o
index 10a4da06c0a1477388758f30b2aaf61ae8a5ef12..de783c6d2a7091a4de73c8c8a3d55e05d9493f7c 100644 (file)
@@ -552,8 +552,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
                        }
 
                        ret = clk_prepare_enable(i2s->op_clk);
-                       if (ret)
+                       if (ret) {
+                               clk_put(i2s->op_clk);
+                               i2s->op_clk = NULL;
                                goto err;
+                       }
                        i2s->rclk_srcrate = clk_get_rate(i2s->op_clk);
 
                        /* Over-ride the other's */
@@ -1285,6 +1288,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
                        }
                }
        }
+       quirks &= ~(QUIRK_SEC_DAI | QUIRK_SUPPORTS_IDMA);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        pri_dai->addr = devm_ioremap_resource(&pdev->dev, res);
index aaf3dcd1ee2a197fae36c1f577443a386e8371a1..51bd7c81671c4a35b29a51024140b4a7297ce3b4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ## DMA engines
 snd-soc-dma-sh7760-objs        := dma-sh7760.o
 obj-$(CONFIG_SND_SOC_PCM_SH7760)       += snd-soc-dma-sh7760.o
index 938baff86ef280a9b6f6d93a4e4e7283a3ea9eb8..e11ce5036bcfb8347d930673f8888ba414c37418 100644 (file)
@@ -479,10 +479,10 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
        }
 
        if (req_rate[0] % 48000 == 0)
-               adg->flags = AUDIO_OUT_48;
+               adg->flags |= AUDIO_OUT_48;
 
        if (of_get_property(np, "clkout-lr-asynchronous", NULL))
-               adg->flags = LRCLK_ASYNC;
+               adg->flags |= LRCLK_ASYNC;
 
        /*
         * This driver is assuming that AUDIO_CLKA/AUDIO_CLKB/AUDIO_CLKC
index fffc07e7262741781dbe1bf00e9acb05c3c5a766..03c2a1f02643b8eac6a56918a759b8fb95352f72 100644 (file)
@@ -1112,6 +1112,9 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
 
        i = 0;
        for_each_child_of_node(node, np) {
+               if (!of_device_is_available(np))
+                       goto skip;
+
                ssi = rsnd_ssi_get(priv, i);
 
                snprintf(name, RSND_SSI_NAME_SIZE, "%s.%d",
@@ -1148,7 +1151,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
                        of_node_put(np);
                        goto rsnd_ssi_probe_done;
                }
-
+skip:
                i++;
        }
 
index dd917f20f12f59a11742962e57c83e01f8c78642..16ed11965ff9e2a91a0adf87533f5817f52b61d8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-soc-sirf-audio-objs := sirf-audio.o
 snd-soc-sirf-audio-port-objs := sirf-audio-port.o
 snd-soc-sirf-usp-objs := sirf-usp.o
similarity index 63%
rename from sound/soc/intel/common/sst-match-acpi.c
rename to sound/soc/soc-acpi.c
index 56d26f36a3cba16f25217b465cfe4704c674e3c9..f21df28bc28e24eafc744fb8b524c26e9cbbd844 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * sst_match_apci.c - SST (LPE) match for ACPI enumeration.
+ * soc-apci.c - support for ACPI enumeration.
  *
  * Copyright (c) 2013-15, Intel Corporation.
  *
@@ -14,9 +14,9 @@
  * more details.
  */
 
-#include "sst-acpi.h"
+#include <sound/soc-acpi.h>
 
-static acpi_status sst_acpi_find_name(acpi_handle handle, u32 level,
+static acpi_status snd_soc_acpi_find_name(acpi_handle handle, u32 level,
                                      void *context, void **ret)
 {
        struct acpi_device *adev;
@@ -34,12 +34,12 @@ static acpi_status sst_acpi_find_name(acpi_handle handle, u32 level,
        return AE_OK;
 }
 
-const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
+const char *snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
 {
        const char *name = NULL;
        acpi_status status;
 
-       status = acpi_get_devices(hid, sst_acpi_find_name, NULL,
+       status = acpi_get_devices(hid, snd_soc_acpi_find_name, NULL,
                                  (void **)&name);
 
        if (ACPI_FAILURE(status) || name[0] == '\0')
@@ -47,9 +47,9 @@ const char *sst_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN])
 
        return name;
 }
-EXPORT_SYMBOL_GPL(sst_acpi_find_name_from_hid);
+EXPORT_SYMBOL_GPL(snd_soc_acpi_find_name_from_hid);
 
-static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level,
+static acpi_status snd_soc_acpi_mach_match(acpi_handle handle, u32 level,
                                       void *context, void **ret)
 {
        unsigned long long sta;
@@ -63,26 +63,27 @@ static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level,
        return AE_OK;
 }
 
-bool sst_acpi_check_hid(const u8 hid[ACPI_ID_LEN])
+bool snd_soc_acpi_check_hid(const u8 hid[ACPI_ID_LEN])
 {
        acpi_status status;
        bool found = false;
 
-       status = acpi_get_devices(hid, sst_acpi_mach_match, &found, NULL);
+       status = acpi_get_devices(hid, snd_soc_acpi_mach_match, &found, NULL);
 
        if (ACPI_FAILURE(status))
                return false;
 
        return found;
 }
-EXPORT_SYMBOL_GPL(sst_acpi_check_hid);
+EXPORT_SYMBOL_GPL(snd_soc_acpi_check_hid);
 
-struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines)
+struct snd_soc_acpi_mach *
+snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
 {
-       struct sst_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach;
 
        for (mach = machines; mach->id[0]; mach++) {
-               if (sst_acpi_check_hid(mach->id) == true) {
+               if (snd_soc_acpi_check_hid(mach->id) == true) {
                        if (mach->machine_quirk == NULL)
                                return mach;
 
@@ -92,14 +93,14 @@ struct sst_acpi_mach *sst_acpi_find_machine(struct sst_acpi_mach *machines)
        }
        return NULL;
 }
-EXPORT_SYMBOL_GPL(sst_acpi_find_machine);
+EXPORT_SYMBOL_GPL(snd_soc_acpi_find_machine);
 
-static acpi_status sst_acpi_find_package(acpi_handle handle, u32 level,
-                                       void *context, void **ret)
+static acpi_status snd_soc_acpi_find_package(acpi_handle handle, u32 level,
+                                            void *context, void **ret)
 {
        struct acpi_device *adev;
        acpi_status status = AE_OK;
-       struct sst_acpi_package_context *pkg_ctx = context;
+       struct snd_soc_acpi_package_context *pkg_ctx = context;
 
        pkg_ctx->data_valid = false;
 
@@ -137,37 +138,38 @@ static acpi_status sst_acpi_find_package(acpi_handle handle, u32 level,
        return AE_OK;
 }
 
-bool sst_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
-                               struct sst_acpi_package_context *ctx)
+bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
+                               struct snd_soc_acpi_package_context *ctx)
 {
        acpi_status status;
 
-       status = acpi_get_devices(hid, sst_acpi_find_package, ctx, NULL);
+       status = acpi_get_devices(hid, snd_soc_acpi_find_package, ctx, NULL);
 
        if (ACPI_FAILURE(status) || !ctx->data_valid)
                return false;
 
        return true;
 }
-EXPORT_SYMBOL_GPL(sst_acpi_find_package_from_hid);
+EXPORT_SYMBOL_GPL(snd_soc_acpi_find_package_from_hid);
 
-struct sst_acpi_mach *sst_acpi_codec_list(void *arg)
+struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
 {
-       struct sst_acpi_mach *mach = arg;
-       struct sst_codecs *codec_list = (struct sst_codecs *) mach->quirk_data;
+       struct snd_soc_acpi_mach *mach = arg;
+       struct snd_soc_acpi_codecs *codec_list =
+               (struct snd_soc_acpi_codecs *) mach->quirk_data;
        int i;
 
        if (mach->quirk_data == NULL)
                return mach;
 
        for (i = 0; i < codec_list->num_codecs; i++) {
-               if (sst_acpi_check_hid(codec_list->codecs[i]) != true)
+               if (snd_soc_acpi_check_hid(codec_list->codecs[i]) != true)
                        return NULL;
        }
 
        return mach;
 }
-EXPORT_SYMBOL_GPL(sst_acpi_codec_list);
+EXPORT_SYMBOL_GPL(snd_soc_acpi_codec_list);
 
 MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("Intel Common ACPI Match module");
+MODULE_DESCRIPTION("ALSA SoC ACPI module");
index 2cb8d3b55fbc210cd76d110df6d9fb11c976cb50..d9b1e6417fb947652f9186ea13c1845ca5882b85 100644 (file)
@@ -30,8 +30,10 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
@@ -44,7 +46,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
                }
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->open) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->open) {
                ret = platform->driver->compr_ops->open(cstream);
                if (ret < 0) {
                        pr_err("compress asoc: can't open platform %s\n",
@@ -53,6 +55,27 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
                }
        }
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->open)
+                       continue;
+
+               __ret = component->driver->compr_ops->open(cstream);
+               if (__ret < 0) {
+                       pr_err("compress asoc: can't open platform %s\n",
+                              component->name);
+                       ret = __ret;
+               }
+       }
+       if (ret < 0)
+               goto machine_err;
+
        if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->startup) {
                ret = rtd->dai_link->compr_ops->startup(cstream);
                if (ret < 0) {
@@ -68,7 +91,21 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
        return 0;
 
 machine_err:
-       if (platform->driver->compr_ops && platform->driver->compr_ops->free)
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->free)
+                       continue;
+
+               component->driver->compr_ops->free(cstream);
+       }
+
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
                platform->driver->compr_ops->free(cstream);
 plat_err:
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
@@ -84,11 +121,13 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
        struct snd_pcm_substream *fe_substream =
                 fe->pcm->streams[cstream->direction].substream;
        struct snd_soc_platform *platform = fe->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = fe->cpu_dai;
        struct snd_soc_dpcm *dpcm;
        struct snd_soc_dapm_widget_list *list;
        int stream;
-       int ret = 0;
+       int ret = 0, __ret;
 
        if (cstream->direction == SND_COMPRESS_PLAYBACK)
                stream = SNDRV_PCM_STREAM_PLAYBACK;
@@ -107,7 +146,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
        }
 
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->open) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->open) {
                ret = platform->driver->compr_ops->open(cstream);
                if (ret < 0) {
                        pr_err("compress asoc: can't open platform %s\n",
@@ -116,6 +155,27 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
                }
        }
 
+       for_each_rtdcom(fe, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->open)
+                       continue;
+
+               __ret = component->driver->compr_ops->open(cstream);
+               if (__ret < 0) {
+                       pr_err("compress asoc: can't open platform %s\n",
+                              component->name);
+                       ret = __ret;
+               }
+       }
+       if (ret < 0)
+               goto machine_err;
+
        if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) {
                ret = fe->dai_link->compr_ops->startup(cstream);
                if (ret < 0) {
@@ -167,7 +227,21 @@ fe_err:
        if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown)
                fe->dai_link->compr_ops->shutdown(cstream);
 machine_err:
-       if (platform->driver->compr_ops && platform->driver->compr_ops->free)
+       for_each_rtdcom(fe, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->free)
+                       continue;
+
+               component->driver->compr_ops->free(cstream);
+       }
+
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
                platform->driver->compr_ops->free(cstream);
 plat_err:
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
@@ -210,6 +284,8 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
        int stream;
@@ -235,7 +311,21 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
        if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->shutdown)
                rtd->dai_link->compr_ops->shutdown(cstream);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->free)
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->free)
+                       continue;
+
+               component->driver->compr_ops->free(cstream);
+       }
+
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
                platform->driver->compr_ops->free(cstream);
 
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
@@ -267,6 +357,8 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
 {
        struct snd_soc_pcm_runtime *fe = cstream->private_data;
        struct snd_soc_platform *platform = fe->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = fe->cpu_dai;
        struct snd_soc_dpcm *dpcm;
        int stream, ret;
@@ -304,9 +396,23 @@ static int soc_compr_free_fe(struct snd_compr_stream *cstream)
        if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->shutdown)
                fe->dai_link->compr_ops->shutdown(cstream);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->free)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
                platform->driver->compr_ops->free(cstream);
 
+       for_each_rtdcom(fe, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->free)
+                       continue;
+
+               component->driver->compr_ops->free(cstream);
+       }
+
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
                cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
 
@@ -319,18 +425,38 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
 
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->trigger) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->trigger) {
                ret = platform->driver->compr_ops->trigger(cstream, cmd);
                if (ret < 0)
                        goto out;
        }
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->trigger)
+                       continue;
+
+               __ret = component->driver->compr_ops->trigger(cstream, cmd);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+       if (ret < 0)
+               goto out;
+
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->trigger)
                cpu_dai->driver->cops->trigger(cstream, cmd, cpu_dai);
 
@@ -353,16 +479,36 @@ static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd)
 {
        struct snd_soc_pcm_runtime *fe = cstream->private_data;
        struct snd_soc_platform *platform = fe->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = fe->cpu_dai;
-       int ret = 0, stream;
+       int ret = 0, __ret, stream;
 
        if (cmd == SND_COMPR_TRIGGER_PARTIAL_DRAIN ||
                cmd == SND_COMPR_TRIGGER_DRAIN) {
 
-               if (platform->driver->compr_ops &&
+               if (platform &&
+                   platform->driver->compr_ops &&
                    platform->driver->compr_ops->trigger)
                        return platform->driver->compr_ops->trigger(cstream,
                                                                    cmd);
+
+               for_each_rtdcom(fe, rtdcom) {
+                       component = rtdcom->component;
+
+                       /* ignore duplication for now */
+                       if (platform && (component == &platform->component))
+                               continue;
+
+                       if (!component->driver->compr_ops ||
+                           !component->driver->compr_ops->trigger)
+                               continue;
+
+                       __ret = component->driver->compr_ops->trigger(cstream, cmd);
+                       if (__ret < 0)
+                               ret = __ret;
+               }
+               return ret;
        }
 
        if (cstream->direction == SND_COMPRESS_PLAYBACK)
@@ -379,12 +525,30 @@ static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd)
                        goto out;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->trigger) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->trigger) {
                ret = platform->driver->compr_ops->trigger(cstream, cmd);
                if (ret < 0)
                        goto out;
        }
 
+       for_each_rtdcom(fe, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->trigger)
+                       continue;
+
+               __ret = component->driver->compr_ops->trigger(cstream, cmd);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+       if (ret < 0)
+               goto out;
+
        fe->dpcm[stream].runtime_update = SND_SOC_DPCM_UPDATE_FE;
 
        ret = dpcm_be_dai_trigger(fe, stream, cmd);
@@ -415,8 +579,10 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
@@ -432,12 +598,30 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
                        goto err;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
                ret = platform->driver->compr_ops->set_params(cstream, params);
                if (ret < 0)
                        goto err;
        }
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->set_params)
+                       continue;
+
+               __ret = component->driver->compr_ops->set_params(cstream, params);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+       if (ret < 0)
+               goto err;
+
        if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) {
                ret = rtd->dai_link->compr_ops->set_params(cstream);
                if (ret < 0)
@@ -471,8 +655,10 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
        struct snd_pcm_substream *fe_substream =
                 fe->pcm->streams[cstream->direction].substream;
        struct snd_soc_platform *platform = fe->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = fe->cpu_dai;
-       int ret = 0, stream;
+       int ret = 0, __ret, stream;
 
        if (cstream->direction == SND_COMPRESS_PLAYBACK)
                stream = SNDRV_PCM_STREAM_PLAYBACK;
@@ -487,12 +673,30 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
                        goto out;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
                ret = platform->driver->compr_ops->set_params(cstream, params);
                if (ret < 0)
                        goto out;
        }
 
+       for_each_rtdcom(fe, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->set_params)
+                       continue;
+
+               __ret = component->driver->compr_ops->set_params(cstream, params);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+       if (ret < 0)
+               goto out;
+
        if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->set_params) {
                ret = fe->dai_link->compr_ops->set_params(cstream);
                if (ret < 0)
@@ -531,8 +735,10 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
@@ -542,8 +748,27 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream,
                        goto err;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->get_params)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->get_params) {
                ret = platform->driver->compr_ops->get_params(cstream, params);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->get_params)
+                       continue;
+
+               __ret = component->driver->compr_ops->get_params(cstream, params);
+               if (__ret < 0)
+                       ret = __ret;
+       }
 
 err:
        mutex_unlock(&rtd->pcm_mutex);
@@ -555,13 +780,35 @@ static int soc_compr_get_caps(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
-       int ret = 0;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->get_caps)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->get_caps) {
                ret = platform->driver->compr_ops->get_caps(cstream, caps);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
 
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->get_caps)
+                       continue;
+
+               __ret = component->driver->compr_ops->get_caps(cstream, caps);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+
+err:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
 }
@@ -571,13 +818,35 @@ static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
-       int ret = 0;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->get_codec_caps)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->get_codec_caps) {
                ret = platform->driver->compr_ops->get_codec_caps(cstream, codec);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
 
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->get_codec_caps)
+                       continue;
+
+               __ret = component->driver->compr_ops->get_codec_caps(cstream, codec);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+
+err:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
 }
@@ -586,8 +855,10 @@ static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
@@ -597,8 +868,27 @@ static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes)
                        goto err;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->ack)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->ack) {
                ret = platform->driver->compr_ops->ack(cstream, bytes);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->ack)
+                       continue;
+
+               __ret = component->driver->compr_ops->ack(cstream, bytes);
+               if (__ret < 0)
+                       ret = __ret;
+       }
 
 err:
        mutex_unlock(&rtd->pcm_mutex);
@@ -610,7 +900,9 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
-       int ret = 0;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
+       int ret = 0, __ret;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
@@ -618,9 +910,29 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->pointer)
                cpu_dai->driver->cops->pointer(cstream, tstamp, cpu_dai);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->pointer)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->pointer) {
                ret = platform->driver->compr_ops->pointer(cstream, tstamp);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->pointer)
+                       continue;
 
+               __ret = component->driver->compr_ops->pointer(cstream, tstamp);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+
+err:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
 }
@@ -630,13 +942,34 @@ static int soc_compr_copy(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
-       int ret = 0;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
+       int ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->copy)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->copy) {
                ret = platform->driver->compr_ops->copy(cstream, buf, count);
+               if (ret < 0)
+                       goto err;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->copy)
+                       continue;
 
+               __ret = component->driver->compr_ops->copy(cstream, buf, count);
+               if (__ret < 0)
+                       ret = __ret;
+       }
+err:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
 }
@@ -646,8 +979,10 @@ static int soc_compr_set_metadata(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->set_metadata) {
                ret = cpu_dai->driver->cops->set_metadata(cstream, metadata, cpu_dai);
@@ -655,8 +990,27 @@ static int soc_compr_set_metadata(struct snd_compr_stream *cstream,
                        return ret;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->set_metadata)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->set_metadata) {
                ret = platform->driver->compr_ops->set_metadata(cstream, metadata);
+               if (ret < 0)
+                       return ret;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->set_metadata)
+                       continue;
+
+               __ret = component->driver->compr_ops->set_metadata(cstream, metadata);
+               if (__ret < 0)
+                       ret = __ret;
+       }
 
        return ret;
 }
@@ -666,8 +1020,10 @@ static int soc_compr_get_metadata(struct snd_compr_stream *cstream,
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret = 0;
+       int ret = 0, __ret;
 
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->get_metadata) {
                ret = cpu_dai->driver->cops->get_metadata(cstream, metadata, cpu_dai);
@@ -675,8 +1031,27 @@ static int soc_compr_get_metadata(struct snd_compr_stream *cstream,
                        return ret;
        }
 
-       if (platform->driver->compr_ops && platform->driver->compr_ops->get_metadata)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->get_metadata) {
                ret = platform->driver->compr_ops->get_metadata(cstream, metadata);
+               if (ret < 0)
+                       return ret;
+       }
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->get_metadata)
+                       continue;
+
+               __ret = component->driver->compr_ops->get_metadata(cstream, metadata);
+               if (__ret < 0)
+                       ret = __ret;
+       }
 
        return ret;
 }
@@ -723,6 +1098,8 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 {
        struct snd_soc_codec *codec = rtd->codec;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_compr *compr;
@@ -798,9 +1175,25 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
                memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops));
        }
 
+
        /* Add copy callback for not memory mapped DSPs */
-       if (platform->driver->compr_ops && platform->driver->compr_ops->copy)
+       if (platform && platform->driver->compr_ops && platform->driver->compr_ops->copy)
+               compr->ops->copy = soc_compr_copy;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->compr_ops ||
+                   !component->driver->compr_ops->copy)
+                       continue;
+
                compr->ops->copy = soc_compr_copy;
+       }
+
 
        mutex_init(&compr->lock);
        ret = snd_compress_new(rtd->card->snd_card, num, direction,
index fee4b0ef5566cf9e8de0bf5c568706da9cab2ea2..533c822ca6e6feb08afc194f05b52bd3c8084f41 100644 (file)
@@ -614,6 +614,8 @@ struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
 }
 EXPORT_SYMBOL_GPL(snd_soc_get_dai_substream);
 
+static const struct snd_soc_ops null_snd_soc_ops;
+
 static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
        struct snd_soc_card *card, struct snd_soc_dai_link *dai_link)
 {
@@ -626,6 +628,9 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
        INIT_LIST_HEAD(&rtd->component_list);
        rtd->card = card;
        rtd->dai_link = dai_link;
+       if (!rtd->dai_link->ops)
+               rtd->dai_link->ops = &null_snd_soc_ops;
+
        rtd->codec_dais = kzalloc(sizeof(struct snd_soc_dai *) *
                                        dai_link->num_codecs,
                                        GFP_KERNEL);
@@ -639,8 +644,7 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
 
 static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
 {
-       if (rtd && rtd->codec_dais)
-               kfree(rtd->codec_dais);
+       kfree(rtd->codec_dais);
        snd_soc_rtdcom_del_all(rtd);
        kfree(rtd);
 }
@@ -2632,7 +2636,7 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls);
 int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
        unsigned int freq, int dir)
 {
-       if (dai->driver && dai->driver->ops->set_sysclk)
+       if (dai->driver->ops->set_sysclk)
                return dai->driver->ops->set_sysclk(dai, clk_id, freq, dir);
 
        return snd_soc_component_set_sysclk(dai->component, clk_id, 0,
@@ -2700,7 +2704,7 @@ EXPORT_SYMBOL_GPL(snd_soc_component_set_sysclk);
 int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
        int div_id, int div)
 {
-       if (dai->driver && dai->driver->ops->set_clkdiv)
+       if (dai->driver->ops->set_clkdiv)
                return dai->driver->ops->set_clkdiv(dai, div_id, div);
        else
                return -EINVAL;
@@ -2720,7 +2724,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_clkdiv);
 int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
        unsigned int freq_in, unsigned int freq_out)
 {
-       if (dai->driver && dai->driver->ops->set_pll)
+       if (dai->driver->ops->set_pll)
                return dai->driver->ops->set_pll(dai, pll_id, source,
                                         freq_in, freq_out);
 
@@ -2786,7 +2790,7 @@ EXPORT_SYMBOL_GPL(snd_soc_component_set_pll);
  */
 int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
 {
-       if (dai->driver && dai->driver->ops->set_bclk_ratio)
+       if (dai->driver->ops->set_bclk_ratio)
                return dai->driver->ops->set_bclk_ratio(dai, ratio);
        else
                return -EINVAL;
@@ -2860,7 +2864,7 @@ static int snd_soc_xlate_tdm_slot_mask(unsigned int slots,
 int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
        unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
 {
-       if (dai->driver && dai->driver->ops->xlate_tdm_slot_mask)
+       if (dai->driver->ops->xlate_tdm_slot_mask)
                dai->driver->ops->xlate_tdm_slot_mask(slots,
                                                &tx_mask, &rx_mask);
        else
@@ -2869,7 +2873,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
        dai->tx_mask = tx_mask;
        dai->rx_mask = rx_mask;
 
-       if (dai->driver && dai->driver->ops->set_tdm_slot)
+       if (dai->driver->ops->set_tdm_slot)
                return dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
                                slots, slot_width);
        else
@@ -2893,7 +2897,7 @@ int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
        unsigned int tx_num, unsigned int *tx_slot,
        unsigned int rx_num, unsigned int *rx_slot)
 {
-       if (dai->driver && dai->driver->ops->set_channel_map)
+       if (dai->driver->ops->set_channel_map)
                return dai->driver->ops->set_channel_map(dai, tx_num, tx_slot,
                        rx_num, rx_slot);
        else
@@ -2910,7 +2914,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_channel_map);
  */
 int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate)
 {
-       if (dai->driver && dai->driver->ops->set_tristate)
+       if (dai->driver->ops->set_tristate)
                return dai->driver->ops->set_tristate(dai, tristate);
        else
                return -EINVAL;
@@ -3250,6 +3254,30 @@ static int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm,
        return component->driver->stream_event(component, event);
 }
 
+static int snd_soc_component_drv_pcm_new(struct snd_soc_component *component,
+                                       struct snd_soc_pcm_runtime *rtd)
+{
+       if (component->driver->pcm_new)
+               return component->driver->pcm_new(rtd);
+
+       return 0;
+}
+
+static void snd_soc_component_drv_pcm_free(struct snd_soc_component *component,
+                                         struct snd_pcm *pcm)
+{
+       if (component->driver->pcm_free)
+               component->driver->pcm_free(pcm);
+}
+
+static int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm,
+                                       enum snd_soc_bias_level level)
+{
+       struct snd_soc_component *component = dapm->component;
+
+       return component->driver->set_bias_level(component, level);
+}
+
 static int snd_soc_component_initialize(struct snd_soc_component *component,
        const struct snd_soc_component_driver *driver, struct device *dev)
 {
@@ -3270,16 +3298,21 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
        component->set_sysclk = component->driver->set_sysclk;
        component->set_pll = component->driver->set_pll;
        component->set_jack = component->driver->set_jack;
+       component->pcm_new = snd_soc_component_drv_pcm_new;
+       component->pcm_free = snd_soc_component_drv_pcm_free;
 
        dapm = snd_soc_component_get_dapm(component);
        dapm->dev = dev;
        dapm->component = component;
        dapm->bias_level = SND_SOC_BIAS_OFF;
-       dapm->idle_bias_off = true;
+       dapm->idle_bias_off = !driver->idle_bias_on;
+       dapm->suspend_bias_off = driver->suspend_bias_off;
        if (driver->seq_notifier)
                dapm->seq_notifier = snd_soc_component_seq_notifier;
        if (driver->stream_event)
                dapm->stream_event = snd_soc_component_stream_event;
+       if (driver->set_bias_level)
+               dapm->set_bias_level = snd_soc_component_set_bias_level;
 
        INIT_LIST_HEAD(&component->dai_list);
        mutex_init(&component->io_mutex);
@@ -3371,19 +3404,49 @@ static void snd_soc_component_del_unlocked(struct snd_soc_component *component)
        list_del(&component->list);
 }
 
-int snd_soc_register_component(struct device *dev,
-                              const struct snd_soc_component_driver *component_driver,
-                              struct snd_soc_dai_driver *dai_drv,
-                              int num_dai)
+#define ENDIANNESS_MAP(name) \
+       (SNDRV_PCM_FMTBIT_##name##LE | SNDRV_PCM_FMTBIT_##name##BE)
+static u64 endianness_format_map[] = {
+       ENDIANNESS_MAP(S16_),
+       ENDIANNESS_MAP(U16_),
+       ENDIANNESS_MAP(S24_),
+       ENDIANNESS_MAP(U24_),
+       ENDIANNESS_MAP(S32_),
+       ENDIANNESS_MAP(U32_),
+       ENDIANNESS_MAP(S24_3),
+       ENDIANNESS_MAP(U24_3),
+       ENDIANNESS_MAP(S20_3),
+       ENDIANNESS_MAP(U20_3),
+       ENDIANNESS_MAP(S18_3),
+       ENDIANNESS_MAP(U18_3),
+       ENDIANNESS_MAP(FLOAT_),
+       ENDIANNESS_MAP(FLOAT64_),
+       ENDIANNESS_MAP(IEC958_SUBFRAME_),
+};
+
+/*
+ * Fix up the DAI formats for endianness: codecs don't actually see
+ * the endianness of the data but we're using the CPU format
+ * definitions which do need to include endianness so we ensure that
+ * codec DAIs always have both big and little endian variants set.
+ */
+static void convert_endianness_formats(struct snd_soc_pcm_stream *stream)
 {
-       struct snd_soc_component *component;
-       int ret;
+       int i;
 
-       component = kzalloc(sizeof(*component), GFP_KERNEL);
-       if (!component) {
-               dev_err(dev, "ASoC: Failed to allocate memory\n");
-               return -ENOMEM;
-       }
+       for (i = 0; i < ARRAY_SIZE(endianness_format_map); i++)
+               if (stream->formats & endianness_format_map[i])
+                       stream->formats |= endianness_format_map[i];
+}
+
+int snd_soc_add_component(struct device *dev,
+                       struct snd_soc_component *component,
+                       const struct snd_soc_component_driver *component_driver,
+                       struct snd_soc_dai_driver *dai_drv,
+                       int num_dai)
+{
+       int ret;
+       int i;
 
        ret = snd_soc_component_initialize(component, component_driver, dev);
        if (ret)
@@ -3392,7 +3455,15 @@ int snd_soc_register_component(struct device *dev,
        component->ignore_pmdown_time = true;
        component->registered_as_component = true;
 
-       ret = snd_soc_register_dais(component, dai_drv, num_dai, true);
+       if (component_driver->endianness) {
+               for (i = 0; i < num_dai; i++) {
+                       convert_endianness_formats(&dai_drv[i].playback);
+                       convert_endianness_formats(&dai_drv[i].capture);
+               }
+       }
+
+       ret = snd_soc_register_dais(component, dai_drv, num_dai,
+                                   !component_driver->non_legacy_dai_naming);
        if (ret < 0) {
                dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
                goto err_cleanup;
@@ -3408,6 +3479,22 @@ err_free:
        kfree(component);
        return ret;
 }
+EXPORT_SYMBOL_GPL(snd_soc_add_component);
+
+int snd_soc_register_component(struct device *dev,
+                       const struct snd_soc_component_driver *component_driver,
+                       struct snd_soc_dai_driver *dai_drv,
+                       int num_dai)
+{
+       struct snd_soc_component *component;
+
+       component = kzalloc(sizeof(*component), GFP_KERNEL);
+       if (!component)
+               return -ENOMEM;
+
+       return snd_soc_add_component(dev, component, component_driver,
+                                    dai_drv, num_dai);
+}
 EXPORT_SYMBOL_GPL(snd_soc_register_component);
 
 /**
@@ -3448,6 +3535,32 @@ void snd_soc_unregister_component(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
 
+struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
+                                                  const char *driver_name)
+{
+       struct snd_soc_component *component;
+       struct snd_soc_component *ret;
+
+       ret = NULL;
+       mutex_lock(&client_mutex);
+       list_for_each_entry(component, &component_list, list) {
+               if (dev != component->dev)
+                       continue;
+
+               if (driver_name &&
+                   (driver_name != component->driver->name) &&
+                   (strcmp(component->driver->name, driver_name) != 0))
+                       continue;
+
+               ret = component;
+               break;
+       }
+       mutex_unlock(&client_mutex);
+
+       return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
+
 static int snd_soc_platform_drv_probe(struct snd_soc_component *component)
 {
        struct snd_soc_platform *platform = snd_soc_component_to_platform(component);
@@ -3462,6 +3575,26 @@ static void snd_soc_platform_drv_remove(struct snd_soc_component *component)
        platform->driver->remove(platform);
 }
 
+static int snd_soc_platform_drv_pcm_new(struct snd_soc_component *component,
+                                       struct snd_soc_pcm_runtime *rtd)
+{
+       struct snd_soc_platform *platform = snd_soc_component_to_platform(component);
+
+       if (platform->driver->pcm_new)
+               return platform->driver->pcm_new(rtd);
+
+       return 0;
+}
+
+static void snd_soc_platform_drv_pcm_free(struct snd_soc_component *component,
+                                         struct snd_pcm *pcm)
+{
+       struct snd_soc_platform *platform = snd_soc_component_to_platform(component);
+
+       if (platform->driver->pcm_free)
+               platform->driver->pcm_free(pcm);
+}
+
 /**
  * snd_soc_add_platform - Add a platform to the ASoC core
  * @dev: The parent device for the platform
@@ -3485,6 +3618,10 @@ int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform,
                platform->component.probe = snd_soc_platform_drv_probe;
        if (platform_drv->remove)
                platform->component.remove = snd_soc_platform_drv_remove;
+       if (platform_drv->pcm_new)
+               platform->component.pcm_new = snd_soc_platform_drv_pcm_new;
+       if (platform_drv->pcm_free)
+               platform->component.pcm_free = snd_soc_platform_drv_pcm_free;
 
 #ifdef CONFIG_DEBUG_FS
        platform->component.debugfs_prefix = "platform";
@@ -3582,39 +3719,6 @@ void snd_soc_unregister_platform(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(snd_soc_unregister_platform);
 
-static u64 codec_format_map[] = {
-       SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE,
-       SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_U16_BE,
-       SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
-       SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_U24_BE,
-       SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE,
-       SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_U32_BE,
-       SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_U24_3BE,
-       SNDRV_PCM_FMTBIT_U24_3LE | SNDRV_PCM_FMTBIT_U24_3BE,
-       SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S20_3BE,
-       SNDRV_PCM_FMTBIT_U20_3LE | SNDRV_PCM_FMTBIT_U20_3BE,
-       SNDRV_PCM_FMTBIT_S18_3LE | SNDRV_PCM_FMTBIT_S18_3BE,
-       SNDRV_PCM_FMTBIT_U18_3LE | SNDRV_PCM_FMTBIT_U18_3BE,
-       SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE,
-       SNDRV_PCM_FMTBIT_FLOAT64_LE | SNDRV_PCM_FMTBIT_FLOAT64_BE,
-       SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE
-       | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE,
-};
-
-/* Fix up the DAI formats for endianness: codecs don't actually see
- * the endianness of the data but we're using the CPU format
- * definitions which do need to include endianness so we ensure that
- * codec DAIs always have both big and little endian variants set.
- */
-static void fixup_codec_formats(struct snd_soc_pcm_stream *stream)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(codec_format_map); i++)
-               if (stream->formats & codec_format_map[i])
-                       stream->formats |= codec_format_map[i];
-}
-
 static int snd_soc_codec_drv_probe(struct snd_soc_component *component)
 {
        struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
@@ -3765,8 +3869,8 @@ int snd_soc_register_codec(struct device *dev,
                codec->component.regmap = codec_drv->get_regmap(dev);
 
        for (i = 0; i < num_dai; i++) {
-               fixup_codec_formats(&dai_drv[i].playback);
-               fixup_codec_formats(&dai_drv[i].capture);
+               convert_endianness_formats(&dai_drv[i].playback);
+               convert_endianness_formats(&dai_drv[i].capture);
        }
 
        ret = snd_soc_register_dais(&codec->component, dai_drv, num_dai, false);
index dcef67a9bd4854a29c79ad8355343c5f16ae76a2..a10b21cfc31ed2e5e6bafcc991682d9861fcfb4e 100644 (file)
@@ -2884,7 +2884,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
 {
        int i, r, ret = 0;
 
-       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
+       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
        for (i = 0; i < num; i++) {
                r = snd_soc_dapm_add_route(dapm, route);
                if (r < 0) {
@@ -2915,7 +2915,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
 {
        int i;
 
-       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
+       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
        for (i = 0; i < num; i++) {
                snd_soc_dapm_del_route(dapm, route);
                route++;
@@ -3681,7 +3681,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
        switch (event) {
        case SND_SOC_DAPM_PRE_PMU:
                substream.stream = SNDRV_PCM_STREAM_CAPTURE;
-               if (source->driver->ops && source->driver->ops->startup) {
+               if (source->driver->ops->startup) {
                        ret = source->driver->ops->startup(&substream, source);
                        if (ret < 0) {
                                dev_err(source->dev,
@@ -3695,7 +3695,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
                        goto out;
 
                substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
-               if (sink->driver->ops && sink->driver->ops->startup) {
+               if (sink->driver->ops->startup) {
                        ret = sink->driver->ops->startup(&substream, sink);
                        if (ret < 0) {
                                dev_err(sink->dev,
@@ -3725,13 +3725,13 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
                ret = 0;
 
                source->active--;
-               if (source->driver->ops && source->driver->ops->shutdown) {
+               if (source->driver->ops->shutdown) {
                        substream.stream = SNDRV_PCM_STREAM_CAPTURE;
                        source->driver->ops->shutdown(&substream, source);
                }
 
                sink->active--;
-               if (sink->driver->ops && sink->driver->ops->shutdown) {
+               if (sink->driver->ops->shutdown) {
                        substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
                        sink->driver->ops->shutdown(&substream, sink);
                }
@@ -3778,18 +3778,27 @@ static int snd_soc_dapm_dai_link_put(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
-                        const struct snd_soc_pcm_stream *params,
-                        unsigned int num_params,
-                        struct snd_soc_dapm_widget *source,
-                        struct snd_soc_dapm_widget *sink)
+static void
+snd_soc_dapm_free_kcontrol(struct snd_soc_card *card,
+                       unsigned long *private_value,
+                       int num_params,
+                       const char **w_param_text)
+{
+       int count;
+
+       devm_kfree(card->dev, (void *)*private_value);
+       for (count = 0 ; count < num_params; count++)
+               devm_kfree(card->dev, (void *)w_param_text[count]);
+       devm_kfree(card->dev, w_param_text);
+}
+
+static struct snd_kcontrol_new *
+snd_soc_dapm_alloc_kcontrol(struct snd_soc_card *card,
+                       char *link_name,
+                       const struct snd_soc_pcm_stream *params,
+                       int num_params, const char **w_param_text,
+                       unsigned long *private_value)
 {
-       struct snd_soc_dapm_widget template;
-       struct snd_soc_dapm_widget *w;
-       char *link_name;
-       int ret, count;
-       unsigned long private_value;
-       const char **w_param_text;
        struct soc_enum w_param_enum[] = {
                SOC_ENUM_SINGLE(0, 0, 0, NULL),
        };
@@ -3798,19 +3807,9 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
                             snd_soc_dapm_dai_link_get,
                             snd_soc_dapm_dai_link_put),
        };
+       struct snd_kcontrol_new *kcontrol_news;
        const struct snd_soc_pcm_stream *config = params;
-
-       w_param_text = devm_kcalloc(card->dev, num_params,
-                                       sizeof(char *), GFP_KERNEL);
-       if (!w_param_text)
-               return -ENOMEM;
-
-       link_name = devm_kasprintf(card->dev, GFP_KERNEL, "%s-%s",
-                                  source->name, sink->name);
-       if (!link_name) {
-               ret = -ENOMEM;
-               goto outfree_w_param;
-       }
+       int count;
 
        for (count = 0 ; count < num_params; count++) {
                if (!config->stream_name) {
@@ -3821,57 +3820,94 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
                                devm_kasprintf(card->dev, GFP_KERNEL,
                                               "Anonymous Configuration %d",
                                               count);
-                       if (!w_param_text[count]) {
-                               ret = -ENOMEM;
-                               goto outfree_link_name;
-                       }
                } else {
                        w_param_text[count] = devm_kmemdup(card->dev,
                                                config->stream_name,
                                                strlen(config->stream_name) + 1,
                                                GFP_KERNEL);
-                       if (!w_param_text[count]) {
-                               ret = -ENOMEM;
-                               goto outfree_link_name;
-                       }
                }
+               if (!w_param_text[count])
+                       goto outfree_w_param;
                config++;
        }
+
        w_param_enum[0].items = num_params;
        w_param_enum[0].texts = w_param_text;
 
-       memset(&template, 0, sizeof(template));
-       template.reg = SND_SOC_NOPM;
-       template.id = snd_soc_dapm_dai_link;
-       template.name = link_name;
-       template.event = snd_soc_dai_link_event;
-       template.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
-               SND_SOC_DAPM_PRE_PMD;
-       template.num_kcontrols = 1;
-       /* duplicate w_param_enum on heap so that memory persists */
-       private_value =
+       *private_value =
                (unsigned long) devm_kmemdup(card->dev,
                        (void *)(kcontrol_dai_link[0].private_value),
                        sizeof(struct soc_enum), GFP_KERNEL);
-       if (!private_value) {
+       if (!*private_value) {
                dev_err(card->dev, "ASoC: Failed to create control for %s widget\n",
                        link_name);
-               ret = -ENOMEM;
-               goto outfree_link_name;
+               goto outfree_w_param;
        }
-       kcontrol_dai_link[0].private_value = private_value;
+       kcontrol_dai_link[0].private_value = *private_value;
        /* duplicate kcontrol_dai_link on heap so that memory persists */
-       template.kcontrol_news =
-                               devm_kmemdup(card->dev, &kcontrol_dai_link[0],
+       kcontrol_news = devm_kmemdup(card->dev, &kcontrol_dai_link[0],
                                        sizeof(struct snd_kcontrol_new),
                                        GFP_KERNEL);
-       if (!template.kcontrol_news) {
+       if (!kcontrol_news) {
                dev_err(card->dev, "ASoC: Failed to create control for %s widget\n",
                        link_name);
-               ret = -ENOMEM;
-               goto outfree_private_value;
+               goto outfree_w_param;
        }
+       return kcontrol_news;
+
+outfree_w_param:
+       snd_soc_dapm_free_kcontrol(card, private_value, num_params, w_param_text);
+       return NULL;
+}
+
+int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
+                        const struct snd_soc_pcm_stream *params,
+                        unsigned int num_params,
+                        struct snd_soc_dapm_widget *source,
+                        struct snd_soc_dapm_widget *sink)
+{
+       struct snd_soc_dapm_widget template;
+       struct snd_soc_dapm_widget *w;
+       const char **w_param_text;
+       unsigned long private_value;
+       char *link_name;
+       int ret;
+
+       link_name = devm_kasprintf(card->dev, GFP_KERNEL, "%s-%s",
+                                  source->name, sink->name);
+       if (!link_name)
+               return -ENOMEM;
+
+       memset(&template, 0, sizeof(template));
+       template.reg = SND_SOC_NOPM;
+       template.id = snd_soc_dapm_dai_link;
+       template.name = link_name;
+       template.event = snd_soc_dai_link_event;
+       template.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
+               SND_SOC_DAPM_PRE_PMD;
+       template.kcontrol_news = NULL;
+
+       /* allocate memory for control, only in case of multiple configs */
+       if (num_params > 1) {
+               w_param_text = devm_kcalloc(card->dev, num_params,
+                                       sizeof(char *), GFP_KERNEL);
+               if (!w_param_text) {
+                       ret = -ENOMEM;
+                       goto param_fail;
+               }
 
+               template.num_kcontrols = 1;
+               template.kcontrol_news =
+                                       snd_soc_dapm_alloc_kcontrol(card,
+                                               link_name, params, num_params,
+                                               w_param_text, &private_value);
+               if (!template.kcontrol_news) {
+                       ret = -ENOMEM;
+                       goto param_fail;
+               }
+       } else {
+               w_param_text = NULL;
+       }
        dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name);
 
        w = snd_soc_dapm_new_control_unlocked(&card->dapm, &template);
@@ -3903,15 +3939,9 @@ outfree_w:
        devm_kfree(card->dev, w);
 outfree_kcontrol_news:
        devm_kfree(card->dev, (void *)template.kcontrol_news);
-outfree_private_value:
-       devm_kfree(card->dev, (void *)private_value);
-outfree_link_name:
+       snd_soc_dapm_free_kcontrol(card, &private_value, num_params, w_param_text);
+param_fail:
        devm_kfree(card->dev, link_name);
-outfree_w_param:
-       for (count = 0 ; count < num_params; count++)
-               devm_kfree(card->dev, (void *)w_param_text[count]);
-       devm_kfree(card->dev, w_param_text);
-
        return ret;
 }
 
index 9b3939049cefc357581200063108124c3adf8907..20340ade20a789803c7ec02d9bf3ad569db1e68d 100644 (file)
@@ -41,6 +41,20 @@ int snd_soc_component_read(struct snd_soc_component *component,
 }
 EXPORT_SYMBOL_GPL(snd_soc_component_read);
 
+unsigned int snd_soc_component_read32(struct snd_soc_component *component,
+                                     unsigned int reg)
+{
+       unsigned int val;
+       int ret;
+
+       ret = snd_soc_component_read(component, reg, &val);
+       if (ret < 0)
+               return -1;
+
+       return val;
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_read32);
+
 /**
  * snd_soc_component_write() - Write register value
  * @component: Component to write to
index 94b88b897c3bb1acd0d8b18922a8286f5cadd081..8075856668c23b10e0f16eebb78cb59b8c7a233a 100644 (file)
@@ -133,16 +133,25 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
  */
 bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd)
 {
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
        int i;
        bool ignore = true;
 
        if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time)
                return true;
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               ignore &= !component->driver->pmdown_time;
+       }
+
+       /* this will be removed */
        for (i = 0; i < rtd->num_codecs; i++)
                ignore &= rtd->codec_dais[i]->component->ignore_pmdown_time;
 
-       return rtd->cpu_dai->component->ignore_pmdown_time && ignore;
+       return ignore;
 }
 
 /**
@@ -459,7 +468,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai;
        const char *codec_dai_name = "multicodec";
-       int i, ret = 0;
+       int i, ret = 0, __ret;
 
        pinctrl_pm_select_default_state(cpu_dai->dev);
        for (i = 0; i < rtd->num_codecs; i++)
@@ -474,7 +483,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
        /* startup the audio subsystem */
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->startup) {
+       if (cpu_dai->driver->ops->startup) {
                ret = cpu_dai->driver->ops->startup(substream, cpu_dai);
                if (ret < 0) {
                        dev_err(cpu_dai->dev, "ASoC: can't open interface"
@@ -483,7 +492,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                }
        }
 
-       if (platform->driver->ops && platform->driver->ops->open) {
+       if (platform && platform->driver->ops && platform->driver->ops->open) {
                ret = platform->driver->ops->open(substream);
                if (ret < 0) {
                        dev_err(platform->dev, "ASoC: can't open platform"
@@ -492,9 +501,32 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                }
        }
 
+       ret = 0;
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->open)
+                       continue;
+
+               __ret = component->driver->ops->open(substream);
+               if (__ret < 0) {
+                       dev_err(component->dev,
+                               "ASoC: can't open component %s: %d\n",
+                               component->name, ret);
+                       ret = __ret;
+               }
+       }
+       if (ret < 0)
+               goto component_err;
+
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->startup) {
+               if (codec_dai->driver->ops->startup) {
                        ret = codec_dai->driver->ops->startup(substream,
                                                              codec_dai);
                        if (ret < 0) {
@@ -511,7 +543,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                        codec_dai->rx_mask = 0;
        }
 
-       if (rtd->dai_link->ops && rtd->dai_link->ops->startup) {
+       if (rtd->dai_link->ops->startup) {
                ret = rtd->dai_link->ops->startup(substream);
                if (ret < 0) {
                        pr_err("ASoC: %s startup failed: %d\n",
@@ -585,7 +617,7 @@ dynamic:
        return 0;
 
 config_err:
-       if (rtd->dai_link->ops && rtd->dai_link->ops->shutdown)
+       if (rtd->dai_link->ops->shutdown)
                rtd->dai_link->ops->shutdown(substream);
 
 machine_err:
@@ -598,7 +630,22 @@ codec_dai_err:
                        codec_dai->driver->ops->shutdown(substream, codec_dai);
        }
 
-       if (platform->driver->ops && platform->driver->ops->close)
+component_err:
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->close)
+                       continue;
+
+               component->driver->ops->close(substream);
+       }
+
+       if (platform && platform->driver->ops && platform->driver->ops->close)
                platform->driver->ops->close(substream);
 
 platform_err:
@@ -692,12 +739,26 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
                        codec_dai->driver->ops->shutdown(substream, codec_dai);
        }
 
-       if (rtd->dai_link->ops && rtd->dai_link->ops->shutdown)
+       if (rtd->dai_link->ops->shutdown)
                rtd->dai_link->ops->shutdown(substream);
 
-       if (platform->driver->ops && platform->driver->ops->close)
+       if (platform && platform->driver->ops && platform->driver->ops->close)
                platform->driver->ops->close(substream);
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->close)
+                       continue;
+
+               component->driver->ops->close(substream);
+       }
+
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
                if (snd_soc_runtime_ignore_pmdown_time(rtd)) {
                        /* powered down playback stream now */
@@ -745,13 +806,15 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai;
        int i, ret = 0;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
 
-       if (rtd->dai_link->ops && rtd->dai_link->ops->prepare) {
+       if (rtd->dai_link->ops->prepare) {
                ret = rtd->dai_link->ops->prepare(substream);
                if (ret < 0) {
                        dev_err(rtd->card->dev, "ASoC: machine prepare error:"
@@ -760,7 +823,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
                }
        }
 
-       if (platform->driver->ops && platform->driver->ops->prepare) {
+       if (platform && platform->driver->ops && platform->driver->ops->prepare) {
                ret = platform->driver->ops->prepare(substream);
                if (ret < 0) {
                        dev_err(platform->dev, "ASoC: platform prepare error:"
@@ -769,9 +832,28 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
                }
        }
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->prepare)
+                       continue;
+
+               ret = component->driver->ops->prepare(substream);
+               if (ret < 0) {
+                       dev_err(component->dev,
+                               "ASoC: platform prepare error: %d\n", ret);
+                       goto out;
+               }
+       }
+
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->prepare) {
+               if (codec_dai->driver->ops->prepare) {
                        ret = codec_dai->driver->ops->prepare(substream,
                                                              codec_dai);
                        if (ret < 0) {
@@ -783,7 +865,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
                }
        }
 
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->prepare) {
+       if (cpu_dai->driver->ops->prepare) {
                ret = cpu_dai->driver->ops->prepare(substream, cpu_dai);
                if (ret < 0) {
                        dev_err(cpu_dai->dev,
@@ -829,7 +911,7 @@ int soc_dai_hw_params(struct snd_pcm_substream *substream,
 {
        int ret;
 
-       if (dai->driver->ops && dai->driver->ops->hw_params) {
+       if (dai->driver->ops->hw_params) {
                ret = dai->driver->ops->hw_params(substream, params, dai);
                if (ret < 0) {
                        dev_err(dai->dev, "ASoC: can't set %s hw params: %d\n",
@@ -851,16 +933,13 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int i, ret = 0;
+       int i, ret = 0, __ret;
 
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
-
-       ret = soc_pcm_params_symmetry(substream, params);
-       if (ret)
-               goto out;
-
-       if (rtd->dai_link->ops && rtd->dai_link->ops->hw_params) {
+       if (rtd->dai_link->ops->hw_params) {
                ret = rtd->dai_link->ops->hw_params(substream, params);
                if (ret < 0) {
                        dev_err(rtd->card->dev, "ASoC: machine hw_params"
@@ -915,7 +994,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
        if (ret < 0)
                goto interface_err;
 
-       if (platform->driver->ops && platform->driver->ops->hw_params) {
+       if (platform && platform->driver->ops && platform->driver->ops->hw_params) {
                ret = platform->driver->ops->hw_params(substream, params);
                if (ret < 0) {
                        dev_err(platform->dev, "ASoC: %s hw params failed: %d\n",
@@ -924,18 +1003,62 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
                }
        }
 
+       ret = 0;
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->hw_params)
+                       continue;
+
+               __ret = component->driver->ops->hw_params(substream, params);
+               if (__ret < 0) {
+                       dev_err(component->dev,
+                               "ASoC: %s hw params failed: %d\n",
+                               component->name, ret);
+                       ret = __ret;
+               }
+       }
+       if (ret < 0)
+               goto component_err;
+
        /* store the parameters for each DAIs */
        cpu_dai->rate = params_rate(params);
        cpu_dai->channels = params_channels(params);
        cpu_dai->sample_bits =
                snd_pcm_format_physical_width(params_format(params));
 
+       ret = soc_pcm_params_symmetry(substream, params);
+        if (ret)
+               goto component_err;
 out:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
 
+component_err:
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->hw_free)
+                       continue;
+
+               component->driver->ops->hw_free(substream);
+       }
+
+       if (platform && platform->driver->ops && platform->driver->ops->hw_free)
+               platform->driver->ops->hw_free(substream);
+
 platform_err:
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->hw_free)
+       if (cpu_dai->driver->ops->hw_free)
                cpu_dai->driver->ops->hw_free(substream, cpu_dai);
 
 interface_err:
@@ -944,12 +1067,12 @@ interface_err:
 codec_err:
        while (--i >= 0) {
                struct snd_soc_dai *codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->hw_free)
+               if (codec_dai->driver->ops->hw_free)
                        codec_dai->driver->ops->hw_free(substream, codec_dai);
                codec_dai->rate = 0;
        }
 
-       if (rtd->dai_link->ops && rtd->dai_link->ops->hw_free)
+       if (rtd->dai_link->ops->hw_free)
                rtd->dai_link->ops->hw_free(substream);
 
        mutex_unlock(&rtd->pcm_mutex);
@@ -963,6 +1086,8 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai;
        bool playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
@@ -995,21 +1120,36 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
        }
 
        /* free any machine hw params */
-       if (rtd->dai_link->ops && rtd->dai_link->ops->hw_free)
+       if (rtd->dai_link->ops->hw_free)
                rtd->dai_link->ops->hw_free(substream);
 
        /* free any DMA resources */
-       if (platform->driver->ops && platform->driver->ops->hw_free)
+       if (platform && platform->driver->ops && platform->driver->ops->hw_free)
                platform->driver->ops->hw_free(substream);
 
+       /* free any component resources */
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->hw_free)
+                       continue;
+
+               component->driver->ops->hw_free(substream);
+       }
+
        /* now free hw params for the DAIs  */
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->hw_free)
+               if (codec_dai->driver->ops->hw_free)
                        codec_dai->driver->ops->hw_free(substream, codec_dai);
        }
 
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->hw_free)
+       if (cpu_dai->driver->ops->hw_free)
                cpu_dai->driver->ops->hw_free(substream, cpu_dai);
 
        mutex_unlock(&rtd->pcm_mutex);
@@ -1020,13 +1160,15 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai;
        int i, ret;
 
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->trigger) {
+               if (codec_dai->driver->ops->trigger) {
                        ret = codec_dai->driver->ops->trigger(substream,
                                                              cmd, codec_dai);
                        if (ret < 0)
@@ -1034,19 +1176,35 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
                }
        }
 
-       if (platform->driver->ops && platform->driver->ops->trigger) {
+       if (platform && platform->driver->ops && platform->driver->ops->trigger) {
                ret = platform->driver->ops->trigger(substream, cmd);
                if (ret < 0)
                        return ret;
        }
 
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->trigger) {
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->trigger)
+                       continue;
+
+               ret = component->driver->ops->trigger(substream, cmd);
+               if (ret < 0)
+                       return ret;
+       }
+
+       if (cpu_dai->driver->ops->trigger) {
                ret = cpu_dai->driver->ops->trigger(substream, cmd, cpu_dai);
                if (ret < 0)
                        return ret;
        }
 
-       if (rtd->dai_link->ops && rtd->dai_link->ops->trigger) {
+       if (rtd->dai_link->ops->trigger) {
                ret = rtd->dai_link->ops->trigger(substream, cmd);
                if (ret < 0)
                        return ret;
@@ -1065,8 +1223,7 @@ static int soc_pcm_bespoke_trigger(struct snd_pcm_substream *substream,
 
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops &&
-                   codec_dai->driver->ops->bespoke_trigger) {
+               if (codec_dai->driver->ops->bespoke_trigger) {
                        ret = codec_dai->driver->ops->bespoke_trigger(substream,
                                                                cmd, codec_dai);
                        if (ret < 0)
@@ -1074,7 +1231,7 @@ static int soc_pcm_bespoke_trigger(struct snd_pcm_substream *substream,
                }
        }
 
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->bespoke_trigger) {
+       if (cpu_dai->driver->ops->bespoke_trigger) {
                ret = cpu_dai->driver->ops->bespoke_trigger(substream, cmd, cpu_dai);
                if (ret < 0)
                        return ret;
@@ -1090,6 +1247,8 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct snd_soc_dai *codec_dai;
        struct snd_pcm_runtime *runtime = substream->runtime;
@@ -1098,15 +1257,31 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
        snd_pcm_sframes_t codec_delay = 0;
        int i;
 
-       if (platform->driver->ops && platform->driver->ops->pointer)
+       if (platform && platform->driver->ops && platform->driver->ops->pointer)
                offset = platform->driver->ops->pointer(substream);
 
-       if (cpu_dai->driver->ops && cpu_dai->driver->ops->delay)
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->pointer)
+                       continue;
+
+               /* FIXME: use 1st pointer */
+               offset = component->driver->ops->pointer(substream);
+               break;
+       }
+
+       if (cpu_dai->driver->ops->delay)
                delay += cpu_dai->driver->ops->delay(substream, cpu_dai);
 
        for (i = 0; i < rtd->num_codecs; i++) {
                codec_dai = rtd->codec_dais[i];
-               if (codec_dai->driver->ops && codec_dai->driver->ops->delay)
+               if (codec_dai->driver->ops->delay)
                        codec_delay = max(codec_delay,
                                        codec_dai->driver->ops->delay(substream,
                                                                    codec_dai));
@@ -2285,9 +2460,27 @@ static int soc_pcm_ioctl(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_platform *platform = rtd->platform;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
 
-       if (platform->driver->ops && platform->driver->ops->ioctl)
+       if (platform && platform->driver->ops && platform->driver->ops->ioctl)
                return platform->driver->ops->ioctl(substream, cmd, arg);
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               /* ignore duplication for now */
+               if (platform && (component == &platform->component))
+                       continue;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->ioctl)
+                       continue;
+
+               /* FIXME: use 1st ioctl */
+               return component->driver->ops->ioctl(substream, cmd, arg);
+       }
+
        return snd_pcm_lib_ioctl(substream, cmd, arg);
 }
 
@@ -2632,12 +2825,163 @@ static int dpcm_fe_dai_close(struct snd_pcm_substream *fe_substream)
        return ret;
 }
 
+static void soc_pcm_private_free(struct snd_pcm *pcm)
+{
+       struct snd_soc_pcm_runtime *rtd = pcm->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               /* need to sync the delayed work before releasing resources */
+
+               flush_delayed_work(&rtd->delayed_work);
+               component = rtdcom->component;
+
+               if (component->pcm_free)
+                       component->pcm_free(component, pcm);
+       }
+}
+
+static int soc_rtdcom_ack(struct snd_pcm_substream *substream)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->ack)
+                       continue;
+
+               /* FIXME. it returns 1st ask now */
+               return component->driver->ops->ack(substream);
+       }
+
+       return -EINVAL;
+}
+
+static int soc_rtdcom_copy_user(struct snd_pcm_substream *substream, int channel,
+                               unsigned long pos, void __user *buf,
+                               unsigned long bytes)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->copy_user)
+                       continue;
+
+               /* FIXME. it returns 1st copy now */
+               return component->driver->ops->copy_user(substream, channel,
+                                                        pos, buf, bytes);
+       }
+
+       return -EINVAL;
+}
+
+static int soc_rtdcom_copy_kernel(struct snd_pcm_substream *substream, int channel,
+                                 unsigned long pos, void *buf, unsigned long bytes)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->copy_kernel)
+                       continue;
+
+               /* FIXME. it returns 1st copy now */
+               return component->driver->ops->copy_kernel(substream, channel,
+                                                          pos, buf, bytes);
+       }
+
+       return -EINVAL;
+}
+
+static int soc_rtdcom_fill_silence(struct snd_pcm_substream *substream, int channel,
+                                  unsigned long pos, unsigned long bytes)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->fill_silence)
+                       continue;
+
+               /* FIXME. it returns 1st silence now */
+               return component->driver->ops->fill_silence(substream, channel,
+                                                           pos, bytes);
+       }
+
+       return -EINVAL;
+}
+
+static struct page *soc_rtdcom_page(struct snd_pcm_substream *substream,
+                                   unsigned long offset)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+       struct page *page;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->page)
+                       continue;
+
+               /* FIXME. it returns 1st page now */
+               page = component->driver->ops->page(substream, offset);
+               if (page)
+                       return page;
+       }
+
+       return NULL;
+}
+
+static int soc_rtdcom_mmap(struct snd_pcm_substream *substream,
+                          struct vm_area_struct *vma)
+{
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_rtdcom_list *rtdcom;
+       struct snd_soc_component *component;
+
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->driver->ops ||
+                   !component->driver->ops->mmap)
+                       continue;
+
+               /* FIXME. it returns 1st mmap now */
+               return component->driver->ops->mmap(substream, vma);
+       }
+
+       return -EINVAL;
+}
+
 /* create a new pcm */
 int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 {
        struct snd_soc_platform *platform = rtd->platform;
        struct snd_soc_dai *codec_dai;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_component *component;
+       struct snd_soc_rtdcom_list *rtdcom;
        struct snd_pcm *pcm;
        char new_name[64];
        int ret = 0, playback = 0, capture = 0;
@@ -2732,7 +3076,28 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
                rtd->ops.ioctl          = soc_pcm_ioctl;
        }
 
-       if (platform->driver->ops) {
+       for_each_rtdcom(rtd, rtdcom) {
+               const struct snd_pcm_ops *ops = rtdcom->component->driver->ops;
+
+               if (!ops)
+                       continue;
+
+               if (ops->ack)
+                       rtd->ops.ack            = soc_rtdcom_ack;
+               if (ops->copy_user)
+                       rtd->ops.copy_user      = soc_rtdcom_copy_user;
+               if (ops->copy_kernel)
+                       rtd->ops.copy_kernel    = soc_rtdcom_copy_kernel;
+               if (ops->fill_silence)
+                       rtd->ops.fill_silence   = soc_rtdcom_fill_silence;
+               if (ops->page)
+                       rtd->ops.page           = soc_rtdcom_page;
+               if (ops->mmap)
+                       rtd->ops.mmap           = soc_rtdcom_mmap;
+       }
+
+       /* overwrite */
+       if (platform && platform->driver->ops) {
                rtd->ops.ack            = platform->driver->ops->ack;
                rtd->ops.copy_user      = platform->driver->ops->copy_user;
                rtd->ops.copy_kernel    = platform->driver->ops->copy_kernel;
@@ -2747,17 +3112,22 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
        if (capture)
                snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &rtd->ops);
 
-       if (platform->driver->pcm_new) {
-               ret = platform->driver->pcm_new(rtd);
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               if (!component->pcm_new)
+                       continue;
+
+               ret = component->pcm_new(component, rtd);
                if (ret < 0) {
-                       dev_err(platform->dev,
+                       dev_err(component->dev,
                                "ASoC: pcm constructor failed: %d\n",
                                ret);
                        return ret;
                }
        }
 
-       pcm->private_free = platform->driver->pcm_free;
+       pcm->private_free = soc_pcm_private_free;
 out:
        dev_info(rtd->card->dev, "%s <-> %s mapping ok\n",
                 (rtd->num_codecs > 1) ? "multicodec" : rtd->codec_dai->name,
index dd471d2c02665631535fb446dcd5fca40e522f8e..01a50413c66f6612762791b2d1d905b077eb87a2 100644 (file)
@@ -1301,7 +1301,7 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_denum_create(
                /* validate kcontrol */
                if (strnlen(ec->hdr.name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
                            SNDRV_CTL_ELEM_ID_NAME_MAXLEN)
-                       return NULL;
+                       goto err;
 
                se = kzalloc(sizeof(*se), GFP_KERNEL);
                if (se == NULL)
@@ -1378,6 +1378,9 @@ err_se:
        for (; i >= 0; i--) {
                /* free values and texts */
                se = (struct soc_enum *)kc[i].private_value;
+               if (!se)
+                       continue;
+
                kfree(se->dobj.control.dvalues);
                for (j = 0; j < ec->items; j++)
                        kfree(se->dobj.control.dtexts[j]);
index c4ea7161056cd98dec55754ae90a38b7638ca62b..31d9dae280e7ace007294fa1ae7a8207aa0ea068 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # SPEAR Platform Support
 snd-soc-spear-pcm-objs := spear_pcm.o
 snd-soc-spear-spdif-in-objs := spdif_in.o
index 4ed22e648a9a03d5eb5a3687429fae7acbc45e9d..5b7f0fab0bd60740e70a8d28270e728520db28e8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # SAI
 snd-soc-stm32-sai-sub-objs := stm32_sai_sub.o
 obj-$(CONFIG_SND_SOC_STM32_SAI) += snd-soc-stm32-sai-sub.o
index 1258bef4dcb37e8f8a9e0ea9d69466d64ccd02ed..5fe878ace605f71818c2d978b047357b0ad2254c 100644 (file)
@@ -85,7 +85,7 @@ static int stm32_sai_probe(struct platform_device *pdev)
        }
 
        /* reset */
-       rst = reset_control_get_exclusive(&pdev->dev, NULL);
+       rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
        if (!IS_ERR(rst)) {
                reset_control_assert(rst);
                udelay(2);
index 90d43961389977f470a5c870d8678cdbd60a1cfe..dde8ddf9e777b04e5d23850f42f51150a26f6278 100644 (file)
@@ -184,7 +184,6 @@ static const struct regmap_config stm32_sai_sub_regmap_config_h7 = {
 static irqreturn_t stm32_sai_isr(int irq, void *devid)
 {
        struct stm32_sai_sub_data *sai = (struct stm32_sai_sub_data *)devid;
-       struct snd_pcm_substream *substream = sai->substream;
        struct platform_device *pdev = sai->pdev;
        unsigned int sr, imr, flags;
        snd_pcm_state_t status = SNDRV_PCM_STATE_RUNNING;
@@ -199,6 +198,11 @@ static irqreturn_t stm32_sai_isr(int irq, void *devid)
        regmap_update_bits(sai->regmap, STM_SAI_CLRFR_REGX, SAI_XCLRFR_MASK,
                           SAI_XCLRFR_MASK);
 
+       if (!sai->substream) {
+               dev_err(&pdev->dev, "Device stopped. Spurious IRQ 0x%x\n", sr);
+               return IRQ_NONE;
+       }
+
        if (flags & SAI_XIMR_OVRUDRIE) {
                dev_err(&pdev->dev, "IRQ %s\n",
                        STM_SAI_IS_PLAYBACK(sai) ? "underrun" : "overrun");
@@ -227,9 +231,9 @@ static irqreturn_t stm32_sai_isr(int irq, void *devid)
        }
 
        if (status != SNDRV_PCM_STATE_RUNNING) {
-               snd_pcm_stream_lock(substream);
-               snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
-               snd_pcm_stream_unlock(substream);
+               snd_pcm_stream_lock(sai->substream);
+               snd_pcm_stop(sai->substream, SNDRV_PCM_STATE_XRUN);
+               snd_pcm_stream_unlock(sai->substream);
        }
 
        return IRQ_HANDLED;
@@ -442,12 +446,16 @@ static int stm32_sai_set_config(struct snd_soc_dai *cpu_dai,
 {
        struct stm32_sai_sub_data *sai = snd_soc_dai_get_drvdata(cpu_dai);
        int cr1, cr1_mask, ret;
-       int fth = STM_SAI_FIFO_TH_HALF;
 
-       /* FIFO config */
+       /*
+        * DMA bursts increment is set to 4 words.
+        * SAI fifo threshold is set to half fifo, to keep enough space
+        * for DMA incoming bursts.
+        */
        regmap_update_bits(sai->regmap, STM_SAI_CR2_REGX,
                           SAI_XCR2_FFLUSH | SAI_XCR2_FTH_MASK,
-                          SAI_XCR2_FFLUSH | SAI_XCR2_FTH_SET(fth));
+                          SAI_XCR2_FFLUSH |
+                          SAI_XCR2_FTH_SET(STM_SAI_FIFO_TH_HALF));
 
        /* Mode, data format and channel config */
        cr1 = SAI_XCR1_PRTCFG_SET(SAI_FREE_PROTOCOL);
@@ -481,10 +489,6 @@ static int stm32_sai_set_config(struct snd_soc_dai *cpu_dai,
                return ret;
        }
 
-       /* DMA config */
-       sai->dma_params.maxburst = STM_SAI_FIFO_SIZE * fth / sizeof(u32);
-       snd_soc_dai_set_dma_data(cpu_dai, substream, (void *)&sai->dma_params);
-
        return 0;
 }
 
@@ -727,7 +731,12 @@ static int stm32_sai_dai_probe(struct snd_soc_dai *cpu_dai)
        struct stm32_sai_sub_data *sai = dev_get_drvdata(cpu_dai->dev);
 
        sai->dma_params.addr = (dma_addr_t)(sai->phys_addr + STM_SAI_DR_REGX);
-       sai->dma_params.maxburst = 1;
+       /*
+        * DMA supports 4, 8 or 16 burst sizes. Burst size 4 is the best choice,
+        * as it allows bytes, half-word and words transfers. (See DMA fifos
+        * constraints).
+        */
+       sai->dma_params.maxburst = 4;
        /* Buswidth will be set by framework at runtime */
        sai->dma_params.addr_width = DMA_SLAVE_BUSWIDTH_UNDEFINED;
 
index 1f1af627173185a4f5e8bbf9eed484787c57e5c7..4a9ef67386caf96a160e47693196cec536713f5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_SND_SUN4I_CODEC) += sun4i-codec.o
 obj-$(CONFIG_SND_SUN4I_I2S) += sun4i-i2s.o
 obj-$(CONFIG_SND_SUN4I_SPDIF) += sun4i-spdif.o
index abfb710df7cbceb54c9fc60ab7502f088d630874..50a9e077f01b2372f1fe20d4ebd1179e208fa69d 100644 (file)
@@ -73,6 +73,7 @@
 #define SUN8I_SYS_SR_CTRL_AIF2_FS_MASK         GENMASK(11, 8)
 #define SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ_MASK  GENMASK(5, 4)
 #define SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_MASK  GENMASK(8, 6)
+#define SUN8I_AIF1CLK_CTRL_AIF1_BCLK_DIV_MASK  GENMASK(12, 9)
 
 struct sun8i_codec {
        struct device   *dev;
@@ -170,11 +171,11 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 
        /* clock masters */
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
-       case SND_SOC_DAIFMT_CBS_CFS: /* DAI Slave */
-               value = 0x0; /* Codec Master */
+       case SND_SOC_DAIFMT_CBS_CFS: /* Codec slave, DAI master */
+               value = 0x1;
                break;
-       case SND_SOC_DAIFMT_CBM_CFM: /* DAI Master */
-               value = 0x1; /* Codec Slave */
+       case SND_SOC_DAIFMT_CBM_CFM: /* Codec Master, DAI slave */
+               value = 0x0;
                break;
        default:
                return -EINVAL;
@@ -226,12 +227,57 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        return 0;
 }
 
+struct sun8i_codec_clk_div {
+       u8      div;
+       u8      val;
+};
+
+static const struct sun8i_codec_clk_div sun8i_codec_bclk_div[] = {
+       { .div = 1,     .val = 0 },
+       { .div = 2,     .val = 1 },
+       { .div = 4,     .val = 2 },
+       { .div = 6,     .val = 3 },
+       { .div = 8,     .val = 4 },
+       { .div = 12,    .val = 5 },
+       { .div = 16,    .val = 6 },
+       { .div = 24,    .val = 7 },
+       { .div = 32,    .val = 8 },
+       { .div = 48,    .val = 9 },
+       { .div = 64,    .val = 10 },
+       { .div = 96,    .val = 11 },
+       { .div = 128,   .val = 12 },
+       { .div = 192,   .val = 13 },
+};
+
+static u8 sun8i_codec_get_bclk_div(struct sun8i_codec *scodec,
+                                  unsigned int rate,
+                                  unsigned int word_size)
+{
+       unsigned long clk_rate = clk_get_rate(scodec->clk_module);
+       unsigned int div = clk_rate / rate / word_size / 2;
+       unsigned int best_val = 0, best_diff = ~0;
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(sun8i_codec_bclk_div); i++) {
+               const struct sun8i_codec_clk_div *bdiv = &sun8i_codec_bclk_div[i];
+               unsigned int diff = abs(bdiv->div - div);
+
+               if (diff < best_diff) {
+                       best_diff = diff;
+                       best_val = bdiv->val;
+               }
+       }
+
+       return best_val;
+}
+
 static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
                                 struct snd_pcm_hw_params *params,
                                 struct snd_soc_dai *dai)
 {
        struct sun8i_codec *scodec = snd_soc_codec_get_drvdata(dai->codec);
        int sample_rate;
+       u8 bclk_div;
 
        /*
         * The CPU DAI handles only a sample of 16 bits. Configure the
@@ -241,6 +287,11 @@ static int sun8i_codec_hw_params(struct snd_pcm_substream *substream,
                           SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ_MASK,
                           SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ_16);
 
+       bclk_div = sun8i_codec_get_bclk_div(scodec, params_rate(params), 16);
+       regmap_update_bits(scodec->regmap, SUN8I_AIF1CLK_CTRL,
+                          SUN8I_AIF1CLK_CTRL_AIF1_BCLK_DIV_MASK,
+                          bclk_div << SUN8I_AIF1CLK_CTRL_AIF1_BCLK_DIV);
+
        regmap_update_bits(scodec->regmap, SUN8I_AIF1CLK_CTRL,
                           SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_MASK,
                           SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_16);
index f214a3fd0024635a471667d36645ec93126c9b03..2329b72c93e37807246c1d09e026ccdbe6dea3b1 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Tegra platform Support
 snd-soc-tegra-pcm-objs := tegra_pcm.o
 snd-soc-tegra-utils-objs += tegra_asoc_utils.o
index 551f16c0c4f912f0b9a45ac93a6272b03dcec1b3..37ad833eb329b64f9fc95487cbfc642f59f553bc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Platform
 snd-soc-txx9aclc-objs := txx9aclc.o
 snd-soc-txx9aclc-ac97-objs := txx9aclc-ac97.o
index cce0c11a4d865638cdec35602f5bec19bb65b932..e7d6de51b32bb3de1275ae57b894b6c6fe370e03 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Ux500 Platform Support
 
 snd-soc-ux500-plat-msp-i2s-objs := ux500_msp_dai.o ux500_msp_i2s.o
index 3cd89c67c2f2b476b24b1de97660ba7f70991470..e1f596571d7ff9872769929476faac624dbab8db 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2002 by David S. Miller <davem@redhat.com>
index 026fb73f887f74b4e76754fb5cf07355d6abc8fe..a3834919b0f6e3cb159c308cb3edfda7e967ca24 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for SPI drivers
 
 snd-at73c213-objs              := at73c213.o
index 11eb06ac2eca09ce6d80bcc0fec4ba8cfdbb7563..b9f71d5dbc8c0b74c1c90829ac0edead02bb3f75 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index d1bac923eb1bccdc1b2bb85c4bfddde892bc2b30..ed28c81ac12e11c1eb70fc89e151c8d37f10ab55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
index 42cb33b94f6a6f9ffad59dd650955439377e6275..05440e2df8d9f55d5ebed2d5fb8de4dee56dca27 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Makefile for ALSA
 #
index bdf155300a8a6f5e58c1d571e62c9985ed06efc7..869bf6264d6a097fc6c7ab637d8ef55c1c099f74 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CAIAQ_AUDIO_H
 #define CAIAQ_AUDIO_H
 
index 501c4883aef644e81ae5def04bbe12a70300836d..cb204fd45858f53f2d3bff0023603e5c7baefd9a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CAIAQ_CONTROL_H
 #define CAIAQ_CONTROL_H
 
index 0fb6b1b7926170030661c6724e1be6260da6cfa6..d8409d9ae55b63fc86e7971f8b94b593bd681de6 100644 (file)
@@ -469,10 +469,12 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
 
        err = snd_usb_caiaq_send_command(cdev, EP1_CMD_GET_DEVICE_INFO, NULL, 0);
        if (err)
-               return err;
+               goto err_kill_urb;
 
-       if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ))
-               return -ENODEV;
+       if (!wait_event_timeout(cdev->ep1_wait_queue, cdev->spec_received, HZ)) {
+               err = -ENODEV;
+               goto err_kill_urb;
+       }
 
        usb_string(usb_dev, usb_dev->descriptor.iManufacturer,
                   cdev->vendor_name, CAIAQ_USB_STR_LEN);
@@ -507,6 +509,10 @@ static int init_card(struct snd_usb_caiaqdev *cdev)
 
        setup_card(cdev);
        return 0;
+
+ err_kill_urb:
+       usb_kill_urb(&cdev->ep1_in_urb);
+       return err;
 }
 
 static int snd_probe(struct usb_interface *intf,
index ab0f7520a99be7e6f835817d31951d19084f5ea3..50fea085765b2b919406d127ded009f658338a82 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CAIAQ_DEVICE_H
 #define CAIAQ_DEVICE_H
 
index 6014e2713a6000bae1a182b15b4a01eedc757025..c42891e7be884d9c734df6438120c3136690d7c8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CAIAQ_INPUT_H
 #define CAIAQ_INPUT_H
 
index 60bf3442b283bca545e017b3d538b2148c45f012..a6ae0c22484d9d470d5b9f923cd1d02f97dea255 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef CAIAQ_MIDI_H
 #define CAIAQ_MIDI_H
 
index 3dc36d91355020e14ba0db0a1372a689ed66d84c..23d1d23aefec375c2c857f090f4920894e4bc7f8 100644 (file)
@@ -221,6 +221,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
        struct usb_interface_descriptor *altsd;
        void *control_header;
        int i, protocol;
+       int rest_bytes;
 
        /* find audiocontrol interface */
        host_iface = &usb_ifnum_to_if(dev, ctrlif)->altsetting[0];
@@ -235,6 +236,15 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
                return -EINVAL;
        }
 
+       rest_bytes = (void *)(host_iface->extra + host_iface->extralen) -
+               control_header;
+
+       /* just to be sure -- this shouldn't hit at all */
+       if (rest_bytes <= 0) {
+               dev_err(&dev->dev, "invalid control header\n");
+               return -EINVAL;
+       }
+
        switch (protocol) {
        default:
                dev_warn(&dev->dev,
@@ -245,11 +255,21 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
        case UAC_VERSION_1: {
                struct uac1_ac_header_descriptor *h1 = control_header;
 
+               if (rest_bytes < sizeof(*h1)) {
+                       dev_err(&dev->dev, "too short v1 buffer descriptor\n");
+                       return -EINVAL;
+               }
+
                if (!h1->bInCollection) {
                        dev_info(&dev->dev, "skipping empty audio interface (v1)\n");
                        return -EINVAL;
                }
 
+               if (rest_bytes < h1->bLength) {
+                       dev_err(&dev->dev, "invalid buffer length (v1)\n");
+                       return -EINVAL;
+               }
+
                if (h1->bLength < sizeof(*h1) + h1->bInCollection) {
                        dev_err(&dev->dev, "invalid UAC_HEADER (v1)\n");
                        return -EINVAL;
index 111b0f009afa493c1aab56ae7fd6c4b07b648996..ed87cc83eb47dab3134ac1a673f257c643d739a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_CARD_H
 #define __USBAUDIO_CARD_H
 
index d592e4a29856738133b77f88994375394c6f1bb0..87557cae1a0b644045ac91636c72fca320264eb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_CLOCK_H
 #define __USBAUDIO_CLOCK_H
 
index 58030176f0083deef38d3d37b2ea46775cce58a0..7dd983c3500138fca3c38bda742eb008409a0db1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_DEBUG_H
 #define __USBAUDIO_DEBUG_H
 
index 584f295d7c7738a6b91753c8c48eed0bf101a200..63a39d4fa8d8ec425ce934c5693a2003bd8d0dee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_ENDPOINT_H
 #define __USBAUDIO_ENDPOINT_H
 
index 4b8a01129f240361a946f3993be4184077d120e9..8c3ff9ce0824d4686123abf8f368ee8584c49921 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_FORMAT_H
 #define __USBAUDIO_FORMAT_H
 
index 805c300dd004df4b5bc15487ab4839ec7d0ad542..4463e6d6dcb338503a05130bc9b88c63229f6e1c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_HELPER_H
 #define __USBAUDIO_HELPER_H
 
index b8b3b2a543d8b53d7bb145474ece2896e1013589..4ba98eb32119a9c63b9ee3d0d14a935aa08c828a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-usb-line6-y :=             \
                capture.o       \
                driver.o        \
index 0ff5a7d2e19fe1cc584a6420461841be26781b9b..c8f723c3a0336905d02afc8d33a51031985430e6 100644 (file)
@@ -779,9 +779,10 @@ int line6_probe(struct usb_interface *interface,
        return 0;
 
  error:
-       if (line6->disconnect)
-               line6->disconnect(line6);
-       snd_card_free(card);
+       /* we can call disconnect callback here because no close-sync is
+        * needed yet at this point
+        */
+       line6_disconnect(interface);
        return ret;
 }
 EXPORT_SYMBOL_GPL(line6_probe);
index 956f847a96e45fdfbd171d81c525fd869acad1f8..451007c2774344be753e38fd6863b03eaa284955 100644 (file)
@@ -301,7 +301,8 @@ static void podhd_disconnect(struct usb_line6 *line6)
 
                intf = usb_ifnum_to_if(line6->usbdev,
                                        pod->line6.properties->ctrl_if);
-               usb_driver_release_interface(&podhd_driver, intf);
+               if (intf)
+                       usb_driver_release_interface(&podhd_driver, intf);
        }
 }
 
@@ -317,6 +318,9 @@ static int podhd_init(struct usb_line6 *line6,
 
        line6->disconnect = podhd_disconnect;
 
+       init_timer(&pod->startup_timer);
+       INIT_WORK(&pod->startup_work, podhd_startup_workqueue);
+
        if (pod->line6.properties->capabilities & LINE6_CAP_CONTROL) {
                /* claim the data interface */
                intf = usb_ifnum_to_if(line6->usbdev,
@@ -358,8 +362,6 @@ static int podhd_init(struct usb_line6 *line6,
        }
 
        /* init device and delay registering */
-       init_timer(&pod->startup_timer);
-       INIT_WORK(&pod->startup_work, podhd_startup_workqueue);
        podhd_startup(pod);
        return 0;
 }
index 5e25a3fd6c1d8647eff2850732963a1ec7f225b3..8c38aec229996023a74ee20fa8f41b9a5a1ee78b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBMIDI_H
 #define __USBMIDI_H
 
index 9732edf77f860dbb668ea14206097914e2fcbdf5..91bc8f18791e46bc80adfb8503e310e2fdc7a298 100644 (file)
@@ -2234,6 +2234,9 @@ static int parse_audio_unit(struct mixer_build *state, int unitid)
 
 static void snd_usb_mixer_free(struct usb_mixer_interface *mixer)
 {
+       /* kill pending URBs */
+       snd_usb_mixer_disconnect(mixer);
+
        kfree(mixer->id_elems);
        if (mixer->urb) {
                kfree(mixer->urb->transfer_buffer);
@@ -2584,8 +2587,13 @@ _error:
 
 void snd_usb_mixer_disconnect(struct usb_mixer_interface *mixer)
 {
-       usb_kill_urb(mixer->urb);
-       usb_kill_urb(mixer->rc_urb);
+       if (mixer->disconnected)
+               return;
+       if (mixer->urb)
+               usb_kill_urb(mixer->urb);
+       if (mixer->rc_urb)
+               usb_kill_urb(mixer->rc_urb);
+       mixer->disconnected = true;
 }
 
 #ifdef CONFIG_PM
index 2b4b067646ab099653fe7ea79d9af1570e2971f6..ba27f7ade670ea009dbb2fc2d0bf50fb581a73c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBMIXER_H
 #define __USBMIXER_H
 
@@ -22,6 +23,8 @@ struct usb_mixer_interface {
        struct urb *rc_urb;
        struct usb_ctrlrequest *rc_setup_packet;
        u8 rc_buffer[6];
+
+       bool disconnected;
 };
 
 #define MAX_CHANNELS   16      /* max logical channels */
index 177c329cd4ddb792e144f4ecd945976e6ab9b1a4..b5abd328a36170b806f95cb4d52a8c87665b595a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SND_USB_MIXER_QUIRKS_H
 #define SND_USB_MIXER_QUIRKS_H
 
index 19c592ab03328ef2148707a3e7580e271ca0cf37..bbf063b793705ae553e58a1a83590b05ab325452 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USB_MIXER_SCARLETT_H
 #define __USB_MIXER_SCARLETT_H
 
index a6312fb0f962cae322b67e250f4bf7080473ffc9..56ff16c0698f66292a9d1eaaa504611400c262c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USB_MIXER_US16X08_H
 #define __USB_MIXER_US16X08_H
 
index df7a003682ad6426a3e50532cd815e8bf00a4af6..35740d5ef268bc74f53f76c0e18ba0caaef3237e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_PCM_H
 #define __USBAUDIO_PCM_H
 
index 48ee51dcb71ed9311ea719c43b72625602f1d86c..b2e25f60c5a27987d72d73db821b6fd2dc68007f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_POWER_H
 #define __USBAUDIO_POWER_H
 
index a45b765e4cf1f7ec5579f230ae61c025b9a4f928..72b1b2d28b445b0739820d0c1e365af9455075af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_PROC_H
 #define __USBAUDIO_PROC_H
 
index 9135520782854233bb246f976d1044f7b8762aa4..4f5f18f22974ef8e2e7b95e4c0ea261e7a04a388 100644 (file)
@@ -1137,6 +1137,9 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
        case USB_ID(0x047F, 0x02F7): /* Plantronics BT-600 */
        case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */
        case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
+       case USB_ID(0x047F, 0xC022): /* Plantronics C310 */
+       case USB_ID(0x047F, 0xC02F): /* Plantronics P610 */
+       case USB_ID(0x047F, 0xC036): /* Plantronics C520-M */
        case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
        case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */
        case USB_ID(0x05A3, 0x9420): /* ELP HD USB Camera */
@@ -1351,6 +1354,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
        case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
        case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
        case USB_ID(0x22d9, 0x0416): /* OPPO HA-1 */
+       case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */
                if (fp->altsetting == 2)
                        return SNDRV_PCM_FMTBIT_DSD_U32_BE;
                break;
index 192ff5ce94521b35ae09e6adc624f12239f48003..b90c8b7caab5a754e6e24b0fe461ab76417c1348 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_QUIRKS_H
 #define __USBAUDIO_QUIRKS_H
 
index c97f679fc84f7ce4e7e33c6576f73bd0fa3c4ff1..d92e18d5818feebbf1ce8f6b6b4290fecd5d46d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USBAUDIO_STREAM_H
 #define __USBAUDIO_STREAM_H
 
index 748933054b6cfebb986b03bce37a32f4a1ffc3f8..cc4c2f1efab2ca04eefbbcb62be274db420a3608 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 snd-usb-usx2y-objs := usbusx2y.o usX2Yhwdep.o usx2yhwdeppcm.o
 snd-usb-us122l-objs := us122l.o
 
index 3e2a2d0041ee5d49ba8911536be9746e8de04c0e..34bea99d343caa440f4761a952916a5ac600737b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef US122L_H
 #define US122L_H
 
index c095d5bf122060bddbf3ccf527fe9afd6f5ed645..457199b5ed03b42dbb411bbe4751787fc5882ea8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef USX2YHWDEP_H
 #define USX2YHWDEP_H
 
index 4dab490807009a96b4d43ba86dc53bcaf52b94e1..e229abd216526cae577aafd3dd2f2f3ed3abc5ba 100644 (file)
@@ -191,7 +191,8 @@ struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk,
        }
 
        pg = get_order(read_size);
-       sk->s = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP|__GFP_ZERO, pg);
+       sk->s = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP|__GFP_ZERO|
+                                         __GFP_NOWARN, pg);
        if (!sk->s) {
                snd_printk(KERN_WARNING "couldn't __get_free_pages()\n");
                goto out;
@@ -211,7 +212,8 @@ struct usb_stream *usb_stream_new(struct usb_stream_kernel *sk,
        pg = get_order(write_size);
 
        sk->write_page =
-               (void *)__get_free_pages(GFP_KERNEL|__GFP_COMP|__GFP_ZERO, pg);
+               (void *)__get_free_pages(GFP_KERNEL|__GFP_COMP|__GFP_ZERO|
+                                        __GFP_NOWARN, pg);
        if (!sk->write_page) {
                snd_printk(KERN_WARNING "couldn't __get_free_pages()\n");
                usb_stream_free(sk);
index 90369001eab6612ba4cd1a0a774387042ccfd462..851358a8d709ac7bc564bc3763ba4e7e8b70f37d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __USB_STREAM_H
 #define __USB_STREAM_H
 
index 6ae6b08069389a77b1a68e01b6d78a9b48998e75..e0f77172ce8fcc7b4d9820af7f1fea86c85074a3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef USBUSX2Y_H
 #define USBUSX2Y_H
 #include "../usbaudio.h"
index 9c4fb84b2aa0f8f2a1e6d851055829244d3bded7..eb5a46466f0e6a76e9e8bf68330d7f4acc0d5dec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define MAXPACK 50
 #define MAXBUFFERMS 100
 #define MAXSTRIDE 3
index 9dfede37c8ff8a4729ba05c60c963d3561d4cfcd..c4f41ef9a7a7c5e6bef1f483e956f0168f7e912a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Some of the tools (perf) use same make variables
 # as in kernel build.
 export srctree=
index 647c94a219bf5660a72b7ce5803042b6f37cdff7..03687f19cbb17477c55f1a1360aa69d5842df67c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 CFLAGS := -I../../usr/include
 
index b5ca536e56a8b971060c9b6d83e86f18cc1e2221..9f420d98b5fb3b2ca364ed6aff37908d42519333 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* getdelays.c
  *
  * Utility to get per-pid and per-tgid delay accounting statistics
index 95df19c9548234296a5eb6a980f810fc5bef3ef6..da8d6457ed4f4bcd20c07d41a4111f658aa76943 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
 #define __TOOLS_LINUX_ASM_ALPHA_BARRIER_H
 
index ad57f78682038065c7eaa5c6825537ed8f6963dc..6c5bf7d03f4e3ddcb8a91617169a133ae420f3d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ALPHA_BITSPERLONG_H
 #define __ASM_ALPHA_BITSPERLONG_H
 
index e38b64c82b976d0a10ef6835240cf8dc2b3e3070..c317d3e6867a3770e0e3f8e4ed679172adef1d71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_ALPHA_UAPI_ASM_MMAN_FIX_H
 #define MADV_DODUMP    17
index aa3acd2aa9af607e144197ee6941e245976ee0b8..81f0f9bf0c25b20e833c168e961148ce6088202f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_ARC_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 5db2d4c6a55faf7940be63b8b03ee2a7383fe988..1f57bbe82b6fb8582c2a3a1617345266c22e33e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 - Virtual Open Systems and Columbia University
  * Author: Christoffer Dall <c.dall@virtualopensystems.com>
index 478f699f56fd1434d9a70c2690a43ccd98eaada9..a6d46321e3307802b0d4fc058c6df9edfa9f44ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_ARM_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index ce59448458b22a86cc249919c039b832dfc5d462..a3c046174e6b698219483d919e2ad0040fe84fbb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ARM_PERF_REGS_H
 #define _ASM_ARM_PERF_REGS_H
 
index a0483c8e01429c4e3ae002ac6d2e1ee4ecce812b..40bde6b235013f10c5c6d02ee007afa2dc2a94fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_AARCH64_BARRIER_H
 #define _TOOLS_LINUX_ASM_AARCH64_BARRIER_H
 
index fce9c2924fa3464877ae78a4e33b90728ce02d41..485d60bee26ca313ad15797f230efe10072befc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012 ARM Ltd.
  *
index 9f3ca24bbcc6c28da8e1fbaf0d97998c11e93261..51149ec75fe480b324fd74d2697579a936438fdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (C) 2012,2013 - ARM Ltd
  * Author: Marc Zyngier <marc.zyngier@arm.com>
index 70fd3113710a4587486773b69b788092b060cc03..2ee288e447ece607c221d6a939d1d0a17cd734f2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_ARM64_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 172b8317ee49f8afc4395af2e0dc7dbb1d111f18..d54daafa89e3ff21782fff617d52d89b9dd388b6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_ARM64_PERF_REGS_H
 #define _ASM_ARM64_PERF_REGS_H
 
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index 5be78ac12464004d7dfa703439d864f2fc2f5b90..5bc900b0bc7827a09cebd3a36984283df1478ba9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_FRV_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index e140e46729ac99a05fec1bdbdfc62d3577506dfd..fa1508337ffc1b48db79f13e16555fce096bccf6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_H8300_BITS_PER_LONG
 #define __ASM_H8300_BITS_PER_LONG
 
index 9d9ac54d3c5a4feab4307669663345b088bf8c0c..be7bbe0528d199279bd7b4f0510a62f0b6984245 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_H8300_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 4a658151383d2538357e3c1e0a57bdbdc37ba186..5adca0d26913e0b4fa2fd724d7765df316454696 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  *
index 102f3fae6085d63830b6a593b87b90d545288d46..cd59ba932b3a706f55cec2d5743662b6345d38d0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_HEXAGON_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index e4422b4b634e6b7a0053b84f76bb605664eace52..d808ee0e77b58bacc57e8b62d77237229d8dced0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copied from the kernel sources to tools/:
  *
index ec4db3c970b7705e87ced26e39f85fbf115757a2..1146d55563db37731ebbfe1abdaf104789efb53b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_IA64_BITSPERLONG_H
 #define __ASM_IA64_BITSPERLONG_H
 
index 1d6e5ac6442d0d19fa0de3e8343aaaef979d85e7..2a19bb1db4ab607622455fd607367934d3e581e7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_IA64_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index 1c29635bb73bd8563947cb81e6880b3180aa77a6..d19b82c9c2908f7cdcb261f87d0f7c8e9de65abb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_M32R_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 6dc0bb0c13b29dd814f403f2fd4efb3b36be0619..76da34b10f5981b5b47422512374fe63469fe006 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #include <asm-generic/bitsperlong.h>
index 005cd50b50e10c426cb1395c3025ea0f6ceb5560..f3f2103fd02cf48c28978f12de002ca1092ac173 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_MICROBLAZE_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 80f96f7556e32e783de8b808a3394889dba6e2f9..0d1191523cd0d812b15f80b65f14e72b9dcdbdf4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_MIPS_BARRIER_H
 #define _TOOLS_LINUX_ASM_MIPS_BARRIER_H
 /*
index 3e4c10a8e78768f5e191a1dbd3ede01df50da515..7268380d8d28750a95eaf725e8ff6c8e1779652d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_MIPS_BITSPERLONG_H
 #define __ASM_MIPS_BITSPERLONG_H
 
index 6985eb59b08534581f7b4316655367182cb6f64f..d2714cc1cd93f004c46fab507ee57c03d92d22a6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
index c02052965d50c51ea7ee4aa77be4324231883149..de2206883abc0f83f21e59f9f7edf17e4ce2b85a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_MIPS_UAPI_ASM_MMAN_FIX_H
 #define MADV_DODUMP    17
index c1ea36d83acc076d3c2f261a370abdf6be602266..b9360639974f9384865a4237e6dd05cc8872c5f0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_MN10300_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index e0a23c7bdd432adc59f4f4ebefcc4d51f91b05f1..23ac7562927ab40d9aa3389d5968d8c5f0167805 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_PARISC_BITSPERLONG_H
 #define __ASM_PARISC_BITSPERLONG_H
 
index 286c0bd7457349182e2facab487d8e3ebb54a143..1bd78758bde9815b067d705fdec7157ca3860b34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_PARISC_UAPI_ASM_MMAN_FIX_H
 #define MADV_DODUMP    70
index b23aee8e6d9083a661bd4e85de46836796b69cfc..a634da05bc9735932a0a79674b977639d8593073 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copied from the kernel sources:
  *
index 5f1659032c408030fbc371da4ccf8fe15b4cfc6b..46ece3ecff31c2e20b1c0381c93577561af5014c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_POWERPC_BITSPERLONG_H
 #define __ASM_POWERPC_BITSPERLONG_H
 
index 8cf8f0c96906dcb3e213524d733bc6a5aa584885..61d6049f4c1eced70ad3fef32f99b3a438da3eab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 2, as
index 761db43172fea964a7a9068a856014ba26976196..f33105bc5ca612eaa5cea7125bfc0c7a771f13f9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_POWERPC_UAPI_ASM_MMAN_FIX_H
 #define MAP_DENYWRITE  0x0800
index 6a93209748a15ded5f28f3106a5def0bd34236b7..9e52c86ccbd3457af7124cf559204f5973d179a1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_POWERPC_PERF_REGS_H
 #define _UAPI_ASM_POWERPC_PERF_REGS_H
 
index f85141266b92c5b2c278d64b309a6b1c2b62533a..5030c99f47d2057e916edd38a2d91ed15beb63c6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copied from the kernel sources:
  *
index e351ea2ad43e7266d894047afc8f9099e028ee67..d2bb620119bf3c2258e61aef890644bd0a52aa09 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_S390_BITSPERLONG_H
 #define __ASM_S390_BITSPERLONG_H
 
index 69d09c39bbcd00858121ebf9f6bb1f7a57ff20e1..9ad172dcd912d5763b0bf954617c9e398ad31aa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_KVM_S390_H
 #define __LINUX_KVM_S390_H
 /*
@@ -88,6 +89,12 @@ struct kvm_s390_io_adapter_req {
 /* kvm attributes for KVM_S390_VM_TOD */
 #define KVM_S390_VM_TOD_LOW            0
 #define KVM_S390_VM_TOD_HIGH           1
+#define KVM_S390_VM_TOD_EXT            2
+
+struct kvm_s390_vm_tod_clock {
+       __u8  epoch_idx;
+       __u64 tod;
+};
 
 /* kvm attributes for KVM_S390_VM_CPU_MODEL */
 /* processor related attributes are r/w */
index 397282727e21890cf5bd0d4459f3ae30eb78fa0d..c36c97ffdc6fa24f246c41bfe993790410e4e032 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Definitions for perf-kvm on s390
  *
index b03dea9e1f56dccadcebdf13eafcb7ae2f9c79a2..4ec32e4251a44d7a3394fc34dc661cae14a31e7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_S390_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 3ac6343689394d0b128907a3f338958ec0f32471..6ca1e68d7103139f1ef6029980aea2f3198072be 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_S390_SIE_H
 #define _UAPI_ASM_S390_SIE_H
 
index 86ff337aa45972dbe5521415a9a45dd281123e4a..df48f2717da29daadbbf011e396e48419a209ed5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_SCORE_BITSPERLONG_H
 #define _ASM_SCORE_BITSPERLONG_H
 
index 2f8fb89944fd955954f6901c4b7ec6f7607c7073..b4bd195a858654ad4d1f483bbb92df28ec8da677 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_SCORE_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index c18fd7599b9719185c3b65b968343ffe1202c779..bde5221af28244d5fb440a206d18c4bb445dcd2f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copied from the kernel sources:
  *
index 26504f6f060e9447dc626ac07746e5eb46cc08b7..88c0e2930c478fc00f98edfb84ffbf951520f663 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_SH_UAPI_ASM_MMAN_FIX_H
 #include <uapi/asm-generic/mman.h>
index 8c017b3b13911a25c170f814a061e622191ccdcd..95d1618465a65f6feb98ea7f61d50a032d4def6d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ___TOOLS_LINUX_ASM_SPARC_BARRIER_H
 #define ___TOOLS_LINUX_ASM_SPARC_BARRIER_H
 #if defined(__sparc__) && defined(__arch64__)
index c5eadd0a7233a8c8ab59044530faa01c40ca87e9..cc19ed1dde0b2fb37c8a3505868584d087b1a8ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_PERF_SPARC_BARRIER_H
 #define __TOOLS_PERF_SPARC_BARRIER_H
 
index 9a7d7322c3f78576488cdc8733cccf47ca060462..ba61344287d50770e8415bd9798379c9597fbad4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_SPARC64_BARRIER_H
 #define __TOOLS_LINUX_SPARC64_BARRIER_H
 
index b62dd907d7c35ff12d0706774af96358bee5eef6..3b4e61740b759f21539e44d08e1ac9668518584c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_ALPHA_BITSPERLONG_H
 #define __ASM_ALPHA_BITSPERLONG_H
 
index 8640525de991951689e41bee1fc115a188398632..38920eed8cbf11a754270cff08fad9831172b365 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_SPARC_UAPI_ASM_MMAN_FIX_H
 #define MAP_DENYWRITE  0x0800
index 7d3692c3d4ac2bc44265f2273a1e7479d1ebfb86..7ad02a591b437211c1485e544e77c57398a32493 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_TILE_BARRIER_H
 #define _TOOLS_LINUX_ASM_TILE_BARRIER_H
 /*
index 58c771f2af2f59bf9f7820335b2ab1e3a31bf612..57cca78c0fbb47bb0fc7fd39e75cc72c672b6d56 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  *
index 7116c4b928b303e4c5894fcf2c0cec1c0d83bce0..65ec92925c6c2f560baf60b86606ea32515638b3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_TILE_UAPI_ASM_MMAN_FIX_H
 #define MAP_DENYWRITE  0x0800
index 328eeceec709803b91fa11ab14860341828f6639..7d8c3261a50d0d0d9ddc9c9c8cb26a632e524c3a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_X86_ATOMIC_H
 #define _TOOLS_LINUX_ASM_X86_ATOMIC_H
 
index f366d8e550e4ae0f83a4ec4baf0b42eee5570199..8774dee27471e598084f5be568c7543ef49a16a5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_X86_BARRIER_H
 #define _TOOLS_LINUX_ASM_X86_BARRIER_H
 
index f5253260f3cc1ea4a0c2cfecc1bbc6407003fa44..0ed9ca2766ad6c9b489bbb65234859a5bb3f43b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TOOLS_ASM_X86_CMPXCHG_H
 #define TOOLS_ASM_X86_CMPXCHG_H
 
index 8ea315a11fe0d4461abe7aeea2738be97a79b189..793690fbda3625defd130262db1e94b57152c0bc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_X86_CPUFEATURES_H
 #define _ASM_X86_CPUFEATURES_H
 
 
 #define X86_FEATURE_HW_PSTATE  ( 7*32+ 8) /* AMD HW-PState */
 #define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
+#define X86_FEATURE_SME                ( 7*32+10) /* AMD Secure Memory Encryption */
 
 #define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */
 #define X86_FEATURE_INTEL_PT   ( 7*32+15) /* Intel Processor Trace */
 #define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
 #define X86_FEATURE_AVIC       (15*32+13) /* Virtual Interrupt Controller */
 #define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
+#define X86_FEATURE_VGIF       (15*32+16) /* Virtual GIF */
 
 /* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
 #define X86_FEATURE_AVX512VBMI  (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
index 5dff775af7cd6456f7177d9ce5888ae78dc6bc10..c10c9128f54e6b7296014a74e7a253a1eedaacd9 100644 (file)
 # define DISABLE_K6_MTRR       (1<<(X86_FEATURE_K6_MTRR & 31))
 # define DISABLE_CYRIX_ARR     (1<<(X86_FEATURE_CYRIX_ARR & 31))
 # define DISABLE_CENTAUR_MCR   (1<<(X86_FEATURE_CENTAUR_MCR & 31))
+# define DISABLE_PCID          0
 #else
 # define DISABLE_VME           0
 # define DISABLE_K6_MTRR       0
 # define DISABLE_CYRIX_ARR     0
 # define DISABLE_CENTAUR_MCR   0
+# define DISABLE_PCID          (1<<(X86_FEATURE_PCID & 31))
 #endif /* CONFIG_X86_64 */
 
 #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
@@ -49,7 +51,7 @@
 #define DISABLED_MASK1 0
 #define DISABLED_MASK2 0
 #define DISABLED_MASK3 (DISABLE_CYRIX_ARR|DISABLE_CENTAUR_MCR|DISABLE_K6_MTRR)
-#define DISABLED_MASK4 0
+#define DISABLED_MASK4 (DISABLE_PCID)
 #define DISABLED_MASK5 0
 #define DISABLED_MASK6 0
 #define DISABLED_MASK7 0
index a6669bc069395cb8f5819c0eafe3bd68c0baef5c..dc90c0c2fae352576a1a0a376e42b27fb987679f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_X86_RMWcc
 #define _TOOLS_LINUX_ASM_X86_RMWcc
 
index 0e4312ffc945e3d23e3f2c161cc7ca3e0d55185b..60a89dba01b658596e3cb52dd5069b56e826bff8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NR_perf_event_open
 # define __NR_perf_event_open 336
 #endif
index dd56bb36132a58f72ccc025db500a1523d703f5c..cb52a3a8b8fcdb2cee471b32440302fd9fd5baba 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __NR_perf_event_open
 # define __NR_perf_event_open 298
 #endif
index 6e23c543cd80b818d123a99d3335b23d012cb44d..f8a92e0009d6ce7b9353c5670bafc1a65001abf2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_X86_BITSPERLONG_H
 #define __ASM_X86_BITSPERLONG_H
 
index c2824d02ba3762553b62a07709058102050e34da..f3a960488eae0fcf308ba8467c8de26a3061a840 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_KVM_H
 #define _ASM_X86_KVM_H
 
index 3bb964f88aa14c9d497b8e063846179e1773ed88..125cf5cdf6c5f6118dac56675d4a8dbb5460d20f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_KVM_PERF_H
 #define _ASM_X86_KVM_PERF_H
 
index b73c1af8b1dd7c22bec4db31aecd636f228e5305..8449778de2ed7c3498b623b293146c1300bd11ab 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_X86_UAPI_ASM_MMAN_FIX_H
 #define MAP_32BIT      0x40
index 3f2207bfd17b0eb7efd12e043e58b12543a3c300..f3329cabce5c6d9e7c605a0fb46f764e2d643141 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _ASM_X86_PERF_REGS_H
 #define _ASM_X86_PERF_REGS_H
 
index 3725e145aa58c2879458f818016c8e9ddd268193..a9731f8a480f3bca0785c94e870c74be6c191a67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__SVM_H
 #define _UAPI__SVM_H
 
index a26df0d75cd059294822dcea96180270c7654383..30d7d04d72d6bad6dfb419f7606e8d5c8fd9b622 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_ASM_X86_UNISTD_H
 #define _UAPI_ASM_X86_UNISTD_H
 
index 690a2dcf407860cf54793f03e69d8761b06f068d..f0b0c90dd398246eb2882050d69c6b53ccca11af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * vmx.h: VMX Architecture related definitions
  * Copyright (c) 2004, Intel Corporation.
index 98dcc112b36349147dd9266dc758444a469f052f..9a53a06e5a3efcb62f9563a6161fd98bbc22d617 100644 (file)
@@ -4,6 +4,7 @@
 #include <asm/errno.h>
 #include <asm/cpufeatures.h>
 #include <asm/alternative-asm.h>
+#include <asm/export.h>
 
 /*
  * We build a jump to memcpy_orig by default which gets NOPped out on
@@ -40,6 +41,8 @@ ENTRY(memcpy)
        ret
 ENDPROC(memcpy)
 ENDPROC(__memcpy)
+EXPORT_SYMBOL(memcpy)
+EXPORT_SYMBOL(__memcpy)
 
 /*
  * memcpy_erms() - enhanced fast string memcpy. This is faster and
@@ -274,6 +277,7 @@ ENTRY(memcpy_mcsafe_unrolled)
        xorq %rax, %rax
        ret
 ENDPROC(memcpy_mcsafe_unrolled)
+EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled)
 
        .section .fixup, "ax"
        /* Return -EFAULT for any failure */
index e1229ecd2a82057cc6f0171169b6871f0e438167..f8f3dc0a6690e92f19ce5bc398f33451907a66cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright 2002 Andi Kleen, SuSE Labs */
 
 #include <linux/linkage.h>
index 4453195c450c1cce18381d7e067afbd22ff5f3c8..34dde6f44dae517a119e9cff65261753a75b8fdc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
 #define TOOLS_ARCH_XTENSA_UAPI_ASM_MMAN_FIX_H
 #define MADV_DODUMP    17
index 477f00eda59184ce9e844310fc04027706838cae..5eb4b5ad79cb778f0e949a07f719743d7a62d3c7 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifeq ($(srctree),)
 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
 srctree := $(patsubst %/,%,$(dir $(srctree)))
index c46b20e4ad87eb95ba366b5b2396039a3a1c98d9..cd72016c3cfa71159511549a5dc74e7cc36e82b0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ###
 # Main build makefile.
 #
index ee2546ddf02831c587ef1d217c69a3d17b140705..96982640fbf880e97f266123e2db01f1d274b4ed 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 FILES=                                          \
          test-all.bin                           \
          test-backtrace.bin                     \
index b5cfc64457716f0c6eeda10db2d5c1a916f73395..4112702e4aed2e1dba2af0785c40c049c60f7585 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * test-all.c: Try to build all the main testcases at once.
  *
index 7124aa1dc8fb77d5fe1adae0cc4a0dcaff2ff3a3..e9ddd27c69c35ecdd8c12197aabb7d62ab9ffa40 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <execinfo.h>
 #include <stdio.h>
 
index eac24e9513ebc0f35d5ee8ebbb450ab2f1fa5bc2..4bcc9776504cb337b0c6fa1147c05444a1ed8860 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <android/api-level.h>
 
 int main(void)
index da2172ff9662d0e86ffd132b6041b30ea232eb87..82070eadfc070ffdadc4e729950ab7ae386dfab1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/unistd.h>
 #include <linux/bpf.h>
 #include <unistd.h>
index e23c1b1f1b91211bbfa8f5a66876ea817c3f0462..a2b3f092d2f022cd73e3c4d06005d16485c6a307 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "clang/Basic/VirtualFileSystem.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Frontend/TextDiagnosticPrinter.h"
index c54e6551ae4c54cd6e9f418e6e8ff97280444efd..9821b8271deed955f1a5ba59dc2c03f8a0ca525e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 int main(void)
 {
index 610c686e0009a572d471954e32bea26a96a046b0..2ba56474ab718266a4c564054fb855dd8aedecc3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 extern int printf(const char *format, ...);
 extern char *cplus_demangle(const char *, int);
 
index b1dee9a31d6cb1b9517569a532e01d5743b1ee8a..396aaedd2418dd650ab8ad33c845855db9806694 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <iostream>
 #include <memory>
 
index 3fc1801ce4a9760dce3a2db564747ace639e88aa..8d474bd7371b21c1a7b755e40c58da40a2a4980d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dwarf.h>
 #include <elfutils/libdw.h>
 #include <elfutils/version.h>
index 70162699dd4345032ed8dd388b52ecbbc322f184..78fb4a1fa68c3f09901ef1ed66505874b9c74c92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <elfutils/libdw.h>
 
index d7a2c407130de0ddfee60753ecb1b59c9a20309e..bb4f065f28a6bb7bd9c013fbfc8893d04ef65b1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <cpuid.h>
 
 int main(void)
index 9367f7586676b850d43410bfc0cb75a4c88816c6..9ab8e90e7b88afde3397cfa00582fc17a2e102ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 
 #if !defined(__UCLIBC__)
index 397b4646d066144d1db1f6bd2842b9f1af5bf617..b1b716dd57330c5f1cddca9fc610ce1d7ba7bf24 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #include <gtk/gtk.h>
 #pragma GCC diagnostic error "-Wstrict-prototypes"
index 6bd80e5094391f10e03abeb24d6c02953ba74a2c..2aaf4bfc20556add03edc51d2e982c4d3f29b84b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
 #include <gtk/gtk.h>
 #pragma GCC diagnostic error "-Wstrict-prototypes"
index 1c665f09b9d65ff8bed2920c6f8c96e963b3fb2a..5cf31192f204af9eae24c9f74998c4d2200b3aaa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <jvmti.h>
 #include <jvmticmlr.h>
 
index afc019f08641c5d9cd9d8cfeeb69aec7cd1d7687..f5b0863fa1ec240795339428d8deed98a946d405 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libaudit.h>
 
 extern int printf(const char *format, ...);
index 9cf802a04885cb9addac2cea7783252de04fa03f..10bb69d55694c529cb94bb6d1e476bc76b037211 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <babeltrace/ctf-writer/writer.h>
 #include <babeltrace/ctf-ir/stream-class.h>
index 24059907e990da208af957549b662e29f13695b9..afa46b0465cd13762098e52828633b3a8ed1c376 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <bfd.h>
 
 extern int printf(const char *format, ...);
index bd79dc7f28d3680f5a3ed1247e55d1bea9bc8ace..a98174e0569c875554b28b68a367cf12c0138a75 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <openssl/sha.h>
 #include <openssl/md5.h>
 
index f676a3ff442a43b904adc6bd3061501de5f038d6..ed03d95056090c90bcea9d39751daf89eb3d9c18 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <elfutils/libdwfl.h>
 
index d78cf4d5271f1490d0e95e4ece0fb75473cdd66b..075d062fe8419cf06b16d291153fc4e7b0196610 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <gelf.h>
 
index d710459306c3aad3d322be3ad9073d5f886691fd..96a7f8d30a595e0e66336358c36ee490f834eaf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libelf.h>
 
 int main(void)
index f0c3b47cce281beff4f489d1ffbba23f388b1f95..ae9f2fff5af073a8a44c64753e409e29e9a68bba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libelf.h>
 
 int main(void)
index 564427d7ef18d09a650f8cdc7cb21c09746e3d50..2c3ef81affe254c9f3856ac739da10c1a09ae6aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libelf.h>
 
 int main(void)
index 08db322d89576cf9cc6f459a151a5f154224e447..905044127d56468f42b4af0dbb51b100faaea0f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libelf.h>
 
 int main(void)
index 4763d9cd587d51c8528ee9d5f80165dc93bb6565..b3aa59f8b3cb09665b0ece50988ef9f5a51c9cf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <numa.h>
 #include <numaif.h>
 
index 8871f6a0fdb4817e8fd40de71a7db40085e5588f..0415f437eb31805569a7dda715f47c9ae9d17122 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <EXTERN.h>
 #include <perl.h>
 
index facea122d812eb27585037afe9b3a97737cb31bf..47714b942d4d35bf61d4646d797d474e836a8ba9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <Python.h>
 
 #if PY_VERSION_HEX >= 0x03000000
index b24b28ad6324ecab7b3c4ffa3545a4aa1a68faae..0c1641b0d9a748983880b05067104037dc301d47 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <Python.h>
 
 int main(void)
index 22ff22ed94d1fe151df640ad3d089a048957fb6a..9cbff8d1df53c7353d9ac9aca756fd44bf1906aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <slang.h>
 
 int main(void)
index fc03fb64e8c1d0a2b0f98cf137bcaf57ba779649..323803f49212aaa8c141fa952bff173a2ed6dd1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-aarch64.h>
 #include <stdlib.h>
 
index 632d95ec641f2130d926f758b77a2c86f8c6c301..cb378b7d68669402e262508cb0116b54c4d3cf0f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-arm.h>
 #include <stdlib.h>
 
index 22844673fc26d85b4a2804ee73bd4d0b9a30bb84..36d6646c185e1588f9509db5582b308c53f2ed65 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-aarch64.h>
 #include <stdlib.h>
 
index f98859684feea0fb60bc1a62140fbab1d3cf18a7..8696e48e126843f1738a0fc7045bd3fc8c874577 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-arm.h>
 #include <stdlib.h>
 
index 0ef8087a104a7c9623b85ac097c3b406e114d405..efb55cdd8d019dff38d58518f0174602685ad0a3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind.h>
 #include <stdlib.h>
 
index 3561edce305ea63cbd0d6828c5be8fb7b0061205..e5e0f6c896374b19ad7c4cac0026b16612c6ee27 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-x86.h>
 #include <stdlib.h>
 
index 5add2517b2a18af9c3d8ef8e65c7af3dac386042..62ae4db597dcaa5d7ac3187e1f63d219e388d8c2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind-x86_64.h>
 #include <stdlib.h>
 
index 43b9369bcab7d03125e19d6f4001080a6b92987f..53fd26614ff0fc37b760daf24e3f66599a18fefd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <libunwind.h>
 #include <stdlib.h>
 
index 896d317245685de1c9f482efc70b249c484627e0..8a091625446af985a7a7f7ec4b764d348c264f01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <cstdio>
 #include "llvm/Config/llvm-config.h"
 
index 455a332dc8a8f6df734de6bbec7c3eb914490808..88a3d1bdd9f6978e998eb7e480b78aced875f841 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
 #define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH)
index 95adc8ced3dd0c6c96f35728f2b65ff30150d75d..78682bb01d5761bc4401a2cbaef2ef719b9c2f92 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <lzma.h>
 
 int main(void)
index 2606e94b065988a838d3531b295e126b1dbfefbb..573d07b9c5703d1ec4c81210d4ff57b095e1aa4b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <numa.h>
 
 int main(void)
index fdada5e8d454c549e4cb57059f52ebb8a1825c8e..38c71131c452e89699bee47d83bffa5f9145ec2b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdint.h>
 #include <pthread.h>
 #include <sched.h>
index 9c6b4cbffb1cae2759a524b70d36cee1b8f9f02e..e448deb4124c1ea8ed96f7b9a430095cdcac2e88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
 #endif
index e4531a6e80eaf98c929734cb74b42a3142c11a61..22737b0dadc870948aad03234500b591fc9b8e4a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/sdt.h>
 
 int main(void)
index c9f398d8786820588da652a7a89ef5c3e729127b..c8a57194f9f29b8f9b2f01114c043e64a1c60d2a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 
 int main(void)
index c34d4ca4af56eb34e5d9b90aa2cabe1d4c844bac..1e38d1930a972a3a442c314eb1cf5a611bbe472d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdint.h>
 
 volatile uint64_t x;
index 8c5c083b4d3caadf8bc92b82910a261f3f91a16a..9c72c697a9df1833b46f724a72576e05b7ea5b63 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * test for timerfd functions used by perf-kvm-stat-live
  */
index e111fff6240e06948c909790655f5da21a0de9c9..da6c35794b93f96b9e811bc2675d4c91d09004c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <zlib.h>
 
 int main(void)
index 734d1547cbaed61820a2b4563680d21a04aa527a..2501fea7aa3e9488af009b241b5324333646ac69 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * "Optimize" a list of dependencies as spit out by gcc -MD
  * for the build framework.
index 027d6c8a58a7400042102bd1b1874e67ab81db87..fee032e06a856a4938678d8b094847ea38a572f2 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 export srctree := $(abspath ../../../..)
 export CC      := gcc
 export LD      := ld
index 851762798c8357ab4415517e6d09795e1db07c27..66017a9f40b6cdaabf493092d8f77a80e4f8b5f7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int a(void)
 {
index beaa4a1d7ba899c9bc6cf62bf168b0d42184d7c5..f6ef585b570cf500c6eb5ee6c0d78b4e70aff40f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int e(void)
 {
index 7c3e9e9da5b76b65b0b38102f42a97a62f1af15a..bffd9c67e9af4d2f0b9732ae7522707f192fc237 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int f(void)
 {
index c24ff9ca9a9725d0d894fc52091892fc6ddbbe84..2b29fb4d3c20135bb3bd2f20656a060cc7510ce5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int b(void)
 {
index e216d02174997b758e069b62a409f2be5a5149a0..a63b20ab83d5ef8b3cec74602da27ee071448d1b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int c(void)
 {
index 80dc0f06151b8e7b54a749b756c5c2176bfc3371..e114e8dca0b6ca9d26d5e3c8ab526a9429494cb0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int d(void)
 {
index 57de6074d252857fdbaf4c115a25c254b3bd2a94..3c02756ef912d9be0e4bd649401e96fbe59dc1fc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 int a(void);
 int b(void);
index c20f1e9033a365810ce3fc490a8700d9ee89d123..3636ab5bf3392cb16942caa77d1bcf983e7a3323 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifdef INCLUDE
 #include "krava.h"
 #endif
index 44d2a0fade677b9a456647120d1bb60f3b711aa1..2c54e4d4354647abb53a4ffd591892170fffd213 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 function test_ex {
        make -C ex V=1 clean > ex.out 2>&1
index b4286196b763e68206ea86d4ae906dd7bebe09ef..860fa151640abd5823e6551fb75e57fd67a0188a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for cgroup tools
 
 CC = $(CROSS_COMPILE)gcc
index 4eb5507205c981a3f59fc055700eb8f369cb5d79..3d70dc831a7667ca0b267bdf26207749eccac6bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * cgroup_event_listener.c - Simple listener of cgroup events
  *
index 81767adaae7d1514c41382921e22796f2feb473b..67b6e9fca83cc83641933b9dfd6a4fd65e3db48e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 prefix = /usr
 nosy-dump-version = 0.4
 
index e41223b6a4c8538ec90ba664f4026445cdc76b3f..b67ebc88434d911418da95800b7a08d36076c6aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/firewire-constants.h>
 #include <stdio.h>
 #include <stdlib.h>
index 41f4bdadf6344eff10e4102d4491bf953d74e81a..6278d08e99e3d3bdff90dd35c1b2f43deacf98bf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 struct list {
        struct list *next, *prev;
 };
index 3a4b5b33ba5d3a8e8e7936a119d40bec0c0e40da..69e5e594f28491ae428caf1a4c0f9b68c32776d8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __nosy_dump_h__
 #define __nosy_dump_h__
 
index b4401536cfa90f370bbe7c131aa4cba847ad4e2a..805a2c0cf4cd37c42eeb19e4c72a2e3bc74ced7f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../scripts/Makefile.include
 
 bindir ?= /usr/bin
index 0d1e61b818440e91f62f0ce4248a5445c9cdf201..31503819454d8debc3484792bf404c34924ee74e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for Hyper-V tools
 
 CC = $(CROSS_COMPILE)gcc
index ccd3e9532764e5370ccf4f0b5b1ee4a294638c5e..c38686c4465646d495745cfa769a4b6d693829dd 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # This example script retrieves the DHCP state of a given interface.
 # In the interest of keeping the KVP daemon code free of distro specific
index 735aafd64a3f2f6285d3c577223c750e37ae1e61..7ed9f85ef9085103e3d31f86390317fa62102bc9 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # This example script activates an interface based on the specified
 # configuration.
index e8fecd61871f468fc2924278564b2d370766a7d7..353e56768df85689aedbcee1927350ce202eeaf6 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0
 
 import os
 from optparse import OptionParser
index d4d956020adf5ec92067269bdedb79ce7da75402..a08e7a47d6a32e858700d43a1bccdef67583b3ef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../scripts/Makefile.include
 
 bindir ?= /usr/bin
index 5e9738f97bf38f471067c7e4e205ed1d6bb5bd78..40b231fb95bd2848c11dba7f8d3a8e3632d9c284 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_ASM_GENERIC_ATOMIC_H
 #define __TOOLS_ASM_GENERIC_ATOMIC_H
 
index 0304600121daa90b3b4ac3621dec03ba94f252d0..9bce3b56b5e74c25541749c9a916be0c70747c3b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_ASM_GENERIC_BITOPS_H
 #define __TOOLS_ASM_GENERIC_BITOPS_H
 
index b3accfdf24b9b2fd93707ba4da185700718fe54d..9d131051949709e65ae87f1ac156ce52d58ccbbd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_
 #define _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_
 
index a60a7ccb6782d869b9d47503a158f86a92b84374..03f721a8a2b1993734e458399a68848637112c87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS___FLS_H_
 #define _ASM_GENERIC_BITOPS___FLS_H_
 
index 6a211f40665c02c8e2083b4966eb9c0d0616e9fb..c2705e1d220d1567186ecfc219c075fbe1aa0ba4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
 #define _ASM_GENERIC_BITOPS_ARCH_HWEIGHT_H_
 
index 68b8c1516c5a719b9fd422849e4431bafdaf8065..21c41ccd126667123617e67bcf7148bd02710618 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
 #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_ATOMIC_H_
 
index 0a7e06623470586b0509ef99410dbc54aa572f9e..149faeeeeaf2cca1dbc62891c8314bf5ab07e416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
 #define _ASM_GENERIC_BITOPS_CONST_HWEIGHT_H_
 
index 5538ecdc964a2f9e131b88e2e1a3709606963fba..9311fadaaab20f1d8c29b13a7c8b605dedff3e49 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
 #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
 
index 0576d1f42f43fc34fb5efa8e27969afc5dbdf0b4..753aecaab641a82d7f218988fcebe0751f7149ff 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FLS_H_
 #define _ASM_GENERIC_BITOPS_FLS_H_
 
index b097cf8444e3f99811ee395144b05a0a237519f3..866f2b2304ff639fdde2f81916e6d7fece289df2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _ASM_GENERIC_BITOPS_FLS64_H_
 #define _ASM_GENERIC_BITOPS_FLS64_H_
 
index 290120c01a8e7706ca07bb8100d569ad16d6d7ab..3e681982bcd1021ad26e96b855bad029076aff10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_
 #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_
 
index 45eca517efb32180834f18be0163c8358df886a8..8f2283052333e08f86ca62858ea7b4b173141575 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ASM_GENERIC_BITS_PER_LONG
 #define __ASM_GENERIC_BITS_PER_LONG
 
diff --git a/tools/include/asm-generic/hugetlb_encode.h b/tools/include/asm-generic/hugetlb_encode.h
new file mode 100644 (file)
index 0000000..e4732d3
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_
+#define _ASM_GENERIC_HUGETLB_ENCODE_H_
+
+/*
+ * Several system calls take a flag to request "hugetlb" huge pages.
+ * Without further specification, these system calls will use the
+ * system's default huge page size.  If a system supports multiple
+ * huge page sizes, the desired huge page size can be specified in
+ * bits [26:31] of the flag arguments.  The value in these 6 bits
+ * will encode the log2 of the huge page size.
+ *
+ * The following definitions are associated with this huge page size
+ * encoding in flag arguments.  System call specific header files
+ * that use this encoding should include this file.  They can then
+ * provide definitions based on these with their own specific prefix.
+ * for example:
+ * #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
+ */
+
+#define HUGETLB_FLAG_ENCODE_SHIFT      26
+#define HUGETLB_FLAG_ENCODE_MASK       0x3f
+
+#define HUGETLB_FLAG_ENCODE_64KB       (16 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_512KB      (19 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_1MB                (20 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_2MB                (21 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_8MB                (23 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_16MB       (24 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_256MB      (28 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_1GB                (30 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_2GB                (31 << HUGETLB_FLAG_ENCODE_SHIFT)
+#define HUGETLB_FLAG_ENCODE_16GB       (34 << HUGETLB_FLAG_ENCODE_SHIFT)
+
+#endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */
index 2a4d1bfa29884823729c28b63603857f8ab766e2..b54bd860dff6ffcd763c8f9466a06375e2bb3a70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_ASM_ALTERNATIVE_ASM_H
 #define _TOOLS_ASM_ALTERNATIVE_ASM_H
 
index 70794f538a86012e4a27cfd9ad0ba6a59fa83311..8c9bfffd4191d48be249eb0485df7db1350ecefb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_ASM_ATOMIC_H
 #define __TOOLS_LINUX_ASM_ATOMIC_H
 
index ac66ac5946852d113b249f2e28032ffde1f1ad00..391d942536e53ebd6edd7dc28421e53d65e5c54d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if defined(__i386__) || defined(__x86_64__)
 #include "../../arch/x86/include/asm/barrier.h"
 #elif defined(__arm__)
index 4790f047a89c476624975d51514698f210900a19..bbd75ac8b202920fa38076a9c4d296a215f36051 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_ASM_BUG_H
 #define _TOOLS_ASM_BUG_H
 
diff --git a/tools/include/asm/export.h b/tools/include/asm/export.h
new file mode 100644 (file)
index 0000000..2cb1a0d
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _TOOLS_ASM_EXPORT_H
+#define _TOOLS_ASM_EXPORT_H
+
+#define EXPORT_SYMBOL(x)
+#define EXPORT_SYMBOL_GPL(x)
+
+#endif /* _TOOLS_ASM_EXPORT_H */
index 9f21fc2b092b834f3badabe0233ed4e8b509444b..00a6c4ca562b93d44bc98cc292a5b0c88ca0c981 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_ATOMIC_H
 #define __TOOLS_LINUX_ATOMIC_H
 
index e8b9f518e36b2cddfbd415db8cde2f9a8581d876..ca160270fdfafb43149752da73ce0e8560d61990 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_BITOPS_H
 #define _PERF_BITOPS_H
 
index 969db1981868cc86e540098ed356014f1932db2e..acc704bd3998cf9bb592a240232addca209d7f34 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_BITOPS_H_
 #define _TOOLS_LINUX_BITOPS_H_
 
index 8e4a4f49135d402ebd73a0b5a586c207c2ed1a86..85f80258a15f6c675f5d5075497523f47f29ff31 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_PERF_LINUX_BUG_H
 #define _TOOLS_PERF_LINUX_BUG_H
 
index 3723b9f8f964365d768ea163c0b3ea87e9be69ca..a3a4427441bfe97fac07605fdd2c9fe0bcc8c213 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_COMPILER_H_
 #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
 #endif
index d7a5604c38d79003b36617ac08e731939b93deed..07fd03c74a775a48a5183f96cb85e27b4f85fedd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_COMPILER_H_
 #define _TOOLS_LINUX_COMPILER_H_
 
index 61cc7f501168b3bada61603d6be62d1d148647e1..72d595ce764ae98ad4f18c12578618e085e87ca5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_DEBUG_LOCKS_H_
 #define _LIBLOCKDEP_DEBUG_LOCKS_H_
 
index abf0478a8fb28f0f2621960aae345a504f28fd89..7a8b61ad44cbe0167de1642628d113beae7c91dc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_ERR_H
 #define __TOOLS_LINUX_ERR_H
 
index 4ce25d43e8e305df8afcfc6fb1747a58fad20c1b..c5e512da8d8aa03a959ba7d032ef559eebe379b1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Linux Socket Filter Data Structures
  */
index c8f3f8f58729b1edbfdc59410f77edd48cae0257..b25580b6a9be40de6b6a74e8e999bed22b3dd6f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_HARDIRQ_H_
 #define _LIBLOCKDEP_LINUX_HARDIRQ_H_
 
index 251eabf2a05e91ea4197ffce4541613e2eb92b1d..434dd5ac6d712e12c1658a3b0c46f1cc69d93096 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Statically sized hash table implementation
  * (C) 2012  Sasha Levin <levinsasha928@gmail.com>
index df77669cfe1c1d00f5044151f3ec67b09976461b..e734da3e5b332c416f441b9ea3fad66ec919d968 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_
 #define _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_
 
index 582cc1e5f3a4ee6c9c98a0c34959eb58d84660ba..89ca6fe257ccb94652015f073f5fade62d011c88 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_
 #define _LIBLOCKDEP_LINUX_KALLSYMS_H_
 
index 3b9bade286988f4c6db54595256146ba9f3e492b..778ecb98448058096a4b588e96e169e7e3c10385 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KERN_LEVELS_H__
 #define __KERN_LEVELS_H__
 
index 77d2e94ca5dfbe0dc94bfbac7206e22286c5a829..0ad884452c5ceed1b171a9118f3dfd3bb1755d4e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_KERNEL_H
 #define __TOOLS_LINUX_KERNEL_H
 
index 94d598bc6abe95492db64dff15464fc6094990c6..2bccd2c7b8974e8568b9533ab27db27bdc004229 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_
 #define _LIBLOCKDEP_LINUX_KMEMCHECK_H_
 
index 1da423820ad4fb5080ac487f2213adc85390b01d..b2fc48d5478c743705b294689d79d3764ffe9743 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_LINUX_LIST_H
 #define __TOOLS_LINUX_LIST_H
 
index 8da3e8effafa7279e3db8f6f7d4adce922392d0a..940c1b0756591e8e65792ce6dafbeb568a5aa15d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LOCKDEP_H_
 #define _LIBLOCKDEP_LOCKDEP_H_
 
index 07055db296f30a107b9ffd3acd5846a5afd0693d..2c999abf68e7ac01f45216a523fc11029dee3a72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_MODULE_H_
 #define _LIBLOCKDEP_LINUX_MODULE_H_
 
index 51334edec506815a70868dd451d5c72944ed0a59..4bf6777a8a035aab2c3008e1c953ed0aa406d960 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_POISON_H
 #define _LINUX_POISON_H
 
index 5080649dad04982416e415efb71d51c66a97c1cc..7d02527e5bcea4bd577c8f7062fc0c92a00be218 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_RCU_H_
 #define _LIBLOCKDEP_RCU_H_
 
index a0177c1f55b14c13f742fe38e71667ad4b16650a..36cb29bc57c2dbfa3168cde5e1d3b15a056f3693 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_REFCOUNT_H
 #define _TOOLS_LINUX_REFCOUNT_H
 
index 417cda4f793fc8b9e6d578c79e31e214572ef502..4ed569fcb1390cea11b287aa4b34ef3b0851385e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_SPINLOCK_H_
 #define __LINUX_SPINLOCK_H_
 
index 39aecc6b19d1ab66ffa9a689671cb85cbe28cd0a..ae343ac35bfa7e6c1df4c129639b1b47b8a0a5c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_
 #define _LIBLOCKDEP_LINUX_STACKTRACE_H_
 
index a30fad536f52080a8d6351f258858a89fa61f927..6c3e2cc274c5546ce64709e444701bdec582390b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_STRING_H_
 #define _TOOLS_LINUX_STRING_H_
 
index 841cec8ed525e38eea1fea8c3246fa9e4bbde818..60e2c187da2cd5ca3234e8cc2a2800756584f531 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_STRINGIFY_H
 #define __LINUX_STRINGIFY_H
 
index df9265483d65ce016fe8f084f8fdf7a54d98f9f5..55fa644b95fd50c27be617ecab89010c74793481 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_TIME64_H
 #define _TOOLS_LINUX_TIME64_H
 
index 77a28a26a6709fe3fe90026acfd9936849824890..154eb4e3ca7c2b1864addcbab9f84ccea3aad269 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LINUX_TYPES_H_
 #define _TOOLS_LINUX_TYPES_H_
 
index c0d817de4df24ec105aea734c85b6513a40688f5..dbd93c7df2e1da35af03f28f85a96eb8e3323487 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_UNALIGNED_PACKED_STRUCT_H
 #define _LINUX_UNALIGNED_PACKED_STRUCT_H
 
index 84c17d836578a0f7b4743af673e56d830384341d..f7d1d1698938531cbb8ddf8d0597f09c2e3e1970 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_BE_BYTESHIFT_H
 #define _TOOLS_BE_BYTESHIFT_H
 
index 8001194008da0512ced924608dd5c4fd5d2902de..c67888fd427ec800b7095c1c4237a810d40861b5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_ENDIAN_H
 #define _TOOLS_ENDIAN_H
 
index 8fe9f2488ec707b67c51763b608410676dbfb3dd..dc8565f397176879d13085f1940ba5cef6319ffe 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TOOLS_LE_BYTESHIFT_H
 #define _TOOLS_LE_BYTESHIFT_H
 
index 14baf9f23a14b952e76e9d4aaa7030e53e5092ed..040651735662983693d51f5645f311f128fe63f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_IOCTLS_H
 #define __ASM_GENERIC_IOCTLS_H
 
index 8c27db0c5c08ce84fc7299bd9bff2cee571b9397..6d319c46fd903436b4d444237ef6a226a393c214 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_MMAN_COMMON_H
 #define __ASM_GENERIC_MMAN_COMMON_H
 
                                           overrides the coredump filter bits */
 #define MADV_DODUMP    17              /* Clear the MADV_DONTDUMP flag */
 
+#define MADV_WIPEONFORK 18             /* Zero memory on fork, child only */
+#define MADV_KEEPONFORK 19             /* Undo MADV_WIPEONFORK */
+
 /* compatibility flags */
 #define MAP_FILE       0
 
-/*
- * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size.
- * This gives us 6 bits, which is enough until someone invents 128 bit address
- * spaces.
- *
- * Assume these are all power of twos.
- * When 0 use the default page size.
- */
-#define MAP_HUGE_SHIFT 26
-#define MAP_HUGE_MASK  0x3f
-
 #define PKEY_DISABLE_ACCESS    0x1
 #define PKEY_DISABLE_WRITE     0x2
 #define PKEY_ACCESS_MASK       (PKEY_DISABLE_ACCESS |\
index 10fa7857777fa2cc853253821868885a49aa41f4..2dffcbf705b37857d9289dedd2e5807322382984 100644 (file)
@@ -1,7 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __ASM_GENERIC_MMAN_H
 #define __ASM_GENERIC_MMAN_H
 
-#include <uapi/asm-generic/mman-common.h>
+#include <asm-generic/mman-common.h>
 
 #define MAP_GROWSDOWN  0x0100          /* stack-like segment */
 #define MAP_DENYWRITE  0x0800          /* ETXTBSY */
index 101593ab10ac795808db33848092eb62ac542560..97677cd6964db099689f96f11b9731c748bebcfa 100644 (file)
@@ -700,6 +700,7 @@ struct drm_prime_handle {
 
 struct drm_syncobj_create {
        __u32 handle;
+#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0)
        __u32 flags;
 };
 
@@ -718,6 +719,24 @@ struct drm_syncobj_handle {
        __u32 pad;
 };
 
+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
+#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
+struct drm_syncobj_wait {
+       __u64 handles;
+       /* absolute timeout */
+       __s64 timeout_nsec;
+       __u32 count_handles;
+       __u32 flags;
+       __u32 first_signaled; /* only valid when not waiting all */
+       __u32 pad;
+};
+
+struct drm_syncobj_array {
+       __u64 handles;
+       __u32 count_handles;
+       __u32 pad;
+};
+
 #if defined(__cplusplus)
 }
 #endif
@@ -840,6 +859,9 @@ extern "C" {
 #define DRM_IOCTL_SYNCOBJ_DESTROY      DRM_IOWR(0xC0, struct drm_syncobj_destroy)
 #define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle)
 #define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle)
+#define DRM_IOCTL_SYNCOBJ_WAIT         DRM_IOWR(0xC3, struct drm_syncobj_wait)
+#define DRM_IOCTL_SYNCOBJ_RESET                DRM_IOWR(0xC4, struct drm_syncobj_array)
+#define DRM_IOCTL_SYNCOBJ_SIGNAL       DRM_IOWR(0xC5, struct drm_syncobj_array)
 
 /**
  * Device specific ioctls should only be in their respective headers
index 7ccbd6a2bbe07b387b43bb8b4ac5eba0f52d1cd0..6598fb76d2c27741d2c916f914b70c5f472911f9 100644 (file)
@@ -260,6 +260,8 @@ typedef struct _drm_i915_sarea {
 #define DRM_I915_GEM_CONTEXT_GETPARAM  0x34
 #define DRM_I915_GEM_CONTEXT_SETPARAM  0x35
 #define DRM_I915_PERF_OPEN             0x36
+#define DRM_I915_PERF_ADD_CONFIG       0x37
+#define DRM_I915_PERF_REMOVE_CONFIG    0x38
 
 #define DRM_IOCTL_I915_INIT            DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
 #define DRM_IOCTL_I915_FLUSH           DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -315,6 +317,8 @@ typedef struct _drm_i915_sarea {
 #define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM    DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param)
 #define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM    DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param)
 #define DRM_IOCTL_I915_PERF_OPEN       DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param)
+#define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config)
+#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG      DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64)
 
 /* Allow drivers to submit batchbuffers directly to hardware, relying
  * on the security mechanisms provided by hardware.
@@ -431,6 +435,11 @@ typedef struct drm_i915_irq_wait {
  */
 #define I915_PARAM_HAS_EXEC_BATCH_FIRST         48
 
+/* Query whether DRM_I915_GEM_EXECBUFFER2 supports supplying an array of
+ * drm_i915_gem_exec_fence structures.  See I915_EXEC_FENCE_ARRAY.
+ */
+#define I915_PARAM_HAS_EXEC_FENCE_ARRAY  49
+
 typedef struct drm_i915_getparam {
        __s32 param;
        /*
@@ -812,6 +821,17 @@ struct drm_i915_gem_exec_object2 {
        __u64 rsvd2;
 };
 
+struct drm_i915_gem_exec_fence {
+       /**
+        * User's handle for a drm_syncobj to wait on or signal.
+        */
+       __u32 handle;
+
+#define I915_EXEC_FENCE_WAIT            (1<<0)
+#define I915_EXEC_FENCE_SIGNAL          (1<<1)
+       __u32 flags;
+};
+
 struct drm_i915_gem_execbuffer2 {
        /**
         * List of gem_exec_object2 structs
@@ -826,7 +846,11 @@ struct drm_i915_gem_execbuffer2 {
        __u32 DR1;
        __u32 DR4;
        __u32 num_cliprects;
-       /** This is a struct drm_clip_rect *cliprects */
+       /**
+        * This is a struct drm_clip_rect *cliprects if I915_EXEC_FENCE_ARRAY
+        * is not set.  If I915_EXEC_FENCE_ARRAY is set, then this is a
+        * struct drm_i915_gem_exec_fence *fences.
+        */
        __u64 cliprects_ptr;
 #define I915_EXEC_RING_MASK              (7<<0)
 #define I915_EXEC_DEFAULT                (0<<0)
@@ -927,7 +951,14 @@ struct drm_i915_gem_execbuffer2 {
  * element).
  */
 #define I915_EXEC_BATCH_FIRST          (1<<18)
-#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_BATCH_FIRST<<1))
+
+/* Setting I915_FENCE_ARRAY implies that num_cliprects and cliprects_ptr
+ * define an array of i915_gem_exec_fence structures which specify a set of
+ * dma fences to wait upon or signal.
+ */
+#define I915_EXEC_FENCE_ARRAY   (1<<19)
+
+#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1))
 
 #define I915_EXEC_CONTEXT_ID_MASK      (0xffffffff)
 #define i915_execbuffer2_set_context_id(eb2, context) \
@@ -1467,6 +1498,22 @@ enum drm_i915_perf_record_type {
        DRM_I915_PERF_RECORD_MAX /* non-ABI */
 };
 
+/**
+ * Structure to upload perf dynamic configuration into the kernel.
+ */
+struct drm_i915_perf_oa_config {
+       /** String formatted like "%08x-%04x-%04x-%04x-%012x" */
+       char uuid[36];
+
+       __u32 n_mux_regs;
+       __u32 n_boolean_regs;
+       __u32 n_flex_regs;
+
+       __u64 __user mux_regs_ptr;
+       __u64 __user boolean_regs_ptr;
+       __u64 __user flex_regs_ptr;
+};
+
 #if defined(__cplusplus)
 }
 #endif
index 461811e5714092f17619902593b9ac47e8572a6d..30f2ce76b5170c8ea04f93a8f8f70f4633e4322b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
  *
  * This program is free software; you can redistribute it and/or
@@ -143,12 +144,6 @@ enum bpf_attach_type {
 
 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
 
-enum bpf_sockmap_flags {
-       BPF_SOCKMAP_UNSPEC,
-       BPF_SOCKMAP_STRPARSER,
-       __MAX_BPF_SOCKMAP_FLAG
-};
-
 /* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command
  * to the given target_fd cgroup the descendent cgroup will be able to
  * override effective bpf program that was inherited from this cgroup
@@ -318,7 +313,7 @@ union bpf_attr {
  *     jump into another BPF program
  *     @ctx: context pointer passed to next program
  *     @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY
- *     @index: index inside array that selects specific program to run
+ *     @index: 32-bit index inside array that selects specific program to run
  *     Return: 0 on success or negative error
  *
  * int bpf_clone_redirect(skb, ifindex, flags)
@@ -368,9 +363,20 @@ union bpf_attr {
  * int bpf_redirect(ifindex, flags)
  *     redirect to another netdev
  *     @ifindex: ifindex of the net device
- *     @flags: bit 0 - if set, redirect to ingress instead of egress
- *             other bits - reserved
- *     Return: TC_ACT_REDIRECT
+ *     @flags:
+ *       cls_bpf:
+ *          bit 0 - if set, redirect to ingress instead of egress
+ *          other bits - reserved
+ *       xdp_bpf:
+ *         all bits - reserved
+ *     Return: cls_bpf: TC_ACT_REDIRECT on success or TC_ACT_SHOT on error
+ *            xdp_bfp: XDP_REDIRECT on success or XDP_ABORT on error
+ * int bpf_redirect_map(map, key, flags)
+ *     redirect to endpoint in map
+ *     @map: pointer to dev map
+ *     @key: index in map to lookup
+ *     @flags: --
+ *     Return: XDP_REDIRECT on success or XDP_ABORT on error
  *
  * u32 bpf_get_route_realm(skb)
  *     retrieve a dst's tclassid
@@ -570,7 +576,7 @@ union bpf_attr {
  *     @map: pointer to sockmap
  *     @key: key to lookup sock in map
  *     @flags: reserved for future use
- *     Return: SK_REDIRECT
+ *     Return: SK_PASS
  *
  * int bpf_sock_map_update(skops, map, key, flags)
  *     @skops: pointer to bpf_sock_ops
@@ -632,7 +638,7 @@ union bpf_attr {
        FN(skb_adjust_room),            \
        FN(redirect_map),               \
        FN(sk_redirect_map),            \
-       FN(sock_map_update),
+       FN(sock_map_update),            \
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -753,20 +759,23 @@ struct bpf_sock {
        __u32 family;
        __u32 type;
        __u32 protocol;
+       __u32 mark;
+       __u32 priority;
 };
 
 #define XDP_PACKET_HEADROOM 256
 
 /* User return codes for XDP prog type.
  * A valid XDP program must return one of these defined values. All other
- * return codes are reserved for future use. Unknown return codes will result
- * in packet drop.
+ * return codes are reserved for future use. Unknown return codes will
+ * result in packet drops and a warning via bpf_warn_invalid_xdp_action().
  */
 enum xdp_action {
        XDP_ABORTED = 0,
        XDP_DROP,
        XDP_PASS,
        XDP_TX,
+       XDP_REDIRECT,
 };
 
 /* user accessible metadata for XDP packet hook
@@ -778,9 +787,8 @@ struct xdp_md {
 };
 
 enum sk_action {
-       SK_ABORTED = 0,
-       SK_DROP,
-       SK_REDIRECT,
+       SK_DROP = 0,
+       SK_PASS,
 };
 
 #define BPF_TAG_SIZE   8
index a5c220e0828f324fb5465deb022066b3bc01a97f..18be90725ab04a4a3fa2691d3eb57067778399d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI__LINUX_BPF_COMMON_H__
 #define _UAPI__LINUX_BPF_COMMON_H__
 
index ec69d55bcec73974d4c44ef1d1555166f28d800f..6448cdd9a350d3a0c6513c7a76aad29a68689bd4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_FCNTL_H
 #define _UAPI_LINUX_FCNTL_H
 
index 2b65efd19a46989e14ff89a7f70975ef56cf3f89..965e4d8606d81aea7792252d93b72dceb0dd7f86 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_HW_BREAKPOINT_H
 #define _UAPI_LINUX_HW_BREAKPOINT_H
 
index 6cd63c18708ae1d23dbc280ed49aed55f817a2f5..7e99999d6236fa2940fa2b565442e8b1b1331407 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef __LINUX_KVM_H
 #define __LINUX_KVM_H
 
@@ -711,7 +712,8 @@ struct kvm_ppc_one_seg_page_size {
 struct kvm_ppc_smmu_info {
        __u64 flags;
        __u32 slb_size;
-       __u32 pad;
+       __u16 data_keys;        /* # storage keys supported for data */
+       __u16 instr_keys;       /* # storage keys supported for instructions */
        struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
 };
 
index 81d8edf11789aaae96a25da00b8a8f3ec0ed83aa..bfd5938fede6c1ba3b71d096cd36127da2837042 100644 (file)
@@ -1,7 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_MMAN_H
 #define _UAPI_LINUX_MMAN_H
 
-#include <uapi/asm/mman.h>
+#include <asm/mman.h>
+#include <asm-generic/hugetlb_encode.h>
 
 #define MREMAP_MAYMOVE 1
 #define MREMAP_FIXED   2
 #define OVERCOMMIT_ALWAYS              1
 #define OVERCOMMIT_NEVER               2
 
+/*
+ * Huge page size encoding when MAP_HUGETLB is specified, and a huge page
+ * size other than the default is desired.  See hugetlb_encode.h.
+ * All known huge page size encodings are provided here.  It is the
+ * responsibility of the application to know which sizes are supported on
+ * the running system.  See mmap(2) man page for details.
+ */
+#define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT
+#define MAP_HUGE_MASK  HUGETLB_FLAG_ENCODE_MASK
+
+#define MAP_HUGE_64KB  HUGETLB_FLAG_ENCODE_64KB
+#define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB
+#define MAP_HUGE_1MB   HUGETLB_FLAG_ENCODE_1MB
+#define MAP_HUGE_2MB   HUGETLB_FLAG_ENCODE_2MB
+#define MAP_HUGE_8MB   HUGETLB_FLAG_ENCODE_8MB
+#define MAP_HUGE_16MB  HUGETLB_FLAG_ENCODE_16MB
+#define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB
+#define MAP_HUGE_1GB   HUGETLB_FLAG_ENCODE_1GB
+#define MAP_HUGE_2GB   HUGETLB_FLAG_ENCODE_2GB
+#define MAP_HUGE_16GB  HUGETLB_FLAG_ENCODE_16GB
+
 #endif /* _UAPI_LINUX_MMAN_H */
index 140ae638cfd618b931ec1d298a80d1dffa4c1680..362493a2f950b3024efae42ac321454ab66d845d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  * Performance events:
  *
index e2a6c7b3510b4a73a60e36f83739f42c62fad6f5..30a9e51bbb1e583fc5344ba0ef849cd4c464b72f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_SCHED_H
 #define _UAPI_LINUX_SCHED_H
 
index 17b10304c393355da9ed2da743107a5c59748290..7b35e98d3c58b1df9f4315e3f76a2564c25a106b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _UAPI_LINUX_STAT_H
 #define _UAPI_LINUX_STAT_H
 
index 60180c0b5dc6a5bce1cec4800050dc5b20df58f7..c51f8e5cc6080c03028727cdb81343fc4cabb6e1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 #ifndef _LINUX_VHOST_H
 #define _LINUX_VHOST_H
 /* Userspace interface for in-kernel virtio accelerators. */
index 87bf30b182dfd0fd20cc420896a568590c58f540..c227ccba60aee2ab0128c5c529c5f4038577e8fd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
 /*
  *  Advanced Linux Sound Architecture - ALSA - Driver
  *  Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
index 5b1cba57e3b3a25dfa642c4afd1e17fb543cafbf..c3e36c60d477839e16b0bc6c1156946f165c1ecc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../../scripts/Makefile.include
 include ../../scripts/utilities.mak
 BINDIR=usr/bin
index ff613b31730b346de6b3306389493fa59b93f267..90f512c4e2bba03821016900d9f86d0ee1b6652c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 CFLAGS := -I../../usr/include
 
index 48c6c93284194ad5b780a8f5d716c96c7fe350b8..5f758c489a208c09fd09274b0b01302d61d56f27 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 PREFIX ?= /usr
 SBINDIR ?= sbin
 INSTALL ?= install
index 078b666fd78b8ad9b2cddc32d5975e0d8ae533d8..c379af003807ad6606d432e98e8c2dd413c04e7d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for LEDs tools
 
 CC = $(CROSS_COMPILE)gcc
index 64642ccfe442c499fb4b6fb2432f1b9bee336915..eb65ae988839f95d5ffdef80044225492365887e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * led_hw_brightness_mon.c
  *
index 25cbc7acf50a04e8e54378332513163f6c8721e3..c15a39c1f271419518033ea8a408fbfdf5ac13f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * uledmon.c
  *
index 1e83e3c0744845278aa6ea03b1c440400a1188fb..a13e9c7f1fc5007d130807d75aa0a0a0120ddb0f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../../scripts/Makefile.include
 include ../../scripts/utilities.mak            # QUIET_CLEAN
 
index 8c6489356e3ac7dcf6e812b928e2dd363be24ca2..4af6d4b7aa07516e25c4a49048563c8faa2716e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 
 #include "cpu.h"
index 81e9d3955961ef6533919a8494c2f81a8152a99e..90a102fb20dedd567196bc4ad4cf6a79c70f26aa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_CPU__
 #define __API_CPU__
 
index 188f7880eafe670e7afc84ea46f9c7445ede4bed..80c783497d25bcc3d6e43d4d11990844653e857d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_DEBUG_INTERNAL_H__
 #define __API_DEBUG_INTERNAL_H__
 
index 5fa5cf500a1f960ad04ca8a8149e8ee7f1f39029..69b1ba3d1ee380724bfa02a94f80959a7cad2828 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdarg.h>
 #include "debug.h"
index a0872f68fc56bb92629be3bb3963e00f90369553..3684dd6e0c02d5fe65887293bde2ae3658f1c281 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_DEBUG_H__
 #define __API_DEBUG_H__
 
index 71287dddc05fbf7ba58772fc7833a1a6d1505f13..b39557d1a88f9378ce1c94a138547714a76eb02b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_FD_ARRAY__
 #define __API_FD_ARRAY__
 
index a7ecf8f469f47921ec0734eb4142a4da64f6c5a7..b24afc0e6e81c458c5a2a31c98b5121ea917742c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
index 45605348461e2f40e308c7a446ddfe32808c12ee..dda49deefb5212c9992faffaa5378bdd990c2546 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_FS__
 #define __API_FS__
 
index 3e606b9c443efb77e75842cb80cfd10f92dae5bc..7b7fd0b1855105bac16583a19a0474d26d3c3234 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE
 #endif
index 3f233ac70b6f77d343a840370ca31fd85e8c36b2..0066f06cc3817c1a45e85385449902e0d68571f8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __API_FS_TRACING_PATH_H
 #define __API_FS_TRACING_PATH_H
 
index d2441db34740df88467043da598c838c13b0e7c6..4555304dc18e6ab84137b43ae27ab4753d1e52a9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Most of this file is copied from tools/lib/traceevent/Makefile
 
 BPF_VERSION = 0
index 0b859b8843390fe4ba09b06f388ff31843f13d33..a16ebf51541707b7bd81fb9afc1da6134acc11bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bitops.h>
 #include <asm/types.h>
 
index ed9ace59d11206c18c242e925d3a0a0832c61a59..9b0ca3ad1ef3863a8d6f877a74e75a0ce40f6dd5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # file format version
 FILE_VERSION = 1
 
index d1c89cc06f5f6710471c42dc5b2a475a54ee7658..5c3b58cce8a9b911c7cac5f795bf402140b89ea5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stddef.h>
 #include <stdbool.h>
 #include <linux/compiler.h>
index 6e66277ec4375c84693b25756fdf8336faf79fcf..8862da80995a8f2cc1419ce3c839ab43195ad884 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_COMMON_H
 #define _LIBLOCKDEP_COMMON_H
 
index ee53a42818caee935457a64066a863b5b5477dc6..a80ac39f966ed3d6c01f3b335494120e0fde999e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_MUTEX_H
 #define _LIBLOCKDEP_MUTEX_H
 
index 4ec03f86155163177d64288b38f164d8651027ca..a96c3bf0fef121a19fce62b22946e5eb9f39120f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_RWLOCK_H
 #define _LIBLOCKDEP_RWLOCK_H
 
index ced6d7443cea2eddc3b41af2eedd2ff0b6cff829..6002fcf2f9bc3e798422f2b579d6d86ad61f0d61 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/lockdep.h>
 #include <stdlib.h>
 
index 6a2d3c5d4e92b90e8c34af6549962c915e1443e3..76245d16196deb17bab03ee3f5c83674a675facd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <pthread.h>
 #include <stdio.h>
index f9b94098fc98e118c4d36e8096c3b2cd8dd72778..2e570a188f1675588a92096e4673807008ecdd38 100755 (executable)
@@ -1,4 +1,5 @@
 #! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 make &> /dev/null
 
index 18211a5f354fe53e2a0650fe1ca9150956fd5b7a..63c7ce97bda3a9f703816997477105b1f3a7462a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 
 int main(void)
index 0f782ff404ac65999c8689555967eabb9c6f0e52..efa39b23f05d0c3b50f2900c79776b24537929a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 
 void main(void)
index 07f0e29d548595ccb29413f08071bc79ab4a076e..1460afd33d712c2469982190ea7a08019b3c0295 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index cd807d7363611ff4d044fb3390a580c8efad219f..39325ef8a2ac176f9ebbbc7aaa6e799de171f8c1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <pthread.h>
 
index 843db09ac666c14f47ddca3d941c3890837e5836..a54c1b2af118242a12345f0d3dc5a205bf36e505 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index 33620e268f85f3b8d8a233d6dc91ed91e6117a62..aa5d194e88694ec95f5451083f62ed71ff842b00 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index 3fee51e3a68a5bf43ff8c1813ff980b53a55771f..b54a08e60416f087a5fa60a0475d2bd6cdf70f6a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index 427ba562c75b0d217b9385570a19c229f70a4747..a56742250d86f10eedd065dc6b56b056197931a0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index 680c6cf3e919c9eb059bdab8c49e540fdfc862c4..238a3353f3c353e9df9f40182fa20a432386bbdb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 #include "common.h"
 
index d44f77d710298c38b42ef60758c560314c0328b2..eee88df7fc41b90a81f87eb39e6f75247c38aad1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/rwlock.h>
 
 void main(void)
index d89e94d47d86c641c99b04a39d6fa7c9962fb38b..3026c29ccb5c36b7e8381b1a994926be8189e323 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIBLOCKDEP_TEST_COMMON_H
 #define _LIBLOCKDEP_TEST_COMMON_H
 
index 0bc62de686f7b4a51615f538d88f79447cce1310..34cf32f689de00723cb0c7c55ccc29a77454c010 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <liblockdep/mutex.h>
 
 void main(void)
index 503ae072244cb2ea9fcbfdffada5815642c875d4..d6d65537b0d9ba93b5cc1749a519913d016f5b09 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef _GNU_SOURCE
 #include <string.h>
 #include <stdio.h>
index a4246f14ded101f2dc61ca04d092b7cebe677632..93b3d4b6feac378d81c2f189310399518efc611f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  linux/tools/lib/string.c
  *
index 7e9f03c97e4c6027e34f6b2847bcffc6ab0e0d1c..95563b8e1ad743433076257d8f04d3740e2e55da 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../../scripts/Makefile.include
 include ../../scripts/utilities.mak            # QUIET_CLEAN
 
index 1ae833af1a4af4604a0cf600b4617d8d06e3ebaf..33e94fb8398677e41c95b0fc2c59a5e5326c52c8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/string.h>
 #include <sys/types.h>
index 5d08bda31d90f541dd632b8fb8bfaeaec0ceaf8e..aba591b8d2548054f02af0ee4c778ec0cf3533d9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_EXEC_CMD_H
 #define __SUBCMD_EXEC_CMD_H
 
index 0310520f918e450c06babea8042d13b5dd390d10..2859f107abc802ef14c34e6847a50c13f8a798fe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 9bd4223dc722013bbfd170d652064f5b056cc07d..355c066c8d49cfb62d1116102e9f9196f6c61e90 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_HELP_H
 #define __SUBCMD_HELP_H
 
index 6518bea926d6fdec47be68a73431110e45e9795b..5ba754d179520a5e95699dc16b13123773a98864 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/select.h>
 #include <stdlib.h>
 #include <stdio.h>
index 623f5542d05dea5435f76153bcde8e11af3c7f16..f1a53cf2988045b73ad9d9376028fc62aed2169a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_PAGER_H
 #define __SUBCMD_PAGER_H
 
index 2bd6fd0c1d40d40d56000a34c2b2dd99bed0ef1c..f6a1babcbac416d0893b72004ce1261d6373d989 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/string.h>
 #include <linux/types.h>
index f054ca1b899df532612a9f11a317ce147b2319bf..92fdbe1519f6d8f2aebfd8cf05a119bea7be344a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_PARSE_OPTIONS_H
 #define __SUBCMD_PARSE_OPTIONS_H
 
index 911f83942723acd8a1338f90582cc9561082cad6..5cdac21625322bda990163e51e43236e9f9bb89b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index fe2befea1e730a5e5cb3ee4d575df76c163ca218..17d969c6add3bb7948bcea1ec4c346fa46298765 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_RUN_COMMAND_H
 #define __SUBCMD_RUN_COMMAND_H
 
index 3537c348a18ef0a9662fa8b6a6385209866fd2de..f0fe3dbef7f7f38b8bfe1a69b447b668c7e50196 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <signal.h>
 #include "subcmd-util.h"
 #include "sigchain.h"
index 0c919f2874ca37b4b2d5414f7f5473b95cfd8d23..1ec663af43eaf8b70666eba6486f35e910eff05e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_SIGCHAIN_H
 #define __SUBCMD_SIGCHAIN_H
 
index d017c728bd1b321fef0c50e684c708df377c37fc..84a7cf6c7878a1e384256594ba096056fd8ecb34 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "subcmd-config.h"
 
 #define UNDEFINED "SUBCMD_HAS_NOT_BEEN_INITIALIZED"
index cc8514030b5c3c4988dc05adc70df2e3dab2923a..9024dc17d100103d8ff9e86c9ac0707871040d81 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SUBCMD_CONFIG_H
 #define __PERF_SUBCMD_CONFIG_H
 
index 8fa5f036eff08002ee802dc6014f6689d790a80f..794a375dad3601e26f870edfa75b3458f1341aa8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __SUBCMD_UTIL_H
 #define __SUBCMD_UTIL_H
 
index d270ac00613d60612802e85cd71661a54c762f41..914cb8e3d40b7e1be5717b385e9f92a33d19aed1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <ctype.h>
 #include "symbol/kallsyms.h"
 #include <stdio.h>
index 4071316a766ef95023853f61ed1a27c9477aa898..bc40101d72c189a882842f84ee492924a50e29ce 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TOOLS_KALLSYMS_H_
 #define __TOOLS_KALLSYMS_H_ 1
 
index 9b8555ea3459c85bef282dad5166700771f0e5ed..46cd5f871ad76d48bc7a34f725a31fa12ed5614c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # trace-cmd version
 EP_VERSION = 1
 EP_PATCHLEVEL = 1
index ec57d0c1fbc2b679a82baf35219ea6cfa523354d..8f8586912da7bab64a0e351b45ee4ea283ac7414 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
index 3727de48c8d50267c4c9cd1df33af69a1ff12643..5e750af2b461f7e47bbf86ea21be1180a27c94b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
index 3a413eaada68432e0646e49c0c31ae27d93abe21..690173bfa13edb51d82b2e2eb7b4529b190f2958 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 45f9a06daa560251cae5c93b2cdc1624930b1460..e08ee147eab4346cdedc582fd5f017cd79cf1d37 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <linux/kernel.h>
 #include <stdio.h>
index ddf8880106524c1b2882122b3e5ed76f3c5cc3f6..5830670feae1eef1f97bcc9830aded5d428ab309 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 prefix = /usr
 
 CC = gcc
index 06a399ac8b2f0cfd8cc2c994b208b2758d8aecc4..10ceee64a09a8c2ad0b3153f6bd96155ce423ee4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (c) 2011 Bryan Schumaker <bjschuma@netapp.com>
 #
index 6a1af43862df759239b8848921b0492e23b95e6b..3995735a878fe796f36513b2bb22b20deaf642d1 100644 (file)
@@ -194,10 +194,10 @@ they mean, and suggestions for how to fix them.
    If it's a GCC-compiled .c file, the error may be because the function
    uses an inline asm() statement which has a "call" instruction.  An
    asm() statement with a call instruction must declare the use of the
-   stack pointer in its output operand.  For example, on x86_64:
+   stack pointer in its output operand.  On x86_64, this means adding
+   the ASM_CALL_CONSTRAINT as an output constraint:
 
-     register void *__sp asm("rsp");
-     asm volatile("call func" : "+r" (__sp));
+     asm volatile("call func" : ASM_CALL_CONSTRAINT);
 
    Otherwise the stack frame may not get created before the call.
 
index 6976c73e60c444b50320adfc081ecd6beaec681f..424b1965d06f2f95d701d19284cc0f3f7e6e82ea 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 include ../scripts/Makefile.include
 include ../scripts/Makefile.arch
 
index 0e8c8ec4fd4e6ac1d101b2514d43d870762c293b..34a579f806e390337bdee738ae507364c02e7ad7 100644 (file)
@@ -208,14 +208,14 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
                break;
 
        case 0x89:
-               if (rex == 0x48 && modrm == 0xe5) {
+               if (rex_w && !rex_r && modrm_mod == 3 && modrm_reg == 4) {
 
-                       /* mov %rsp, %rbp */
+                       /* mov %rsp, reg */
                        *type = INSN_STACK;
                        op->src.type = OP_SRC_REG;
                        op->src.reg = CFI_SP;
                        op->dest.type = OP_DEST_REG;
-                       op->dest.reg = CFI_BP;
+                       op->dest.reg = op_to_cfi_reg[modrm_rm][rex_b];
                        break;
                }
 
@@ -284,11 +284,16 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
        case 0x8d:
                if (sib == 0x24 && rex_w && !rex_b && !rex_x) {
 
-                       /* lea disp(%rsp), reg */
                        *type = INSN_STACK;
-                       op->src.type = OP_SRC_ADD;
+                       if (!insn.displacement.value) {
+                               /* lea (%rsp), reg */
+                               op->src.type = OP_SRC_REG;
+                       } else {
+                               /* lea disp(%rsp), reg */
+                               op->src.type = OP_SRC_ADD;
+                               op->src.offset = insn.displacement.value;
+                       }
                        op->src.reg = CFI_SP;
-                       op->src.offset = insn.displacement.value;
                        op->dest.type = OP_DEST_REG;
                        op->dest.reg = op_to_cfi_reg[modrm_reg][rex_r];
 
index a3d2c62fd805772c0c9d56fe57b80a9d058cf3ff..b02a36b2c14fb20522dc16d3f4093cbe36e2e740 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # gen-insn-attr-x86.awk: Instruction attribute table generator
 # Written by Masami Hiramatsu <mhiramat@redhat.com>
 #
index f744617c9946d7eaaa293b3aba5b63dddf19278b..c0e26ad1fa7e3dbd212b3a4fd02fbcc4d8afc74c 100644 (file)
@@ -267,12 +267,13 @@ static int decode_instructions(struct objtool_file *file)
                                                      &insn->immediate,
                                                      &insn->stack_op);
                        if (ret)
-                               return ret;
+                               goto err;
 
                        if (!insn->type || insn->type > INSN_LAST) {
                                WARN_FUNC("invalid instruction type %d",
                                          insn->sec, insn->offset, insn->type);
-                               return -1;
+                               ret = -1;
+                               goto err;
                        }
 
                        hash_add(file->insn_hash, &insn->hash, insn->offset);
@@ -296,6 +297,10 @@ static int decode_instructions(struct objtool_file *file)
        }
 
        return 0;
+
+err:
+       free(insn);
+       return ret;
 }
 
 /*
@@ -1203,24 +1208,39 @@ static int update_insn_state(struct instruction *insn, struct insn_state *state)
                switch (op->src.type) {
 
                case OP_SRC_REG:
-                       if (op->src.reg == CFI_SP && op->dest.reg == CFI_BP) {
+                       if (op->src.reg == CFI_SP && op->dest.reg == CFI_BP &&
+                           cfa->base == CFI_SP &&
+                           regs[CFI_BP].base == CFI_CFA &&
+                           regs[CFI_BP].offset == -cfa->offset) {
+
+                               /* mov %rsp, %rbp */
+                               cfa->base = op->dest.reg;
+                               state->bp_scratch = false;
+                       }
 
-                               if (cfa->base == CFI_SP &&
-                                   regs[CFI_BP].base == CFI_CFA &&
-                                   regs[CFI_BP].offset == -cfa->offset) {
+                       else if (op->src.reg == CFI_SP &&
+                                op->dest.reg == CFI_BP && state->drap) {
 
-                                       /* mov %rsp, %rbp */
-                                       cfa->base = op->dest.reg;
-                                       state->bp_scratch = false;
-                               }
+                               /* drap: mov %rsp, %rbp */
+                               regs[CFI_BP].base = CFI_BP;
+                               regs[CFI_BP].offset = -state->stack_size;
+                               state->bp_scratch = false;
+                       }
 
-                               else if (state->drap) {
+                       else if (op->src.reg == CFI_SP && cfa->base == CFI_SP) {
 
-                                       /* drap: mov %rsp, %rbp */
-                                       regs[CFI_BP].base = CFI_BP;
-                                       regs[CFI_BP].offset = -state->stack_size;
-                                       state->bp_scratch = false;
-                               }
+                               /*
+                                * mov %rsp, %reg
+                                *
+                                * This is needed for the rare case where GCC
+                                * does:
+                                *
+                                *   mov    %rsp, %rax
+                                *   ...
+                                *   mov    %rax, %rsp
+                                */
+                               state->vals[op->dest.reg].base = CFI_CFA;
+                               state->vals[op->dest.reg].offset = -state->stack_size;
                        }
 
                        else if (op->dest.reg == cfa->base) {
index 6e9f980a7d26fdc4384fdb15d96baaca09846117..24460155c82c9b2305a2484d037be9017a00becb 100644 (file)
@@ -175,19 +175,20 @@ static int read_sections(struct elf *elf)
                        return -1;
                }
 
-               sec->data = elf_getdata(s, NULL);
-               if (!sec->data) {
-                       WARN_ELF("elf_getdata");
-                       return -1;
-               }
-
-               if (sec->data->d_off != 0 ||
-                   sec->data->d_size != sec->sh.sh_size) {
-                       WARN("unexpected data attributes for %s", sec->name);
-                       return -1;
+               if (sec->sh.sh_size != 0) {
+                       sec->data = elf_getdata(s, NULL);
+                       if (!sec->data) {
+                               WARN_ELF("elf_getdata");
+                               return -1;
+                       }
+                       if (sec->data->d_off != 0 ||
+                           sec->data->d_size != sec->sh.sh_size) {
+                               WARN("unexpected data attributes for %s",
+                                    sec->name);
+                               return -1;
+                       }
                }
-
-               sec->len = sec->data->d_size;
+               sec->len = sec->sh.sh_size;
        }
 
        /* sanity check, one more call to elf_nextscn() should return NULL */
@@ -508,6 +509,7 @@ struct section *elf_create_rela_section(struct elf *elf, struct section *base)
        strcat(relaname, base->name);
 
        sec = elf_create_section(elf, relaname, sizeof(GElf_Rela), 0);
+       free(relaname);
        if (!sec)
                return NULL;
 
@@ -561,6 +563,7 @@ int elf_write(struct elf *elf)
        struct section *sec;
        Elf_Scn *s;
 
+       /* Update section headers for changed sections: */
        list_for_each_entry(sec, &elf->sections, list) {
                if (sec->changed) {
                        s = elf_getscn(elf->elf, sec->idx);
@@ -568,13 +571,17 @@ int elf_write(struct elf *elf)
                                WARN_ELF("elf_getscn");
                                return -1;
                        }
-                       if (!gelf_update_shdr (s, &sec->sh)) {
+                       if (!gelf_update_shdr(s, &sec->sh)) {
                                WARN_ELF("gelf_update_shdr");
                                return -1;
                        }
                }
        }
 
+       /* Make sure the new section header entries get updated properly. */
+       elf_flagelf(elf->elf, ELF_C_SET, ELF_F_DIRTY);
+
+       /* Write all changes to the file. */
        if (elf_update(elf->elf, ELF_C_WRITE) < 0) {
                WARN_ELF("elf_update");
                return -1;
index 5442bbea4c229f5b4f871faa12c625348af29d36..77e8c85ef744459eb528b61b647edf77e5d0adf3 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 echo "BAR tests"
 echo
index 81a7498c5cd9efcc2f9f4af26264752fe62e615c..eae24df1dbf55606dccd5fa4efcd789d66eb5bb3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC := $(CROSS_COMPILE)gcc
 CFLAGS := -I../../usr/include
 
index e397453e5a465513af8d84103fd3feccb510d793..63526f4416ea4fb81292fafcfe6fdd55d9955639 100644 (file)
@@ -8,8 +8,8 @@ perf-record - Run a command and record its profile into perf.data
 SYNOPSIS
 --------
 [verse]
-'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] <command>
-'perf record' [-e <EVENT> | --event=EVENT] [-l] [-a] -- <command> [<options>]
+'perf record' [-e <EVENT> | --event=EVENT] [-a] <command>
+'perf record' [-e <EVENT> | --event=EVENT] [-a] -- <command> [<options>]
 
 DESCRIPTION
 -----------
index 62072822dc85d986671b6b15587229f81cfe19ec..627b7cada1442b65dbbcc600661f35caf8429cdc 100644 (file)
@@ -1,34 +1,8 @@
 tools/perf
-tools/arch/alpha/include/asm/barrier.h
-tools/arch/arm/include/asm/barrier.h
-tools/arch/arm64/include/asm/barrier.h
-tools/arch/ia64/include/asm/barrier.h
-tools/arch/mips/include/asm/barrier.h
-tools/arch/powerpc/include/asm/barrier.h
-tools/arch/s390/include/asm/barrier.h
-tools/arch/sh/include/asm/barrier.h
-tools/arch/sparc/include/asm/barrier.h
-tools/arch/sparc/include/asm/barrier_32.h
-tools/arch/sparc/include/asm/barrier_64.h
-tools/arch/tile/include/asm/barrier.h
-tools/arch/x86/include/asm/barrier.h
-tools/arch/x86/include/asm/cmpxchg.h
-tools/arch/x86/include/asm/cpufeatures.h
-tools/arch/x86/include/asm/disabled-features.h
-tools/arch/x86/include/asm/required-features.h
-tools/arch/x86/include/uapi/asm/svm.h
-tools/arch/x86/include/uapi/asm/vmx.h
-tools/arch/x86/include/uapi/asm/kvm.h
-tools/arch/x86/include/uapi/asm/kvm_perf.h
-tools/arch/x86/lib/memcpy_64.S
-tools/arch/x86/lib/memset_64.S
-tools/arch/s390/include/uapi/asm/kvm_perf.h
-tools/arch/s390/include/uapi/asm/sie.h
-tools/arch/xtensa/include/asm/barrier.h
+tools/arch
 tools/scripts
 tools/build
-tools/arch/x86/include/asm/atomic.h
-tools/arch/x86/include/asm/rmwcc.h
+tools/include
 tools/lib/traceevent
 tools/lib/api
 tools/lib/bpf
@@ -42,60 +16,3 @@ tools/lib/find_bit.c
 tools/lib/bitmap.c
 tools/lib/str_error_r.c
 tools/lib/vsprintf.c
-tools/include/asm/alternative-asm.h
-tools/include/asm/atomic.h
-tools/include/asm/barrier.h
-tools/include/asm/bug.h
-tools/include/asm-generic/atomic-gcc.h
-tools/include/asm-generic/barrier.h
-tools/include/asm-generic/bitops/arch_hweight.h
-tools/include/asm-generic/bitops/atomic.h
-tools/include/asm-generic/bitops/const_hweight.h
-tools/include/asm-generic/bitops/__ffs.h
-tools/include/asm-generic/bitops/__ffz.h
-tools/include/asm-generic/bitops/__fls.h
-tools/include/asm-generic/bitops/find.h
-tools/include/asm-generic/bitops/fls64.h
-tools/include/asm-generic/bitops/fls.h
-tools/include/asm-generic/bitops/hweight.h
-tools/include/asm-generic/bitops.h
-tools/include/linux/atomic.h
-tools/include/linux/bitops.h
-tools/include/linux/compiler.h
-tools/include/linux/compiler-gcc.h
-tools/include/linux/coresight-pmu.h
-tools/include/linux/bug.h
-tools/include/linux/filter.h
-tools/include/linux/hash.h
-tools/include/linux/kernel.h
-tools/include/linux/list.h
-tools/include/linux/log2.h
-tools/include/uapi/asm-generic/fcntl.h
-tools/include/uapi/asm-generic/ioctls.h
-tools/include/uapi/asm-generic/mman-common.h
-tools/include/uapi/asm-generic/mman.h
-tools/include/uapi/drm/drm.h
-tools/include/uapi/drm/i915_drm.h
-tools/include/uapi/linux/bpf.h
-tools/include/uapi/linux/bpf_common.h
-tools/include/uapi/linux/fcntl.h
-tools/include/uapi/linux/hw_breakpoint.h
-tools/include/uapi/linux/kvm.h
-tools/include/uapi/linux/mman.h
-tools/include/uapi/linux/perf_event.h
-tools/include/uapi/linux/sched.h
-tools/include/uapi/linux/stat.h
-tools/include/uapi/linux/vhost.h
-tools/include/uapi/sound/asound.h
-tools/include/linux/poison.h
-tools/include/linux/rbtree.h
-tools/include/linux/rbtree_augmented.h
-tools/include/linux/refcount.h
-tools/include/linux/string.h
-tools/include/linux/stringify.h
-tools/include/linux/types.h
-tools/include/linux/err.h
-tools/include/linux/bitmap.h
-tools/include/linux/time64.h
-tools/arch/*/include/uapi/asm/mman.h
-tools/arch/*/include/uapi/asm/perf_regs.h
index 32a64e6190288e5110cfa6de78138aceb955e7af..225454416ed54b2baea044ce46c794e23c708f71 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # This is a simple wrapper Makefile that calls the main Makefile.perf
 # with a -j option to do parallel builds
index 1ce0872b1726d7e4c56a7ded64de3513f404ee7b..b39b16395aac5c251c5ce9c4270258bd31564700 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <regex.h>
 
index f298d034c37b1a9e24930d8eecd7022a22db9d59..5a45046fab72a4a0897d203cb6ba6a03b7b5313b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index f619c9c5a4bff402a6c6c90d80134a6a53f207a3..ed20e0253e25d44a9e7ec6536a45200c6fa0d411 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_REGS_H
 #define ARCH_PERF_REGS_H
 
index 62eff847f91c4edc4754fb08a110f7b88b9c0411..8cb3477602339e9b94f30bb1edb2175e3828e570 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "perf_regs.h"
 #include "thread.h"
index e09e983946fec70d032c842196771c9cb6505b30..6e2495cc4517191656784a9bf61a43653901e7cc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 #define R0 0x00
index bacfa00fca398ed59c1caa901cfe77d0e510f8b1..36ba4c69c3c55cfec6c33a4b5cd52ee31d36f538 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
index 62c397ed3d97868bb979d32815f066dd6e1cb2b5..3a550225dfafd37d579ba0a464e9ec067485660d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <errno.h>
 #include <libunwind.h>
index eebe1ec9d2ee70e7ab58418d976744ff45bb30e0..91de4860faadfee93e26c066a1ee8861957c1185 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef NO_DWARF
 PERF_HAVE_DWARF_REGS := 1
 endif
index 8f1908756cb69bd6b452aec963650b5bebe2ffea..9a3e0523e2c937e0f06110906d6a6d155797c631 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <regex.h>
 
index 36e375f5a211f262a956617d512ebf00afa6f054..177b2855f797a23044d963e059bacd1532386630 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index 4e5af27e3fbfa5f42d9d474d8ff7dc237722206b..baaa5e64a3fb0d21fd33172d78d30932e1e14174 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_REGS_H
 #define ARCH_PERF_REGS_H
 
index cf04a4c91c596e240dcc201ef38695f5b0e7743c..e907f0f4c20c0c34c1806dd636990ed452f5d6b0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "perf_regs.h"
 #include "thread.h"
index 025b46e579a6faebe17b2998052d749dee43981d..07042511dca925fc3cbf3ce9594476bce0d19b47 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 .text
index b415dfdbcccabadfce60eebfa2e0fd7bcef37fcd..002520d4036b8892d908e81927757d69d4a9e517 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 
 #ifndef REMOTE_UNWIND_LIBUNWIND
index 6b40e9f017404f87877668645f7afa8f28649788..8c0cfeb55f8e54ed2dbb31938eb11154b1b8fe7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <sys/utsname.h>
 #include "common.h"
index 6b01c736b7d9aad5d8329776636a9c77d4344cc0..a1546509ad245b37bb27f5e461dba698ce8ac340 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_COMMON_H
 #define ARCH_PERF_COMMON_H
 
index cc3930904d68951db327a4b2dbcc2841c71e106d..42dab7c8f508828cd34b5c693e8d4f324b04a4dc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef NO_DWARF
 PERF_HAVE_DWARF_REGS := 1
 endif
index 3c4004db81b954b753bd150d7efa002103d7958b..b7bc04980fe870fed34cdb362d5d13f0fd1aa269 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static struct ins_ops *powerpc__associate_instruction_ops(struct arch *arch, const char *name)
 {
        int i;
index 84d8dedef2ed99e106e2adbcbf73ff2ba351e0cb..1c7be75cbc789f8033154f47f03c13b0913b7aaa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_TESTS_H
 #define ARCH_TESTS_H
 
index db4730f5585c72bfd096935e32478c29350aa62c..66dc015a733d6a588619dd21d52fa514933fa66c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index c12f4e804f66791e22be502012dda6602aab4027..00e37b10691382b80ce05d84812bd0056993dc23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_REGS_H
 #define ARCH_PERF_REGS_H
 
index e24f46241f407c35ffe810408dad6505c79efaa3..8c3fbd4af8171c4c4b41068f3894379cae8ce54c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "tests/tests.h"
 #include "arch-tests.h"
index 0bac3137ccbd6736bd6e468bb73ad7e609479bbf..30cbbd6d5be0c9a1aa337a350387f420eefb3068 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "perf_regs.h"
 #include "thread.h"
index d76c9a32f327a7ed425be5139c846f647cb46914..36a20b0033f97c00a068435ecfda38d7fa73c3c1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 /* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */
index 0dd6b7f2d44f12757a7f6194c4cf6d79bafcdc9c..54cfa0530e86d430d5bd61620533646e21a8ff92 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_BOOK3S_HV_HCALLS_H
 #define ARCH_PERF_BOOK3S_HV_HCALLS_H
 
index e68ba2da8970cda720369fd03f2226bbc458c496..853b95d1e13925eb091ce546c3ad8c77346699d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_BOOK3S_HV_EXITS_H
 #define ARCH_PERF_BOOK3S_HV_EXITS_H
 
index 9aaa6f5a93479f107c83123febfe8f8a8a59b63e..7a4cf80c207a0be22c1a238f6d036bb79e040466 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
index 249723f0e6a9e4bc3b64df49df7add18c0b175e6..596ad6aedaace816c0f7b37db55ae8ec7b5eef0f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include "util/kvm-stat.h"
 #include "util/parse-events.h"
index f860dc411f69a9236a9ef9e37a7f660c9e9062d4..ec50939b0418a78ec3402896d1a648b84e5f6450 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <string.h>
 #include <regex.h>
index 3a24b3c4327386dd0d32b6e00863bdf3a02e0aa6..7a1f05ef2fc031d5b77268b48b2e3c85ff0ebd48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
index 745b4b1b8b21eefe3525144741d1d64c02a7a25d..c9a81673e8aa37b30cbaf35cd7c0d43b2e535992 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static struct ins_ops *s390__associate_ins_ops(struct arch *arch, const char *name)
 {
        struct ins_ops *ops = NULL;
index 9da74a933bd6a77421e0d820919a31a77714d7ba..792d4c2772250c27ad22d55e95e7636fa97ee80a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index bd518b623d7a203e576653705866f910409fa144..5bd7b9260cc0858c36730ee367aecc56df6c91bb 100644 (file)
@@ -1,5 +1,4 @@
 libperf-y += header.o
-libperf-y += sym-handling.o
 libperf-y += kvm-stat.o
 
 libperf-$(CONFIG_DWARF) += dwarf-regs.o
index 0469df02ee62725f352a8a6c337b86ae162ec0c7..0dff5b2ed1e5093d3d8df16210061415630a1f95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Mapping of DWARF debug register numbers into register names.
  *
index b9a95a1a8e6909ab2d93e6f62d06de907dc799a1..0b2054007314445700a95fdea28f550610e30b60 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/tools/perf/arch/s390/util/sym-handling.c b/tools/perf/arch/s390/util/sym-handling.c
deleted file mode 100644 (file)
index e103f6e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Architecture specific ELF symbol handling and relocation mapping.
- *
- * Copyright 2017 IBM Corp.
- * Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License (version 2 only)
- * as published by the Free Software Foundation.
- */
-
-#include "symbol.h"
-
-#ifdef HAVE_LIBELF_SUPPORT
-bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
-{
-       if (ehdr.e_type == ET_EXEC)
-               return false;
-       return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN;
-}
-
-void arch__adjust_sym_map_offset(GElf_Sym *sym,
-                                GElf_Shdr *shdr __maybe_unused,
-                                struct map *map)
-{
-       if (map->type == MAP__FUNCTION)
-               sym->st_value += map->start;
-}
-#endif
index 3a2deaf3dab43a1586f500aa1484e709178cc43a..900e6961997091c737b57e85b834349cdfcc6248 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index 12c07619002c9fd86be4939bb4a23f97aaf57b71..35ede84a6b0d1e75cd688be0d51c8b9536b2f82e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index 9a628a24c5c92004e1e944c2af47c0d60e1db1e2..d74eaa7aa927d5a3abf5b5cdfe054e0381572f1b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef NO_DWARF
 PERF_HAVE_DWARF_REGS := 1
 endif
index d84b72063a30e33847e28891c16b9158bb0b8406..4adfb4ce28645f545a689772125f7e67bc5aa5aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static struct ins x86__instructions[] = {
        { .name = "add",        .ops = &mov_ops,  },
        { .name = "addl",       .ops = &mov_ops,  },
index 49a18b9ad9cf367accd013f71540553283648091..029a72c20b1970ad94ced82458aa36ea630efd15 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 in="$1"
 arch="$2"
index 4e0b806a7a0fe0cc5a1881085e251775afb7d782..9834fdc7c59e28ec943018fdf33a9b18527994fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_TESTS_H
 #define ARCH_TESTS_H
 
index 9b5e5cbb4209ae7f62527a53ea50eaa7e811300a..b9bd5dc9d4c079db2951f7c3bbbed86092a1b68a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index 7df517acfef856fbefaaf14ff1d21c884fdf5104..7f6d538f8a8953e5a988730dfe7fff391c49f541 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ARCH_PERF_REGS_H
 #define ARCH_PERF_REGS_H
 
index 99d66191e56ccf8df7ae4f2a432f6f74782dd57d..34a078136a47c70877959141e5f131a7fdc56cae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "tests/tests.h"
 #include "arch-tests.h"
index 7f209ce827bf5aa9e0f8ca5ee137c93ec69f451d..95036c7a59e8f5ab53e723d801c23873e38b7a9a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "perf_regs.h"
 #include "thread.h"
index 3cbf6fad169f8835b31414eae7b41ab64205a77e..fab3c6de73fad18aaaf6f0f156f8310b5c7a5927 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
  * from insn-x86-dat-src.c for inclusion by insn-x86.c
index aa512fa944dd0dd02074a2c9b816794db5b1d609..c57f34603b9bd6d7f7e3122b0339f1e4f4e7562e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Generated by gen-insn-x86-dat.sh and gen-insn-x86-dat.awk
  * from insn-x86-dat-src.c for inclusion by insn-x86.c
index 6cdb65d25b790f1e46414ec8326dcfded6de9491..891415b109843cb44f9a79984792bd4067374b2f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file contains instructions for testing by the test titled:
  *
index b3860586a0c2d949ba5d57b76cfd78ddeaa170d4..a5d24ae5810d6e05eba8a442a37d7a7d9be47265 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 
 #include "debug.h"
index 57f86b6e7d6f52f2743ab26fef4869883da1799d..90a4a8c58a62b8e26a7e3471bcb9e2e529cddcd4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tests/tests.h"
 #include "perf.h"
 #include "cloexec.h"
index 5dd7efb192ce962b3b56995aa707c429f5d01c71..b59678e8c1e284c5a823d76062477abf492188a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
index 17fec30a0b31af067c99817b02394e85113aca82..7a11f02d6c6c786e588552f70dcb8552aa585468 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
index 60875d5c556c217d3433487d65cf66382a78d25b..bbe5a0d16e51083d5432c30f6a45dc8fcec7211f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/linkage.h>
 
 #define AX      0
index 37f92aa39a5dee21afb2c7c30f3a15e0028481ad..e2f8034b89733200f81e3cc76f9b522b114ef080 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include "api/fs/fs.h"
 #include "util/group.h"
index a74a48db26f5e59186636ce74c803a3c6b476dbc..33027c5e6f920b20bff66577f08d60d4905b6020 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <unistd.h>
 #include <stdio.h>
index bf817beca0a822f498efa88ff64089319c2a27a3..b32409a0e546dc9861dce978d1881ddc15b741b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include "../../util/kvm-stat.h"
 #include <asm/svm.h>
index f95edebfb7162daaef5a04d5363084d980565cb6..4b2caf6d48e794d3cd5a88aaa978db10aabb3185 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <string.h>
 #include <regex.h>
index 79fe07158d0092e42d369c6292aa211d2770eb19..63a74c32ddc5d4a00028e7d01b5377d3ef731285 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 
 #include <linux/perf_event.h>
index 2e5567c94e09430f86db124a9a0fa1a05799943d..06bae7023a5103f28b2734075752d871072b2172 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <errno.h>
 
index 38dc9bb2a7c90a7ee8cf8c5aca9078fecc546743..fda8f4206ee41f450a19c9f283f649f5c8b84a5b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elfutils/libdwfl.h>
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
index 4f16661cbdbb507a34390df99202e5a73431ea5e..9c917f80c90653a49e248073c2b6d1fb64e1b620 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #ifndef REMOTE_UNWIND_LIBUNWIND
 #include <errno.h>
index aa0444a33fe607dd8137a2b6ab6366a1249751af..d7c9f1fb4444809e389d1503f4e2362126d534f4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef DEFINE_DWARF_REGSTR_TABLE
 /* This is included in perf/util/dwarf-regs.c */
 
index 842ab2781cdc51196a9496ea2759f64a2f350103..6c9fcd757f31061d59a94d052c74a6b7aa9a6f0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BENCH_H
 #define BENCH_H
 
index fe16b310097f509042a87ec8d2ee26a0f445c199..58ae6ed8f38b20e4c79d0f3c508ab576c8b273dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013  Davidlohr Bueso <davidlohr@hp.com>
  *
index 73a1c44ea63c9c916f3b1b2e3fbfb82d8a93fb77..08653ae8a8c4fb07c34000c05cdb2e1a9a1e3e7f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2015 Davidlohr Bueso.
  */
index 41786cbea24c643373af4884ab2901ae3dc99669..1058c194608a7258658e92a7c971b0909d33ad08 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013  Davidlohr Bueso <davidlohr@hp.com>
  *
index 4ab12c8e016a7d8f8e90d47a25ff3a9c145b8171..b4732dad9f891f8f1201dc99bdd890f8b4b1ab5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2015 Davidlohr Bueso.
  *
index 2fa49222ef8deeb0dbc0616d7bbc181bfea28cbf..8c5c0b6b5c974c6cbfa396716065817264fd1f12 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2013  Davidlohr Bueso <davidlohr@hp.com>
  *
index e44fd32395305cc5e58042ec7a85fee2e9ef1748..db4853f209c7665bc2bc86fa786225fb1a9bfa5d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Glibc independent futex library for testing kernel functionality.
  * Shamelessly stolen from Darren Hart <dvhltc@us.ibm.com>
index fbd732b54047976ec3abae8f54c630c6a6f78e2e..0251dd348124afc4c7a119503c5704d16ba1c3ff 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * mem-memcpy.c
  *
index 5aad2a9408b06094c76790ce7d4f330ceb98365e..5bcaec5601a81b851343b43328201dbed3e2f1bd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifdef HAVE_ARCH_X86_64_SUPPORT
 
index 8c0c1a2770c8fe01bb479c97847540befe164011..50ae8bd58296eca6357986be401139f9dee4d95d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 MEMCPY_FN(memcpy_orig,
        "x86-64-unrolled",
index f700369bb0f6ed181b3ccdbd60ce713283776ccc..b43f8d2a34ec101c1cc517e145ed063566085e42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 /* Various wrappers to make the kernel .S file build in user-space: */
 
index 0d15786d9ae30743b379f84c0f7555cb4bba45c4..53f45482663fe3acc7e204c8d627462dd3b86933 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifdef HAVE_ARCH_X86_64_SUPPORT
 
index f02d028771d970da5d611c31d1b406179b450d45..dac6d2b7c39b2d39423fee72ae898cb9af83edea 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 MEMSET_FN(memset_orig,
        "x86-64-unrolled",
index 58407aa24c1bfdde178f299d9d6ccb6b0f75265b..d550bd5261629a07575c55814d7d8b87938afd30 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define memset MEMSET /* don't hide glibc's memset() */
 #define altinstr_replacement text
 #define globl p2align 4; .globl
index 469d65b2112285f47a222cb83515500b4df6f08c..d95fdcc26f4b6f38cffb4f7a727d3c7456cbb357 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * numa.c
  *
index 4f961e74535b9c0d9141ecd0df51c236f30d358d..f9d7641ae8338770d67bc238c3b14d3e93e0b6d2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  * sched-messaging.c
index a152737370c59342866e003807a318bafd475cbb..0591be008f2aeba41ba33dcdb71c75f01e0374e6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  * sched-pipe.c
index c38373195c4a82fd70c89efbb4ecf167f11544a4..3d32aa45016d9b6a5ef878c2168bc36573f48d77 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-annotate.c
  *
index 445e62881254437d9f4d3067dc6f31b3b2233169..17a6bcd01aa678b70deb807de80cfa3db2f69875 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-bench.c
  *
index e3eb6240ced0903799d3add8998111dab488205a..5f53a7ad5ef3e7981482ec34e0e8c3698aa8d2ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-buildid-cache.c
  *
index fdaca16e0c7488fc1c5fc1548f736b974a1ad95b..ec2f327cd79d7bf1ed61f421aefe4932a7c7575a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-buildid-list.c
  *
index 475999e48f6699dd3e61619351f656b23ba659b5..fd32ad08c6d47d42f962f763877d7e0c4c1b7fa8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This is rewrite of original c2c tool introduced in here:
  *   http://lwn.net/Articles/588866/
index a1d82e33282c806e2763e4e6b6368f3ed6290f74..abfa49eaf7fd1039ead9a753a0d8bb65d9dd0a90 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-config.c
  *
index 46cd8490baf452cc70739c605e4cdab79d9060be..dde25d4ca56d62ed9a6cf806bf9ae39e11f3809c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include "builtin.h"
 #include "perf.h"
index 0cd4cf6a344b32aeb0f2c7015e34b8276f3b2ccb..56223bdfa205dab7db28bd9dac9c2cd6e60ec7ae 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-diff.c
  *
index 6d210e40d611b00b5a5292ccc76d5f2881a51ee5..cdd145613f602980f040e4766ac6a08548c0f28e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Builtin evlist command: Show the list of event selectors present
  * in a perf.data file.
index dbe4e4153bcfb6dc6e4a348cfd0b9ded44188f99..bd1fedef3d1c5d67a8ab6954467c24da622f2a27 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-help.c
  *
index 2b8032908fb2424ff10a74a4ac98d1f80f3529a3..3e0e73b0dc67642514831962c0b887abea69d86b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-inject.c
  *
index 24ee68ecdd427b5c4a398a96c286006c56a04810..35d4b9c9a9e8ffd6e191807e66017b87faf3c2d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
 #include "perf.h"
 
index f309c3773522dee5c5c8a515b1c278757fca58c6..5fb40368d5d12ff04e41abd36abbe9f5bc1f3045 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
 #include "perf.h"
 
index 4bf2cb4d25aa6bdba591495974f65091078d0b85..eeedbe433776781d3b17fe33c78fb3d716d69bf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-list.c
  *
index ff98652484a77efaa86a835b7c8f9a796ab36b50..fe69cd6b89e1ab8b66d074accf813ed2fc8aab1e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include "builtin.h"
index 0f15634ef82cc003a203065f414e180a04136b26..4db960085273064d8ee0e1ceca7a1ac3929150c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 56f8142ff97f1b6a1a7bb9433c1967f758d47916..0c95ffefb6ccdbbee39b49a60f0efd8b3977a234 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-record.c
  *
index f9dff652dcbdb01854ad8478c2218acc5caaf2ae..fae4b03407507a5291820ff45dac3ee6c03dfafb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-report.c
  *
index 322b4def8411f8aa9d50e1fd9f015a09eeaee968..f380d91ee609779b9b8234a9316d72f98cb2d48b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
 #include "perf.h"
 
index 3d4c3b5e186832d82336ae346865f697564253c2..0fe02758de7dc47fd9497db1f2ccae95eed06409 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
 
 #include "perf.h"
@@ -586,7 +587,7 @@ static void print_sample_brstack(struct perf_sample *sample,
                        thread__find_addr_map(thread, sample->cpumode, MAP__FUNCTION, to, &alt);
                }
 
-               printf("0x%"PRIx64, from);
+               printf(" 0x%"PRIx64, from);
                if (PRINT_FIELD(DSO)) {
                        printf("(");
                        map__fprintf_dsoname(alf.map, stdout);
@@ -681,7 +682,7 @@ static void print_sample_brstackoff(struct perf_sample *sample,
                if (alt.map && !alt.map->dso->adjust_symbols)
                        to = map__map_ip(alt.map, to);
 
-               printf("0x%"PRIx64, from);
+               printf(" 0x%"PRIx64, from);
                if (PRINT_FIELD(DSO)) {
                        printf("(");
                        map__fprintf_dsoname(alf.map, stdout);
index d25149456a2fc336b5d817c2d80c86d73cb06503..37019c5d675f2af7e44006944679d6137fe1d0d1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
 #include "perf.h"
 #include <linux/compiler.h>
index d4d19fe3d050a86e2f0d868e1729a6c5fbb95cb8..05745f3ce912dadf75495297d2b9978327d97774 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BUILTIN_H
 #define BUILTIN_H
 
index 932fda54b8a661171a0ae5430e24e0e4f9645cd5..50cd6228f50637def472cf75ce37ed9bba759a10 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 HEADERS='
 include/uapi/drm/drm.h
index c53a41f48b63419fcdb078ab28fc4d5227f66d3e..fe32d8344a823f56de37f3ecea53af4c2f78329f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __JVMTI_AGENT_H__
 #define __JVMTI_AGENT_H__
 
index 6d710904c8379c3339d065d9eb34c06479c76e48..c62c9fc9a525995c83ef8fc8bf2f790d599abadc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <sys/types.h>
 #include <stdio.h>
index e919306202699cce814589562a4c91ff6bc32983..0cfb3e2cefef48bd630f0463469738f0c72692cc 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # perf archive
 # Arnaldo Carvalho de Melo <acme@redhat.com>
 
index 3ba80b2359cc8c03d51b86b38713cb9f3226f43b..345f5d6e9ed516c41f180fcd6378bcaa81f706a8 100644 (file)
@@ -1,4 +1,5 @@
 # perf bash and zsh completion
+# SPDX-License-Identifier: GPL-2.0
 
 # Taken from git.git's completion script.
 __my_reassemble_comp_words_by_ref()
index 764e2547c25abf0c6e0fa7979b3e1c32bfdc99b9..8c0ca0cc428f477f6b189620cae27bcdc3607033 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
 
index c11f0c76e90c78aa0eef8f436f59d842ce0c2201..36673f98d66baa9958c07ef64a8a5e39ae3d90df 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_SYS_H
 #define _PERF_SYS_H
 
index 2f19e03c5c40d172a3a9adcd4916c22739be700c..62b13518bc6e50201a1a73ee024ba403c0011f72 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * perf.c
  *
index dc442ba21bf6b11b05635077294d1fce2ec70e00..f75f3dec748502e6edb1bfb3709e1a323119c0f6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_PERF_H
 #define _PERF_PERF_H
 
index 611fac01913de14335924f1b7e02a86263fa377e..d87efd2685b8cad889c6cd4f74ced45e19829c4b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef JEVENTS_H
 #define JEVENTS_H 1
 
index d666b10cf25b889d6692c8a7249a783fef1a9c3e..c7b0f6ea2a31d8886b823634472a25e82738b6b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __JSMN_H_
 #define __JSMN_H_
 
index 278ebd32cfb6f47146e796e0224f592cce479ec0..fbcd5a0590ad5d03042064eadb0f2779fa59228e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef JSON_H
 #define JSON_H 1
 
index 569eab3688dd084236e6261d7511a31a40dc7117..e08789ddfe6cdbb883fa2821e1dfa7eb8c743903 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PMU_EVENTS_H
 #define PMU_EVENTS_H
 
index eb4dbed57de7ea15a243a22be175d6716a97ec75..eb76f6516247e136f0277ea659f07317d3e11fbc 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/python
+# SPDX-License-Identifier: GPL-2.0
 # -*- python -*-
 # -*- coding: utf-8 -*-
 
index decdeb0f6789fbbce2a65d438fc3dc2e3ce6d609..e8994332d7dc1373447e9375af881e2ef547532a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 use 5.010000;
 use ExtUtils::MakeMaker;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
index 9e0985794e20e57ce01b3ff974c5b27d9c86c0f0..81a56cd2b3c166315bfb376d93265bcdf0463e66 100755 (executable)
@@ -1,4 +1,5 @@
 # EventClass.py
+# SPDX-License-Identifier: GPL-2.0
 #
 # This is a library defining some events types classes, which could
 # be used by other scripts to analyzing the perf samples.
index 163c39fa12d92baf83630670e1301799ac301909..4e843b9864ecd312573a4c19907ec6645193ebab 100644 (file)
@@ -1,4 +1,5 @@
 # event_analyzing_sample.py: general event handler in python
+# SPDX-License-Identifier: GPL-2.0
 #
 # Current perf report is already very powerful with the annotation integrated,
 # and this script is not trying to be as powerful as perf report, but
index 0b6ce8c253e8a921bda017b3d2872b830832d983..a150164b44a3fad380349213e2c63ebecb3952d8 100755 (executable)
@@ -1,4 +1,5 @@
 # Monitor the system for dropped packets and proudce a report of drop locations and counts
+# SPDX-License-Identifier: GPL-2.0
 
 import os
 import sys
index 4c6f09ac7d129e0f5ee9b0c823836d4de8f5c04c..9b2050f778f10e67a825ac5a334722c0e984a57b 100644 (file)
@@ -1,4 +1,5 @@
 # Display a process of packets and processed time.
+# SPDX-License-Identifier: GPL-2.0
 # It helps us to investigate networking or network device.
 #
 # options
index 5a605f70ef32268fb92a749c970cba321cba11d1..1697b5e18c9622bdc82f7f9355745febb0a28705 100755 (executable)
@@ -1,4 +1,5 @@
 # stackcollapse.py - format perf samples with one line per distinct call stack
+# SPDX-License-Identifier: GPL-2.0
 #
 # This script's output has two space-separated fields.  The first is a semicolon
 # separated stack including the program name (from the "comm" field) and the
index 8b60f343dd07c4bfd9f3ea6b7586146f8412745b..8410672efb8b5374817d2e3946af44fe003b45c4 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: GPL-2.0
 
 data    = {}
 times   = []
index c9aafed7da15ad4587616a98a48cb8de24570ed8..c180bbcdbef60239177384608cbf48ce33c270cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * The struct perf_event_attr test support.
  *
index 6bb50e82a3e3101de32ff3aca50680aa24cc565d..907b1b2f56ad45672d8d304075a68fad8b9bddaf 100644 (file)
@@ -1,4 +1,5 @@
 #! /usr/bin/python
+# SPDX-License-Identifier: GPL-2.0
 
 import os
 import sys
index d233ad33646319e2a4f8428454fb1d637dd1804e..71b9a0b613d2b2fcedee056de59d9ea56ec78516 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Test backward bit in event attribute, read ring buffer from end to
  * beginning
index 0d7c06584905fb4234abf4cacea86394aec09fa9..47bedf25ba6960b3c7cf8345396d86ff0304a1ee 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/bitmap.h>
 #include "tests.h"
index 97937e1bc53a0c358bf34a9cc50a67f150a1b905..335b695f4970851f00d019c5e91afd7a5baa386c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Inspired by breakpoint overflow test done by
  * Vince Weaver <vincent.weaver@maine.edu> for perf_event_tests
index 61ecd8021f49248485040c9d2523207d351554cd..ca962559e845e03081295e4659c75401a6431377 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Originally done by Vince Weaver <vincent.weaver@maine.edu> for
  * perf_event_tests (git://github.com/deater/perf_event_tests)
index 377bea0091638f04def45caa551992f9000aa530..53d06f37406a22526638b3a9e58643caca736fba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * builtin-test.c
  *
index c60ec916f0f29c17bc17232898a3545af165452c..f45fe11dcf509582f99b62c8b2fb98fa52f978fb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tests.h"
 #include "debug.h"
 #include "util.h"
index 466a462b26d12996d3b694f9be256bcf8cfc1bb4..fcc8984bc329de7b4c4eb2fae74c45b8f5ed2ab4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index 199702252270f1781529031211459bf2ec79272e..e78b897677bd44136f88ccb072ae6de6f03d251c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tests.h"
 #include <stdio.h>
 #include "cpumap.h"
index 30aead42d136137c451f4c4228b31e36bd7597bc..7f6c52021e411c233d682b7d5a1273b6ee7ffdaa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <stdlib.h>
 #include <linux/kernel.h>
index 9ba1d216a89fb48359258f6ee6b0c720f8d49ca2..ac40e05bcab4292d52f971ad02c1c2857d049d6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <inttypes.h>
index b82b981c32594aa367c7f114a6bc27f77cebb9b0..1a2686f1fcf0f7f16b5b673c35a5cb93428b1f7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <errno.h>
 #include <inttypes.h>
index 9484da2ec6b4215713059f81b66d02d3899fe9cb..f14dcd6134389b9b1b8370838d4cc5ab94d989e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include "evlist.h"
 #include "evsel.h"
index d32759b6e38a53f43f64ad74bf058f54e3f5bf7b..a104728ebf25264392031fe9abee1cf30da32349 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "evlist.h"
 #include "evsel.h"
 #include "parse-events.h"
index 5fc906d26c5ccde1d7e9100898d126300846f2a7..699561fa512c299a3a46e42a8f7515518c466df8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include <traceevent/event-parse.h>
 #include "evsel.h"
index cb251bf523e7baf6679e945c185d81fa47d7c009..01f0706995a9737c4bf7ff9012228f6bda8d11fa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util/debug.h"
 #include "util/expr.h"
 #include "tests.h"
index 7d3a9e2ff8977153db1c38bafbac082cd8a3269a..c7c81c4a5b2b59a11b5fc17c2d0496560ece2c0b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <api/fd/array.h>
 #include <poll.h>
 #include "util/debug.h"
index 00b8dc50f3dba8ffa1cbcc75938d15718741d75b..f7c5b613d6670f2f4a302742bf95b8cfda8742d0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include "perf.h"
 #include "util/debug.h"
index 888254e8665c41ce0c904f28857047c69e816467..a2de0ff0ce3a633d30d01edf8b9f96a3d22b78e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_TESTS__HISTS_COMMON_H__
 #define __PERF_TESTS__HISTS_COMMON_H__
 
index 8d19c0200cb74c6be1b08bcdbd5860d2727e93bc..65fe02bebbeea42bd7af8603feaf57603cf58bbf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "util/debug.h"
 #include "util/event.h"
index 755ca551b810ca44434d4a56c1be92b86095d221..1c5bedab3c2c1564e7120cdcd362f7af273b5235 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "util/debug.h"
 #include "util/symbol.h"
index 073c9c2856bc4dae2a65c3f3f90cdd9021f9acb2..9a9d06cb022225e7aff0e70d7e42ce767df7c284 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "tests.h"
 #include "debug.h"
index 282d62eaebe2512282e222ebc78bd857192011f5..faacb4f41460509a743dd2ab163376531f1d2596 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "util/debug.h"
 #include "util/event.h"
index 38f765767587ae0e3c7a9a6df15ad1b892a36eb7..9c7b3baca4fed6b9a2de769dc6c5f40db94d70a1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include "tests.h"
index 739428603b71293ce3ba5d44304a5c6aa77868ef..842d33637a18fb3270b3b449766b584bb8b4da38 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
 #include <unistd.h>
 #include <sys/prctl.h>
index 8b9d4ba06c0e11177f2acec6bfe40b87a4f46727..8e57d46109def0ff36152641a198d63bda2acd95 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <stdlib.h>
 #include "tests.h"
index 5187b50dbafe558b110ef80dfbd3f4ff0a2beaef..a039f93199e56cfb57ae04f37fd4fae7db03c1fd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <bpf/libbpf.h>
 #include <util/llvm-utils.h>
index b83571758d8392af77f02f0d7fc92286cc5429c4..f68b0d9b8ae285ce1c6396d58a0340057bcca681 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_TEST_LLVM_H
 #define PERF_TEST_LLVM_H
 
index bc8a70ee46d8b6bbb734409c06205ab7247562c2..5a8bf318f8a7ed4d832b4119da75927c2536903b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 /* For the CLR_() macros */
index f94a4196e7c9d9a38a97d4ca60c641f2074f4e1e..3c3f3e029e33bd77cb5b2d7284b6e3cb01735237 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <unistd.h>
 #include <sys/syscall.h>
index 9cf1c35f2ad0c0289b414596f11eeb0057c22fec..c531e6deb104799d733f47fbee405b5dca4b861c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 /* For the CPU_* macros */
index b6ee1c41f45d674b8cc0341169bcce2b115fa368..d9619d2653149292d5e4dd71d5cf0a5759f1026a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/err.h>
 #include "perf.h"
 #include "evlist.h"
index 9dc5c5d375531fadd5429fc5417721883d267e1a..00cd63f90b92a59e874cb95ad8932ee1485fa1b4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <api/fs/tracing_path.h>
index 0f0b025faa4b4748928f76dd956b51499c1e0027..f0679613bd1878210163308426cd67f0b8ab181a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "parse-events.h"
 #include "evsel.h"
 #include "evlist.h"
index 91867dcc39f0142544eaef16aea30dc4ca3cf7cb..2196d1497c0c491b84c6e045bf8fe230e83fc0c4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <stddef.h>
index bf2517d6de7079dacffb9d78e006952dd593823d..a693bcf017ea2c01366eb91d598cc863d6688c7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <signal.h>
 #include <stdlib.h>
 
index 19b650064b703b5baf5445f3eba33038bf71e651..c34904d3770550a3d379390b8febdbc5c71cc293 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 /* For the CLR_() macros */
index f2d9c5fe58e09f62bc517025bcbb85f15fce429a..fae26b1cf08f50a8c0caacf7bc0715e948ef0c03 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Test one of the main kernel Makefile targets to generate a perf sources tarball
 # suitable for build outside the full kernel sources.
 #
index 9f7f589f9c548b770518c51a3d5b33a8c19d5f7c..9abca267afa91dd7907dcbed79120c1247996db8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "parse-events.h"
 #include "pmu.h"
 #include "util.h"
index 598a7e058ad4f1e04afbe563b204d8cc795fd691..5d2df65ada6a74e7435a8e79ea0f90f0b4314645 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Just test if we can load the python binding.
  */
index c3858487159d7984df90333b7c254f59ebf29ad2..3ec6302b6498c24ac7841ac1f7aa9a5d13654ee2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <inttypes.h>
 #include <linux/kernel.h>
index a9903d9b8bc2fb272e6cea6cafa438c52c5a3234..5059452d27ddf76e3aafbe85ea68d135e83549cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <stdio.h>
 #include <sys/epoll.h>
index 462fc755092e0b95cdf9ffd2ecf2317f4a4cf5df..7a84d73324e3c1209781296dcc54260745150b53 100755 (executable)
@@ -10,6 +10,9 @@
 
 . $(dirname $0)/lib/probe.sh
 
+ld=$(realpath /lib64/ld*.so.* | uniq)
+libc=$(echo $ld | sed 's/ld/libc/g')
+
 trace_libc_inet_pton_backtrace() {
        idx=0
        expected[0]="PING.*bytes"
@@ -18,8 +21,8 @@ trace_libc_inet_pton_backtrace() {
        expected[3]=".*packets transmitted.*"
        expected[4]="rtt min.*"
        expected[5]="[0-9]+\.[0-9]+[[:space:]]+probe_libc:inet_pton:\([[:xdigit:]]+\)"
-       expected[6]=".*inet_pton[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$"
-       expected[7]="getaddrinfo[[:space:]]\(/usr/lib.*/libc-[0-9]+\.[0-9]+\.so\)$"
+       expected[6]=".*inet_pton[[:space:]]\($libc\)$"
+       expected[7]="getaddrinfo[[:space:]]\($libc\)$"
        expected[8]=".*\(.*/bin/ping.*\)$"
 
        perf trace --no-syscalls -e probe_libc:inet_pton/max-stack=3/ ping -6 -c 1 ::1 2>&1 | grep -v ^$ | while read line ; do
@@ -35,7 +38,7 @@ trace_libc_inet_pton_backtrace() {
 }
 
 skip_if_no_perf_probe && \
-perf probe -q /lib64/libc-*.so inet_pton && \
+perf probe -q $libc inet_pton && \
 trace_libc_inet_pton_backtrace
 err=$?
 rm -f ${file}
index 7f988a9390361fdef00a7eab206f3eba13cf7f83..94250024684a7b890f0308fd4ee0318ef653bc69 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include "event.h"
 #include "tests.h"
index d88511f6072c2429f6c9956b83e3be803e780148..725a196991a88447cf0f80adf5b05bb47ad1f39e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <unistd.h>
index 2acd78555192d1482fabf8bc78a6f26de91006bd..7d3f4bf9534f4efc585ecf1d05ab2e0ae93415e1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/time.h>
 #include <sys/prctl.h>
 #include <errno.h>
index f0881d0dd9c9f60b542e5c727689bd156e245c86..bc4a7344e274255141e54e8ec28f47a0d12e6819 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "evlist.h"
 #include "evsel.h"
 #include "thread_map.h"
index 921412a6a88081ca67ddc51f46e2c533dc31beac..2862b80bc288c0602a612cb5df70e4a3494acc08 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef TESTS_H
 #define TESTS_H
 
index b3423c744f46251ca8966f3d3f32ba970b52773f..dbcb6a19b3751cbcb5d0dee5d81d8fd7d296afea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <sys/types.h>
 #include <unistd.h>
index b9c7f58db6c416f97e941a8ee26dc98bf9987670..b1d1bbafe7ae1ea51d9662514450b0968fb1afd0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "tests.h"
 #include "machine.h"
 #include "thread.h"
index 19b0561fd6f65b13f9c941cdaa7c7cceaa8ba270..a59db7c45a65b2258b90b446d65885fff53e7f6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
index 15cd1cf8c129d74d0499a06a874d82f4085b64af..2bb8cb0039c18468036aba68081097c4578db957 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
index 86cb8868f67f119f8f98f37074f71ec8ba4ec107..f6789fb029d688fa165744a0f9bf264d3791f4ac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/rbtree.h>
 #include <inttypes.h>
index 4b58581a605306c1557036cb24a18598d0711acf..d80655cd18815d1de61b52c143630a5c4e175173 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_TRACE_BEAUTY_H
 #define _PERF_TRACE_BEAUTY_H
 
index b08f21eb6f4df4eec4e5a2986bba4285a94caf8b..5d6a477a64002ef5cef6ef6e169cd439e38b66d9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef EFD_SEMAPHORE
 #define EFD_SEMAPHORE          1
 #endif
index 74613703a14eba783f405a3fe655a5c0645d94e2..f9707f57566c5c6ea454c961553b3ea674de9c4e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <fcntl.h>
 
 #ifndef LOCK_MAND
index bfd3359b09b66b644535a19ccf5500a0df3c4c7a..61850fbc85ff33d75c074e655eaa490dbe48e537 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/futex.h>
 
 #ifndef FUTEX_WAIT_BITSET
index 754558f9009db2743e4d1211d25c0cb45f36ceae..51f1cea406f5c69521778bc5ab363bde7937cb8b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <uapi/linux/mman.h>
 
 static size_t syscall_arg__scnprintf_mmap_prot(char *bf, size_t size,
index 930d8fef2400824dad88750aff7611027ddd3c3f..d929ad7dd97be97b922ecf9d92c35c4b072a5fbe 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
index 1106c8960cc4b2209f3750e08fdf69898a824edd..c064d6aae659707712f2b0c177c41e0bec66e70d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/socket.h>
 
index e359e041dc0e775fb92f032a9873b9953a075923..6aec6178a99dcd8ecd3d01eee8f4969d5d8387bf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 311f09dd718d0c459f4c1201f9a55424eb93b091..2bafd7c995ffffe394880904b78c77ff73a1b6dc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef PERF_FLAG_FD_NO_GROUP
 # define PERF_FLAG_FD_NO_GROUP         (1UL << 0)
 #endif
index b6d419e16dcf072cca23ed13d0f19c33d08f25ae..0313df34283040de8648cdbba73ae5d174354b36 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
 {
        int pid = arg->val;
index 34775295b9b37ae8ddd9976e11c6e7abcf5db9b8..ba5096ae76b60906166df1b2b6ac72f1b85c4a8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sched.h>
 
 /*
index 356441bce27dab5e46219d1f761432538ab3a059..b7097fd5fed9ee72401fe651f5565b6bdb0f0d88 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #ifndef SECCOMP_SET_MODE_STRICT
 #define SECCOMP_SET_MODE_STRICT 0
 #endif
index fde8f2fc65589d54a457cabc8604b7389c5a985b..bde18a53f090945f9edd7ed517762cc4f5a8de7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <signal.h>
 
 static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg)
index 0a5ce818131ca894e6ea7fa6c623484d15d6d6a7..bca26aef4a77a8a72d75841673c35ee568e24e54 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/socket.h>
 
index 7942724adec8b7778371a14f09a6f9e76da78de9..8465281a093de02aa3e7e026e35eeb688634929a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/wait.h>
 
index d0c2007c307bbaf266a8a84d7f054c1d41994c72..63399af3049f824d749c6c4f042f867fa77bc1ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../util.h"
 #include "../string2.h"
 #include "../config.h"
index a12eff75638b39b0f443c48d1cfab903df1c5839..03e1734412b95fec1ab81cb7152cb1bb5e8989ca 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_BROWSER_H_
 #define _PERF_UI_BROWSER_H_ 1
 
index 786fecaf578ef706ecc347279a84ccb3389780b4..8f7f59d1a2b5913c2a3027a89384011dab86c9e5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../../util/util.h"
 #include "../browser.h"
 #include "../helpline.h"
index e2c9390ff4c5244d8b0640844cc5c8bd957c963e..d75492189acb83fb7cfeb2a023cfe540cf017cea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util/cache.h"
 #include "util/debug.h"
 #include "ui/browser.h"
index 13dfb0a0bdeb440776b506fd413be307e716e0bf..628ad5f7eddb6a4295ba9370f987e9194dfe6bed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
index 23d6acb84800e602b78db1b05f599ce4070d010f..ba431777f5590838aded811a70ad1d50ac492198 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_BROWSER_HISTS_H_
 #define _PERF_UI_BROWSER_HISTS_H_ 1
 
index ffa5addf631d95fab3b1abcb8fcd6389aef45aba..e03fa75f108a8b90528c6bb763588619eeb1ab98 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elf.h>
 #include <inttypes.h>
 #include <sys/ttydefaults.h>
index 2d58e4b3eb6ffb295308098350a0997c8c5bea57..0ed7dbb3a373b1f5d72d16758aa1865a7a6fc81c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_MAP_BROWSER_H_
 #define _PERF_UI_MAP_BROWSER_H_ 1
 struct map;
index ad6b6ee3770e436339fa3d68b2c016e1a7e9dfb7..90a32ac69e76c9eeae87b913008874ececb0f366 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elf.h>
 #include <inttypes.h>
 #include <sys/ttydefaults.h>
index 02176193f427a3b466925884930b1b0cc257ec98..fc7a2e105bfdff149d966c526dfa0d23ef082397 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "gtk.h"
 #include "util/debug.h"
 #include "util/annotate.h"
index c24d91221290e0049b409de582dfcf6ce7994ef5..4820e25ac68d9ab9be1bbd0e43117fb4012ef988 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../evlist.h"
 #include "../cache.h"
 #include "../evsel.h"
index 0a9173ff9a61d16e804f27f7e4734b16166f696c..9846ea5c831b6172bbd2818e3403a99453fa91fa 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_GTK_H_
 #define _PERF_GTK_H_ 1
 
index 3388cbd12186ac5848562e0de10faa7afa025982..fbf1ea9ce9a2275cab0470b7daab5e70050e137c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
 
index e24f83957705529bb1e62eda964840f4798fe430..24e1ec201ffd23860101c3a8fb49327fdcc3b813 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../evlist.h"
 #include "../cache.h"
 #include "../evsel.h"
index b656655fbc39e6c5f0cc23659957d8a963c9a107..b6ad8857da78f28ecd4350fc5a6001ee53f9acf4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 
 #include "gtk.h"
index 1d57676f82124d82e18d032e349e879e09a060e8..506e73b3834c0ee493913e9387535e3875f25e72 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "gtk.h"
 #include "../../util/cache.h"
 #include "../../util/debug.h"
index 00b91921edb1ff9fbb25b8b606f533b30b632762..7250d8101c8feec896e9cf8733b798b358b98c27 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../util.h"
 #include "../../util/util.h"
 #include "../../util/debug.h"
index 379039ab00d82d8cb00e6583864761f1e8f84a5a..b3c421429ed440b1eebcdbdefa9c223a74c81920 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index d52d0a1a881b885dccfc6fd3d3aaecf8017f277c..8f775a053ca33ea075d0be319e78f99dbe453c93 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_HELPLINE_H_
 #define _PERF_UI_HELPLINE_H_ 1
 
index ddb2c6fbdf919e8124ffb40eee47c801b43bd6c6..706f6f1e9c7d6524f39e4f98e436935564496bfa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <math.h>
 #include <linux/compiler.h>
@@ -532,7 +533,7 @@ void perf_hpp_list__prepend_sort_field(struct perf_hpp_list *list,
 
 void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
 {
-       list_del(&format->list);
+       list_del_init(&format->list);
 }
 
 void perf_hpp__cancel_cumulate(void)
@@ -606,6 +607,13 @@ next:
 
 static void fmt_free(struct perf_hpp_fmt *fmt)
 {
+       /*
+        * At this point fmt should be completely
+        * unhooked, if not it's a bug.
+        */
+       BUG_ON(!list_empty(&fmt->list));
+       BUG_ON(!list_empty(&fmt->sort_list));
+
        if (fmt->free)
                fmt->free(fmt);
 }
index 65092d576b4e25fb4d8ad7876e6d399492165218..fbfac29077f2d0aa7fff0efcd45becd68db1e9e8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_KEYSYMS_H_
 #define _PERF_KEYSYMS_H_ 1
 
index db816695ad970a3c990e3480787d1ebff9ec2414..c0686cda39a56b34e6a36b8b3251670b212c7709 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_SLANG_H_
 #define _PERF_UI_SLANG_H_ 1
 /*
index ae91c8148edf34234e128336bd1a4cfa72938c42..b5a5df14d7020fc60960ed781bd8ee3173d2578a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include "../cache.h"
 #include "progress.h"
index 717d39d3052b8080ff90af9e6cbb715dbd15f203..594bbe6935ddb0cb0978286a33d37496b179c852 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_PROGRESS_H_
 #define _PERF_UI_PROGRESS_H_ 1
 
index caf1ce6f51527ba5e542caacfb26d06c37829674..44fe824e96cd01ab686c4d7c9ee80ca9a4d1cbd6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <pthread.h>
 #include <dlfcn.h>
 
index 8bdb7a50018128feb120064bdf76e93572696372..de2810ae16be270e4ee4578730147d6f8af91701 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <linux/string.h>
 
index 88f5143a59811521dad080453fc69aab9a55e01f..4ca799aadb4e8c1dc56cae16719c5c7c4940f590 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index c4b99008e2c91d4e2d6fbade5c50ba836c2f3668..236bcb620ae49722286233d55ccbc8fa4af90f79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../cache.h"
 #include "../progress.h"
 #include "../libslang.h"
index d9350a1da48b46bbfaad0170e6ccb60a3f6f135b..d4ac41679721bf5168539bc09fa8d1f55772b016 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <signal.h>
 #include <stdbool.h>
index 18961c7b6ec5dac67b72c8e8891754bf7aacae25..8de06f634c5691d0107b89a9bd47d5182acfbcaf 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_TUI_H_
 #define _PERF_TUI_H_ 1
 
index d96ad7c8325d7c726fa18757d70b9d76f6d9b438..b9794d6185afb5dddecce00015938979e52281dd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../../util/util.h"
 #include <signal.h>
 #include <stdbool.h>
index 4b6fb6c7a542c5c5afadd48c0ebb571c0ad420e0..9b6fdf06e1d2f99052eeac9a5d59e496bf7a5f54 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_H_
 #define _PERF_UI_H_ 1
 
index e3e0a963d03aa3559924af97a33bb67c3f48b275..63bf06e80ab9dbada7d76e581af5969859236c97 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "../debug.h"
 
index 361f08c52d37cba6acf8056cba96f297ceb25515..5e44223b56faa0e2392abb606e26f0acbc1a2ad3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UI_UTIL_H_
 #define _PERF_UI_UTIL_H_ 1
 
index 39f17507578dae0c650dc91335e888d9a907ef4a..3802cee5e1887f5b406324484832305e4a1b29b6 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if [ $# -eq 1 ]  ; then
        OUTPUT=$1
index 4397a8b6e6cd902ac082e0539614ea2c5dd1374a..aa66791b1bfcba473bf665f16da69e37092a63fd 100644 (file)
@@ -606,9 +606,19 @@ static struct arch *arch__find(const char *name)
 int symbol__alloc_hist(struct symbol *sym)
 {
        struct annotation *notes = symbol__annotation(sym);
-       const size_t size = symbol__size(sym);
+       size_t size = symbol__size(sym);
        size_t sizeof_sym_hist;
 
+       /*
+        * Add buffer of one element for zero length symbol.
+        * When sample is taken from first instruction of
+        * zero length symbol, perf still resolves it and
+        * shows symbol name in perf report and allows to
+        * annotate it.
+        */
+       if (size == 0)
+               size = 1;
+
        /* Check for overflow when calculating sizeof_sym_hist */
        if (size > (SIZE_MAX - sizeof(struct sym_hist)) / sizeof(struct sym_hist_entry))
                return -1;
index 9ce575c25fd9bd6bec2c4018836ff40f80c6ab09..f6ba3560de5ea55481703ff9728907ede11f247a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_ANNOTATE_H
 #define __PERF_ANNOTATE_H
 
index 7b3e1d75d80361526474aaa14483824b6b2ef63a..f1451c987eec8e4b96cfb825f48b93dd4c155700 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "block-range.h"
 #include "annotate.h"
 
index a8c841381131563a3e5d21c8113e3f98e15dde79..a5ba719d69fb1f1440a911dfc182ff46cb69aa6b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_BLOCK_RANGE_H
 #define __PERF_BLOCK_RANGE_H
 
index 4a1264c66101bda56833f0151af25e2a41fd9de6..72c107fcbc5a5a5a3264a0f208f13f827e00b891 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bpf-loader.c
  *
index 48863867878bc35413d6bf94e460da4e57976869..5d3aefd6fae7c6704c490599221d19e5fe357b28 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
  * Copyright (C) 2015, Huawei Inc.
index 827f9140f3b8ab8d8d300a0471fa21ca66a27709..29347756b0afbe9767fca0ac3ab3c5c897acbeed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * bpf-prologue.c
  *
index ba564838375f7b50bfc8d057b7c69f42c7b0f5cb..c50c7358009f234a936b2dd209adf721134b3226 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015, He Kuang <hekuang@huawei.com>
  * Copyright (C) 2015, Huawei Inc.
index c1a06fcd7e70b8c4b7fa83613a1773b6c7e57d52..7f8553630c4d9f37d252aa480eed903d25112f80 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * build-id.c
  *
index c94b0dcbfd7418bbc80663af3adae9d9be5461b1..f0c565164a97aa83c35107cd5bb5511f78881001 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_BUILD_ID_H_
 #define PERF_BUILD_ID_H_ 1
 
index ccafcf72b37a84d02b6b5d93e50a58cecdebf7ed..e513366f2ee00df061c3bbbafc206b19d82d2ced 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_UTIL_CLANG_C_H
 #define PERF_UTIL_CLANG_C_H
 
index 9b11e8c8279895909875f2444f044334829af797..a4014d786676cb09cf6c0e0c35c6ddffbc05c2ed 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "clang.h"
 #include "clang-c.h"
 #include "llvm/IR/Function.h"
index 1e974152cac2d3cb0d57156c5d2a9f4c67ed826d..1bfc946e37dcdaf4f3c92c361fca029df6893938 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * llvm C frontend for perf. Support dynamically compile C file
  *
index dd8b0427550dc55586387844b8a6de8db16ec2f1..6ce33e22f23c084a9ceb49fcebe5ac943186204e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_UTIL_CLANG_H
 #define PERF_UTIL_CLANG_H
 
index 0175765c05b923e4cf952d976570baaa02ec4d08..9f2e36ef5072e9e8a690cc53fe0c4bee5e6928db 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_CACHE_H
 #define __PERF_CACHE_H
 
index 510b513e0f01fe96e110b9eab45db527b8c86104..6031933d811c258f0c3d36c09389975985ff2e1c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2009-2011, Frederic Weisbecker <fweisbec@gmail.com>
  *
@@ -65,8 +66,6 @@ static int parse_callchain_mode(const char *value)
                callchain_param.mode = CHAIN_FOLDED;
                return 0;
        }
-
-       pr_err("Invalid callchain mode: %s\n", value);
        return -1;
 }
 
@@ -82,8 +81,6 @@ static int parse_callchain_order(const char *value)
                callchain_param.order_set = true;
                return 0;
        }
-
-       pr_err("Invalid callchain order: %s\n", value);
        return -1;
 }
 
@@ -105,8 +102,6 @@ static int parse_callchain_sort_key(const char *value)
                callchain_param.branch_callstack = 1;
                return 0;
        }
-
-       pr_err("Invalid callchain sort key: %s\n", value);
        return -1;
 }
 
@@ -124,8 +119,6 @@ static int parse_callchain_value(const char *value)
                callchain_param.value = CCVAL_COUNT;
                return 0;
        }
-
-       pr_err("Invalid callchain config key: %s\n", value);
        return -1;
 }
 
@@ -319,12 +312,27 @@ int perf_callchain_config(const char *var, const char *value)
 
                return ret;
        }
-       if (!strcmp(var, "print-type"))
-               return parse_callchain_mode(value);
-       if (!strcmp(var, "order"))
-               return parse_callchain_order(value);
-       if (!strcmp(var, "sort-key"))
-               return parse_callchain_sort_key(value);
+       if (!strcmp(var, "print-type")){
+               int ret;
+               ret = parse_callchain_mode(value);
+               if (ret == -1)
+                       pr_err("Invalid callchain mode: %s\n", value);
+               return ret;
+       }
+       if (!strcmp(var, "order")){
+               int ret;
+               ret = parse_callchain_order(value);
+               if (ret == -1)
+                       pr_err("Invalid callchain order: %s\n", value);
+               return ret;
+       }
+       if (!strcmp(var, "sort-key")){
+               int ret;
+               ret = parse_callchain_sort_key(value);
+               if (ret == -1)
+                       pr_err("Invalid callchain sort key: %s\n", value);
+               return ret;
+       }
        if (!strcmp(var, "threshold")) {
                callchain_param.min_percent = strtod(value, &endptr);
                if (value == endptr) {
@@ -678,6 +686,8 @@ static enum match_result match_chain(struct callchain_cursor_node *node,
 {
        struct symbol *sym = node->sym;
        u64 left, right;
+       struct dso *left_dso = NULL;
+       struct dso *right_dso = NULL;
 
        if (callchain_param.key == CCKEY_SRCLINE) {
                enum match_result match = match_chain_srcline(node, cnode);
@@ -689,12 +699,14 @@ static enum match_result match_chain(struct callchain_cursor_node *node,
        if (cnode->ms.sym && sym && callchain_param.key == CCKEY_FUNCTION) {
                left = cnode->ms.sym->start;
                right = sym->start;
+               left_dso = cnode->ms.map->dso;
+               right_dso = node->map->dso;
        } else {
                left = cnode->ip;
                right = node->ip;
        }
 
-       if (left == right) {
+       if (left == right && left_dso == right_dso) {
                if (node->branch) {
                        cnode->branch_count++;
 
index 1ed6fc61d0a5906fe8e4e9e344c8c9fa9a925735..f967aa47d0a1d090420b1acd2e1814292a29f47f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_CALLCHAIN_H
 #define __PERF_CALLCHAIN_H
 
index 0e77bc9e5f3c3b354b023e5d26efd08ead615104..d9ffc1e6eb3997b6e57202599b0406fa2ce85c9e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "../perf.h"
 #include <subcmd/parse-options.h>
index d91966b97cbd7235f9fd756c50cd41ba7d7fadae..afafc87e920147e1a039e05dd5662c37f76778e3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CGROUP_H__
 #define __CGROUP_H__
 
index 4b4f00df58a8253c46e3e912753f8d2d25c06044..ca0fff6272be4c1dac0dde2a1b1580195b19486b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <sched.h>
 #include "util.h"
index 94a5a7d829d5ba32efe646f9c04729ab363ac593..78216b1015c44117bf5746e2f1fc5eead74670a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_CLOEXEC_H
 #define __PERF_CLOEXEC_H
 
index dbbf89b050a5dd641c384be5f1ceb5adba1b6f13..39e628b8938e632ea84f353986b073280a6d4e89 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/kernel.h>
 #include "cache.h"
 #include "config.h"
index 52122bcc31701fef202cbdb95e5502841def750c..22777b1812eed418072a1fbe429f3dd4190593b8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_COLOR_H
 #define __PERF_COLOR_H
 
index 7bc981b6bf296ae000407a787bc30aaa22fa574b..8808570f8e9c25244bbd5886d4d2afd51ad09cf7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "comm.h"
 #include "util.h"
 #include <errno.h>
index 71c9c39340d4bf52a8b117c0927896501970b357..3e5c438fe85ea54a1e25e63d5d72a079616c2507 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_COMM_H
 #define __PERF_COMM_H
 
index 67fd1bb7c2b75f51309a7af539d5637db24954fe..ecca688a25fb75977c542f6107e8b11f20345c70 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_COMPRESS_H
 #define PERF_COMPRESS_H
 
index bc75596f9e79ed1b5d0b747df40e933e52deb4a0..4b893c622236294b7934db7b88c057c3a41788cd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * config.c
  *
index b6bb11f3f1655d6349812f8d33c1868be54dc8ae..baf82bf227acbadfb1ca547584bd123e121b3f14 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_CONFIG_H
 #define __PERF_CONFIG_H
 
index c4af82ab7808c2049216acad5efb2824fecabb1f..03032b410c291a1404c9fa6228f2320cdd68c1b7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <stdlib.h>
 #include "evsel.h"
index cb45a6aecf9dbc62b4d7850ac806b714f3a423cb..0d1050ccc586bb7970b2e8bc5dd84985c83694d5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_COUNTS_H
 #define __PERF_COUNTS_H
 
index 37b3bb79ee08db66122c30f6ae5af2473f005d7a..1ccbd334206942f7b489041b8418972508162fe9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include <api/fs/fs.h>
 #include "../perf.h"
index 6b8bff87481d090a0e72f7391772bb307d0e1f7c..ed8999d1a64025dcc6262609bfc5d47ab24606b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_CPUMAP_H
 #define __PERF_CPUMAP_H
 
index 4b261c2ec0f10a8e85b68a8a16832ee54ea177b9..ee4c1e8ed54b4d5fbcba32e293c0a30806bfe067 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Sane locale-independent, ASCII ctype.
  *
index 9a3b587f76c196af463030349a0373b98c3d07f3..821674d63c4ed8f208efc1f859a34b374275065a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DATA_CONVERT_BT_H
 #define __DATA_CONVERT_BT_H
 #include "data-convert.h"
index 5314962fe95bbf89b29f6d61eb4bcbac8808b2b5..af90b6076c0616b31351a2d803839c16871ad678 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __DATA_CONVERT_H
 #define __DATA_CONVERT_H
 
index 263f5a906ba5a2bde3d0898a1e19d783920fca47..79192758bdb3de9d232de2f576edc8b0d6bcffde 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <sys/types.h>
index ae510ce16cb1277721bd132438c08311febb7156..80241ba781010d996012674e15a693572daca96f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_DATA_H
 #define __PERF_DATA_H
 
index a5b3777ffee601aa28e358c4f9928fd16088d1c8..dc8b53b6950e3c89c0bdddb825a60d278a4fda7c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* For general debugging purposes */
 
 #include "../perf.h"
index c818bdb1c1aba8dc8661182281e207e1c95d5913..77445dfc5c7d2657445942807338f993b8ec2d21 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* For debugging general purposes */
 #ifndef __PERF_DEBUG_H
 #define __PERF_DEBUG_H
index cb66d334f5328690072193b5a902df50076786dc..e4c48675605319db28978d3827874416ad225eac 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <stdio.h>
 #include <string.h>
index a981c1f968fe9736e0cc6f013beeda7132d70225..f936c8eabe5d1dff4a5671a65dc6754f1c05fda0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_DEMANGLE_JAVA
 #define __PERF_DEMANGLE_JAVA 1
 /*
index f9dafa888c06372e20de06f7c05ea1502eaeb2ad..423afbbd386bb071fd4a8eee61cb2e3e57da3f08 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <string.h>
 #include "util.h"
 #include "debug.h"
index 7b41ead7e0ddfe448bdd5e1607b2fb790ded26c5..2fca618b1aa599bd90251f58e47ffb56668b8522 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_DEMANGLE_RUST
 #define __PERF_DEMANGLE_RUST 1
 
index b9e087fb8247983f0f3aed7e984dc5eb2615de7c..00c98c968cb15f5d41dbec59295d231d73207ac0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <asm/bug.h>
 #include <linux/kernel.h>
 #include <sys/time.h>
index f886141678ebaf816290fc4ca274e6ef10d6525b..926ff2e7f668d18dc734c03bb3e1b8296b848dcd 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_DSO
 #define __PERF_DSO
 
index ffbdb19f05d01d2a2204551867cd9ef15da753aa..10988d3de7cec8940f3e4904cdb537a6f32cc690 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include "dump-insn.h"
 
index 90fb115981cf5d3900d4eb1dc5202c2e51bf659c..0e06280a88602bb28d4596fbce45314e06aa4236 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_DUMP_INSN_H
 #define __PERF_DUMP_INSN_H 1
 
index c708395b3cb661933ed0357dfafd3528614870f7..db55eddce8cd574e2f1ac9b2a9252d74488c4fef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * dwarf-regs.c : Mapping of DWARF debug register numbers into register names.
  *
index 9e21538c42ae96747b671e4f27a9f73ff83dc6ec..6276b340f893e9afd7eed80c71cdd5f1987e8f96 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "cpumap.h"
 #include "env.h"
 #include "util.h"
index b164dfd2dcbf591c5749d78146d2ff0b8493e5e1..1eb35b190b3423e44ef34797c7fa5097d719f956 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_ENV_H
 #define __PERF_ENV_H
 
index 1c905ba3641b6477d20317ef36bde6214baf7941..fc690fecbfd66509083eeb1527ea7c00bf7c1777 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
index ee7bcc898d3531356bedfb637c23266ab6f07ea5..5524ee69279c21d16d06d3dafb9d33d087045219 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_RECORD_H
 #define __PERF_RECORD_H
 
index bf2c4936e35fca513667b07bc67b99b0f96a007d..c1750a400bb768edcd3f802b3367e85ae10032eb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_EVLIST_H
 #define __PERF_EVLIST_H 1
 
index 4bb89373eb52893e7a3c7206da85af1e72afdfc3..0dccdb89572cdb455724a6a48a86d96821fc53e2 100644 (file)
@@ -271,12 +271,17 @@ struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
        return evsel;
 }
 
+static bool perf_event_can_profile_kernel(void)
+{
+       return geteuid() == 0 || perf_event_paranoid() == -1;
+}
+
 struct perf_evsel *perf_evsel__new_cycles(bool precise)
 {
        struct perf_event_attr attr = {
                .type   = PERF_TYPE_HARDWARE,
                .config = PERF_COUNT_HW_CPU_CYCLES,
-               .exclude_kernel = geteuid() != 0,
+               .exclude_kernel = !perf_event_can_profile_kernel(),
        };
        struct perf_evsel *evsel;
 
index dd2c4b5112a561b846053719262ce967cd383e16..b4df79d723297f4fbe2910efe26528bc1f0c0d06 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_EVSEL_H
 #define __PERF_EVSEL_H 1
 
index 583f3a602506f29f198d7153b8ad8ee8073a6fd9..1fd7c2e46db265ddb39440fea5c6c0b6c37e891c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdbool.h>
index 400ef9eab00a08f50afc7a08fd191d0e44fe3e7b..046160831f905229b8c30163622fbceec30aff73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PARSE_CTX_H
 #define PARSE_CTX_H 1
 
index 95ef1cffc0562ffc78b617f7d1a1cde7bc0abc36..d7823e3508fcb2b35e28f6b4cbddca71f5a85c31 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 static int find_vdso_map(void **start, void **end)
 {
        FILE *maps;
index 2424bd9862a309381ad4748f674114f4a31b2678..de322d51c7fe2c2a6e821d8e10c9dc4a7f264587 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __GENELF_H__
 #define __GENELF_H__
 
index 0ac2037c970c9c5f1b62b554809fb9a4f4dd6e00..9bbcec4e3365e9783540867da6a5c8309e947de4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 echo "/* Automatically generated by $0 */
 struct cmdname_help
index 116debe7a9957055bdfb3cd55b1b3ac6907a79ea..f36c7e31780a9b58a92ce47850f4c64635d92511 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GROUP_H
 #define GROUP_H 1
 
index 605bbd5404fb36e7fc8d61ee7d99e66f1b65ba7a..ba0cea8fef724f26499f8e14c74484d8bb9601a8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include "util.h"
index f7a16ee527b8ae7bcae8f0b17f2e49237824fa84..29ccbfdf87245136c227da56ca92f8f64650ef71 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_HEADER_H
 #define __PERF_HEADER_H
 
index 15b95300d7f37e24775c7e40edf0a61422b249e7..4f07a5ba5030b96438ee66fd357507d9fa2464b1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "cache.h"
 #include "config.h"
 #include <poll.h>
index e60d8d8ea4c23084240d0ca156205b102d8e789c..097473600d943fc558140e3fde742636a2894d1d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "build-id.h"
 #include "hist.h"
index e60dda26a9207c08c0dd399e6d04588fb7302a2a..f6630cb95effc353deba329a77dc6a87e0f6279f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_HIST_H
 #define __PERF_HIST_H
 
index ed538942523d6a7a2840b1de76d123e4984529bb..3aff4cf44944923d24649a5f6e28f9e4706badc0 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* stub */
index acffd5e4d1d4eaab64a3decdf5b06c38c659565f..2270481c7e0aa98f13479fd26df35da18223eb72 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef PERF_CPUFEATURE_H
 #define PERF_CPUFEATURE_H
index afe38199e92242b32f7db0fdc463b45db649b50b..e9876be63dbf0f71a652148c76fbf650d235d111 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef PERF_DWARF2_H
 #define PERF_DWARF2_H
index d0f72b8fcc355b550fa9bb4091fc6fba27644ef3..6a6f4b990547ecebac9b64420ec4aed1e9dd970c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_ASM_UACCESS_H_
 #define _PERF_ASM_UACCESS_H_
 
index 43bfd8da7919a68e41ab98032221edad25f1cd9c..7d99a084e82d7c1047d0911365cb3828e6c3ab60 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_DWARF_REGS_H_
 #define _PERF_DWARF_REGS_H_
 
index 06387cffe125822017a70a055fa2ae4698ec7daa..f01d48a8d707987de71244cec8df09353c592129 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef PERF_LINUX_LINKAGE_H_
 #define PERF_LINUX_LINKAGE_H_
index 54e961659514c7f94faee4371c6d71bd231e55c5..ddd5c4c21129b2cf360031a80ef46aedc7626801 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 # gen-insn-attr-x86.awk: Instruction attribute table generator
 # Written by Masami Hiramatsu <mhiramat@redhat.com>
 #
index 020b9ca1b47ed8c2d4f0db22a4c6918b5ca5e7b6..85bab8735fa9b9e0d4fc35a65752de175a99c243 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_INTLIST_H
 #define __PERF_INTLIST_H
 
index 3f42ee4d2a0b8bd3ee0924c28ab2ce1cd17637ea..c2582fa9fe21bcca2125b62289c1f0d40e02d991 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __JIT_H__
 #define __JIT_H__
 
index 9084930e17571f890710a63dbdd885b9ee65a2aa..36483db032e865728be003bfb2abea97c93b9114 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <errno.h>
index d01e73592f6e34347f0c26531b58aa6ce1d57d52..7b1f06567521708158b3daaad9a9d5d32ed6a4c2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_KVM_STAT_H
 #define __PERF_KVM_STAT_H
 
index f616e4f65b6744813bc076c13dd1fd51042ad9a7..a217ecf0359df133f113eed281d8db03e0b32962 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "levenshtein.h"
 #include <errno.h>
 #include <stdlib.h>
index b0fcb6d8a881d88b021cfcd7e1a08805b006ed3d..34ca173c557d9e4191aa65cfbc9ea34b2af3abcc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_LEVENSHTEIN_H
 #define __PERF_LEVENSHTEIN_H
 
index 6559bc586643de851830edbdc195772709f8e083..66756e6be111fad47b0290da26790bc4f260d5bb 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file setups defines to compile arch specific binary from the
  * generic one.
index 957ffff724286ab60cbfe337514cb1b2a1b9d4b4..c5e568188e199ac72001f28c20652800aaa8bddd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * This file setups defines to compile arch specific binary from the
  * generic one.
index 209b0c82eff4660ad0612be724786fb73a0881e2..4952b429caa7384e8ff25d0e580e7656d20c6e6d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
  * Copyright (C) 2015, Huawei Inc.
index c87a2a92a88fac470fa57e2021f762b0bd8375f0..d3ad8deb5db4d359e28d8cec4794fe78ee34bf15 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015, Wang Nan <wangnan0@huawei.com>
  * Copyright (C) 2015, Huawei Inc.
index 4ca7c5c6cdcd0a9e2aeeefad5cd08c9fe9020c8f..07498eaddc0836c7339155eb4e0439e3044047ea 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <lzma.h>
 #include <stdio.h>
index df709363ef6902793376fee70027c41c04d06f7a..bd5d5b5e2218c89e9ccc8cc216db41f8a88044d7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
index 3cdb1340f9170ad388e827b218fae3cd541502fc..d551aa80a59bab2a3982e4268d005b173948a540 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_MACHINE_H
 #define __PERF_MACHINE_H
 
index bdaa0a4edc17e344bdcae3a08dade7b276a6f5ee..4e7bd27501224a99bd80c6d95d5c676382451075 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "symbol.h"
 #include <errno.h>
 #include <inttypes.h>
index 73aacf7a7dc4b0772f4021760d21b6efca12c327..1fb9b8589adc7537c74cd6422ea38c93649dc000 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_MAP_H
 #define __PERF_MAP_H
 
index 28afe5fa84d613641954515ef89ed29441ec0cd4..93f74d8d3cdd96c97ea22354e9d38abfa518476e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
index 40f72ee4f42a25b1aa3a1a512512ac11989c67c5..a889ec2fa9f537206f0d4bc33ca4d8bc15ed8685 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_MEM_EVENTS_H
 #define __PERF_MEM_EVENTS_H
 
index 55f7faa8d9ec0696476c085adf96f20431a77350..c1317e4983bcf58908a5c371a1861f1f00dc34cf 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <byteswap.h>
 #include "memswap.h"
 #include <linux/types.h>
index 7d1b1c34bb570265715774f8b09e152449f4decf..1e29ff903ca92579f9417a497998b64597aa67e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_MEMSWAP_H_
 #define PERF_MEMSWAP_H_
 
index 4de398cfb577177af2a2bff7a4212a5f569b1ee5..8e09fd2d842f492c9b47342deaab725ccfcdf01e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <linux/list.h>
index e11468a9a6e40883f6d0450a64acb9cb4ce6abac..96e5292d88e2584ba0d78abd3b23a3f3b5237073 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __ORDERED_EVENTS_H
 #define __ORDERED_EVENTS_H
 
index e71fb5f31e84db54672dede30c058eb8fc87129c..bd779d9f4d1eab5aae77814117fdd8ca7ea1220c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "util/util.h"
 #include "util/debug.h"
index 6086fd90eb23a3c2454f0d7db8c7cd0509b0de64..11d1722733f24cabec7960d6b271cc8f1ef95071 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_PARSE_BRANCH_OPTIONS_H
 #define _PERF_PARSE_BRANCH_OPTIONS_H 1
 #include <stdint.h>
index f6257fb4f08ceedde23f790b1aae9255f9565d13..56694e3409ea3552911541d2438d527c1c641b1f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/hw_breakpoint.h>
 #include <linux/err.h>
 #include <dirent.h>
@@ -309,10 +310,11 @@ static char *get_config_name(struct list_head *head_terms)
 static struct perf_evsel *
 __add_event(struct list_head *list, int *idx,
            struct perf_event_attr *attr,
-           char *name, struct cpu_map *cpus,
+           char *name, struct perf_pmu *pmu,
            struct list_head *config_terms, bool auto_merge_stats)
 {
        struct perf_evsel *evsel;
+       struct cpu_map *cpus = pmu ? pmu->cpus : NULL;
 
        event_attr_init(attr);
 
@@ -323,7 +325,7 @@ __add_event(struct list_head *list, int *idx,
        (*idx)++;
        evsel->cpus        = cpu_map__get(cpus);
        evsel->own_cpus    = cpu_map__get(cpus);
-       evsel->system_wide = !!cpus;
+       evsel->system_wide = pmu ? pmu->is_uncore : false;
        evsel->auto_merge_stats = auto_merge_stats;
 
        if (name)
@@ -1233,7 +1235,7 @@ static int __parse_events_add_pmu(struct parse_events_state *parse_state,
 
        if (!head_config) {
                attr.type = pmu->type;
-               evsel = __add_event(list, &parse_state->idx, &attr, NULL, pmu->cpus, NULL, auto_merge_stats);
+               evsel = __add_event(list, &parse_state->idx, &attr, NULL, pmu, NULL, auto_merge_stats);
                return evsel ? 0 : -ENOMEM;
        }
 
@@ -1254,7 +1256,7 @@ static int __parse_events_add_pmu(struct parse_events_state *parse_state,
                return -EINVAL;
 
        evsel = __add_event(list, &parse_state->idx, &attr,
-                           get_config_name(head_config), pmu->cpus,
+                           get_config_name(head_config), pmu,
                            &config_terms, auto_merge_stats);
        if (evsel) {
                evsel->unit = info.unit;
index 635135125111231c9f61e2971133c7f4a188eeee..eed50b54bab3293541ac245186f1d1f00164b478 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_PARSE_EVENTS_H
 #define __PERF_PARSE_EVENTS_H
 /*
index c42edeac451fc809c2581f492cdc2e1741774bf7..6680e4fb79672c4aaa117554896005d5f4d45018 100644 (file)
@@ -8,6 +8,9 @@
 
 %{
 #include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include "../perf.h"
 #include "parse-events.h"
 #include "parse-events-bison.h"
@@ -53,9 +56,8 @@ static int str(yyscan_t scanner, int token)
        return token;
 }
 
-static bool isbpf(yyscan_t scanner)
+static bool isbpf_suffix(char *text)
 {
-       char *text = parse_events_get_text(scanner);
        int len = strlen(text);
 
        if (len < 2)
@@ -68,6 +70,17 @@ static bool isbpf(yyscan_t scanner)
        return false;
 }
 
+static bool isbpf(yyscan_t scanner)
+{
+       char *text = parse_events_get_text(scanner);
+       struct stat st;
+
+       if (!isbpf_suffix(text))
+               return false;
+
+       return stat(text, &st) == 0;
+}
+
 /*
  * This function is called when the parser gets two kind of input:
  *
@@ -141,6 +154,10 @@ do {                                                       \
        yycolumn += yyleng;                             \
 } while (0);
 
+#define USER_REJECT            \
+       yycolumn -= yyleng;     \
+       REJECT
+
 %}
 
 %x mem
@@ -322,8 +339,8 @@ r{num_raw_hex}              { return raw(yyscanner); }
 {num_hex}              { return value(yyscanner, 16); }
 
 {modifier_event}       { return str(yyscanner, PE_MODIFIER_EVENT); }
-{bpf_object}           { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_OBJECT); }
-{bpf_source}           { if (!isbpf(yyscanner)) REJECT; return str(yyscanner, PE_BPF_SOURCE); }
+{bpf_object}           { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); }
+{bpf_source}           { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
 {name}                 { return pmu_str_check(yyscanner); }
 "/"                    { BEGIN(config); return '/'; }
 -                      { return '-'; }
index 646ecf736aadb78b8b747065a867a24f90e740b8..e6599e290f467cfd9db8cc8d3126c4f4be355c8e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "perf.h"
 #include "util/util.h"
 #include "util/debug.h"
index 7d762b188007fbca9cecd36417c40d1f7379060f..cdefb1acf6be18a78b649cf89afc2b5cf7c0a580 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_PARSE_REGS_OPTIONS_H
 #define _PERF_PARSE_REGS_OPTIONS_H 1
 struct option;
index 50ec3bc87a60442570d6e5a5d27acffc4e06ba26..933f5c6bffb453b412271872cd8d4ed90de3ef82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * I'm tired of doing "vsnprintf()" etc just to open a
  * file, so here's a "return static buffer with printf"
index 9a276a58e3c2c8a789e43a24910596597048914f..14a254ada7eb47df22ea52fcc910e3896bb1090c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_PATH_H
 #define _PERF_PATH_H
 
index d55092964da2f3fec32b61f6ef7906093d0945fe..4f3aa8d99ef4d26190382fdc306cce32e0e2a658 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * perf_hooks.c
  *
index 838d5797bc1ef4fdb1df0390d2db7d2a54070ad3..27fbec62d4fe91a7964f10c5864d6e373921b793 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_UTIL_PERF_HOOKS_H
 #define PERF_UTIL_PERF_HOOKS_H
 
index b2ae039eff85c4c7166fecaa713704edf952956c..2acfcc527caca619e53f15ad53742c0a3869d088 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include "perf_regs.h"
 #include "event.h"
index 32b37d19dcc34b4bffffcdb0f755d4ea14cab55f..c9319f8d17a6accc7267fedf6abb12ac99c873b2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_REGS_H
 #define __PERF_REGS_H
 
index ac16a9db1fb566ca14d272e33bc34e5166ea2b81..b10b35a6313819f1ff560e1c1b9e67b4111fb796 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/list.h>
 #include <linux/compiler.h>
 #include <sys/types.h>
@@ -470,17 +471,36 @@ static void pmu_read_sysfs(void)
        closedir(dir);
 }
 
+static struct cpu_map *__pmu_cpumask(const char *path)
+{
+       FILE *file;
+       struct cpu_map *cpus;
+
+       file = fopen(path, "r");
+       if (!file)
+               return NULL;
+
+       cpus = cpu_map__read(file);
+       fclose(file);
+       return cpus;
+}
+
+/*
+ * Uncore PMUs have a "cpumask" file under sysfs. CPU PMUs (e.g. on arm/arm64)
+ * may have a "cpus" file.
+ */
+#define CPUS_TEMPLATE_UNCORE   "%s/bus/event_source/devices/%s/cpumask"
+#define CPUS_TEMPLATE_CPU      "%s/bus/event_source/devices/%s/cpus"
+
 static struct cpu_map *pmu_cpumask(const char *name)
 {
-       struct stat st;
        char path[PATH_MAX];
-       FILE *file;
        struct cpu_map *cpus;
        const char *sysfs = sysfs__mountpoint();
        const char *templates[] = {
-                "%s/bus/event_source/devices/%s/cpumask",
-                "%s/bus/event_source/devices/%s/cpus",
-                NULL
+               CPUS_TEMPLATE_UNCORE,
+               CPUS_TEMPLATE_CPU,
+               NULL
        };
        const char **template;
 
@@ -489,20 +509,25 @@ static struct cpu_map *pmu_cpumask(const char *name)
 
        for (template = templates; *template; template++) {
                snprintf(path, PATH_MAX, *template, sysfs, name);
-               if (stat(path, &st) == 0)
-                       break;
+               cpus = __pmu_cpumask(path);
+               if (cpus)
+                       return cpus;
        }
 
-       if (!*template)
-               return NULL;
+       return NULL;
+}
 
-       file = fopen(path, "r");
-       if (!file)
-               return NULL;
+static bool pmu_is_uncore(const char *name)
+{
+       char path[PATH_MAX];
+       struct cpu_map *cpus;
+       const char *sysfs = sysfs__mountpoint();
 
-       cpus = cpu_map__read(file);
-       fclose(file);
-       return cpus;
+       snprintf(path, PATH_MAX, CPUS_TEMPLATE_UNCORE, sysfs, name);
+       cpus = __pmu_cpumask(path);
+       cpu_map__put(cpus);
+
+       return !!cpus;
 }
 
 /*
@@ -617,6 +642,8 @@ static struct perf_pmu *pmu_lookup(const char *name)
 
        pmu->cpus = pmu_cpumask(name);
 
+       pmu->is_uncore = pmu_is_uncore(name);
+
        INIT_LIST_HEAD(&pmu->format);
        INIT_LIST_HEAD(&pmu->aliases);
        list_splice(&format, &pmu->format);
index 389e9729331f45c464e74b2a20538aabb6f0bb6d..eca99435f4a0b98f23479e4209e97e6a1cc3f05f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PMU_H
 #define __PMU_H
 
@@ -22,6 +23,7 @@ struct perf_pmu {
        char *name;
        __u32 type;
        bool selectable;
+       bool is_uncore;
        struct perf_event_attr *default_config;
        struct cpu_map *cpus;
        struct list_head format;  /* HEAD struct perf_pmu_format -> list */
index e908177b997624e0ee2b45be5c3dffebbbea331c..779e35c9e566f1386b3a294519c2dc831f3f45a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "print_binary.h"
 #include <linux/log2.h>
 #include "sane_ctype.h"
index da0427263d2d62a4eea5204b9034cca3811fe0a7..2be3075e2b05a37c172d5585ba7b010e0c6e6fc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_PRINT_BINARY_H
 #define PERF_PRINT_BINARY_H
 
index 078681d12168710a401f5c079b7886ac611b08a5..45b14f0205587e376c57f4fa8e7e02fcbb779736 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PROBE_EVENT_H
 #define _PROBE_EVENT_H
 
index 2ca4163abafeb77867a9f778e5a74f6a0599a195..63f29b1d22c18c3274b9446a73de360b486c5dde 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PROBE_FILE_H
 #define __PROBE_FILE_H
 
index 27f06155101298e1e5ab878d75b9944745c22bf4..16252980ff00b1a90ecd100c904dd23b3049c27a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PROBE_FINDER_H
 #define _PROBE_FINDER_H
 
index b234a6e3d0d4f378ff2fd4899159bd3190956a99..797fe1ae2d2e4e1d61ba679814b30662fbf6f096 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Simple pointer stack
  *
index ded7f2e36624a9ff2d6ebe49c92aed2018c097dc..8729b8be061d6ecf796a5349ad602d569b6db6ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_PSTACK_
 #define _PERF_PSTACK_
 
index c129e99114aedfcead61505802ec50aef0e22cd2..8e49d9cafcfc00c515bd9fe3185490b97c33b12e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <Python.h>
 #include <structmember.h>
 #include <inttypes.h>
index 1ba8920151d8919e3d8b7b2a1236d7a82d27a939..22eaa201aa275a6f2362ecb002755f4badbee3bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <stdlib.h>
 #include "strbuf.h"
index 055ca45bed992088cbe078c39ff42110b0cea690..274bf26d35112917fb16d13394f1b065d5feb7f7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_QUOTE_H
 #define __PERF_QUOTE_H
 
index 808cc45611fe9015ef113ca7484625d9fb3b3ba0..7d8972b33f6bcefe81542a9a4c04388f52eb3b67 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_RESORT_RB_H_
 #define _PERF_RESORT_RB_H_
 /*
index ff9913b994c26126203e303f694021f9d24e739a..4c8638a2257119617e50c8975fd1aa22fa7127f1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_RBLIST_H
 #define __PERF_RBLIST_H
 
index d91bdf5a1aa45985040d6321c33ef56d7dcb3f18..1e97937b03a933890e7101ecad982c99e564836c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "evlist.h"
 #include "evsel.h"
 #include "cpumap.h"
index 4308c22c22ad14fc6674a10890da994800b62b97..c2b42ff9ff32449b81e68b39b9b3c46cb8a8e8ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_SANE_CTYPE_H
 #define _PERF_SANE_CTYPE_H
 
index a7ebd9fe8e40ee56f79a108c247d528571d8ff64..da55081aefc693043edc219c5ed96413e8c74857 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <linux/kernel.h>
@@ -374,6 +375,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
                tool->mmap2 = process_event_stub;
        if (tool->comm == NULL)
                tool->comm = process_event_stub;
+       if (tool->namespaces == NULL)
+               tool->namespaces = process_event_stub;
        if (tool->fork == NULL)
                tool->fork = process_event_stub;
        if (tool->exit == NULL)
index 47b5e7dbcb18d420ea526508d0fbe0e1e3da7234..41caa098ed15534f7b8100025e9eac533ad24c0e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SESSION_H
 #define __PERF_SESSION_H
 
index eb3ab902a1c0869ad0b3431a82ba7bed49ec914d..84a33f1e9ec9222c8a7a7030be59e7b96427ce26 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <regex.h>
index f36dc4980a6c78f3bc5a005d164f3d1a637053f3..b2b55e5149a7a79432dbda09ae797280193614ad 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SORT_H
 #define __PERF_SORT_H
 #include "../builtin.h"
index ed8e8d2de9427a111cb417a204979298a6aa71cb..4105682afc7aa393b7d3a4714b65074fafd5c616 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
index 7b52ba88676ef6e90b692946fe243a115d261c27..8e73f607dfa315d4a1808285adf7a759501b1f23 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_SRCLINE_H
 #define PERF_SRCLINE_H
 
index a04cf56d3517fb3955e6d2a7bc3efa3132d818fc..37363869c9a1b52db7d1a59e977987139925bb46 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include "evsel.h"
 #include "stat.h"
index 35e9848734d6108e00104de58d35e6773a2ccb95..c9bae5fb8b479434edb3c0d1436373e79fe83be7 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
 #include <math.h>
index eacaf958e19d2a2750af0ddc5de9f2fa993a3d86..96326b1f944381b3e69da77d42149f667e02787a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_STATS_H
 #define __PERF_STATS_H
 
index aafe908b82b5720b4487c242370ed326ec520e2c..3d1cf5bf7f184b9c18a0fbb59768510e3620cc6f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "debug.h"
 #include "util.h"
 #include <linux/kernel.h>
index 802d743378afa5a33e7402930d3a3c66c846b80c..ea94d862898020aab30bf36924db5035709cdf64 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_STRBUF_H
 #define __PERF_STRBUF_H
 
index 4dc0af669a3009f72726ff124913057413e1758f..7f3253d44afdef572cb2505bd2d60fdedfa71101 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "string2.h"
 #include "strfilter.h"
index cff5eda88728b20e9ebae22d7476ed14f367869c..e0c25a40f7967463be435af4a954d46fd88c2f5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_STRFILTER_H
 #define __PERF_STRFILTER_H
 /* General purpose glob matching filter */
index cca53b693a48d852450c00bf7ef6f90285d7ce4d..aaa08ee8c71715ef57614536853dcd824f70ce49 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "string2.h"
 #include <linux/kernel.h>
 #include <linux/string.h>
index 2f619681bd6a7084f5620ea077e8e69d1d659893..ee14ca5451ab2739f4dac06c430b4ce35ecce6ee 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_STRING_H
 #define PERF_STRING_H
 
index 19207e50fce50a0bf7d01f11bbc87b6b64ecba6a..d58f1e08b170b43c5ddfe3e77fdac13f6181d20f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_STRLIST_H
 #define __PERF_STRLIST_H
 
index 946fdf2db97cafc39b836cc784ff55caa9b7e312..e55338d5c3bda69596077567340a41050d62750e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SVGHELPER_H
 #define __PERF_SVGHELPER_H
 
index 5c39f420111e5f679fa4a486383174d9c10d68b5..2de770511e705dbc8caa7a69f1398548f102720d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <fcntl.h>
 #include <stdio.h>
 #include <errno.h>
@@ -810,12 +811,6 @@ static u64 ref_reloc(struct kmap *kmap)
 void __weak arch__sym_update(struct symbol *s __maybe_unused,
                GElf_Sym *sym __maybe_unused) { }
 
-void __weak arch__adjust_sym_map_offset(GElf_Sym *sym, GElf_Shdr *shdr,
-                                      struct map *map __maybe_unused)
-{
-       sym->st_value -= shdr->sh_addr - shdr->sh_offset;
-}
-
 int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
                  struct symsrc *runtime_ss, int kmodule)
 {
@@ -996,7 +991,7 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
 
                        /* Adjust symbol to map to file offset */
                        if (adjust_kernel_syms)
-                               arch__adjust_sym_map_offset(&sym, &shdr, map);
+                               sym.st_value -= shdr.sh_addr - shdr.sh_offset;
 
                        if (strcmp(section_name,
                                   (curr_dso->short_name +
index 1a5aa35b0100d0a47bc5f904b5809dec3c033cbb..ff48d0d49584cdc10969f20d892784b0a11a7e01 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "symbol.h"
 #include "util.h"
 
index 5909ee4c7ade439c4f060724fad05927d2eff34d..6492ef38b0907c3e1b3788204fbd2066d5b4d596 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <errno.h>
 #include <stdlib.h>
index 2bd6a1f01a1cc5b5bb15ee0aae59ae921ebe2a86..6352022593c6b7697f3dc24221961fc8caa516af 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SYMBOL
 #define __PERF_SYMBOL 1
 
@@ -344,9 +345,6 @@ int setup_intlist(struct intlist **list, const char *list_str,
 #ifdef HAVE_LIBELF_SUPPORT
 bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
 void arch__sym_update(struct symbol *s, GElf_Sym *sym);
-void arch__adjust_sym_map_offset(GElf_Sym *sym,
-                                GElf_Shdr *shdr __maybe_unused,
-                                struct map *map __maybe_unused);
 #endif
 
 #define SYMBOL_A 0
index 63694e174e5c3c2ff9828fa14577f524cdb70f91..6dd2cb88ccbeab83286bf709c9a0146b0aa42bf3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <elf.h>
 #include <inttypes.h>
 #include <stdio.h>
index 19e5db90394c2bf03ec1c08810c270cb965f65c8..6eea7cff3d4e96473644fcd7c034a8a32abfcb10 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "syscalltbl.h"
 #include <stdlib.h>
+#include <linux/compiler.h>
 
 #ifdef HAVE_SYSCALL_TABLE
-#include <linux/compiler.h>
 #include <string.h>
 #include "string2.h"
 #include "util.h"
index e9fb8786da7c83213dc321c18054fe7db9777af8..c8e7e9ce0f01e12e2b0b8825cca5c83c7d901662 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_SYSCALLTBL_H
 #define __PERF_SYSCALLTBL_H
 
index 7381b1ca4041f2975f5d4e7e26f25809601704b2..446aa7a56f25f69ff8131cea57d973f58e20f708 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_TARGET_H
 #define _PERF_TARGET_H
 
index 8f254a74d97deed4abc357d2d527ff1453a7c4f1..e7aa82c06c7662faf56468714e8823b54c3c40f5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "term.h"
 #include <stdlib.h>
 #include <termios.h>
index 2c06a61846a107d7c7175018312fb688916e717c..607b170a9017a4f7e58bf4c325a5f67d75c48d87 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_TERM_H
 #define __PERF_TERM_H
 
index aee9a42102bac264e89e3e698431975006c9681c..1dbcd3c8dee045787a1f53676888e5d3a5efcf79 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../perf.h"
 #include <errno.h>
 #include <stdlib.h>
index cb1a5dd5c2b9b61db889538ba9f60eed158082e4..fdcea7c0cac1d880a13c57896eb8cd907b8a397f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_THREAD_H
 #define __PERF_THREAD_H
 
index 63ead7b06324c1615ceacb9c421b7f47129f3f5e..be0d5a736deadac66655cc8349b4dda2ebef45f8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <dirent.h>
 #include <errno.h>
 #include <limits.h>
index bd34d7a0b9fa9fbcd92224e3f83208f7479cac09..f15803985435963e0da96757b59617dc61ca4430 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_THREAD_MAP_H
 #define __PERF_THREAD_MAP_H
 
index 5b5d0214debdcb99c563c84abe4d98746ff6a518..81927d0274176aa8ba42310e7005e9a11cb1d6a8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <string.h>
 #include <sys/time.h>
index 8656be08513b178ab64e4c716ca2d4f0a9378900..15b475c50ccf7698307d0d4a4446c2bf358f5f6f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TIME_UTILS_H_
 #define _TIME_UTILS_H_
 
index d549e50db397933a5e8f48653cdbe3e09a212713..2532b558099b79a29bf222e850d08fa45a145c48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_TOOL_H
 #define __PERF_TOOL_H
 
index 9bdfb78a9a35d2b27a3c38bf5234af0af1f7985d..506150a75bd008d0a1cbf0cf95fa2255e8b74a48 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_TOP_H
 #define __PERF_TOP_H 1
 
index c330780674fcffc270563cebf338e175478b849c..16a776371d03228cf68c6fdcd30d5acd7928cf7e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 
 #include <stdio.h>
 #include <unistd.h>
index 1fbc044f9eb039c84d5fe76416575c2f7753a43b..dcbdb53dc702a664a8e70da5f7856e4e4243ec17 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_UTIL_TRACE_EVENT_H
 #define _PERF_UTIL_TRACE_EVENT_H
 
index e97d7016d771c37ec2bbbab8634c579b0ee64299..370138e7e35ca3f4046516dfe8fc2c304fa7abc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRIGGER_H_
 #define __TRIGGER_H_ 1
 
index 1b741646eed00b7754ba0a618b4fb57b8c87d9ac..bfa782421cbdf93087aba761fccf0120bccb036f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/types.h>
 
index d5b11e2b85e050427ad80958fb747e3b7c4c5e61..e0c3af34ac8dfc78ff21a7e594e5c30797ab6274 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_TSC_H
 #define __PERF_TSC_H
 
index 4767ec2c5ef63cefbb03464fd244002ae6f5d54e..a46762aec4c9f055f704918c6edd0c766e919abd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "units.h"
 #include <inttypes.h>
 #include <limits.h>
index f02c87317150e0d5f50296b33bb29fd96b6b9edb..99263b6a23f7bbd99ed8686eacf034f447627d10 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERF_UNIT_H
 #define PERF_UNIT_H
 
index 7755a5e0fe5eb290c41502bf22725cce8a0b6935..1e9c974faf67f0ef766a3c502e1f2a143d9e485f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <elfutils/libdw.h>
 #include <elfutils/libdwfl.h>
index 4a2b269a7b3be24e766d892d475075984639b4cc..0cbd2650e280e52635f7e0d9058467d633239c5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_UNWIND_LIBDW_H
 #define __PERF_UNWIND_LIBDW_H
 
index 672c2ada9357a25054b4b1ba7eeec643505984e2..7a42f703e858b7830bcfde8dd69d0bbe71764dd3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Post mortem Dwarf CFI based unwinding on top of regs and stack dumps.
  *
index 8aef572d08890b3e051c604a83e99d31abf53778..647a1e6b4c7b723ea06282e8547090e792931933 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "unwind.h"
 #include "thread.h"
 #include "session.h"
index bfbdcc6198c9d85c09f9859866ac7974e8dd61c7..8a44a1569a21bc2a20eb0c96c70112b3f818ec02 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __UNWIND_H
 #define __UNWIND_H
 
index 6cc9d9888ce0fc346b6007ae3f07a0dc11932536..070d25ceea6a92ad2092f6710d5d50a29a279e64 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * usage.c
  *
index 0e0e019c9f349e5d18add0e0519ceacb57bebbc4..80a99e458d4e0e7fa7b5e6a2524f4c62f8ceee63 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Support C++ source use utilities defined in util.h
  */
index 4c360daa4e242cc493e4957a7d46eca62ecbca09..3687b720327ac8ac4b0492cc2d814adbdc20a3ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "../perf.h"
 #include "util.h"
 #include "debug.h"
index b136c271125f02f99b017f070bbf8448ba9df426..b52765e6d7b472723b26bc0c2e4bbe8594d26ef1 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef GIT_COMPAT_UTIL_H
 #define GIT_COMPAT_UTIL_H
 
index 8a32bb0095e5e61616319c4145124948f9bfb21c..4b7a303e4ba8071c2e116fa72eb7148e99cd8bc0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
index 808ff9c73bf5d4dfb4b3e50f9ee8297904b11019..8c41f22f42cfbbe9a3cb1ff17ec7a7b4cf0dd46f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_VALUES_H
 #define __PERF_VALUES_H
 
index d3c39eec89a85b64f724bf27466c3dabc15a1029..cffcda448c2820c7d51074188db8a90f901cea0c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <unistd.h>
 #include <stdio.h>
index cdc4fabfc2124efa9c2c497dc35a5f6b77840a85..bc74ace603ae701cadb32e0e9041bf05e0fc50c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __PERF_VDSO__
 #define __PERF_VDSO__
 
index c8f415d9877b08503d12e10e1bb0fe463c81e6f1..dc95154f5646b0c7deff149b6881ab058a188f5f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include "xyarray.h"
 #include "util.h"
 #include <stdlib.h>
index 4ba726c9087072184b445ddc4e788d7000ade01d..7ffe562e7ae7faf5ee45015bb2cb8581b48b5758 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PERF_XYARRAY_H_
 #define _PERF_XYARRAY_H_ 1
 
@@ -23,12 +24,12 @@ static inline void *xyarray__entry(struct xyarray *xy, int x, int y)
 
 static inline int xyarray__max_y(struct xyarray *xy)
 {
-       return xy->max_x;
+       return xy->max_y;
 }
 
 static inline int xyarray__max_x(struct xyarray *xy)
 {
-       return xy->max_y;
+       return xy->max_x;
 }
 
 #endif /* _PERF_XYARRAY_H_ */
index 1329d843eb7b4ef490517a8d631054151575106d..008fe68d7b76d83010c49d27d7fff469b2df7b7a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/stat.h>
index 4c5a481a850c6d4490db28ae0d6448197e4b4517..d6e1c02ddcfead4532cdc73f2d81207f62a8db5f 100644 (file)
@@ -26,7 +26,7 @@ endif
 
 ifneq ($(OUTPUT),)
 # check that the output directory actually exists
-OUTDIR := $(realpath $(OUTPUT))
+OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
 endif
 
index 3e59f1aa3947ecfb954f767d4dd06cb54450b1de..d79ab161cc75f91ab6c7c1f0344387f14216663f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OUTPUT := ./
 ifeq ("$(origin O)", "command line")
 ifneq ($(O),)
index c05cc0ac80c745118c498ae050fa10f7b4f6a902..b3f771039b17ae7abc395dfbfcc6e17b1c7ac0f3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OUTPUT=./
 ifeq ("$(origin O)", "command line")
        OUTPUT := $(O)/
index a8a6f8eec5c2d5d125d0e43ee1a4316d4b91b2d6..c23e5a6ceb7e0f41267c72324e756009ce0fb55d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 obj-m  :=
 
 KDIR   := /lib/modules/$(shell uname -r)/build
index 1c52145267166a076585e099ad478caac9c154a3..59af84b8ef455dfb33053948ec0fdef24a70f7e9 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 OUTPUT=./
 ifeq ("$(origin O)", "command line")
        OUTPUT := $(O)/
index 04eb3cfa6e42908b05359416cc943098b1389be1..2e10fead2e1ec50c182e89f4c0e3563888698b5f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPUPOWER_CPUIDLE_H__
 #define __CPUPOWER_CPUIDLE_H__
 
index fa031fcc771081ff49d871d9baf76bbed5154222..e4e4292eacec6d52227e67592159a929558f28a2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPUPOWER_CPUPOWER_H__
 #define __CPUPOWER_CPUPOWER_H__
 
index f8ec4009621ca2139226df4b62e702a103ca5f07..92affdfbe4174e13f5a5fecded202d597b256dbc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define PATH_TO_CPU "/sys/devices/system/cpu/"
 #define MAX_LINE_LEN 4096
 #define SYSFS_PATH_MAX 255
index 2284c8ea4e2a51262e33897087ce5dace9acdeeb..f7065ae60a1447112840c80148165e393588936a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BUILTIN_H
 #define BUILTIN_H
 
index 691c24d50ef4dbf91a5759793e478fd67f1050a9..569f268f4c7ffe53a86014f2ccb6c02a957cc946 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
index 5fd5c5b8c7b8c1fc29597490abc827898f2fcb77..bb41cdd0df6bfe527cb956c531250cf5866d5ea9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #if defined(__i386__) || defined(__x86_64__)
 #include <unistd.h>
 #include <errno.h>
index 5c074c60f904410b7c7cd51f2a7ea55eff2e20e6..6c7932f5bd66a47f14213ccc3f51a3168d40f519 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index eb289df41053cc275d06f051de513f2d6a5b965a..b98d93a44e1b930a7803631a73dc8d3825148a4a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPUPOWER_BITMASK__
 #define __CPUPOWER_BITMASK__
 
index 32d37c9be791334f4984d7346eeb338f3f3f57e3..732b0b41ba261664eefb9e862f7a7174bcc9fca0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
index a5e7ddf19dbd65bd0dd11f126b50ea9b8b5496f1..80fdf55f414dce474a87a38606bb83d3d816aaef 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #if defined(__i386__) || defined(__x86_64__)
 
 #include "helpers/helpers.h"
index 31a4b24a8bc6f06043a8ec299d5cce34bca59d93..ab9950748838a901345cd7acb19ab10816160c7d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #if defined(__i386__) || defined(__x86_64__)
 
 #include <fcntl.h>
index 8b278983cfc574bbfa230ad2b818c22d0903bdc6..113f3da2a203da868716e14ff4ca54931ee9dff5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #if defined(__i386__) || defined(__x86_64__)
 
 #include <helpers/helpers.h>
index d28f11fedbdaa0231d2047770fbaffd771c803d1..0f0b9ad97e4a9a246a792ec954710da29923a070 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __CPUPOWER_HELPERS_SYSFS_H__
 #define __CPUPOWER_HELPERS_SYSFS_H__
 
index 5ec41c556992a4e568756d38352a13ccff0bdfb0..c70de2eabffb2bedec89909a4d0e1b4259180aee 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # Script which prints out the version to use for building cpupowerutils.
 # Must be called from tools/power/cpupower/
index 32f40eacdafeeb5976ecbbb6272b10780b549043..4e1e999e7b0547d56b60806322017bd21c081948 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 PREFIX         ?= /usr
 DESTDIR                ?=
 
index 8792ad8dbf837064adb180afa34ae0e275bdc6e5..a9bc914a8fe816983a8f345e80e56ba94490f0ce 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC             = $(CROSS_COMPILE)gcc
 BUILD_OUTPUT   := $(CURDIR)
 PREFIX         ?= /usr
index 0dafba2c1e7d28c4eda6904274baf7537ee3062c..bd9c6b31a504df654e16a9389abbb9028cfa2bb7 100644 (file)
@@ -92,7 +92,6 @@ unsigned int do_ring_perf_limit_reasons;
 unsigned int crystal_hz;
 unsigned long long tsc_hz;
 int base_cpu;
-int do_migrate;
 double discover_bclk(unsigned int family, unsigned int model);
 unsigned int has_hwp;  /* IA32_PM_ENABLE, IA32_HWP_CAPABILITIES */
                        /* IA32_HWP_REQUEST, IA32_HWP_STATUS */
@@ -303,9 +302,6 @@ int for_all_cpus(int (func)(struct thread_data *, struct core_data *, struct pkg
 
 int cpu_migrate(int cpu)
 {
-       if (!do_migrate)
-               return 0;
-
        CPU_ZERO_S(cpu_affinity_setsize, cpu_affinity_set);
        CPU_SET_S(cpu, cpu_affinity_setsize, cpu_affinity_set);
        if (sched_setaffinity(0, cpu_affinity_setsize, cpu_affinity_set) == -1)
@@ -5007,7 +5003,6 @@ void cmdline(int argc, char **argv)
                {"hide",        required_argument,      0, 'H'},        // meh, -h taken by --help
                {"Joules",      no_argument,            0, 'J'},
                {"list",        no_argument,            0, 'l'},
-               {"migrate",     no_argument,            0, 'm'},
                {"out",         required_argument,      0, 'o'},
                {"quiet",       no_argument,            0, 'q'},
                {"show",        required_argument,      0, 's'},
@@ -5019,7 +5014,7 @@ void cmdline(int argc, char **argv)
 
        progname = argv[0];
 
-       while ((opt = getopt_long_only(argc, argv, "+C:c:Ddhi:Jmo:qST:v",
+       while ((opt = getopt_long_only(argc, argv, "+C:c:Ddhi:JM:m:o:qST:v",
                                long_options, &option_index)) != -1) {
                switch (opt) {
                case 'a':
@@ -5062,9 +5057,6 @@ void cmdline(int argc, char **argv)
                        list_header_only++;
                        quiet++;
                        break;
-               case 'm':
-                       do_migrate = 1;
-                       break;
                case 'o':
                        outf = fopen_or_die(optarg, "w");
                        break;
index a711eec0c8953f6c8693de17f7c6dc382c3e262a..2447b1bbaacff875d92bb32a4d14f038e48328d8 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC             = $(CROSS_COMPILE)gcc
 BUILD_OUTPUT    := $(CURDIR)
 PREFIX         := /usr
index ad85b921a60761f669a60de1c742449af31b01c4..78d90a249e8863c95e2b281d0707a7719bc30c4c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
                                   -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
                                   -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
index 9dc8f078a83c87e361883569e06fd86889a9164e..654efd9768fd3687924d6c2caf75a9b5425b8225 100644 (file)
@@ -1,7 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
 ifneq ($(O),)
 ifeq ($(origin O), command line)
-       ABSOLUTE_O := $(realpath $(O))
-       dummy := $(if $(ABSOLUTE_O),,$(error O=$(O) does not exist))
+       dummy := $(if $(shell test -d $(O) || echo $(O)),$(error O=$(O) does not exist),)
+       ABSOLUTE_O := $(shell cd $(O) ; pwd)
        OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/)
        COMMAND_O := O=$(ABSOLUTE_O)
 ifeq ($(objtree),)
@@ -12,7 +13,7 @@ endif
 
 # check that the output directory actually exists
 ifneq ($(OUTPUT),)
-OUTDIR := $(realpath $(OUTPUT))
+OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
 endif
 
index 0ea3e51292fcbbbdb5010084f1e0c041d1048c8b..7d2a867cd4aee6374578826fe47671f547a0d106 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
index 78a9ed7fecdb3406dba7e266aefc89648a534856..29a6c63c5a15c0b5448bd8e9fbad7e730a1dc8ba 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # NAME
 #      failcmd.sh - run a command with injecting slab/page allocation failures
index a373a5bfff683cc4b395588af358a2aa92b2171d..4118eb4a842d2ec0af5410b319c9734ce74b3457 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl
+# SPDX-License-Identifier: GPL-2.0
 
 open (IN,"ktest.pl");
 while (<IN>) {
index d870520da68b9b9bc924ff035a57808890693385..65368d9027f54994e22ce3e11143d33550d0ede5 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ldflags-y += --wrap=ioremap_wc
 ldflags-y += --wrap=memremap
 ldflags-y += --wrap=devm_ioremap_nocache
index 3dfe024b4e7e9a10eae77f3602fd107e5211d10e..c37a6a0bde28dc408d0bc1225e3b3a05a02b2204 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 KDIR ?= ../../../
 
 default:
index 7dc5a0af9b544c836223a10bfbb2330e9063ec17..cac891028cd1bf7aeb0297cea743b114e60d886e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <linux/bug.h>
 
 void check(void)
index d32f25bba42a35854364fa7eca200971bf4b02a1..fb3c3d7cdb9bd19723885c3fc5f882f49524a298 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ccflags-y := -I$(src)/../../../../drivers/nvdimm/
 ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/
 
index d20791c3f4990bdced0308989205db61f07087a0..bef419d4266df97a207d6aa3033ae3998ff7dc16 100644 (file)
@@ -1527,9 +1527,6 @@ static void nfit_test1_setup(struct nfit_test *t)
        set_bit(ND_CMD_ARS_START, &acpi_desc->bus_cmd_force_en);
        set_bit(ND_CMD_ARS_STATUS, &acpi_desc->bus_cmd_force_en);
        set_bit(ND_CMD_CLEAR_ERROR, &acpi_desc->bus_cmd_force_en);
-       set_bit(ND_CMD_GET_CONFIG_SIZE, &acpi_desc->dimm_cmd_force_en);
-       set_bit(ND_CMD_GET_CONFIG_DATA, &acpi_desc->dimm_cmd_force_en);
-       set_bit(ND_CMD_SET_CONFIG_DATA, &acpi_desc->dimm_cmd_force_en);
 }
 
 static int nfit_test_blk_do_io(struct nd_blk_region *ndbr, resource_size_t dpa,
index 6a9480c03cbdfce0ae5e29e32f2cedcc342d66e1..fa7ee369b3c919c534e610a621c1bdd54bf1e986 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address
 LDFLAGS += -fsanitize=address
index cf48c8473f4869a8205a9eaa94b6f423079b9be5..6903ccf35595f560350a26d03e3eb4369fbb128b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <string.h>
 #include <malloc.h>
index 39a0dcb9475a3c4e261db2b195b7691d0b39c491..e9fff59dfd8a86cb6022d0dc6e5321a3d9a4f636 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _GFP_H
 #define _GFP_H
 
index b21a77fddcf7357cf4b9cffc7f1746e0e2053d05..c3bc3f364f6827a97cbcc28bf761eaf316b9a240 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _KERNEL_H
 #define _KERNEL_H
 
index 3ea01a1a88c2b2adcbb475ca3f609586c2758831..b2403aa743b21cc2f6a6b7a29ff734293892e933 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define DECLARE_PER_CPU(type, val) extern type val
 #define DEFINE_PER_CPU(type, val) type val
 
index 35c5ac81529fa9d9f6c0ab526db47d793dd209f3..edb10302b903e821e72763eec79f9d9803e42e5c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_PREEMPT_H
 #define __LINUX_PREEMPT_H
 
index bf1bb231f9b5cd98a4c0451eaf1eb8744ee89cf5..24f13d27a8da9c5e2ce92ea493e627cd367ada4d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _TEST_RADIX_TREE_H
 #define _TEST_RADIX_TREE_H
 
index f7129ea2a89913f908f5b791c6673cf8af2a13c8..73ed33658203771524e5a87540beae107cd2c6d3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _RCUPDATE_H
 #define _RCUPDATE_H
 
index e40337f41a387a40eec30af0c4f43fb18ae8b1fe..979baeec7e706aee05ef6bdfbf8dd91494284dd2 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SLAB_H
 #define SLAB_H
 
index bc9a78449572f10331a8bbc35070801f307b6caa..257f3f8aacaa52dad996447e7e8f603a4637240c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index e018c48166885311afb685d83892a0fe69e96198..3c8a1584e9ee4c84be01b3ecda5cfbcbccd24fd3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __REGRESSION_H__
 #define __REGRESSION_H__
 
index bf97742fc18c1cc62e923acc448a5db64b5578fb..0aece092f40ebbdb865e94b5659417c718310c56 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Regression1
  * Description:
index 42dd2a33ed249080560d18ad99585553da843a29..424b91c77831d67828b27a971614215465cf0c12 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Regression2
  * Description:
index 670c3d2ae7b189f9405d1ac536013a32ba9db188..ace2543c3edab3061042e24af19408d6b9ecbcd6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Regression3
  * Description:
index 36dcf7d6945dc631ce7b2bd1c95fb0d14f662167..543181e4847b9ba492d27bf2be8f5c1297112889 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <assert.h>
 #include <stdio.h>
index 1a257d738a1e4e618563de835d55fc847c5daac1..5978ab1f403d97f135ae7f026a07caab71113212 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <assert.h>
 #include <stdio.h>
index 0f8220cc61663ffa2a872db42c96b4e5433ed0a7..d9c031dbeb1a9634451608a29592a74002958dc3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/gfp.h>
 #include <linux/types.h>
 #include <linux/radix-tree.h>
index 26ce4f7168be534de2eef4be6650de9617b03b33..3c9c0bbe7dbb669786f6700c8418f35edc74b6b6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TARGETS =  bpf
 TARGETS += breakpoints
 TARGETS += capabilities
@@ -52,6 +53,10 @@ override LDFLAGS =
 override MAKEFLAGS =
 endif
 
+ifneq ($(KBUILD_SRC),)
+override LDFLAGS =
+endif
+
 BUILD := $(O)
 ifndef BUILD
   BUILD := $(KBUILD_OUTPUT)
@@ -62,32 +67,32 @@ endif
 
 export BUILD
 all:
-       for TARGET in $(TARGETS); do            \
+       @for TARGET in $(TARGETS); do           \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                mkdir $$BUILD_TARGET  -p;       \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET;\
        done;
 
 run_tests: all
-       for TARGET in $(TARGETS); do \
+       @for TARGET in $(TARGETS); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\
        done;
 
 hotplug:
-       for TARGET in $(TARGETS_HOTPLUG); do \
+       @for TARGET in $(TARGETS_HOTPLUG); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET;\
        done;
 
 run_hotplug: hotplug
-       for TARGET in $(TARGETS_HOTPLUG); do \
+       @for TARGET in $(TARGETS_HOTPLUG); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET run_full_test;\
        done;
 
 clean_hotplug:
-       for TARGET in $(TARGETS_HOTPLUG); do \
+       @for TARGET in $(TARGETS_HOTPLUG); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
        done;
@@ -103,7 +108,7 @@ install:
 ifdef INSTALL_PATH
        @# Ask all targets to install their files
        mkdir -p $(INSTALL_PATH)
-       for TARGET in $(TARGETS); do \
+       @for TARGET in $(TARGETS); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \
        done;
@@ -128,7 +133,7 @@ else
 endif
 
 clean:
-       for TARGET in $(TARGETS); do \
+       @for TARGET in $(TARGETS); do \
                BUILD_TARGET=$$BUILD/$$TARGET;  \
                make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
        done;
index f4b23d6974486a0d1e41c67e236b30b0dc1049f6..eab7644a07b4e7f5ad15f012201ae4bcfd4c2634 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 LIBDIR := ../../../lib
 BPFDIR := $(LIBDIR)/bpf
 APIDIR := ../../../include/uapi
index 74af266aa512baf256a33b6434b43a901612b934..b25595ea4a78987bbdacb2cd06c8eeaed4fb0ef6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BPF_ENDIAN__
 #define __BPF_ENDIAN__
 
index 36fb9161b34acf8c14a585f4778905db9185b163..50353c10573c23f24af16c6398e5173bb7bebbb5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BPF_HELPERS_H
 #define __BPF_HELPERS_H
 
@@ -65,7 +66,7 @@ static int (*bpf_xdp_adjust_head)(void *ctx, int offset) =
 static int (*bpf_setsockopt)(void *ctx, int level, int optname, void *optval,
                             int optlen) =
        (void *) BPF_FUNC_setsockopt;
-static int (*bpf_sk_redirect_map)(void *map, int key, int flags) =
+static int (*bpf_sk_redirect_map)(void *ctx, void *map, int key, int flags) =
        (void *) BPF_FUNC_sk_redirect_map;
 static int (*bpf_sock_map_update)(void *map, void *key, void *value,
                                  unsigned long long flags) =
index 20ecbaa0d85d72b860678caf49c3e421105802b8..d0811b3d6a6f165be201ae7a74afe1ad2b7fcfcb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __BPF_UTIL__
 #define __BPF_UTIL__
 
@@ -12,6 +13,7 @@ static inline unsigned int bpf_num_possible_cpus(void)
        unsigned int start, end, possible_cpus = 0;
        char buff[128];
        FILE *fp;
+       int n;
 
        fp = fopen(fcpu, "r");
        if (!fp) {
@@ -20,17 +22,17 @@ static inline unsigned int bpf_num_possible_cpus(void)
        }
 
        while (fgets(buff, sizeof(buff), fp)) {
-               if (sscanf(buff, "%u-%u", &start, &end) == 2) {
-                       possible_cpus = start == 0 ? end + 1 : 0;
-                       break;
+               n = sscanf(buff, "%u-%u", &start, &end);
+               if (n == 0) {
+                       printf("Failed to retrieve # possible CPUs!\n");
+                       exit(1);
+               } else if (n == 1) {
+                       end = start;
                }
+               possible_cpus = start == 0 ? end + 1 : 0;
+               break;
        }
-
        fclose(fp);
-       if (!possible_cpus) {
-               printf("Failed to retrieve # possible CPUs!\n");
-               exit(1);
-       }
 
        return possible_cpus;
 }
index 51841848fbfe35aeecb30d35acdeee516201afaa..91fa51a9c31de1496db9a31c90fa95760adc664d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _UAPI_LINUX_TYPES_H
 #define _UAPI_LINUX_TYPES_H
 
index 9b99bd10807d8990a82ba1a390e9f1304e04d214..2cd2d552938b19211da94c4b51ea7895408d35b0 100644 (file)
@@ -61,8 +61,8 @@ int bpf_prog2(struct __sk_buff *skb)
        bpf_printk("verdict: data[0] = redir(%u:%u)\n", map, sk);
 
        if (!map)
-               return bpf_sk_redirect_map(&sock_map_rx, sk, 0);
-       return bpf_sk_redirect_map(&sock_map_tx, sk, 0);
+               return bpf_sk_redirect_map(skb, &sock_map_rx, sk, 0);
+       return bpf_sk_redirect_map(skb, &sock_map_tx, sk, 0);
 }
 
 char _license[] SEC("license") = "GPL";
index 6d58cca8e23574a1fe15993d1da8f1558ecf8e06..ed4774d8d6ed1c792f14825628a2c486acf7df08 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 SRC_TREE=../../../../
 
index e97565243d59c014272c12025e2cb74bf04244d6..f93a333cbf2c96af7123fbaa6b9a1a8cad5a4e6b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Randomized tests for eBPF longest-prefix-match maps
  *
index fe3a443a110228efb99bc893d2f0820cd03e6763..50ce52d2013d6feddadcb6a2f61cdc4667b3d78d 100644 (file)
@@ -466,7 +466,7 @@ static void test_sockmap(int tasks, void *data)
        int one = 1, map_fd_rx, map_fd_tx, map_fd_break, s, sc, rc;
        struct bpf_map *bpf_map_rx, *bpf_map_tx, *bpf_map_break;
        int ports[] = {50200, 50201, 50202, 50204};
-       int err, i, fd, sfd[6] = {0xdeadbeef};
+       int err, i, fd, udp, sfd[6] = {0xdeadbeef};
        u8 buf[20] = {0x0, 0x5, 0x3, 0x2, 0x1, 0x0};
        int parse_prog, verdict_prog;
        struct sockaddr_in addr;
@@ -548,6 +548,16 @@ static void test_sockmap(int tasks, void *data)
                goto out_sockmap;
        }
 
+       /* Test update with unsupported UDP socket */
+       udp = socket(AF_INET, SOCK_DGRAM, 0);
+       i = 0;
+       err = bpf_map_update_elem(fd, &i, &udp, BPF_ANY);
+       if (!err) {
+               printf("Failed socket SOCK_DGRAM allowed '%i:%i'\n",
+                      i, udp);
+               goto out_sockmap;
+       }
+
        /* Test update without programs */
        for (i = 0; i < 6; i++) {
                err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY);
index de409fc50c35b3f5cc07956162be280ff16229e5..8b201895c569f9cf9cf5dc1af34cc3234bd7b4a2 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
index 26f3250bdcd2546c4f316eed8caffd9eb583e0d9..64ae21f644896a74bb624d6f873463b5b2d07312 100644 (file)
@@ -1130,15 +1130,27 @@ static struct bpf_test tests[] = {
                .errstr = "invalid bpf_context access",
        },
        {
-               "check skb->mark is writeable by SK_SKB",
+               "invalid access of skb->mark for SK_SKB",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
+                                   offsetof(struct __sk_buff, mark)),
+                       BPF_EXIT_INSN(),
+               },
+               .result =  REJECT,
+               .prog_type = BPF_PROG_TYPE_SK_SKB,
+               .errstr = "invalid bpf_context access",
+       },
+       {
+               "check skb->mark is not writeable by SK_SKB",
                .insns = {
                        BPF_MOV64_IMM(BPF_REG_0, 0),
                        BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_0,
                                    offsetof(struct __sk_buff, mark)),
                        BPF_EXIT_INSN(),
                },
-               .result = ACCEPT,
+               .result =  REJECT,
                .prog_type = BPF_PROG_TYPE_SK_SKB,
+               .errstr = "invalid bpf_context access",
        },
        {
                "check skb->tc_index is writeable by SK_SKB",
@@ -6645,6 +6657,500 @@ static struct bpf_test tests[] = {
                .errstr = "BPF_END uses reserved fields",
                .result = REJECT,
        },
+       {
+               "arithmetic ops make PTR_TO_CTX unusable",
+               .insns = {
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1,
+                                     offsetof(struct __sk_buff, data) -
+                                     offsetof(struct __sk_buff, mark)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
+                                   offsetof(struct __sk_buff, mark)),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "dereference of modified ctx ptr R1 off=68+8, ctx+const is allowed, ctx+const+const is not",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_SCHED_CLS,
+       },
+       {
+               "XDP pkt read, pkt_end mangling, bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_3, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end mangling, bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_ALU64_IMM(BPF_SUB, BPF_REG_3, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' > pkt_end, good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' > pkt_end, bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_data' > pkt_end, bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_1, BPF_REG_3, 0),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end > pkt_data', good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_end > pkt_data', bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end > pkt_data', bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGT, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' < pkt_end, good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_data' < pkt_end, bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' < pkt_end, bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end < pkt_data', good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end < pkt_data', bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_end < pkt_data', bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLT, BPF_REG_3, BPF_REG_1, 0),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' >= pkt_end, good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_data' >= pkt_end, bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' >= pkt_end, bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_1, BPF_REG_3, 0),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_end >= pkt_data', good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end >= pkt_data', bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_end >= pkt_data', bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JGE, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' <= pkt_end, good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_data' <= pkt_end, bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_JMP_IMM(BPF_JA, 0, 0, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -4),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_data' <= pkt_end, bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_1, BPF_REG_3, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end <= pkt_data', good access",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .result = ACCEPT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
+       {
+               "XDP pkt read, pkt_end <= pkt_data', bad access 1",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 1),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1, -8),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+       },
+       {
+               "XDP pkt read, pkt_end <= pkt_data', bad access 2",
+               .insns = {
+                       BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1,
+                                   offsetof(struct xdp_md, data)),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_3, BPF_REG_1,
+                                   offsetof(struct xdp_md, data_end)),
+                       BPF_MOV64_REG(BPF_REG_1, BPF_REG_2),
+                       BPF_ALU64_IMM(BPF_ADD, BPF_REG_1, 8),
+                       BPF_JMP_REG(BPF_JLE, BPF_REG_3, BPF_REG_1, 0),
+                       BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, -5),
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "R1 offset is outside of the packet",
+               .result = REJECT,
+               .prog_type = BPF_PROG_TYPE_XDP,
+               .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
+       },
 };
 
 static int probe_filter_length(const struct bpf_insn *fp)
index 6b214b7b10fb7c1c7ad6330c3769fbd1c46838d7..9ec2c78de8caabfa486b6da648cffcb176afc829 100644 (file)
@@ -1,15 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
 # Taken from perf makefile
 uname_M := $(shell uname -m 2>/dev/null || echo not)
 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
 
+TEST_GEN_PROGS := step_after_suspend_test
+
 ifeq ($(ARCH),x86)
-TEST_GEN_PROGS := breakpoint_test
+TEST_GEN_PROGS += breakpoint_test
 endif
 ifneq (,$(filter $(ARCH),aarch64 arm64))
-TEST_GEN_PROGS := breakpoint_test_arm64
+TEST_GEN_PROGS += breakpoint_test_arm64
 endif
 
-TEST_GEN_PROGS += step_after_suspend_test
-
 include ../lib.mk
 
index 29b8adfdac717d76cd32def4aaf61e94744b733f..6e9d98d457d5b625c93cd83ac94ca1030f02b09a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_GEN_FILES := validate_cap
 TEST_GEN_PROGS := test_execve
 
index cf67784413812f9463f59667ef50caa0a77bb393..3ab39a61b95bdcc0bb5dc7d70e7fd0bb563e26d8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 
 #include <cap-ng.h>
index 694cd73d4493826cd8db96817f11a68d095236d0..cdfc94268fe6e6eafa4cc1dbdeee5b60b3ca2dfd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <cap-ng.h>
 #include <linux/capability.h>
 #include <stdbool.h>
index fe1f99101c5d5023d4687893ed0bf7a5e876f1a9..d8be047ee5b6aabb637c87a31f1dc2df4e8543bc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 TEST_PROGS := cpu-on-off-test.sh
index b18b253d7bfbca829a63175886495434525c1e0a..f3a8933c12755f9593c1207a9d13d3d6a0d7999d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 SYSFS=
 
index 3955cd96f3a25c1b52acea7510996679c4b36df6..c86ca8342222b8d93ab7b41096d5ea87e526eb09 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 TEST_PROGS := main.sh
index 8e08a83d65f2d5d81828a1fd1d50c3371ba5e706..39fdcdfb8e97f413068d31dcc68da33b879b6ad9 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # CPU helpers
 
index 1ed3832030b4fc01269af771d18d9ee43dd3b33f..b583a2fb4504257daa0c71d09ec82d679ec9535e 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # protect against multiple inclusion
 if [ $FILE_CPUFREQ ]; then
index def645103555f6b77ccc8a48e2bbc81efc9675d0..fe37df79c0871b3906b9ac3be4a52291ec10317a 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Test governors
 
index 01bac76ac0ec71e8c9aa1371e45ee3736ecc1d24..d83922de9d8997addb8704a983e59c50a0c06c01 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 source cpu.sh
 source cpufreq.sh
index 8ff2244a33a156639af5b99318d5e6a53d7c41c4..22563cd122e7dd3dd508fd11c9f04552bcaad01d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Modules specific tests cases
 
index 58b730f23ef7265e7fd9b208fb3a86ffcc9088e3..8d40505dc4682c0ca44be1c3fcebb2f6aa1ee932 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Special test cases reported by people
 
index 96dd55c927994b76b7a7d96bf36d3cf63a7c4d47..b789dc8257e6287f450722860232e084c2ed235b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs API tests for struct drm_mm (DRM range manager)
 
 if ! /sbin/modprobe -n -q test-drm_mm; then
index c06d6e8a8dcc91ad3fd1952e1d52503a87df49af..d3895bc714b73d0a7ac6fb8fbc3dafdbf25a14b2 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs hardware independent tests for i915 (drivers/gpu/drm/i915)
 
 if ! /sbin/modprobe -q -r i915; then
index 7feef1880968e5d83c0ba79287de0b9bd035a78a..9674a19396a325e06336a55942861ab43d086f7e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
index 057278448515a455a17ff2b48af2bf0902c2e7fb..c6d5790575ae341ef66727c0666b24f7afe6bd74 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 efivarfs_mount=/sys/firmware/efi/efivars
 test_guid=210be57c-9849-4fc7-a635-e6382d1aec27
index 4af74f7330365e668d9e1379f6894f12d974374d..562742d44ac9696a198770be44fb1ceb4a5af9bc 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <stdio.h>
 #include <stdint.h>
index 2e13035dff7f6f4bfcf28d59e38bd1d7231bacce..427c41ba51513617883cee81cbe943bb6c523f67 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS = -Wall
 
 TEST_GEN_PROGS := execveat
index 0ab11307b41422882b7fbda8718e6135588841cb..13a73bf725b555ac01e1a07ae86c1fac523a9f92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := dnotify_test
 all: $(TEST_PROGS)
 
index 8b37b4a1e18da3b891dbddd38d0bfe927d919859..c0a9b2d3302dcb2a1e6de6f18896b3b34a54a18f 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE    /* needed to get the defines */
 #include <fcntl.h>     /* in glibc 2.2 this has the needed
                                   values defined */
index 8f511035f78331410fdba45ebea6081345cdce4c..a52a3bab532b95c277f2954209e4493061a41e4e 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # This validates that the kernel will fall back to using the fallback mechanism
 # to load firmware it can't find on disk itself. We must request a firmware
 # that the kernel won't find, and any installed helper (e.g. udev) also
index 7d8fd2e3695a8d16d7cf467c6489a139b8e62d08..62f2d6f54929a4260a767e06d0b08161c55b7437 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # This validates that the kernel will load firmware out of its list of
 # firmware locations on disk. Since the user helper does similar work,
 # we reset the custom load directory to a location the user helper doesn't
index a8a5e21850e740a099228963db130961e542b838..cd1f5b3a777461b89b25c9783d54aeadcc4d66d0 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 TEST_PROGS := ftracetest
index ebfce83f35b44b4fff4bfa6f58792115d912db51..531e472362dfb189ae2cb83d9214ed00a6b07637 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Basic test for tracers
 # flags: instance
 test -f available_tracers
index 9e33f841812f304c5deed76bc605284dc4135895..58a2506f788e8ca3893e76cfe3b4f48284a2be43 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Basic trace clock test
 # flags: instance
 test -f trace_clock
index 283b45ecb199d54f819efcaa6e6a5973f7622744..6ff851a7588461581ea6040987f056d2233b43b9 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event tracing - enable/disable with event level files
 # flags: instance
 
index 96c1a95be4f798f88838ae8882b87d89037707b2..cc14feec6e1f2dd96a2f0aabf6ad02d45e00e069 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event tracing - restricts events based on pid
 # flags: instance
 
index b8fe2e5b9e674ff95023c14c30401440d6153c5e..85094904aa79b3aa2d2e720ba4bc1a6ba763a5aa 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event tracing - enable/disable with subsystem level files
 # flags: instance
 
index 15e2d3fe1731788bb4fa66163ff8830d4db2933e..cc1cf4d30ef5d3729822a8d068c8df2e5d52e49c 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event tracing - enable/disable with top level files
 
 do_reset() {
index 15c2dba06ea288a9d73652bfdcf001bd52fda936..45df747887e07254dd5d1e7b056b7202ccc69530 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - function graph filters with stack tracer
 
 # Make sure that function graph filtering works, and is not
index 0ab2189613efe534b6e443e2ee01d3ecbecd6c2b..0387e22e757757894fe1a553bb6bd0a41e538a67 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - function graph filters
 
 # Make sure that function graph filtering works
index 8095e122daa9763564654455191ddb9af923aff4..589d52b211b7c0516bbd33d1e05b0925b358e7aa 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - function glob filters
 
 # Make sure that function glob matching filter works.
index bab5ff7c607edbbe12fa7680626e6e260e0bb4e8..78524fcc25aee94ec2414fbc53a668d7ab09fdcf 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - function pid filters
 
 # Make sure that function pid matching filter works.
index 77dfb6b481861cf14cdd722352f7827ae9aaebd3..9d4afcca1e36aae049308e9faf7fcab6c05876e0 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - test for function event triggers
 # flags: instance
 #
index 7808336d6f50832a456eca8061c6a88c3ba831b5..fe0dc5a7ea2685d7288c15e224cd5d2e3c85d2c8 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - function profiler with function tracing
 
 # There was a bug after a rewrite of the ftrace infrastructure that
index 113b4d9bc7336f1023ddc8c1a6ba1c33e8a963e3..5ad723724adb9c72d5a94dfc373eb095e5e76943 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - test reading of set_ftrace_filter
 #
 # The set_ftrace_filter file of ftrace is used to list functions as well as
index 7a9ab4ff83b6fc27a78a4fde2b0a2c54855e9ab8..cdc92a371cd73f78d22c964c2afac13201108597 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: ftrace - test for function traceon/off triggers
 # flags: instance
 #
index 8a353314dc9b2a80c4ec28d377d5a9270e977d32..d7f48b55df51cb1c4e1f13f1d67b6af9272dcc96 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Test creation and deletion of trace instances while setting an event
 
 if [ ! -d instances ] ; then
index 1e1abe0ad354267507dc0514351d651e19fd1fb6..ddda622033664a50af8556df1d50c863f07f5866 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Test creation and deletion of trace instances
 
 if [ ! -d instances ] ; then
index c3843ed49bf6dfe268971e7d013b795ae30e7b4f..4604d2103c89383a698bc18e0cf432e53ab2c9b2 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe dynamic event - adding and removing
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index 74507db8bbc89e1b3a4594ec948a81783584402b..0e6f415c6152af1aa97f0a1e8413113c952a7c8d 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe dynamic event - busy event check
 
 [ -f kprobe_events ] || exit_unsupported
index 64949d4eda699af40f42c74f6408a14106893721..679bbd23bcc3fe833f1359b7c8b5827efc4ae89d 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe dynamic event with arguments
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index c75faefb4fffcb617383f9aebab0d40270f58743..17d33ba192f64ad1784802569af54fba5490baa4 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobes event arguments with types
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index b9302cc82c1223d0a02849d8258aec13191388ed..2724a1068cb1da185b4ef24568099a3f11dc904a 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe event auto/manual naming
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index d6f2f4965697a8a2e583087121283f5012d12ae4..cc4cac0e60f27844f9b9369e914cafdb8d87d2ad 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe dynamic event with function tracer
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index 6d634e4b768056917839ee82a2e92b97bf88edd1..1e9f75f7a30fce11ae531c678a021eea85e8494b 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kprobe dynamic event - probing module
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index 0d09546258fde3b6c327bc6a4d8e67e14647de15..f1825bdbe3f30776e24415f1992ee203666350b1 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kretprobe dynamic event with arguments
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index 7ec6f2639ad6e6772bda7c30ee33a174e0fb103d..7c0290684c4387f8d35daf56c8a62c41d51449ca 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Kretprobe dynamic event with maxactive
 
 [ -f kprobe_events ] || exit_unsupported # this is configurable
index 2a1cb990874613c5ee9da2d371b95899d8eaa81a..bb16cf91f1b53e51856b2a4a5e498002b22ddaaa 100644 (file)
@@ -1,6 +1,9 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: Register/unregister many kprobe events
 
+[ -f kprobe_events ] || exit_unsupported # this is configurable
+
 # ftrace fentry skip size depends on the machine architecture.
 # Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le
 case `uname -m` in
index c5435adfdd932b38d7a09ae55a077db02c921717..839ac4320b24e7a4ca171f7c70076b6a9d4268e6 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test event enable/disable trigger
 # flags: instance
 
index 48849a8d577f7f2b475d0c9d0bfad2029d2a9d1b..66873c4b12c952503643c92ee580d9929f4623db 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test trigger filter
 # flags: instance
 
index b7f86d10b549ab3a6838dbedbc85a0d10b7fb6ab..4237b32769f14552c9f0ca9ee16357c95fc52345 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test histogram modifiers
 # flags: instance
 
index fb66f7d9339da57d3ecf188a7238b0d3065d6609..d24e2b8bd8633b8ec2a8344b044928d49c7f41dc 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test histogram trigger
 # flags: instance
 
index f9153087dd7cdcfabebfa55fa0e4c099072e4101..4c0774fff37815e20803b4f8d7acaba87af49621 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test multiple histogram triggers
 # flags: instance
 
index ed94f0c4e0e4610b01025d71c1b0b2d41b7fcc44..3fc6321e081f327798b08c09d7ff21bcd2693545 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test snapshot-trigger
 
 do_reset() {
index 9fa23b085def46fec4b87749a653d2813504f56f..3652824f81ed6a9766e2f45ef44feee0a79c38ed 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test stacktrace-trigger
 
 do_reset() {
index 87648e5f987c0b0fc49d2d78d53b6102fdeca11f..6d9051cdf408f32449602cafb6c8c60ca708abe9 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # description: event trigger - test traceon/off trigger
 
 do_reset() {
index 7c647f619d63faf3eff4c135c1b302565b7f78d5..cea4adcd42b8877f7e5a05d57a837bcc61c1d97d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 SUBDIRS := functional
 
 TEST_PROGS := run.sh
@@ -7,14 +8,17 @@ TEST_PROGS := run.sh
 include ../lib.mk
 
 all:
-       for DIR in $(SUBDIRS); do               \
+       @for DIR in $(SUBDIRS); do              \
                BUILD_TARGET=$(OUTPUT)/$$DIR;   \
                mkdir $$BUILD_TARGET  -p;       \
                make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
+               if [ -e $$DIR/$(TEST_PROGS) ]; then
+                       rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;
+               fi
        done
 
 override define RUN_TESTS
-       $(OUTPUT)/run.sh
+       @cd $(OUTPUT); ./run.sh
 endef
 
 override define INSTALL_RULE
@@ -33,7 +37,7 @@ override define EMIT_TESTS
 endef
 
 override define CLEAN
-       for DIR in $(SUBDIRS); do               \
+       @for DIR in $(SUBDIRS); do              \
                BUILD_TARGET=$(OUTPUT)/$$DIR;   \
                mkdir $$BUILD_TARGET  -p;       \
                make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
index a648e7a6cbc3d3d5fc3ea4a1d254e9246950721e..ff8feca49746074d71b28455ff58a01a7d1b491c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 INCLUDES := -I../include -I../../
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDFLAGS := $(LDFLAGS) -pthread -lrt
index 298929df97e695b5be640a47d51b84d173f5da5f..1bbb47565c554cf06a95fe2a205231de75f7797e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 
 TEST_PROGS := gpio-mockup.sh
 TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES)
index 085d7a39899c7678a4245178cfa166da88c2cdf7..dd269d877562409e929b3665488a1df64e2cbd56 100755 (executable)
@@ -1,4 +1,5 @@
 
+# SPDX-License-Identifier: GPL-2.0
 is_consistent()
 {
        val=
index b183439e058ec28d3b96c13218101eb681f1c451..183fb932edbdb8c943904427098288063437c0f8 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 #exit status
 #1: run as non-root user
index 2b3de2d3e945924cb511ef5dfafc54d204ce9ce1..4bce1a84b3a1426c34cac18c460a4138bbcd7e65 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := aliasing-test
 
 all: $(TEST_PROGS)
index 849a90ffe8dd2d311b9b66bed9058fefdf28ba7d..5a3f7d37e91214b88d2e1af2f63f44d84e1ef11a 100644 (file)
@@ -1,7 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE
 LDLIBS := $(LDLIBS) -lm
 
+ifeq (,$(filter $(ARCH),x86))
 TEST_GEN_FILES := msr aperf
+endif
 
 TEST_PROGS := run.sh
 
index cd72f3dc83e9dec7ba51c38c674447c0174ff5b4..d21edea9c5601f98ba32325294ed813c597d8545 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <math.h>
 #include <unistd.h>
 #include <stdio.h>
index abbbfc84d3595aa9413aac03f47a25b837c6270e..88fdd2a4b0a072242b0b3936b6ddda27cf80e818 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <math.h>
 #include <unistd.h>
 #include <stdio.h>
index 7868c106b8b1b80c41a8af739c8def48fd378bd8..c670359becc6c2d0d6f0ba750a40cc6aad9a9e27 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # This test runs on Intel x86 based hardware which support the intel_pstate
 # driver.  The test checks the frequency settings from the maximum turbo
 
 EVALUATE_ONLY=0
 
-max_cpus=$(($(nproc)-1))
+if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then
+       echo "$0 # Skipped: Test can only run on x86 architectures."
+       exit 0
+fi
 
-# compile programs
-gcc aperf.c -Wall -D_GNU_SOURCE -o aperf  -lm
-[ $? -ne 0 ] && echo "Problem compiling aperf.c." && exit 1
-gcc -o msr msr.c -lm
-[ $? -ne 0 ] && echo "Problem compiling msr.c." && exit 1
+max_cpus=$(($(nproc)-1))
 
 function run_test () {
 
index 30ef4c7f53eaa3d29baaa47b69fd9090e328b8a9..1c4448a843a41e38d55b7260bd8807896898e15e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 uname_M := $(shell uname -m 2>/dev/null || echo not)
 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
 ifeq ($(ARCH),i386)
index 1b2ce334bb3f028a323b595929a6a50ae529d5e5..ee9382bdfadc8755b17f87c9e37437a28688e376 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 73684c4a1ed6929ddf5482119c009cd0c9ce1694..6ea7b9f37a411ee60e63160fa117cd7077fad41b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 
 #include <stdio.h>
index 693616651da5cbc27a779868e64697df80582ef3..5bef05d6ba3935c4c288faec8c8efc83ed4a3849 100644 (file)
@@ -6,7 +6,14 @@ ifeq (0,$(MAKELEVEL))
 OUTPUT := $(shell pwd)
 endif
 
+# The following are built by lib.mk common compile rules.
+# TEST_CUSTOM_PROGS should be used by tests that require
+# custom build rule and prevent common build rule use.
+# TEST_PROGS are for test shell scripts.
+# TEST_CUSTOM_PROGS and TEST_PROGS will be run by common run_tests
+# and install targets. Common clean doesn't touch them.
 TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS))
+TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED))
 TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES))
 
 all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
@@ -20,17 +27,32 @@ define RUN_TESTS
                test_num=`echo $$test_num+1 | bc`;      \
                echo "selftests: $$BASENAME_TEST";      \
                echo "========================================";        \
-               if [ ! -x $$BASENAME_TEST ]; then       \
+               if [ ! -x $$TEST ]; then        \
                        echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\
                        echo "not ok 1..$$test_num selftests: $$BASENAME_TEST [FAIL]"; \
                else                                    \
-                       cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests:  $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
+               if [ "X$(summary)" != "X" ]; then               \
+                               cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST > /tmp/$$BASENAME_TEST 2>&1 && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests:  $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
+                       else                            \
+                               cd `dirname $$TEST` > /dev/null; (./$$BASENAME_TEST && echo "ok 1..$$test_num selftests: $$BASENAME_TEST [PASS]") || echo "not ok 1..$$test_num selftests:  $$BASENAME_TEST [FAIL]"; cd - > /dev/null;\
+                       fi;                             \
                fi;                                     \
        done;
 endef
 
 run_tests: all
-       $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_PROGS))
+ifneq ($(KBUILD_SRC),)
+       @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then
+               @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT)
+       fi
+       @if [ "X$(TEST_PROGS)" != "X" ]; then
+               $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(OUTPUT)/$(TEST_PROGS))
+       else
+               $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS))
+       fi
+else
+       $(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS))
+endif
 
 define INSTALL_RULE
        @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then                                        \
@@ -38,10 +60,10 @@ define INSTALL_RULE
                echo "rsync -a $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/";    \
                rsync -a $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/;           \
        fi
-       @if [ "X$(TEST_GEN_PROGS)$(TEST_GEN_PROGS_EXTENDED)$(TEST_GEN_FILES)" != "X" ]; then                                    \
+       @if [ "X$(TEST_GEN_PROGS)$(TEST_CUSTOM_PROGS)$(TEST_GEN_PROGS_EXTENDED)$(TEST_GEN_FILES)" != "X" ]; then                                        \
                mkdir -p ${INSTALL_PATH};                                                                               \
-               echo "rsync -a $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/";        \
-               rsync -a $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/;               \
+               echo "rsync -a $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/";   \
+               rsync -a $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(INSTALL_PATH)/;          \
        fi
 endef
 
@@ -53,15 +75,20 @@ else
 endif
 
 define EMIT_TESTS
-       @for TEST in $(TEST_GEN_PROGS) $(TEST_PROGS); do \
+       @for TEST in $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS); do \
                BASENAME_TEST=`basename $$TEST`;        \
-               echo "(./$$BASENAME_TEST && echo \"selftests: $$BASENAME_TEST [PASS]\") || echo \"selftests: $$BASENAME_TEST [FAIL]\""; \
+               echo "(./$$BASENAME_TEST > /tmp/$$BASENAME_TEST 2>&1 && echo \"selftests: $$BASENAME_TEST [PASS]\") || echo \"selftests: $$BASENAME_TEST [FAIL]\""; \
        done;
 endef
 
 emit_tests:
        $(EMIT_TESTS)
 
+# define if isn't already. It is undefined in make O= case.
+ifeq ($(RM),)
+RM := rm -f
+endif
+
 define CLEAN
        $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
 endef
@@ -69,6 +96,15 @@ endef
 clean:
        $(CLEAN)
 
+# When make O= with kselftest target from main level
+# the following aren't defined.
+#
+ifneq ($(KBUILD_SRC),)
+LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
+COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
+endif
+
 $(OUTPUT)/%:%.c
        $(LINK.c) $^ $(LDLIBS) -o $@
 
index b073c22a3435a25ab829a9337636f5784174a247..4dee4d2a8bbed810a730d2f8a755188f9e0d3008 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs bitmap infrastructure tests using test_bitmap kernel module
 if ! /sbin/modprobe -q -n test_bitmap; then
        echo "bitmap: [SKIP]"
index da4cbcd766f5bc83c4ef5a4085e073d668daa4af..b363994e5e11aa52c9925488e3f40a85f49bbeae 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Checks fast/slow prime_number generation for inconsistencies
 
 if ! /sbin/modprobe -q -r prime_numbers; then
index cbf3b124bd94a2af428e13be8365ddb2bd709591..0c37377fd7d4926fbf5807d42b6ebd6c85aecb9d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs printf infrastructure using test_printf kernel module
 if ! /sbin/modprobe -q -n test_printf; then
        echo "printf: [SKIP]"
index 6905da965f3bdcc75bdc4e0c123e993361a7a8a4..2c3d6b1878c2145600220059ceeb0e3b093dbe4b 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs API tests for struct ww_mutex (Wait/Wound mutexes)
 
 if /sbin/modprobe -q test-ww_mutex; then
index 6b34a0199468011e4406a842b3cf77f4938e03af..be5bd4ffb895057d8b4b70a4ae65f2202db4091d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := media_device_test media_device_open video_device_test
 all: $(TEST_PROGS)
 
index 9f362f10631ad28345bda72289dd54bba443ed2e..0101c1ec4ff7384ae329e489df4a8059a2324c43 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 # Find device number in /sys/bus/usb/drivers/drivername
 # Edit this file to update the driver numer and name
 # Example test for uvcvideo driver
index dcd3c17efc1771d345364d439fd5a1c364af2da6..d4c0179bbe2c4da10502101e33ca7909f11b89fe 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
  i=0
 file=/dev/media$1
  while :; do
index 21399fcf1a59125a613db1c330a8b782790fd4d9..9e674d9514d1d14b43e32c58ef530991f7f3561e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <linux/membarrier.h>
 #include <syscall.h>
index bc9d02d615dabf4a433c7ce4637f4b8736106d22..3926a0409dda3e09bc5c83c25cec31c44e622a16 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -D_FILE_OFFSET_BITS=64
 CFLAGS += -I../../../../include/uapi/
 CFLAGS += -I../../../../include/
index feacf1280fcd0fa8daeba84d6ddf1689df012a04..6936f2a001f30334e097da01559fccf128f03e86 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * memfd test file-system
  * This file uses FUSE to create a dummy file-system with only one file /memfd.
index 7f3617274bf53d00bd47863abc2241a6e0f434f0..1ccb7a3eb14bfdf33f8c02ba12f2991cc16fc8df 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * memfd GUP test-case
  * This tests memfd interactions with get_user_pages(). We require the
index f94c6d1fb46f85aca694c13791f585effe9c931e..845e5f67b6f0245fabedc8367ecefb3ba3ad0de9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #define __EXPORTED_HEADERS__
 
index 69b930e1e0415686414cdf4aee0c92580a03ab86..407df68dfe27b4fdc4d2924704876fd6ef75dd48 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if test -d "./mnt" ; then
        fusermount -u ./mnt
old mode 100644 (file)
new mode 100755 (executable)
index afb2624c704894fc280f553fbad9ac1f9fb07363..23db11c94b59abbcc881e3c80dcf93b50d9e3abe 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 include ../lib.mk
index 35025ce9ca665dd9ff061888c71e35be1a5c7332..ae2c790d08806e8708dbd8ad4a0e18e5cb14fb19 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 SYSFS=
 
index 9093d7ffe87f158e2f1f72d68e791e23afdcac40..e094f71c6dbc4a24a2cdc7612c9e5511378fee36 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for mount selftests.
 CFLAGS = -Wall \
          -O2
index 517785052f1c37a4c368810c5c88d35119c9cab0..584dc6bc3b06679e8afd2a48ab52cd0e47e1ec56 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <sched.h>
 #include <stdio.h>
index 79a664aeb8d76509a2f8e46aadf742571765a26a..743d3f9e59181c5f39346727d2a2286c5eabf511 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O2
 LDLIBS = -lrt -lpthread -lpopt
 TEST_GEN_PROGS := mq_open_tests mq_perf_tests
@@ -5,8 +6,8 @@ TEST_GEN_PROGS := mq_open_tests mq_perf_tests
 include ../lib.mk
 
 override define RUN_TESTS
-       @./mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
-       @./mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
+       @$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
+       @$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
 endef
 
 override define EMIT_TESTS
index 9801253e48021035b650a88e3d3d0c2affea8675..c612d6e38c6282cad7b56396e1d3e2c1c9d3a46c 100644 (file)
@@ -6,3 +6,4 @@ reuseport_bpf
 reuseport_bpf_cpu
 reuseport_bpf_numa
 reuseport_dualstack
+reuseaddr_conflict
index de1f5772b878ee1f4aee9e1452d1f0e83696af62..500c74db746c81df064b52ae55d9faec6e4e0b73 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for net selftests
 
 CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g
@@ -5,9 +6,9 @@ CFLAGS += -I../../../../usr/include/
 
 TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh
 TEST_GEN_FILES =  socket
-TEST_GEN_FILES += psock_fanout psock_tpacket
-TEST_GEN_FILES += reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
-TEST_GEN_FILES += reuseport_dualstack msg_zerocopy
+TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy
+TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
+TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict
 
 include ../lib.mk
 
index 40232af5b023ee251bfc369fd73860d912809891..3ab6ec4039059cf127345652bccf6c34d5c4d273 100644 (file)
@@ -55,7 +55,7 @@
 #include <unistd.h>
 
 #ifndef SO_EE_ORIGIN_ZEROCOPY
-#define SO_EE_ORIGIN_ZEROCOPY          SO_EE_ORIGIN_UPAGE
+#define SO_EE_ORIGIN_ZEROCOPY          5
 #endif
 
 #ifndef SO_ZEROCOPY
index 4e00568d70c2c398651675ad763f646453b45b3b..903679e0ff318b00ce25523a11b8f028f5171531 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # This test is for checking network interface
 # For the moment it tests only ethernet interface (but wifi could be easily added)
@@ -178,7 +179,7 @@ if [ "$(id -u)" -ne 0 ];then
        exit 0
 fi
 
-ip -Version 2>/dev/null >/dev/null
+ip link show 2>/dev/null >/dev/null
 if [ $? -ne 0 ];then
        echo "SKIP: Could not run test without the ip tool"
        exit 0
diff --git a/tools/testing/selftests/net/reuseaddr_conflict.c b/tools/testing/selftests/net/reuseaddr_conflict.c
new file mode 100644 (file)
index 0000000..7c5b126
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Test for the regression introduced by
+ *
+ * b9470c27607b ("inet: kill smallest_size and smallest_port")
+ *
+ * If we open an ipv4 socket on a port with reuseaddr we shouldn't reset the tb
+ * when we open the ipv6 conterpart, which is what was happening previously.
+ */
+#include <errno.h>
+#include <error.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#define PORT 9999
+
+int open_port(int ipv6, int any)
+{
+       int fd = -1;
+       int reuseaddr = 1;
+       int v6only = 1;
+       int addrlen;
+       int ret = -1;
+       struct sockaddr *addr;
+       int family = ipv6 ? AF_INET6 : AF_INET;
+
+       struct sockaddr_in6 addr6 = {
+               .sin6_family = AF_INET6,
+               .sin6_port = htons(PORT),
+               .sin6_addr = in6addr_any
+       };
+       struct sockaddr_in addr4 = {
+               .sin_family = AF_INET,
+               .sin_port = htons(PORT),
+               .sin_addr.s_addr = any ? htonl(INADDR_ANY) : inet_addr("127.0.0.1"),
+       };
+
+
+       if (ipv6) {
+               addr = (struct sockaddr*)&addr6;
+               addrlen = sizeof(addr6);
+       } else {
+               addr = (struct sockaddr*)&addr4;
+               addrlen = sizeof(addr4);
+       }
+
+       if ((fd = socket(family, SOCK_STREAM, IPPROTO_TCP)) < 0) {
+               perror("socket");
+               goto out;
+       }
+
+       if (ipv6 && setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&v6only,
+                              sizeof(v6only)) < 0) {
+               perror("setsockopt IPV6_V6ONLY");
+               goto out;
+       }
+
+       if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr,
+                      sizeof(reuseaddr)) < 0) {
+               perror("setsockopt SO_REUSEADDR");
+               goto out;
+       }
+
+       if (bind(fd, addr, addrlen) < 0) {
+               perror("bind");
+               goto out;
+       }
+
+       if (any)
+               return fd;
+
+       if (listen(fd, 1) < 0) {
+               perror("listen");
+               goto out;
+       }
+       return fd;
+out:
+       close(fd);
+       return ret;
+}
+
+int main(void)
+{
+       int listenfd;
+       int fd1, fd2;
+
+       fprintf(stderr, "Opening 127.0.0.1:%d\n", PORT);
+       listenfd = open_port(0, 0);
+       if (listenfd < 0)
+               error(1, errno, "Couldn't open listen socket");
+       fprintf(stderr, "Opening INADDR_ANY:%d\n", PORT);
+       fd1 = open_port(0, 1);
+       if (fd1 >= 0)
+               error(1, 0, "Was allowed to create an ipv4 reuseport on a already bound non-reuseport socket");
+       fprintf(stderr, "Opening in6addr_any:%d\n", PORT);
+       fd1 = open_port(1, 1);
+       if (fd1 < 0)
+               error(1, errno, "Couldn't open ipv6 reuseport");
+       fprintf(stderr, "Opening INADDR_ANY:%d\n", PORT);
+       fd2 = open_port(0, 1);
+       if (fd2 >= 0)
+               error(1, 0, "Was allowed to create an ipv4 reuseport on a already bound non-reuseport socket");
+       close(fd1);
+       fprintf(stderr, "Opening INADDR_ANY:%d after closing ipv6 socket\n", PORT);
+       fd1 = open_port(0, 1);
+       if (fd1 >= 0)
+               error(1, 0, "Was allowed to create an ipv4 reuseport on an already bound non-reuseport socket with no ipv6");
+       fprintf(stderr, "Success");
+       return 0;
+}
index b23d6f54de7bd10489bdadd73ed134d231b9b490..2d646174729f9251c1780e0437180183c1ac5f31 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Test functionality of BPF filters with SO_REUSEPORT.  This program creates
  * an SO_REUSEPORT receiver group containing one socket per CPU core. It then
index 6f20bc9ff6277909d5d8a345ee3f1e3b4877d46c..365c32e841897e0c43e8372a21086d1ccabe35c5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Test functionality of BPF filters with SO_REUSEPORT. Same test as
  * in reuseport_bpf_cpu, only as one socket per NUMA node.
index 90958aaaafb93dc826028fc1c27e230ca8898186..fe3230c5598639f30586142fac2f1eda851c7c3d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * It is possible to use SO_REUSEPORT to open multiple sockets bound to
  * equivalent local addresses using AF_INET and AF_INET6 at the same time.  If
index 5246e782d6e80699010c6c3af75dd72df02d92fc..21fe149e3de1ea5abaaeee983944929086222751 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if [ $(id -u) != 0 ]; then
        echo $msg must be run as root >&2
index 16058bbea7a8501324ce6c9c639f5219d69979ba..b093f39c298c3f4d7ee43eed7c58772860f55da4 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 echo "--------------------"
 echo "running socket test"
index 0f227f2f9be918d50247a0d25fa6e8446ee95f7d..afca1ead677f4a0dfaa3f475316f664f02b1b25b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
index 8b29796d46aa54e17a9f14f5f8e621951a50537f..65677909c574dffc2d9784d6563b92bbd26931ff 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs bpf test using test_bpf kernel module
 
 if /sbin/modprobe -q test_bpf ; then
index 92fb8ee917c5632b58b85402659f5ac2023ebef0..a728040edbe18e14061eda8302043f340392e27f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -I../../../../../usr/include
 
 TEST_PROGS := hwtstamp_config rxtimestamp timestamping txtimestamp
index e8b685a7f15fc3c474eb644c405240e9aba979c2..e1fdee84102119175390a727f80039802d6d9b16 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Test program for SIOC{G,S}HWTSTAMP
  * Copyright 2013 Solarflare Communications
  * Author: Ben Hutchings
index 00f286661dcd2c0459941e03dcccf0af4d17fd37..dd4162fc0419bca7a7dccd17db8b99b61fb7f4a3 100644 (file)
@@ -341,7 +341,7 @@ int main(int argc, char **argv)
                        return 0;
                case 'n':
                        t = atoi(optarg);
-                       if (t > ARRAY_SIZE(test_cases))
+                       if (t >= ARRAY_SIZE(test_cases))
                                error(1, 0, "Invalid test case: %d", t);
                        all_tests = false;
                        test_cases[t].enabled = true;
index 437205f8b7143591a3050c8f04422267cf4e7ce5..96a976c745504f9f01a736c95f51131bae79562d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <sched.h>
 #include <unistd.h>
index ae3a0d68e9664dd0e0c273dc829adb05c54509f3..1182d4e437a2c16ecbffd5c11e83e4b7faadd3da 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <sched.h>
 #include <unistd.h>
index 72c3ac2323e15faaeaf2d160063facfa74323a7c..f6b1338730db5c17c479980682cafe001bbf9917 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for powerpc selftests
 
 # ARCH can be overridden by the user for cross compiling
index fb96a89bd953bf471fce6c6766ab00e0664ddfbe..a35058e3766c2408955f045df4ca39786f34f33f 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_GEN_PROGS := gettimeofday context_switch mmap_bench futex_bench null_syscall
 
 CFLAGS += -O2
index b24485ab30e2e8f97b6ab4565b3d5b5fbd5cccea..1be547434a49c3feb8f7e40c03d4b5260a3b30d4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := cache_shape
 
 all: $(TEST_PROGS)
index 681ab19d0a8486b5dafe7b25e5148e4c4d4e0e0b..ac4a52e19e590cd6b8019d0d57ec1b9bcf78fb55 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # The loops are all 64-bit code
 CFLAGS += -m64
 CFLAGS += -I$(CURDIR)
index 2d14a9b4248c7e1f24c2fc3aaab2c32a311d372c..0bab35f6777a204ef2fc1e85a1e5eb4eb62e349d 100644 (file)
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define EXPORT_SYMBOL(x)
index 80d34a9ffff425d40ba5a169e94f160594e45764..5ffe04d802c9071e92d8f57e53f20568cb1f4d0c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <ppc-asm.h>
 
 #define CONFIG_ALTIVEC
index 7fb436f82d16e629463e0db21157bbef150fbbd7..0f6873618552339b537cab5fa7939b0b23e1b8d4 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <malloc.h>
 #include <string.h>
 #include <stdlib.h>
index c5639deb8887ed49acd3e3238c0384a903b6fbf2..55d7db7a616bcd7661fceeb470ecb6f153cd9eac 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_GEN_PROGS := dscr_default_test dscr_explicit_test dscr_user_test  \
              dscr_inherit_test dscr_inherit_exec_test dscr_sysfs_test  \
              dscr_sysfs_thread_test
index 12eaddf72e6630bbee056d1445ef8e2aa264f6c7..886dc026fe7af1dbfb2768cbc1a9786e17e1b91a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SELFTESTS_POWERPC_BASIC_ASM_H
 #define _SELFTESTS_POWERPC_BASIC_ASM_H
 
index 0fb0bd3b28c92ecebcb1824caae0f900f31a647d..f36061eb6f0f1672b9d8e5b6756d316c18bde442 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _SELFTESTS_POWERPC_INSTRUCTIONS_H
 #define _SELFTESTS_POWERPC_INSTRUCTIONS_H
 
index fa8bae920c911f81f97c26f9f6e72157f7595379..0dd3a01fdab92bc887ddc70cda06fd20c89c5154 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_GEN_PROGS := fpu_syscall fpu_preempt fpu_signal vmx_syscall vmx_preempt vmx_signal vsx_preempt
 
 include ../../lib.mk
index 1cffe54dccfb8a31f4b704756ce0e82b4393e38c..bf315bcbe66393dbf32d58c48e79ff2338bcbe5c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 noarg:
        $(MAKE) -C ../
 
index 49003674de4fa3d2e0856dacf7dc3f51cee62132..9932359ce38fcd47b325aff5e6135f7bb2ef43c6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <sys/mman.h>
 #include <unistd.h>
index e4e55d1d3e0fae00a3c91d39ba35242e57f06b22..6e1629bf5b09dbfb850acdb0f0c60aafdc6e3ea6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 noarg:
        $(MAKE) -C ../
 
index 6001fb0a377a70f9ee1a57acd19424ec44bda6ae..c4e64bc2e2650a2e02fac4a6f891e973a126eced 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 noarg:
        $(MAKE) -C ../../
 
index 8932263e5a749c60c00e8f47f8d83f155bb89f41..48030526650437f8a7c5efeb1246259a5cb64998 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
               ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
               ptrace-tm-spd-vsx ptrace-tm-spr
index f0eef27458e2bdb6193917ed697db471b3583763..a7cbd5082e27175822bb2d351b7ebdbf9c0e345d 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := signal signal_tm
 
 all: $(TEST_PROGS)
index 557b9379f3bb9c83ebc1326c27a77e21f855119e..1125e489055e156fe311d960688a0a04e16a1159 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # The loops are all 64-bit code
 CFLAGS += -m64
 CFLAGS += -I$(CURDIR)
index 11bece87e8808361b7c8904b86a4d6a95954c768..136242ec4b0e61357c46410dbf8e02b91c7580b0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <ppc-asm.h>
 
 #ifndef r1
index 30b1222380cae8c81459fcb3ecad64e05a37ec14..8250db25b379818e326a50518a87faed0d1879aa 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <malloc.h>
 #include <stdlib.h>
 #include <string.h>
index b92c2a132c4f5d038465ef190584da31de3a79a9..30b8ff8fb82e7a161759bf68363e69dcbcde2304 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_GEN_PROGS := switch_endian_test
 
 ASFLAGS += -O2 -Wall -g -nostdlib -m64
index e2484d2c24f48a4b1e2034cb2f7ebf76127c4db8..927a5c675e832ea8b30a6f63a28b318842d5563a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "common.h"
 
 /*
index 69e399698c6483fdb50c3f8a76f2708fbb4b940d..1434cbc2a6ad0b16fbc1c24df3e962afbecaa347 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <ppc-asm.h>
 #include <asm/unistd.h>
 
index bceb53f57573b5d4a6ad07105fd8321345c7e93a..cc493046723511bd961ad41b422e1a476a4debd9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include "common.h"
 
        .data
index fbebc022edf63698f22379bd1a47faf3a3e5ca7a..26a20682c9a48c525200a5f016890cccd64b68b9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifdef __NR_semop
 DO_TEST(semop, __NR_semop)
 #endif
index 7bfcd454fb2aa0e3655522f8fa664a54dc9937c4..fca7c7f5e640d3bf11489b4e5f4485b1506c34e4 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 SIGNAL_CONTEXT_CHK_TESTS := tm-signal-context-chk-gpr tm-signal-context-chk-fpu \
        tm-signal-context-chk-vmx tm-signal-context-chk-vsx
 
index a7ac2e4c60d9135d9d939fd06ad41c7d3f18c384..4cdb83964bb3298c0e19d0fd16b2e4f585498049 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Test context switching to see if the DSCR SPR is correctly preserved
  * when within a transaction.
  *
index 431f61ae236814947d21c1c62dfc642bcebb6ca2..bd1ca25febe4c71543a646a901c0470118307063 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <ppc-asm.h>
 #include <asm/unistd.h>
 
index 5742f6876b251383f3a22748d8348729b10e335b..81d3069ffb8461d4a7a716c3d0ebd370c316349b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <byteswap.h>
 #include "utils.h"
index 35aa1c8f2df21eb5cea2e12a550527177229097b..c7923b205222dd0361a8971426780fde5498c19a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef CROSS_COMPILE
 uname_M := $(shell uname -m 2>/dev/null || echo not)
 ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
index f7499d1c0415f3f8aa00779b5768cfa3c536f871..62a93cc61b7cc377be7eb749e2509d9939f09838 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
  *
index a06f027e9d1642a0c8b12591dae0bfe05e4ec2da..79950f9a26fd660fa49ef4f75e614a620e378e81 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
  *
index 8d494f7bebdbd6d118e89a81a6bb0f8d93090654..f84d4ee111d37bba19fab3b077dadb2073891429 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...)
  *
index c5f2440ba1f707fe3c447cedcd00756c1c735496..5ef57855a2be34d10db817551612472ea5291f9e 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for pstore selftests.
 # Expects pstore backend is registered.
 
index d4064c742c2673424b0fbac81afde676fa24f4d0..ef06de0898b73980d4af4a1992c20f62b465cedf 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -I../../../../usr/include/
 TEST_PROGS := testptp
 LDLIBS += -lrt
index c34cd8ac8aaab6944fd4e68fd2c6f4f163a67aa7..54900657eb442f81835e7e7c8f1647f8bedceb2d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <signal.h>
index 16b01559fa55856b425763acfb31f3872d923897..4bed0b678f8b8124d82bfd2acec0e5466b6cf915 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all: srcu.c store_buffering
 
 LINUX_SOURCE = ../../../../../..
index 4a3d538fef128c3eb71ec5bd6b2c779bd3cc33d8..891ad13e95b2dc420a0e84344c697b5d5afeb08c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * This header has been modifies to remove definitions of types that
  * are defined in standard userspace headers or are problematic for some
index c9e8bc5082a78d77ec34a673c11beb745a70fbdc..e05182d3e47d195f9b7a4d9f533cc82f7a079c3a 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/awk -f
+# SPDX-License-Identifier: GPL-2.0
 
 # Modify SRCU for formal verification. The first argument should be srcu.h and
 # the second should be srcu.c. Outputs modified srcu.h and srcu.c into the
index a64955447995f1def9c01c7b92b7ab635a227078..570a49d9da7e2bbd6237bc80d3ee758f02aacb53 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ASSUME_H
 #define ASSUME_H
 
index 6687acc08e6dfbb967b527672582276e1d4c4842..be3fdd351937c254fd8fe8f8cd6f16ea8b09e039 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BARRIERS_H
 #define BARRIERS_H
 
index 2a80e91f78e725f46922155a57174c296e8f8f80..5e7912c6a5215977f6dc84547e1bae68efa65eed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BUG_ON_H
 #define BUG_ON_H
 
index 29eb5d2697ed8416f24bed05f3065dd86f33d541..e67ee5b3dd7c86377098a510eb281f1104efa39e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <config.h>
 
 /* Include all source files. */
index a60038aeea7a9f6785a9f713e1cf16dc5008c042..283d7103334f4e5ee3b8abfab5025ada7ecebff3 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* "Cheater" definitions based on restricted Kconfig choices. */
 
 #undef CONFIG_TINY_RCU
index 5ec582a53018de373f2f3eb6bc6321b3bb118a11..e5202d4cff30387309908e2fdd8517cdaba119ad 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <config.h>
 
 #include <assert.h>
index 3aad639178580f9b58e4b6cb0769f560befbfea0..0dd27aa517a79fe3527fa352d358bfad30cc9f7e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef INT_TYPEDEFS_H
 #define INT_TYPEDEFS_H
 
index 35600466557665ce6a70d409e52e19395cbd793c..cf6938d679d7fe6a0458f633dd208127c98c3a80 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LOCKS_H
 #define LOCKS_H
 
index ca892e3b235199b31e9b3deb6ac1be891b9ade6c..9440cc39e3c6860fc5c26134c44a38e41861c986 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <config.h>
 
 #include "misc.h"
index 3de5a49de49b2bf5107848c5909e4a736a3af273..27e67a3f291f76ffc1bbde72128bec404e0f06c5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PERCPU_H
 #define PERCPU_H
 
index 4f1b068e9b7a6e68d3472efb4cbe9ba84759e137..b4083ae348fb2c1e1c2614bed5c94cb5ac18c5b3 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <config.h>
 
 #include "preempt.h"
index 2f95ee0e4dd5e121ca1455f1222dce079cb6fc0f..f8b762cd214cb59520e447548014cd8220b72f24 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef PREEMPT_H
 #define PREEMPT_H
 
index ac9cbc62b4111f0a553f44505d3ab2e8802dad90..97f592048e0b7cdfa57dd0432959925f634765f0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <config.h>
 
 #include <assert.h>
index e58c8dfd3e901af3284945e1b9529c711ce521f2..28b9603009711825f6271f488cd5a685330f10ec 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef WORKQUEUES_H
 #define WORKQUEUES_H
 
index 3a3aee1492253799a238b87b42a883fe8a623155..ad21b925fbb45ce2e473e19e46a26d55aaaf67a3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CBMC_FLAGS = -I../.. -I../../src -I../../include -I../../empty_includes -32 -pointer-check -mm pso
 
 all:
index 470b1105a1127126bdab4e9ac3132f61f7eccab2..2ce2016f7871a2f26f92cd95f17c02c0ee073b44 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <src/combined_source.c>
 
 int x;
index d1545972a0fa431b4bb8e2cc75188142a105e6a6..2fe1f0339b4fa0e92086e40092e0a798cfe7f1f0 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 # This script expects a mode (either --should-pass or --should-fail) followed by
 # an input file. The script uses the following environment variables. The test C
index aeb0c805f3ca0f9471ae0f211e5633aa9d7a52f8..fce7f4ce069251a675c05f30f412c5361c4dbde3 100644 (file)
@@ -1,8 +1,17 @@
-TEST_GEN_PROGS := seccomp_bpf
-CFLAGS += -Wl,-no-as-needed -Wall
-LDFLAGS += -lpthread
+# SPDX-License-Identifier: GPL-2.0
+all:
 
 include ../lib.mk
 
-$(TEST_GEN_PROGS): seccomp_bpf.c ../kselftest_harness.h
-       $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+.PHONY: all clean
+
+BINARIES := seccomp_bpf seccomp_benchmark
+CFLAGS += -Wl,-no-as-needed -Wall
+
+seccomp_bpf: seccomp_bpf.c ../kselftest_harness.h
+       $(CC) $(CFLAGS) $(LDFLAGS) -lpthread $< -o $@
+
+TEST_PROGS += $(BINARIES)
+EXTRA_CLEAN := $(BINARIES)
+
+all: $(BINARIES)
diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c
new file mode 100644 (file)
index 0000000..5838c86
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Strictly speaking, this is not a test. But it can report during test
+ * runs so relative performace can be measured.
+ */
+#define _GNU_SOURCE
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <unistd.h>
+#include <linux/filter.h>
+#include <linux/seccomp.h>
+#include <sys/prctl.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+
+#define ARRAY_SIZE(a)    (sizeof(a) / sizeof(a[0]))
+
+unsigned long long timing(clockid_t clk_id, unsigned long long samples)
+{
+       pid_t pid, ret;
+       unsigned long long i;
+       struct timespec start, finish;
+
+       pid = getpid();
+       assert(clock_gettime(clk_id, &start) == 0);
+       for (i = 0; i < samples; i++) {
+               ret = syscall(__NR_getpid);
+               assert(pid == ret);
+       }
+       assert(clock_gettime(clk_id, &finish) == 0);
+
+       i = finish.tv_sec - start.tv_sec;
+       i *= 1000000000;
+       i += finish.tv_nsec - start.tv_nsec;
+
+       printf("%lu.%09lu - %lu.%09lu = %llu\n",
+               finish.tv_sec, finish.tv_nsec,
+               start.tv_sec, start.tv_nsec,
+               i);
+
+       return i;
+}
+
+unsigned long long calibrate(void)
+{
+       unsigned long long i;
+
+       printf("Calibrating reasonable sample size...\n");
+
+       for (i = 5; ; i++) {
+               unsigned long long samples = 1 << i;
+
+               /* Find something that takes more than 5 seconds to run. */
+               if (timing(CLOCK_REALTIME, samples) / 1000000000ULL > 5)
+                       return samples;
+       }
+}
+
+int main(int argc, char *argv[])
+{
+       struct sock_filter filter[] = {
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+       };
+       struct sock_fprog prog = {
+               .len = (unsigned short)ARRAY_SIZE(filter),
+               .filter = filter,
+       };
+       long ret;
+       unsigned long long samples;
+       unsigned long long native, filtered;
+
+       if (argc > 1)
+               samples = strtoull(argv[1], NULL, 0);
+       else
+               samples = calibrate();
+
+       printf("Benchmarking %llu samples...\n", samples);
+
+       native = timing(CLOCK_PROCESS_CPUTIME_ID, samples) / samples;
+       printf("getpid native: %llu ns\n", native);
+
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       assert(ret == 0);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
+       assert(ret == 0);
+
+       filtered = timing(CLOCK_PROCESS_CPUTIME_ID, samples) / samples;
+       printf("getpid RET_ALLOW: %llu ns\n", filtered);
+
+       printf("Estimated seccomp overhead per syscall: %llu ns\n",
+               filtered - native);
+
+       if (filtered == native)
+               printf("Trying running again with more samples.\n");
+
+       return 0;
+}
index 4d6f92a9df6b4aaa0bec897b108bf7cafcae41ef..24dbf634e2dd8c869a7201e7d89efe4102fa6373 100644 (file)
@@ -6,10 +6,18 @@
  */
 
 #include <sys/types.h>
-#include <asm/siginfo.h>
-#define __have_siginfo_t 1
-#define __have_sigval_t 1
-#define __have_sigevent_t 1
+
+/*
+ * glibc 2.26 and later have SIGSYS in siginfo_t. Before that,
+ * we need to use the kernel's siginfo.h file and trick glibc
+ * into accepting it.
+ */
+#if !__GLIBC_PREREQ(2, 26)
+# include <asm/siginfo.h>
+# define __have_siginfo_t 1
+# define __have_sigval_t 1
+# define __have_sigevent_t 1
+#endif
 
 #include <errno.h>
 #include <linux/filter.h>
 #define SECCOMP_MODE_FILTER 2
 #endif
 
-#ifndef SECCOMP_RET_KILL
-#define SECCOMP_RET_KILL        0x00000000U /* kill the task immediately */
-#define SECCOMP_RET_TRAP        0x00030000U /* disallow and force a SIGSYS */
-#define SECCOMP_RET_ERRNO       0x00050000U /* returns an errno */
-#define SECCOMP_RET_TRACE       0x7ff00000U /* pass to a tracer or disallow */
-#define SECCOMP_RET_ALLOW       0x7fff0000U /* allow */
-
-/* Masks for the return value sections. */
-#define SECCOMP_RET_ACTION      0x7fff0000U
-#define SECCOMP_RET_DATA        0x0000ffffU
-
+#ifndef SECCOMP_RET_ALLOW
 struct seccomp_data {
        int nr;
        __u32 arch;
@@ -87,6 +85,70 @@ struct seccomp_data {
 };
 #endif
 
+#ifndef SECCOMP_RET_KILL_PROCESS
+#define SECCOMP_RET_KILL_PROCESS 0x80000000U /* kill the process */
+#define SECCOMP_RET_KILL_THREAD         0x00000000U /* kill the thread */
+#endif
+#ifndef SECCOMP_RET_KILL
+#define SECCOMP_RET_KILL        SECCOMP_RET_KILL_THREAD
+#define SECCOMP_RET_TRAP        0x00030000U /* disallow and force a SIGSYS */
+#define SECCOMP_RET_ERRNO       0x00050000U /* returns an errno */
+#define SECCOMP_RET_TRACE       0x7ff00000U /* pass to a tracer or disallow */
+#define SECCOMP_RET_ALLOW       0x7fff0000U /* allow */
+#endif
+#ifndef SECCOMP_RET_LOG
+#define SECCOMP_RET_LOG                 0x7ffc0000U /* allow after logging */
+#endif
+
+#ifndef __NR_seccomp
+# if defined(__i386__)
+#  define __NR_seccomp 354
+# elif defined(__x86_64__)
+#  define __NR_seccomp 317
+# elif defined(__arm__)
+#  define __NR_seccomp 383
+# elif defined(__aarch64__)
+#  define __NR_seccomp 277
+# elif defined(__hppa__)
+#  define __NR_seccomp 338
+# elif defined(__powerpc__)
+#  define __NR_seccomp 358
+# elif defined(__s390__)
+#  define __NR_seccomp 348
+# else
+#  warning "seccomp syscall number unknown for this architecture"
+#  define __NR_seccomp 0xffff
+# endif
+#endif
+
+#ifndef SECCOMP_SET_MODE_STRICT
+#define SECCOMP_SET_MODE_STRICT 0
+#endif
+
+#ifndef SECCOMP_SET_MODE_FILTER
+#define SECCOMP_SET_MODE_FILTER 1
+#endif
+
+#ifndef SECCOMP_GET_ACTION_AVAIL
+#define SECCOMP_GET_ACTION_AVAIL 2
+#endif
+
+#ifndef SECCOMP_FILTER_FLAG_TSYNC
+#define SECCOMP_FILTER_FLAG_TSYNC 1
+#endif
+
+#ifndef SECCOMP_FILTER_FLAG_LOG
+#define SECCOMP_FILTER_FLAG_LOG 2
+#endif
+
+#ifndef seccomp
+int seccomp(unsigned int op, unsigned int flags, void *args)
+{
+       errno = 0;
+       return syscall(__NR_seccomp, op, flags, args);
+}
+#endif
+
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define syscall_arg(_n) (offsetof(struct seccomp_data, args[_n]))
 #elif __BYTE_ORDER == __BIG_ENDIAN
@@ -136,7 +198,7 @@ TEST(no_new_privs_support)
        }
 }
 
-/* Tests kernel support by checking for a copy_from_user() fault on NULL. */
+/* Tests kernel support by checking for a copy_from_user() fault on NULL. */
 TEST(mode_filter_support)
 {
        long ret;
@@ -342,6 +404,28 @@ TEST(empty_prog)
        EXPECT_EQ(EINVAL, errno);
 }
 
+TEST(log_all)
+{
+       struct sock_filter filter[] = {
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_LOG),
+       };
+       struct sock_fprog prog = {
+               .len = (unsigned short)ARRAY_SIZE(filter),
+               .filter = filter,
+       };
+       long ret;
+       pid_t parent = getppid();
+
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
+       ASSERT_EQ(0, ret);
+
+       /* getppid() should succeed and be logged (no check for logging) */
+       EXPECT_EQ(parent, syscall(__NR_getppid));
+}
+
 TEST_SIGNAL(unknown_ret_is_kill_inside, SIGSYS)
 {
        struct sock_filter filter[] = {
@@ -520,6 +604,117 @@ TEST_SIGNAL(KILL_one_arg_six, SIGSYS)
        close(fd);
 }
 
+/* This is a thread task to die via seccomp filter violation. */
+void *kill_thread(void *data)
+{
+       bool die = (bool)data;
+
+       if (die) {
+               prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
+               return (void *)SIBLING_EXIT_FAILURE;
+       }
+
+       return (void *)SIBLING_EXIT_UNKILLED;
+}
+
+/* Prepare a thread that will kill itself or both of us. */
+void kill_thread_or_group(struct __test_metadata *_metadata, bool kill_process)
+{
+       pthread_t thread;
+       void *status;
+       /* Kill only when calling __NR_prctl. */
+       struct sock_filter filter_thread[] = {
+               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
+                       offsetof(struct seccomp_data, nr)),
+               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_prctl, 0, 1),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL_THREAD),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+       };
+       struct sock_fprog prog_thread = {
+               .len = (unsigned short)ARRAY_SIZE(filter_thread),
+               .filter = filter_thread,
+       };
+       struct sock_filter filter_process[] = {
+               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
+                       offsetof(struct seccomp_data, nr)),
+               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_prctl, 0, 1),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL_PROCESS),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+       };
+       struct sock_fprog prog_process = {
+               .len = (unsigned short)ARRAY_SIZE(filter_process),
+               .filter = filter_process,
+       };
+
+       ASSERT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
+               TH_LOG("Kernel does not support PR_SET_NO_NEW_PRIVS!");
+       }
+
+       ASSERT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, 0,
+                            kill_process ? &prog_process : &prog_thread));
+
+       /*
+        * Add the KILL_THREAD rule again to make sure that the KILL_PROCESS
+        * flag cannot be downgraded by a new filter.
+        */
+       ASSERT_EQ(0, seccomp(SECCOMP_SET_MODE_FILTER, 0, &prog_thread));
+
+       /* Start a thread that will exit immediately. */
+       ASSERT_EQ(0, pthread_create(&thread, NULL, kill_thread, (void *)false));
+       ASSERT_EQ(0, pthread_join(thread, &status));
+       ASSERT_EQ(SIBLING_EXIT_UNKILLED, (unsigned long)status);
+
+       /* Start a thread that will die immediately. */
+       ASSERT_EQ(0, pthread_create(&thread, NULL, kill_thread, (void *)true));
+       ASSERT_EQ(0, pthread_join(thread, &status));
+       ASSERT_NE(SIBLING_EXIT_FAILURE, (unsigned long)status);
+
+       /*
+        * If we get here, only the spawned thread died. Let the parent know
+        * the whole process didn't die (i.e. this thread, the spawner,
+        * stayed running).
+        */
+       exit(42);
+}
+
+TEST(KILL_thread)
+{
+       int status;
+       pid_t child_pid;
+
+       child_pid = fork();
+       ASSERT_LE(0, child_pid);
+       if (child_pid == 0) {
+               kill_thread_or_group(_metadata, false);
+               _exit(38);
+       }
+
+       ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0));
+
+       /* If only the thread was killed, we'll see exit 42. */
+       ASSERT_TRUE(WIFEXITED(status));
+       ASSERT_EQ(42, WEXITSTATUS(status));
+}
+
+TEST(KILL_process)
+{
+       int status;
+       pid_t child_pid;
+
+       child_pid = fork();
+       ASSERT_LE(0, child_pid);
+       if (child_pid == 0) {
+               kill_thread_or_group(_metadata, true);
+               _exit(38);
+       }
+
+       ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0));
+
+       /* If the entire process was killed, we'll see SIGSYS. */
+       ASSERT_TRUE(WIFSIGNALED(status));
+       ASSERT_EQ(SIGSYS, WTERMSIG(status));
+}
+
 /* TODO(wad) add 64-bit versus 32-bit arg tests. */
 TEST(arg_out_of_range)
 {
@@ -541,26 +736,30 @@ TEST(arg_out_of_range)
        EXPECT_EQ(EINVAL, errno);
 }
 
+#define ERRNO_FILTER(name, errno)                                      \
+       struct sock_filter _read_filter_##name[] = {                    \
+               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,                          \
+                       offsetof(struct seccomp_data, nr)),             \
+               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_read, 0, 1),       \
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO | errno),     \
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),             \
+       };                                                              \
+       struct sock_fprog prog_##name = {                               \
+               .len = (unsigned short)ARRAY_SIZE(_read_filter_##name), \
+               .filter = _read_filter_##name,                          \
+       }
+
+/* Make sure basic errno values are correctly passed through a filter. */
 TEST(ERRNO_valid)
 {
-       struct sock_filter filter[] = {
-               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
-                       offsetof(struct seccomp_data, nr)),
-               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_read, 0, 1),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO | E2BIG),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
-       };
-       struct sock_fprog prog = {
-               .len = (unsigned short)ARRAY_SIZE(filter),
-               .filter = filter,
-       };
+       ERRNO_FILTER(valid, E2BIG);
        long ret;
        pid_t parent = getppid();
 
        ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
        ASSERT_EQ(0, ret);
 
-       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_valid);
        ASSERT_EQ(0, ret);
 
        EXPECT_EQ(parent, syscall(__NR_getppid));
@@ -568,26 +767,17 @@ TEST(ERRNO_valid)
        EXPECT_EQ(E2BIG, errno);
 }
 
+/* Make sure an errno of zero is correctly handled by the arch code. */
 TEST(ERRNO_zero)
 {
-       struct sock_filter filter[] = {
-               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
-                       offsetof(struct seccomp_data, nr)),
-               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_read, 0, 1),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO | 0),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
-       };
-       struct sock_fprog prog = {
-               .len = (unsigned short)ARRAY_SIZE(filter),
-               .filter = filter,
-       };
+       ERRNO_FILTER(zero, 0);
        long ret;
        pid_t parent = getppid();
 
        ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
        ASSERT_EQ(0, ret);
 
-       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_zero);
        ASSERT_EQ(0, ret);
 
        EXPECT_EQ(parent, syscall(__NR_getppid));
@@ -595,26 +785,21 @@ TEST(ERRNO_zero)
        EXPECT_EQ(0, read(0, NULL, 0));
 }
 
+/*
+ * The SECCOMP_RET_DATA mask is 16 bits wide, but errno is smaller.
+ * This tests that the errno value gets capped correctly, fixed by
+ * 580c57f10768 ("seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO").
+ */
 TEST(ERRNO_capped)
 {
-       struct sock_filter filter[] = {
-               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
-                       offsetof(struct seccomp_data, nr)),
-               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_read, 0, 1),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO | 4096),
-               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
-       };
-       struct sock_fprog prog = {
-               .len = (unsigned short)ARRAY_SIZE(filter),
-               .filter = filter,
-       };
+       ERRNO_FILTER(capped, 4096);
        long ret;
        pid_t parent = getppid();
 
        ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
        ASSERT_EQ(0, ret);
 
-       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_capped);
        ASSERT_EQ(0, ret);
 
        EXPECT_EQ(parent, syscall(__NR_getppid));
@@ -622,6 +807,37 @@ TEST(ERRNO_capped)
        EXPECT_EQ(4095, errno);
 }
 
+/*
+ * Filters are processed in reverse order: last applied is executed first.
+ * Since only the SECCOMP_RET_ACTION mask is tested for return values, the
+ * SECCOMP_RET_DATA mask results will follow the most recently applied
+ * matching filter return (and not the lowest or highest value).
+ */
+TEST(ERRNO_order)
+{
+       ERRNO_FILTER(first,  11);
+       ERRNO_FILTER(second, 13);
+       ERRNO_FILTER(third,  12);
+       long ret;
+       pid_t parent = getppid();
+
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_first);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_second);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog_third);
+       ASSERT_EQ(0, ret);
+
+       EXPECT_EQ(parent, syscall(__NR_getppid));
+       EXPECT_EQ(-1, read(0, NULL, 0));
+       EXPECT_EQ(12, errno);
+}
+
 FIXTURE_DATA(TRAP) {
        struct sock_fprog prog;
 };
@@ -676,7 +892,7 @@ TEST_F_SIGNAL(TRAP, ign, SIGSYS)
        syscall(__NR_getpid);
 }
 
-static struct siginfo TRAP_info;
+static siginfo_t TRAP_info;
 static volatile int TRAP_nr;
 static void TRAP_action(int nr, siginfo_t *info, void *void_context)
 {
@@ -735,6 +951,7 @@ TEST_F(TRAP, handler)
 
 FIXTURE_DATA(precedence) {
        struct sock_fprog allow;
+       struct sock_fprog log;
        struct sock_fprog trace;
        struct sock_fprog error;
        struct sock_fprog trap;
@@ -746,6 +963,13 @@ FIXTURE_SETUP(precedence)
        struct sock_filter allow_insns[] = {
                BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
        };
+       struct sock_filter log_insns[] = {
+               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
+                       offsetof(struct seccomp_data, nr)),
+               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_getpid, 1, 0),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_LOG),
+       };
        struct sock_filter trace_insns[] = {
                BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
                        offsetof(struct seccomp_data, nr)),
@@ -782,6 +1006,7 @@ FIXTURE_SETUP(precedence)
        memcpy(self->_x.filter, &_x##_insns, sizeof(_x##_insns)); \
        self->_x.len = (unsigned short)ARRAY_SIZE(_x##_insns)
        FILTER_ALLOC(allow);
+       FILTER_ALLOC(log);
        FILTER_ALLOC(trace);
        FILTER_ALLOC(error);
        FILTER_ALLOC(trap);
@@ -792,6 +1017,7 @@ FIXTURE_TEARDOWN(precedence)
 {
 #define FILTER_FREE(_x) if (self->_x.filter) free(self->_x.filter)
        FILTER_FREE(allow);
+       FILTER_FREE(log);
        FILTER_FREE(trace);
        FILTER_FREE(error);
        FILTER_FREE(trap);
@@ -809,6 +1035,8 @@ TEST_F(precedence, allow_ok)
 
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
@@ -833,6 +1061,8 @@ TEST_F_SIGNAL(precedence, kill_is_highest, SIGSYS)
 
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
@@ -864,6 +1094,8 @@ TEST_F_SIGNAL(precedence, kill_is_highest_in_any_order, SIGSYS)
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trap);
@@ -885,6 +1117,8 @@ TEST_F_SIGNAL(precedence, trap_is_second, SIGSYS)
 
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
@@ -910,6 +1144,8 @@ TEST_F_SIGNAL(precedence, trap_is_second_in_any_order, SIGSYS)
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trap);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
@@ -931,6 +1167,8 @@ TEST_F(precedence, errno_is_third)
 
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
@@ -949,6 +1187,8 @@ TEST_F(precedence, errno_is_third_in_any_order)
        ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
        ASSERT_EQ(0, ret);
 
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->error);
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
@@ -971,6 +1211,8 @@ TEST_F(precedence, trace_is_fourth)
 
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->trace);
        ASSERT_EQ(0, ret);
        /* Should work just fine. */
@@ -992,12 +1234,54 @@ TEST_F(precedence, trace_is_fourth_in_any_order)
        ASSERT_EQ(0, ret);
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
        ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
        /* Should work just fine. */
        EXPECT_EQ(parent, syscall(__NR_getppid));
        /* No ptracer */
        EXPECT_EQ(-1, syscall(__NR_getpid));
 }
 
+TEST_F(precedence, log_is_fifth)
+{
+       pid_t mypid, parent;
+       long ret;
+
+       mypid = getpid();
+       parent = getppid();
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
+       ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
+       /* Should work just fine. */
+       EXPECT_EQ(parent, syscall(__NR_getppid));
+       /* Should also work just fine */
+       EXPECT_EQ(mypid, syscall(__NR_getpid));
+}
+
+TEST_F(precedence, log_is_fifth_in_any_order)
+{
+       pid_t mypid, parent;
+       long ret;
+
+       mypid = getpid();
+       parent = getppid();
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       ASSERT_EQ(0, ret);
+
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->log);
+       ASSERT_EQ(0, ret);
+       ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->allow);
+       ASSERT_EQ(0, ret);
+       /* Should work just fine. */
+       EXPECT_EQ(parent, syscall(__NR_getppid));
+       /* Should also work just fine */
+       EXPECT_EQ(mypid, syscall(__NR_getpid));
+}
+
 #ifndef PTRACE_O_TRACESECCOMP
 #define PTRACE_O_TRACESECCOMP  0x00000080
 #endif
@@ -1262,6 +1546,13 @@ TEST_F(TRACE_poke, getpid_runs_normally)
 # error "Do not know how to find your architecture's registers and syscalls"
 #endif
 
+/* When the syscall return can't be changed, stub out the tests for it. */
+#ifdef SYSCALL_NUM_RET_SHARE_REG
+# define EXPECT_SYSCALL_RETURN(val, action)    EXPECT_EQ(-1, action)
+#else
+# define EXPECT_SYSCALL_RETURN(val, action)    EXPECT_EQ(val, action)
+#endif
+
 /* Use PTRACE_GETREGS and PTRACE_SETREGS when available. This is useful for
  * architectures without HAVE_ARCH_TRACEHOOK (e.g. User-mode Linux).
  */
@@ -1357,7 +1648,7 @@ void change_syscall(struct __test_metadata *_metadata,
 #ifdef SYSCALL_NUM_RET_SHARE_REG
                TH_LOG("Can't modify syscall return on this architecture");
 #else
-               regs.SYSCALL_RET = 1;
+               regs.SYSCALL_RET = EPERM;
 #endif
 
 #ifdef HAVE_GETREGS
@@ -1426,6 +1717,8 @@ void tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee,
 
        if (nr == __NR_getpid)
                change_syscall(_metadata, tracee, __NR_getppid);
+       if (nr == __NR_open)
+               change_syscall(_metadata, tracee, -1);
 }
 
 FIXTURE_DATA(TRACE_syscall) {
@@ -1480,6 +1773,28 @@ FIXTURE_TEARDOWN(TRACE_syscall)
                free(self->prog.filter);
 }
 
+TEST_F(TRACE_syscall, ptrace_syscall_redirected)
+{
+       /* Swap SECCOMP_RET_TRACE tracer for PTRACE_SYSCALL tracer. */
+       teardown_trace_fixture(_metadata, self->tracer);
+       self->tracer = setup_trace_fixture(_metadata, tracer_ptrace, NULL,
+                                          true);
+
+       /* Tracer will redirect getpid to getppid. */
+       EXPECT_NE(self->mypid, syscall(__NR_getpid));
+}
+
+TEST_F(TRACE_syscall, ptrace_syscall_dropped)
+{
+       /* Swap SECCOMP_RET_TRACE tracer for PTRACE_SYSCALL tracer. */
+       teardown_trace_fixture(_metadata, self->tracer);
+       self->tracer = setup_trace_fixture(_metadata, tracer_ptrace, NULL,
+                                          true);
+
+       /* Tracer should skip the open syscall, resulting in EPERM. */
+       EXPECT_SYSCALL_RETURN(EPERM, syscall(__NR_open));
+}
+
 TEST_F(TRACE_syscall, syscall_allowed)
 {
        long ret;
@@ -1520,13 +1835,8 @@ TEST_F(TRACE_syscall, syscall_dropped)
        ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &self->prog, 0, 0);
        ASSERT_EQ(0, ret);
 
-#ifdef SYSCALL_NUM_RET_SHARE_REG
-       /* gettid has been skipped */
-       EXPECT_EQ(-1, syscall(__NR_gettid));
-#else
        /* gettid has been skipped and an altered return value stored. */
-       EXPECT_EQ(1, syscall(__NR_gettid));
-#endif
+       EXPECT_SYSCALL_RETURN(EPERM, syscall(__NR_gettid));
        EXPECT_NE(self->mytid, syscall(__NR_gettid));
 }
 
@@ -1557,6 +1867,7 @@ TEST_F(TRACE_syscall, skip_after_RET_TRACE)
        ASSERT_EQ(0, ret);
 
        /* Tracer will redirect getpid to getppid, and we should see EPERM. */
+       errno = 0;
        EXPECT_EQ(-1, syscall(__NR_getpid));
        EXPECT_EQ(EPERM, errno);
 }
@@ -1654,47 +1965,6 @@ TEST_F_SIGNAL(TRACE_syscall, kill_after_ptrace, SIGSYS)
        EXPECT_NE(self->mypid, syscall(__NR_getpid));
 }
 
-#ifndef __NR_seccomp
-# if defined(__i386__)
-#  define __NR_seccomp 354
-# elif defined(__x86_64__)
-#  define __NR_seccomp 317
-# elif defined(__arm__)
-#  define __NR_seccomp 383
-# elif defined(__aarch64__)
-#  define __NR_seccomp 277
-# elif defined(__hppa__)
-#  define __NR_seccomp 338
-# elif defined(__powerpc__)
-#  define __NR_seccomp 358
-# elif defined(__s390__)
-#  define __NR_seccomp 348
-# else
-#  warning "seccomp syscall number unknown for this architecture"
-#  define __NR_seccomp 0xffff
-# endif
-#endif
-
-#ifndef SECCOMP_SET_MODE_STRICT
-#define SECCOMP_SET_MODE_STRICT 0
-#endif
-
-#ifndef SECCOMP_SET_MODE_FILTER
-#define SECCOMP_SET_MODE_FILTER 1
-#endif
-
-#ifndef SECCOMP_FILTER_FLAG_TSYNC
-#define SECCOMP_FILTER_FLAG_TSYNC 1
-#endif
-
-#ifndef seccomp
-int seccomp(unsigned int op, unsigned int flags, void *args)
-{
-       errno = 0;
-       return syscall(__NR_seccomp, op, flags, args);
-}
-#endif
-
 TEST(seccomp_syscall)
 {
        struct sock_filter filter[] = {
@@ -1783,6 +2053,67 @@ TEST(seccomp_syscall_mode_lock)
        }
 }
 
+/*
+ * Test detection of known and unknown filter flags. Userspace needs to be able
+ * to check if a filter flag is supported by the current kernel and a good way
+ * of doing that is by attempting to enter filter mode, with the flag bit in
+ * question set, and a NULL pointer for the _args_ parameter. EFAULT indicates
+ * that the flag is valid and EINVAL indicates that the flag is invalid.
+ */
+TEST(detect_seccomp_filter_flags)
+{
+       unsigned int flags[] = { SECCOMP_FILTER_FLAG_TSYNC,
+                                SECCOMP_FILTER_FLAG_LOG };
+       unsigned int flag, all_flags;
+       int i;
+       long ret;
+
+       /* Test detection of known-good filter flags */
+       for (i = 0, all_flags = 0; i < ARRAY_SIZE(flags); i++) {
+               flag = flags[i];
+               ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
+               ASSERT_NE(ENOSYS, errno) {
+                       TH_LOG("Kernel does not support seccomp syscall!");
+               }
+               EXPECT_EQ(-1, ret);
+               EXPECT_EQ(EFAULT, errno) {
+                       TH_LOG("Failed to detect that a known-good filter flag (0x%X) is supported!",
+                              flag);
+               }
+
+               all_flags |= flag;
+       }
+
+       /* Test detection of all known-good filter flags */
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, all_flags, NULL);
+       EXPECT_EQ(-1, ret);
+       EXPECT_EQ(EFAULT, errno) {
+               TH_LOG("Failed to detect that all known-good filter flags (0x%X) are supported!",
+                      all_flags);
+       }
+
+       /* Test detection of an unknown filter flag */
+       flag = -1;
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
+       EXPECT_EQ(-1, ret);
+       EXPECT_EQ(EINVAL, errno) {
+               TH_LOG("Failed to detect that an unknown filter flag (0x%X) is unsupported!",
+                      flag);
+       }
+
+       /*
+        * Test detection of an unknown filter flag that may simply need to be
+        * added to this test
+        */
+       flag = flags[ARRAY_SIZE(flags) - 1] << 1;
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
+       EXPECT_EQ(-1, ret);
+       EXPECT_EQ(EINVAL, errno) {
+               TH_LOG("Failed to detect that an unknown filter flag (0x%X) is unsupported! Does a new flag need to be added to this test?",
+                      flag);
+       }
+}
+
 TEST(TSYNC_first)
 {
        struct sock_filter filter[] = {
@@ -2421,6 +2752,99 @@ TEST(syscall_restart)
                _metadata->passed = 0;
 }
 
+TEST_SIGNAL(filter_flag_log, SIGSYS)
+{
+       struct sock_filter allow_filter[] = {
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+       };
+       struct sock_filter kill_filter[] = {
+               BPF_STMT(BPF_LD|BPF_W|BPF_ABS,
+                       offsetof(struct seccomp_data, nr)),
+               BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_getpid, 0, 1),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL),
+               BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW),
+       };
+       struct sock_fprog allow_prog = {
+               .len = (unsigned short)ARRAY_SIZE(allow_filter),
+               .filter = allow_filter,
+       };
+       struct sock_fprog kill_prog = {
+               .len = (unsigned short)ARRAY_SIZE(kill_filter),
+               .filter = kill_filter,
+       };
+       long ret;
+       pid_t parent = getppid();
+
+       ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+       ASSERT_EQ(0, ret);
+
+       /* Verify that the FILTER_FLAG_LOG flag isn't accepted in strict mode */
+       ret = seccomp(SECCOMP_SET_MODE_STRICT, SECCOMP_FILTER_FLAG_LOG,
+                     &allow_prog);
+       ASSERT_NE(ENOSYS, errno) {
+               TH_LOG("Kernel does not support seccomp syscall!");
+       }
+       EXPECT_NE(0, ret) {
+               TH_LOG("Kernel accepted FILTER_FLAG_LOG flag in strict mode!");
+       }
+       EXPECT_EQ(EINVAL, errno) {
+               TH_LOG("Kernel returned unexpected errno for FILTER_FLAG_LOG flag in strict mode!");
+       }
+
+       /* Verify that a simple, permissive filter can be added with no flags */
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, 0, &allow_prog);
+       EXPECT_EQ(0, ret);
+
+       /* See if the same filter can be added with the FILTER_FLAG_LOG flag */
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FILTER_FLAG_LOG,
+                     &allow_prog);
+       ASSERT_NE(EINVAL, errno) {
+               TH_LOG("Kernel does not support the FILTER_FLAG_LOG flag!");
+       }
+       EXPECT_EQ(0, ret);
+
+       /* Ensure that the kill filter works with the FILTER_FLAG_LOG flag */
+       ret = seccomp(SECCOMP_SET_MODE_FILTER, SECCOMP_FILTER_FLAG_LOG,
+                     &kill_prog);
+       EXPECT_EQ(0, ret);
+
+       EXPECT_EQ(parent, syscall(__NR_getppid));
+       /* getpid() should never return. */
+       EXPECT_EQ(0, syscall(__NR_getpid));
+}
+
+TEST(get_action_avail)
+{
+       __u32 actions[] = { SECCOMP_RET_KILL_THREAD, SECCOMP_RET_TRAP,
+                           SECCOMP_RET_ERRNO, SECCOMP_RET_TRACE,
+                           SECCOMP_RET_LOG,   SECCOMP_RET_ALLOW };
+       __u32 unknown_action = 0x10000000U;
+       int i;
+       long ret;
+
+       ret = seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &actions[0]);
+       ASSERT_NE(ENOSYS, errno) {
+               TH_LOG("Kernel does not support seccomp syscall!");
+       }
+       ASSERT_NE(EINVAL, errno) {
+               TH_LOG("Kernel does not support SECCOMP_GET_ACTION_AVAIL operation!");
+       }
+       EXPECT_EQ(ret, 0);
+
+       for (i = 0; i < ARRAY_SIZE(actions); i++) {
+               ret = seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &actions[i]);
+               EXPECT_EQ(ret, 0) {
+                       TH_LOG("Expected action (0x%X) not available!",
+                              actions[i]);
+               }
+       }
+
+       /* Check that an unknown action is handled properly (EOPNOTSUPP) */
+       ret = seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &unknown_action);
+       EXPECT_EQ(ret, -1);
+       EXPECT_EQ(errno, EOPNOTSUPP);
+}
+
 /*
  * TODO:
  * - add microbenchmarks
@@ -2429,6 +2853,8 @@ TEST(syscall_restart)
  * - endianness checking when appropriate
  * - 64-bit arg prodding
  * - arch value testing (x86 modes especially)
+ * - verify that FILTER_FLAG_LOG filters generate log messages
+ * - verify that RET_LOG generates log messages
  * - ...
  */
 
index 7d406c3973ba4944a4baee8363f59c736a98b52e..228c2ae47687dd753250e696456f7fcedb99b17a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Stas Sergeev <stsp@users.sourceforge.net>
  *
@@ -39,7 +40,11 @@ void my_usr1(int sig, siginfo_t *si, void *u)
        stack_t stk;
        struct stk_data *p;
 
+#if __s390x__
+       register unsigned long sp asm("%15");
+#else
        register unsigned long sp asm("sp");
+#endif
 
        if (sp < (unsigned long)sstack ||
                        sp >= (unsigned long)sstack + SIGSTKSZ) {
index 7e1187e007fa59363797522c6253b007f680cdf8..e519b159b60d83fdc14d8ab263387906d6cf1228 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 TEST_PROGS := default_file_splice_read.sh
 TEST_GEN_PROGS_EXTENDED := default_file_splice_read
 
index 01dd6091554c3d2907be701f4caf80ce99367e48..a3c6e5672e09a23fcf6b7da74d1f26ca55401004 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <fcntl.h>
 
index 1ea2adeabc946d22a7a4bdd88cc937778ac25eff..490db5a2e4352185e9672bcf78a00a4602c13823 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 n=`./default_file_splice_read </dev/null | wc -c`
 
 test "$n" = 0 && exit 0
index 1261e3fa1e3a8543359888d534bfda347edac34a..24cff498b31aa831b388e638929f29c36db07dbd 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs static keys kernel module tests
 
 if /sbin/modprobe -q test_static_key_base; then
index 4981c6b6d050e95b77fa1540640a4b71770179f2..b3c8ba3cb66855ff93d6581f7428982be41fca60 100644 (file)
@@ -1,13 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
 CFLAGS += -I../../../../usr/include/
 LDFLAGS += -pthread
 
-TEST_PROGS = sync_test
-
-all: $(TEST_PROGS)
+.PHONY: all clean
 
 include ../lib.mk
 
+# lib.mk TEST_CUSTOM_PROGS var is for custom tests that need special
+# build rules. lib.mk will run and install them.
+
+TEST_CUSTOM_PROGS := $(OUTPUT)/sync_test
+all: $(TEST_CUSTOM_PROGS)
+
 OBJS = sync_test.o sync.o
 
 TESTS += sync_alloc.o
@@ -18,6 +23,16 @@ TESTS += sync_stress_parallelism.o
 TESTS += sync_stress_consumer.o
 TESTS += sync_stress_merge.o
 
-sync_test: $(OBJS) $(TESTS)
+OBJS := $(patsubst %,$(OUTPUT)/%,$(OBJS))
+TESTS := $(patsubst %,$(OUTPUT)/%,$(TESTS))
+
+$(TEST_CUSTOM_PROGS): $(TESTS) $(OBJS)
+       $(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS)
+
+$(OBJS): $(OUTPUT)/%.o: %.c
+       $(CC) -c $^ -o $@
+
+$(TESTS): $(OUTPUT)/%.o: %.c
+       $(CC) -c $^ -o $@
 
-EXTRA_CLEAN := sync_test $(OBJS) $(TESTS)
+EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS)
index c727b96a59b0d009ed93246d0f624ff1bdef045c..5fa02d86b35f6c7b69ca28e8dfc27acdabd1e470 100644 (file)
         "teardown": [
             "$TC qdisc del dev $DEV1 ingress"
         ]
+    },
+    {
+        "id": "d052",
+        "name": "Add 1M filters with the same action",
+        "category": [
+            "filter",
+            "flower"
+        ],
+        "setup": [
+            "$TC qdisc add dev $DEV2 ingress",
+            "./tdc_batch.py $DEV2 $BATCH_FILE --share_action -n 1000000"
+        ],
+        "cmdUnderTest": "$TC -b $BATCH_FILE",
+        "expExitCode": "0",
+        "verifyCmd": "$TC actions list action gact",
+        "matchPattern": "action order 0: gact action drop.*index 1 ref 1000000 bind 1000000",
+        "matchCount": "1",
+        "teardown": [
+            "$TC qdisc del dev $DEV2 ingress",
+            "/bin/rm $BATCH_FILE"
+        ]
     }
-]
\ No newline at end of file
+]
index cd61b7844c0d48505385103b7fd1a9ded7843677..b8462e1b74f960a837de44e5e8b75638d1fdee62 100755 (executable)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0
 
 """
 tdc.py - Linux tc (Traffic Control) unit test driver
@@ -88,7 +89,7 @@ def prepare_env(cmdlist):
             exit(1)
 
 
-def test_runner(filtered_tests):
+def test_runner(filtered_tests, args):
     """
     Driver function for the unit tests.
 
@@ -105,6 +106,8 @@ def test_runner(filtered_tests):
     for tidx in testlist:
         result = True
         tresult = ""
+        if "flower" in tidx["category"] and args.device == None:
+            continue
         print("Test " + tidx["id"] + ": " + tidx["name"])
         prepare_env(tidx["setup"])
         (p, procout) = exec_cmd(tidx["cmdUnderTest"])
@@ -150,7 +153,11 @@ def ns_create():
         exec_cmd(cmd, False)
         cmd = 'ip link set $DEV0 up'
         exec_cmd(cmd, False)
-        cmd = 'ip -s $NS link set $DEV1 up'
+        cmd = 'ip -n $NS link set $DEV1 up'
+        exec_cmd(cmd, False)
+        cmd = 'ip link set $DEV2 netns $NS'
+        exec_cmd(cmd, False)
+        cmd = 'ip -n $NS link set $DEV2 up'
         exec_cmd(cmd, False)
 
 
@@ -211,7 +218,8 @@ def set_args(parser):
                         help='Execute the single test case with specified ID')
     parser.add_argument('-i', '--id', action='store_true', dest='gen_id',
                         help='Generate ID numbers for new test cases')
-    return parser
+    parser.add_argument('-d', '--device',
+                        help='Execute the test case in flower category')
     return parser
 
 
@@ -225,6 +233,8 @@ def check_default_settings(args):
 
     if args.path != None:
          NAMES['TC'] = args.path
+    if args.device != None:
+         NAMES['DEV2'] = args.device
     if not os.path.isfile(NAMES['TC']):
         print("The specified tc path " + NAMES['TC'] + " does not exist.")
         exit(1)
@@ -381,14 +391,17 @@ def set_operation_mode(args):
             if (len(alltests) == 0):
                 print("Cannot find a test case with ID matching " + target_id)
                 exit(1)
-        catresults = test_runner(alltests)
+        catresults = test_runner(alltests, args)
         print("All test results: " + "\n\n" + catresults)
     elif (len(target_category) > 0):
+        if (target_category == "flower") and args.device == None:
+            print("Please specify a NIC device (-d) to run category flower")
+            exit(1)
         if (target_category not in ucat):
             print("Specified category is not present in this file.")
             exit(1)
         else:
-            catresults = test_runner(testcases[target_category])
+            catresults = test_runner(testcases[target_category], args)
             print("Category " + target_category + "\n\n" + catresults)
 
     ns_destroy()
diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py
new file mode 100755 (executable)
index 0000000..707c6bf
--- /dev/null
@@ -0,0 +1,62 @@
+#!/usr/bin/python3
+
+"""
+tdc_batch.py - a script to generate TC batch file
+
+Copyright (C) 2017 Chris Mi <chrism@mellanox.com>
+"""
+
+import argparse
+
+parser = argparse.ArgumentParser(description='TC batch file generator')
+parser.add_argument("device", help="device name")
+parser.add_argument("file", help="batch file name")
+parser.add_argument("-n", "--number", type=int,
+                    help="how many lines in batch file")
+parser.add_argument("-o", "--skip_sw",
+                    help="skip_sw (offload), by default skip_hw",
+                    action="store_true")
+parser.add_argument("-s", "--share_action",
+                    help="all filters share the same action",
+                    action="store_true")
+parser.add_argument("-p", "--prio",
+                    help="all filters have different prio",
+                    action="store_true")
+args = parser.parse_args()
+
+device = args.device
+file = open(args.file, 'w')
+
+number = 1
+if args.number:
+    number = args.number
+
+skip = "skip_hw"
+if args.skip_sw:
+    skip = "skip_sw"
+
+share_action = ""
+if args.share_action:
+    share_action = "index 1"
+
+prio = "prio 1"
+if args.prio:
+    prio = ""
+    if number > 0x4000:
+        number = 0x4000
+
+index = 0
+for i in range(0x100):
+    for j in range(0x100):
+        for k in range(0x100):
+            mac = ("%02x:%02x:%02x" % (i, j, k))
+            src_mac = "e4:11:00:" + mac
+            dst_mac = "e4:12:00:" + mac
+            cmd = ("filter add dev %s %s protocol ip parent ffff: flower %s "
+                   "src_mac %s dst_mac %s action drop %s" %
+                   (device, prio, skip, src_mac, dst_mac, share_action))
+            file.write("%s\n" % cmd)
+            index += 1
+            if index >= number:
+                file.close()
+                exit(0)
index 01087375a7c38eec335ab518c8dd285c7c0858a1..eb188c729dd6a06d03923ecbb7163cc9b1944b4b 100644 (file)
@@ -1,4 +1,5 @@
 """
+# SPDX-License-Identifier: GPL-2.0
 tdc_config.py - tdc user-specified values
 
 Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
@@ -12,6 +13,8 @@ NAMES = {
           # Name of veth devices to be created for the namespace
           'DEV0': 'v0p0',
           'DEV1': 'v0p1',
+          'DEV2': '',
+          'BATCH_FILE': './batch.txt',
           # Name of the namespace to use
           'NS': 'tcut'
         }
index c3254f861fb29c4978055ae776278f1ec914b89c..ccf2d2458703859f5d6583bd34437c0147db9585 100644 (file)
@@ -1,4 +1,5 @@
 """
+# SPDX-License-Identifier: GPL-2.0
 tdc_helper.py - tdc helper functions
 
 Copyright (C) 2017 Lucas Bates <lucasb@mojatatu.com>
index ae459311540896b1d48553dace2c7770de3ce4f2..3496680981f20f9bd0f23899caafe1ee11964c66 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O3 -Wl,-no-as-needed -Wall
 LDFLAGS += -lrt -lpthread -lm
 
index 9c92b7bd56410a38a0da0370bbee202f22d0778c..50da45437daab0b5785a4925ac793644cb9d02fd 100644 (file)
@@ -143,7 +143,8 @@ int setup_timer(int clock_id, int flags, int interval, timer_t *tm1)
                        printf("%-22s %s missing CAP_WAKE_ALARM?    : [UNSUPPORTED]\n",
                                        clockstring(clock_id),
                                        flags ? "ABSTIME":"RELTIME");
-                       return 0;
+                       /* Indicate timer isn't set, so caller doesn't wait */
+                       return 1;
                }
                printf("%s - timer_create() failed\n", clockstring(clock_id));
                return -1;
@@ -213,8 +214,9 @@ int do_timer(int clock_id, int flags)
        int err;
 
        err = setup_timer(clock_id, flags, interval, &tm1);
+       /* Unsupported case - return 0 to not fail the test */
        if (err)
-               return err;
+               return err == 1 ? 0 : err;
 
        while (alarmcount < 5)
                sleep(1);
@@ -228,18 +230,17 @@ int do_timer_oneshot(int clock_id, int flags)
        timer_t tm1;
        const int interval = 0;
        struct timeval timeout;
-       fd_set fds;
        int err;
 
        err = setup_timer(clock_id, flags, interval, &tm1);
+       /* Unsupported case - return 0 to not fail the test */
        if (err)
-               return err;
+               return err == 1 ? 0 : err;
 
        memset(&timeout, 0, sizeof(timeout));
        timeout.tv_sec = 5;
-       FD_ZERO(&fds);
        do {
-               err = select(FD_SETSIZE, &fds, NULL, NULL, &timeout);
+               err = select(0, NULL, NULL, NULL, &timeout);
        } while (err == -1 && errno == EINTR);
 
        timer_delete(tm1);
index 350107f40c1d52a9f503bac0b9639d47e6b7e132..d60506fc77f8bcba61f222db0b0df05a38e2e68b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 # Runs copy_to/from_user infrastructure using test_user_copy kernel module
 
 if /sbin/modprobe -q test_user_copy; then
index 706b68b1c3722d51dc9fce5b9067d00be6fec9f6..3d5a62ff7d31ed437fc5457a501ec9b606839f92 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 ifndef CROSS_COMPILE
 CFLAGS := -std=gnu99
 CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
index cbb29e41ef2b3af6f0b53c18e54d30489c2fb395..e49eca1915f8ca564bc0182f750cfcbf6cfbc267 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for vm selftests
 
 ifndef OUTPUT
index 6d1437f895b8ea393145eec29c40fd0c10ea1e8a..a65b016d4c13a3ead88ed63fa4d7ddc44527ce76 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *
  * A test for the patch "Allow compaction of unevictable pages".
index a10f310d2362ffa5dc869784d928189373a8d68a..93f9e7b813314e6637843f46d5042ebf6ddf2481 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * hugepage-mmap:
  *
index 0d0ef4fc0c0474c905974f53be6e5bd9ea62edfe..e2527f32005b38258790617369a5038c5bfceb3d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * hugepage-shm:
  *
index 77687ab59f77321b3858128c553d73271ac1b618..9b777fa95f090e5bb811e16ae90021a84927e355 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Example of using hugepage memory in a user application using the mmap
  * system call with MAP_HUGETLB flag.  Before running this program make
index 83de4f58d2629cda7964520188bf8e4138be8ad1..ff4d72eb74b9a070eaac98267032079cd7c36ee6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * It tests the mlock/mlock2() when they are invoked
  * on randomly memory region.
index e5dbc87b4297778520bf1cc4a2475774410f1bca..4997b9222cfa5055f9c07f4f1f0a1454bae89d6e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <sys/mman.h>
 #include <stdint.h>
index 7ee062929d3e9ba6c134ac8d70961c69b1c54b69..2a6e76c226bc300d64097888066da46d503c23a8 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <syscall.h>
 #include <errno.h>
 #include <stdio.h>
index 7f96a5c2e2924ccfe0ec3b67b617ab014c56c81c..634d87dfb2a4ef5b1722839315c9abd88a2008f6 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/mman.h>
 #include <stdio.h>
 #include <unistd.h>
index 07548a1fa901ca109dad1e4e89accdfaa1815677..cc826326de87accb0853c80ad498edd8fb2e5de1 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #please run as root
 
 #we need 256M, below is the size in kB
index 88a2ab535e0129106dcdca2d7acb4235cd0557ce..361ef7192cc66619b16eabef2dc316267b003010 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Test selecting other page sizes for mmap/shmget.
 
    Before running this huge pages for each huge page size must have been
index a2c53a3d223d336e29a2e54f2e108a1c51810dae..de2f9ec8a87fb342a7a595a13b009358d9eae000 100644 (file)
@@ -397,7 +397,7 @@ static void retry_copy_page(int ufd, struct uffdio_copy *uffdio_copy,
        }
 }
 
-static int copy_page(int ufd, unsigned long offset)
+static int __copy_page(int ufd, unsigned long offset, bool retry)
 {
        struct uffdio_copy uffdio_copy;
 
@@ -418,7 +418,7 @@ static int copy_page(int ufd, unsigned long offset)
                fprintf(stderr, "UFFDIO_COPY unexpected copy %Ld\n",
                        uffdio_copy.copy), exit(1);
        } else {
-               if (test_uffdio_copy_eexist) {
+               if (test_uffdio_copy_eexist && retry) {
                        test_uffdio_copy_eexist = false;
                        retry_copy_page(ufd, &uffdio_copy, offset);
                }
@@ -427,6 +427,16 @@ static int copy_page(int ufd, unsigned long offset)
        return 0;
 }
 
+static int copy_page_retry(int ufd, unsigned long offset)
+{
+       return __copy_page(ufd, offset, true);
+}
+
+static int copy_page(int ufd, unsigned long offset)
+{
+       return __copy_page(ufd, offset, false);
+}
+
 static void *uffd_poll_thread(void *arg)
 {
        unsigned long cpu = (unsigned long) arg;
@@ -544,7 +554,7 @@ static void *background_thread(void *arg)
        for (page_nr = cpu * nr_pages_per_cpu;
             page_nr < (cpu+1) * nr_pages_per_cpu;
             page_nr++)
-               copy_page(uffd, page_nr * page_size);
+               copy_page_retry(uffd, page_nr * page_size);
 
        return NULL;
 }
@@ -779,7 +789,7 @@ static void retry_uffdio_zeropage(int ufd,
        }
 }
 
-static int uffdio_zeropage(int ufd, unsigned long offset)
+static int __uffdio_zeropage(int ufd, unsigned long offset, bool retry)
 {
        struct uffdio_zeropage uffdio_zeropage;
        int ret;
@@ -814,7 +824,7 @@ static int uffdio_zeropage(int ufd, unsigned long offset)
                        fprintf(stderr, "UFFDIO_ZEROPAGE unexpected %Ld\n",
                                uffdio_zeropage.zeropage), exit(1);
                } else {
-                       if (test_uffdio_zeropage_eexist) {
+                       if (test_uffdio_zeropage_eexist && retry) {
                                test_uffdio_zeropage_eexist = false;
                                retry_uffdio_zeropage(ufd, &uffdio_zeropage,
                                                      offset);
@@ -830,6 +840,11 @@ static int uffdio_zeropage(int ufd, unsigned long offset)
        return 0;
 }
 
+static int uffdio_zeropage(int ufd, unsigned long offset)
+{
+       return __uffdio_zeropage(ufd, offset, false);
+}
+
 /* exercise UFFDIO_ZEROPAGE */
 static int userfaultfd_zeropage_test(void)
 {
index f863c664e3d143be1dd439a6098d5e389a49e762..6b5598b5525236a42fcf098797a571e4c2c40b7c 100644 (file)
@@ -1,8 +1,4 @@
-TEST_PROGS := watchdog-test
-
-all: $(TEST_PROGS)
+# SPDX-License-Identifier: GPL-2.0
+TEST_GEN_PROGS := watchdog-test
 
 include ../lib.mk
-
-clean:
-       rm -fr $(TEST_PROGS)
index a1391be2dc1e2bba529e471dbc84291622575d99..6e290874b70e212e72c0f337bbdb597036d00d48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Watchdog Driver Test Program
  */
index 97f187e2663f3adaf37a50674c36aafec11d291f..7b1adeee4b0f1956cc78d2e722bf17e5f716454c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 include ../lib.mk
@@ -20,7 +21,7 @@ BINARIES_64 := $(TARGETS_C_64BIT_ALL:%=%_64)
 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
 BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
 
-CFLAGS := -O2 -g -std=gnu99 -pthread -Wall
+CFLAGS := -O2 -g -std=gnu99 -pthread -Wall -no-pie
 
 UNAME_M := $(shell uname -m)
 CAN_BUILD_I386 := $(shell ./check_cc.sh $(CC) trivial_32bit_program.c -m32)
index b77313ba2ab1646005ec87bd37409c7969bf00e6..01de41c1b7251da297f7e4bd27424b745ddb7136 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ioperm.c - Test case for ioperm(2)
  * Copyright (c) 2015 Andrew Lutomirski
index c496ca97bc18a3d4d10c01848209cc9e15b4a310..6aa27f34644c495ecb81b379521b0b795372eb0d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * iopl.c - Test case for a Linux on Xen 64-bit bug
  * Copyright (c) 2015 Andrew Lutomirski
index b9a22f18566ae27eef76b22590448e2725b15e12..961e3ee26c27229312e539f155aa3d89e391241b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ldt_gdt.c - Test cases for LDT and GDT access
  * Copyright (c) 2015 Andrew Lutomirski
index 9230981f2e12a0905e675da931938fef0ad8abc6..7546eba7f17a0dea02e9943aa6c33fb6a7aa438e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MPX_DEBUG_H
 #define _MPX_DEBUG_H
 
index ce85356d7e2e7fefc9d79891ad69185ab124dd8f..c13607ef5c11e0d00c270cc52426c0763d62fbe1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Written by Dave Hansen <dave.hansen@intel.com>
  */
index 093c190178a962dc193f7b02421813971a916a82..3f0093911f03d5e474d245c4b4e37064643e917b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MPX_HW_H
 #define _MPX_HW_H
 
index af706a5398f7a7328448f83233a1da0a90e544b2..6dbdd66b824240dd5191af4d4266539fef674a46 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _MPX_MM_H
 #define _MPX_MM_H
 
index b20293956eecd31ea5c2a041283f014471094c6d..3818f25391c24c34beeb20c2e9f937bdfc9b111a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _PKEYS_HELPER_H
 #define _PKEYS_HELPER_H
 #define _GNU_SOURCE
index 23927845518dee583f45d207e6bd2ea52d7f8343..555e43ca846b2bd5fb27cf50d796b2696c85989a 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Tests x86 Memory Protection Keys (see Documentation/x86/protection-keys.txt)
  *
index eaea9243970840dab196cb1ddf84586e30803f0a..1ae1c5a7392ead3c8b8a108f70bdddbf0d4f100e 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 
 #include <sys/ptrace.h>
index 534e71e35c6a1ff0a8e003f8cdeee7550511df7c..94410fa2b5ed3efe631ec478c9737cb711d36474 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 .global sys32_helper
 sys32_helper:
        /* Args: syscall_args_32*, function pointer */
index 4adcca0c80c4495427ce71204f77b1de95863d66..6b5036fbb7358ab8e1cd1186b18bf68debd2781b 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef _GNU_SOURCE
 #define _GNU_SOURCE 1
 #undef __USE_GNU
index db4933e31af9256c2520297e26a2fe38ce65448f..aec6692c6dcf80fa08cda06ab9d1aec461591a05 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef _GNU_SOURCE
 #define _GNU_SOURCE 1
 #undef __USE_GNU
index b8e61a047f6ba1bcc566cfeef3cfed219467ad5d..09789c0ce3e9cd71e95498db3d964bb40a1be841 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #undef _GNU_SOURCE
 #define _GNU_SOURCE 1
 #undef __USE_GNU
index 65d7a2bf7e143d9b7a145103d3a632ed7274ea65..29973cde06d3db08f5219dc692c82be82624e581 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * ldt_gdt.c - Test cases for LDT and GDT access
  * Copyright (c) 2011-2015 Andrew Lutomirski
index c3a87e5f9d36482c4a606afe9c6e82bfff8fe90c..7f78eb1b59cb45d2f854a42caa0c6e5c97cce3d6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 TEST_PROGS := zram.sh
index 683a292e329015f3044194e753dd9fa9c62ba48a..754de7da426a80a2ae386042d30a5904b44446e6 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 TCID="zram.sh"
 
 . ./zram_lib.sh
index 3a961e998281b776a9e2e13e8995d99bd738217c..21169322baeacafaaef1ecdd1bc74b18bb20c048 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 VERSION = 1.0
 
 BINDIR=usr/bin
index 02d5179803aae1cdfa43ecf23e25bc8e1c9b9e43..2f122de5841b17792f3e27bc651ef43f68314030 100644 (file)
@@ -1,4 +1,5 @@
 .TH TMON 8
+# SPDX-License-Identifier: GPL-2.0
 .SH NAME
 \fBtmon\fP - A monitoring and testing tool for Linux kernel thermal subsystem
 
index acf2165c04e64f8b15e844b787de9f59c324b199..4e6506078494fbe160ea511b91dfcddd5768793b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for USB tools
 
 CC = $(CROSS_COMPILE)gcc
index 8c4a6f0aa82ded0bedcf700d830c86a5982ae1f6..df36e4c28f619a5985d0007ceb731f3f3e42907b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC = gcc
 LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
 LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
index b30b3dc4c7888ced43664cdbb06f14805e5b9db8..e8cad6a4f9c9c71bfc7f36631dd647d5acd00a20 100644 (file)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 #
 # test types can be passed on the command line:
 #
index 66f8bf038c9f6a5d3ec5c8d41acc0f91313bf7c1..da3a430849a873c92d13d7bb9fbada87ad4fc5b3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 SUBDIRS := libsrc src
 includedir = @includedir@/usbip
 include_HEADERS := $(addprefix libsrc/, \
index 955c3ccb729a28eb3910fc586f2ec0003dc215fe..8028c3a5c22b43a41e3e22e977efe66260c3e20b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 if [ -r Makefile ]; then
        make distclean
index 90daf95c0804a4a726bb62e595620e22679ab648..dabd2c91d311f1505a1b0b759ba6f75387f77b6a 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 libusbip_la_CPPFLAGS = -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
 libusbip_la_CFLAGS   = @EXTRA_CFLAGS@
 libusbip_la_LDFLAGS  = -version-info @LIBUSBIP_VERSION@
index 5eaaa78e2c6a4739c81937ad7b33168b0d189194..a941671e4900d8ab34db78607e221ef600c5ac2e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LIST_H
 #define _LIST_H
 
index 36ac88ece0b87b2a1dd641f1fc3dbc13ecf8be33..14d5e67d398a96bee5c0970d97f2d8ffa0d108a8 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 32ac1d105d1854dd26c22e9c14b424f9041efa6d..0cd5f17e7eb224d3c4b2698071b266cecc84c8c4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 
 #ifndef __SYSFS_UTILS_H
 #define __SYSFS_UTILS_H
index 1517a232ab18798ba748d2c9bf16a4a3f6fa9ef5..001bb8e8f66894f694d71e04c7391e05c59e7502 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2005-2007 Takahiro Hirofuchi
  */
index 51ef5fe485dde86f53b7b7debe88682ab3ba693c..e45ec9d2fdbc57081ffd24c96ff2f416a9f429ed 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2005-2007 Takahiro Hirofuchi
  */
index 9bd2cd71645df0d26fb314ee1726ee047e90c543..5727dfb15a83efecb4ef7dc951149183a38e5108 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2005-2007 Takahiro Hirofuchi
  */
index 4898d3bafb109861f55e59dfd34c108d8ada0f50..418b404d5121079837aade8ba692c977e441ef52 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2005-2007 Takahiro Hirofuchi
  */
index e81a4ebadeff9b1e5f9c8fd9f6d0913e8bd6f609..e26f39e0579d257db5119d99bf46e50275f5504c 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 AM_CPPFLAGS = -I$(top_srcdir)/libsrc -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
 AM_CFLAGS   = @EXTRA_CFLAGS@
 LDADD       = $(top_builddir)/libsrc/libusbip.la
index c1e875cf1078cbc364ca9981f0d310d60331cba7..7032687621d3b503edb38f6ad69926631633c7b4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2005-2007 Takahiro Hirofuchi
  */
index 39c89a5ea990fab23fbccfd8a6cfa3952502bf98..8e2a908115c2d5476d14c94df6af6ed1e865d917 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all: test mod
 test: virtio_test vringh_test
 virtio_test: virtio_ring.o virtio_test.o
index ba34f9e96efd6bd760870150dd9cb6ba0eacbd69..0ac3caf90877fefd73384c78470359b110e7c053 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if defined(__i386__) || defined(__x86_64__)
 #define barrier() asm volatile("" ::: "memory")
 #define virt_mb() __sync_synchronize()
index fb94f0787c47fe46afa325428ac7ac9a1e9f717e..b14c2c3b6b85782d67c74ec9d01aa83e1207a84e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef BUG_H
 #define BUG_H
 
index c9ccfd42ec137d593913bffcca846e197d1cb9f4..903dc9c4bd115f196538138da3b32f30bcbd807e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_COMPILER_H
 #define LINUX_COMPILER_H
 
index 18601f6689b9e13de81f4926423c7b88cdc44bdf..1571e24e94942ba92da68e995f1c5e008c42acfc 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_DMA_MAPPING_H
 #define _LINUX_DMA_MAPPING_H
 
index e32eff8b2a14f9f50c2ffd654acfd413d41275c0..0943c644a701a458f53b8ed2806114d40e872445 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef ERR_H
 #define ERR_H
 #define MAX_ERRNO      4095
index d9554fc3f3403c2adef3d883fb767cabaa82015e..395521a7a8d86b6cfe8510ac46fc6fee1b3fdb73 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef KERNEL_H
 #define KERNEL_H
 #include <stdbool.h>
index 28ce95a059978563eb42ea4942a08e186d063ae6..9dfa96fea2b23910c2fb9f431fe519e3605d09bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/export.h>
 
 #define MODULE_LICENSE(__MODULE_LICENSE_value) \
index 68c9e2adc996e01654da3685b0e177ff3725c89a..9a45f90e2d08974c42c6e6dc242b5cfd35d5e120 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef SCATTERLIST_H
 #define SCATTERLIST_H
 #include <linux/kernel.h>
index 7e1c1197d4390ede3a3ec6447256ee09ebf38600..319dcaa07755f3200cd3f2f29de4fddc8ecc7015 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_SLAB_H
 #define GFP_KERNEL 0
 #define GFP_ATOMIC 0
index fa05d01b2c9052fb405f5e3e1aefe1d51e646f4f..991dfb2639987f23475f7cb261031ae5dedb3b39 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef UACCESS_H
 #define UACCESS_H
 
index d8f534025b7f7bd3cb27d663f78de9b232fa85d3..b751350d4ce8a10b0bb9133c325621347d047c7c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_VIRTIO_H
 #define LINUX_VIRTIO_H
 #include <linux/scatterlist.h>
index 9de9e6ac1d10b5d3bb4a7874056f194e3107b023..5b50f7eebd9c092353ea825220072ce3e20cad83 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef _LINUX_VIRTIO_BYTEORDER_STUB_H
 #define _LINUX_VIRTIO_BYTEORDER_STUB_H
 
index 9ba11815e0a16b93ec0e04735a3486ac9dc6bfe4..dbf14c1e2188d9bcadf200e0ea9e8f33ed569987 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #include <linux/virtio_byteorder.h>
 #include <linux/virtio.h>
 #include <uapi/linux/virtio_config.h>
index c012edbdb13b65c5e8578242e996d1bc11dbcb33..85c98c2810fb39512cdd6916f64d3ded5a612abd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 all:
 
 all: ring virtio_ring_0_9 virtio_ring_poll virtio_ring_inorder ptr_ring noring
index b8d1c1daac7cc089734c6a6cf3453ae7277abe62..ce2440d5ca936cc5a89f453ec93c150dd5294032 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include "main.h"
 #include <assert.h>
index 7b22f1b20652082b606e4ee55dae31b56f670ef3..38bb171acebade83314d9556baa7893c7d203911 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include "main.h"
 #include <stdlib.h>
index 29b0d3920bfc412a049b1478a7074869cbd113df..dcc3ea758f48ede0615730b3a3e4ef167e03aae0 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
 
 CPUS_ONLINE=$(lscpu --online -p=cpu|grep -v -e '#')
 #use last CPU for host. Why not the first?
index 4d99c78234d34c028cbc64922323e66031a30564..cf50b2e5ff022b5cfdb8bf4219523ea5f48b16cb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef VIRTIO_RING_H
 #define VIRTIO_RING_H
 #include "../../../../include/uapi/linux/virtio_ring.h"
index 0d2381633475a2faca9412a3d1dbce673d4dd32b..7843ebcda71dec9d0616663675eabd40106fdbfc 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 CC = gcc
 CFLAGS = -O2 -Wall -pthread
 
index 8de79bfeaa73281d2d0111737a1c1461d16f571a..e67885969f0e1ee2704844ecfe5b7df0c029d416 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __TRACE_AGENT_H__
 #define __TRACE_AGENT_H__
 #include <pthread.h>
index 0fecaec90d0d69cf622555104cf9b5f66001b68d..b427def67e7e5272391bafd20152be6f454c8c77 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
 #include <getopt.h>
 #include <string.h>
index 9476c616d0642c5e2f0162d4fabd3945a98d4f32..293653463303b6a1adc9cde2ba8ede6babfa7b59 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Simple test of virtio code, entirely in userpsace. */
 #define _GNU_SOURCE
 #include <sched.h>
index 006029456988d637d74a1da983747ce5a9625e1f..be320b905ea75db150da97dfac999b0f7e90b47b 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Makefile for vm tools
 #
 TARGETS=page-types slabinfo page_owner_sort
index f1c055f3c2436564302adebf429f239557d14a3c..18fc112b65cdf76703adfe2227ebaa1f34ed44a9 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * User-space helper to sort the output of /sys/kernel/debug/page_owner
  *
index b9d34b37c017be2ea35b9083877965f8aa224060..b0b7ef6d0de1c1d1afc6fb9f53a5c73f80a7d3f1 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Slabinfo: Tool to get reports about slabs
  *
index d53112fdbf5a1cf028affefd5d28437ab69b70d9..43658b8a975e57a8d8b98ce0c1fd78e7e810afe3 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # Configuration for initramfs
 #
index 0b87e71c00fcc9c6cb0de2248b191e89228bf9b6..237a028693ce9b497deabb95aa8f922485bee5fd 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 #
 # kbuild file for usr/ - including initramfs image
 #
@@ -7,6 +8,7 @@ PHONY += klibcdirs
 
 suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION))
 datafile_y = initramfs_data.cpio$(suffix_y)
+datafile_d_y = .$(datafile_y).d
 AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/$(datafile_y)"
 
 
@@ -29,12 +31,12 @@ ramfs-args  := \
         $(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
         $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID))
 
-# .initramfs_data.cpio.d is used to identify all files included
+# $(datafile_d_y) is used to identify all files included
 # in initramfs and to detect if any files are added/removed.
 # Removed files are identified by directory timestamp being updated
 # The dependency list is generated by gen_initramfs.sh -l
-ifneq ($(wildcard $(obj)/.initramfs_data.cpio.d),)
-       include $(obj)/.initramfs_data.cpio.d
+ifneq ($(wildcard $(obj)/$(datafile_d_y)),)
+       include $(obj)/$(datafile_d_y)
 endif
 
 quiet_cmd_initfs = GEN     $@
@@ -52,5 +54,5 @@ $(deps_initramfs): klibcdirs
 # 3) If gen_init_cpio are newer than initramfs_data.cpio
 # 4) arguments to gen_initramfs.sh changes
 $(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
-       $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d
+       $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y)
        $(call if_changed,initfs)
index 225ad244cf8833371543c6fb3f0f2df8d54b48dc..03b21189d58be5e81f817f10f4b9c46965f12c82 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
index c14322d1c0cfb9d7ad70bf70adce5f77dd8fe921..10d325e24566804a07ce002934096812feb07d9d 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
   initramfs_data includes the compressed binary that is the
   filesystem used for early user space.
index b0cc1a34db27a4db12a922b93dd8df991189d87b..70691c08e1edc4511e33f54c73c4d890a1b5c6e6 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # KVM common configuration items and defaults
 
 config HAVE_KVM
index b9f68e4add71015ea2a9757c4c30a7eed65cfa7b..95cba079982897bb5b1a1ab6a5717aa080d021b4 100644 (file)
@@ -1326,21 +1326,12 @@ static void teardown_hyp_mode(void)
 {
        int cpu;
 
-       if (is_kernel_in_hyp_mode())
-               return;
-
        free_hyp_pgds();
        for_each_possible_cpu(cpu)
                free_page(per_cpu(kvm_arm_hyp_stack_page, cpu));
        hyp_cpu_pm_exit();
 }
 
-static int init_vhe_mode(void)
-{
-       kvm_info("VHE mode initialized successfully\n");
-       return 0;
-}
-
 /**
  * Inits Hyp-mode on all online CPUs
  */
@@ -1421,8 +1412,6 @@ static int init_hyp_mode(void)
                }
        }
 
-       kvm_info("Hyp mode initialized successfully\n");
-
        return 0;
 
 out_err:
@@ -1456,6 +1445,7 @@ int kvm_arch_init(void *opaque)
 {
        int err;
        int ret, cpu;
+       bool in_hyp_mode;
 
        if (!is_hyp_mode_available()) {
                kvm_err("HYP mode not available\n");
@@ -1474,21 +1464,28 @@ int kvm_arch_init(void *opaque)
        if (err)
                return err;
 
-       if (is_kernel_in_hyp_mode())
-               err = init_vhe_mode();
-       else
+       in_hyp_mode = is_kernel_in_hyp_mode();
+
+       if (!in_hyp_mode) {
                err = init_hyp_mode();
-       if (err)
-               goto out_err;
+               if (err)
+                       goto out_err;
+       }
 
        err = init_subsystems();
        if (err)
                goto out_hyp;
 
+       if (in_hyp_mode)
+               kvm_info("VHE mode initialized successfully\n");
+       else
+               kvm_info("Hyp mode initialized successfully\n");
+
        return 0;
 
 out_hyp:
-       teardown_hyp_mode();
+       if (!in_hyp_mode)
+               teardown_hyp_mode();
 out_err:
        teardown_common_resources();
        return err;
index f7dc5ddd6847ba09a6ced07403cba502bb4f8e4b..e53b596f483b99f0a7f9d897938b30f47a079316 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_KVM_H
 
index ed3229282888680e6d8af1ad9fa86540db42156f..55fed77a9f739e1f07dba71b010ac29c72e92cc7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #if !defined(_TRACE_VGIC_H) || defined(TRACE_HEADER_MULTI_READ)
 #define _TRACE_VGIC_H
 
index f51c1e1b3f70f8cbb4c26d378a04a27d3cfb2dbb..547f12dc4d543bafd3b28c74352761aafc62f0a0 100644 (file)
@@ -1466,6 +1466,16 @@ static void vgic_mmio_write_its_ctlr(struct kvm *kvm, struct vgic_its *its,
 {
        mutex_lock(&its->cmd_lock);
 
+       /*
+        * It is UNPREDICTABLE to enable the ITS if any of the CBASER or
+        * device/collection BASER are invalid
+        */
+       if (!its->enabled && (val & GITS_CTLR_ENABLE) &&
+               (!(its->baser_device_table & GITS_BASER_VALID) ||
+                !(its->baser_coll_table & GITS_BASER_VALID) ||
+                !(its->cbaser & GITS_CBASER_VALID)))
+               goto out;
+
        its->enabled = !!(val & GITS_CTLR_ENABLE);
 
        /*
@@ -1474,6 +1484,7 @@ static void vgic_mmio_write_its_ctlr(struct kvm *kvm, struct vgic_its *its,
         */
        vgic_its_process_commands(kvm, its);
 
+out:
        mutex_unlock(&its->cmd_lock);
 }
 
@@ -1801,37 +1812,33 @@ typedef int (*entry_fn_t)(struct vgic_its *its, u32 id, void *entry,
 static int scan_its_table(struct vgic_its *its, gpa_t base, int size, int esz,
                          int start_id, entry_fn_t fn, void *opaque)
 {
-       void *entry = kzalloc(esz, GFP_KERNEL);
        struct kvm *kvm = its->dev->kvm;
        unsigned long len = size;
        int id = start_id;
        gpa_t gpa = base;
+       char entry[esz];
        int ret;
 
+       memset(entry, 0, esz);
+
        while (len > 0) {
                int next_offset;
                size_t byte_offset;
 
                ret = kvm_read_guest(kvm, gpa, entry, esz);
                if (ret)
-                       goto out;
+                       return ret;
 
                next_offset = fn(its, id, entry, opaque);
-               if (next_offset <= 0) {
-                       ret = next_offset;
-                       goto out;
-               }
+               if (next_offset <= 0)
+                       return next_offset;
 
                byte_offset = next_offset * esz;
                id += next_offset;
                gpa += byte_offset;
                len -= byte_offset;
        }
-       ret =  1;
-
-out:
-       kfree(entry);
-       return ret;
+       return 1;
 }
 
 /**
@@ -1940,6 +1947,14 @@ static int vgic_its_save_itt(struct vgic_its *its, struct its_device *device)
        return 0;
 }
 
+/**
+ * vgic_its_restore_itt - restore the ITT of a device
+ *
+ * @its: its handle
+ * @dev: device handle
+ *
+ * Return 0 on success, < 0 on error
+ */
 static int vgic_its_restore_itt(struct vgic_its *its, struct its_device *dev)
 {
        const struct vgic_its_abi *abi = vgic_its_get_abi(its);
@@ -1951,6 +1966,10 @@ static int vgic_its_restore_itt(struct vgic_its *its, struct its_device *dev)
        ret = scan_its_table(its, base, max_size, ite_esz, 0,
                             vgic_its_restore_ite, dev);
 
+       /* scan_its_table returns +1 if all ITEs are invalid */
+       if (ret > 0)
+               ret = 0;
+
        return ret;
 }
 
@@ -2048,11 +2067,12 @@ static int vgic_its_device_cmp(void *priv, struct list_head *a,
 static int vgic_its_save_device_tables(struct vgic_its *its)
 {
        const struct vgic_its_abi *abi = vgic_its_get_abi(its);
+       u64 baser = its->baser_device_table;
        struct its_device *dev;
        int dte_esz = abi->dte_esz;
-       u64 baser;
 
-       baser = its->baser_device_table;
+       if (!(baser & GITS_BASER_VALID))
+               return 0;
 
        list_sort(NULL, &its->device_list, vgic_its_device_cmp);
 
@@ -2107,10 +2127,7 @@ static int handle_l1_dte(struct vgic_its *its, u32 id, void *addr,
        ret = scan_its_table(its, gpa, SZ_64K, dte_esz,
                             l2_start_id, vgic_its_restore_dte, NULL);
 
-       if (ret <= 0)
-               return ret;
-
-       return 1;
+       return ret;
 }
 
 /**
@@ -2140,8 +2157,9 @@ static int vgic_its_restore_device_tables(struct vgic_its *its)
                                     vgic_its_restore_dte, NULL);
        }
 
+       /* scan_its_table returns +1 if all entries are invalid */
        if (ret > 0)
-               ret = -EINVAL;
+               ret = 0;
 
        return ret;
 }
@@ -2198,17 +2216,17 @@ static int vgic_its_restore_cte(struct vgic_its *its, gpa_t gpa, int esz)
 static int vgic_its_save_collection_table(struct vgic_its *its)
 {
        const struct vgic_its_abi *abi = vgic_its_get_abi(its);
+       u64 baser = its->baser_coll_table;
+       gpa_t gpa = BASER_ADDRESS(baser);
        struct its_collection *collection;
        u64 val;
-       gpa_t gpa;
        size_t max_size, filled = 0;
        int ret, cte_esz = abi->cte_esz;
 
-       gpa = BASER_ADDRESS(its->baser_coll_table);
-       if (!gpa)
+       if (!(baser & GITS_BASER_VALID))
                return 0;
 
-       max_size = GITS_BASER_NR_PAGES(its->baser_coll_table) * SZ_64K;
+       max_size = GITS_BASER_NR_PAGES(baser) * SZ_64K;
 
        list_for_each_entry(collection, &its->collection_list, coll_list) {
                ret = vgic_its_save_cte(its, collection, gpa, cte_esz);
@@ -2239,17 +2257,18 @@ static int vgic_its_save_collection_table(struct vgic_its *its)
 static int vgic_its_restore_collection_table(struct vgic_its *its)
 {
        const struct vgic_its_abi *abi = vgic_its_get_abi(its);
+       u64 baser = its->baser_coll_table;
        int cte_esz = abi->cte_esz;
        size_t max_size, read = 0;
        gpa_t gpa;
        int ret;
 
-       if (!(its->baser_coll_table & GITS_BASER_VALID))
+       if (!(baser & GITS_BASER_VALID))
                return 0;
 
-       gpa = BASER_ADDRESS(its->baser_coll_table);
+       gpa = BASER_ADDRESS(baser);
 
-       max_size = GITS_BASER_NR_PAGES(its->baser_coll_table) * SZ_64K;
+       max_size = GITS_BASER_NR_PAGES(baser) * SZ_64K;
 
        while (read < max_size) {
                ret = vgic_its_restore_cte(its, gpa, cte_esz);
@@ -2258,6 +2277,10 @@ static int vgic_its_restore_collection_table(struct vgic_its *its)
                gpa += cte_esz;
                read += cte_esz;
        }
+
+       if (ret > 0)
+               return 0;
+
        return ret;
 }
 
index 571c1ce37d152f86c3690d9e2427f5eeca97cd2c..9e65feb6fa58d75988e969954aaa5d0c9c99fed0 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * KVM coalesced MMIO
  *
index 6bca74ca533109a5e23ec40b045286095400ebad..36f84264ed257efa422fc6618dc93cdbf0d1ddb6 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_COALESCED_MMIO_H__
 #define __KVM_COALESCED_MMIO_H__
 
index c608ab495282ddb63ace657ce0a6deeea18a2240..f2ac53ab82438f0b473ecd8ed91b1e2548af7ca2 100644 (file)
@@ -565,8 +565,6 @@ kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
 {
        if (args->flags & ~(KVM_IRQFD_FLAG_DEASSIGN | KVM_IRQFD_FLAG_RESAMPLE))
                return -EINVAL;
-       if (args->gsi >= KVM_MAX_IRQ_ROUTES)
-               return -EINVAL;
 
        if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
                return kvm_irqfd_deassign(kvm, args);
index ab88c7dc05143f764a29ee30a9b03167794eb06e..e130a4a03530da514e88224030c67191ba7f2227 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __KVM_VFIO_H
 #define __KVM_VFIO_H